:root {
  --paper: #eef3f9;
  --paper-deep: #e2eaf4;
  --card: #ffffff;
  --card-soft: #f5f8fd;
  --ink: #0b1b31;
  --ink-2: #1b304d;
  --muted: #5d708b;
  --muted-2: #8998ae;
  --line: rgba(16, 39, 75, 0.10);
  --line-strong: rgba(16, 39, 75, 0.18);
  --coral: #315cf4;
  --coral-deep: #2044c5;
  --coral-soft: #e8eeff;
  --teal: #078b78;
  --teal-soft: #e1f5f0;
  --gold: #a86e0b;
  --danger: #c73c48;
  --danger-soft: #fdebed;
  --lime: #a9c8ff;
  --blue-ink: #08182c;
  --shadow-lg: 0 30px 80px rgba(12, 30, 58, 0.16), 0 4px 16px rgba(12, 30, 58, 0.05);
  --shadow-sm: 0 12px 34px rgba(12, 30, 58, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --sans: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --serif: var(--sans);
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 1120px;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(49, 92, 244, 0.10), transparent 62%),
    radial-gradient(900px 540px at -6% 34%, rgba(7, 139, 120, 0.06), transparent 58%),
    var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
svg { display: block; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 24, 44, 0.94);
  backdrop-filter: blur(18px) saturate(130%);
}
.topbar-inner {
  width: min(1440px, calc(100vw - 64px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(145deg, #4b79ff, #2448d8);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -1px;
  box-shadow: 0 8px 20px rgba(49, 92, 244, .34), inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: 5px;
  top: 5px;
  border-radius: 50%;
  background: #8fe3cf;
  box-shadow: 0 0 0 2px rgba(8, 24, 44, .6);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { color: #f6f9ff; font-size: 18px; letter-spacing: .5px; }
.brand-copy span { margin-top: 3px; color: #93a8c6; font-size: 11px; letter-spacing: 1.5px; }
.brand-divider { width: 1px; height: 26px; margin: 0 6px; background: rgba(255,255,255,.14); }
.brand-en {
  color: #6e86a7;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.8px;
  white-space: nowrap;
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.status-pill {
  height: 33px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: #a9bad2;
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  transition: border-color .2s, background .2s, color .2s;
}
.status-pill:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: #f6f9ff; }
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75859d;
  box-shadow: 0 0 0 3px rgba(117, 133, 157, 0.13);
}
.status-pill.ok { color: #7fe4ca; border-color: rgba(127, 228, 202, .26); background: rgba(7, 139, 120, .16); }
.status-pill.ok .status-dot { background: #58d8b8; box-shadow: 0 0 0 3px rgba(88, 216, 184, .13); }
.status-pill.warn { color: #efc37a; border-color: rgba(239, 195, 122, .28); background: rgba(168, 110, 11, .16); }
.status-pill.warn .status-dot { background: #efc37a; }
.status-pill.bad { color: #ff9aa4; border-color: rgba(255, 154, 164, .25); background: rgba(199, 60, 72, .16); }
.status-pill.bad .status-dot { background: #ff8e99; }
.help-btn {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  color: #a9bad2;
  background: rgba(255,255,255,.04);
  transition: .2s;
}
.help-btn:hover { color: #ffffff; border-color: rgba(255,255,255,.32); transform: rotate(6deg); }
.help-btn svg { width: 18px; height: 18px; fill: currentColor; }
.version-pill {
  padding-left: 9px;
  color: #6e86a7;
  font-family: var(--mono);
  font-size: 10px;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1400px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 26px 0 36px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  align-items: center;
  gap: 52px;
  padding: 46px 48px 44px;
  border-radius: 28px;
  color: #f2f7ff;
  background:
    radial-gradient(720px 420px at 92% -10%, rgba(65, 111, 255, .28), transparent 62%),
    radial-gradient(620px 380px at -8% 110%, rgba(7, 139, 120, .20), transparent 64%),
    #0b1b31;
  box-shadow: 0 34px 80px rgba(9, 25, 48, .22);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(100deg, #000, transparent 72%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  right: -190px;
  top: -240px;
  border: 1px solid rgba(130, 170, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(130, 170, 255, .045), 0 0 0 96px rgba(130, 170, 255, .025);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #91a8c7;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.7px;
}
.eyebrow-line { width: 28px; height: 1px; background: #628dff; }
.hero h1 {
  max-width: 780px;
  margin: 20px 0 20px;
  font-size: clamp(48px, 4.9vw, 70px);
  line-height: 1.06;
  letter-spacing: -2.8px;
  font-weight: 800;
  text-wrap: balance;
}
.hero h1 em {
  color: #8db7ff;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 800;
  letter-spacing: -2.6px;
}
.hero-lead {
  margin: 0;
  max-width: 630px;
  color: #a7bad3;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: .1px;
}
.hero-lead strong { color: #f6f9ff; font-weight: 700; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: #c6d5e9;
  background: rgba(255, 255, 255, .055);
  font-size: 10.5px;
  letter-spacing: .3px;
}
.hero-tags span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7fa7ff;
}

.mini-label {
  display: block;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.protocol-card {
  position: relative;
  z-index: 1;
  padding: 20px 20px 16px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 18px;
  background: rgba(7, 22, 42, .58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.protocol-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.protocol-head .mini-label { color: #7f98ba; }
.protocol-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #81e5cb;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 1.2px;
}
.protocol-ready i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #66ddbe;
  box-shadow: 0 0 0 3px rgba(102, 221, 190, .13);
  animation: blink 1.9s infinite;
}
.protocol-list { margin-top: 13px; }
.protocol-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.protocol-item > span {
  padding-top: 1px;
  color: #7fa6ff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
}
.protocol-item b { display: block; color: #f2f7ff; font-size: 12.5px; font-weight: 650; }
.protocol-item p { margin: 4px 0 0; color: #9cb1cd; font-size: 10.5px; line-height: 1.65; }
.protocol-foot {
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #7089a9;
  font-size: 9.5px;
  letter-spacing: .3px;
}

.composer {
  margin-top: 22px;
  padding: 30px;
  border: 1px solid #dbe5f2;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 20px 54px rgba(12, 30, 58, .075);
}
.image-composer {
  margin-top: 22px;
  padding: 24px 26px;
  border: 1px solid #dbe5f2;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, #ffffff, #f5f9ff);
  box-shadow: 0 16px 42px rgba(12, 30, 58, .06);
}
.image-index { background: #0f9b8e; box-shadow: 0 6px 14px rgba(15, 155, 142, .22); }
.image-composer .section-heading-main h2 { margin: 1px 0 5px; font-size: 21px; }
.image-composer .section-heading-main p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.image-upload-row { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; margin-top: 18px; }
.image-upload-zone {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  border: 1px dashed #b9cbe2;
  border-radius: 14px;
  color: var(--muted);
  background: #f8fbff;
  text-align: center;
}
.image-upload-zone:hover { border-color: var(--coral); background: #f4f8ff; }
.image-upload-zone.dragging { border-color: var(--coral); background: #eef4ff; }
.image-upload-zone img { width: 100%; height: 190px; object-fit: contain; background: #eef4fb; }
.image-upload-zone span { position: absolute; inset: 0; display: grid; place-content: center; gap: 5px; }
.image-upload-zone img:not(.hidden) + span { position: static; padding: 9px; }
.image-upload-zone b { color: var(--ink); font-size: 13px; }
.image-upload-zone small { color: var(--muted-2); font-size: 10px; }
.image-upload-actions { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px; border: 1px solid #e0e8f4; border-radius: 14px; background: #f5f8fd; }
.image-upload-actions .mini-field input { background: #fff; }
.image-note { margin-top: 10px; color: var(--muted-2); font-size: 9.5px; line-height: 1.6; }
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.section-heading-main { display: flex; gap: 15px; align-items: flex-start; }
.section-index {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: var(--coral);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(49, 92, 244, .22);
}
.section-heading h2 { margin: 1px 0 5px; font-size: 21px; letter-spacing: -.5px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.readonly-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(30, 121, 103, .2);
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
  white-space: nowrap;
}
.readonly-chip svg { width: 13px; height: 13px; fill: currentColor; }
.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, .5fr);
  gap: 24px;
  margin-top: 24px;
}
.input-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid #d8e2f0;
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.input-panel:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(49, 92, 244, .09); }
.input-panel textarea {
  width: 100%;
  min-height: 167px;
  padding: 18px 19px 14px;
  border: 0;
  outline: none;
  resize: vertical;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
}
.input-panel textarea::placeholder { color: #a2afc2; }
.input-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 15px;
  border-top: 1px solid #e3eaf5;
  background: #f2f6fc;
}
.count-chip { color: var(--coral-deep); font-size: 11px; font-weight: 700; }
.input-hint { color: var(--muted-2); font-size: 10px; }
.run-panel {
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid #e0e8f4;
  border-radius: 14px;
  background: #f5f8fd;
}
.date-field { display: flex; flex-direction: column; gap: 7px; }
.date-field span { color: var(--muted); font-size: 11px; font-weight: 600; }
.date-field em { color: var(--muted-2); font-style: normal; font-weight: 400; }
.date-field input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #dbe5f2;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  font-family: var(--mono);
  font-size: 12px;
}
.date-field input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(49, 92, 244, .08); }
.batch-fields { display: grid; gap: 8px; margin-top: 11px; }
.mini-field { display: flex; flex-direction: column; gap: 5px; }
.mini-field span { color: var(--muted); font-size: 10px; font-weight: 600; }
.mini-field input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  font-size: 10.5px;
}
.mini-field input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(49, 92, 244, .08); }
.mini-field input::placeholder { color: #a2afc2; }
.rule-preview { display: grid; gap: 9px; margin: 15px 0 17px; }
.rule-preview div { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.rule-preview b { color: var(--ink-2); font-weight: 700; }
.rule-dot { flex: 0 0 auto; width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; }
.rule-dot.coral { background: var(--coral); }
.rule-dot.teal { background: var(--teal); }
.rule-dot.ink { background: var(--ink); }
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: var(--coral);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .4px;
  box-shadow: 0 10px 22px rgba(49, 92, 244, .22);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.primary-btn:hover { background: var(--coral-deep); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(49, 92, 244, .28); }
.primary-btn:active { transform: translateY(0); }
.primary-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.primary-btn.danger { background: var(--danger); }
.run-note { margin: 12px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.55; text-align: center; }

.tasks-section { padding-top: 54px; }
.tasks-heading { align-items: flex-end; }
.task-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid #dce6f2; border-radius: 999px; background: rgba(255, 255, 255, .68); }
.task-filters button {
  height: 31px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  transition: .2s;
}
.task-filters button b { margin-left: 3px; color: var(--muted-2); font-family: var(--mono); font-size: 9px; }
.task-filters button:hover { color: var(--ink); background: #edf3fb; }
.task-filters button.active { color: #ffffff; background: var(--coral); }
.task-filters button.active b { color: rgba(255, 255, 255, .65); }

.task-list { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.task-list.no-anim .task-card { animation: none; }
.batch-group { border: 1px solid #dce6f2; border-radius: 18px; background: rgba(255, 255, 255, .55); padding: 16px; }
.batch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 2px 4px 14px; }
.batch-head-copy { min-width: 0; }
.batch-kicker { color: var(--coral); font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.3px; }
.batch-title-row { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.batch-title { margin: 0; min-width: 0; overflow: hidden; font-size: 15px; letter-spacing: -.2px; text-overflow: ellipsis; white-space: nowrap; }
.batch-edit { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; color: var(--muted-2); background: transparent; }
.batch-edit:hover { color: var(--coral); background: var(--coral-soft); }
.batch-remove {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 23px;
  padding: 0 7px;
  border: 1px solid #efd6da;
  border-radius: 6px;
  color: #b33d49;
  background: #fff9fa;
  font-size: 9px;
  font-weight: 700;
}
.batch-remove:hover { color: var(--danger); border-color: #e2a7b0; background: var(--danger-soft); }
.batch-remove svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.batch-edit svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.batch-remark { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.batch-meta {
  flex: 0 0 auto;
  min-width: 162px;
  padding: 8px 11px;
  border: 1px solid #d9e4f5;
  border-radius: 10px;
  background: #f6f9ff;
  text-align: right;
}
.batch-meta-label { display: block; color: #5f7aa0; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.batch-meta b { display: block; margin-top: 3px; color: #10264a; font-family: var(--sans); font-size: 13px; font-weight: 800; white-space: nowrap; }
.batch-meta-sub { display: block; margin-top: 3px; color: #7f90a9; font-family: var(--mono); font-size: 9px; }
.batch-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.batch-tasks .task-card { background: var(--card); }
.drawer-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 55vh; color: var(--muted); font-size: 11px; }
.btn-spinner.dark { border-color: rgba(16,39,75,.18); border-top-color: var(--ink); }
.task-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid #dce6f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(12, 30, 58, .045);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  animation: rise .45s ease both;
}
.task-card:hover { transform: translateY(-3px); border-color: #c6d6ea; box-shadow: 0 18px 40px rgba(12, 30, 58, .10); }
.task-card.is-running { border-color: rgba(49, 92, 244, .36); }
.task-card.is-running::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--coral);
  animation: breathe 2s ease-in-out infinite;
}
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-status { display: flex; align-items: center; gap: 7px; padding-top: 4px; color: var(--muted); font-size: 10.5px; letter-spacing: .2px; }
.task-status .dot { width: 6px; height: 6px; border-radius: 50%; background: #a3b1c4; }
.task-card.is-running .task-status { color: var(--coral-deep); }
.task-card.is-running .task-status .dot { background: var(--coral); animation: blink 1.4s infinite; }
.task-card.is-paused .task-status { color: var(--gold); }
.task-card.is-paused .task-status .dot { background: var(--gold); }
.task-card.is-done .task-status { color: var(--teal); }
.task-card.is-done .task-status .dot { background: var(--teal); }
.task-card.is-error .task-status { color: var(--danger); }
.task-card.is-error .task-status .dot { background: var(--danger); }
.task-time-block {
  flex: 0 0 auto;
  min-width: 150px;
  padding: 8px 11px 9px;
  border: 1px solid #d9e4f5;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7faff, #edf4ff);
  text-align: right;
}
.task-time-label { display: block; color: #5f7aa0; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.task-time { display: block; margin-top: 3px; color: #10264a; font-family: var(--sans); font-size: 14px; font-weight: 800; letter-spacing: .1px; white-space: nowrap; }
.task-time-sub { display: block; margin-top: 3px; color: #7f90a9; font-family: var(--mono); font-size: 9px; }
.task-main { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 13px; align-items: start; margin-top: 15px; }
.source-thumb {
  position: relative;
  width: 70px;
  height: 82px;
  overflow: hidden;
  border: 1px solid #dde6f2;
  border-radius: 10px;
  background: #f2f6fc;
}
.source-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.source-thumb .thumb-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted-2); font-family: var(--sans); font-size: 22px; }
.task-info { min-width: 0; }
.task-info h3 { margin: 1px 0 6px; font-size: 14px; line-height: 1.45; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-info .task-url { display: block; overflow: hidden; color: var(--muted-2); font-family: var(--mono); font-size: 9px; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.task-info .task-sku { display: inline-flex; margin-top: 6px; color: var(--muted-2); font-family: var(--mono); font-size: 9px; }
.verdict-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 64px;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.verdict-chip.has { color: var(--teal); background: var(--teal-soft); }
.verdict-chip.none { color: #5d708b; background: #eaf0f8; }
.verdict-chip.error, .verdict-chip.cancelled { color: var(--danger); background: var(--danger-soft); }
.verdict-chip.pending { color: var(--gold); background: #fff4df; }
.task-error { margin-top: 9px; padding: 8px 10px; border-radius: 8px; color: var(--danger); background: var(--danger-soft); font-size: 10px; line-height: 1.5; }
.task-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #e7edf6; }
.task-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.task-stat span { overflow: hidden; color: #405572; font-size: 11px; font-weight: 700; letter-spacing: .15px; text-overflow: ellipsis; white-space: nowrap; }
.task-stat b { color: var(--ink); font-family: var(--sans); font-size: 16px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-stat b.teal { color: var(--teal); }
.task-stat b.amber { color: var(--gold); }
.task-stat b.sales { color: var(--coral-deep); }
.task-progress { margin-top: 13px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.progress-head span:last-child { font-family: var(--mono); color: var(--muted-2); }
.progress-bar { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #e7eef8; }
.progress-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--coral); transition: width .5s ease; }
.task-card.is-done .progress-bar i { background: var(--teal); }
.task-card.is-paused .progress-bar i { background: var(--gold); }
.task-card.is-error .progress-bar i { background: var(--danger); }
.task-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.task-actions .detail-btn {
  flex: 1;
  height: 34px;
  border: 1px solid #17345c;
  border-radius: 8px;
  color: #ffffff;
  background: #17345c;
  font-size: 10.5px;
  font-weight: 700;
  transition: .2s;
}
.task-actions .detail-btn:hover { background: #0d2446; border-color: #0d2446; }
.icon-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  transition: .2s;
}
.icon-action:hover { color: var(--coral); border-color: var(--coral); }
.icon-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pause-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(168, 110, 11, .26);
  border-radius: 8px;
  color: #8c5a06;
  background: #fff5df;
  font-size: 10.5px;
  font-weight: 700;
  transition: .2s;
}
.pause-btn:hover { background: #ffe9be; }
.pause-btn.resume { color: var(--teal); border-color: rgba(7, 139, 120, .28); background: var(--teal-soft); }
.pause-btn svg { width: 12px; height: 12px; fill: currentColor; }
.hit-preview { display: flex; align-items: center; gap: -5px; margin-top: 11px; }
.hit-preview .preview-thumb {
  width: 25px; height: 25px; margin-left: -5px; overflow: hidden;
  border: 1.5px solid var(--card); border-radius: 50%; background: #eee9df;
}
.hit-preview .preview-thumb:first-child { margin-left: 0; }
.hit-preview img { width: 100%; height: 100%; object-fit: cover; }
.hit-preview span { margin-left: 7px; color: var(--muted-2); font-size: 9px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 70px;
  text-align: center;
}
.empty-visual { position: relative; width: 220px; height: 142px; margin-bottom: 18px; }
.empty-frame {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
}
.empty-frame.back { width: 160px; height: 104px; left: 18px; top: 3px; transform: rotate(-6deg); opacity: .5; }
.empty-frame.front { width: 176px; height: 112px; right: 2px; bottom: 4px; padding: 17px; transform: rotate(3deg); box-shadow: var(--shadow-sm); overflow: hidden; }
.empty-scan { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0 40%, rgba(49,92,244,.1) 45%, transparent 54%); animation: scan 3.4s ease-in-out infinite; }
.empty-tag { display: inline-block; padding: 3px 6px; border-radius: 4px; color: var(--teal); background: var(--teal-soft); font-size: 8px; font-weight: 800; }
.empty-line { display: block; height: 5px; margin-top: 9px; border-radius: 4px; background: #dfe8f4; }
.empty-line.w1 { width: 74%; }
.empty-line.w2 { width: 92%; margin-top: 7px; }
.empty-line.w3 { width: 56%; margin-top: 7px; }
.empty-cursor { position: absolute; right: 33px; bottom: -2px; width: 18px; color: var(--coral); filter: drop-shadow(0 2px 3px rgba(49,92,244,.2)); }
.empty-cursor svg { fill: currentColor; }
.empty-state h3 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.empty-state p { max-width: 430px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.75; }

.rules-section {
  display: grid;
  grid-template-columns: .84fr 1.16fr;
  gap: 62px;
  margin-top: 64px;
  padding: 42px 0 20px;
  border-top: 1px solid #dbe5f2;
}
.rules-intro h2 { margin: 18px 0 15px; font-size: 33px; line-height: 1.2; letter-spacing: -1.1px; }
.rules-intro p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rules-grid article {
  padding: 20px;
  border: 1px solid #dce6f2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(12, 30, 58, .035);
}
.rule-number { color: var(--coral); font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.rules-grid h3 { margin: 22px 0 8px; font-size: 14px; }
.rules-grid p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding: 20px 0 10px;
  border-top: 1px solid #dbe5f2;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2px;
}

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer.hidden { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 20, 38, .48);
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(830px, 94vw);
  overflow: auto;
  background: #f2f6fb;
  box-shadow: -30px 0 80px rgba(7, 20, 38, .26);
  animation: slideIn .34s cubic-bezier(.22,.7,.25,1);
}
.drawer-panel::-webkit-scrollbar { width: 9px; }
.drawer-panel::-webkit-scrollbar-thumb { background: #c3d1e3; border: 2px solid #f2f6fb; border-radius: 9px; }
.drawer-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid #dbe5f2;
  background: rgba(242, 246, 251, .94);
  backdrop-filter: blur(14px);
}
.drawer-head .mini-label { color: var(--coral); }
.drawer-head h2 { margin: 7px 0 5px; font-size: 21px; letter-spacing: -.5px; }
.drawer-head p { max-width: 570px; margin: 0; overflow: hidden; color: var(--muted-2); font-family: var(--mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-close, .modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e1ee;
  border-radius: 50%;
  color: var(--muted);
  background: #ffffff;
  font-size: 20px;
  line-height: 1;
}
.drawer-close:hover, .modal-close:hover { color: var(--coral); border-color: var(--coral); }
.drawer-body { padding: 24px 28px 40px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.drawer-actions .secondary-btn, .drawer-actions .text-btn { min-height: 32px; }
.detail-batch-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
}
.detail-batch-line .mini-label { margin-right: 2px; color: var(--coral); }
.detail-batch-line b { color: var(--ink); font-size: 10.5px; }
.detail-batch-line button { margin-left: 2px; padding: 2px 5px; border: 0; color: var(--coral-deep); background: transparent; font-size: 9px; font-weight: 700; }
.detail-batch-line button:hover { text-decoration: underline; }
.detail-verdict {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 23px;
  border-radius: 16px;
  color: #f2f7ff;
  background:
    radial-gradient(480px 220px at 100% 0%, rgba(73, 118, 255, .28), transparent 70%),
    #0b1b31;
}
.detail-verdict::after {
  content: attr(data-mark);
  position: absolute;
  right: 20px;
  bottom: -10px;
  color: rgba(255,255,255,.055);
  font-family: var(--mono);
  font-size: 76px;
  font-weight: 800;
  letter-spacing: -5px;
}
.detail-verdict .verdict-kicker { color: #8fa7c8; font-family: var(--mono); font-size: 9px; letter-spacing: 1.8px; }
.detail-verdict h3 { margin: 9px 0 5px; font-family: var(--sans); font-size: 30px; line-height: 1.08; letter-spacing: -1px; }
.detail-verdict.has h3 { color: #8db7ff; }
.detail-verdict.none h3 { color: #e6eefb; }
.detail-verdict.error h3, .detail-verdict.cancelled h3 { color: #ff9aa4; }
.detail-verdict p { margin: 0; color: #9db2cf; font-size: 10.5px; line-height: 1.7; }
.verdict-count { position: relative; z-index: 1; text-align: right; }
.verdict-count b { display: block; color: #8db7ff; font-family: var(--mono); font-size: 35px; line-height: 1; }
.verdict-count span { display: block; margin-top: 4px; color: #7e94b3; font-size: 9px; }
.feedback-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #dbe5f2;
  border-radius: 13px;
  background: #ffffff;
}
.feedback-copy { min-width: 0; }
.feedback-copy .mini-label { color: var(--teal); }
.feedback-copy strong { display: block; margin-top: 4px; font-size: 11px; }
.feedback-copy p { margin: 3px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.55; }
.feedback-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.feedback-btn {
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--card);
  font-size: 9.5px;
  font-weight: 600;
}
.feedback-btn:hover { color: var(--ink); border-color: var(--ink); }
.feedback-btn.active-correct { color: var(--teal); border-color: rgba(30,121,103,.32); background: var(--teal-soft); }
.feedback-btn.active-wrong { color: var(--danger); border-color: rgba(184,61,53,.28); background: var(--danger-soft); }
.feedback-result { display: inline-flex; align-items: center; gap: 5px; margin-left: 7px; padding: 3px 6px; border-radius: 5px; color: var(--teal); background: var(--teal-soft); font-size: 8px; font-weight: 700; }
.feedback-result.wrong { color: var(--danger); background: var(--danger-soft); }
.feedback-form {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}
.feedback-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.feedback-form-head strong { font-size: 11px; }
.feedback-form-head span { color: var(--muted-2); font-family: var(--mono); font-size: 8.5px; }
.feedback-choice { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.feedback-choice > span, .feedback-label { color: var(--muted); font-size: 10px; }
.feedback-choice label { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 11px; cursor: pointer; }
.feedback-choice input { accent-color: var(--teal); }
.feedback-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px; margin-bottom: 9px; }
.feedback-form select, .feedback-form textarea, .stack-field input, .stack-field textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: var(--card-soft);
  font-size: 10px;
}
.feedback-form textarea { min-height: 54px; resize: vertical; line-height: 1.6; }
.feedback-form select:focus, .feedback-form textarea:focus, .stack-field input:focus, .stack-field textarea:focus { border-color: var(--ink); }
.feedback-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.feedback-form-foot .secondary-btn, .feedback-form-foot .primary-btn { min-height: 32px; font-size: 10px; }
.feedback-note { margin: 8px 0 0; color: var(--muted-2); font-size: 8.5px; line-height: 1.55; }
.stack-field { display: block; margin-top: 12px; }
.stack-field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.stack-field input, .stack-field textarea { background: #f4f8fd; }
.batch-edit-card { width: min(480px, 100%); }
.batch-edit-card h2 { margin-bottom: 8px; }
.detail-section { margin-top: 24px; }
.detail-metrics {
  display: grid;
  grid-template-columns: .8fr .8fr 1.3fr 1fr 1.2fr;
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #e3ebf5;
}
.detail-metrics > div { padding: 12px 14px; background: #ffffff; }
.detail-metrics span { display: block; color: #405572; font-size: 10.5px; font-weight: 700; }
.detail-metrics b { display: inline-block; margin-top: 5px; color: var(--ink); font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.detail-metrics b.amber { color: var(--gold); }
.detail-metrics b.sales { color: var(--coral-deep); }
.detail-metrics small { display: block; margin-top: 3px; overflow: hidden; color: #6d7f99; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.detail-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.detail-section-head h3 { margin: 0; font-size: 14px; letter-spacing: -.2px; }
.detail-section-head span { color: var(--muted-2); font-family: var(--mono); font-size: 9px; }
.source-card {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 17px;
  padding: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: var(--card);
}
.source-image {
  width: 106px;
  height: 126px;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f6fc;
  cursor: zoom-in;
}
.source-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.source-body { min-width: 0; }
.source-body h4 { margin: 1px 0 7px; font-size: 14px; line-height: 1.5; }
.source-url { display: block; overflow: hidden; color: var(--muted-2); font-family: var(--mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.source-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.fact { min-width: 0; }
.fact span { display: block; color: var(--muted-2); font-size: 9px; }
.fact b { display: block; margin-top: 4px; overflow: hidden; color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.fact b.teal { color: var(--teal); }
.fact b.coral { color: var(--coral-deep); }
.round-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.round-card {
  padding: 15px;
  border: 1px solid #dce6f2;
  border-radius: 13px;
  background: #ffffff;
}
.round-card .round-top { display: flex; justify-content: space-between; align-items: center; }
.round-card .round-top span:first-child { color: var(--muted); font-size: 10px; }
.round-card .round-state { padding: 3px 6px; border-radius: 5px; color: var(--teal); background: var(--teal-soft); font-size: 8px; font-weight: 700; }
.round-card .round-state.skip { color: var(--muted); background: #e9eff8; }
.round-card .round-state.fail { color: var(--danger); background: var(--danger-soft); }
.round-card .round-num { margin-top: 12px; font-family: var(--mono); font-size: 23px; font-weight: 600; letter-spacing: -1px; }
.round-card .round-num small { margin-left: 3px; color: var(--muted-2); font-family: var(--sans); font-size: 9px; font-weight: 400; letter-spacing: 0; }
.round-card .round-meta { margin-top: 7px; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.round-card .round-error { margin-top: 7px; color: var(--danger); font-size: 9px; line-height: 1.5; }

.tab-bar { display: flex; gap: 4px; padding: 4px; border: 1px solid #dbe5f2; border-radius: 11px; background: #f5f8fd; }
.tab-bar button { flex: 1; height: 31px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 10px; }
.tab-bar button.active { color: var(--coral-deep); background: #ffffff; box-shadow: 0 2px 8px rgba(16,39,75,.08); font-weight: 700; }
.tab-panel { margin-top: 12px; }

.hit-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 13px;
  margin-bottom: 9px;
  border: 1px solid #dde6f2;
  border-radius: 13px;
  background: var(--card);
}
.hit-image { position: relative; width: 88px; height: 104px; overflow: hidden; border-radius: 9px; background: #f2f6fc; cursor: zoom-in; }
.hit-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.market-badge {
  position: absolute; left: 5px; bottom: 5px;
  padding: 3px 6px; border-radius: 4px;
  color: #ffffff; background: rgba(8,24,44,.82);
  font-size: 8px; font-weight: 700;
}
.market-badge.local { background: var(--teal); }
.hit-body { min-width: 0; }
.hit-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hit-title { margin: 1px 0 7px; font-size: 12px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.confidence { flex: 0 0 auto; color: var(--teal); font-family: var(--mono); font-size: 9px; }
.hit-facts { display: flex; flex-wrap: wrap; gap: 5px 15px; color: var(--muted); font-size: 9.5px; }
.hit-facts b { color: var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.hit-facts em { color: var(--muted-2); font-style: normal; font-size: 8.5px; }
.hit-reason { margin-top: 9px; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.gallery-note { margin-top: 4px; color: #9b7c48; font-size: 9px; line-height: 1.5; }
.detail-gallery { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; }
.detail-gallery-thumb { width: 32px; height: 38px; padding: 1px; overflow: hidden; border: 1px solid #dbe5f2; border-radius: 5px; background: #f5f8fd; }
.detail-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.detail-gallery > span { color: var(--muted-2); font-size: 8.5px; }
.hit-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.hit-links a { color: var(--coral-deep); font-size: 9.5px; font-weight: 700; }
.hit-links a:hover { text-decoration: underline; }
.hit-links a.compare-link {
  padding: 3px 7px;
  border: 1px solid #c9d8ee;
  border-radius: 5px;
  background: #f5f9ff;
  text-decoration: none;
}
.hit-links a.compare-link:hover { border-color: var(--coral); background: var(--coral-soft); }
.hit-review-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #e1e9f4;
}
.hit-review-label { flex: 0 0 100%; margin-right: 0; color: #70849e; font-size: 10px; line-height: 1.5; }
.hit-review-btn {
  height: 29px;
  padding: 0 10px;
  border: 1px solid #d8e2f0;
  border-radius: 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 10px;
  font-weight: 700;
  transition: .2s;
}
.hit-review-btn:hover { color: var(--ink); border-color: #b9cbe2; background: #f5f9ff; }
.hit-review-btn.same.active { color: var(--teal); border-color: rgba(7,139,120,.28); background: var(--teal-soft); }
.hit-review-btn.wrong { color: #b33d49; border-color: #f0d4d9; background: #fff8f9; }
.hit-review-btn.wrong:hover { color: var(--danger); border-color: #e2a7b0; background: var(--danger-soft); }
.hit-review-btn.undo { color: #70849e; border-style: dashed; background: transparent; }
.hit-review-btn:disabled { opacity: .6; }
.hit-review-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid #d7e3f5;
  border-radius: 12px;
  background: linear-gradient(100deg, #f7faff, #edf4ff);
}
.hit-review-banner .mini-label { color: var(--coral); }
.hit-review-banner-copy strong { display: block; margin-top: 5px; font-size: 11.5px; }
.hit-review-banner-copy p { margin: 4px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.hit-review-banner-state { flex: 0 0 auto; padding-top: 3px; color: var(--teal); font-family: var(--mono); font-size: 8.5px; letter-spacing: .6px; white-space: nowrap; }
.rejected-block {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #f0d7db;
  border-radius: 12px;
  background: #fff9fa;
}
.rejected-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.rejected-head .mini-label { color: #b33d49; }
.rejected-head b { color: #b33d49; font-family: var(--mono); font-size: 10px; }
.rejected-head > span:last-child { color: var(--muted-2); font-size: 9px; }
.rejected-hit {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #f2dfe2;
}
.rejected-thumb { width: 40px; height: 46px; padding: 2px; overflow: hidden; border: 1px solid #efd9dd; border-radius: 6px; background: #ffffff; }
.rejected-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.rejected-copy { min-width: 0; }
.rejected-copy strong { display: block; overflow: hidden; color: #70414a; font-size: 10.5px; font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.rejected-copy span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.rejected-hit .hit-review-btn { flex: 0 0 auto; }
.suspect-block {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #efdfc4;
  border-radius: 13px;
  background: #fffaf1;
}
.suspect-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.suspect-head .mini-label { color: var(--gold); }
.suspect-head strong { display: block; margin-top: 4px; color: #654711; font-size: 11.5px; }
.suspect-note { color: #9b7c48; font-size: 9px; white-space: nowrap; }
.suspect-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f1e5d1;
}
.suspect-card:first-of-type { margin-top: 11px; }
.suspect-image { position: relative; width: 76px; height: 92px; overflow: hidden; border-radius: 8px; background: #f6f1e7; cursor: zoom-in; }
.suspect-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.suspect-badge { position: absolute; left: 4px; bottom: 4px; padding: 2px 5px; border-radius: 4px; color: #ffffff; background: #a86e0b; font-size: 8px; font-weight: 700; }
.suspect-confidence { color: var(--gold); }
.suspect-card .hit-facts { font-size: 9px; }
.suspect-card .hit-links a { font-size: 9px; }
.no-hits {
  padding: 38px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
}
.scan-wrap { overflow-x: auto; border: 1px solid #dbe5f2; border-radius: 12px; background: var(--card); }
.scan-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 9px; }
.scan-table th { padding: 10px 9px; color: var(--muted-2); background: var(--card-soft); font-weight: 500; text-align: left; white-space: nowrap; }
.scan-table td { padding: 10px 9px; border-top: 1px solid var(--line); vertical-align: top; }
.scan-table td a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.scan-table .num { font-family: var(--mono); white-space: nowrap; }
.scan-thumb {
  width: 40px;
  height: 44px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid #dbe5f2;
  border-radius: 6px;
  background: #f2f6fc;
  cursor: zoom-in;
}
.scan-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.same-mark { color: var(--teal); font-weight: 700; }
.suspect-mark { color: var(--gold); font-weight: 700; }
.diff-mark { color: var(--muted-2); }
.log-list { border: 1px solid #dbe5f2; border-radius: 12px; overflow: hidden; background: var(--card); }
.log-item { display: grid; grid-template-columns: 66px 52px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 9.5px; line-height: 1.6; }
.log-item:first-child { border-top: 0; }
.log-time { color: var(--muted-2); font-family: var(--mono); font-size: 8.5px; }
.log-level { color: var(--muted-2); font-family: var(--mono); font-size: 8px; letter-spacing: .4px; }
.log-level.error { color: var(--danger); }
.log-level.warn { color: var(--gold); }
.log-level.done, .log-level.result { color: var(--teal); }
.detail-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; padding: 12px 14px; border: 1px solid #dbe5f2; border-radius: 10px; background: #ffffff; color: var(--muted-2); font-family: var(--mono); font-size: 9.5px; }
.detail-foot b { color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 800; }

.secondary-btn, .text-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d2deed;
  border-radius: 9px;
  color: var(--ink);
  background: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  transition: .2s;
}
.secondary-btn:hover { background: #f4f8ff; border-color: var(--coral); color: var(--coral-deep); }
.text-btn { border-color: transparent; color: var(--muted); background: transparent; }
.text-btn:hover { color: var(--coral-deep); background: var(--coral-soft); }
.danger-text { color: var(--danger); }
.danger-text:hover { color: var(--danger); background: var(--danger-soft); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 30px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7,20,38,.5); backdrop-filter: blur(5px); animation: fadeIn .2s; }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(590px, 100%);
  max-height: calc(100vh - 60px);
  overflow: auto;
  padding: 28px;
  border: 1px solid #dce6f2;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}
.modal-card h2 { margin: 10px 0 18px; font-family: var(--sans); font-size: 28px; letter-spacing: -.8px; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.help-steps { display: grid; gap: 10px; }
.help-steps div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.help-steps b { color: var(--coral); font-family: var(--mono); font-size: 10px; font-weight: 500; }
.help-steps p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.help-note { margin-top: 17px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.help-note strong { font-size: 10px; }
.help-note p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.help-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.confirm-card { width: min(420px, 100%); }
.confirm-card h2 { margin-bottom: 10px; font-size: 26px; }
.confirm-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

.image-zoom {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: 38px;
  background: rgba(6, 16, 31, .9);
  backdrop-filter: blur(7px);
}
.image-zoom img { max-width: 88vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.4); background: #fff; }
.zoom-close {
  position: absolute; top: 24px; right: 28px;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  color: #fff; background: transparent; font-size: 24px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 150;
  max-width: min(520px, calc(100vw - 40px));
  padding: 11px 16px;
  border-radius: 11px;
  color: #ffffff;
  background: #0b1b31;
  box-shadow: 0 16px 36px rgba(7,20,38,.26);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

.btn-spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes breathe { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes trace { to { transform: scaleY(.5); opacity: .45; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes scan { 0%,100% { transform: translateY(-80%); opacity: 0; } 45%,55% { opacity: 1; } 50% { transform: translateY(80%); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1220px) {
  body { min-width: 980px; }
  .page, .topbar-inner { width: min(1400px, calc(100vw - 40px)); }
  .hero { gap: 34px; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); padding: 40px 38px 38px; }
  .hero h1 { font-size: clamp(44px, 4.4vw, 58px); letter-spacing: -2.2px; }
  .task-list { gap: 13px; }
  .composer-grid { grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr); }
}
@media (max-width: 1000px) {
  body { min-width: 760px; }
  .brand-en, .brand-divider { display: none; }
  .hero { grid-template-columns: 1fr; align-items: stretch; gap: 28px; padding: 38px 34px; }
  .protocol-card { max-width: 620px; }
  .composer-grid { grid-template-columns: 1fr; }
  .task-list { grid-template-columns: 1fr; }
  .batch-tasks { grid-template-columns: 1fr; }
  .rules-section { grid-template-columns: 1fr; gap: 30px; }
  .rules-intro h2 { font-size: 29px; }
  .rules-intro p { max-width: none; }
  .task-filters { flex-wrap: wrap; justify-content: flex-end; }
  .footer { flex-wrap: wrap; }
}
@media (max-width: 800px) {
  body { min-width: 0; }
  .page, .topbar-inner { width: calc(100vw - 28px); }
  .topbar-inner { height: 64px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy span { font-size: 10px; }
  .brand-mark { width: 37px; height: 37px; font-size: 20px; border-radius: 10px; }
  .status-pill { padding: 0 8px; font-size: 0; gap: 0; width: 31px; justify-content: center; }
  .status-pill .status-dot { width: 7px; height: 7px; }
  .version-pill { display: none; }
  .page { padding-top: 18px; }
  .hero { padding: 30px 22px 28px; border-radius: 20px; gap: 24px; }
  .hero h1 { font-size: 41px; letter-spacing: -1.9px; margin: 16px 0 16px; }
  .hero-lead { font-size: 12.5px; line-height: 1.8; }
  .hero-lead br { display: none; }
  .hero-tags { margin-top: 18px; }
  .protocol-card { padding: 17px 16px 13px; }
  .protocol-item { padding: 11px 0; }
  .composer { margin-top: 16px; padding: 18px; }
  .section-heading { flex-direction: column; }
  .tasks-heading { align-items: flex-start; }
  .task-filters { justify-content: flex-start; width: 100%; }
  .task-filters button { flex: 1 0 auto; }
  .task-time-block { min-width: 138px; padding: 7px 9px; }
  .task-time { font-size: 12.5px; }
  .task-time-sub { font-size: 8.5px; }
  .rules-grid { grid-template-columns: 1fr; }
  .source-facts { grid-template-columns: repeat(2, 1fr); }
  .round-grid { grid-template-columns: 1fr; }
  .drawer-panel { width: 100vw; }
  .drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
  .source-card { grid-template-columns: 82px minmax(0, 1fr); }
  .source-image { width: 82px; height: 105px; }
  .detail-verdict { grid-template-columns: 1fr; }
  .verdict-count { display: none; }
  .batch-head { flex-direction: column; gap: 7px; }
  .batch-meta { width: 100%; text-align: left; }
  .feedback-strip { flex-direction: column; align-items: flex-start; }
  .feedback-grid { grid-template-columns: 1fr; }
  .hit-review-banner { flex-direction: column; gap: 5px; }
  .hit-review-label { width: 100%; margin-right: 0; }
  .task-stats { grid-template-columns: repeat(2, 1fr); }
  .detail-metrics { grid-template-columns: 1fr; }
  .suspect-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .suspect-note { white-space: normal; }
  .rejected-hit { grid-template-columns: 36px minmax(0, 1fr); }
  .rejected-thumb { width: 36px; height: 42px; }
  .rejected-hit .hit-review-btn { grid-column: 2; justify-self: start; }
}
