/* AquilMuse 官網樣式（風格 2：編輯器截面，2026-11-26）
 *
 * 來源：design-explorations/2026-11-26/shared/base.css 和 2-editor-cutaway/index.html。
 * 第 1 段的 tokens 是 music-project-notes 的 design-system/project/tokens.css 原樣（2026-11-26 複製），
 * 第 2 段是官網延伸，第 4 段以後是元件的官網版和各頁的版面。規則見 design-system/aquilmuse/MASTER.md。
 */

/* ── 0. 字型：Manrope 400–800（自己發佈，SIL OFL，見 fonts/SOURCES.md） ── */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext-400-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin-400-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── 1. 編輯器 Design System 的 tokens（原樣） ───────────────── */
:root, [data-theme="light"] {
  --bg: #eef2f8;
  --card: #ffffff;
  --paper: #ffffff;
  --fg: #1f2a44;
  --mfg: #56627a;
  --line: #dce3ee;
  --line2: #c9d3e3;
  --muted: #e6ecf5;
  --pri: #5b8def;
  --pri-strong: #3566d6;
  --pri-text: #2f5bc7;
  --on-pri: #ffffff;
  --acc: #e0528e;
  --unc: #f2a541;
  --on-unc: #3b2503;
  --ink: #1f2a44;
  --staff: #93a0b8;
  --hover: rgba(91,141,239,.11);
  --play-tint: rgba(91,141,239,.17);
  --focus-tint: rgba(91,141,239,.08);
  --cursor: #e0528e;
  --bm: #2f5bc7;
  --wave: #a6b8da;
  --wave-on: var(--pri-strong);
  --sel: rgba(91,141,239,.15);
  --pin: #1f2a44;
  --cell: #edf1f8;
  --cell-line: #edf1f8;
  --play-bg: #6ee7a8;
  --play-fg: #0b3b24;
  --tint: #eaf0fe;
  --track: #dfe6f1;
  --switch-off: #d5deec;
  --dash: #afc3ea;
  --start-wash: #f4f8ff;
  --warn-bg: #fff4e5;
  --warn-fg: #6b4206;
  --warn-line: #cf7521;
  --error-bg: #fdecf3;
  --error-fg: #8a1c4a;
  --ok-bg: #e3f7ec;
  --ok-fg: #2e9b6a;
  --soft-bg: #eef3fd;
  --soft-line: #a9c1f0;
  --soft-ink: #5e8ae5;
  --scrim: rgba(31,42,68,.32);
  --scrim-panel: rgba(31,42,68,.28);
  --press: rgba(31,42,68,.08);
  --note-general: #3d4a63;
  --note-general-bg: var(--bg);
  --note-gone: var(--mfg);
  --note-gone-bg: #eceff4;
  --note-teacher: var(--pri-text);
  --note-teacher-bg: #e8effd;
  --note-s1: #c2410c;
  --note-s1-bg: #fdeee5;
  --note-s2: #0f766e;
  --note-s2-bg: #e1f3f0;
  --note-s3: #7e22ce;
  --note-s3-bg: #f3e8fd;
  --note-s4: #9e6007;
  --note-s4-bg: #fbf2d9;
  --note-s5: #be123c;
  --note-s5-bg: #fde7ec;
  --placeholder: #6b7690;
  --sf: 0 1px 2px rgba(31,42,68,.07),0 8px 24px rgba(31,42,68,.08);
  --sf-sm: 0 1px 2px rgba(31,42,68,.10),0 3px 8px rgba(31,42,68,.07);
  --shadow-bar: 0 1px 0 #dce3ee,0 4px 16px rgba(31,42,68,.05);
  --shadow-transport: 0 -1px 0 #dce3ee,0 -8px 24px rgba(31,42,68,.06);
  --shadow-panel-up: 0 -8px 24px rgba(31,42,68,.06);
  --shadow-play: 0 4px 10px rgba(52,178,123,.35);
  --shadow-start-icon: 0 6px 14px rgba(52,178,123,.35);
  --shadow-pri: 0 2px 4px rgba(53,102,214,.25),0 6px 14px rgba(53,102,214,.25);
  --shadow-mode: 0 2px 6px rgba(53,102,214,.3);
  --shadow-cell-on: 0 2px 6px rgba(53,102,214,.35);
  --shadow-cell-unc: 0 2px 6px rgba(242,165,65,.4);
  --inset-seg: inset 0 1px 2px rgba(31,42,68,.08);
  --inset-cell: inset 0 1px 2px rgba(31,42,68,.10);
  --inset-track: inset 0 1px 2px rgba(31,42,68,.12);
  --inset-switch: inset 0 1px 2px rgba(31,42,68,.18);
  --shadow-knob: 0 1px 3px rgba(31,42,68,.3);
  --shadow-thumb: 0 1px 2px rgba(31,42,68,.25),0 2px 6px rgba(31,42,68,.18);
  --shadow-tile: 0 1px 2px rgba(31,42,68,.06);
  --shadow-popover: 0 2px 6px rgba(31,42,68,.12),0 18px 44px rgba(31,42,68,.2);
  --shadow-dialog: 0 2px 6px rgba(31,42,68,.12),0 24px 60px rgba(31,42,68,.28);
  --shadow-drawer: 18px 0 44px rgba(31,42,68,.2);
  --shadow-pill: 0 2px 6px rgba(31,42,68,.12),0 12px 32px rgba(31,42,68,.18);
  --shadow-tooltip: 0 8px 24px rgba(31,42,68,.25);
  --shadow-menu: 0 2px 6px rgba(31,42,68,.12),0 10px 26px rgba(31,42,68,.16);
  --shadow-danger: 0 2px 6px rgba(138,28,74,.25);
  --shadow-focus: 0 0 0 3px rgba(53,102,214,.22);
}
:root {
  --r: 12px;
  --radius-8: 8px;
  --radius-14: 14px;
  --radius-18: 18px;
  --radius-pill: 99px;
  --opacity-45: .45;
  --font-f-body: "Manrope", "Noto Sans TC", system-ui, sans-serif;
  --font-f-disp: "Manrope", "Noto Sans TC", system-ui, sans-serif;
  --font-f-num: "Manrope", "Noto Sans TC", system-ui, sans-serif;
  --fs-start-title: 19px;
  --fs-caption: 12px;
  --fs-label: 11.5px;
  --fs-badge: 11px;
}
/* 中文：英文和數字仍用 Manrope，中文字落到系統字型 */
:lang(zh-Hant) { --font-f-body: "Manrope", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; --font-f-disp: var(--font-f-body); }
:lang(zh-Hans) { --font-f-body: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; --font-f-disp: var(--font-f-body); }

/* ── 2. 官網延伸（Design System 沒有的） ────────────────────────
 * 大標題字級、16–18px 內文、96–160px 區塊間距、互動元件最小 44px、「Planned」標籤、輸入框外框加深到 3:1。
 */
:root {
  --fs-d1: clamp(36px, 5vw, 64px);
  --fs-d2: clamp(30px, 4.2vw, 56px);
  --fs-d3: clamp(22px, 2.6vw, 34px);
  --fs-read: 17px;
  --fs-read-sm: 15.5px;
  --sec-gap: clamp(88px, 11vw, 160px);
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --hit: 44px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --input-line: #7d889f;
}

/* ── 3. 基本 ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-f-body);
  font-size: var(--fs-read-sm);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
h1, h2, h3 { font-family: var(--font-f-disp); font-weight: 800; text-wrap: balance; letter-spacing: -.02em; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; line-height: 1.3; }
/* 中文標題在標點斷行，不把詞拆開；真的放不下才硬斷 */
:lang(zh) h1, :lang(zh) h2, :lang(zh) .og-h { word-break: keep-all; overflow-wrap: anywhere; }
p { text-wrap: pretty; }
a { color: var(--pri-text); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
button, input { font: inherit; color: inherit; }
::selection { background: rgba(91,141,239,.28); color: var(--fg); }
:focus-visible { outline: 2px solid var(--pri-strong); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-f-num); }
.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; left: 12px; top: -80px; z-index: 50; background: var(--card); padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 12px; box-shadow: var(--shadow-popover); }
.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 30px; height: 30px; }
.logo { display: inline-flex; align-items: center; min-height: var(--hit); }

/* ── 4. 導覽列 ────────────────────────────────────────────── */
/* header 在任何寬度都只有一行、固定 64px 高（owner，item #73：「怎麼會是兩行啊？」）。
   放不下全部時，照語言各自的寬度依序：導覽連結收進 ☰ 選單 → 「搶先登記」換短字 → Logo 只留圖（斷點在本段最後）。 */
.site-header { background: var(--card); box-shadow: var(--shadow-bar); position: relative; z-index: 2; }
.nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; height: 64px; }
.nav > *, .nav-end > * { flex: none; }
/* Logo 圖檔（560×140）的 AquilMuse 字高約是圖高的 27%：40px 高時字和導覽列的 14px 字一樣大。
   圖的左右各有約 47% 圖高的透明邊，往左拉齊內容邊線（手機的 header 少拉一點，連結的外框不貼螢幕邊） */
.nav .logo { margin-left: -19px; }
.nav .logo img { height: 40px; width: auto; max-width: none; }
.nav .links { display: flex; gap: 2px; margin-left: auto; }
.nav .links a, .lang summary, .lang-menu a, .nav-menu summary, .menu-panel a { display: inline-flex; align-items: center; min-height: var(--hit); padding: 0 12px; border-radius: var(--r); color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav .links a:hover, .menu-panel a:hover { background: var(--muted); }
.nav .links a[aria-current="page"], .menu-panel a[aria-current="page"] { color: var(--pri-text); background: var(--tint); }
.nav-end { display: flex; align-items: center; gap: 10px; }
.cta-short { display: none; }
/* ☰ 選單：和語言選單一樣是 <details>（沒 JS 也能展開），展開後整條 header 寬的面板蓋在內容上，不推動版面。
   site.js 補上點外面關、Esc 關、開一個就關另一個、點了連結就關。 */
.nav-menu { display: none; }
.nav-menu summary { justify-content: center; width: var(--hit); padding: 0; cursor: pointer; list-style: none; user-select: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu[open] summary { background: var(--muted); }
.nav-menu .ic-close, .nav-menu[open] .ic-open { display: none; }
.nav-menu[open] .ic-close { display: block; }
.menu-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; display: grid; gap: 2px; padding: 8px var(--gutter) 12px; background: var(--card); border-top: 1px solid var(--line); box-shadow: var(--shadow-menu); }
.menu-panel a { min-height: 48px; font-size: 15px; }
/* 關著時明確拿掉面板：新版 Chrome 的 <details> 關著時內容只是 content-visibility: hidden，還留著版面盒 */
.nav-menu:not([open]) .menu-panel { display: none; }
/* 語言選單：<details> 做的下拉，按鈕長得像導覽列的連結（比「搶先登記」次要），選單對齊按鈕右緣往下展開。
   沒有 JavaScript 也能展開；site.js 補上點外面關、Esc 關、方向鍵移動。 */
.lang { position: relative; }
.lang summary { gap: 6px; min-width: var(--hit); padding: 0 10px; color: var(--mfg); cursor: pointer; list-style: none; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang details[open] summary { color: var(--fg); background: var(--muted); }
.lang .chev { width: 14px; height: 14px; transition: transform .15s var(--ease-out); }
.lang details[open] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; min-width: 184px; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-menu); }
.lang-menu a { display: flex; justify-content: space-between; gap: 16px; padding: 0 10px 0 12px; border-radius: var(--radius-8); }
.lang-menu a:hover { background: var(--hover); }
.lang-menu a[aria-current="page"] { color: var(--pri-text); background: var(--tint); }
.lang-menu .ck { color: var(--pri-strong); visibility: hidden; }
.lang-menu a[aria-current="page"] .ck { visibility: visible; }
/* 斷點看的是 header 本身的寬（container query），不是視窗寬：Windows 等有捲軸的環境少掉的 15–17px 也算進去。
   數字是量的（tests/mobile.test.mjs 的「header 一行」檢查在 320–1920 每 1px 掃三種語言）：
   每一段在它最窄的寬度還留至少 12px 空位。改了 header 的字、間距或 Logo，要重新量。 */
.site-header { container: site-header / inline-size; }
@container site-header (max-width: 1000px) {
  .nav { gap: 12px; }
  .nav .links a { padding: 0 8px; }
}
@container site-header (max-width: 560px) {
  .nav .logo { margin-left: -14px; }
  .nav .logo img { height: 34px; }
}
/* 1. 導覽連結收進 ☰（英文 784 以下、中文 597 以下） */
@container site-header (max-width: 784px) {
  .nav:lang(en) .links { display: none; }
  .nav:lang(en) .nav-menu { display: block; }
  .nav:lang(en) .nav-end { margin-left: auto; gap: 6px; }
}
@container site-header (max-width: 597px) {
  .nav:lang(zh) .links { display: none; }
  .nav:lang(zh) .nav-menu { display: block; }
  .nav:lang(zh) .nav-end { margin-left: auto; gap: 6px; }
}
/* 2. 「搶先登記」換短字（Join／登記／登记，leader 定的）；完整的字留給讀螢幕軟體（英文 459、中文 416 以下） */
@container site-header (max-width: 459px) {
  .nav:lang(en) .cta-short { display: inline; }
  .nav:lang(en) .cta-long { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@container site-header (max-width: 416px) {
  .nav:lang(zh) .cta-short { display: inline; }
  .nav:lang(zh) .cta-long { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* 3. Logo 只留圖：裁掉圖檔右邊的字，鳥置中在 44px 寬的框裡；連結的名字本來就是 aria-label 的「AquilMuse 首頁」
   （英文 376、中文 386 以下） */
@container site-header (max-width: 376px) {
  .nav:lang(en) .logo { width: var(--hit); margin-left: -3px; overflow: hidden; }
  .nav:lang(en) .logo img { margin-left: -11px; }
}
@container site-header (max-width: 386px) {
  .nav:lang(zh) .logo { width: var(--hit); margin-left: -3px; overflow: hidden; }
  .nav:lang(zh) .logo img { margin-left: -11px; }
}

/* ── 5. 按鈕 ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--hit); padding: 0 18px; border: 0; border-radius: var(--r);
  background: var(--card); color: var(--fg); box-shadow: var(--sf-sm);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, transform .1s;
}
.btn:hover { background: var(--muted); }
.btn:active { transform: scale(.97); }
.btn-pri { background: var(--pri-strong); color: var(--on-pri); box-shadow: var(--shadow-pri); }
.btn-pri:hover { background: var(--pri-text); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 15px; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; transform: none; background: var(--muted); color: var(--mfg); box-shadow: inset 0 0 0 1.5px var(--line2); }

/* ── 6. 標籤 ──────────────────────────────────────────────── */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: var(--fs-badge); font-weight: 800; font-style: normal; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.tag-now { background: var(--ok-bg); color: #1d6b48; }
.tag-soon { background: var(--muted); color: var(--mfg); }
.soon { font-size: var(--fs-caption); font-weight: 500; color: var(--mfg); }

/* ── 7. 樂器卡（DS InstrumentCard） ───────────────────────── */
.icards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.icard { position: relative; display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 132px; padding: 16px 10px; border-radius: var(--radius-14); background: var(--card); box-shadow: var(--sf-sm); text-align: center; }
.icard .ib { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-14); background: var(--card); box-shadow: var(--sf-sm); color: var(--pri-strong); }
.icard .nm { font-size: 15px; font-weight: 700; line-height: 1.2; }
.icard.is-on { background: var(--tint); box-shadow: 0 0 0 2px var(--pri-strong), 0 0 0 5px var(--focus-tint); }
.icard.is-on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--pri-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.icard.is-off { background: var(--muted); box-shadow: none; }
.icard.is-off .ib { color: var(--mfg); background: var(--card); box-shadow: none; }
.icard.is-off .nm { color: var(--mfg); }

/* ── 8. 筆記字條（DS NoteChip） ───────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 26px; padding: 1px 8px; border-radius: 5px; background: var(--note-general-bg); color: var(--note-general); font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .t { overflow: hidden; text-overflow: ellipsis; }
.chip.s1 { background: var(--note-s1-bg); color: var(--note-s1); }
.chip.s1::before { content: ""; flex: none; width: 8px; height: 8px; background: currentColor; transform: rotate(45deg); border-radius: 1px; }

/* ── 9. 速度控制（DS TempoControl，放大到 44px） ───────────── */
.tempo { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--muted); box-shadow: var(--inset-seg); }
.tempo button { display: inline-flex; align-items: center; justify-content: center; min-width: var(--hit); height: var(--hit); padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: var(--card); box-shadow: var(--sf-sm); font-size: 14px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.tempo button:hover { background: var(--tint); color: var(--pri-text); }
.tempo button:active { transform: scale(.97); }
.tempo label { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px 0 10px; font-weight: 700; white-space: nowrap; }
.tempo input { width: 64px; height: var(--hit); border: 1.5px solid var(--input-line); border-radius: var(--radius-8); background: var(--card); text-align: center; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tempo input:focus { outline: none; border-color: var(--pri-strong); box-shadow: var(--shadow-focus); }
.tempo .tap { gap: 6px; }

/* ── 10. 播放鍵、開關、分段 ───────────────────────────────── */
.play { display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--play-bg); color: var(--play-fg); box-shadow: var(--shadow-play); cursor: pointer; flex: none; }
.play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.play .i-pause { display: none; }
.play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }
.play:active { transform: scale(.97); }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: var(--hit); padding: 0; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.switch .tr { position: relative; width: 38px; height: 22px; border-radius: var(--radius-pill); background: var(--switch-off); box-shadow: var(--inset-switch); transition: background-color .15s; }
.switch .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-knob); transition: transform .15s var(--ease-out); }
.switch[aria-checked="true"] .tr { background: var(--pri-strong); }
.switch[aria-checked="true"] .tr::after { transform: translateX(16px); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--muted); box-shadow: var(--inset-seg); }
.seg > * { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; color: var(--mfg); white-space: nowrap; }
.seg > .on { background: var(--pri-strong); color: var(--on-pri); box-shadow: var(--shadow-mode); }

/* ── 11. 小節格子（DS BarGrid） ───────────────────────────── */
.bargrid { display: grid; gap: 4px 6px; align-items: center; margin-top: 16px; grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
.bargrid .rl { font-size: 13px; font-weight: 600; padding-right: 8px; white-space: nowrap; }
.bargrid .beat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.bargrid .bh { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; }
.bargrid .bh i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--mfg); padding: 2px 6px; border-radius: 6px; background: var(--muted); }
.cell { display: block; width: 100%; min-height: var(--hit); padding: 0; border: 0; border-radius: var(--radius-8); background: var(--cell); box-shadow: var(--inset-cell); cursor: pointer; transition: background-color .12s; }
.cell:hover { box-shadow: inset 0 0 0 1.5px var(--pri); }
.cell[aria-pressed="true"] { background: var(--pri-strong); box-shadow: var(--shadow-cell-on); }
.cell.unc[aria-pressed="true"] { background: var(--unc); box-shadow: var(--shadow-cell-unc); }

/* ── 12. 鼓譜 SVG（tools/notation.py 產生） ───────────────── */
.score { width: 100%; height: auto; overflow: visible; color: var(--ink); }
.score .sl, .score .bl, .score .ln { stroke: var(--staff); stroke-width: 1; fill: none; }
.score .bl { stroke-width: 1.3; }
.score .ln { stroke: var(--ink); stroke-width: 1.3; }
.score .hd { fill: currentColor; }
.score .hd-x { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.score .st { stroke: currentColor; stroke-width: 1.3; }
.score .bm, .score .cl, .score .rs { fill: currentColor; }
.score .fl, .score .rs-s { fill: none; stroke: currentColor; stroke-width: 1.5; }
.score .rs .rs-s { fill: none; }
.score .ts { font: 800 23px/1 var(--font-f-disp); text-anchor: middle; fill: currentColor; }
.score .halo { fill: var(--unc); opacity: .55; stroke: none; }
.score .ph { stroke: var(--cursor); stroke-width: 2.4; stroke-linecap: round; }
.score .ev.lit { color: var(--pri-strong); }

/* ── 13. 等候名單表單 ─────────────────────────────────────── */
.waitlist { display: grid; gap: 8px; }
.fl-label { font-size: 13px; font-weight: 700; }
.waitlist input[type="email"], .waitlist input[type="text"] { width: 100%; min-width: 0; min-height: var(--hit); padding: 0 14px; border: 1.5px solid var(--input-line); border-radius: var(--r); background: var(--card); font-size: 15px; }
.waitlist input::placeholder { color: var(--placeholder); }
.waitlist input[type="email"]:focus, .waitlist input[type="text"]:focus { outline: none; border-color: var(--pri-strong); box-shadow: var(--shadow-focus); }
.waitlist input[aria-invalid="true"] { border-color: var(--error-fg); }
/* 勾選框連同文字整行都能點，至少 44px 高（手機的點擊目標） */
.consent, .chk { display: flex; gap: 10px; align-items: flex-start; min-height: var(--hit); padding-block: 12px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input, .chk input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--pri-strong); cursor: pointer; }
.consent input:focus-visible, .chk input:focus-visible { outline: 2px solid var(--pri-strong); outline-offset: 2px; }
.consent input[aria-invalid="true"] { outline: 2px solid var(--error-fg); outline-offset: 2px; }
/* 樂器（選填、可複選）：選項一排，放不下就換行；「其他」的文字框勾了才出現 */
.inst { min-width: 0; margin: 4px 0 0; padding: 0; border: 0; }
.inst legend { padding: 0; }
.inst-opts { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 2px; }
.chk { align-items: center; padding-block: 0; }
/* 樂器的四個勾選（爵士鼓、吉他、鋼琴、其他）排一行（owner，item #73）。看表單本身的寬（container query）依序縮：
   勾選框和字的間距、選項之間的間距 → 英文字 13px、勾選框 18px（英文最長；中文只縮間距就放得下）。
   最窄的 320 寬手機，表單另外靠等候名單卡片左右內距 28 → 16px 撐到 256px（第 21 段）。
   斷點是量的（tests/mobile.test.mjs 掃 320–1920）：英文在每一段最窄的寬度還剩約 6px。 */
.waitlist { container: waitlist / inline-size; }
@container waitlist (max-width: 329px) {
  .inst-opts { column-gap: 10px; }
  .inst-opts .chk { gap: 8px; }
}
@container waitlist (max-width: 303px) {
  .inst-opts { column-gap: 8px; }
  .inst-opts .chk { gap: 6px; }
  .inst-opts:lang(en) .chk { font-size: 13px; }
  .inst-opts:lang(en) .chk input { width: 18px; height: 18px; }
}
@container waitlist (max-width: 270px) {
  .inst-opts { column-gap: 6px; }
  .inst-opts .chk { gap: 4px; }
}
.inst-other { display: grid; gap: 6px; margin-top: 2px; }
.inst-other[hidden], .inst-hint[hidden] { display: none; }
.inst-other-label { font-size: 13px; color: var(--mfg); }
.inst-hint { display: block; }
.inst-other input[type="text"] { max-width: 16em; }
.ts:empty { display: none; }
/* Turnstile 用 interaction-only：不需要使用者點的時候小元件是 0 高，但還佔表單 grid 的一列，同意那行到按鈕多一個 8px gap（16px）。
   site.js 量到裡面全是 0 高才加 .is-collapsed：改成 absolute 不佔列，和其他欄位一樣只隔 8px（owner，item #73）。
   不用 display: none，小元件才能在背景照常跑；跳出驗證時裡面變高，class 拿掉就回到原位。 */
.waitlist { position: relative; }
.ts.is-collapsed { position: absolute; top: 0; left: 0; width: 100%; height: 0; overflow: hidden; }
.form-act { display: flex; }
.form-nojs a, .form-note a { color: var(--pri-text); }
.form-msg { min-height: 1.4em; font-size: 13.5px; font-weight: 600; color: var(--mfg); }
/* 沒有訊息時不佔高度：按鈕到隱私權那行只剩表單的兩個 8px 間距（35 → 16px）；有訊息時才把下面那行往下推 */
.form-msg:empty { min-height: 0; }
.form-msg[data-state="ok"] { color: #1d6b48; }
.form-msg[data-state="err"] { color: var(--error-fg); }
.form-note { font-size: 13px; color: var(--mfg); }

/* ── 14. 頁尾 ─────────────────────────────────────────────── */
/* 頁尾收緊：Logo 的連結和右邊的連結一樣 44px 高、第一行對齊；版權那行的信箱連結點擊範圍 44px，
   但用負的上下 margin 不撐高那一行，留白只看 padding 和 margin */
.foot { margin-top: 40px; padding-block: 18px 24px; background: var(--card); box-shadow: var(--shadow-panel-up); font-size: 13.5px; color: var(--mfg); }
.foot .frow { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: flex-start; justify-content: space-between; }
.foot .fbrand p { max-width: 36ch; }
.foot .logo { margin-left: -15px; } /* 拉齊說明文字，理由見導覽列的 Logo */
.foot .logo img { height: 32px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot nav a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--hit); min-height: var(--hit); color: var(--fg); font-weight: 600; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot .fcopy { margin-top: 14px; font-size: 12.5px; }
.foot .fcopy .ftm { margin-top: 4px; font-size: 11.5px; }
.foot .fcopy a { display: inline-flex; align-items: center; min-height: var(--hit); margin-block: -12px; color: var(--mfg); font-weight: 500; }

/* ── 15. 首頁：首屏和編輯器 ───────────────────────────────── */
.hero { padding-top: clamp(40px, 6vw, 80px); text-align: center; }
.eyebrow { font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pri-text); margin-bottom: 14px; }
.hero h1 { font-size: var(--fs-d1); line-height: 1.05; max-width: 16ch; margin-inline: auto; }
:lang(zh) .hero h1 { line-height: 1.2; }
.hero .lede { max-width: 62ch; margin: 18px auto 0; font-size: var(--fs-read); color: var(--mfg); line-height: 1.6; }
.hero .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

.app { margin-top: clamp(36px, 5vw, 56px); border-radius: 22px; background: var(--bg); box-shadow: 0 0 0 1px var(--line), var(--shadow-dialog); overflow: hidden; text-align: left; }
.app-tb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; background: var(--card); box-shadow: var(--shadow-bar); }
.app-tb .l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.app-tb .l img { height: 26px; width: auto; }
.app-tb .doc { padding-left: 14px; border-left: 1px solid var(--line); min-width: 0; }
.app-tb .doc b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tb .doc span { display: block; font-size: 11.5px; color: var(--mfg); white-space: nowrap; }
.app-tb .r { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.app-tb .ghostbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 13px; font-weight: 600; }
.app-tb .av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card); box-shadow: var(--sf-sm); }
.app-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; padding: 14px; }
.lib { padding: 12px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); font-size: 13px; }
.lib .tabs { display: flex; gap: 4px; padding: 3px; border-radius: var(--r); background: var(--muted); box-shadow: var(--inset-seg); }
.lib .tabs span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 9px; font-weight: 600; color: var(--mfg); }
.lib .tabs .on { background: var(--card); color: var(--fg); box-shadow: var(--sf-sm); }
.lib .folder { margin-top: 12px; padding: 9px 10px; border-radius: var(--r); background: var(--muted); font-weight: 700; display: flex; justify-content: space-between; }
.lib .folder i { font-style: normal; font-weight: 500; color: var(--mfg); }
.lib ul { margin-top: 8px; display: grid; gap: 2px; }
.lib li { padding: 8px 10px; border-radius: var(--r); }
.lib li b { display: block; font-weight: 600; }
.lib li span { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; color: var(--mfg); }
.lib li em { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 5px; background: var(--muted); color: var(--fg); }
.lib li.on { background: var(--muted); }
.lib li.on em { background: var(--tint); color: var(--pri-text); }
.paper { min-width: 0; padding: 18px 22px 10px; border-radius: var(--radius-18); background: var(--paper); box-shadow: var(--sf); }
.paper .hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mfg); margin-bottom: 10px; }
.chiprow { display: grid; grid-template-columns: 46fr repeat(4, 200fr) 2fr; margin-bottom: 2px; }
.chiprow.cont { grid-template-columns: 2fr repeat(4, 200fr) 2fr; }
.chiprow.m { grid-template-columns: 46fr repeat(2, 200fr) 2fr; }
.chiprow .chip { grid-row: 1; margin-left: 6px; font-size: 13px; min-height: 22px; max-width: calc(100% - 10px); }
.chiprow .b1 { grid-column: 2; } .chiprow .b2 { grid-column: 3; } .chiprow .b3 { grid-column: 4; } .chiprow .b4 { grid-column: 5; }
.sys + .sys { margin-top: 14px; }
.sec-name { font-size: 11px; font-weight: 700; color: var(--pri-text); margin: 0 0 2px 2px; }
.sc-mob { display: none; }
.transport { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 12px 18px 14px; background: var(--card); box-shadow: var(--shadow-transport); }
.transport .play { grid-row: span 2; }
.transport .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.transport .time { font-weight: 700; font-size: 15px; white-space: nowrap; }
.transport .time i { font-style: normal; font-weight: 500; color: var(--mfg); font-size: 13px; }
.transport .sound { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 36px; border-radius: var(--r); background: var(--card); box-shadow: var(--sf-sm); font-size: 13px; font-weight: 600; }
.wave { width: 100%; height: 34px; }
.wave rect { fill: var(--wave); }
.app .tempo { padding: 3px; }
.app .tempo button { min-width: 44px; padding: 0 8px; font-size: 13px; }
.app .tempo input { width: 56px; font-size: 15px; }
.app-cap { padding: 10px 18px 12px; font-size: 12.5px; color: var(--mfg); background: var(--card); border-top: 1px solid var(--line); text-align: center; }

/* ── 16. 首頁：各區塊 ─────────────────────────────────────── */
.sec-h { font-size: var(--fs-d2); line-height: 1.08; max-width: 20ch; }
:lang(zh) .sec-h { line-height: 1.25; }
.sec-intro { margin-top: 14px; max-width: 56ch; font-size: var(--fs-read); color: var(--mfg); line-height: 1.6; }

.start { margin-top: var(--sec-gap); }
.start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.start-card { padding: 24px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); }
.start-main { grid-column: 1 / -1; padding: 32px; background: var(--start-wash); }
.start-head { display: flex; gap: 16px; align-items: center; }
.start-main h3 { margin-top: 0; font-size: 24px; }
.start-main .start-head p { margin-top: 4px; }
.start-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; padding: 0; }
.start-steps li { counter-increment: step; padding: 18px; border-radius: var(--radius-14); background: var(--card); }
.start-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pri-strong); color: #fff; font-weight: 800; font-size: 14px; }
.start-steps h4 { margin-top: 12px; font-size: var(--fs-start-title); }
.start-steps p { margin-top: 6px; color: var(--mfg); line-height: 1.6; }
.start-card .sib { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-14); background: var(--tint); color: var(--pri-strong); }
.start-card h3 { margin-top: 14px; font-size: var(--fs-start-title); }
.start-card p { margin-top: 8px; color: var(--mfg); line-height: 1.6; }

.zooms { margin-top: var(--sec-gap); }
.zoom { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: center; margin-top: 72px; }
.zoom.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.crop { position: relative; padding: 28px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); }
.crop .from { position: absolute; top: -12px; left: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--fg); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.zoom h3 { font-size: var(--fs-d3); line-height: 1.15; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zoom-copy > p, .teach p, .newscore p { margin-top: 12px; color: var(--mfg); line-height: 1.65; max-width: 46ch; }
.zoom-copy ul, .teach ul, .plan ul, .plan-card ul { margin-top: 16px; display: grid; gap: 9px; font-size: 14.5px; }
.zoom-copy li, .teach li, .plan li, .plan-card li { display: flex; gap: 8px; }
.zoom-copy li .ic, .teach li .ic, .plan li .ic, .plan-card li .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--pri-strong); }
.crop .rowc { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.mixer { margin-top: 20px; display: grid; gap: 6px; padding: 12px; border-radius: var(--radius-14); background: var(--bg); }
.mixer .tr { display: grid; grid-template-columns: 44px 110px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.mute { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: var(--card); box-shadow: var(--sf-sm); color: var(--fg); cursor: pointer; }
.mute[aria-pressed="true"] { background: var(--muted); color: var(--mfg); box-shadow: var(--inset-seg); }
.mute .off { display: none; }
.mute[aria-pressed="true"] .on { display: none; }
.mute[aria-pressed="true"] .off { display: block; }
.mixer .tr[data-muted] .vol i { background: var(--line2); }
.vol { height: 6px; border-radius: 3px; background: var(--track); box-shadow: var(--inset-track); position: relative; }
.vol i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--pri); }
.vol b { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-thumb); }

.be-tools { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--muted); box-shadow: var(--inset-seg); font-size: 12.5px; font-weight: 600; color: var(--mfg); }
.be-tools span { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 9px; }
.be-tools span.on { background: var(--card); color: var(--fg); box-shadow: var(--sf-sm); }
.unc-key { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--mfg); }
.unc-key i { width: 12px; height: 12px; border-radius: 3px; background: var(--unc); }

.notes-crop { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.npanel { padding: 12px; border-radius: var(--radius-14); background: var(--bg); font-size: 13px; }
.npanel .h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.npanel .sw { width: 30px; height: 18px; border-radius: 9px; background: var(--pri-strong); position: relative; }
.npanel .sw::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.npanel .lab { margin: 12px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mfg); }
.npanel .ck { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.npanel .ck i, .dialog .ckr i { width: 16px; height: 16px; border-radius: 4px; background: var(--pri-strong); display: grid; place-items: center; color: #fff; flex: none; }
.npanel .ck i.off { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line2); }
.npanel .ck i .ic, .dialog .ckr i .ic { width: 11px; height: 11px; stroke-width: 3; }
.npanel .dia { width: 8px; height: 8px; transform: rotate(45deg); background: var(--note-s1); }
.npanel .dia.s2 { background: var(--note-s2); }
.notes-score .chiprow { grid-template-columns: 2fr 200fr 200fr 2fr; gap: 4px 0; }
.notes-score .chiprow .chip { font-size: 14px; }
.notes-score .chiprow .r2 { grid-row: 2; }

.teach, .newscore { margin-top: var(--sec-gap); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; align-items: center; }
.teach > div > p, .newscore > div > p { font-size: var(--fs-read); line-height: 1.6; margin-top: 14px; }
.dialog { padding: 22px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--shadow-dialog); font-size: 13.5px; }
.dialog .dlg-t { font-size: 17px; font-weight: 800; }
.dialog .f { margin-top: 14px; }
.dialog .fl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.dialog .f .in { padding: 10px 12px; border-radius: var(--r); border: 1.5px solid var(--line2); }
.dialog .ckr { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dialog .ckr.rights { margin-top: 14px; }
.dialog .exp { margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: var(--tint); color: var(--pri-text); display: flex; gap: 8px; align-items: center; font-weight: 600; }
.dialog .acts { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.dialog .acts span { padding: 8px 14px; border-radius: var(--r); font-weight: 600; box-shadow: var(--sf-sm); }
.dialog .acts .p { background: var(--pri-strong); color: #fff; box-shadow: var(--shadow-pri); }
.dialog .lab { margin: 14px 0 10px; font-size: 12.5px; font-weight: 700; }
.teach-vis { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 18px; align-items: end; }
.qr { padding: 14px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); text-align: center; font-size: 12px; color: var(--mfg); }
.qr .qrcode { display: block; width: 100%; height: auto; margin-bottom: 8px; }

.plans { margin-top: var(--sec-gap); }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.plan { padding: 24px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); }
.plan h3 { font-size: var(--fs-start-title); }
.plan .price { margin-top: 6px; display: flex; align-items: baseline; gap: 2px; }
.amt { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.per { font-size: 14px; font-weight: 600; color: var(--mfg); }
.tba { font-size: 14px; font-weight: 700; color: var(--mfg); }
.plans-more { margin-top: 22px; }

.faq { margin-top: var(--sec-gap); }
.qa-list { margin-top: 28px; display: grid; gap: 10px; max-width: 860px; }
.qa { border-radius: var(--radius-14); background: var(--card); box-shadow: var(--sf-sm); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 18px; cursor: pointer; list-style: none; border-radius: var(--radius-14); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 16px; letter-spacing: -.01em; }
.qa .qa-ic { color: var(--mfg); transition: transform .2s var(--ease-out); }
.qa[open] .qa-ic { transform: rotate(45deg); }
.qa p { padding: 0 18px 16px; color: var(--mfg); line-height: 1.65; max-width: 70ch; }

/* 等候名單卡片收緊白邊（owner，item #73）：內距 64 → 32px（手機 20px）、標題欄約 40%、欄距 32px、表單最寬 480px 靠左 */
.final { margin-top: var(--sec-gap); padding: clamp(20px, 4vw, 32px); border-radius: 22px; background: var(--card); box-shadow: var(--sf); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px 32px; align-items: center; }
.final .waitlist { max-width: 480px; }
.final h2 { font-size: var(--fs-d3); line-height: 1.15; }

/* ── 17. 價格頁 ───────────────────────────────────────────── */
.pricing { padding-top: clamp(40px, 6vw, 72px); }
.pricing-head { text-align: center; }
.pricing-head h1 { font-size: var(--fs-d1); line-height: 1.05; }
.pricing-head .lede { max-width: 60ch; margin: 16px auto 0; font-size: var(--fs-read); color: var(--mfg); line-height: 1.6; }
.billing { display: inline-flex; gap: 2px; margin-top: 24px; padding: 4px; border-radius: var(--radius-pill); background: var(--muted); box-shadow: var(--inset-seg); }
.billing label { position: relative; display: inline-flex; }
.billing input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.billing label > span { display: inline-flex; align-items: center; gap: 8px; min-height: var(--hit); padding: 0 18px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; color: var(--mfg); }
.billing input:checked + span { background: var(--card); color: var(--fg); box-shadow: var(--sf-sm); }
.billing input:focus-visible + span { outline: 2px solid var(--pri-strong); outline-offset: 2px; }
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; align-items: start; }
.plan-card { display: grid; gap: 14px; padding: 26px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); }
.plan-card h2 { font-size: 22px; }
.pc-for { color: var(--mfg); font-size: 14.5px; min-height: 2.9em; }
.pc-prices { min-height: 76px; }
.pc-price { display: flex; align-items: baseline; gap: 2px; }
.pc-price .amt { font-size: 40px; }
.pc-sub { font-size: 13px; color: var(--mfg); font-weight: 600; }
.bill-y { display: none; }
.pricing[data-billing="yearly"] .bill-m { display: none; }
.pricing[data-billing="yearly"] .bill-y { display: block; }
.pricing:has(input[value="yearly"]:checked) .bill-m { display: none; }
.pricing:has(input[value="yearly"]:checked) .bill-y { display: block; }
.buy { width: 100%; }
.plan-card ul { margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.buy-note { margin-top: 16px; text-align: center; font-size: 13px; color: var(--mfg); }
.tokens { margin-top: var(--sec-gap); }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.rule { padding: 22px; border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf-sm); }
.rule h3 { font-size: 17px; }
.rule p { margin-top: 6px; color: var(--mfg); line-height: 1.6; font-size: 14.5px; }
.pqs { margin-top: var(--sec-gap); }
.pq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; margin-top: 32px; }
.pq h3 { font-size: 17px; }
.pq p { margin-top: 6px; color: var(--mfg); line-height: 1.65; }

/* ── 18. 條款、退款、隱私、著作權 ─────────────────────────── */
.legal { padding-top: clamp(36px, 5vw, 64px); max-width: calc(820px + var(--gutter) * 2); }
.legal-head h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; }
.legal-head .updated { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--mfg); }
.legal-head .lede { margin-top: 16px; font-size: var(--fs-read); line-height: 1.65; }
.prose { margin-top: 32px; padding: clamp(22px, 4vw, 44px); border-radius: var(--radius-18); background: var(--card); box-shadow: var(--sf); line-height: 1.7; }
.prose section + section { margin-top: 30px; }
.prose h2 { font-size: 20px; letter-spacing: -.01em; }
.prose p, .prose ul { margin-top: 10px; }
.prose ul { padding-left: 1.2em; list-style: disc; display: grid; gap: 6px; }
.prose li::marker { color: var(--pri-strong); }
.prose a { overflow-wrap: anywhere; }
.back { margin-top: 24px; }

/* ── 19. 404 ──────────────────────────────────────────────── */
.nf { padding-block: 96px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.nf h1 { font-size: var(--fs-d2); }
.nf ul { display: grid; gap: 6px; }

/* ── 20. 分享圖的版型（tools/og/*.html，1200×630 截圖） ───── */
.og { width: 1200px; height: 630px; overflow: hidden; }
.og-card { display: grid; grid-template-columns: 520px 1fr; gap: 40px; align-items: center; height: 630px; padding: 64px; background: var(--bg); }
.og-copy img { height: 42px; width: auto; }
.og-h { margin-top: 36px; font-size: 58px; font-weight: 800; line-height: 1.06; letter-spacing: -.02em; }
:lang(zh) .og-h { letter-spacing: 0; line-height: 1.2; font-size: 54px; }
.og-sub { margin-top: 18px; font-size: 22px; font-weight: 600; color: var(--mfg); }
.og-app { padding: 28px 26px 20px; border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow-dialog); }
.og-app .chip { font-size: 15px; }
.og-transport { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 17px; }
.og-transport .play { width: 48px; height: 48px; }
.og-transport .play .ic { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.og-sw { width: 38px; height: 22px; border-radius: 99px; background: var(--pri-strong); position: relative; }
.og-sw::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.og-bpm { margin-left: auto; padding: 8px 16px; border-radius: 99px; background: var(--muted); font-weight: 800; }

/* ── 21. 窄螢幕 ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .lib { display: none; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .zoom, .zoom.flip, .teach, .newscore, .final, .pq-grid { grid-template-columns: minmax(0, 1fr); }
  .zoom.flip .crop { order: 0; }
  .zoom.flip .zoom-copy { order: 1; }
  .plan-grid, .pc-grid, .start-grid, .start-steps { grid-template-columns: minmax(0, 1fr); }
  .start-main { padding: 24px 20px; }
  .notes-crop { grid-template-columns: minmax(0, 1fr); }
  .pc-for, .pc-prices { min-height: 0; }
}
@media (max-width: 640px) {
  .app-tb { grid-template-columns: auto 1fr; }
  .app-tb .doc, .app-tb .r { display: none; }
  .app-tb .seg { justify-self: end; }
  .paper { padding: 14px 12px 6px; }
  .sc-desk { display: none; }
  .sc-mob { display: block; }
  .transport { padding: 12px; }
  .transport .sound, .transport .time, .tempo .wide { display: none; }
  .crop { padding: 22px 16px 18px; }
  .mixer .tr { grid-template-columns: 44px 92px minmax(0, 1fr); }
  .bargrid .b34 { display: none; }
  .bargrid { grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
  .teach-vis { grid-template-columns: minmax(0, 1fr); }
  .qr { display: none; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .icards { gap: 8px; }
  .icard { min-height: 120px; padding: 14px 6px; }
}
/* 最窄的手機（320）：放大區的速度控制（−1、BPM、+1、Tap）放得進卡片，不把頁面撐出水平捲動 */
@media (max-width: 380px) {
  .crop { padding-inline: 12px; }
  .final { padding-inline: 16px; } /* 等候名單的樂器勾選排得下一行（第 13 段） */
  .tempo label { gap: 4px; padding: 0 4px 0 6px; }
  .tempo input { width: 52px; }
}

/* ── 22. 減少動態效果 ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-property: color, background-color, box-shadow, opacity !important; }
  .score .ph { opacity: 0; }
}
