/* 雞蛋通民眾版｜頁面樣式（定稿：A「農場全景地圖」為底，搬入 B、C 被點名的做法）
 * 規則：顏色、字級、間距、圓角、厚度只引用 tokens.css；這裡只用既有 token 組出元件層變數，不新增顏色。
 * 1px、2px 細線例外；插圖的幾何尺寸寫在 SVG 屬性裡（以 viewBox 單位計）。
 * 斷點：1100（全景地圖疊價牌）、760（場景帶標題疊在插圖上）、600（手機：徽章地圖、窄版換景帶、原因卡收合）。
 */

/* ---------- 元件層變數（全部由 token 組成） ---------- */
:root {
  --lift: calc(var(--edge) + var(--stroke));            /* 按鈕靜止：front 抬高＝下緣厚度＋描邊 */
  --lift-hover: calc(var(--edge) + var(--stroke) + 2px); /* 滑過再抬 2px */
  --lift-pressed: calc(var(--edge-pressed) + var(--stroke)); /* 按下只剩 1px 下緣 */
  --focus: var(--grass-ink);
  --sign-edge: inset 0 calc(-1 * var(--edge)) 0 var(--card-edge);
  --plank-edge: inset 0 calc(-1 * var(--edge)) 0 var(--wood-edge);
  --yolk-band: inset 0 calc(-1 * var(--edge)) 0 var(--yolk-edge);
  --ease-pop: cubic-bezier(.3, .7, .4, 1.5);
  --ease-back: cubic-bezier(.3, .7, .4, 1);
  /* 蛋黃、草綠這類亮底上的字：用描邊墨色，深淺主題都是深字 */
  --on-bright: var(--line);
  --frame: var(--line);     /* 牌子外框：淺色是墨線；深色改用較亮的牌子下緣色，暗底上才看得到邊 */
  /* 分段色帶：草綠主導，集蛋室一段淡蛋黃；木頭只當牌面 */
  --ground: var(--bg-deep);         /* 全景地圖最下緣的地面，也是第一段換景帶的起點 */
  --band-shop: var(--bg-deep);
  --band-eggroom: var(--yolk-soft);
  --band-feed: var(--bg-deep);
  --band-brooder: var(--bg);        /* 育雛室：晨光底配木框遊戲 */
  --band-pasture: var(--bg-deep);
  --band-board: var(--bg);
  --band-foot: var(--grass-soft);
  /* 小路三層：路肩墨線、奶白路面、虛線（插圖裡的小路與桌機側邊步道共用） */
  --road-edge: var(--line);
  --road-face: var(--card);
  --road-dash: var(--trail);
  /* 換景帶小山丘的稜線（深色時換成看得見的亮綠） */
  --hill-line: var(--line);
  /* 蛋黃牌：淺色是淡蛋黃；深色不鋪整片淡蛋黃（會變成泥黃），改用牌面色，只留蛋黃下緣 */
  --warm-card: var(--yolk-soft);
  /* 育雛室遊戲舞台：淺色鋪淡蛋黃，像保溫燈照亮的那一角 */
  --stage: var(--yolk-soft);
  /* 成本長條的「其他」色塊：淺色是牌面色；深色時牌面色和卡片同色會看不見，改用次要文字色 */
  --seg-other: var(--card);
  /* 場景帶在手機上的高度（插圖裁切窗） */
  --scene-h: calc(var(--s9) + var(--s4));
}
/* 深色：相鄰兩段一定不同、第一段不和首屏同色；集蛋室不整段鋪蛋黃（用點綴）。
 * 首屏 底 → 地圖地面與蛋行看板 草坡 → 集蛋室 底 → 飼料倉 草坡 → 育雛室 淡草綠 → 放牧草地 草坡 → 告示欄 底 → 頁尾 淡草綠
 * 小路改用比所有色帶都亮的三層（亮綠路肩、淡草綠路面、草綠虛線），讓主線在暗底上看得見 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --frame: var(--card-edge);
    --ground: var(--bg-deep);
    --band-shop: var(--bg-deep);
    --band-eggroom: var(--bg);
    --band-feed: var(--bg-deep);
    --band-brooder: var(--grass-soft);
    --band-pasture: var(--bg-deep);
    --band-board: var(--bg);
    --road-edge: var(--card-edge);
    --road-face: var(--grass-soft);
    --road-dash: var(--grass);
    --hill-line: var(--card-edge);
    --warm-card: var(--card);
    --stage: var(--bg-deep);
    --seg-other: var(--ink-soft);
  }
}
:root[data-theme="dark"] {
  --frame: var(--card-edge);
  --ground: var(--bg-deep);
  --band-shop: var(--bg-deep);
  --band-eggroom: var(--bg);
  --band-feed: var(--bg-deep);
  --band-brooder: var(--grass-soft);
  --band-pasture: var(--bg-deep);
  --band-board: var(--bg);
  --road-edge: var(--card-edge);
  --road-face: var(--grass-soft);
  --road-dash: var(--grass);
  --hill-line: var(--card-edge);
  --warm-card: var(--card);
  --stage: var(--bg-deep);
  --seg-other: var(--ink-soft);
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* 平滑捲動只給站內連結：帶 hash 進站時直接跳到定位，site.js 在第一次點頁內連結時才加 smooth-ok */
html.smooth-ok:not(.motion-off) { scroll-behavior: smooth; }
/* 「跳到內容」的落點是 main（tabindex=-1），整塊不畫焦點框 */
#main:focus { outline: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.75;
  overflow-x: clip;
}
:lang(zh-Hant) { line-break: strict; overflow-wrap: break-word; word-break: normal; }
/* 避免段落最後一行只剩一個字 */
p, li, figcaption, h3, summary { text-wrap: pretty; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
b, strong { font-weight: 700; }
a { color: var(--grass-ink); text-decoration-thickness: 2px; text-underline-offset: var(--s1); }
a:hover { color: var(--ink); }
:focus-visible { outline: var(--stroke) solid var(--focus); outline-offset: var(--s1); }
[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;
}
.skip {
  position: absolute; z-index: 10; left: var(--s4); top: var(--s2);
  padding: var(--s2) var(--s4); background: var(--card); color: var(--ink);
  border: var(--stroke) solid var(--line); border-radius: var(--r-pill);
  font-weight: 700; transform: translateY(calc(-100% - var(--s5)));
}
.skip:focus { transform: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: min(var(--page-max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.prose { max-width: 36em; }
.lead { font-size: var(--fs-sub); line-height: 1.75; text-wrap: pretty; }
.src { font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); margin-top: var(--s3); }
.small { font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }

/* ---------- 插圖：粗墨線、圓線端、扁平填色 ---------- */
.ill {
  fill: none;
  stroke: var(--line);
  stroke-width: var(--stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.f-bg { fill: var(--bg); }
.f-deep { fill: var(--bg-deep); }
.f-ground { fill: var(--ground); }
.f-card { fill: var(--card); }
.f-grass { fill: var(--grass); }
.f-grass-soft { fill: var(--grass-soft); }
.f-grass-edge { fill: var(--grass-edge); }
.f-yolk { fill: var(--yolk); }
.f-yolk-soft { fill: var(--yolk-soft); }
.f-yolk-edge { fill: var(--yolk-edge); }
.f-wood { fill: var(--wood); }
.f-wood-deep { fill: var(--wood-deep); }
.f-wood-edge { fill: var(--wood-edge); }
.f-shell { fill: var(--shell); }
.f-comb { fill: var(--comb); }
.f-ink { fill: var(--line); }
.f-hot { fill: var(--hot); }
.f-to { fill: var(--to); }
.sk-none { stroke: none; }
.sk-onwood { stroke: var(--on-wood); }
.sk-soft { stroke: var(--ink-soft); }
.sk-trail { stroke: var(--trail); }
.sk-wood { stroke: var(--wood); }
.sk-wood-deep { stroke: var(--wood-deep); stroke-width: calc(var(--stroke) * 2); }
.sk-yolk { stroke: var(--yolk-edge); }
.sk-cold { stroke: var(--cold); }
.sk-hot { stroke: var(--hot); }
.sk-grass { stroke: var(--grass); }
.sk-edge { stroke: var(--card-edge); }
.dash { stroke-dasharray: 8 7; }

/* 縮放補償：symbol 被放大 N 倍時，描邊除以 N，讓畫面上一律是 --stroke 粗 */
.k047 { stroke-width: calc(var(--stroke) / .47); }
.k055 { stroke-width: calc(var(--stroke) / .55); }
.k06 { stroke-width: calc(var(--stroke) / .6); }
.k07 { stroke-width: calc(var(--stroke) / .7); }
.k075 { stroke-width: calc(var(--stroke) / .75); }
.k08 { stroke-width: calc(var(--stroke) / .8); }
.k084 { stroke-width: calc(var(--stroke) / .84); }
.k086 { stroke-width: calc(var(--stroke) / .86); }
.k087 { stroke-width: calc(var(--stroke) / .87); }
.k088 { stroke-width: calc(var(--stroke) / .88); }
.k09 { stroke-width: calc(var(--stroke) / .9); }
.k11 { stroke-width: calc(var(--stroke) / 1.1); }
.k115 { stroke-width: calc(var(--stroke) / 1.15); }
.k12 { stroke-width: calc(var(--stroke) / 1.2); }
.k13 { stroke-width: calc(var(--stroke) / 1.3); }
.k133 { stroke-width: calc(var(--stroke) / 1.333); }
.k15 { stroke-width: calc(var(--stroke) / 1.5); }
.k16 { stroke-width: calc(var(--stroke) / 1.6); }

/* SVG 文字 */
.t-ribbon { font-size: var(--fs-place); font-weight: 900; fill: var(--ink); stroke: none; }
.t-a4 { font-size: var(--fs-place); font-weight: 900; fill: var(--ink-soft); stroke: none; }
/* 蛋殼示意圖上的字：蛋殼深淺主題都是淺奶油色，字一律用深墨色（--on-bright），次級字用透明度分層 */
.t-code { font-size: var(--fs-ask); font-weight: 900; fill: var(--on-bright); stroke: none; line-height: 1.2; }
.t-egg { font-size: var(--fs-sub); font-weight: 900; fill: var(--on-bright); stroke: none; }
.t-egg--soft { font-size: var(--fs-body); font-weight: 700; opacity: .75; }
.t-mini { font-size: var(--fs-cap); font-weight: 900; fill: var(--on-bright); stroke: none; }

/* ---------- 牌子（奶白牌面＋粗墨線＋實色下緣） ---------- */
.sign {
  background: var(--card);
  border: var(--stroke) solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sign-edge);
  padding: var(--s5) var(--s5) calc(var(--s5) + var(--edge));
}

/* ---------- 膠囊按鈕：edge（下緣層）＋ front（按鈕面），按下時 front 下沉 ---------- */
.btn {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: var(--lift) 0 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--r-pill);
  -webkit-tap-highlight-color: transparent;
}
.btn-edge {
  position: absolute; left: 0; right: 0; bottom: 0; top: var(--lift);
  border-radius: var(--r-pill);
  background: var(--grass-edge);
  border: var(--stroke) solid var(--line);
}
.btn-front {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: var(--s2) var(--s5);
  border-radius: var(--r-pill);
  background: var(--grass);
  color: var(--on-bright);
  border: var(--stroke) solid var(--line);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  transform: translateY(calc(-1 * var(--lift)));
  transition: transform 600ms var(--ease-back);
}
.btn:hover .btn-front {
  transform: translateY(calc(-1 * var(--lift-hover)));
  transition: transform 250ms var(--ease-pop);
}
.btn:active .btn-front {
  transform: translateY(calc(-1 * var(--lift-pressed)));
  transition-duration: 34ms;
}
.btn--card .btn-front, .btn--toggle .btn-front { background: var(--card); color: var(--ink); }
.btn--card .btn-edge, .btn--toggle .btn-edge { background: var(--card-edge); }
.btn--yolk .btn-front { background: var(--yolk); }
.btn--yolk .btn-edge { background: var(--yolk-edge); }
.btn[aria-pressed="true"] .btn-front {
  background: var(--yolk);
  color: var(--on-bright);
  transform: translateY(calc(-1 * var(--lift-pressed)));
}
.btn[aria-pressed="true"] .btn-edge { background: var(--yolk-edge); }
.btn:focus-visible { outline-offset: var(--s1); }
.btn[aria-busy="true"] { cursor: progress; }

/* ---------- 頁首 ---------- */
.masthead { padding: var(--s3) max(var(--gutter), 3.5%) var(--s2); background: var(--bg); }
.masthead-in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s2); }
.brand-mark { width: var(--s7); height: var(--s7); }
.brand-name { font-size: var(--fs-place); font-weight: 900; line-height: 1.5; }
.brand-note {
  font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft);
  background: var(--card); border: 2px solid var(--line); border-radius: var(--r-pill);
  padding: 0 var(--s3);
}
.motion-btn { margin-left: auto; }
/* 頁首右側的小遊戲入口：小膠囊連結，和暫停動畫綁成一組靠右（排不下時整組一起換行） */
.mast-tools { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.mast-play {
  display: inline-flex; align-items: center;
  min-height: calc(var(--s7) - var(--s1)); padding: 0 var(--s3);
  font-size: var(--fs-cap); font-weight: 700; line-height: 1.6;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  background: var(--yolk-soft); border: 2px solid var(--frame); border-radius: var(--r-pill);
}
.mast-play:hover { background: var(--yolk); color: var(--on-bright); }
.mast-tools .motion-btn { margin-left: 0; }
.motion-btn .btn-front { padding: var(--s1) var(--s4); font-size: var(--fs-cap); line-height: 1.6; min-height: calc(var(--s7) - var(--lift)); }
.motion-ic { width: var(--s4); height: var(--s4); stroke-width: calc(var(--stroke) * 1.2); }
/* 動畫開關（v1.2）：字和圖示跟著狀態換（播放中顯示「暫停動畫」、已暫停顯示「繼續動畫」）；隱藏的那一份不進無障礙名稱。
   沒有 JS 時按鈕無作用，先隱形但保留位置 */
.motion-state { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.motion-state--off, html.motion-off .motion-state--on { display: none; }
html.motion-off .motion-state--off { display: inline-flex; }
.ic-play { fill: var(--line); }
html:not(.js) .motion-btn { visibility: hidden; }

/* ---------- 第一屏：入口價牌＋農場全景 ---------- */
/* 1280 以上（而且視窗夠高）：文字欄與地圖疊在同一格。文字欄參與排版（不用絕對定位），
 * 內容比地圖高時整格被撐高、地圖貼底，木牌頂端永遠在頁首下方 --s3 處，不會往上蓋到頁首 */
.hero { position: relative; background: var(--bg); display: grid; }
.hero > * { grid-area: 1 / 1; min-width: 0; }
.farm-map { align-self: end; }
.hero-copy {
  position: relative; z-index: 1;
  align-self: end;
  margin: var(--s3) 0 var(--s5) max(var(--gutter), 3.5%);
  width: clamp(21em, 31%, 27.5em);
}

.entrance-sign { position: relative; }
.price-board {
  position: relative; z-index: 2;
  background: var(--wood-deep);
  color: var(--on-wood);
  border: var(--stroke) solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--plank-edge);
  padding: var(--s4) var(--s5) calc(var(--s4) + var(--edge));
}
.price-board::before, .price-board::after {
  content: ""; position: absolute; top: var(--s3);
  width: var(--s3); height: var(--s3); border-radius: 50%;
  background: var(--wood-edge); border: 2px solid var(--line);
}
.price-board::before { left: var(--s3); }
.price-board::after { right: var(--s3); }
/* 木牌標題（「今天一台斤雞蛋」或「一台斤雞蛋最新行情」）在所有寬度都只排一行：
 * 字級取 --fs-ask 與「牌面內寬 ÷ 9.5 個字」較小的那個，最長的 9 個字也放得下 */
.price-board { container-type: inline-size; }
.price-board h1 {
  font-size: min(var(--fs-ask), calc((100cqi - 2 * var(--s2)) / 9.5));
  font-weight: 900; line-height: 1.2; padding-inline: var(--s2); white-space: nowrap;
}
.price { display: flex; align-items: baseline; gap: var(--s2); padding-inline: var(--s2); }
.price-num {
  font-size: var(--fs-price); font-weight: 900; line-height: 1;
  color: var(--yolk); font-variant-numeric: tabular-nums;
}
.price-unit { font-size: var(--fs-ask); font-weight: 900; line-height: 1.2; }
.price-foot {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s1) var(--s3); margin-top: var(--s2); padding-inline: var(--s2);
}
.price-kind {
  font-size: var(--fs-cap); font-weight: 700; line-height: 1.6;
  color: var(--wood-deep); background: var(--on-wood);
  border-radius: var(--r-pill); padding: 0 var(--s3);
}
/* 日期放大到內文大小、緊貼在數字下方，不讓「今天」單獨成立 */
.price-meta { font-size: var(--fs-body); font-weight: 700; line-height: 1.6; }
/* 日期與出處各自不斷行；出處做成 inline-block，窄螢幕時整段換到下一行（「・」在 strict 斷行下不能放行首） */
.price-src { display: inline-block; font-size: var(--fs-cap); font-weight: 400; white-space: nowrap; }
.price-meta time { white-space: nowrap; }

.sign-legs {
  position: relative; z-index: 1;
  margin-top: calc(-1 * var(--s3));
  padding: var(--s5) 0;
}
.post {
  position: absolute; top: 0; bottom: var(--s1);
  width: var(--s5);
  background: var(--wood);
  border: var(--stroke) solid var(--line); border-top: 0;
  border-radius: 0 0 var(--s1) var(--s1);
}
.post:first-child { left: 16%; }
.post:nth-child(2) { right: 16%; }
.sign-legs::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 0;
  height: var(--s3);
  background: var(--grass); border: 2px solid var(--line); border-radius: var(--r-pill);
}
.farm-tag {
  position: relative;
  width: 88%; margin: 0 auto;
  background: var(--card); color: var(--ink);
  border: var(--stroke) solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--sign-edge);
  padding: var(--s2) var(--s4) calc(var(--s3) + var(--edge));
  font-size: var(--fs-body); line-height: 1.6;
}
.farm-tag::before, .farm-tag::after {
  content: ""; position: absolute; top: calc(-1 * var(--s5));
  width: 2px; height: var(--s5); background: var(--line);
}
.farm-tag::before { left: 16%; }
.farm-tag::after { right: 16%; }
.farm-tag .sum { margin-top: var(--s2); }

/* 算式小牌：40.5 − 3 ＝ 37.5（數字由伺服器帶入） */
.sum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.sum-chip {
  display: inline-block;
  padding: 0 var(--s3) var(--edge);
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--sign-edge);
  font-size: var(--fs-sub); font-weight: 900; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.sum-chip--wood { background: var(--wood-deep); color: var(--on-wood); box-shadow: var(--plank-edge); }
.sum-chip--yolk { background: var(--yolk); color: var(--on-bright); box-shadow: var(--yolk-band); }
.sum-op { font-size: var(--fs-sub); font-weight: 900; line-height: 1.5; }

.hero-notes { display: grid; gap: var(--s1); margin-top: var(--s3); }
.hero-notes li, .notes li, .hero-stale {
  position: relative; padding-left: var(--s5);
  font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft);
}
/* 第一句（不是超市售價）是家長最需要的提醒：內文大小、粗體、墨色；第二句是補充：小字 */
.hero-notes li:first-child { font-size: var(--fs-body); font-weight: 700; color: var(--ink); }
/* 資料過期提醒（v1.2）：放在提醒清單前面的獨立方塊（矮手機要排到遊戲膠囊前面，所以不在清單裡）。
   伺服器沒填字時 p 是空元素：它和後面的連結一起收起，外層 div 沒有外距，不留空位。
   有字時和第一句提醒同級（內文大小、粗體、墨色、蛋黃圓點），連結縮排對齊文字。 */
.hero-stale:empty, .hero-stale:empty + .hero-stale-link { display: none; }
.hero-stale { margin-top: var(--s3); font-size: var(--fs-body); font-weight: 700; color: var(--ink); }
.hero-stale-link {
  display: inline-block; margin-left: var(--s5); padding-block: var(--s1);
  font-size: var(--fs-cap); font-weight: 700; line-height: 1.6; color: var(--ink);
  text-decoration: underline; text-underline-offset: .2em;
}
.hero-stale, .hero-stale-link { text-shadow: 0 0 var(--s1) var(--bg), 0 0 var(--s1) var(--bg), 0 0 var(--s1) var(--bg); }
.hero-notes li::before, .notes li::before, .hero-stale::before {
  content: ""; position: absolute; left: var(--s1); top: calc(.8em - var(--s1));
  width: var(--s3); height: var(--s3); border-radius: 50%;
  background: var(--yolk); border: 2px solid var(--line);
}
.hero-lead { margin-top: var(--s5); color: var(--ink); }
/* 文字疊在地圖的草坡上時，墊一圈底色光暈，坡線穿過也讀得到 */
.hero-notes li, .hero-lead { text-shadow: 0 0 var(--s1) var(--bg), 0 0 var(--s1) var(--bg), 0 0 var(--s1) var(--bg); }
/* 第一屏的遊戲入口：導言下方的蛋黃色膠囊連結（小雞圖示＋名稱＋時間） */
.play-cta { margin-top: var(--s4); max-width: 100%; }
.play-cta .btn-front {
  justify-content: flex-start; gap: var(--s3);
  padding: var(--s2) var(--s5) var(--s2) var(--s4);
  text-align: start; white-space: normal;
}
.play-cta-ic { flex: none; width: var(--s6); height: var(--s6); }
.play-cta-text { display: grid; }
.play-cta-name { font-size: var(--fs-sub); font-weight: 900; line-height: 1.4; }
.play-cta-sub { font-size: var(--fs-cap); font-weight: 700; line-height: 1.5; }
/* 算式只在產地價剛好等於大運輸價減 3 時顯示；否則只留兩個數字（site.js 加 sum--pair） */
.sum--pair .sum-op, .sum--pair .sum-chip--k { display: none; }

/* 全景地圖：底圖 SVG＋HTML 地點連結（位置以 viewBox 單位換算成百分比） */
.map-wide { position: relative; --vx: 0; --vy: 0; --vw: 1440; --vh: 720; aspect-ratio: var(--vw) / var(--vh); overflow: hidden; }
/* 平板寬度裁掉左邊的空草地與上面的天空：底圖放大後貼右下角，地點座標跟著換算 */
.map-land {
  position: absolute; right: 0; bottom: 0; display: block;
  width: calc(1440 / var(--vw) * 100%); height: calc(720 / var(--vh) * 100%);
}
.map-spots { position: absolute; inset: 0; }
.road-edge { stroke: var(--road-edge); }
.road { stroke: var(--road-face); }
.road-dash { stroke: var(--road-dash); stroke-dasharray: 14 16; }
.spot {
  position: absolute;
  left: calc((var(--x) - var(--vx)) / var(--vw) * 100%);
  top: calc((var(--y) - var(--vy)) / var(--vh) * 100%);
  width: calc(var(--w) / var(--vw) * 100%);
  display: flex; flex-direction: column; align-items: center;
  color: var(--on-wood); text-decoration: none;
  border-radius: var(--r-sm);
}
.spot:hover { color: var(--on-wood); }
.spot--shop { --x: 600; --y: 536; --w: 170; }
.spot--eggroom { --x: 860; --y: 536; --w: 170; }
.spot--feed { --x: 1180; --y: 526; --w: 170; }
.spot--brooder { --x: 940; --y: 292; --w: 240; }
.spot--pasture { --x: 650; --y: 332; --w: 220; }
.spot--board { --x: 1250; --y: 146; --w: 150; }
.spot-art { display: block; width: 100%; height: auto; overflow: visible; transition: transform 600ms var(--ease-back); }
.spot-name {
  position: relative;
  margin-top: calc(-1 * var(--s4));
  padding: 0 var(--s3) var(--s1);
  background: var(--wood-deep); color: var(--on-wood);
  border: 2px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--plank-edge);
  font-size: var(--fs-sub); font-weight: 900; line-height: 1.6; white-space: nowrap;
  transition: background-color 120ms linear;
}
.spot-plate { display: flex; align-items: center; gap: var(--s2); margin-top: calc(-1 * var(--s5)); white-space: nowrap; }
.spot-plate .spot-name { margin-top: 0; }
.spot--star .spot-name { font-size: var(--fs-place); line-height: 1.5; padding-inline: var(--s4); }
.spot-tag {
  padding: 0 var(--s4) var(--s1);
  background: var(--yolk); color: var(--on-bright);
  border: 2px solid var(--line); border-radius: var(--r-pill);
  box-shadow: var(--yolk-band);
  font-size: var(--fs-body); font-weight: 900; line-height: 1.6; white-space: nowrap;
}
.spot:hover .spot-art, .spot:focus-visible .spot-art { transform: translateY(calc(-1 * var(--s2))); transition: transform 250ms var(--ease-pop); }
.spot:hover .spot-name, .spot:focus-visible .spot-name { background: var(--grass-edge); }

/* 手機徽章地圖（600px 以下） */
.map-compact { display: none; position: relative; height: calc(var(--s9) * 3 + var(--s8) + var(--s3)); }
.map-c-land { position: absolute; inset: 0; display: block; width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map-c-land path, .road-set--n path { vector-effect: non-scaling-stroke; }
.map-c-land .road-edge, .road-set--n .road-edge { stroke-width: 30px; }
.map-c-land .road, .road-set--n .road { stroke-width: 24px; }
.map-c-land .road-dash, .road-set--n .road-dash { stroke-width: 4px; stroke-dasharray: 10 12; }
.map-c-title {
  position: absolute; z-index: 1; top: 0; left: 50%; transform: translateX(-50%);
  padding: 0 var(--s4);
  background: var(--card); color: var(--ink);
  border: var(--stroke) solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--sign-edge);
  font-size: var(--fs-sub); font-weight: 900; line-height: 1.6; white-space: nowrap;
}
.deco { position: absolute; display: block; height: auto; }
.deco--tree { right: 1%; top: calc(var(--s9) + var(--s5)); width: var(--s7); }
.deco--hens { left: 50%; top: calc(var(--s9) * 3 - var(--s5)); width: calc(var(--s8) - var(--s2)); transform: translateX(-50%); }
.badges { position: absolute; inset: 0; }
.badge {
  --d: var(--s8);
  position: absolute; z-index: 1;
  left: var(--bx); top: var(--by);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  color: var(--on-wood); text-decoration: none;
  border-radius: var(--r-card);
}
.badge:hover { color: var(--on-wood); }
.badge--shop { --bx: 27%; --by: calc(var(--s6) + var(--s1)); }
.badge--eggroom { --bx: 73%; --by: calc(var(--s6) + var(--s1)); }
.badge--feed { --bx: 73%; --by: calc(var(--s9) + var(--s7)); }
.badge--brooder { --bx: 30%; --by: calc(var(--s9) + var(--s7) - var(--s2)); --d: calc(var(--s9) - var(--s4)); }
.badge--pasture { --bx: 27%; --by: calc(var(--s9) * 2 + var(--s8) + var(--s3)); }
.badge--board { --bx: 73%; --by: calc(var(--s9) * 2 + var(--s8) + var(--s3)); }
.disc {
  display: grid; place-items: center;
  width: var(--d); height: var(--d); border-radius: 50%;
  background: var(--card);
  border: var(--stroke) solid var(--line);
  box-shadow: var(--sign-edge);
  transition: transform 600ms var(--ease-back);
}
.disc svg { width: 84%; height: auto; margin-top: calc(-1 * var(--s1)); stroke-width: calc(var(--stroke) * 2.4); overflow: visible; }
.badge--star .disc { background: var(--yolk-soft); box-shadow: var(--yolk-band); }
.badge-name {
  position: relative;
  margin-top: calc(-1 * var(--s2));
  padding: 0 var(--s2);
  background: var(--wood-deep); color: var(--on-wood);
  border: 2px solid var(--line); border-radius: var(--r-sm);
  font-size: var(--fs-body); font-weight: 900; line-height: 1.6; white-space: nowrap;
}
.badge--star .badge-name { font-size: var(--fs-sub); }
.badge-tag {
  margin-top: 2px;
  padding: 0 var(--s3);
  background: var(--yolk); color: var(--on-bright);
  border: 2px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-cap); font-weight: 900; line-height: 1.6; white-space: nowrap;
}
.rays {
  position: absolute; z-index: -1; left: 50%; top: calc(var(--d) / 2);
  width: calc(var(--d) * 1.55); height: calc(var(--d) * 1.55);
  transform: translate(-50%, -50%);
  fill: none; stroke: var(--yolk-edge); stroke-width: 3px; stroke-linecap: round;
  pointer-events: none;
}
.rays path { vector-effect: non-scaling-stroke; }
.badge:hover .disc { transform: translateY(calc(-1 * var(--s1))); transition: transform 250ms var(--ease-pop); }
.badge:active .disc { transform: translateY(2px); transition-duration: 34ms; }

/* ---------- 換景帶：小路從上一段延伸下來，穿過下一個地點的入口 ---------- */
.gate { position: relative; background: var(--from); }
.gate-art { display: block; width: 100%; height: auto; }
.gate-art--n { display: none; }
.gate--shop { --from: var(--ground); --to: var(--band-shop); }
.gate--eggroom { --from: var(--band-shop); --to: var(--band-eggroom); }
.gate--feed { --from: var(--band-eggroom); --to: var(--band-feed); }
.gate--brooder { --from: var(--band-feed); --to: var(--band-brooder); }
.gate--pasture { --from: var(--band-brooder); --to: var(--band-pasture); }
.gate--board { --from: var(--band-pasture); --to: var(--band-board); }
.gate--home { --from: var(--band-board); --to: var(--band-foot); }
.f-from { fill: var(--from); }
.hill { stroke: var(--hill-line); }
.road-from-crop { display: none; }
/* 路頭兩種：1300 以上從側邊步道彎進來（.road-spine）；以下從小坡後面走出來（.road-mid） */
.road-spine, .scene-road--s { display: none; }
.gate .signpost { position: absolute; z-index: 1; top: var(--s3); left: calc(50% + var(--s6)); }
.gate--sp-l .signpost { left: auto; right: calc(50% + var(--s6)); }
/* 第一道門的路牌：1366×768、1536×864 的首屏底邊剛好切在路牌上緣，往下挪一點，讓它整塊落在第二屏 */
@media (min-width: 1280px) { .gate--shop .signpost { top: calc(var(--s3) + var(--s4)); } }

.signpost {
  position: relative;
  display: inline-flex; align-items: baseline; gap: var(--s2);
  padding: var(--s1) var(--s5) calc(var(--s1) + var(--edge)) var(--s4);
  background: var(--wood-deep); color: var(--on-wood);
  border: var(--stroke) solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--plank-edge);
  text-decoration: none;
  transition: transform 600ms var(--ease-back);
}
.signpost:hover, .signpost:focus-visible { color: var(--on-wood); transform: translateY(-2px); transition: transform 250ms var(--ease-pop); }
.signpost-kicker { font-size: var(--fs-cap); line-height: 1.6; }
.signpost-name { font-size: var(--fs-sub); font-weight: 900; line-height: 1.5; }
.signpost--star { background: var(--yolk); color: var(--on-bright); box-shadow: var(--yolk-band); }
.signpost--star:hover, .signpost--star:focus-visible { color: var(--on-bright); }

/* ---------- 每段：場景帶（地點大插圖＋名稱木牌＋問題） ---------- */
.place { position: relative; }
.place--shop { background: var(--band-shop); }
.place--eggroom { background: var(--band-eggroom); }
.place--feed { background: var(--band-feed); }
.place--brooder { background: var(--band-brooder); }
.place--pasture { background: var(--band-pasture); }
.place--board { background: var(--band-board); }
.scene--shop { --c: 967; }
.scene--eggroom { --c: 418; }
.scene--feed { --c: 927; }
.scene--brooder { --c: 450; }
.scene--pasture { --c: 820; }
.scene--board { --c: 460; }

.scene { display: grid; }
.scene > * { grid-area: 1 / 1; }
.scene-art-box { overflow: clip; }
.scene-art { display: block; width: 100%; height: auto; }
.scene-road--n { display: none; }
.scene-head {
  align-self: center; justify-self: center;
  width: min(var(--page-max), calc(100% - 2 * var(--gutter)));
  padding-block: var(--s5);
  pointer-events: none;
}
.scene-head h2 {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s3); max-width: 52%;
}
.nobr { display: inline-block; }
.scene[data-side="left"] .scene-head h2 { width: fit-content; margin-left: auto; margin-right: 4%; }
.place-name {
  display: inline-block;
  font-size: var(--fs-place); font-weight: 900; line-height: 1.5;
  color: var(--on-wood); background: var(--wood-deep);
  border: var(--stroke) solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--plank-edge);
  padding: var(--s1) var(--s4) calc(var(--s1) + var(--edge));
}
.place-ask { font-size: var(--fs-ask); font-weight: 900; line-height: 1.2; }

.place-body { padding-block: var(--s5) var(--s8); }
.place-body > * + * { margin-top: var(--s6); }
/* 行長：中文段落不超過 36em */
.place-body p, .place-body figcaption { max-width: 36em; }
.place-body .chart-msg, .place-body .game-fallback, .place-body .bubble { max-width: none; }

/* ---------- 圖表卡 ---------- */
.chart-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s3) var(--s5); margin-bottom: var(--s3);
}
.chart-title { font-size: var(--fs-sub); font-weight: 700; line-height: 1.4; }
.range-group { display: flex; flex-wrap: wrap; gap: var(--s3); }
/* 讀數列：圖上方大字顯示目前選到的日期與數值（取代會蓋住線的提示框） */
.readout {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3);
  min-height: calc(var(--fs-place) * 1.5);
  margin-bottom: var(--s2);
}
.place-body .readout { max-width: none; }
.readout-date { font-size: var(--fs-body); font-weight: 700; line-height: 1.5; color: var(--ink-soft); }
.readout-val { font-size: var(--fs-place); font-weight: 900; line-height: 1.5; color: var(--grass-ink); font-variant-numeric: tabular-nums; }
.chart-box {
  position: relative;
  height: calc(var(--s9) * 3 + var(--s5));
  border-radius: var(--r-sm);
  touch-action: pan-y;
}
.chart-box--supply { height: calc(var(--s9) * 3); }
.chart-box--mini { height: calc(var(--s9) * 2); margin-top: var(--s3); }
.chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-box.is-empty .chart-svg { visibility: hidden; }
.chart-msg {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  color: var(--ink-soft); font-size: var(--fs-body);
  pointer-events: none;
}
.chart-box.is-fail .chart-msg {
  inset: var(--s6) var(--s5);
  background: var(--bg-deep); border: 2px dashed var(--card-edge); border-radius: var(--r-sm);
  color: var(--ink); font-weight: 700;
}
.chart-cap { margin-top: var(--s3); font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }

/* 圖表內 SVG（由 site.js 產生） */
.c-grid { stroke: var(--bg-deep); stroke-width: 2px; }
.c-base { stroke: var(--line); stroke-width: var(--stroke); stroke-linecap: round; }
.c-axis { font-size: var(--fs-cap); fill: var(--ink-soft); }
.c-axis--year { font-weight: 700; fill: var(--ink); }
.c-unit { font-size: var(--fs-cap); font-weight: 700; fill: var(--ink); }
.c-area { fill: var(--grass-soft); }
.c-line { fill: none; stroke: var(--grass-ink); stroke-width: var(--stroke); stroke-linejoin: round; stroke-linecap: round; }
.c-fc { fill: none; stroke: var(--wood); stroke-width: var(--stroke); stroke-dasharray: 8 7; stroke-linecap: round; }
.c-fc-dot { fill: var(--card); stroke: var(--wood); stroke-width: var(--stroke); }
.c-last { fill: var(--yolk); stroke: var(--line); stroke-width: var(--stroke); }
/* 最新一筆的直虛線：畫在資料線底下、淡一點，不蓋住最後一階 */
.c-now { stroke: var(--ink-soft); stroke-width: 2px; stroke-dasharray: 4 6; }
.c-origin { stroke: var(--wood); stroke-width: 2px; stroke-dasharray: 5 5; }
/* 圖上文字墊一圈牌面色描邊，格線穿過時仍讀得到 */
.c-band-text, .c-note { paint-order: stroke; stroke: var(--card); stroke-width: var(--s1); stroke-linejoin: round; }
.c-band { fill: var(--yolk-soft); }
.c-band-text { font-size: var(--fs-cap); font-weight: 700; fill: var(--ink); }
.c-mark { fill: var(--card); stroke: var(--line); stroke-width: var(--stroke); }
.c-note { font-size: var(--fs-cap); font-weight: 700; fill: var(--ink); }
.c-lead { stroke: var(--line); stroke-width: 2px; }
/* 斷軸記號：縱軸不是從 0 開始時，在縱軸底端左側（軸外）畫兩道斜線；牌面色小塊只切開軸線本身，不碰資料線 */
.c-yaxis { stroke: var(--line); stroke-width: 2px; }
.c-break-gap { fill: var(--card); }
.c-break { fill: none; stroke: var(--line); stroke-width: 2px; stroke-linecap: round; }
.c-cross { stroke: var(--line); stroke-width: 2px; }
.c-dot { fill: var(--yolk); stroke: var(--line); stroke-width: var(--stroke); }
.c-hit { fill: transparent; }
.c-cursor { opacity: 0; }
.c-cursor.is-on { opacity: 1; }

.legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: var(--fs-cap); line-height: 1.6; }
.legend-item { display: inline-flex; align-items: center; gap: var(--s2); }
.legend-key { width: var(--s6); height: var(--s3); }
.key-solid { stroke: var(--grass-ink); stroke-width: var(--stroke); stroke-linecap: round; }
.key-dash { stroke: var(--wood); stroke-width: var(--stroke); stroke-dasharray: 6 6; stroke-linecap: round; }

/* ---------- 蛋行看板：價格吊牌、說明卡 ---------- */
/* 三張統計吊牌掛在一根木橫桿上（吊線上端有東西可掛，不再懸空） */
.price-tags {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5);
  padding-top: var(--s6);
}
.price-tags::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: var(--s3);
  background: var(--wood); border: 2px solid var(--frame); border-radius: var(--r-pill);
}
.tag {
  position: relative;
  background: var(--warm-card);
  border: var(--stroke) solid var(--line);
  border-radius: var(--r-sm) var(--r-card) var(--r-card) var(--r-sm);
  box-shadow: var(--yolk-band);
  padding: var(--s4) var(--s5) calc(var(--s4) + var(--edge)) var(--s7);
}
.tag::before {
  content: ""; position: absolute; left: var(--s4); top: var(--s5);
  width: var(--s4); height: var(--s4); border-radius: 50%;
  background: var(--band-shop); border: var(--stroke) solid var(--line);
}
.tag::after {
  content: ""; position: absolute; left: calc(var(--s4) + var(--s2) - 1px);
  top: calc(-1 * (var(--s6) - var(--s3)));
  width: 2px; height: calc(var(--s6) - var(--s3) + var(--s5)); background: var(--frame);
}
.tag-label { font-size: var(--fs-body); font-weight: 700; line-height: 1.5; }
.tag-num { display: flex; align-items: baseline; gap: var(--s1); font-variant-numeric: tabular-nums; }
.tag-num > span:first-child { font-size: var(--fs-ask); font-weight: 900; line-height: 1.2; }
.tag-unit { font-size: var(--fs-sub); font-weight: 700; line-height: 1.5; }
.tag-note { font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }

/* 卡片各自依內容長高（來源跟在內文後面，不再把短卡拉成同高、底下空一大塊） */
.cards { display: grid; gap: var(--s5); align-items: start; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card h3 { font-size: var(--fs-sub); font-weight: 700; line-height: 1.4; margin-bottom: var(--s3); }
.card { display: flex; flex-direction: column; }
.card .src { margin-top: auto; padding-top: var(--s3); }
.card .sum, .card-pic { margin-bottom: var(--s3); }
.card-pic { display: block; width: 100%; max-width: calc(var(--s9) + var(--s8)); height: auto; }
.pic-step { fill: none; stroke: var(--grass-ink); stroke-width: calc(var(--stroke) * 1.4); stroke-linejoin: round; stroke-linecap: round; }

.notes { display: grid; gap: var(--s1); }

/* ---------- 集蛋室 ---------- */
.egg-count {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: var(--s4) var(--s6);
}
.count-lead { font-size: var(--fs-sub); font-weight: 700; line-height: 1.5; }
.count-num { display: flex; flex-wrap: nowrap; align-items: baseline; gap: var(--s2); font-variant-numeric: tabular-nums; }
.count-num > span:first-child { font-size: var(--fs-price); font-weight: 900; line-height: 1; color: var(--grass-ink); }
.count-unit { font-size: var(--fs-place); font-weight: 900; line-height: 1.5; white-space: nowrap; }
.count-detail { font-size: var(--fs-body); line-height: 1.75; max-width: 24em; }
.count-art { width: calc(var(--s9) * 2 + var(--s6)); height: auto; }

.forecast {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4) var(--s5);
  background: var(--card);
  border: var(--stroke) dashed var(--frame);
  border-radius: var(--r-card);
  padding: var(--s5);
}
.fc-art { width: var(--s8); height: var(--s8); }
.fc-body h3 { font-size: var(--fs-sub); font-weight: 700; line-height: 1.4; margin-bottom: var(--s2); }
.fc-points { display: grid; gap: var(--s1); margin-block: var(--s2); }
.fc-points li { font-variant-numeric: tabular-nums; }
.fc-mini-cap { margin-top: var(--s2); font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
.fc-note { margin-top: var(--s3); font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); max-width: 36em; }
.fc-score { margin-top: var(--s2); font-size: var(--fs-cap); line-height: 1.6; font-weight: 700; }
/* 長說明的收合鈕：桌機不顯示（永遠展開），760 以下才出現 */
.fc-more-sum, .stop-sum { display: block; list-style: none; cursor: default; }
.fc-more-sum::-webkit-details-marker, .stop-sum::-webkit-details-marker { display: none; }
/* 研究說明（note_zh 與誤差成績）在所有寬度都預設收起，按「研究說明」才展開 */
.fc-more-sum { display: block; margin-top: var(--s3); cursor: pointer; }
.fc-more-sum .reason-more { display: inline-flex; align-items: center; min-height: calc(var(--s7) - var(--s1)); padding-inline: var(--s4); }
/* 預估已過期：方框小圖上方的小標 */
.fc-expired {
  display: inline-block; margin-top: var(--s2); padding: 0 var(--s3);
  font-size: var(--fs-cap); font-weight: 700; line-height: 1.75;
  background: var(--bg-deep); color: var(--ink);
  border: 2px solid var(--frame); border-radius: var(--r-pill);
}
.stop-sum .reason-more { display: none; }
/* 預估過期（v1.2）：方框收成一行摘要（site.js 加 forecast--folded）；展開後只排內文（小圖、研究說明），不放裝飾插圖 */
.forecast--folded { display: block; padding-block: var(--s3); }
.fc-fold-sum {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  min-height: var(--s7); list-style: none; cursor: pointer;
}
.fc-fold-sum::-webkit-details-marker { display: none; }
.fc-fold-text { flex: 1 1 20em; font-size: var(--fs-body); font-weight: 700; line-height: 1.6; color: var(--ink); }
.fc-fold-sum .reason-more { display: inline-flex; align-items: center; min-height: calc(var(--s7) - var(--s1)); padding-inline: var(--s4); }
.fc-fold[open] > .fc-fold-sum { margin-bottom: var(--s3); }
.forecast--folded .fc-art { display: none; }
/* 深色：集蛋室不整段鋪蛋黃，蛋黃改成點綴（大數字、圖表卡上緣） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .place--eggroom .count-num > span:first-child { color: var(--yolk); }
  :root:not([data-theme="light"]) #supply-figure { border-top: var(--s1) solid var(--yolk-edge); }
}
:root[data-theme="dark"] .place--eggroom .count-num > span:first-child { color: var(--yolk); }
:root[data-theme="dark"] #supply-figure { border-top: var(--s1) solid var(--yolk-edge); }

/* ---------- 飼料倉 ---------- */
.cost-total { margin-top: var(--s2); }
.cost-bar {
  display: flex; height: var(--s8); margin-block: var(--s5) var(--s4);
  border: var(--stroke) solid var(--line); border-radius: var(--r-pill);
  overflow: hidden; box-shadow: var(--sign-edge);
}
.seg { display: flex; align-items: center; min-width: 0; border-right: var(--stroke) solid var(--line); }
.seg:last-child { border-right: 0; }
.seg--feed { flex: 77.3 1 0; background: var(--yolk); }
.seg--labor { flex: 8.8 1 0; background: var(--wood); }
.seg--chick { flex: 6.7 1 0; background: var(--grass); }
.seg--other { flex: 7.2 1 0; background: var(--seg-other); }
.seg-in { padding-left: var(--s5); font-size: var(--fs-sub); font-weight: 900; line-height: 1.5; white-space: nowrap; color: var(--on-bright); }
.cost-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2) var(--s4); }
.cost-legend li { display: flex; align-items: center; gap: var(--s2); font-variant-numeric: tabular-nums; }
.key { flex: none; width: var(--s5); height: var(--s5); border-radius: 50%; border: 2px solid var(--line); }
.key--feed { background: var(--yolk); }
.key--labor { background: var(--wood); }
.key--chick { background: var(--grass); }
.key--other { background: var(--seg-other); }
.cost-say { margin-top: var(--s4); font-size: var(--fs-place); font-weight: 900; line-height: 1.5; }

/* 原因卡（飼料袋）：桌機直接顯示全文；手機收成「圖示、標題、一句重點」 */
.sacks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s7) var(--s5);
  padding-top: var(--s6);
}
.sack {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: var(--stroke) solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sign-edge);
  padding: var(--s7) var(--s5) calc(var(--s5) + var(--edge));
  scroll-margin-top: var(--s7);
}
.sack::before {
  content: ""; position: absolute; left: var(--s4); right: var(--s4); top: var(--s3);
  border-top: 2px dashed var(--wood);
}
.sack:target { box-shadow: var(--sign-edge), 0 0 0 var(--s1) var(--yolk); }
.reason { display: flex; flex-direction: column; flex: 1; }
.reason-sum { display: block; list-style: none; cursor: default; }
.reason-sum::-webkit-details-marker { display: none; }
.reason-gist, .reason-more { display: none; }
/* 「看全文／收合」膠囊（手機原因卡、週齡尺、研究版說明共用外觀） */
.reason-more {
  padding: 0 var(--s3);
  background: var(--yolk-soft); color: var(--on-bright);
  border: 2px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-cap); font-weight: 700; line-height: 1.75; white-space: nowrap;
}
.sack-icon {
  position: absolute; top: calc(-1 * var(--s6)); right: var(--s4);
  width: var(--s8); height: var(--s8); padding: var(--s2);
  background: var(--bg-deep); border: var(--stroke) solid var(--line); border-radius: 50%;
}
.sack h3 { font-size: var(--fs-sub); font-weight: 700; line-height: 1.4; margin-bottom: var(--s2); }
.reason-body { display: flex; flex-direction: column; flex: 1; }
.reason-body .src { margin-top: auto; padding-top: var(--s3); }
.sack--wide { grid-column: span 2; background: var(--warm-card); box-shadow: var(--yolk-band); }
.sack--wide .sack-icon { background: var(--card); }
.feed-mini { display: block; width: 100%; max-width: 30em; height: auto; margin-top: var(--s4); }
.more-open { display: none; }
details[open] .more-open { display: inline; }
details[open] .more-closed { display: none; }

/* 收尾：一隻母雞的對話框（C 的做法） */
.sack-say { display: flex; align-items: flex-end; gap: var(--s2); align-self: end; }
.closing-hen { flex: none; width: calc(var(--s9) - var(--s4)); height: auto; }
.bubble {
  position: relative;
  margin-bottom: var(--s7);
  padding: var(--s4) var(--s5) calc(var(--s4) + var(--edge));
  background: var(--card);
  border: var(--stroke) solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--sign-edge);
  font-size: var(--fs-place); font-weight: 900; line-height: 1.5;
}
.bubble::after {
  content: ""; position: absolute; left: calc(-1 * var(--s3)); bottom: var(--s5);
  width: var(--s5); height: var(--s5);
  background: var(--card);
  border-left: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line);
  transform: rotate(45deg);
}

/* ---------- 育雛室：週齡尺 ---------- */
.ruler-track {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end; padding-top: var(--s3);
}
.stop {
  display: flex; flex-direction: column; align-items: stretch; min-width: 0;
  margin: 0; padding: 0; border: 0; background: none;
  color: var(--ink); font: inherit; text-align: center; cursor: pointer;
}
.stop-art { display: block; width: 100%; height: auto; transition: transform 600ms var(--ease-back); }
.stop-name { padding: var(--s1) var(--s1) var(--s3); font-size: var(--fs-body); font-weight: 700; line-height: 1.5; }
.stop-time {
  position: relative;
  display: block;
  padding: var(--s2) var(--s1) calc(var(--s2) + var(--edge));
  background: var(--wood-deep); color: var(--on-wood);
  border-block: var(--stroke) solid var(--line);
  border-left: 2px solid var(--wood-edge);
  box-shadow: var(--plank-edge);
  font-size: var(--fs-cap); line-height: 1.6;
}
.stop-time::before {
  content: ""; position: absolute; left: calc(50% - 1px); top: calc(-1 * var(--s3) - var(--stroke));
  width: 2px; height: var(--s3); background: var(--line);
}
.stop:first-child .stop-time { border-left: var(--stroke) solid var(--line); border-radius: var(--r-sm) 0 0 var(--r-sm); }
.stop:last-child .stop-time { border-right: var(--stroke) solid var(--line); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.stop:hover .stop-art { transform: translateY(calc(-1 * var(--s1))); transition: transform 250ms var(--ease-pop); }
.stop[aria-selected="true"] .stop-art { transform: translateY(calc(-1 * var(--s2))); }
.stop[aria-selected="true"] .stop-name { color: var(--grass-ink); }
.stop[aria-selected="true"] .stop-time { background: var(--yolk); color: var(--on-bright); box-shadow: var(--yolk-band); font-weight: 700; }
.stop:focus-visible { outline-offset: calc(-1 * var(--s1)); border-radius: var(--r-sm); }
.ruler-panels { margin-top: var(--s5); display: grid; gap: var(--s4); }
.ruler.is-js .stop-card:not(.is-on) { display: none; }
.stop-card {
  background: var(--card);
  border: var(--stroke) solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sign-edge);
  padding: var(--s5) var(--s5) calc(var(--s5) + var(--edge));
}
.stop-card-art { display: none; }
.stop-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: var(--fs-sub); font-weight: 700; line-height: 1.4; margin-bottom: var(--s2); }
.when {
  font-size: var(--fs-cap); font-weight: 700; line-height: 1.75;
  background: var(--yolk-soft); border: 2px solid var(--line); border-radius: var(--r-pill);
  padding: 0 var(--s3);
}
.stop-card p:not(.src) { max-width: 36em; }

/* ---------- 育雛室：遊戲掛載點（遊戲面板寬度由頁面給；遊戲自己不設外距） ---------- */
/* 遊戲舞台：導言和遊戲面板共用同一條置中軸；淡蛋黃底像保溫燈照亮的一角，讓招牌段落是全頁最有顏色的地方。
 * 遊戲本身已有木框（game.css 的 .cg-frame），頁面這層不再加第二圈木框。面板寬度維持約 720px。 */
.game-stage {
  position: relative;
  width: 100%;
  max-width: calc(var(--s9) * 6 + var(--s7) + 2 * (var(--s5) + var(--stroke)));
  margin-inline: auto;
  padding: var(--s7) var(--s5) calc(var(--s5) + var(--edge));
  background: var(--stage);
  border: var(--stroke) solid var(--frame);
  border-radius: var(--r-card);
  box-shadow: var(--yolk-band);
  text-align: center;
  scroll-margin-top: var(--s5);
}
.place-body > .game-stage { margin-top: var(--s7); }
.stage-lamp {
  position: absolute; left: 50%; top: calc(-1 * var(--s6));
  width: var(--s9); height: auto;
  transform: translateX(-50%);
  overflow: visible;
}
.game-lead { font-size: var(--fs-place); font-weight: 900; line-height: 1.5; margin-top: var(--s4); }
.game-stage .game-root { margin-top: var(--s4); text-align: start; }
.game-root { width: 100%; max-width: calc(var(--s9) * 6 + var(--s7)); margin-inline: auto; }
/* 桌機（視窗 ≥1100px）：舞台放寬到最多 960px，遊戲面板跟著吃滿舞台內寬 */
@media (min-width: 1100px) {
  .game-stage { max-width: calc(var(--s9) * 8 + var(--s6) * 2); }
  .game-root { max-width: none; }
}
.game-fallback {
  background: var(--card);
  border: var(--stroke) dashed var(--frame); border-radius: var(--r-card);
  padding: var(--s7) var(--s5);
  text-align: center; font-weight: 700; color: var(--ink-soft);
}

/* ---------- 放牧草地 ---------- */
.space-scale { font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
.space-row {
  display: grid; grid-template-columns: .75fr 1fr 1fr 1fr 1.7fr;
  gap: var(--s5); margin-top: var(--s5); align-items: start;
}
.space-art {
  display: flex; align-items: flex-end; gap: var(--s2);
  min-height: calc(var(--s9) + var(--s8) + var(--s2));
  border-bottom: var(--stroke) solid var(--line);
}
.space-art svg { flex: none; display: block; }
.space-name { margin-top: var(--s3); font-size: var(--fs-sub); font-weight: 700; line-height: 1.5; }
.space-area { font-weight: 700; color: var(--grass-ink); line-height: 1.6; word-break: keep-all; }
.space-desc { margin-top: var(--s1); font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
.space-extra { margin-top: var(--s5); }

.egg-code {
  display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr);
  align-items: center; gap: var(--s5) var(--s7);
}
.egg-art svg { display: block; width: 100%; height: auto; }
.egg-tag { text-align: center; font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
.egg-text h3 { font-size: var(--fs-place); font-weight: 900; line-height: 1.4; margin-bottom: var(--s2); }
.codes { display: flex; flex-wrap: wrap; gap: var(--s2); margin-block: var(--s4); }
/* 代碼膠囊是按鈕：按哪一顆，蛋殼示意圖上的第 7 碼就換成那個字母 */
.code {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: calc(var(--s7) - var(--s1));
  margin: 0;
  padding: var(--s1) var(--s3) var(--s1) var(--s1);
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-pill);
  box-shadow: var(--sign-edge);
  font: inherit; line-height: 1.5;
  cursor: pointer;
  transition: transform 600ms var(--ease-back);
}
.code:hover { transform: translateY(-2px); transition: transform 250ms var(--ease-pop); }
.code[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--line); transform: translateY(2px); font-weight: 700; }
.egg-pick.is-caged { fill: var(--card); }
.code-letter {
  display: grid; place-items: center;
  width: var(--s6); height: var(--s6); border-radius: 50%;
  background: var(--bg-deep); border: 2px solid var(--line);
  font-weight: 900; line-height: 1.5;
}
.code--free { background: var(--grass-soft); }
.code--free .code-letter { background: var(--grass); color: var(--on-bright); }
.code--free::after {
  content: ""; width: var(--s2); height: var(--s3); margin: 0 var(--s1) var(--s1);
  border: solid var(--line); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.remind {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4) var(--s5); align-items: start;
  background: var(--warm-card);
  border: var(--stroke) solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--yolk-band);
  padding: var(--s5) var(--s5) calc(var(--s5) + var(--edge));
}
.remind-icon { width: var(--s8); height: var(--s8); }
.remind-kicker { font-size: var(--fs-cap); font-weight: 700; line-height: 1.6; }
.remind h3 { font-size: var(--fs-place); font-weight: 900; line-height: 1.4; }

.fence-line {
  position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4);
  margin-top: var(--s5); padding-top: var(--s7);
}
.fence-line::before {
  content: ""; position: absolute; left: 0; right: 0; top: var(--s4);
  height: var(--s4);
  background: var(--wood); border: var(--stroke) solid var(--line); border-radius: var(--r-pill);
}
.fence-line li { position: relative; }
.fence-line li::before {
  content: ""; position: absolute; left: 0; top: calc(-1 * var(--s7));
  width: var(--s5); height: var(--s7);
  background: var(--wood); border: var(--stroke) solid var(--line);
  border-radius: var(--s3) var(--s3) var(--s1) var(--s1);
}
.fence-line li.is-goal::before { background: var(--card); border-style: dashed; }
.t-when { font-size: var(--fs-sub); font-weight: 900; line-height: 1.5; margin-top: var(--s2); }
.is-goal .t-when { color: var(--grass-ink); }

.qa { display: grid; gap: var(--s3); }
.qa-q, .qa-a { display: flex; align-items: flex-start; gap: var(--s3); }
.qa-q b { font-size: var(--fs-place); font-weight: 900; line-height: 1.5; }
.qa-mark {
  flex: none; display: grid; place-items: center;
  width: calc(var(--s6) + var(--s1)); height: calc(var(--s6) + var(--s1)); border-radius: 50%;
  background: var(--yolk); color: var(--on-bright); border: 2px solid var(--line);
  font-weight: 900; line-height: 1.5;
}
.qa-q .qa-mark { margin-top: var(--s1); }
.qa-mark--a { background: var(--grass-soft); color: var(--ink); }
.qa-a > span:last-child { max-width: 36em; }
.qa .src { margin-top: 0; padding-left: calc(var(--s6) + var(--s1) + var(--s3)); }

/* ---------- 告示欄 ---------- */
.notices {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5);
  background: var(--wood);
  border: var(--stroke) solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--plank-edge);
  padding: var(--s6) var(--s5) calc(var(--s5) + var(--edge));
}
.notice {
  position: relative;
  background: var(--card);
  border: var(--stroke) solid var(--line); border-radius: var(--r-sm);
  padding: var(--s5) var(--s4) var(--s4);
}
.notice::before {
  content: ""; position: absolute; top: calc(-1 * var(--s2)); left: calc(50% - var(--s2));
  width: var(--s4); height: var(--s4); border-radius: 50%;
  background: var(--yolk); border: var(--stroke) solid var(--line);
}
.sources-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); list-style: none; cursor: default; }
.sources-sum::-webkit-details-marker { display: none; }
.sources-toggle { display: none; }
.src-list { columns: 2; column-gap: var(--s6); margin-top: var(--s3); }
.src-list li { break-inside: avoid; border-bottom: 2px dashed var(--bg-deep); padding-block: var(--s1); }
/* 只有標題加底線；分類小字是灰色小字、不加底線（一筆只有一條線） */
.src-list a {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(var(--s7) - var(--s1));
  padding-block: var(--s2);
  line-height: 1.6;
  text-decoration: none;
}
.src-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: var(--s1); }
.src-kind { display: block; font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
.dev { font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
/* 行內「API」連結：點擊範圍撐到 44px，不改變行高 */
.dev a { display: inline-flex; align-items: center; min-height: calc(var(--s7) - var(--s1)); padding-inline: var(--s2); margin-block: calc(-1 * var(--s3)); }
/* 深色：告示板大木框不用最亮的木色，改成深木色牌面，木色只留給描邊 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notices { background: var(--wood-deep); }
}
:root[data-theme="dark"] .notices { background: var(--wood-deep); }

/* ---------- 頁尾 ---------- */
.foot-bar { background: var(--band-foot); }
.foot-text {
  padding: var(--s3) var(--gutter) var(--s6);
  text-align: center; font-size: var(--fs-cap); line-height: 1.6;
}
.foot-text time { white-space: nowrap; }
.foot-links { display: flex; justify-content: center; padding: var(--s3) var(--gutter) 0; }
.foot-play { font-weight: 700; display: inline-flex; align-items: center; min-height: calc(var(--s7) - var(--s1)); }

/* ---------- 待機小動畫：進到視窗才演、演幾次就停；只動 transform ---------- */
.actor { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes peck { 0%, 55%, 100% { transform: rotate(0deg); } 72% { transform: rotate(14deg); } }
@keyframes peck-l { 0%, 55%, 100% { transform: rotate(0deg); } 72% { transform: rotate(-14deg); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(28px); } }
.is-live .actor--bob { animation: bob .7s ease-in-out 6 alternate; }
.is-live .actor--peck { animation: peck 1.8s ease-in-out 3; }
.is-live .actor--peck-l { animation: peck-l 1.8s ease-in-out 3; }
.is-live .actor--drift { animation: drift 7s ease-in-out 2 alternate; }
.is-live .actor--slow { animation-duration: 10s; }
.is-live .actor--late { animation-delay: .5s; }
html.motion-off .actor { animation: none !important; }

/* ---------- 斷點 ---------- */
/* 1280 以下，或矮的筆電螢幕（1280×720、1366×768 等，高度 ≤ 820）：文字欄排在地圖上方，木牌左、提醒與導言右 */
@media (max-width: 1279px), (max-height: 820px) {
  .hero { display: block; }
  .hero-copy {
    position: static; width: auto; max-width: var(--page-max); margin: 0 auto;
    padding: var(--s4) var(--gutter) var(--s5);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
    gap: var(--s4) var(--s6); align-items: start;
  }
  .entrance-sign { grid-row: span 2; }
  .hero-notes { margin-top: var(--s5); }
  .hero-lead { margin-top: 0; }
}
/* 矮的寬螢幕：地圖排在文字欄下面，裁掉上方 160 單位的天空，讓第一屏看得到小路與建築 */
@media (min-width: 1280px) and (max-height: 820px) {
  .map-wide { --vy: 160; --vh: 560; }
}
@media (max-width: 1279px) {
  .map-wide { --vx: 520; --vy: 160; --vw: 920; --vh: 560; }
  .spot-name { font-size: var(--fs-body); }
  .spot--star .spot-name { font-size: var(--fs-sub); }
  .spot-tag { font-size: var(--fs-cap); }
  .road-from-full { display: none; }
  .road-from-crop { display: inline; }
}

/* 1300 以上：兩側留白放得下一條側邊步道，小路從第一屏一路連到頁尾。
 * 每段的步道走在建築那一側（data-side），左右交替；位置與寬度用插圖的 viewBox 單位換算（1440 寬裡 x＝90 或 1350，路寬 41）。 */
@media (min-width: 1300px) {
  .road-mid, .scene-road--w { display: none; }
  .road-spine, .scene-road--s { display: inline; }
  .scene-art-box { align-self: end; }
  .place-body {
    position: relative;
    width: auto; margin-inline: 0;
    padding-inline: calc((100% - var(--page-max)) / 2);
  }
  .place-body::before {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: calc(100% * 69.5 / 1440);
    width: calc(100% * 41 / 1440);
    background:
      repeating-linear-gradient(to bottom, var(--road-dash) 0 calc(100vw * 14 / 1440), transparent 0 calc(100vw * 30 / 1440))
        center top / calc(100% * 5 / 41) 100% no-repeat,
      linear-gradient(var(--road-face), var(--road-face)) center / calc(100% * 34 / 41) 100% no-repeat,
      var(--road-edge);
  }
  .scene[data-side="right"] + .place-body::before { left: auto; right: calc(100% * 69.5 / 1440); }
}
@media (max-width: 759px) and (min-width: 600px) {
  .hero-copy { display: block; max-width: 34em; }
  .hero-notes { margin-top: var(--s3); }
  .hero-lead { margin-top: var(--s3); }
}

@media (max-width: 860px) {
  .cards--3, .price-tags { grid-template-columns: minmax(0, 1fr); }
  .sacks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sack-say { grid-column: span 2; justify-self: center; }
  .space-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .space--wide { grid-column: span 2; }
  .notices { grid-template-columns: minmax(0, 1fr); }
  .src-list { columns: 1; }
  .egg-code { grid-template-columns: minmax(0, 1fr); }
  .egg-art { max-width: 16em; margin-inline: auto; }
  .egg-count { grid-template-columns: minmax(0, 1fr); }
  .count-art { display: none; }
  .fence-line { grid-template-columns: minmax(0, 1fr); padding-top: 0; padding-left: var(--s7); gap: var(--s4); }
  .fence-line::before { left: var(--s2); right: auto; top: 0; bottom: 0; width: var(--s4); height: auto; }
  .fence-line li::before { left: calc(-1 * var(--s7) + var(--s1)); top: var(--s2); width: var(--s6); height: var(--s5); border-radius: var(--s1); }
  .fence-line .t-when { margin-top: 0; }
  .cost-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 760 以下：場景帶的標題放到插圖下面；週齡尺改成直向沿小路排 */
@media (max-width: 759px) {
  .scene { display: block; }
  .scene-head { width: auto; justify-self: stretch; align-self: auto; padding: var(--s3) var(--gutter) 0; }
  .scene-head h2 { max-width: none; }
  .scene[data-side="left"] .scene-head h2 { margin-left: 0; margin-right: 0; }
  .cards--2 { grid-template-columns: minmax(0, 1fr); }
  .forecast { grid-template-columns: minmax(0, 1fr); }
  .seg-in { padding-left: var(--s3); font-size: var(--fs-body); }
  .chart-box { height: calc(var(--s9) * 2 + var(--s7)); }
  .chart-box--supply { height: calc(var(--s9) * 2 + var(--s6)); }
  .chart-box--mini { height: calc(var(--s9) + var(--s8)); }

  .ruler-track { display: none; }
  .ruler.is-js .stop-card:not(.is-on) { display: grid; }
  .ruler-panels { position: relative; margin-top: var(--s3); gap: var(--s3); }
  /* 直向小路：路肩＋路面＋虛線，跟地圖同一套 */
  .ruler-panels::before {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: calc((var(--s8) - var(--s5)) / 2);
    width: var(--s5);
    background: var(--road-face);
    border-inline: var(--s1) solid var(--road-edge);
  }
  .ruler-panels::after {
    content: ""; position: absolute; top: var(--s2); bottom: var(--s2);
    left: calc(var(--s8) / 2 - 2px);
    border-left: var(--s1) dashed var(--road-dash);
  }
  .stop-card {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: var(--s8) minmax(0, 1fr); gap: var(--s3);
    align-items: start;
    background: none; border: 0; box-shadow: none; padding: 0;
  }
  .stop-card-art {
    display: block; width: var(--s8); height: auto;
    background: var(--bg); border: var(--stroke) solid var(--line); border-radius: var(--r-sm);
    box-shadow: var(--sign-edge);
    padding-bottom: var(--s1);
  }
  .stop-text {
    background: var(--card);
    border: var(--stroke) solid var(--line); border-radius: var(--r-card);
    box-shadow: var(--sign-edge);
    padding: var(--s2) var(--s3) calc(var(--s2) + var(--edge));
  }
  .stop-sum {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s2);
    min-height: calc(var(--s7) - var(--s1)); cursor: pointer;
  }
  .stop-sum h3 { margin-bottom: 0; gap: 0 var(--s2); }
  .stop-sum .reason-more { display: inline-block; }
  .stop-fold[open] .stop-sum { margin-bottom: var(--s2); }
  .fc-more-sum { display: block; margin-top: var(--s3); cursor: pointer; }
  .fc-more-sum .reason-more { display: inline-flex; align-items: center; min-height: calc(var(--s7) - var(--s1)); padding-inline: var(--s4); }
}

/* 600 以下：手機版（徽章地圖、窄版換景帶、場景帶裁切、原因卡與來源收合） */
@media (max-width: 599px) {
  .masthead { padding-top: var(--s2); }
  .masthead-in { column-gap: var(--s2); }
  .brand-note { order: 3; }
  .mast-play { padding-inline: var(--s2); }
  .motion-btn .btn-front { padding-inline: var(--s3); }
  .hero-copy { display: block; padding: var(--s2) var(--gutter) var(--s4); }
  .price-board { padding-inline: var(--s4); }
  .hero-notes { margin-top: var(--s2); }
  .hero-lead { font-size: var(--fs-body); margin-top: var(--s3); }
  /* 產地價小牌：算式在前、說明句改小字，拉開兩個價格的主從 */
  .farm-tag { display: flex; flex-direction: column; }
  .farm-tag .sum { order: -1; margin: 0 0 var(--s1); }
  .farm-tag p:not(.sum) { font-size: var(--fs-cap); line-height: 1.6; color: var(--ink-soft); }
  .farm-tag p:not(.sum) b { color: var(--ink); }
  .map-wide { display: none; }
  .map-compact { display: block; }

  .gate-art--w { display: none; }
  .gate-art--n { display: block; }
  .gate .signpost {
    left: calc(50% + var(--s5)); max-width: calc(50% - var(--s5) - var(--s2));
    flex-wrap: wrap; align-items: center; gap: 0 var(--s2);
    min-height: calc(var(--s7) - var(--s1)); padding: 0 var(--s3) var(--edge);
  }
  .gate--sp-l .signpost { left: auto; right: calc(50% + var(--s5)); }
  .gate .signpost-name { font-size: var(--fs-body); }
  .gate--home .gate-art--n { margin-top: calc(-1 * var(--s1)); }

  .scene-art-box { position: relative; height: var(--scene-h); }
  .scene-art {
    position: absolute; top: 0; left: 50%;
    height: 100%; width: auto; max-width: none;
    transform: translateX(calc(var(--c) * var(--scene-h) / -300));
  }
  .scene-road--w { display: none; }
  .scene-road--n { display: inline; }
  .place-ask { font-size: var(--fs-ask); }

  .sacks { grid-template-columns: minmax(0, 1fr); gap: var(--s3); padding-top: 0; }
  .sack--wide { grid-column: auto; }
  .sack-say { grid-column: auto; justify-self: stretch; margin-top: var(--s4); }
  .sack { padding: var(--s3) var(--s4) calc(var(--s3) + var(--edge)); }
  .sack::before { display: none; }
  .reason-sum {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--s3);
    align-items: center; cursor: pointer; min-height: var(--s7);
  }
  .reason-sum .sack-icon { position: static; grid-row: span 3; width: var(--s7); height: var(--s7); padding: var(--s1); }
  .reason-sum h3 { margin-bottom: 0; }
  .reason-gist { display: block; font-size: var(--fs-body); line-height: 1.6; }
  .reason-sum .reason-more { display: inline-block; justify-self: start; margin-top: var(--s1); }
  .reason-body { padding-top: var(--s3); }
  .bubble { font-size: var(--fs-sub); margin-bottom: var(--s6); }
  .cost-say { font-size: var(--fs-sub); }

  .sources-sum { cursor: pointer; min-height: var(--s7); }
  .sources-toggle {
    display: inline-flex; align-items: center; min-height: calc(var(--s7) - var(--s1));
    padding: 0 var(--s4);
    background: var(--yolk); color: var(--on-bright);
    border: var(--stroke) solid var(--line); border-radius: var(--r-pill);
    box-shadow: var(--yolk-band);
    font-weight: 700; line-height: 1.5;
  }
  /* 空間對照：改成一列一種（左邊方塊、右邊文字），方塊一律同比例縮小，面積比例不變 */
  .space-card { padding-inline: var(--s4); }
  .space-row { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .space--wide { grid-column: auto; }
  .space {
    display: grid; grid-template-columns: calc(var(--s9) - var(--s2)) minmax(0, 1fr);
    column-gap: var(--s3); align-items: start;
  }
  .space + .space { padding-top: var(--s4); border-top: 2px dashed var(--bg-deep); }
  .space-art {
    grid-row: span 3; min-height: 0; border-bottom: 0;
    flex-wrap: wrap; align-content: flex-start; gap: var(--s1);
    zoom: .5;
  }
  .space-art .ill { stroke-width: calc(var(--stroke) / .5); }
  .space-art .k08 { stroke-width: calc(var(--stroke) / .5 / .8); }
  .space-art .k07 { stroke-width: calc(var(--stroke) / .5 / .7); }
  .space-name { margin-top: 0; }
  .cost-legend { grid-template-columns: minmax(0, 1fr); }
  .remind { grid-template-columns: var(--s7) minmax(0, 1fr); gap: var(--s2) var(--s3); padding-inline: var(--s4); }
  .remind-icon { width: var(--s7); height: var(--s7); }
  .remind h3 { font-size: var(--fs-sub); }
  .egg-art { max-width: calc(var(--s9) * 2 - var(--s5)); }

  /* 統計吊牌：三張併成一張蛋黃牌、一列一個數字（左標籤、右數字） */
  .price-tags {
    display: block; padding: 0 0 var(--edge);
    background: var(--warm-card);
    border: var(--stroke) solid var(--frame); border-radius: var(--r-card);
    box-shadow: var(--yolk-band);
  }
  .price-tags::before { display: none; }
  .tag {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s3);
    background: none; border: 0; border-radius: 0; box-shadow: none;
    padding: var(--s3) var(--s4);
  }
  .tag + .tag { border-top: 2px dashed var(--yolk-edge); }
  .tag::before, .tag::after { display: none; }
  .tag-num { grid-column: 2; grid-row: 1 / span 2; }
  .tag-num > span:first-child { font-size: var(--fs-place); line-height: 1.5; }
  .tag-label { grid-column: 1; }
  .tag-note { grid-column: 1; }

  /* 範圍鍵擠在同一排 */
  .range-group { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: var(--s2); width: 100%; }
  .range-group .btn-front { padding-inline: var(--s2); font-size: var(--fs-cap); }

  /* 遊戲舞台：手機滿版（左右貼齊螢幕），遊戲本身仍離螢幕邊 16px */
  .place-body > .game-stage { margin-inline: calc(-1 * var(--gutter)); width: auto; }
  .game-stage { border-radius: 0; border-inline-width: 0; padding-inline: var(--gutter); }
}
/* 比較矮的手機（第一屏放不下導言下方的膠囊）：遊戲膠囊移到木牌正下方，提醒與導言排在它後面。
   v1.2：過期提醒多了一行連結，390×844、393×852、414×896 這類手機也放不下了，門檻從 839 放寬到 899 */
@media (max-width: 599px) and (max-height: 899px) {
  .hero-copy { display: flex; flex-direction: column; }
  .hero-more, .hero-say { display: contents; }
  .entrance-sign { order: 1; }
  /* 資料過期提醒要在第一屏：排在膠囊前面（v1.2；沒過期時是空的、不占位） */
  .hero-alert { order: 2; }
  .hero-stale { margin-top: var(--s2); }
  .play-cta { order: 3; align-self: flex-start; margin-top: var(--s2); }
  .hero-notes { order: 4; margin-top: var(--s4); }
  .hero-lead { order: 5; }
}
@media (max-width: 359px) {
  /* 頁首排不下三樣東西：小遊戲入口改由第一屏的膠囊負責 */
  .mast-play { display: none; }
  /* 320×568 這種最小的手機：木牌腳與膠囊各收一點，膠囊整顆留在第一屏 */
  .sign-legs { padding-bottom: var(--s3); }
  .play-cta .btn-front { padding-block: var(--s1); }
  .sum { flex-wrap: nowrap; }
  .sum-chip { padding-inline: var(--s2); }
}

/* 牌子類容器的外框（插圖墨線不受影響） */
.sign, .sack, .tag, .remind, .notice, .notices, .farm-tag, .stop-card, .stop-text, .stop-card-art, .bubble,
.price-board, .stop-time, .place-name, .signpost, .cost-bar, .brand-note, .code, .when, .disc,
.spot-name, .spot-tag, .badge-name, .badge-tag, .map-c-title, .sum-chip, .reason-more, .sources-toggle {
  border-color: var(--frame);
}

/* 沒有 JS（或 site.js 載入失敗）：要靠 JS 才會動的圖表、讀數、範圍鍵、統計格與預估方框整塊收起，
 * 只留圖說與說明卡，不留永遠「讀取中…」的空框 */
html:not(.js) .chart-box, html:not(.js) .readout, html:not(.js) .range-group, html:not(.js) .legend,
html:not(.js) .price-tags, html:not(.js) .egg-count, html:not(.js) .forecast { display: none; }
/* 遊戲備援：有 JS 時顯示「小遊戲準備中…」，沒有 JS 時只顯示 noscript 裡的「需要 JavaScript」 */
html:not(.js) .game-wait { display: none; }

/* Windows 高對比：大數字不畫文字底板（不再蓋掉上方的 h1）；按下的切換鍵用系統強調色 */
@media (forced-colors: active) {
  .price-num { forced-color-adjust: none; color: CanvasText; }
  .btn[aria-pressed="true"] .btn-front, .code[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* 減少動態：不播待機動畫、取消過場；按鈕仍保留「瞬間」下沉 */
@media (prefers-reduced-motion: reduce) {
  html.smooth-ok:not(.motion-off) { scroll-behavior: auto; }
  .actor { animation: none !important; }
  .motion-btn { display: none; }
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
