/* Holocron：字型、圓角、線條圖示照 200_Reference/brand/DESIGN.md。配色是 Glenn 2026-10-06 定的星戰主題：
   太空黑底；書的介面用西斯紅（光劍進度條白芯紅光）；Glenn 自己的想法與錄音用全像藍；略讀章用綠光。
   紅色只當點綴，內文、章名、劃線原文一律淺灰。不放星戰官方 logo 與字型。 */
:root {
  --saber: #D11A22;          /* 主紅，白字壓上去對比 5.4:1 */
  --saber-press: #A8141B;
  --saber-text: #FF5A5F;     /* 黑底上要當字用的紅，對比 6.9:1 */
  --on-saber: #FFFFFF;
  --blade: #FFF5F5;
  --glow: 0 0 3px #FF2828, 0 0 8px rgba(255, 40, 40, 0.75), 0 0 18px rgba(255, 40, 40, 0.35);
  --skim: #3DDC4A;           /* 略讀：綠光劍 */
  --glow-skim: 0 0 3px #3DDC4A, 0 0 8px rgba(61, 220, 74, 0.75), 0 0 18px rgba(61, 220, 74, 0.35);
  --holo: #4FD8FF;           /* 全像藍：只給 Glenn 自己的想法與錄音 */
  --success: #2F8F6B;
  --warning: #C98A2B;
  --danger: #B5443A;

  /* 深底上的語意別名 */
  --space: #000000;
  --ink: #0B0B0D;
  --bg: var(--space);
  --surface: #121214;
  --sunken: #050506;
  --fg: #F2F2F0;
  --fg-2: #A3A3A8;
  --fg-3: #707076;
  --link: var(--saber-text);
  --hair: #26262A;
  --border: rgba(255, 255, 255, 0.22);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --focus: 0 0 0 3px rgba(255, 40, 40, 0.45);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }  /* 點兩下不放大 */
body {
  color: var(--fg);
  font-family: var(--serif);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: calc(300px + env(safe-area-inset-bottom));
}
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
button:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 20px; height: 20px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* 導覽列：黏性、底色 78% 加模糊、底部髮絲線 */
header.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
}
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.brand { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.brand img { height: 32px; width: auto; display: block; }
.brand .wm { font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg); white-space: nowrap; }
.brand .wm span { color: var(--fg-2); font-weight: 400; }
.back { border: 0; background: none; padding: 6px 8px 6px 0; white-space: nowrap; flex: none; font-family: var(--sans); font-size: 15px; color: var(--fg); display: inline-flex; align-items: center; gap: 2px; }
.back[hidden] { display: none; }
.back[hidden] + .brand { margin-left: 0; }

h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.018em; margin: 28px 0 6px; font-weight: 900; }
.author { color: var(--fg-2); font-size: 15px; margin: 0 0 16px; }
.eyebrow { font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; color: var(--link); text-transform: uppercase; margin: 24px 0 8px; font-weight: 600; }
.muted { color: var(--fg-2); font-size: 14px; }

/* 書庫 */
.book-card {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 16px 18px; margin: 12px 0;
}
.book-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.book-card:active { transform: translateY(1px); }
.book-card .t { font-size: 20px; font-weight: 700; letter-spacing: -0.018em; line-height: 1.35; }
.book-card .m { font-family: var(--sans); font-size: 13px; color: var(--fg-2); margin-top: 2px; }
.book-card.last { border-color: rgba(209, 26, 34, 0.55); }
.book-card .resume { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--saber-text); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card .m.left { color: var(--fg-3); }
.upload {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px dashed var(--border); border-radius: var(--r-md); padding: 20px; margin: 20px 0;
  font-family: var(--sans); font-size: 14px; color: var(--fg-2); text-align: center;
}
.upload.drag { border-color: var(--saber-text); background: rgba(255, 40, 40, 0.06); }

/* 按鈕：主要＝米白底深藍字（深底上的反白版），次要＝透明加 1.5px 邊框，全部 8px 圓角 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.pill, select.pill {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--border); background: transparent; border-radius: var(--r-md);
  padding: 7px 14px; min-height: 40px;
}
.pill:hover { background: rgba(243, 246, 250, 0.06); }
.pill:active { transform: translateY(1px); }
.pill.primary { background: var(--saber); color: var(--on-saber); border-color: var(--saber); font-weight: 600; }
.pill.primary:hover, .pill.primary:active { background: var(--saber-press); border-color: var(--saber-press); }
select.pill { background: var(--surface); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hair); margin: 20px 0 4px; }
.tabs button {
  border: 0; background: none; padding: 10px 12px; font-family: var(--sans); font-size: 15px;
  color: var(--fg-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--fg); border-bottom-color: var(--blade); box-shadow: 0 7px 9px -7px rgba(255, 40, 40, 0.95); font-weight: 600; }

.status { font-family: var(--sans); font-size: 13px; color: var(--fg); background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 10px 12px; margin: 10px 0; line-height: 1.5; }
.status.err { color: #F0B5AD; background: rgba(181, 68, 58, 0.18); }

/* 章節清單 */
.part { font-family: var(--sans); font-size: 12px; color: var(--link); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; margin: 24px 0 4px; }
.ch {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; border-bottom: 1px solid var(--hair); background: none; text-align: left;
  padding: 14px 2px; min-height: 56px;
}
.ch .t { flex: 1; font-size: 16px; line-height: 1.45; }
.ch .d { font-family: var(--sans); font-size: 12px; color: var(--fg-2); flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.ch.unbuilt .t { color: var(--fg-3); }
.ch.skip .t { color: var(--fg-3); opacity: 0.7; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: var(--r-sm, 4px); font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; vertical-align: 2px; border: 1px solid transparent; }
.tag.lv-精讀 { background: var(--saber); color: var(--on-saber); }
.tag.lv-略讀 { color: var(--skim); border-color: rgba(61, 220, 74, 0.55); }
.tag.lv-跳過 { color: var(--fg-3); border-color: var(--hair); font-weight: 500; }
.ch .d .off { color: var(--fg-3); }
.dl-status { color: var(--fg-2); border-style: dashed; }
.ch .why { display: block; margin-top: 4px; font-family: var(--sans); font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--fg-2); }
.plan-sum { margin: -8px 0 12px; }
.ch.current .t { color: var(--saber-text); font-weight: 600; }
/* 每章進度是一支小光劍：白色劍芯加黃色光暈 */
.ch .bar { display: block; height: 2px; background: var(--hair); margin-top: 9px; border-radius: 2px; }
.ch .bar i { display: block; height: 100%; background: var(--blade); border-radius: 0 2px 2px 0; box-shadow: var(--glow); }
.ch.skim .bar i { box-shadow: var(--glow-skim); }
.ch .bar i[style="width:0%"] { box-shadow: none; }
.ch input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--saber); }

/* 劃線清單 */
.hl { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 16px 18px; margin: 12px 0; }
.hl .meta { font-family: var(--sans); font-size: 12px; color: var(--fg-2); margin-bottom: 8px; }
.hl blockquote { margin: 0; font-size: 15px; line-height: 1.75; white-space: pre-wrap; }
.hl blockquote.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hl .thought { margin-top: 12px; padding: 10px 12px; background: rgba(79, 216, 255, 0.06); border: 1px solid rgba(79, 216, 255, 0.28); border-radius: var(--r-md); font-size: 15px; white-space: pre-wrap; }
.hl .thought::before { content: "我的想法"; display: block; font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; color: var(--holo); font-weight: 600; margin-bottom: 4px; }
.hl .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hl .acts button { font-family: var(--sans); font-size: 13px; border: 1.5px solid var(--border); background: none; border-radius: var(--r-md); padding: 5px 12px; }

/* App 畫面分三層：上面導覽列、中間清單自己捲、底部播放器固定在最下面。
   播放器不用 position: fixed，iPhone 捲動或收鍵盤後才不會往上飄 */
body.app { height: 100vh; height: 100dvh; padding-bottom: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.app header.top, body.app .wake { position: relative; flex: none; }
body.app .scroller { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 40px; }

/* 底部播放器 */
.dock {
  position: relative; flex: none; z-index: 10;
  background: #070708; color: var(--fg);
  border-top: 1px solid var(--hair);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 14px 0 calc(12px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-3);
}
.dock .wrap { display: flex; flex-direction: column; gap: 10px; }
.now { font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; font-weight: 600; color: var(--link); display: flex; justify-content: space-between; gap: 8px; }
.now span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now span:last-child { letter-spacing: 0.02em; color: var(--fg-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.sentence { font-size: 16px; line-height: 1.6; min-height: 3.2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sentence-wrap { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.sentence-wrap .sentence { flex: 1; min-width: 0; }
.sentence-wrap svg.i { flex: none; margin-top: 3px; color: var(--fg-3); }
/* 播放進度是一把光劍：左邊劍柄，劍身長度跟著播放進度 */
.saber { display: flex; align-items: center; height: 22px; }
.saber .hilt { flex: none; width: 34px; height: 9px; border-radius: 2px; margin-right: 1px;
  background: linear-gradient(90deg, #3A3A3F 0 5px, transparent 5px), repeating-linear-gradient(90deg, #9C9CA3 0 3px, #55555B 3px 5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.5); }
/* 看得到的劍身維持細細一條；手指按得到的範圍往上下各多 11px，是透明的 */
.saber .track { position: relative; flex: 1; height: 44px; margin: -11px 0; display: flex; align-items: center; touch-action: none; cursor: pointer; }
.scrub { pointer-events: none; }
.saber .track.drag .scrub::-webkit-slider-thumb { transform: scale(1.5); }
.saber .track.drag .scrub::-moz-range-thumb { transform: scale(1.5); }
.saber .track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--hair); border-radius: 2px; }
.saber .track::after { content: ""; position: absolute; left: 0; width: var(--p, 0%); top: 50%; height: 4px; margin-top: -2px; background: var(--blade); border-radius: 0 4px 4px 0; box-shadow: var(--glow); pointer-events: none; }
.scrub { position: relative; z-index: 1; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; }
.scrub::-webkit-slider-runnable-track { height: 22px; background: transparent; }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--blade); box-shadow: var(--glow); transition: transform 0.15s ease; }
.scrub::-moz-range-track { background: transparent; }
.scrub::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--blade); box-shadow: var(--glow); }
.dock.skim .saber .track::after, .dock.skim .scrub::-webkit-slider-thumb { box-shadow: var(--glow-skim); }
.dock.skim .scrub::-moz-range-thumb { box-shadow: var(--glow-skim); }
.ctrl { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctrl button.icon { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--hair); background: transparent; color: var(--fg); display: grid; place-items: center; position: relative; }
.ctrl button.icon:active { background: rgba(243, 246, 250, 0.08); }
.ctrl button.icon .num { position: absolute; font-family: var(--sans); font-size: 8px; font-weight: 600; top: 50%; left: 50%; transform: translate(-50%, -38%); }
.ctrl button.play { width: 60px; height: 60px; background: var(--saber); color: var(--on-saber); border-color: var(--saber); }
.ctrl button.play:active { background: var(--saber-press); }
.ctrl button.play svg.i { width: 26px; height: 26px; }
.ctrl select { flex: none; width: 68px; background: transparent; border: 1.5px solid var(--hair); color: var(--fg); border-radius: var(--r-md); padding: 8px 8px; font-family: var(--sans); font-size: 16px; min-height: 40px; }  /* 小於 16 號 iPhone 點了會自動放大 */
.ctrl select option { color: var(--ink); }
.ctrl select#voice { flex: 0 1 100px; width: auto; min-width: 72px; }  /* 窄螢幕時讓聲音選單縮一點，不要擠出畫面 */
.hl-row { display: flex; gap: 8px; }
.hl-btn {
  width: 100%; min-height: 56px; border: 0; border-radius: var(--r-md);
  background: var(--saber); color: var(--on-saber);
  font-family: var(--sans); font-size: 17px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.hl-btn small { font-weight: 400; font-size: 13px; color: var(--on-saber); opacity: 0.9; }
.hl-btn:active { transform: translateY(1px); background: var(--saber-press); }
.hl-btn.flash { background: var(--blade); box-shadow: var(--glow); }
.hl-row .hl-btn { flex: 1; }
.hl-row .hl-btn.mic { flex: 0 0 104px; flex-direction: column; gap: 2px; background: transparent; color: var(--holo); border: 1.5px solid rgba(79, 216, 255, 0.55); }
.hl-row .hl-btn.mic small { color: var(--holo); opacity: 0.85; }
.hl-row .hl-btn.mic:active { background: rgba(79, 216, 255, 0.1); }
.dock[hidden] { display: none; }

/* 全文頁：像看歌詞，正在唸的那句白色加粗，其他暗下來 */
.reader { position: fixed; inset: 0; z-index: 15; background: var(--bg); color: var(--fg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.reader[hidden] { display: none; }
body.reading { overflow: hidden; }
.rd-top { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid var(--hair); }
.rd-top::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--hair); }
.rd-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--hair); background: transparent; color: var(--fg); display: grid; place-items: center; }
.rd-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rd-sub { display: flex; min-width: 0; font-family: var(--sans); font-size: 13px; line-height: 1.4; white-space: nowrap; }
.rd-sub[hidden] { display: none; }
.rd-sub .up { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); }  /* 擠不下先截上層 */
.rd-sub .sep { flex: none; color: var(--fg-3); padding: 0 6px; }
.rd-sub .cur { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--fg); font-weight: 600; }
.rd-title { display: block; min-width: 0; font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; font-weight: 600; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-body { position: relative; flex: 1; width: 100%; max-width: 680px; margin: 0 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 28px 22px 50vh; }
.rd-body p { margin: 0 0 1.2em; font-size: 21px; line-height: 1.8; }
.rd-body p.hd { margin: 1.8em 0 0.7em; line-height: 1.5; font-weight: 700; }  /* 書裡的小標，排成標題的樣子 */
.rd-body p.hd.l1 { font-size: 24px; }
.rd-body p.hd.l2 { font-size: 21px; }
.rd-body p.hd.l3 { font-size: 19px; }
.rd-body p.hd span:not(.on) { color: var(--fg-2); }
.rd-body span { color: var(--fg-3); transition: color 0.35s ease; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rd-body span.pressing { background: rgba(209, 26, 34, 0.25); border-radius: 3px; }
.rd-body span.on { color: #FFFFFF; font-weight: 700; text-shadow: 0 0 16px rgba(255, 255, 255, 0.22); }
.rd-body span.marked { text-decoration: underline; text-decoration-color: rgba(209, 26, 34, 0.8); text-decoration-thickness: 1.5px; text-underline-offset: 7px; }
.rd-return { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(132px + env(safe-area-inset-bottom)); z-index: 1; border: 0; border-radius: var(--r-pill); padding: 10px 18px; background: var(--saber); color: var(--on-saber); font-family: var(--sans); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-3); white-space: nowrap; }
.rd-return[hidden] { display: none; }
.rd-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: #070708; border-top: 1px solid var(--hair); }
.rd-seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 648px; margin: 0 auto; }
.rd-seek .saber { flex: 1; min-width: 0; }
.rd-el, .rd-left { flex: none; min-width: 44px; font-family: var(--sans); font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rd-left { text-align: right; }
.rd-ctrl { position: relative; justify-content: center; gap: 28px; width: 100%; max-width: 648px; margin: 0 auto; }
.rd-ctrl select.rd-speed { -webkit-appearance: none; appearance: none; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 64px; border-radius: 999px; text-align: center; text-align-last: center; padding: 6px 4px; min-height: 36px; color: var(--fg-2); }
@media (max-width: 420px) {  /* 手機上三顆鈕靠近一點、語速鈕窄一點，跟劃線鈕留出一指的距離 */
  .rd-ctrl { gap: 20px; }
  .rd-ctrl select.rd-speed { width: 52px; padding: 6px 2px; }
}
.ctrl button.icon.hl { border-color: var(--saber); color: var(--saber-text); }
.ctrl button.icon.hl:active { background: rgba(209, 26, 34, 0.15); }
.reader.skim .saber .track::after { box-shadow: var(--glow-skim); }
.rd-foot .track .knob { position: absolute; left: var(--p, 0%); top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--blade); box-shadow: var(--glow); z-index: 1; pointer-events: none; transition: transform 0.15s ease; }
.rd-foot .track.drag .knob { transform: scale(1.5); }
.reader.skim .rd-foot .track .knob { box-shadow: var(--glow-skim); }
.eta { margin-top: -4px; }

/* 劃線面板 */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  background: var(--surface); color: var(--fg);
  border-top: 1px solid var(--hair);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  max-height: 88vh; overflow-y: auto;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-3);
}
.sheet .head { font-family: var(--sans); font-size: 13px; color: var(--fg-2); display: flex; justify-content: space-between; align-items: center; }
.sheet .bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet .sheet-play { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--hair); background: transparent; color: var(--fg); display: grid; place-items: center; }
.sheet .sheet-play:active { background: rgba(243, 246, 250, 0.08); }
.sheet .undo { min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid rgba(209, 26, 34, 0.6); background: transparent; color: var(--saber-text); font-family: var(--sans); font-size: 14px; font-weight: 600; }
.sheet .quote [data-s] { cursor: pointer; }
.sheet .quote [data-s]:active { background: rgba(209, 26, 34, 0.18); border-radius: 3px; }
.sheet .head b { color: #6CC3A0; font-weight: 600; }
.sheet .quote { font-size: 15px; line-height: 1.8; max-height: 38vh; overflow-y: auto; margin: 10px 0; padding: 12px 14px; background: var(--sunken); border-radius: var(--r-md); white-space: pre-wrap; }
.sheet .quote .ctx { color: var(--fg-3); }
.suggest { border: 1.5px solid rgba(255, 40, 40, 0.35); background: rgba(255, 40, 40, 0.06); border-radius: var(--r-md); padding: 10px 12px; font-family: var(--sans); font-size: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.suggest button { flex: none; border: 0; background: var(--saber); color: var(--on-saber); border-radius: var(--r-md); padding: 8px 14px; font-size: 14px; font-weight: 600; }
.adjust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.adjust button { font-family: var(--sans); font-size: 13px; border: 1.5px solid var(--border); background: transparent; border-radius: var(--r-md); padding: 9px 4px; }
.sheet textarea { width: 100%; min-height: 110px; border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; background: var(--sunken); font-size: 16px; line-height: 1.6; resize: vertical; }
.sheet textarea:focus { border-color: var(--saber); outline: none; box-shadow: var(--focus); }
.sheet .row { display: flex; gap: 8px; margin-top: 10px; }
.sheet .row button { flex: 1; min-height: 48px; border-radius: var(--r-md); border: 1.5px solid var(--border); background: transparent; font-family: var(--sans); font-size: 16px; }
.sheet .row button.primary { background: var(--saber); color: var(--on-saber); border-color: var(--saber); font-weight: 600; }
.sheet .row button.mic { background: transparent; color: var(--holo); border-color: rgba(79, 216, 255, 0.55); }
.sheet .countdown { height: 3px; background: var(--blade); box-shadow: var(--glow); border-radius: 0 3px 3px 0; transform-origin: left; }
.hint { font-family: var(--sans); font-size: 12px; color: var(--fg-2); margin-top: 6px; }

.toast { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30; background: var(--saber); color: var(--on-saber); font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 10px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-3); max-width: calc(100% - 32px); }

.wake { position: sticky; top: 0; z-index: 6; background: #141416; color: var(--fg-2); border-bottom: 1px solid var(--hair); font-family: var(--sans); font-size: 13px; padding: 8px 20px; text-align: center; }
.rec { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--holo); box-shadow: 0 0 8px var(--holo); animation: pulse 1.6s ease-in-out infinite; flex: none; }
.rec .time { font-family: var(--sans); font-size: 15px; flex: 1; font-variant-numeric: tabular-nums; }
.rec .lvl { width: 56px; height: 6px; border-radius: 3px; background: var(--hair); overflow: hidden; flex: none; }
.rec .lvl i { display: block; height: 100%; width: 0; background: var(--holo); transition: width 0.1s linear; }
.rec-warn { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--saber-text); margin-top: 8px; }
.rec button { min-height: 48px; border-radius: var(--r-md); border: 0; background: var(--holo); color: var(--ink); font-family: var(--sans); font-size: 16px; padding: 0 18px; }
@keyframes pulse { 50% { opacity: 0.35; } }
a.pill { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
a.pill.primary { color: var(--on-saber); }
