/* Verbatimly — 单页转录工具站。纸白底、墨黑字、teal 单一强调色，Schibsted Grotesk 本地托管。 */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
}

:root {
  --paper: #f6f5f2;
  --ink: #101010;
  --muted: #6d6d6d;
  --field: #eceae4;
  --field-2: #e4e1da;
  --accent: #0f766e;
  --accent-soft: #e6f2f0;
  --dark: #141414;
  --dark-ink: #f6f5f2;
  --radius: 8px;
  --pill: 999px;
  --pad: 36px;
}

* { box-sizing: border-box; }
/* 作者样式里的 display 会覆盖 UA 的 [hidden]{display:none}，这里统一钉死 */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }

/* top */
.top { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; font-size: 15px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 20px; letter-spacing: -.03em; }
.brand .logo { width: 25px; height: 25px; color: var(--ink); }
.top nav { display: flex; gap: 26px; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* poster */
.poster { padding: 34px 0 0; }
h1 { margin: 0; font-weight: 600; letter-spacing: -.045em; line-height: .96; font-size: clamp(42px, 7.1vw, 102px); }
h1 .ln { display: block; white-space: nowrap; }

/* 标题里的真实字幕条：时间码 + 一句字幕 + 闪烁光标 */
.slot {
  display: inline-flex; align-items: center; letter-spacing: 0;
  width: 5.55em; height: .86em; background: #fff; border-radius: 16px;
  padding: 0 .4em; gap: .28em; vertical-align: baseline; position: relative; top: -.02em;
  overflow: hidden; margin: 0 .06em; box-shadow: 0 0 0 1px #dedbd2;
}
.slot .tc {
  font-size: .17em; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums;
  background: var(--accent-soft); padding: .12em .42em; border-radius: 6px; flex: 0 0 auto;
}
.slot .tx { font-size: .17em; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; transition: opacity .18s; }
.slot .tx.swap { opacity: 0; }
.slot .caret {
  display: inline-block; flex: 0 0 auto; font-size: .17em; width: .11em; height: 1.15em;
  background: var(--accent); border-radius: 1px; margin-left: .16em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.sub { margin: 20px 0 0; font-size: 19px; color: var(--muted); max-width: 62ch; line-height: 1.45; }

/* upload band */
.drop {
  margin: 26px 0 0; background: var(--dark); color: var(--dark-ink); border-radius: var(--radius);
  padding: 40px 44px; display: flex; align-items: center; gap: 28px; cursor: pointer;
  transition: background .15s;
}
.drop:hover, .drop:focus-visible { background: #000; outline: none; }
.drop.dragging { background: var(--accent); }
.drop .arrow { flex: 0 0 auto; width: 34px; height: 34px; opacity: .9; }
.drop .ask { font-size: 27px; font-weight: 500; letter-spacing: -.02em; }
.drop .ask u { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.drop.dragging .ask u { text-decoration-color: #fff; }
.drop .drop-formats { margin-left: auto; font-size: 14px; color: #9a9a9a; text-align: right; line-height: 1.55; }
.quota { margin: 12px 0 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quota b { color: var(--ink); font-weight: 500; }
.quota a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.quota .paid-badge { color: var(--accent); font-weight: 500; }
.quota-note { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.quota-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.quota a:hover { color: var(--accent-ink, #0d5f59); }

/* turnstile 挂载点：必须始终可见，空时高度 0 */
.ts-slot { display: flex; justify-content: center; margin-top: 14px; }

/* progress */
.prog { margin: 24px 0 0; max-width: 620px; }
.prog-text { margin: 0 0 12px; font-size: 15.5px; color: var(--muted); line-height: 1.5; }
.prog-text.err { color: #b4342c; }
.prog-bar { height: 4px; border-radius: 2px; background: var(--field-2); overflow: hidden; }
.prog-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }

/* 付费入口与提示 */
.notice { margin: 18px 0 0; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-soft); color: #0b5f59; font-size: 15px; }
.notice.err { background: #fbe9e7; color: #b4342c; }
.buy {
  margin: 20px 0 0; padding: 26px 28px; background: #fff; border-radius: var(--radius);
  box-shadow: 0 0 0 1px #dedbd2; display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.buy p { margin: 0; font-size: 16px; color: var(--muted); flex: 1 1 320px; }
.buy-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.buy-btn {
  background: var(--accent); color: #fff; border: 0; border-radius: var(--pill);
  font: inherit; font-size: 16px; font-weight: 500; padding: 14px 26px; cursor: pointer;
}
.buy-btn:hover { background: #0b5f59; }
.buy-btn:disabled { background: #9bbdb9; cursor: default; }
.buy-alt { font-size: 14px; color: var(--muted); }

/* record sample */
.record { margin: 84px 0 0; background: var(--field); border-radius: var(--radius); padding: 0 0 10px; overflow: hidden; }
.rhead { display: flex; gap: 28px; padding: 14px 22px; font-size: 12px; letter-spacing: .08em; color: var(--muted); background: var(--field-2); font-variant-numeric: tabular-nums; }
.rhead .r { margin-left: auto; }
.rlines { padding: 10px 22px 4px; }
.rline { display: grid; grid-template-columns: 78px 30px 1fr; gap: 14px; padding: 11px 0; align-items: baseline; }
.rline + .rline { border-top: 1px solid #dedbd2; }
.tc { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 500; }
.no { font-size: 13px; color: #b3afa4; font-variant-numeric: tabular-nums; text-align: right; }
.rline p { margin: 0; font-size: 16.5px; line-height: 1.5; }
.rline p em { font-style: normal; background: #dcd8cd; border-radius: 3px; padding: 0 3px; }
.rfoot { display: flex; gap: 18px; padding: 12px 22px 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* facts */
.facts { margin: 130px 0 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; }
.lede { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; margin: 0; }
.lede em { font-style: normal; color: var(--accent); }
.flist { display: flex; flex-direction: column; gap: 0; }
.f { padding: 26px 0; display: grid; grid-template-columns: 110px 1fr; gap: 28px; align-items: baseline; }
.f + .f { border-top: 1px solid #e2dfd7; }
.f b { font-size: 40px; font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.f p { margin: 0; font-size: 17.5px; color: var(--muted); max-width: 52ch; }
.f p strong { color: var(--ink); font-weight: 500; }

/* formats table */
.formats { margin: 120px 0 0; }
.formats h2, .uses h2, .faq h2, .tools h2 {
  font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.04em; margin: 0 0 40px; font-weight: 600; line-height: 1.05;
}
.formats table { width: 100%; border-collapse: collapse; font-size: 16px; }
.formats th, .formats td { text-align: left; padding: 14px 12px; border-bottom: 1px solid #e2dfd7; }
.formats thead th { color: var(--muted); font-weight: 500; font-size: 14px; }
.formats tbody th { font-weight: 500; white-space: nowrap; }

/* uses */
.uses { margin: 120px 0 0; }
.uses ul { padding: 0; margin: 0; list-style: none; }
.uses li { font-size: 17.5px; color: var(--muted); padding: 18px 0; max-width: 72ch; }
.uses li + li { border-top: 1px solid #e2dfd7; }
.uses strong { color: var(--ink); font-weight: 500; }

/* 内容区块：SRT/VTT 与 YouTube 步骤 */
.guide { margin: 110px 0 0; }
.guide h2 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.04em; margin: 0 0 30px; font-weight: 600; line-height: 1.1; }
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.guide-cols h3 { font-size: 19px; margin: 0 0 10px; font-weight: 600; }
.guide-cols p { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.guide-note { margin: 26px 0 0; font-size: 16px; color: var(--muted); max-width: 72ch; line-height: 1.6; }
.steps { margin: 0; padding-left: 22px; }
.steps li { font-size: 16.5px; color: var(--muted); margin-bottom: 12px; max-width: 72ch; line-height: 1.6; }

/* faq */
.faq { margin: 120px 0 0; }
.q { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px; padding: 28px 0; align-items: baseline; }
.q + .q { border-top: 1px solid #e2dfd7; }
.q h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.q p { margin: 0; color: var(--muted); font-size: 17px; }

/* tools */
.tools { margin: 120px 0 0; }
.tool-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tool-list a { display: inline-block; padding: 12px 22px; border-radius: var(--pill); background: var(--field); font-size: 15px; }
.tool-list a:hover { background: var(--accent-soft); color: var(--accent); }
.tools-note { font-size: 14px; color: var(--muted); margin: 16px 0 0; }

/* video to mp3 结果卡片 */
.mp3-result { margin: 26px 0 0; }
.mp3-card {
  background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 1px #dedbd2;
  padding: 22px 26px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.mp3-info { flex: 1 1 260px; }
.mp3-name { margin: 0 0 6px; font-size: 17px; font-weight: 500; word-break: break-all; }
.mp3-meta { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp3-dl {
  background: var(--accent); color: #fff; border-radius: var(--pill);
  padding: 17px 34px; font-size: 17px; font-weight: 500; display: inline-block;
}
.mp3-dl:hover { background: #0b5f59; }
.mp3-again { margin: 14px 0 0; font-size: 14px; }
.mp3-again a, .crosslink a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crosslink { margin: 96px 0 0; padding: 28px 0 8px; }
.crosslink p { margin: 0; font-size: 19px; color: var(--muted); }

/* 工具矩阵 */
.tools { margin: 110px 0 0; }
.tools h2 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.04em; margin: 0 0 26px; font-weight: 600; }
.tool-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tool-list a { display: inline-block; padding: 12px 22px; border-radius: var(--pill); background: var(--field); font-size: 15px; }
.tool-list a:hover { background: var(--accent-soft); color: var(--accent); }

/* 法务页 */
.legal-body { max-width: 760px; padding-top: 44px; }
.legal-body h1 { font-size: clamp(34px, 4.2vw, 52px); letter-spacing: -.04em; line-height: 1.04; margin: 0 0 10px; }
.legal-body .updated { color: var(--muted); font-size: 14px; margin: 0 0 42px; }
.legal-body h2 { font-size: 21px; letter-spacing: -.02em; margin: 38px 0 12px; font-weight: 600; }
.legal-body p, .legal-body li { font-size: 16.5px; line-height: 1.62; color: #2a2a2a; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { padding-left: 20px; margin: 0 0 14px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* footer */
.foot { margin-top: 130px; background: var(--dark); color: var(--dark-ink); border-radius: var(--radius) var(--radius) 0 0; }
.foot .in { display: flex; justify-content: space-between; align-items: flex-end; padding: 52px var(--pad) 34px; max-width: 1240px; margin: 0 auto; }
.foot .name { font-size: clamp(40px, 7vw, 92px); font-weight: 600; letter-spacing: -.05em; line-height: .9; }
.foot .small { font-size: 13px; color: #9a9a9a; max-width: 360px; text-align: right; line-height: 1.7; }

/* ===== result view ===== */
#resultView { display: none; }
body.result #uploadView { display: none; }
body.result #resultView { display: block; }

.rv { padding: 26px 0 0; }
.rvhead { display: flex; align-items: center; gap: 18px; }
.rvhead h2 { font-size: clamp(30px, 3.4vw, 46px); margin: 0; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.04em; font-weight: 600; }
.rvhead .sp { flex: 1; }
.btn {
  border: 0; border-radius: var(--pill); font: inherit; font-size: 15px; font-weight: 500;
  padding: 11px 20px; cursor: pointer; background: var(--field); color: var(--ink); transition: background .15s;
}
/* New file 是结果页的主要动作，比工具栏按钮大一号 */
.rvhead .btn { padding: 15px 30px; font-size: 17px; }
.btn:hover { background: #dcd8ce; }
.rvsum { color: var(--muted); font-size: 15px; margin: 12px 0 0; font-variant-numeric: tabular-nums; }

.wavebox { margin: 30px 0 0; background: var(--field); border-radius: var(--radius); padding: 22px 28px 18px; }
.wave-wrap { position: relative; }
.wave { display: block; width: 100%; height: 88px; cursor: pointer; }
.wave-mask { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(236, 234, 228, .55); pointer-events: none; opacity: 0; transition: opacity .25s; }
.wave-wrap.played .wave-mask { opacity: 1; }
.playhead { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--accent); border-radius: 1px; pointer-events: none; }
.pbar { display: flex; align-items: center; gap: 16px; margin-top: 14px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.playbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--dark); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
/* SVG 不认 hidden 属性，用 class 控制播放/暂停图标 */
.playbtn #iconPause { display: none; }
.playbtn.playing #iconPlay { display: none; }
.playbtn.playing #iconPause { display: block; }
.playbtn svg { width: 16px; height: 16px; fill: var(--dark-ink); }
.playbtn #iconPlay { margin-left: 2px; }
.playbtn:hover { background: #000; }
.time { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 17px; }
.jump-hint { margin-left: auto; }

.toolbar { display: flex; align-items: center; gap: 10px; margin: 30px 0 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; margin-right: auto; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .box { width: 18px; height: 18px; border-radius: 5px; background: var(--accent); display: grid; place-items: center; transition: background .15s; }
.toggle .box svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 2.4; transition: opacity .15s; }
.toggle:has(input:not(:checked)) .box { background: #dad7cf; }
.toggle:has(input:not(:checked)) .box svg { opacity: 0; }

.tp { background: #fff; border-radius: var(--radius); padding: 12px 0; outline: none; }
.tp:focus, .tp:focus-visible { outline: none; }
.trow { display: grid; grid-template-columns: 34px 84px 1fr; gap: 12px; padding: 13px 26px; align-items: baseline; }
.spk {
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: #9a9a9a;
  background: #f0efea; border-radius: 6px; padding: 3px 0; text-align: center;
  cursor: pointer; user-select: none; transition: background .12s, color .12s;
}
.spk:hover { background: #e4e2da; color: var(--ink); }
.spk.on { color: #fff; background: var(--accent); }
.btn.share { display: inline-flex; align-items: center; gap: 6px; }
.btn.share svg { width: 14px; height: 14px; }
.share-wrap { position: relative; display: inline-block; }
.share-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 100;
  background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  padding: 6px; min-width: 190px;
}
.share-pop a, .share-pop button {
  display: block; width: 100%; text-align: left; padding: 11px 14px; border-radius: 6px;
  font: inherit; font-size: 15px; color: var(--ink); background: none; border: 0; cursor: pointer;
}
.share-pop a:hover, .share-pop button:hover { background: var(--field); }
.trow.cur { background: #f0f6f5; }
.trow .t { font-size: 13.5px; color: var(--accent); font-variant-numeric: tabular-nums; cursor: pointer; font-weight: 500; }
.trow .t:hover { text-decoration: underline; text-underline-offset: 3px; }
.trow .t.hide { visibility: hidden; }
.trow p { margin: 0; font-size: 17px; line-height: 1.55; }
.trow p:focus { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.edithint { text-align: right; font-size: 13px; color: #9a9a9a; margin: 14px 0 0; }

@media (max-width: 900px) {
  :root { --pad: 20px; }
  .top nav { display: none; }
  .poster { padding-top: 26px; }
  .sub { font-size: 17px; }
  .slot { width: 2.6em; }
  .slot .tx { display: none; }
  .slot .tc { font-size: .2em; }
  .drop { flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px 24px; }
  .drop .ask { font-size: 22px; }
  .drop .formats { margin: 0; text-align: left; }
  .guide-cols { grid-template-columns: 1fr; gap: 24px; }
  .facts, .q { grid-template-columns: 1fr; gap: 26px; }
  .f { grid-template-columns: 84px 1fr; gap: 18px; }
  .rline { grid-template-columns: 64px 1fr; }
  .rline .no { display: none; }
  .rhead { gap: 14px; font-size: 11px; letter-spacing: .04em; padding: 12px 16px; }
  .rhead span:nth-child(2), .rhead span:nth-child(3) { display: none; }
  .rfoot { padding: 10px 16px 4px; gap: 12px; font-size: 12px; }
  .trow { grid-template-columns: 30px 78px 1fr; gap: 8px; }
  .trow .t { white-space: nowrap; font-size: 12.5px; }
  .trow p { font-size: 16px; }
  .toolbar .btn { padding: 10px 16px; font-size: 14px; }
  .foot .in { flex-direction: column; align-items: flex-start; gap: 26px; }
  .foot .small { text-align: left; }
  .rvhead h2 { max-width: 60%; }
  .wavebox { padding: 18px 18px 16px; }
  .trow { grid-template-columns: 66px 1fr; padding: 13px 18px; }
  .jump-hint { display: none; }
}
