/* 拆片台网页版 · 样式。只给电脑上的 Chrome / Edge 用（规范 §一 默认九条）。
 * 🔴 CSP 不许内联样式：页面里不写 style="…"，要动态宽度的地方用 <progress> / <meter> 或 SVG 属性。 */
:root {
  --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #f5f6f8; --card: #fff;
  --pri: #2563eb; --pri-d: #1d4ed8; --bad: #dc2626; --ok: #15803d; --warn: #b45309; --info: #4338ca;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.legal { background: #fef2f2; color: #991b1b; border-bottom: 1px solid #fecaca; padding: 6px 20px; font-size: 12.5px; }
nav.top { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
nav.top .brand { font-weight: 700; font-size: 16px; color: var(--ink); }
nav.top .sep { color: var(--muted); margin-left: 8px; }
nav.top .who { color: var(--muted); }
.grow { flex: 1; }
main { max-width: 1180px; margin: 0 auto; padding: 18px 20px 40px; }
footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 20px 28px; border-top: 1px solid var(--line); }
.pad { padding: 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card.inner { background: #fafafa; margin: 14px 0 0; }
.card.narrow { max-width: 640px; }
.h1 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row .h1 { margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

label.f, div.f { display: block; margin: 10px 0; font-weight: 600; }
label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--pri); }
.choices { display: flex; gap: 18px; margin-top: 4px; font-weight: 400; }
.choices input { margin-right: 4px; }

.btn { display: inline-block; font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f1f5f9; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.primary:hover { background: var(--pri-d); }
.btn.danger { color: var(--bad); border-color: #fca5a5; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { padding: 3px 9px; font-size: 12.5px; }
.btn.wide { width: 100%; margin-top: 8px; padding: 9px; }

table.list { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: #fafafa; }
table.list tr.total td { font-weight: 700; background: #f8fafc; }
td.actions { white-space: nowrap; }
td.actions .btn { margin: 0 4px 4px 0; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; white-space: nowrap; }
.badge.ok { background: #f0fdf4; color: var(--ok); border-color: #bbf7d0; }
.badge.bad { background: #fef2f2; color: var(--bad); border-color: #fecaca; }
.badge.warn { background: #fffbeb; color: var(--warn); border-color: #fde68a; }
.badge.info { background: #eef2ff; color: var(--info); border-color: #c7d2fe; }

.notice { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 6px; padding: 9px 12px; margin: 8px 0; }
.notice.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice.ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.err { color: var(--bad); margin: 8px 0 0; }

.login-wrap { display: flex; justify-content: center; padding-top: 40px; }
.card.login { width: 400px; padding: 26px 28px; }
.card.login .h1 { font-size: 22px; }

.toast { position: fixed; right: 20px; bottom: 20px; background: #111827; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 30; max-width: 420px; }
.toast.bad { background: #991b1b; }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 20; }
.modal-box { background: #fff; border-radius: 10px; padding: 20px 22px; width: 460px; max-width: calc(100vw - 40px); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.modal-title { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.secret { font-size: 22px; letter-spacing: 2px; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 6px; padding: 10px; text-align: center; user-select: all; }

progress { width: 100%; height: 10px; }
td progress { width: 180px; vertical-align: middle; margin-right: 8px; }
.drop { border: 2px dashed #cbd5e1; border-radius: 8px; padding: 22px; text-align: center; margin: 10px 0; background: #f8fafc; }
.drop.over { border-color: var(--pri); background: #eff6ff; }
.drop .btn { margin: 0 4px; }
input.ep { width: 64px; padding: 3px 6px; }

/* W4：向导、看板、管理页 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.grid.small3 { grid-template-columns: repeat(3, 72px); gap: 4px; margin: 0; }
img.thumb { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #000; display: block; }
img.thumb.small { width: 72px; }
img.example { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; display: block; }
img.example.wide { max-width: 760px; margin: 8px 0; }
.q { margin: 10px 0; }
.q .h2 { font-weight: 600; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs a { padding: 6px 12px; color: var(--muted); }
.tabs a.on { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--pri); }
.doc p { margin: 6px 0; }
.doc ul, .doc ol { margin: 4px 0 8px 18px; padding: 0; }
.doc li { margin: 2px 0; }
.doc li > ul, .doc li > ol { margin: 2px 0 4px 16px; }
pre.log { max-height: 60vh; overflow: auto; background: #0f172a; color: #e2e8f0; padding: 10px; font-size: 12px; white-space: pre-wrap; margin: 0; }
.modal-box.wide { width: 920px; }
textarea.wide { width: 100%; }
svg.strip { width: 100%; height: 24px; display: block; }
svg.spark { width: 100%; height: 60px; display: block; }
.sh-a { fill: #93c5fd; } .sh-b { fill: #3b82f6; }
.au-speech { fill: #60a5fa; } .au-sound { fill: #d1d5db; } .au-silence { fill: #111827; }
.pr { fill: #60a5fa; } .pr-hi { fill: #f97316; }
tr.lowconf td { background: #fffbeb; }
