/* 网页版（用户 11-09）：在分享页样式（share.css）上加登录页、「我的转稿记录」表格和编辑状态，结构照 TranscribeLink（video2txt/static/b.css）。 */
:root { --bad: #B42318; --bad-soft: #FDECEC; --ok: #15803D; }
.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; }
.top-acts { display: flex; align-items: center; gap: 8px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.b .btn-danger { background: var(--bad); color: #fff; }
.b .btn-danger:hover { background: #912018; color: #fff; }
.b .btn.danger, .b .act.danger, .b .act.danger svg { color: var(--bad); }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--sheet); font: inherit; font-size: 16px; color: var(--ink); box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08); }
.input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 6px; background: var(--raised); color: var(--ink-2); font-size: 15px; }
.note.bad { background: var(--bad-soft); color: #75211A; }
.note.info { background: var(--accent-soft); color: #1E3A8A; }
.spinner { width: 28px; height: 28px; border: 3px solid #DBE4F3; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 打开详情、回到列表时盖的「正在加载…」（用户 11-10）；列表第一次取记录时表格位置的「正在加载转稿记录…」 */
.page-loading { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(248, 250, 252, .6); animation: fade-in .15s ease-out; }
.page-loading-card { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 8px; background: var(--sheet); color: var(--ink); font-size: 15px; box-shadow: var(--pop); }
.page-loading .spinner, .list-loading .spinner { flex: none; width: 22px; height: 22px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.list-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 72px 24px; color: var(--ink-2); font-size: 15px; }

/* 右上角账号（用户 11-10）：小程序「我的」里的头像（会员金边和皇冠）、名字、用户 ID；点开菜单里「退出登录」 */
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 10px 0 6px; border: 0; border-radius: 999px; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--raised); }
.acct-avatar { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 36px; height: 36px; border-radius: 50%; background: #E8ECF2; }
.acct-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.acct-avatar.member { border: 2px solid #F2AC25; background: #FFF0CC; }
.acct-crown { position: absolute; right: -5px; bottom: -4px; display: flex; align-items: center; justify-content: center; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; background: #FFF0CC; }
.acct-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.acct-text b { font-size: 14px; font-weight: 600; color: var(--ink); }
.acct-text small { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.acct-chevron { flex: none; color: var(--ink-3); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 200px; }

/* 扫码登录 */
.login-main { flex: 1 0 auto; display: flex; justify-content: center; padding: 48px 16px 64px; }
.login-box { width: min(460px, 100%); padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.login-lede { margin-top: -4px; }
.qr-box { position: relative; width: 240px; height: 240px; margin: 8px 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.qr-box img { display: block; width: 220px; height: 220px; }
.qr-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: 6px; background: rgba(255, 255, 255, .96); }
.qr-state b { font-size: 17px; }
.qr-state svg { color: var(--ok); }
.login-steps { margin: 0; padding-left: 20px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.b .login-note { padding-top: 16px; border-top: 1px solid var(--line-soft); text-align: left; }

/* 我的转稿记录：左栏、表格、加载更多、底部已选条 */
.list-main { flex: 1 0 auto; width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.side { flex: 1 1 240px; max-width: 280px; position: sticky; top: 88px; }
/* 左栏照 TranscribeLink 的方案栏（用户 11-10）：剩余积分、会员到期日、「新建转稿」；下面快捷入口和最近的转稿 */
.side-panel { overflow: hidden; }
.side-box { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--ink); color: #fff; }
.side-box .small { color: #CBD5E1; }
.side-credits { font-size: 28px; font-weight: 700; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; }
.side-credits small { font-size: 14px; font-weight: 500; color: #CBD5E1; }
.side-box .btn { margin-top: 6px; }
.side-list { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; }
.side-list .side-h.side-gap { margin-top: 12px; }
.side-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
dialog.dialog.mini-dialog { width: min(460px, calc(100vw - 32px)); }
.mini-code { display: block; width: 100%; height: auto; border-radius: 6px; }
.h4 { font-size: 15px; font-weight: 600; }
.label { display: block; margin: 0; font-size: 14px; font-weight: 500; }
.mono { font-variant-numeric: tabular-nums; }
.b a.act:hover { color: var(--accent); }
.act[aria-current="page"] { background: #EFF6FF; }
.list-col { flex: 999 1 720px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.list-title { display: flex; flex-direction: column; gap: 4px; }
/* 「我的转稿记录」几个字小一点、列表里的标题大一点（用户 11-10） */
.list-title .h1 { font-size: 26px; line-height: 1.3; }
.tbl .title-cell .name { font-size: 16px; }
.tbl-box { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 12px; text-align: left; font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.tbl td { padding: 12px; border-top: 1px solid var(--line-soft); vertical-align: middle; transition: background-color .12s; }
.tbl tr.sel td { background: #F4F8FF; }
.tbl tr.go { cursor: pointer; }
@media (hover: hover) { .tbl tbody tr:not(.sel):hover td { background: var(--sunk); } }
.tbl input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.tbl .c-pick { width: 44px; padding-left: 20px; }
/* 标题最多一行，放不下末尾显示「…」（用户 11-10）；max-width: 0 让这一列只占剩下的宽度，不被长标题撑开 */
.tbl .title-cell { width: 100%; max-width: 0; min-width: 220px; }
.tbl .title-cell .name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tbl .title-cell a { color: var(--ink); text-decoration: none; font-weight: 500; }
.tbl .title-cell a:hover { color: var(--accent); text-decoration: underline; }
.tbl .title-cell .sub { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.tbl td.c-src, .tbl td.c-dur, .tbl td.c-when { white-space: nowrap; color: var(--ink-2); }
.tbl .c-st { width: 1%; white-space: nowrap; }
.tbl .c-act { width: 1%; padding-left: 0; padding-right: 12px; text-align: right; }
.tbl .m-meta { display: none; }
/* 状态照 TranscribeLink（用户 11-10）：转圈、绿勾、红叉，鼠标停上去（手机上点一下）看说明 */
.stt { position: relative; display: inline-flex; align-items: center; }
.sti { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: help; }
.sti:hover { background: var(--sunk); }
.tip { display: none; position: absolute; right: calc(100% + 10px); top: 50%; z-index: 6; width: max-content; max-width: 300px; padding: 12px 18px; border-radius: 6px; background: var(--sheet); color: var(--ink); font-size: 15px; line-height: 1.5; text-align: left; white-space: normal; transform: translateY(-50%); box-shadow: var(--pop); }
.tip::after { content: ''; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; background: var(--sheet); border-radius: 1px; transform: translateY(-50%) rotate(45deg); box-shadow: 3px -3px 6px rgba(16, 24, 40, .06); }
.tip small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.stt:hover .tip, .stt:focus-within .tip { display: block; }
.spin { animation: spin 1s linear infinite; transform-origin: 50% 50%; }
/* 每行「…」：点开菜单（导出、下载音频、重命名、删除），照 TranscribeLink */
.dots { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.dots:hover, .dots[aria-expanded="true"] { background: #E2E8F0; }
.dots[disabled] { opacity: .35; cursor: not-allowed; }
.menu { min-width: 200px; padding: 6px; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--pop); }
.pop { position: fixed; z-index: 45; width: 220px; }
.mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.b .mi:hover, .mi:focus-visible { background: var(--sunk); color: var(--ink); }
.mi svg { color: var(--ink-2); }
.mi small { display: block; color: var(--ink-3); font-size: 12px; }
.b .mi.danger, .b .mi.danger svg { color: var(--bad); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.list-more { align-self: center; }
.selbar { position: sticky; bottom: 24px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(480px, calc(100% - 32px)); margin: 0 auto 24px; padding: 10px 10px 10px 20px; border-radius: 6px; background: var(--sheet); border: 1px solid var(--line-soft); box-shadow: var(--pop); }

/* 底部已选条：「删除」右边是「导出」 */
.sel-acts { display: inline-flex; gap: 8px; }
/* 导出弹窗照 TranscribeLink：一行一种格式（图标、名称、说明），「设置」里加时间码；手机上两列、不显示图标和说明 */
dialog.dialog.wide { width: min(520px, calc(100vw - 32px)); padding: 32px 32px 28px; }
.tl-export .export-head { display: flex; flex-direction: column; gap: 6px; }
.tl-export .fmts { margin: 4px -12px 0; padding: 0; border: 0; min-width: 0; }
.tl-export .fmts + .fmts { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.tl-export .fmt { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 12px; border: 0; border-radius: 4px; cursor: pointer; }
.tl-export .fmt:hover { background: var(--sunk); }
.tl-export .fmt:has(input:checked) { background: transparent; }
.tl-export .fmt.off { opacity: .5; cursor: not-allowed; }
.tl-export .fmt svg { color: var(--ink-2); }
.tl-export .fmt b { font-weight: 500; font-size: 16px; color: var(--ink); }
.tl-export .fmt small { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.4; }
.tl-export .fmts legend.side-h { padding: 4px 12px 6px; }
.tl-export .export-go { margin-top: 20px; }
.tl-export .export-note { margin-top: 10px; text-align: center; }

/* 转稿详情：返回、处理中的三步、失败、编辑状态（照 TranscribeLink） */
.b .back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; color: var(--ink-2); text-decoration: none; }
.b .back:hover { color: var(--accent); }
/* 详情标题小一号（用户 11-10：太大） */
.doc-page .doc .h1 { font-size: 26px; line-height: 1.35; }
/* 编辑时改过、还没保存的句子下面划线 */
.tx .sent.edited { text-decoration: underline; text-decoration-color: #93C5FD; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.working, .failed { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.failed { gap: 16px; }
.failed-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 6px; border-radius: 3px; background: var(--accent); }
.bar.flow i { width: 35%; animation: bar-flow 1.4s ease-in-out infinite; }
@keyframes bar-flow { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.steps { display: flex; flex-direction: column; margin: 12px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; color: var(--ink-3); }
.steps li.done, .steps li.now { color: var(--ink); }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--sheet); }
.dot.done { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 4px var(--sheet); }
.dot.now { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--sheet); }
.edit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 24px; padding: 8px 8px 8px 16px; border-radius: 6px; background: var(--accent-soft); color: #1E3A8A; font-size: 14px; position: sticky; top: 72px; z-index: 10; }
.edit-hint { display: inline-flex; align-items: center; gap: 10px; }
.edit-acts { display: flex; flex: none; gap: 8px; margin-left: auto; }
.tx.editing .sent { cursor: pointer; }
.tx.editing .sent:hover { background: #E9EDF2; }
/* 编辑时鼠标停在一句上冒出的「编辑 时间」小按钮 */
.edit-pill { position: absolute; z-index: 15; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--sheet); color: var(--ink); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; box-shadow: var(--pop); }
.edit-pill:hover { background: var(--raised); }
.seg-title { display: flex; align-items: center; gap: 10px; }
.seg-form { display: flex; flex-direction: column; gap: 12px; }
.seg-dialog .seg-text { height: auto; min-height: 180px; padding: 12px 14px; line-height: 1.7; resize: vertical; }
dialog.dialog.seg-dialog { width: min(600px, calc(100vw - 32px)); }
/* 查找与替换：不挡文稿的小窗，钉在右上角；找到的标黄，当前这处标橙 */
dialog.dialog.find-dialog { position: fixed; z-index: 40; inset: 136px 24px auto auto; margin: 0; width: min(380px, calc(100vw - 32px)); padding: 20px; gap: 12px; border: 1px solid var(--line-soft); box-shadow: var(--pop); }
.find-form { display: flex; flex-direction: column; gap: 8px; }
.find-form .label { margin-top: 4px; }
.find-status { min-height: 21px; margin: 0; }
.find-btns { display: flex; gap: 8px; }
.find-btns .btn { flex: 1; padding: 0 10px; }
::highlight(find-hit) { background-color: #FDE68A; }
::highlight(find-now) { background-color: #F59E0B; color: #fff; }
/* 播放器：音量、静音、齿轮打开倍速（照 TranscribeLink）；倍速菜单开着时下面垫透明遮罩 */
.doc-page .gear { width: 36px; min-width: 0; padding: 0; border: 0; }
.doc-page .gear[aria-expanded="true"] { background: var(--accent); color: #fff; }
.vol { width: 110px; margin: 0; accent-color: var(--accent); }
.spmask { position: fixed; inset: 0; -webkit-tap-highlight-color: transparent; }
.dock.menu-open { z-index: 50; }
.only-m { display: none; }
/* 电脑上提示条放在播放器上面，不挡播放按钮 */
@media (min-width: 721px) { .doc-page .toasts { bottom: 96px; } }

/* 转稿详情（电脑宽度）：左栏、正文、右栏三列，左右栏钉在顶部栏下面，内容比窗口长时在自己里面滚 */
@media (min-width: 1081px) {
  .tbl-box { overflow: visible; }
  .doc-page .doc-main { max-width: 1680px; flex-wrap: nowrap; padding: 24px 48px 80px; }
  .doc-page .side, .doc-page .ops { position: sticky; top: 88px; max-height: calc(100vh - 88px - 92px); }
  .doc-page .side { display: flex; flex: 0 0 240px; max-width: none; flex-direction: column; }
  .doc-page .side > .panel { min-height: 0; overflow-y: auto; }
  .doc-page .ops { flex: 0 0 225px; overflow-y: auto; }
  .doc-page .doc { padding-left: 40px; padding-right: 40px; }
}
@media (max-width: 1080px) {
  .side { position: static; max-width: none; flex-basis: 100%; }
  .doc-page .side { display: none; }
}
@media (max-width: 720px) {
  .only-wide { display: none; }
  dialog.dialog.wide { padding: 24px; }
  .tl-export .fmt-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
  .tl-export .fmt-list .fmt { min-height: 44px; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); }
  .tl-export .fmt-list .fmt:has(input:checked) { border-color: var(--accent); background: #F4F8FF; }
  .tl-export .fmt-list .fmt svg, .tl-export .fmt-list .fmt small { display: none; }
  .tl-export .fmt-list .fmt b { font-size: 15px; }
  .tl-export .fmt-list + .fmts { margin: 12px 0 0; padding-top: 4px; }
  .tl-export .fmt-list + .fmts .fmt { padding-left: 0; padding-right: 0; min-height: 44px; }
  .tl-export .fmt-list + .fmts legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tl-export .export-go { margin-top: 12px; }
  .tl-export .export-go .btn-lg { height: 48px; }
  .selbar { padding-left: 14px; }
  .login-main { padding: 24px 16px 40px; }
  .login-box { padding: 28px 20px; }
  .list-main { padding: 16px 12px 40px; gap: 16px; }
  .side { display: none; }
  .list-head { flex-direction: column; align-items: stretch; gap: 12px; }
  /* 手机上表格变成一张张卡片（照 TranscribeLink）：勾选、标题（最多两行）、状态图标、「…」一行，标题下面一行来源 · 时长 · 时间 */
  .tbl thead { display: none; }
  .tbl, .tbl tbody { display: block; }
  .tbl tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 36px; align-items: center; gap: 0 8px; padding: 12px 8px 12px 12px; border-top: 1px solid var(--line-soft); }
  .tbl tr:first-child { border-top: 0; }
  .tbl td { padding: 0; border: 0; }
  .tbl .c-pick { padding: 0; }
  .tbl .title-cell { min-width: 0; max-width: none; }
  .tbl td.c-act { padding: 0; }
  .tbl td.c-src, .tbl td.c-dur, .tbl td.c-when, .tbl .title-cell .sub { display: none; }
  .tbl .m-meta { display: block; margin-top: 2px; overflow: hidden; font-size: 13px; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
  .tbl .sti { width: 32px; height: 32px; }
  /* 选中的一行整行变蓝（格子各自上色会一块一块的） */
  .tbl tr.sel td { background: transparent; }
  .tbl tr.sel { background: #F4F8FF; }
  .tip { right: auto; left: auto; top: auto; bottom: calc(100% + 8px); transform: translateX(-70%); max-width: min(300px, 80vw); }
  .tip::after { display: none; }
  .selbar { bottom: 12px; }
  .edit-bar { top: 64px; }
  dialog.dialog.find-dialog { inset: 72px 16px auto 16px; width: auto; }
  .doc-page .doc .h1 { font-size: 21px; }
  .list-title .h1 { font-size: 22px; }
  .tbl .title-cell .name { font-size: 15px; }
  /* 手机上顶部放得下「转稿小工具」和账号：账号那块收紧一点，品牌名不换行；太窄时只留图标 */
  .top { gap: 8px; }
  .top .brand { flex: none; white-space: nowrap; font-size: 17px; }
  .acct { min-width: 0; }
  .acct-btn { gap: 6px; max-width: 100%; height: 44px; padding: 0 8px 0 4px; }
  .acct-avatar { width: 32px; height: 32px; }
  .acct-text b { font-size: 13px; }
  .acct-text small { overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
  .acct-chevron { display: none; }
  .only-m { display: inline; }
  .doc-page .gear { width: auto; padding: 0 10px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
  .doc-page .gear svg { display: none; }
  .vol, .mute { display: none; }
}
@media (max-width: 370px) {
  .top .brand span { display: none; }
}
