/* 睦 Mu-AI 長卷的樣式。三種排法：
   1. 長卷、直書紙條（中文，寬螢幕）：這份檔案的前半，來自原型。
   2. 長卷、橫書紙條（英文，寬螢幕）：body.hw 的那一段。
   3. 直向捲動、橫書卡片（寬度 800px 以下，中英文都是）：最後的 @media。
   背景圖與它的高度由頁面的 --art、--art-h 提供（src/art.ts），這裡不寫死。 */
:root {
  --paper: #EFE8D6; --slip: rgba(244, 238, 222, 0.94); --ink: #23211C; --ink-soft: #5E5A4E;
  --line: rgba(35, 33, 28, 0.28); --mist: rgba(246, 241, 228, 0.9);
  --bg: #EFE8D6; --surface: #FAF6EC; --sunken: #E8E0CE; --fg: #23211C; --muted: #5E5A4E;
  --border: #CDC4AF; --border-strong: #23211C; --accent: #23211C; --accent-fg: #F4EEDE;
  --ink-bg: #1C1D1A; --ink-panel: rgba(28, 29, 26, 0.92); --ink-fg: #ECE5D5; --ink-muted: #B9B4A4;
  --repair: #8A520F; --repair-bg: #F4E3C3; --ok: #2F5D43; --gutter: 0px;
  --font-display: 'Cormorant Garamond', 'LXGW WenKai TC', 'Kaiti TC', 'BiauKai', 'Songti TC', Georgia, serif;
  --font-body: 'Noto Sans TC', 'PingFang TC', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 日文版：標題用 Klee One（霞鶩文楷的原型，日本字形），內文用 Noto Sans JP。載入的字型見 src/layout.ts 的 FONT_FAMILIES。 */
html[lang="ja"] {
  --font-display: 'Cormorant Garamond', 'Klee One', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
}
/* 日文沒有空格：橫書（手機版）時依文節換行並平衡各行，行尾不留下單獨一兩個字。直書的標題不換行，不受影響。 */
html[lang="ja"] h1, html[lang="ja"] h2 { word-break: auto-phrase; text-wrap: balance; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); overflow: hidden; }
h1, h2, h3, p, ol, ul, dl, dd, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* 長卷本身可以取得焦點（用方向鍵捲動）。它佔滿整個視窗，裡面的紙條與畫都是定位元素，會蓋住它自己的外框，
   所以改用一層固定在視窗上的框（在題簽底下、紙條上面）。 */
.scroller:focus-visible { outline: 0; }
.scroller:focus-visible::after { content: ""; position: fixed; inset: 4px; z-index: 5; border: 2px solid var(--ink); box-shadow: inset 0 0 0 2px var(--paper); pointer-events: none; }
/* 深色底的按鈕：外框用淡色加深色兩層，在畫上和紙上都看得清楚 */
.go--fill:focus-visible, .bar__cta:focus-visible, .btn--primary:focus-visible { box-shadow: 0 0 0 5px var(--paper); }
[hidden] { display: none !important; }
.board--player .note { max-width: none; }
.skip { position: absolute; left: -999px; top: 0; z-index: 9; background: var(--ink); color: var(--paper); padding: 8px 16px; }
.skip:focus { left: 16px; top: 16px; }

/* 上方題簽 */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 6; display: flex; align-items: center; gap: 28px; padding: 16px 32px; background: linear-gradient(var(--paper) 30%, rgba(239, 232, 214, 0)); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 40px; height: 40px; display: block; }
.brand span { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.3em; color: var(--ink-soft); }
.brand b { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: 0.1em; }
.bar nav { display: flex; gap: 24px; margin-left: auto; font-size: 14px; letter-spacing: 0.12em; }
.bar nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.bar nav a:hover, .bar nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.bar nav .lang { color: var(--ink-soft); letter-spacing: 0.08em; }
.bar__cta { font-size: 14px; letter-spacing: 0.2em; text-decoration: none; padding: 10px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); white-space: nowrap; }
.bar__cta:hover { background: transparent; color: var(--ink); }
.bar__menu { display: none; }

/* 手卷：由左向右展開；每一頁用畫的不同段落 */
.scroller { height: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.roll { position: relative; height: 100%; min-width: 100%; aspect-ratio: var(--w) / var(--art-h);
  background: var(--paper) var(--art) no-repeat; background-size: auto 100%; background-position: calc(var(--x) * -100vh / var(--art-h)) 0;
  display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 6vh 17vh 0; overflow: clip; }
.roll--center { justify-content: center; aspect-ratio: auto; width: 100%; }
.roll::before, .roll::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5vh; background: #6B5236; z-index: 2; }
.roll::before { left: 0; } .roll::after { right: 0; }
.mist { position: absolute; top: 0; height: 100%; width: 70vw; pointer-events: none; background: radial-gradient(ellipse at center, var(--mist) 0%, transparent 66%); opacity: 0.5; animation: mist 70s ease-in-out infinite alternate; }
.mist--2 { opacity: 0.38; animation-duration: 95s; animation-direction: alternate-reverse; }
@keyframes mist { from { transform: translateX(-18vw) scaleY(0.6); } to { transform: translateX(18vw) scaleY(0.75); } }

/* 題跋：直書的紙條 */
.slip { flex: none; position: relative; z-index: 3; writing-mode: vertical-rl; background: var(--slip); border: 1px solid var(--line); padding: 5vh 4.2vh; height: 74vh; display: flex; flex-direction: column; gap: 3.2vh; box-shadow: 0 2vh 6vh rgba(35, 33, 28, 0.16); }
.slip h1 { font-family: var(--font-display); font-weight: 300; font-size: 5.6vh; letter-spacing: 0.14em; line-height: 1.55; white-space: nowrap; }
.slip h1 em { font-style: normal; font-weight: 600; }
.slip h2 { white-space: nowrap; font-family: var(--font-display); font-weight: 400; font-size: 4.2vh; letter-spacing: 0.24em; line-height: 1.6; }
.slip p, .slip li, .slip dd { font-size: 2vh; line-height: 2.1; letter-spacing: 0.12em; }
.slip .small { font-size: 1.55vh; color: var(--ink-soft); letter-spacing: 0.2em; }
.slip li b, .slip dt { font-family: var(--font-display); font-weight: 600; font-size: 2.4vh; letter-spacing: 0.2em; }
.slip li { display: block; padding: 0 2.4vh; border-right: 1px solid var(--line); }
.slip ol { display: flex; flex-direction: column; }
.slip dl { display: flex; flex-direction: column; gap: 3.2vh; }
.slip .big dt { font-size: 4.2vh; font-weight: 300; }
.slip .qa div { padding: 0 2.4vh; border-right: 1px solid var(--line); }
.tcy { text-combine-upright: all; -webkit-text-combine: horizontal; }
.go { display: inline-block; text-decoration: none; padding: 2.6vh 1.5vh; font-size: 2vh; letter-spacing: 0.4em; border: 1px solid var(--ink); align-self: flex-end; }
.go--fill { background: var(--ink); color: var(--paper); }
.go:hover { background: var(--ink); color: var(--paper); }
.go--fill:hover { background: transparent; color: var(--ink); }
.gos { display: flex; flex-direction: column; gap: 1.6vh; align-items: flex-end; }
.spirit { writing-mode: horizontal-tb; align-self: flex-end; width: 9vh; height: 9vh; }
.spirit--xl { width: 26vh; height: 26vh; align-self: center; }
.spirit--tilt { transform: rotate(-9deg); }
.spirit svg { width: 100%; height: 100%; display: block; }
/* 山靈活著：身體 4 秒輕微起伏一次，每隔幾秒眨一次眼（閉 70、停 50、開 110 毫秒）。
   眨眼做在眼睛的每個形狀上，不做在 .eyes 群組上：群組的 transform 屬性留給 juan.js 讓眼睛跟著游標。
   題簽的小標誌只眨眼、不起伏。系統設定「減少動態」時兩者都不動。 */
@media (prefers-reduced-motion: no-preference) {
  .spirit svg { transform-origin: 50% 94%; animation: mu-breathe 4s ease-in-out infinite; }
  .spirit .eyes > *, .brand .eyes > * { transform-box: fill-box; transform-origin: center; animation: mu-blink 5.3s linear infinite; }
  .brand .eyes > * { animation-duration: 7.1s; animation-delay: 1.9s; }
}
@keyframes mu-breathe { 0%, 100% { transform: scale(1.006, 0.994); } 50% { transform: scale(0.994, 1.006); } }
@keyframes mu-blink { 0%, 95.6% { transform: scaleY(1); } 97% { transform: scaleY(0.12); } 97.9% { transform: scaleY(0.12); } 100% { transform: scaleY(1); } }

/* 橫書的版：表格、畫面、表單。寬度由 --bw 給（長卷模式用 vh），手機版改成滿版 */
.board { flex: none; position: relative; z-index: 3; width: var(--bw); background: var(--slip); border: 1px solid var(--line); padding: 3.4vh 3.8vh; max-height: 80vh; display: flex; flex-direction: column; gap: 2.2vh; box-shadow: 0 2vh 6vh rgba(35, 33, 28, 0.16); font-size: 1.9vh; line-height: 1.8; }
.board h2 { font-family: var(--font-display); font-weight: 400; font-size: 3.2vh; letter-spacing: 0.2em; }
.board__head { display: flex; align-items: baseline; justify-content: space-between; gap: 3vh; }
.board__head a { font-size: 1.8vh; letter-spacing: 0.2em; }
.board .small { font-size: 1.5vh; letter-spacing: 0.1em; color: var(--ink-soft); }
.board--bare { background: none; border: 0; box-shadow: none; padding: 0; }
.board--bare .board__head, .board--bare .small { background: var(--slip); border: 1px solid var(--line); padding: 1.4vh 2.4vh; }
.board--bare .small { width: fit-content; border: 0; }
.board [data-demo-embed] { box-shadow: 0 2vh 6vh rgba(35, 33, 28, 0.2); }
.grid { display: grid; border-top: 1px solid var(--ink); }
.grid > div { display: grid; grid-template-columns: var(--cols); gap: 2.4vh; padding: 1.5vh 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.grid b { font-family: var(--font-display); font-weight: 600; font-size: 2.3vh; }
.grid i { font-style: normal; font-family: var(--font-mono); font-size: 2.6vh; }
.grid code { font-family: var(--font-mono); font-size: 1.45vh; color: var(--ink-soft); }
/* 麵包屑：內頁紙條最前面的「首頁 › 這一頁」 */
.crumbs { display: flex; gap: 0.6em; }
.crumbs a, .board .small a { text-decoration: underline; text-underline-offset: 0.2em; }
.compatibility { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.compatibility th, .compatibility td { padding: 0.6em 1em 0.6em 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: baseline; }
.compatibility th { font-family: var(--font-display); font-weight: 600; }
.workflow__steps { display: grid; gap: 0.3em; padding-inline-start: 1.7em; list-style: decimal; }
.pills { display: flex; flex-wrap: wrap; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.pills li { padding: 1.3vh 2.2vh; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record { font-family: var(--font-mono); font-size: 1.75vh; line-height: 1.9; padding: 2.4vh 2.8vh; border: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4vh 3vh; }
.field { display: flex; flex-direction: column; gap: 0.6vh; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 1.6vh; letter-spacing: 0.14em; }
.field input, .field textarea { font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 1vh 0; min-height: 44px; }
.field textarea { resize: none; height: 11vh; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 2px; background: rgba(255, 255, 255, 0.45); }
.field [aria-invalid="true"] { border-bottom: 2px solid var(--repair); }
/* 誘捕欄位：人看不到也不會跳到，自動填表的程式會填 */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { align-self: center; line-height: 1.5; }
/* 狀態列一直在版面上（只是空的），螢幕報讀器才會讀出之後寫進去的訊息 */
.form__status:empty { min-height: 0; }
.form__status[data-state="ok"] { color: var(--ok); }
.form__status[data-state="fail"] { color: var(--repair); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 15px; letter-spacing: 0.1em; text-decoration: none; cursor: pointer; }
.btn:hover, .btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: transparent; color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.eyebrow { font-size: 1.5vh; letter-spacing: 0.3em; color: var(--ink-soft); }
.note { font-size: 1.45vh; color: var(--ink-soft); line-height: 1.7; }

/* 示範播放器放進長卷：左邊畫面，右邊進度與控制 */
.board--player #demo { display: grid; grid-template-columns: minmax(0, 96vh) minmax(0, 1fr); gap: 2vh 3.4vh; align-items: start; }
.board--player .demo__screen { grid-column: 1; grid-row: 1 / span 5; position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--ink); background: var(--surface); overflow: hidden; }
.board--player .demo__now, .board--player .demo__stages, .board--player .demo__controls, .board--player .demo__seek, .board--player .demo__all { grid-column: 2; }
.board--player .demo__stages { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--ink); max-height: 30vh; overflow-y: auto; }
.board--player .demo__stages li { border-bottom: 1px solid var(--line); }
.board--player .demo__stages button { width: 100%; text-align: left; background: none; border: 0; padding: 0.7vh 0; font: inherit; font-size: 1.6vh; color: var(--ink); cursor: pointer; display: flex; gap: 1.4vh; }
.board--player .demo__intent { font-family: var(--font-display); font-size: 2.6vh; line-height: 1.5; }
.board--player .demo__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2vh 1.6vh; font-size: 1.6vh; }
.board--player .demo__all { display: none; }

.hint { position: fixed; left: 32px; bottom: 20px; z-index: 6; font-size: 13px; letter-spacing: 0.3em; color: var(--ink-soft); display: flex; align-items: center; gap: 14px; background: var(--slip); padding: 6px 12px; }
.hint i { display: block; width: 180px; height: 1px; background: var(--line); position: relative; }
.hint i b { position: absolute; left: 0; top: -1px; height: 3px; width: 6%; background: var(--ink); }
.credit { position: fixed; right: 32px; bottom: 20px; z-index: 6; font-size: 12px; letter-spacing: 0.14em; color: var(--ink-soft); background: var(--slip); padding: 6px 12px; }
.board--faq .qa { display: grid; gap: 1em; }
.board--faq .qa dt { font-weight: 600; }
.board--faq .qa a, .credit a { text-decoration: underline; text-underline-offset: 0.2em; }
@media (prefers-reduced-motion: reduce) {
  .mist { animation: none; }
  html, .scroller { scroll-behavior: auto; }
}

/* 沒有 JS：播放器不會動，只留下說明文字（.note）；首頁的預覽框也不佔位 */
html:not(.js) #demo { display: none; }

/* 中文直書的標題不換行：依最長一行的字數（--len，由 src/layout.ts 寫入）縮小字級，才不會超出紙條。
   紙條內容高度約 64vh，留 2vh 餘裕；每個字的寬度是字級加上字距。 */
@media (min-width: 801px) {
  .vw .slip h1 { font-size: min(5.6vh, calc(62vh / (var(--len, 1) * 1.14))); }
  .vw .slip h2 { font-size: min(4.2vh, calc(62vh / (var(--len, 1) * 1.24))); }
}

/* —— 英文：長卷照舊，紙條改成橫書 —— */
@media (min-width: 801px) {
  .hw .bar nav { letter-spacing: 0.04em; gap: 22px; }
  .hw .bar__cta { letter-spacing: 0.06em; }
  .hw .slip { writing-mode: horizontal-tb; width: 62vh; height: auto; max-height: 80vh; padding: 4.6vh 4.6vh; gap: 2.4vh; }
  .hw .slip h1 { white-space: normal; font-size: 4.8vh; font-weight: 400; letter-spacing: 0; line-height: 1.22; }
  .hw .slip h2 { white-space: normal; font-size: 3.5vh; letter-spacing: 0; line-height: 1.28; }
  .hw .slip p, .hw .slip li, .hw .slip dd { font-size: 1.95vh; line-height: 1.62; letter-spacing: 0.005em; }
  .hw .slip .small { font-size: 1.5vh; letter-spacing: 0.04em; line-height: 1.5; }
  .hw .slip li b, .hw .slip dt { font-size: 2.2vh; letter-spacing: 0.01em; line-height: 1.4; }
  .hw .slip li { padding: 1.3vh 0; border-right: 0; border-top: 1px solid var(--line); }
  .hw .slip dl { gap: 0; }
  .hw .slip .big { display: grid; grid-template-columns: 1fr 1fr; gap: 3vh 3.4vh; }
  .hw .slip .big dt { font-size: 3.6vh; line-height: 1.2; }
  .hw .slip .qa div { padding: 1.3vh 0; border-right: 0; border-top: 1px solid var(--line); }
  .hw .slip .qa dt { margin-bottom: 0.4vh; }
  .hw .go { padding: 1.3vh 2.4vh; font-size: 1.9vh; letter-spacing: 0.05em; align-self: flex-start; }
  .hw .gos { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1.4vh; }
  .hw .spirit { align-self: flex-start; }
  .hw .spirit--xl { align-self: center; }
  /* 英文的步驟清單較長：加寬成兩欄，先上而下再左而右 */
  .hw .slip[data-od-id="stages"] { width: 116vh; }
  .hw .slip[data-od-id="stages"] ol { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: 4.6vh; }
  .hw .board[data-od-id="families"] { width: 140vh; }
  .hw .grid--fam > div { grid-template-columns: 5vh 25vh minmax(0, 1.25fr) minmax(0, 1fr); padding: 1.1vh 0; }
  .hw .grid--fam span { line-height: 1.45; }
  .hw .grid b { line-height: 1.3; }
  .hw .board--player .demo__stages button { flex-direction: row; align-items: baseline; }
  .hw .board--player .demo__stages span { flex: none; min-width: 9vh; }
  .hw .board h2 { letter-spacing: 0.01em; }
  .hw .board__head a { letter-spacing: 0.04em; }
  .hw .board .small { letter-spacing: 0.02em; }
  .hw .field label { letter-spacing: 0.04em; }
  .hw .eyebrow { letter-spacing: 0.12em; }
  .hw .hint { letter-spacing: 0.1em; }
  .hw .credit { letter-spacing: 0.04em; }
}

/* —— 手機：直向捲動，紙條變成橫書、滿版的卡片，山水固定在背後 —— */
@media (max-width: 800px) {
  html, body { height: auto; }
  /* 題簽黏在上方；跳到某一段或用 Tab 移動時，不要讓焦點被它蓋住 */
  html { scroll-padding-top: 84px; }
  body { overflow: visible; }
  .bar { position: sticky; top: 0; flex-wrap: wrap; gap: 0 10px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .brand { gap: 8px; margin-right: auto; }
  .brand svg { width: 32px; height: 32px; }
  .brand b { font-size: 21px; }
  .brand span { font-size: 13px; letter-spacing: 0.2em; }
  .bar__cta { order: 3; padding: 9px 14px; letter-spacing: 0.1em; }
  .bar__menu { order: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 14px; letter-spacing: 0.1em; cursor: pointer; }
  .bar__menu i { display: block; width: 16px; height: 10px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
  .bar[data-open] .bar__menu { background: var(--ink); color: var(--paper); }
  .bar[data-open] .bar__menu i { border-color: var(--paper); }
  /* 日文的「メニュー」「デモを予約」比中文長：收緊字距與內距，題簽、選單、預約才排得進同一列 */
  html[lang="ja"] .bar__cta, html[lang="ja"] .bar__menu { letter-spacing: 0.02em; padding-left: 10px; padding-right: 10px; }
  html[lang="ja"] .bar__menu { gap: 6px; }
  .bar nav { order: 4; flex-basis: 100%; flex-direction: column; gap: 0; margin: 8px 0 0; font-size: 16px; }
  .bar nav a { padding: 12px 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .bar nav a[aria-current="page"] { font-weight: 500; }
  /* 沒有 JS 時選單直接展開；有 JS 時收起來，按選單按鈕才打開 */
  .js .bar nav { display: none; }
  .js .bar[data-open] nav { display: flex; }
  html:not(.js) .bar { position: static; }
  html:not(.js) .bar__menu { display: none; }

  .scroller { height: auto; overflow: visible; }
  .roll { height: auto; min-width: 0; aspect-ratio: auto; overflow: visible; background: none; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 22px; padding: 22px 16px 48px; }
  .roll::before { position: fixed; inset: 0 0 auto 0; width: auto; height: 100lvh; z-index: 0; background: var(--paper) var(--art) no-repeat; background-size: auto 100%; background-position: calc(var(--x) * -100lvh / var(--art-h)) 0; }
  .roll::after, .mist, .hint { display: none; }
  /* 畫的出處：手機版放在頁尾，不固定在畫面上 */
  .credit { position: relative; z-index: 1; right: auto; bottom: auto; width: fit-content; margin: 0 16px 24px; font-size: 12px; line-height: 1.6; }
  .roll > section { scroll-margin-top: 76px; }

  .slip { writing-mode: horizontal-tb; height: auto; padding: 26px 22px; gap: 16px; box-shadow: 0 8px 24px rgba(35, 33, 28, 0.16); }
  .slip h1 { font-size: min(28px, 6.6vw); white-space: normal; letter-spacing: 0.04em; line-height: 1.45; font-weight: 400; }
  .slip h2 { font-size: 23px; white-space: normal; letter-spacing: 0.1em; line-height: 1.5; }
  .slip p, .slip li, .slip dd { font-size: 16px; line-height: 1.85; letter-spacing: 0.04em; }
  .slip .small { font-size: 13px; letter-spacing: 0.08em; line-height: 1.7; }
  .slip li b, .slip dt { font-size: 18px; letter-spacing: 0.08em; }
  .slip li { padding: 14px 0; border-right: 0; border-top: 1px solid var(--line); }
  .slip dl { gap: 0; }
  .slip .big { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
  .slip .big dt { font-size: 26px; line-height: 1.3; }
  .slip .qa div { padding: 14px 0; border-right: 0; border-top: 1px solid var(--line); }
  .tcy { text-combine-upright: none; -webkit-text-combine: none; }
  .go { padding: 12px 20px; font-size: 15px; letter-spacing: 0.2em; align-self: flex-start; }
  .gos { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .spirit { width: 64px; height: 64px; align-self: flex-start; }
  .spirit--xl { width: 150px; height: 150px; align-self: center; }

  .board { width: auto; max-height: none; padding: 24px 20px; gap: 16px; font-size: 15px; box-shadow: 0 8px 24px rgba(35, 33, 28, 0.16); }
  .board h2 { font-size: 22px; letter-spacing: 0.1em; }
  .board__head { flex-wrap: wrap; gap: 6px 16px; }
  .board__head a { font-size: 14px; letter-spacing: 0.1em; }
  .board .small { font-size: 13px; letter-spacing: 0.04em; }
  .board--bare { padding: 0; gap: 0; }
  .board--bare .board__head, .board--bare .small { padding: 12px 16px; }
  .board--bare .small { width: auto; }
  .board [data-demo-embed] { box-shadow: none; }
  .grid > div { gap: 4px 12px; padding: 12px 0; }
  .grid--fam > div { grid-template-columns: 2.2em minmax(0, 1fr); }
  .grid--fam > div > span, .grid--fam > div > code { grid-column: 2; }
  .grid b { font-size: 17px; }
  .grid i { font-size: 20px; }
  .grid code { font-size: 12px; overflow-wrap: anywhere; }
  .pills li { padding: 8px 14px; }
  .record { font-size: 12.5px; line-height: 1.8; padding: 14px 16px; }
  .form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .field { gap: 4px; }
  .field label { font-size: 14px; letter-spacing: 0.08em; }
  .field input, .field textarea { padding: 8px 0; font-size: 16px; }
  .field textarea { height: 110px; }
  .eyebrow { font-size: 13px; letter-spacing: 0.2em; }
  .note { font-size: 13px; }

  /* 示範播放器：上下排列 */
  .board--player #demo { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .board--player .demo__now { min-height: 0; }
  .board--player .demo__stages { max-height: none; overflow: visible; }
  .board--player .demo__stages li { border-left: 0; }
  .board--player .demo__stages button { flex-direction: row; align-items: baseline; padding: 9px 0; font-size: 14px; gap: 10px; }
  .board--player .demo__stages span { flex: none; min-width: 4.5em; }
  .hw .board--player .demo__stages span { min-width: 6.5em; }
  .board--player .demo__intent { font-size: 20px; }
  .board--player .demo__controls { gap: 10px 12px; font-size: 14px; }
  .board--player .demo__controls .btn { min-height: 44px; padding: 0 18px; }

  .hw .slip h1 { letter-spacing: 0; line-height: 1.25; }
  .hw .slip h2 { letter-spacing: 0; line-height: 1.3; }
  .hw .slip p, .hw .slip li, .hw .slip dd { letter-spacing: 0; line-height: 1.65; }
  .hw .slip li b, .hw .slip dt, .hw .board h2 { letter-spacing: 0.01em; }
  .hw .go, .hw .bar__cta, .hw .bar__menu { letter-spacing: 0.04em; }
}

/* 示範以文件順序閱讀，桌機將播放器畫面與控制項並排。 */
@media (min-width: 801px) {
  html:has(body[data-layout="reading"]) { height: auto; scroll-padding-top: 88px; }
  body[data-layout="reading"] { height: auto; overflow: visible; }
  [data-layout="reading"] .bar { position: sticky; background: var(--paper); border-bottom: 1px solid var(--line); }
  [data-layout="reading"] .scroller { height: auto; overflow: visible; }
  [data-layout="reading"] .roll {
    height: auto; aspect-ratio: auto; overflow: visible; flex-direction: column;
    justify-content: flex-start; gap: 28px; padding: 42px 32px;
    background-size: auto 100vh; background-attachment: fixed;
  }
  [data-layout="reading"] .roll::before, [data-layout="reading"] .roll::after,
  [data-layout="reading"] .hint { display: none; }
  [data-layout="reading"] .slip, [data-layout="reading"] .board {
    width: min(100%, 54rem); max-height: none; padding: clamp(24px, 3vw, 44px);
  }
  [data-layout="reading"] .board--player { width: min(100%, 78rem); }
  [data-layout="reading"] .board--player #demo { grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr); }
  [data-layout="reading"] .credit { position: static; width: fit-content; margin: 0 auto 24px; }
}
