/* 聲稿 — 編輯部／錄音室風格：紙、墨、朱紅 */
:root {
  --paper: #f3eee4;
  --paper-2: #e9e2d4;
  --card: #fbf8f2;
  --ink: #1c1a16;
  --ink-2: #4a463e;
  --ink-3: #8a8478;
  --line: #d9d1c1;
  --accent: #c33f27;
  --accent-ink: #fff;
  --accent-soft: #f4d9cf;
  --teal: #1f5c55;
  --ok: #2f6b3a;
  --warn: #9a6a12;
  --bad: #a3271b;
  --shadow: 0 1px 0 rgba(28, 26, 22, .06), 0 10px 30px -12px rgba(28, 26, 22, .25);
  --radius: 14px;
  --radius-sm: 8px;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spk-0: #c33f27; --spk-1: #1f5c55; --spk-2: #6b4aa3; --spk-3: #a36a12; --spk-4: #2c5e9e; --spk-5: #8a3a6a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15140f; --paper-2: #1d1b16; --card: #201e18; --ink: #efe9dc; --ink-2: #c4bdae; --ink-3: #8b8475;
    --line: #36322a; --accent: #e2593e; --accent-soft: #3e2219; --teal: #5fb3a7; --ok: #79c287; --warn: #e0b04f;
    --bad: #ef7a6c; --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .7);
    --spk-0: #e8735a; --spk-1: #5fb3a7; --spk-2: #a88be0; --spk-3: #e0b04f; --spk-4: #74a7e8; --spk-5: #d987b8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans);
  font-size: 16px; line-height: 1.7; letter-spacing: .01em;
  background-image: radial-gradient(rgba(120, 100, 70, .06) 1px, transparent 1px);
  background-size: 4px 4px;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

/* ---------- 頂部列 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--paper) 86%, transparent); border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-serif); font-weight: 900; font-size: 22px; letter-spacing: .08em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.brand-mark span { display: block; width: 3px; background: #fff; border-radius: 2px; margin: 0 1px; }
.brand-mark { display: flex; align-items: center; justify-content: center; }
.brand-mark span:nth-child(1) { height: 8px; } .brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 11px; } .brand-mark span:nth-child(4) { height: 6px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { text-decoration: none; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.nav a:not(.btn):hover { background: var(--paper-2); color: var(--ink); }
.balance-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--card); }
.balance-chip b { font-family: var(--font-mono); font-weight: 600; }

/* ---------- 按鈕 / 表單 ---------- */
.btn {
  --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--b); background: var(--b); color: var(--paper);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px var(--b); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:focus-visible, .field:focus-visible, select:focus-visible, .seg-text:focus-visible, .icon-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px;
}
.btn.accent { --b: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger { --b: var(--bad); background: transparent; color: var(--bad); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--ink-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

label.lbl { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field, select.field {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--card); transition: border-color .15s;
}
.field:hover { border-color: var(--ink-3); }
.field:focus { border-color: var(--accent); outline: none; }
.form-row { margin-bottom: 16px; }
.form-error { color: var(--bad); font-size: 14px; min-height: 1.4em; margin: 4px 0 0; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }

/* ---------- 首頁 ---------- */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 {
  font-family: var(--font-serif); font-weight: 900; font-size: clamp(42px, 7.2vw, 92px); line-height: 1.08;
  margin: 14px 0 22px; letter-spacing: .02em;
}
.hero h1 em { font-style: normal; color: var(--accent); position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .12em; background: var(--accent); opacity: .25; border-radius: 4px; }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

.studio {
  position: relative; padding: 22px; border-radius: 22px; background: #1c1a16; color: #f3eee4; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); transform: rotate(-1.2deg);
}
.studio::before {
  content: "REC"; position: absolute; top: 18px; right: 20px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .2em; color: #ff7a62; padding-left: 16px;
  background: radial-gradient(circle at 5px 50%, #ff5a3c 4px, transparent 5px);
  animation: blink 1.4s steps(2, start) infinite;
}
@keyframes blink { to { opacity: .25; } }
.studio .wave { display: flex; align-items: center; gap: 3px; height: 70px; margin: 18px 0 16px; }
.studio .wave i { flex: 1; background: linear-gradient(#ff8a70, #c33f27); border-radius: 3px; height: 20%; transform-origin: center; animation: wave 1.6s var(--ease) infinite alternate; }
@keyframes wave { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.studio .lines { font-size: 15px; line-height: 1.8; min-height: 172px; }
.studio .line { display: grid; grid-template-columns: 64px 1fr; gap: 10px; opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.studio .line.on { opacity: 1; transform: none; }
.studio .who { font-family: var(--font-mono); font-size: 12px; padding-top: 3px; }
.studio .who.s0 { color: #ff8a70; } .studio .who.s1 { color: #7fd1c4; }
.studio .caret { display: inline-block; width: 2px; height: 1em; background: #ff8a70; vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2, start) infinite; }

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section h2 { font-family: var(--font-serif); font-weight: 900; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.2; margin: 10px 0 14px; }
.section .sub { color: var(--ink-2); max-width: 40em; margin: 0 0 36px; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento .tile { padding: 26px; position: relative; overflow: hidden; transition: transform .3s var(--ease); }
.bento .tile:hover { transform: translateY(-3px); }
.bento .tile h3 { font-family: var(--font-serif); font-size: 22px; margin: 6px 0 8px; }
.bento .tile p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tile.t-lang { grid-column: span 4; background: var(--accent); color: #fff; border-color: transparent; }
.tile.t-lang p, .tile.t-lang .kicker { color: rgba(255, 255, 255, .85); }
.tile.t-lang .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tile.t-lang .chips span { border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.tile.t-spk { grid-column: span 2; }
.tile.t-yt { grid-column: span 2; }
.tile.t-edit { grid-column: span 2; }
.tile.t-exp { grid-column: span 2; background: var(--teal); color: #fff; border-color: transparent; }
.tile.t-exp p, .tile.t-exp .kicker { color: rgba(255, 255, 255, .85); }
.tile .formats { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.tile .formats span { font-family: var(--font-mono); font-size: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, .16); }
.spk-demo { display: grid; gap: 8px; margin-top: 16px; font-size: 14px; }
.spk-demo div { display: flex; gap: 8px; align-items: baseline; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.steps li { list-style: none; padding: 26px 26px 0 0; position: relative; }
.steps li + li { padding-left: 26px; border-left: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.steps h3 { font-family: var(--font-serif); font-size: 22px; margin: 8px 0 6px; }
.steps p { color: var(--ink-2); margin: 0; font-size: 15px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 10px 0 0; }

.cta-band { background: #1c1a16; color: #f3eee4; border: 1px solid rgba(255,255,255,.08); border-radius: 26px; padding: clamp(32px, 6vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; color: #f3eee4; }
.footer { padding: 36px 0 48px; color: var(--ink-3); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 登入 ---------- */
.auth-page { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 32px 0; }
.auth-card { width: min(420px, 100% - 32px); padding: 32px; }
.auth-card h1 { font-family: var(--font-serif); font-size: 30px; margin: 0 0 6px; }
.tabs { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 999px; margin: 18px 0 24px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- 工作台 ---------- */
.dash { padding: 32px 0 80px; display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.dash h1, .dash h2 { font-family: var(--font-serif); }
.panel { padding: 22px; }
.panel h2 { font-size: 20px; margin: 0 0 14px; }
.drop {
  display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 18px; text-align: center; cursor: pointer;
  background: var(--paper); transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.over { transform: scale(1.01); }
.drop strong { display: block; font-size: 17px; margin: 8px 0 2px; }
.drop small { color: var(--ink-3); }
.drop .file-name { margin-top: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); word-break: break-all; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.progress-up { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; margin-top: 12px; }
.progress-up i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.jobs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.jobs-head h1 { font-size: 30px; margin: 0; }
.job-list { display: grid; gap: 10px; }
.job {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 18px; text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s;
}
a.job:hover { transform: translateX(4px); border-color: var(--ink-3); }
.job .title { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .meta { color: var(--ink-3); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }
.job .side { grid-row: span 2; display: flex; align-items: center; gap: 8px; }
.job .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; margin-top: 6px; }
.job .bar i { display: block; height: 100%; background: var(--accent); transition: width .6s var(--ease); }
.job .err { grid-column: 1 / -1; color: var(--bad); font-size: 14px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.queued { color: var(--ink-3); } .pill.processing { color: var(--warn); } .pill.done { color: var(--ok); } .pill.failed { color: var(--bad); }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-family: var(--font-serif); font-size: 22px; color: var(--ink-2); }
.account { margin-top: 24px; }
.account summary { cursor: pointer; font-weight: 600; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.ledger td, .ledger th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.ledger td.num { text-align: right; font-family: var(--font-mono); }

/* ---------- 編輯器 ---------- */
.ed-top { position: sticky; top: 60px; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ed-top .wrap { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.ed-title { flex: 1 1 280px; font-family: var(--font-serif); font-weight: 900; font-size: 24px; border: 1.5px solid transparent; background: transparent; padding: 4px 8px; border-radius: 8px; min-width: 0; }
.ed-title:hover { border-color: var(--line); }
.ed-title:focus { border-color: var(--accent); outline: none; background: var(--card); }
.save-state { font-size: 13px; color: var(--ink-3); min-width: 64px; }
.save-state.dirty { color: var(--warn); } .save-state.err { color: var(--bad); }
.search { width: 200px; padding: 7px 12px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; padding: 10px; z-index: 40; }
.menu-pop button.item { display: flex; width: 100%; justify-content: space-between; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.menu-pop button.item:hover { background: var(--paper-2); }
.menu-pop .item span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.menu-pop label { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 4px 10px; }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

.ed-body { display: grid; grid-template-columns: 1fr 240px; gap: 28px; padding: 28px 0 160px; align-items: start; }
.speakers-panel { position: sticky; top: 140px; padding: 18px; }
.speakers-panel h3 { margin: 0 0 10px; font-size: 15px; }
.speakers-panel .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.speakers-panel input { padding: 6px 10px; font-size: 14px; }
.speakers-panel .hint { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; line-height: 1.6; }
kbd { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--card); }

.status-box { padding: 40px; text-align: center; }
.status-box .big { font-family: var(--font-serif); font-size: 26px; margin: 10px 0; }
.status-box .bar { height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; max-width: 420px; margin: 18px auto 8px; }
.status-box .bar i { display: block; height: 100%; background: var(--accent); transition: width .6s var(--ease); }

.segs { display: grid; gap: 2px; }
.seg { display: grid; grid-template-columns: 68px 1fr; gap: 14px; padding: 10px 12px; border-radius: 10px; transition: background .2s; position: relative; }
.seg:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.seg.active { background: var(--accent-soft); }
.seg.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.seg.hit .seg-text { box-shadow: inset 0 -2px 0 var(--warn); }
.seg .ts { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); border: 0; background: transparent; cursor: pointer; padding: 4px 0; text-align: left; align-self: start; }
.seg .ts:hover { color: var(--accent); }
.seg .who { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; cursor: pointer; font-weight: 700; font-size: 14px; padding: 2px 0; margin-bottom: 2px; }
.seg .who:hover { text-decoration: underline; }
.seg-text { outline: none; font-size: 17px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; border-radius: 6px; padding: 0 2px; }
.seg-text:focus { background: var(--card); box-shadow: 0 0 0 1.5px var(--line); }

.player {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 35; width: min(820px, 100% - 24px);
  display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 12px; padding: 10px 16px;
  background: #1c1a16; color: #f3eee4; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6);
}
.player .play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.player .play:hover { transform: scale(1.06); }
.player .skip { border: 0; background: transparent; color: #f3eee4; cursor: pointer; font-family: var(--font-mono); font-size: 12px; padding: 6px; border-radius: 6px; }
.player .skip:hover { background: rgba(255, 255, 255, .1); }
.player input[type="range"] { width: 100%; accent-color: var(--accent); }
.player .time { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.player select { background: transparent; color: #f3eee4; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 4px 6px; font-size: 13px; }
.player select option { color: #000; }

/* ---------- 後台 ---------- */
.admin { padding: 28px 0 80px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.stats .card { padding: 16px; }
.stats b { display: block; font-family: var(--font-mono); font-size: 26px; }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.grid th { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .05em; }
table.grid td.num { text-align: right; font-family: var(--font-mono); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); padding: 24px; width: min(440px, 100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20, 18, 14, .45); }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; top: 76px; transform: translate(-50%, -12px); opacity: 0; z-index: 100; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; transition: all .3s var(--ease); pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
  .hero-grid, .dash, .ed-body { grid-template-columns: 1fr; }
  .studio { transform: none; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento .tile { grid-column: span 2 !important; }
  .speakers-panel { position: static; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .steps li { padding-bottom: 20px; }
}
@media (max-width: 560px) {
  .nav a.hide-sm { display: none; }
  .seg { grid-template-columns: 1fr; gap: 0; }
  .player { grid-template-columns: auto 1fr auto; border-radius: 22px; }
  .player .skip, .player select { display: none; }
  .search { width: 100%; order: 5; }
  .opts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .studio .line { opacity: 1; transform: none; }
}

/* 說話者下拉（每句前面） */
select.who { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-weight: 700; font-size: 14px; padding: 2px 16px 2px 0; cursor: pointer; display: block; margin-bottom: 2px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 6px top 55%, right 2px top 55%; background-size: 4px 4px; background-repeat: no-repeat; }
select.who option { color: var(--ink); background: var(--card); }
/* 同一人接著說的句子：名字收在左欄時間碼下面，滑過才顯示，不佔版面 */
select.who.quiet { position: absolute; left: 12px; top: 36px; max-width: 64px; font-size: 12px; opacity: 0; transition: opacity .15s; text-overflow: ellipsis; }
.seg:hover select.who.quiet, .seg:focus-within select.who.quiet, select.who.quiet:focus { opacity: .8; }
@media (max-width: 560px) { select.who.quiet { position: static; opacity: .6; } }

#features { padding-top: clamp(8px, 2vw, 24px); }
