/* ==== 2026-12-03 底栏五键：情报 · 工具箱 · 【听译】 · 急救 · 我的；听译居中、略大 ==== */
#mainNav.nav-5 .main-nav-item { flex: 1 1 0; min-width: 0; }
#mainNav .main-nav-sos .sos-shield { width: 22px; height: 24px; }
html.theme-light #mainNav .main-nav-sos .sos-shield path { fill: #7a1f1f; stroke: #7a1f1f; }
#mainNav { overflow: visible; }
#mainNav .main-nav-tingyi { gap: 2px; justify-content: flex-end; overflow: visible; }
#mainNav .main-nav-tingyi .tingyi-nav-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-top: -14px; border-radius: 50%;
  background: var(--gold-fill, #c9a45a); color: var(--gold-ink, #1a1408);
  box-shadow: 0 0 0 4px var(--bg-nav, var(--bg-2, #16161c));
}
#mainNav .main-nav-tingyi .tingyi-nav-ic svg { width: 22px; height: 22px; }
#mainNav .main-nav-tingyi .nav-label { font-weight: 600; }
#mainNav .main-nav-tingyi.on, #mainNav .main-nav-tingyi[aria-current="page"] { color: var(--text, #f4f1ea); }
#mainNav .main-nav-tingyi:active .tingyi-nav-ic { transform: scale(.96); }

.header-aside { display: flex; align-items: center; }
#headerWordmark { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* 听译面板：顶到视口顶、底贴底栏，底栏五键仍可见可点 */
html.ty-open #mainNav { z-index: 25; position: relative; }
/* visual-v2 clips every sheet's bottom 60px to show the nav; typo already stops above the nav, so do not clip its dock */
html[data-tab]:not(.kb-typing) body > #tingyiSheet.sheet,
html.ty-open body > #tingyiSheet.sheet { padding-bottom: 0; clip-path: none; }
/* typo is a sibling overlay; hide #app chrome so home welcome/composer cannot paint over typo-dock */
html.ty-open #app > :not(#mainNav) { visibility: hidden; pointer-events: none; }
html.ty-open #composer,
html.ty-open #trialHint { display: none !important; }
#tingyiSheet.sheet {
  top: 0;
  left: 0; right: 0;
  height: calc(100dvh - var(--ty-nav-h, 56px));
  max-height: calc(100dvh - var(--ty-nav-h, 56px));
  padding: 0;
  background: var(--card, #f1eee9);
  justify-content: stretch;
  align-items: stretch;
}
#tingyiSheet.sheet::before,
#tingyiSheet.sheet::after { content: none; display: none; flex: none; min-height: 0; max-height: 0; }
#tingyiSheet .tingyi-card,
#tingyiSheet .sheet-card.tingyi-card {
  display: flex; flex-direction: column;
  width: 100%; max-width: none;
  height: 100%; max-height: none;
  margin: 0; border-radius: 0;
  padding: 0; overflow: hidden;
  background: var(--card, #f1eee9);
}
#tingyiSheet .sheet-head-bar {
  min-height: 0; height: 0; margin: 0; padding: 0;
  overflow: visible; background: transparent; border-radius: 0;
}
#tingyiSheet .sheet-head-bar .sheet-close {
  position: absolute; right: 8px; top: 8px; margin: 0;
}
html.sheet-kb #tingyiSheet.sheet {
  height: calc(100dvh - var(--ty-nav-h, 56px));
  max-height: calc(100dvh - var(--ty-nav-h, 56px));
  top: 0; padding: 0; justify-content: stretch; align-items: stretch;
}
html.sheet-kb #tingyiSheet .tingyi-card,
html.sheet-kb #tingyiSheet .sheet-card.tingyi-card {
  width: 100%; height: 100%; max-height: none;
  flex: 1 1 auto; margin: 0; border-radius: 0;
}
#tingyiSheet .sheet-body { flex: 1 1 auto; min-height: 0; height: 100%; display: flex; flex-direction: column; padding: 0 12px; overflow: hidden; background: inherit; }
.ty { --ty-line: var(--border-hairline, rgba(255,255,255,.10)); --ty-card: var(--card, #1c1c22); --ty-aux: var(--text-aux, #a7a39a); --ty-text: var(--text, #f4f1ea); --ty-muted: var(--muted, #c9c4bb); --ty-acc: var(--gold-fill, #c9a45a); --ty-acc-ink: var(--gold-ink, #1a1408);
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; color: var(--ty-text); background: inherit; }
.ty-head { display: flex; align-items: center; gap: 8px; min-height: 36px; margin: 4px 44px 2px 0; }
.ty-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-title, 16px); line-height: 1.35; font-weight: 700; color: var(--ty-text); outline: none; }
.ty-title-main { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-head-icons { flex: none; display: flex; gap: 4px; max-width: 58%; }
.ty-mode-pill { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-text); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .01em; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.ty-mode-pill:active { transform: scale(.98); }
.ty-subrow { display: flex; align-items: center; gap: 8px; min-height: 24px; margin: 0 44px 4px 0; }
.ty-subrow .ty-title-sub { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-caption, 11px); font-weight: 400; color: var(--ty-aux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-eq { flex: none; border: 0; background: none; color: var(--ty-muted); font: inherit; font-size: 12px; line-height: 1.2; padding: 6px 0; margin-left: 10px; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.ty-eq.on, .ty-eq[aria-checked="true"] { color: var(--ty-text); font-weight: 600; }
.ty-scene-btn { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 26px; padding: 0 8px; margin: 0; border-radius: 999px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-muted); font: inherit; font-size: 11px; line-height: 1; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.ty-scene-btn .ty-caret { font-size: 9px; line-height: 1; transform: translateY(-0.5px); }
.ty-scene-btn.on { color: var(--ty-text); border-color: var(--ty-text); font-weight: 600; }
.ty-scene-btn.on .ty-caret { transform: rotate(180deg); }
.ty-icon { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-muted); font: inherit; font-size: var(--fs-aux, 12px); cursor: pointer; justify-content: center; -webkit-tap-highlight-color: transparent; }
.ty-icon-only { padding: 0; width: 36px; }
.ty-icon.on { color: var(--ty-text); border-color: var(--ty-muted); background: rgba(255,255,255,.06); }

/* 设置（收起） */
.ty-settings { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: var(--ty-card); border: 1px solid var(--ty-line); }
.ty-settings.hidden { display: none; }
.ty-set-label { font-size: var(--fs-caption, 11px); font-weight: 600; color: var(--ty-aux); letter-spacing: .02em; }
.ty-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.ty-set-name { font-size: var(--fs-sub, 13px); color: var(--ty-text); }
.ty-set-sub { font-size: var(--fs-caption, 11px); color: var(--ty-aux); margin-top: 2px; }
.ty-scenes, .ty-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ty-chip { flex: none; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-muted); font: inherit; font-size: var(--fs-sub, 13px); cursor: pointer; }
.ty-chip.on { color: var(--ty-text); border-color: var(--ty-text); background: rgba(255,255,255,.08); font-weight: 600; }
.ty-switch { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.18); cursor: pointer; transition: background .15s; }
.ty-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ty-switch.on { background: var(--ty-acc); }
.ty-switch.on i { transform: translateX(18px); }

/* 结果 */
.ty-results { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 2px 0 8px; }
.ty-empty { margin: auto 0; color: var(--ty-aux); font-size: 14px; line-height: 1.7; padding: 16px 8px; text-align: center; }
.ty-res { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--ty-line); }
.ty-res:last-child { border-bottom: 0; }
.ty-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ty-cap { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-caption, 11px); font-weight: 600; color: var(--ty-aux); letter-spacing: .02em; flex: none; }
.ty-cap-acc { color: var(--ty-text); }
.ty-src-text { flex: 1 1 100%; font-size: 14px; line-height: 1.5; color: var(--ty-muted); word-break: break-word; }
.ty-struck { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); color: var(--ty-aux); }
.ty-card { position: relative; border-radius: 14px; padding: 8px 12px 10px; background: var(--ty-card); border: 1px solid var(--ty-line); display: flex; flex-direction: column; gap: 2px; }
.ty-card-top { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.ty-card-icons { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ty-grow { flex: 1 1 auto; }
.ty-trans-zh { font-size: 22px; line-height: 1.45; font-weight: 700; color: var(--ty-text); word-break: break-word; }
.ty-meaning { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; font-size: var(--fs-sub, 13px); line-height: 1.5; color: var(--ty-muted); }
.ty-out-local { font-size: 24px; line-height: 1.4; font-weight: 700; color: var(--ty-text); word-break: break-word; }
.ty-polished { border-radius: 16px; padding: 8px 12px 12px; border: 1px dashed var(--ty-line); }
.ty-polished-zh { font-size: 16px; line-height: 1.55; color: var(--ty-text); }
.ty-flag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-caption, 11px); font-weight: 600; background: rgba(255,255,255,.08); color: var(--ty-muted); }
.ty-flag-insult, .ty-flag-severe { background: rgba(200,70,60,.18); color: #f0a49b; }
.ty-flag-rude { background: rgba(220,150,60,.16); color: #e8bb7c; }
.ty-flag-me { background: rgba(255,255,255,.12); color: var(--ty-text); }
.ty-sec { font-size: var(--fs-caption, 11px); font-weight: 600; color: var(--ty-aux); margin-top: 4px; letter-spacing: .02em; }
.ty-list { display: flex; flex-direction: column; gap: 6px; }
.ty-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 6px; border-radius: 14px; padding: 6px 4px 6px 10px; background: rgba(255,255,255,.03); border: 1px solid var(--ty-line); }
.ty-line-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ty-line-actions { display: flex; gap: 4px; align-items: center; }
.ty-line-extra { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.ty-line-extra.hidden { display: none; }
.ty-local { font-size: 15px; line-height: 1.45; color: var(--ty-muted); font-weight: 500; word-break: break-word; }
.ty-roman { font-size: 12.5px; color: var(--ty-aux); font-style: italic; }
.ty-en { font-size: var(--fs-sub, 13px); color: var(--ty-muted); line-height: 1.45; }
.ty-zh { font-size: 16px; line-height: 1.45; color: var(--ty-text); font-weight: 650; word-break: break-word; }
.ty-line .ty-zh { font-size: 16px; }
.ty-line .ty-local { font-size: 15px; font-weight: 500; color: var(--ty-muted); }
.ty-ib { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; border: 0; background: transparent; color: var(--ty-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ty-line-actions { align-self: center; }
.ty-ib:active, .ty-pill:active, .ty-icon:active { background: rgba(255,255,255,.08); }
.ty-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-muted); font: inherit; font-size: var(--fs-aux, 12px); cursor: pointer; white-space: nowrap; }
.ty-pill-acc { color: var(--ty-text); border-color: var(--ty-muted); }
.ty-pill:disabled { opacity: .55; }
.ty-link { border: 0; background: none; padding: 4px 0; color: var(--ty-muted); font: inherit; font-size: var(--fs-aux, 12px); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ty-more summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: var(--fs-aux, 12px); color: var(--ty-aux); cursor: pointer; }
.ty-more summary::-webkit-details-marker { display: none; }
.ty-more[open] summary svg { transform: rotate(180deg); }
.ty-more .ty-list { margin-top: 4px; }
.ty-off-note { font-size: var(--fs-aux, 12px); color: var(--ty-aux); }

/* 底部听钮：收紧 mic 到提示行之间的空白（底栏已含 safe-area） */
.ty-dock { flex: none; border-top: 1px solid var(--ty-line); padding: 4px 0 6px; display: flex; flex-direction: column; gap: 2px; background: inherit; }
.ty-status:empty { display: none; }
.ty-status { font-size: var(--fs-sub, 13px); color: var(--ty-muted); line-height: 1.45; text-align: center; }
.ty-status.bad { color: #f0a49b; }
.ty-main-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; justify-items: center; }
.ty-side, .ty-side-btn { width: 44px; height: 44px; }
.ty-side-btn { display: grid; place-items: center; box-sizing: border-box; padding: 0; margin: 0; line-height: 0; border-radius: 999px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ty-side-btn svg { display: block; margin: 0; }
.ty-side-btn[aria-expanded="true"] { color: var(--ty-text); border-color: var(--ty-muted); }
.ty-mic { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; background: var(--ty-acc); color: var(--ty-acc-ink); display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.ty-mic:active { transform: scale(.96); }
.ty-mic svg { position: relative; z-index: 1; width: 26px; height: 26px; }
.ty-main-row.compact .ty-mic { width: 48px; height: 48px; }
.ty-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; transition: transform .1s linear; pointer-events: none; }
.ty-mic.rec { background: #b8473b; color: #fff; }
.ty-mic.rec .ty-ring { border-color: rgba(184,71,59,.55); }
.ty-mic.busy { opacity: .6; }
.ty-hint { display: flex; justify-content: center; align-items: baseline; flex-wrap: nowrap; gap: 6px; font-size: var(--fs-aux, 12px); color: var(--ty-aux); min-height: 14px; line-height: 1.3; padding: 0 4px 2px; }
.ty-hint #tyMicLab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ty-timer { font-variant-numeric: tabular-nums; }
.ty-timer:empty { display: none; }
.ty-quota { font-size: inherit; color: inherit; text-align: center; white-space: nowrap; }
.ty-quota:empty { display: none; }
.ty-quota:not(:empty)::before { content: '·'; margin-right: 6px; }
.ty-edit.hidden { display: none; }
.ty-box { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; border: 1px solid var(--ty-line); background: var(--ty-card); }
.ty-box textarea { width: 100%; min-height: 76px; max-height: 168px; resize: none; box-sizing: border-box; padding: 8px; border: 0; outline: none; background: transparent; color: var(--ty-text); font: inherit; font-size: 16px; line-height: 1.5; }
.ty-box-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ty-box-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.ty-box-actions .ty-pill { min-height: 40px; padding: 0 12px; }
.ty-go { min-height: 40px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--ty-acc); color: var(--ty-acc-ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ty-go:disabled { opacity: .5; }
.ty-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-text); font: inherit; font-size: 16px; }

/* 弹层：麦克风提示 / 问红尘 */
.ty-perm { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; background: rgba(8,8,12,.72); padding: 16px 0; }
.ty-perm.hidden { display: none; }
.ty-pop-card { width: 100%; max-height: 100%; overflow-y: auto; box-sizing: border-box; border-radius: 20px; padding: 16px; background: var(--ty-card); color: var(--ty-text); border: 1px solid var(--ty-line); display: flex; flex-direction: column; gap: 12px; }
.ty-pop-ic { align-self: center; color: var(--ty-muted); }
.ty-pop-card p { margin: 0; color: var(--ty-text); font-size: 15px; line-height: 1.55; text-align: center; }
.ty-pop-card h3 { margin: 0; font-size: var(--fs-title, 16px); }
.ty-pop-card .ty-ask-sub { font-size: var(--fs-sub, 13px); color: var(--ty-aux); text-align: left; }
.ty-quote { padding: 8px 12px; border-left: 2px solid var(--ty-muted); font-size: 14px; line-height: 1.5; color: var(--ty-text); }
.ty-quote-zh { color: var(--ty-aux); font-size: var(--fs-sub, 13px); margin-top: 2px; }
.ty-pop-btns { display: flex; gap: 8px; width: 100%; }
.ty-ask-card { padding-bottom: 0; }
.ty-ask-card .ty-pop-btns { position: sticky; bottom: 0; padding: 8px 0 16px; background: var(--ty-card); }
.ty-ask-card .ty-chips { gap: 6px; }
.ty-pop-btns button { flex: 1; }
.ty-primary, .ty-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; padding: 0 16px; }
.ty-primary { border: 0; background: var(--ty-acc); color: var(--ty-acc-ink); }
.ty-ghost { border: 1px solid var(--ty-line); background: transparent; color: var(--ty-text); }

/* 连续同传：暗、低亮度 */
#tingyiSheet.ty-dim .tingyi-card { background: #0a0a0c; }
.ty-ov { --ty-text: #b9b4aa; --ty-muted: #8d887f; --ty-aux: #6f6b64; --ty-card: #121215; --ty-line: rgba(255,255,255,.06); }
.ty-ov .ty-mic.ty-ov-btn { background: #26262b; color: #b9b4aa; box-shadow: 0 0 0 calc(var(--lvl, 0) * 10px) rgba(185,180,170,.12); transition: box-shadow .2s; }
.ty-ov .ty-mic.ty-ov-btn.rec { background: #3a1f1c; color: #d9a39b; }
.ty-gist { display: flex; flex-direction: column; gap: 4px; padding: 8px 0 12px; border-bottom: 1px solid var(--ty-line); }
.ty-gist.pending .ty-gist-text { color: var(--ty-aux); }
.ty-gist.is-draft .ty-gist-text { color: var(--ty-muted); }
.ty-gist-live { display: inline; letter-spacing: .04em; }
.ty-gist-top { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.ty-time { font-size: var(--fs-caption, 11px); color: var(--ty-aux); font-variant-numeric: tabular-nums; }
.ty-gist-text { font-size: 16px; line-height: 1.55; color: var(--ty-text); }
.ty-gist-sub { font-size: var(--fs-sub, 13px); color: var(--ty-muted); }
.ty-pause { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0; color: var(--ty-muted); font-size: 14px; }


/* 对话气泡：按说话人拆开，我右、她左；中文在上 */
.ty-thread { display: flex; flex-direction: column; gap: 8px; }
.ty-bub { position: relative; max-width: 92%; border-radius: 16px; padding: 8px 12px 8px; border: 1px solid var(--ty-line); background: var(--ty-card); }
.ty-bub.her { align-self: flex-start; }
.ty-bub.me { align-self: flex-end; background: rgba(201,164,90,.10); border-color: rgba(201,164,90,.28); }
.ty-bub-cap { display: flex; align-items: center; gap: 6px; font-size: var(--fs-caption, 11px); font-weight: 600; color: var(--ty-aux); margin-bottom: 2px; }
.ty-bub.me .ty-bub-cap { justify-content: flex-end; }
.ty-bub-zh { font-size: 16px; line-height: 1.45; font-weight: 650; color: var(--ty-text); word-break: break-word; }
.ty-bub-orig { font-size: 14px; line-height: 1.45; color: var(--ty-muted); margin-top: 2px; word-break: break-word; }
.ty-bub-acts { position: absolute; top: 4px; right: 4px; }
.ty-bub.me .ty-bub-acts { right: auto; left: 4px; }
.ty-bub { padding-right: 54px; }
.ty-bub.me { padding-right: 12px; padding-left: 54px; }
.ty-thread-ask { display: flex; justify-content: flex-end; margin-top: 4px; }
@media (max-width: 370px) {
  .ty-bub { max-width: 96%; padding-right: 52px; }
  .ty-bub.me { padding-right: 12px; padding-left: 52px; }
  .ty-bub-zh { font-size: 15px; }
}

/* 红尘聊天里的回复卡 */
.answer-para .ty-chat-text { white-space: pre-wrap; }
.answer-para .ty-line.chat { margin: 8px 0; white-space: normal; }
.answer-para .ty-line.chat .ty-line-main { cursor: default; }

@media (max-height: 700px) {
  .ty-head { min-height: 34px; margin-bottom: 2px; }
  .ty-dock { gap: 2px; padding-top: 4px; }
}
@media (max-width: 370px) {
  .ty-mode-pill { font-size: 11px; padding: 0 8px; }
  .ty-eq, .ty-scene-btn { font-size: 11px; }
  .ty-trans-zh, .ty-out-local { font-size: 20px; }
}

/* 转泰文卡：全屏给对方看 */
.ty-show { position: fixed; inset: 0; z-index: 9999; background: #fbf7ee; color: #141414; display: flex; align-items: center; justify-content: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.ty-show.hidden { display: none; }
.ty-show-inner { width: 100%; max-width: 640px; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.ty-show-hint { font-size: 13px; color: #7a6a45; text-align: center; }
.ty-show-local { font-size: clamp(30px, 9vw, 56px); line-height: 1.35; font-weight: 800; text-align: center; word-break: break-word; }
.ty-show-en { font-size: clamp(18px, 5vw, 26px); line-height: 1.4; text-align: center; color: #333; }
.ty-show-roman { font-size: 14px; text-align: center; color: #777; font-style: italic; }
.ty-show-zh { font-size: 13px; line-height: 1.45; text-align: center; color: #8a7a58; font-weight: 400; max-width: 36em; margin: 0 auto; word-break: break-word; }
.ty-show-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.ty-show-btns button { flex: 1 1 0; min-width: 0; min-height: 52px; white-space: nowrap; padding: 0 10px; font-size: 15px; }
.ty-cue-share { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; min-height: 0; flex: 1; }
.ty-cue-share.hidden { display: none; }
.ty-cue-share img { width: 100%; max-height: min(70dvh, 640px); object-fit: contain; border-radius: 16px; background: #fbf7ee; box-shadow: 0 8px 28px rgba(20,16,8,.12); }
.ty-show-inner.is-saving .ty-show-hint,
.ty-show-inner.is-saving .ty-show-local,
.ty-show-inner.is-saving .ty-show-en,
.ty-show-inner.is-saving .ty-show-roman,
.ty-show-inner.is-saving .ty-show-zh,
.ty-show-inner.is-saving > .ty-show-btns { display: none; }
.ty-show .ty-ghost { color: #141414; border-color: rgba(0,0,0,.2); }
.ty-show .ty-primary { background: #141414; color: #fbf7ee; }

/* 视频按钮回到右上角（只留图标），YouTube 从这里进 */
.top .watch-video-btn { display: inline-flex; min-width: 30px; min-height: 30px; padding: 0 3px; }
.top .watch-video-btn .watch-video-lab { display: none; }
html.chat-compact .top .watch-video-btn { display: none; }

/* 最后 10 秒倒计时：环变琥珀 → 最后 3 秒变红并轻轻跳动；文字「还剩 N 秒」 */
.ty-mic.rec.warn { background: #b86a1f; }
.ty-mic.rec.warn .ty-ring { border-color: rgba(232,160,70,.9); border-width: 3px; }
.ty-mic.rec.urgent { background: #c23a2c; }
.ty-mic.rec.urgent .ty-ring { border-color: rgba(240,90,75,.95); }
.ty-hint #tyMicLab.warn { color: #e8bb7c; font-weight: 600; }
.ty-timer.warn { color: #e8bb7c; }
.ty-hint #tyMicLab.ov-soon { color: var(--ty-muted); }
.ty-line .ty-zh { font-size: 18px; line-height: 1.4; }
.ty-bub-zh { font-size: 17px; }
.ty-line .ty-local { font-size: 15px; }
.ty-ib svg { width: 24px; height: 24px; }
.ty-ib.is-tts-loading, .ty-ib.is-tts-playing, .ty-ghost.is-tts-loading, .ty-ghost.is-tts-playing {
  color: var(--ty-acc); background: rgba(201, 164, 90, .22);
}
.ty-ib.is-tts-loading { position: relative; }
.ty-ib.is-tts-loading svg { opacity: .15; }
@keyframes ty-tts-spin { to { transform: rotate(360deg); } }
.ty-ib.is-tts-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; margin: auto; inset: 0;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: ty-tts-spin .7s linear infinite;
}
.ty-ghost.is-tts-loading::after {
  content: ''; width: 14px; height: 14px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: ty-tts-spin .7s linear infinite;
}
.ty-show .ty-ghost.is-tts-loading, .ty-show .ty-ghost.is-tts-playing {
  color: #141414; background: rgba(201, 164, 90, .28); border-color: #c9a45a;
}
@media (prefers-reduced-motion: reduce) {
  .ty-ib.is-tts-loading::after, .ty-ghost.is-tts-loading::after { animation: none; border-right-color: currentColor; }
}
.ty-line-actions .ty-ib { width: 46px; height: 46px; }
@media (max-width: 370px) { .ty-line .ty-zh { font-size: 17px; } .ty-line-actions .ty-ib { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: no-preference) {
  .ty-mic.rec.urgent .ty-ring { animation: ty-pulse .6s ease-in-out infinite alternate; }
}
@keyframes ty-pulse { from { opacity: .55; } to { opacity: 1; } }

/* 现场听译固定米白金、连续同传固定暗金，不受全站日夜主题影响 */
#tingyiSheet:not(.ty-dim) .tingyi-card { background: #f4efe6; color: #1a1408; }
#tingyiSheet:not(.ty-dim) .ty {
  --ty-text: #1a1408;
  --ty-muted: #5c564e;
  --ty-aux: #7a746c;
  --ty-card: #fffdf8;
  --ty-line: rgba(26, 20, 8, .10);
  --ty-acc: #c9a45a;
  --ty-acc-ink: #1a1408;
}
#tingyiSheet:not(.ty-dim) .ty-mode-pill { background: rgba(255, 253, 248, .7); border-color: rgba(26, 20, 8, .14); }
#tingyiSheet:not(.ty-dim) .ty-line { background: rgba(26, 20, 8, .03); }
#tingyiSheet:not(.ty-dim) .ty-chip.on { background: rgba(201, 164, 90, .18); }
#tingyiSheet:not(.ty-dim) .ty-struck { text-decoration-color: rgba(26, 20, 8, .3); }
#tingyiSheet:not(.ty-dim) .ty-flag { background: rgba(26, 20, 8, .06); }
#tingyiSheet:not(.ty-dim) .ty-ib:active, #tingyiSheet:not(.ty-dim) .ty-pill:active, #tingyiSheet:not(.ty-dim) .ty-mode-pill:active { background: rgba(26, 20, 8, .06); }

#tingyiSheet.ty-dim .tingyi-card { background: #0a0a0c; color: #b9b4aa; }
#tingyiSheet.ty-dim .ty-mode-pill { color: #e8d5a3; border-color: rgba(201, 164, 90, .35); background: rgba(201, 164, 90, .08); }

/* 关闭 ×：浅底深字，两种模式都看得清（压过全站深色圆形关闭钮） */
#tingyiSheet .sheet-close,
#tingyiSheet.ty-dim .sheet-close,
#tingyiSheet:not(.ty-dim) .sheet-close {
  background: #f4efe6 !important;
  color: #1a1408 !important;
  border: 1px solid rgba(26, 20, 8, .22) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  font-weight: 500;
}

/* 听译分享：弹层跟面板配色，窄屏按钮可折行 */
.ty-share-card { gap: 10px; padding: 18px 16px 16px; }
.ty-share-card h3 { text-align: center; font-weight: 700; color: var(--ty-text); }
.ty-share-card .ty-ask-sub { text-align: center; margin: 0; }
.ty-share-btns { width: 100%; }
@media (max-width: 360px) {
  .ty-share-btns { flex-direction: column; }
  .ty-share-btns button { width: 100%; }
}

/* 听译：保存分享图预览；翻译有错时补充一句再翻 */
.ty-share-poster-card { gap: 12px; }
.ty-share-poster-card img { width: 100%; border-radius: 12px; display: block; background: #1a1030; }
.ty-retry-link { align-self: flex-start; margin: 0; padding: 6px 0 2px; border: 0; background: none; color: rgba(26, 20, 8, .32); font: inherit; font-size: 11px; font-weight: 400; line-height: 1.35; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
#tingyiSheet.ty-dim .ty-retry-link, .ty-ov .ty-retry-link { color: rgba(185, 180, 170, .34); }
.ty-retry-link:active { color: rgba(26, 20, 8, .5); }
#tingyiSheet.ty-dim .ty-retry-link:active, .ty-ov .ty-retry-link:active { color: rgba(185, 180, 170, .55); }
.ty-retry { display: flex; gap: 8px; align-items: center; width: 100%; }
.ty-retry input { flex: 1 1 auto; min-width: 0; min-height: 48px; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--ty-line); background: transparent; color: var(--ty-text); padding: 0 12px; font: inherit; font-size: 16px; }
.ty-retry-go { flex: none; min-height: 48px; padding: 0 16px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.ty-retry-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10000;
  box-sizing: border-box; width: 100%; max-width: 100%;
  padding: 12px 16px 12px;
  background: #f4efe6; color: #1a1408;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgba(20, 16, 8, .18);
}
.ty-retry-sheet.hidden { display: none; }
#tingyiSheet.ty-dim ~ .ty-retry-sheet, .ty-retry-sheet.ty-dim {
  background: #16161c; color: #f4f1ea; box-shadow: 0 -8px 28px rgba(0,0,0,.4);
}
.ty-retry-sheet .ty-retry-hint { margin: 0 0 10px; font-size: 14px; line-height: 1.4; color: #5c5346; }
.ty-retry-sheet.ty-dim .ty-retry-hint { color: #b9b4aa; }
.ty-retry-sheet .ty-retry input {
  background: #fffdf8; border-color: rgba(26, 20, 8, .18); color: #1a1408;
}
.ty-retry-sheet.ty-dim .ty-retry input { background: #1c1c22; border-color: rgba(255,255,255,.14); color: #f4f1ea; }
.ty-edit.ty-edit-lift {
  position: fixed; z-index: 10000; box-sizing: border-box;
  padding: 8px 12px 10px;
  background: #f4efe6; box-shadow: 0 -8px 24px rgba(20, 16, 8, .14);
  border-top: 1px solid rgba(26, 20, 8, .08);
}
#tingyiSheet.ty-dim .ty-edit.ty-edit-lift, .ty.ty-ov ~ .ty-edit-lift { background: #0a0a0c; border-top-color: rgba(255,255,255,.08); box-shadow: 0 -8px 24px rgba(0,0,0,.4); }
