/* 校对译文 — the review table. Tokens from app.css, so it follows the theme. */
.tp{width:min(1360px,96vw);height:min(920px,92vh);max-width:none;max-height:none;margin:auto;padding:0;
  border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);
  box-shadow:var(--pop);overflow:hidden;font-size:13.5px}
.tp[open]{display:flex;flex-direction:column}
.tp::backdrop{background:rgba(12,12,13,.45)}
.tp-wait{margin:auto;padding:40px;display:flex;flex-direction:column;gap:12px;align-items:center;color:var(--ink-2);text-align:center}
.tp-spin{display:inline-block;width:13px;height:13px;margin-right:6px;vertical-align:-2px;border-radius:50%;
  border:2px solid currentColor;border-right-color:transparent;animation:tp-spin .8s linear infinite}
@keyframes tp-spin{to{transform:rotate(360deg)}}

.tp-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--line)}
.tp-title{min-width:0}
.tp-title h2{font-size:16px;font-weight:600;line-height:1.3}
.tp-title p{font-size:12.5px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.tp-q{height:30px;width:220px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface)}
.tp-q:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.tp-seg{display:inline-flex;border:1px solid var(--line-2);border-radius:var(--r);overflow:hidden}
.tp-seg button{height:28px;padding:0 10px;font-size:12.5px;color:var(--ink-2);text-align:center}
.tp-seg button+button{border-left:1px solid var(--line-2)}
.tp-seg button:hover:not(:disabled){background:var(--surface-2)}
.tp-seg button[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent-ink);font-weight:600}
.tp-seg button:disabled{opacity:.45;cursor:default}
.tp-x{width:30px;height:30px;display:grid;place-items:center;border-radius:var(--r);color:var(--ink-2)}
.tp-x:hover{background:var(--surface-2);color:var(--ink)}
.tp-x svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;fill:none}

.tp-miss{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;padding:8px 18px;font-size:12.5px;
  color:var(--ochre);background:var(--ochre-soft);border-bottom:1px solid var(--ochre-line)}
.tp-miss b{font-weight:600}
.tp-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr)}
.tp-list{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line)}
.tp-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:7px 18px;font-size:12px;font-weight:600;
  color:var(--ink-3);background:var(--surface-2);border-bottom:1px solid var(--line)}
.tp-rows{flex:1;min-height:0;overflow:auto}
.tp-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:10px 18px 8px;border-bottom:1px solid var(--line);
  cursor:pointer;content-visibility:auto;contain-intrinsic-size:auto 76px}
.tp-row:hover{background:var(--surface-2)}
.tp-row.sel{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}
.tp-c{min-width:0}
/* A cell reads as text until it is being edited — one row, not a form. */
.tp-t{display:block;width:calc(100% + 14px);margin:-5px -7px 0;padding:5px 7px;min-height:32px;max-height:200px;
  font:inherit;field-sizing:content;resize:none;overflow:auto;line-height:1.5;color:var(--ink);background:transparent;
  border:1px solid transparent;border-radius:var(--r);white-space:pre-wrap;overflow-wrap:anywhere}
.tp-t.src{color:var(--ink-2)}
.tp-t:hover{border-color:var(--line-2);background:var(--surface)}
.tp-t:focus{outline:none;border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px var(--ring);color:var(--ink)}
.tp-t.bad{border-color:var(--brick);background:var(--brick-soft)}
.tp-t::placeholder{color:var(--ink-3)}
.tp-m{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:18px;margin-top:3px;font-size:11.5px;color:var(--ink-3)}
.tp-f{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp-tag{padding:0 6px;border-radius:4px;background:var(--surface-3);color:var(--ink-2);line-height:18px}
.tp-tag.ed{background:var(--accent-soft);color:var(--accent-ink)}
.tp-tag.risk{background:var(--ochre-soft);color:var(--ochre)}
.tp-u{font-size:11.5px;color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.tp-none-rows{padding:40px 18px;text-align:center;color:var(--ink-3)}

.tp-view{min-height:0;overflow:auto;background:var(--surface-2);padding:20px 18px;
  display:flex;flex-direction:column;align-items:center;gap:10px}
.tp-frame{position:relative;width:100%;flex:none;border-radius:12px;overflow:hidden;background:var(--surface);
  box-shadow:var(--pop)}
.tp-frame img{display:block;width:100%;height:auto}
.tp-frame img:not([src]){aspect-ratio:inherit;min-height:200px;background:var(--surface-3)}
/* The same colour the Excel's Before column boxes a string in. */
.tp-box{position:absolute;border:2px solid #ff542b;border-radius:4px;pointer-events:none;
  box-shadow:0 0 0 9999px rgba(12,12,13,.22);animation:tp-pulse 1.4s var(--ease) 2}
@keyframes tp-pulse{50%{box-shadow:0 0 0 9999px rgba(12,12,13,.22),0 0 0 6px rgba(255,84,43,.35)}}
.tp-cap{font-size:12.5px;color:var(--ink-2);text-align:center;max-width:480px;flex:none}
.tp-cap b{font-weight:600;color:var(--ink)}
.tp-none{margin:auto;max-width:360px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;color:var(--ink-2)}
.tp-run{display:flex;align-items:center;justify-content:center;gap:2px}
.tp-cost{font-size:12px;color:var(--ink-3)}
.tp-why{font-size:12px;color:var(--brick)}
.tp-why.soft{color:var(--ink-3)}

.tp-foot{display:flex;align-items:center;gap:12px;padding:12px 18px;border-top:1px solid var(--line);background:var(--surface)}
.tp-state{flex:1;min-width:0;font-size:12.5px;color:var(--ink-3)}
.tp-fig{display:flex;align-items:flex-start;gap:8px;max-width:340px;font-size:13px;cursor:pointer}
.tp-fig input{margin-top:3px;accent-color:var(--accent)}
.tp-fig small{display:block;font-size:11.5px;line-height:1.4;color:var(--ink-3)}

@media (max-width:860px){
  .tp{width:100vw;height:100dvh;border-radius:0;border:0}
  .tp-head{flex-direction:column;align-items:stretch;gap:10px;padding:12px 16px}
  .tp-tools{justify-content:flex-start}
  .tp-q{flex:1;min-width:140px;width:auto}
  .tp-x{position:absolute;top:10px;right:12px}
  .tp-body{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,42%)}
  .tp-list{border-right:0;border-bottom:1px solid var(--line)}
  .tp-row,.tp-cols{padding-left:16px;padding-right:16px}
  .tp-foot{flex-wrap:wrap;padding:10px 16px}
  .tp-state{flex-basis:100%}
}
/* 导出进度：读图 → 生成 → 下载（「为啥没有进度条」2026-10-07） */
.tp-progress{display:block;width:min(260px,100%);height:4px;margin-top:6px;border:0;border-radius:2px;
  background:var(--surface-2);accent-color:var(--accent);appearance:none;overflow:hidden}
.tp-progress::-webkit-progress-bar{background:var(--surface-2)}
.tp-progress::-webkit-progress-value{background:var(--accent);transition:width .4s}
.tp-progress::-moz-progress-bar{background:var(--accent)}
