/* 漫剧审片台 · Studio Review Desk */
:root {
  color-scheme: dark;
  --bg: #0b111c;
  --bg-deep: #070c14;
  --surface: #111a28;
  --surface-2: #162131;
  --surface-3: #1b2839;
  --surface-soft: rgba(255,255,255,.035);
  --ink: #f2f5f8;
  --text: #d8e0e8;
  --muted: #91a0b2;
  --muted-2: #68788c;
  --line: rgba(159,177,198,.14);
  --line-strong: rgba(159,177,198,.27);
  --primary: #ee6352;
  --primary-2: #ff806f;
  --primary-soft: rgba(238,99,82,.13);
  --teal: #45b8ad;
  --teal-soft: rgba(69,184,173,.13);
  --bad: #ff6b76;
  --warn: #efb54a;
  --ok: #51c89d;
  --s: #ff806f;
  --a: #53b8e8;
  --b: #9b8af7;
  --c: #91a0b2;
  --shadow: 0 24px 80px rgba(0,0,0,.24);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1240px;
  --display: "STZhongsong", "Songti SC", "SimSun", serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f3f5;
  --bg-deep: #e8ebee;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f4;
  --surface-soft: rgba(15,28,43,.025);
  --ink: #131b25;
  --text: #303c4a;
  --muted: #5f6d7d;
  --muted-2: #7b8794;
  --line: rgba(31,49,69,.11);
  --line-strong: rgba(31,49,69,.22);
  --primary: #d94739;
  --primary-2: #e75a4c;
  --primary-soft: rgba(217,71,57,.09);
  --teal: #1f8179;
  --teal-soft: rgba(31,129,121,.09);
  --bad: #ce3647;
  --warn: #a66a00;
  --ok: #187c5d;
  --s: #d94739;
  --a: #147aa9;
  --b: #6656c9;
  --c: #5f6d7d;
  --shadow: 0 20px 60px rgba(28,39,51,.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] body {
  background:
    linear-gradient(rgba(20,35,50,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,35,50,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px;
}
button, input, textarea, select { font: inherit; }
button, a, label.btn, summary { -webkit-tap-highlight-color: transparent; }
button, .btn, summary, .chip, .dropzone { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 87%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--primary); color: #fff; border-radius: 10px 10px 10px 3px; box-shadow: 0 8px 22px rgba(238,99,82,.24); }
.brand-mark svg { width: 22px; height: 22px; }
.brand b { display: block; font-size: 15px; letter-spacing: .08em; line-height: 1.2; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.topnav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.topnav a { padding: 10px 14px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 650; transition: color .2s, background .2s; }
.topnav a:hover { color: var(--ink); background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.official-home {
  min-height: 40px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  border: 1px solid var(--primary);
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 28%, transparent);
  font-size: 12px;
  font-weight: 750;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.official-home:hover {
  color: #fff;
  background: color-mix(in srgb, var(--primary) 86%, #000);
  border-color: color-mix(in srgb, var(--primary) 86%, #000);
  box-shadow: 0 11px 26px color-mix(in srgb, var(--primary) 38%, transparent);
  transform: translateY(-1px);
}
.official-home-short { display: none; }
.local-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 650; }
.local-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); transition: border-color .2s, color .2s, background .2s; }
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }

/* Hero */
.hero {
  width: min(var(--max), calc(100% - 48px));
  min-height: 500px;
  margin: 0 auto;
  padding: 88px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: 72px;
}
.hero-copy { max-width: 730px; }
.eyebrow, .section-kicker { margin: 0 0 18px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { color: var(--primary-2); }
.hero h1 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(48px, 5.2vw, 66px); font-weight: 700; letter-spacing: -.055em; line-height: 1.08; }
.hero h1 em { color: var(--primary-2); font-style: normal; position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 8px; background: var(--primary-soft); z-index: -1; }
.hero-lead { max-width: 680px; margin: 26px 0 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.hero-cta { display: flex; align-items: center; gap: 20px; margin-top: 34px; }
.hero-cta > span { max-width: 300px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.hero-cta > span svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--teal); }

.fingerprint-card { position: relative; overflow: hidden; min-height: 330px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 24px 24px 24px 8px; background: linear-gradient(150deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow); }
.fingerprint-card::before { content: ""; position: absolute; width: 190px; height: 190px; right: -70px; top: -80px; border-radius: 50%; background: var(--primary); opacity: .09; filter: blur(12px); }
.fingerprint-head { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.live-pill { padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--ok) 8%, transparent); color: var(--ok); letter-spacing: .1em; }
.fingerprint-number { display: flex; align-items: baseline; gap: 12px; margin-top: 34px; }
.fingerprint-number strong { color: var(--ink); font-size: 72px; font-weight: 780; letter-spacing: -.06em; line-height: 1; }
.fingerprint-number span { color: var(--muted); font-size: 13px; }
.scan-track { position: relative; height: 92px; display: flex; align-items: flex-end; gap: 5px; margin-top: 28px; padding: 0 2px 10px; border-bottom: 1px solid var(--line-strong); }
.scan-track i { flex: 1; height: var(--h); min-width: 3px; background: linear-gradient(to top, color-mix(in srgb, var(--teal) 35%, transparent), var(--teal)); border-radius: 2px 2px 0 0; opacity: .72; }
.scan-track i:nth-child(3n) { background: linear-gradient(to top, color-mix(in srgb, var(--primary) 35%, transparent), var(--primary)); }
.scan-track b { position: absolute; top: 0; bottom: 9px; width: 1px; background: var(--primary-2); box-shadow: 0 0 14px 3px color-mix(in srgb, var(--primary) 35%, transparent); animation: scan 4s ease-in-out infinite; }
.coverage-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.coverage-row span { display: inline-flex; align-items: center; gap: 6px; }
.coverage-row i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

.proof-strip { width: min(var(--max), calc(100% - 48px)); margin: 0 auto 72px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.proof-strip div { min-height: 86px; display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 24px 16px; border-right: 1px solid var(--line); }
.proof-strip div:last-child { border-right: 0; }
.proof-strip b { color: var(--ink); font-size: 25px; letter-spacing: -.04em; }
.proof-strip span { color: var(--muted); font-size: 12px; }

/* Shared sections */
.section-shell { width: min(var(--max), calc(100% - 48px)); margin: 0 auto 88px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
.section-kicker { margin-bottom: 8px; color: var(--primary-2); }
.section-heading h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(30px, 4vw, 43px); letter-spacing: -.04em; line-height: 1.18; }
.section-heading > p { max-width: 480px; margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 1px 0 rgba(255,255,255,.025); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(320px, .68fr); gap: 18px; align-items: start; }
.editor-panel, .control-panel { padding: 26px; }
.control-panel { position: sticky; top: 94px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-head > div:first-child { display: flex; align-items: center; gap: 11px; }
.panel-head h3 { margin: 0; color: var(--ink); font-size: 16px; }
.step { min-width: 32px; color: var(--primary-2); font-size: 10px; font-weight: 850; letter-spacing: .12em; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 18px; }
.field label, .mini-label { color: var(--text); font-size: 12px; font-weight: 720; }
.field small { color: var(--muted-2); font-size: 11px; }
.field-label-row { display: flex; justify-content: space-between; align-items: center; }
.field-label-row span { color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; outline: none; background: var(--surface-2); color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
input, select { min-height: 44px; padding: 10px 12px; }
textarea { min-height: 330px; padding: 16px; resize: vertical; line-height: 1.8; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); background: var(--surface-3); }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface-2); }
.editor-field { margin-top: 20px !important; }
.sample-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.text-btn { min-height: 36px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 680; transition: background .2s, color .2s; }
.text-btn:hover { background: var(--surface-3); color: var(--ink); }

.dropzone { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 18px; padding: 17px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-soft); transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag { border-color: var(--teal); background: var(--teal-soft); outline: none; }
.drop-icon, .scope-icon, .lib-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--teal-soft); color: var(--teal); }
.dropzone b { display: block; color: var(--ink); font-size: 13px; }
.dropzone p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.filelist { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.fileitem { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 11px; }
.fileitem:hover, .fileitem.active { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }

.control-section { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.control-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--text); font-size: 12px; font-weight: 720; }
.control-label b { color: var(--teal); font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; min-height: 38px; display: inline-flex; align-items: center; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 650; user-select: none; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on, .chip:has(input:checked) { border-color: color-mix(in srgb, var(--teal) 48%, transparent); background: var(--teal-soft); color: var(--teal); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none; }
.chips.small { gap: 6px; margin-top: 7px; }
.chips.small .chip { min-height: 32px; padding: 6px 9px; font-size: 10px; }
.analysis-scope { display: flex; align-items: center; gap: 13px; margin: 22px 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.analysis-scope b { display: block; color: var(--ink); font-size: 12px; }
.analysis-scope p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }

/* Buttons */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; font-weight: 720; font-size: 12px; line-height: 1; transition: background .2s, border-color .2s, color .2s, box-shadow .2s, opacity .2s; }
.btn svg { width: 17px; height: 17px; }
.btn:hover { filter: brightness(1.05); }
.btn:active { opacity: .82; }
.btn:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, .chip:focus-within { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 2px; }
.btn.primary { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 10px 28px rgba(238,99,82,.18); }
.btn.secondary { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); box-shadow: none; }
.btn.secondary:hover { background: var(--surface-3); color: var(--ink); }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); color: var(--bad); }
.btn-lg { min-height: 50px; padding: 13px 19px; font-size: 13px; }
.analyze-btn { width: 100%; min-height: 52px; font-size: 14px; }
.analyze-btn[disabled] { cursor: wait; opacity: .68; filter: grayscale(.18); }
.analyze-btn.is-loading svg { animation: spin 1s linear infinite; }
.batch-btn { width: 100%; margin-top: 9px; }
.batch-btn span { min-width: 21px; height: 21px; display: inline-grid; place-items: center; margin-left: auto; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: 10px; }
.analysis-hint { margin: 10px 0 0; color: var(--muted-2); text-align: center; font-size: 10px; }
.privacy-note { display: flex; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.privacy-note svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--teal); }
.privacy-note b { display: block; margin-bottom: 2px; color: var(--text); font-size: 11px; }

/* Report */
.results { animation: reveal .45s ease both; }
.results-heading { padding-top: 4px; }
.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.overview { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.form-badge { display: flex; align-items: center; justify-content: center; padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 720; }
.form-badge::before { content: "TYPE"; margin-right: 8px; color: var(--primary-2); font-size: 9px; letter-spacing: .12em; }
.kpi { position: relative; overflow: hidden; min-height: 108px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.kpi::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--line-strong); }
.kpi:nth-child(2)::after { background: var(--primary); }
.kpi:nth-child(3)::after { background: var(--teal); }
.kpi:nth-child(4)::after { background: var(--a); }
.kpi-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.kpi-val { margin: 8px 0 5px; color: var(--ink); font-size: 28px; font-weight: 790; line-height: 1; letter-spacing: -.04em; }
.kpi-unit { margin-left: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
.kpi-sub { color: var(--muted-2); font-size: 9px; }
.kpi-val.bad { color: var(--bad); }
.kpi-val.warn { color: var(--warn); }
.kpi-val.ok { color: var(--ok); }
.tier-s { color: var(--s); }.tier-a { color: var(--a); }.tier-b { color: var(--b); }.tier-c { color: var(--c); }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.result-block, .batch-section { padding: 24px; }
.compliance-block { grid-column: 1 / -1; }
.result-title { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.result-title > span { min-width: 68px; padding-top: 5px; color: var(--primary-2); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.result-title h3 { margin: 0; color: var(--ink); font-size: 16px; }
.result-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

/* Risk cards */
.empty { padding: 16px; border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--ok) 8%, transparent); color: var(--ok); font-size: 12px; font-weight: 650; }
details.rule { margin-bottom: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
details.rule:hover { border-color: var(--line-strong); }
details.rule.escalated { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
details.rule > summary { list-style: none; min-height: 48px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
details.rule > summary::-webkit-details-marker { display: none; }
details.rule > summary b { color: var(--ink); font-size: 12px; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; font-size: 9px; font-weight: 780; }
.badge.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 9%, transparent); color: var(--bad); }
.badge.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); color: var(--warn); }
.badge.ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); color: var(--ok); }
.plat { margin-left: auto; color: var(--muted-2); font-size: 9px; }
.rule-body { padding: 13px 14px 15px; border-top: 1px solid var(--line); }
.clause, .fix { margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.fix { color: var(--text); }
.samples { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.samples li { color: var(--muted); font-size: 10px; }
.samples .ln { color: var(--primary-2); font-weight: 720; }
.samples code { padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text); white-space: normal; }

/* Hit score */
.hit-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hit-index { min-width: 70px; font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -.06em; }
.hit-tier { color: var(--ink); font-size: 13px; }
.hit-head .muted { font-size: 9px; line-height: 1.5; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.bar-label { color: var(--muted); font-size: 10px; }
.bar-track { height: 20px; overflow: hidden; border-radius: 6px; background: var(--surface-3); }
.bar-fill { height: 100%; min-width: 27px; display: flex; align-items: center; padding-left: 7px; border-radius: 6px; color: #fff; font-size: 9px; font-weight: 800; }
.bar-fill.ok { background: var(--ok); }.bar-fill.a { background: var(--a); }.bar-fill.warn { background: var(--warn); }.bar-fill.bad { background: var(--bad); }
.bar-ev { grid-column: 2; color: var(--muted-2); font-size: 9px; }
.bar-ev i { display: inline-block; margin: 0 4px 3px 0; padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-style: normal; }
.note { margin: 16px 0 0; padding: 11px 12px; border-left: 2px solid var(--warn); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--warn) 5%, transparent); color: var(--muted); font-size: 9px; line-height: 1.6; }

/* Match */
.gauge { --angle: calc(var(--p, 0) * 3.6deg); position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin: 4px auto 14px; border-radius: 50%; background: conic-gradient(var(--primary) var(--angle), var(--surface-3) 0); }
.gauge::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.gauge-inner { position: relative; z-index: 1; text-align: center; }
.gauge-val { color: var(--ink); font-size: 34px; font-weight: 800; letter-spacing: -.05em; }
.gauge-val span { color: var(--muted); font-size: 11px; }
.gauge-cap { max-width: 82px; color: var(--muted-2); font-size: 8px; line-height: 1.35; }
.hr-form { margin: 0 0 16px; text-align: center; color: var(--muted); font-size: 10px; }
.hr-cols { display: grid; gap: 14px; }
.hr-cols > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.hr-cols h4 { margin: 0 0 8px; color: var(--ink); font-size: 11px; }
.match, .gaps { margin: 0; padding-left: 17px; color: var(--muted); font-size: 10px; }
.match li, .gaps li { margin-bottom: 6px; }

/* Batch */
.batch-section { margin-top: 18px; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.batch-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 11px; }
.batch-table th, .batch-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; }
.batch-table th { color: var(--muted); background: var(--surface-2); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.batch-table tr:last-child td { border-bottom: 0; }
.batch-table tbody tr:hover { background: var(--surface-soft); }

/* Library */
.library-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.library-panel > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 92px; padding: 22px 26px; }
.library-panel > summary::-webkit-details-marker { display: none; }
.library-panel > summary > div { display: flex; align-items: center; gap: 12px; }
.library-panel > summary b { display: block; color: var(--ink); font-size: 15px; }
.library-panel > summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.library-panel > summary > svg { color: var(--muted); transition: transform .2s; }
.library-panel[open] > summary > svg { transform: rotate(180deg); }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 26px 26px; }
.lib-col { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.lib-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.lib-head h3 { margin: 0; color: var(--ink); font-size: 14px; }
.lib-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.wordlist { max-height: 190px; display: grid; gap: 6px; margin-bottom: 16px; overflow: auto; }
.wrow { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.wrow b { color: var(--text); }
.wkw { color: var(--muted-2); }
.del { min-width: 32px; min-height: 32px; margin-left: auto; border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--bad) 7%, transparent); color: var(--bad); }
.word-form { display: grid; gap: 12px; }
.word-form .field + .field { margin-top: 0; }
.form-row { display: flex; gap: 10px; }
.form-row .field { width: 130px; }
.form-row .field.grow { flex: 1; width: auto; }
.word-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.db-total { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.db-total > strong { color: var(--primary-2); font-size: 44px; line-height: 1; letter-spacing: -.05em; }
.db-total > span { color: var(--text); font-size: 11px; font-weight: 700; }
.db-total small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 500; }
.db-breakdown { display: flex; gap: 8px; margin: 10px 0 16px; }
.db-breakdown span { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 9px; }
.db-breakdown b { color: var(--teal); font-size: 12px; }
.lib-col > p.muted { font-size: 10px; line-height: 1.7; }

/* Footer & toast */
.foot { width: min(var(--max), calc(100% - 48px)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; margin: 0 auto; padding: 28px 0 34px; border-top: 1px solid var(--line); color: var(--muted); }
.brand.compact .brand-mark { width: 32px; height: 32px; }
.brand.compact .brand-mark svg { width: 18px; height: 18px; }
.foot p { margin: 0; font-size: 10px; }
.foot-stats { flex: 0 0 100%; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9px; font-variant-numeric: tabular-nums; }
.foot-stats span { white-space: nowrap; }
.foot-stats span + span::before { content: "·"; margin-right: 14px; color: var(--line-strong); }
.foot-stats b { color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: inherit; font-weight: 650; }
.foot-stats #statsStatus.is-ready { color: var(--muted-2); }
.foot-stats #statsStatus.is-error { color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; max-width: min(420px, calc(100% - 32px)); padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .24s, transform .24s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes scan { 0%,100% { left: 2%; opacity: .35; } 50% { left: 98%; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr .72fr; gap: 38px; }
  .hero h1 { font-size: clamp(45px, 5.5vw, 60px); }
  .overview { grid-template-columns: repeat(4, 1fr); }
  .form-badge { grid-column: 1 / -1; }
  .work-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
}

@media (max-width: 860px) {
  .topbar { padding: 0 20px; }
  .topnav { display: none; }
  .top-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 64px; }
  .fingerprint-card { min-height: 290px; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .proof-strip div:nth-child(2) { border-right: 0; }
  .proof-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .work-grid { grid-template-columns: 1fr; }
  .control-panel { position: static; }
  .report-grid { grid-template-columns: 1fr; }
  .compliance-block { grid-column: auto; }
  .lib-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; padding: 0 16px; }
  .local-status { display: none; }
  .official-home { padding: 8px 10px; }
  .official-home-full { display: none; }
  .official-home-short { display: inline; }
  .brand b { font-size: 13px; }
  .brand small { font-size: 8px; }
  .hero, .proof-strip, .section-shell, .foot { width: min(100% - 28px, var(--max)); }
  .hero { min-height: 0; padding: 48px 0 34px; gap: 36px; }
  .hero h1 { font-size: clamp(40px, 13vw, 55px); }
  .hero-lead { font-size: 14px; }
  .hero-cta { align-items: flex-start; flex-direction: column; }
  .fingerprint-card { padding: 20px; }
  .fingerprint-number strong { font-size: 60px; }
  .proof-strip { margin-bottom: 56px; }
  .proof-strip div { min-height: 76px; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
  .proof-strip b { font-size: 21px; }
  .section-shell { margin-bottom: 64px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-heading h2 { font-size: 31px; }
  .editor-panel, .control-panel, .result-block, .batch-section { padding: 18px; border-radius: 16px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  textarea { min-height: 270px; }
  .dropzone { grid-template-columns: auto 1fr; }
  .dropzone > .btn { grid-column: 1 / -1; width: 100%; }
  .overview { grid-template-columns: 1fr 1fr; }
  .form-badge { grid-column: 1 / -1; }
  .kpi { min-height: 102px; }
  .report-actions { width: 100%; justify-content: flex-start; }
  .report-actions .btn { flex: 1; }
  .result-title { gap: 8px; }
  .result-title > span { min-width: 55px; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-ev { grid-column: 1; }
  .library-panel > summary { padding: 18px; }
  .lib-grid { padding: 0 14px 14px; }
  .lib-col { padding: 16px; }
  .form-row { flex-direction: column; }
  .form-row .field { width: 100%; }
  .word-actions .btn { flex: 1; }
  .foot { align-items: flex-start; flex-direction: column; }
  .foot-stats { justify-content: flex-start; gap: 5px 10px; }
  .foot-stats span + span::before { margin-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  :root, :root[data-theme="light"] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #fafafa; --surface-3: #f2f2f2; --ink: #111; --text: #222; --muted: #555; --muted-2: #666; --line: #ddd; --line-strong: #bbb; }
  body { background: #fff; }
  .topbar, .hero, .proof-strip, .workspace, .library, .foot, .report-actions { display: none !important; }
  .results { width: 100%; margin: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}

/* SHUCE UNIFIED RETURN HOME */
#shuce-home-return {
  box-sizing: border-box !important;
  width: 148px !important;
  height: 54px !important;
  padding: 8px 13px 8px 9px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  position: fixed !important;
  right: max(18px, env(safe-area-inset-right)) !important;
  bottom: max(18px, env(safe-area-inset-bottom)) !important;
  z-index: 2147483646 !important;
  color: #f7fbff !important;
  background: linear-gradient(135deg, rgba(6, 25, 58, .96), rgba(8, 55, 103, .94)) !important;
  border: 1px solid rgba(101, 218, 255, .52) !important;
  border-radius: 17px !important;
  box-shadow: 0 14px 34px rgba(0, 10, 31, .34), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif !important;
  line-height: 1 !important;
  text-decoration: none !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease !important;
}
#shuce-home-return:hover {
  color: #fff !important;
  border-color: #62ddff !important;
  box-shadow: 0 17px 40px rgba(0, 10, 31, .42), 0 0 24px rgba(62, 205, 255, .16) !important;
  transform: translateY(-3px) !important;
}
#shuce-home-return:focus-visible { outline: 2px solid #66e3ff !important; outline-offset: 3px !important; }
#shuce-home-return .shuce-home-icon {
  box-sizing: border-box !important;
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
  color: #071a33 !important;
  background: linear-gradient(145deg, #76e8ff, #28afd9) !important;
  border-radius: 11px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55) !important;
}
#shuce-home-return .shuce-home-icon svg { width: 20px !important; height: 20px !important; display: block !important; }
#shuce-home-return .shuce-home-copy { min-width: 0 !important; display: grid !important; gap: 4px !important; }
#shuce-home-return .shuce-home-copy small {
  color: rgba(126, 225, 255, .76) !important;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace !important;
  font-size: 7px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  white-space: nowrap !important;
}
#shuce-home-return .shuce-home-copy strong {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: .04em !important;
  white-space: nowrap !important;
}
@media (max-width: 640px) {
  #shuce-home-return {
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 16px !important;
  }
  #shuce-home-return .shuce-home-icon { width: 34px !important; height: 34px !important; }
  #shuce-home-return .shuce-home-copy { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  #shuce-home-return { transition: none !important; }
}

