:root {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #e8eae8;
  background: #161817;
  --muted: #a7afaa;
  --line: #343a36;
  --accent: #72d6aa;
  --tint: #253b31;
  --surface: #1e211f;
  --sidebar: #191c1a;
  --raised: #242825;
  --field: #191c1a;
  --control: #464e49;
  --ink: #e8eae8;
  --green: #57c394;
  --warning: #f0be81;
  --danger: #f4a099;
  color-scheme: dark;
  font-size: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: #345747; color: #f0fff7; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .62; cursor: not-allowed; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 0; }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner, main { max-width: 1450px; margin: auto; padding-inline: 36px; }
.top-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.brand svg { color: var(--accent); flex: none; }
.connection { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 7px 11px; color: var(--muted); font-size: 12px; }
.connection span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--warning); }
.connection[data-connected="true"] span { background: var(--accent); }
main { padding-block: 36px 22px; }
.capture { background: var(--surface); padding: 25px 28px 0; border: 1px solid var(--line); border-radius: 13px; }
.section-head, .aside-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1, h2 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
.section-head p { color: var(--muted); line-height: 1.6; margin-top: 5px; }
#collect { display: flex; align-items: end; gap: 12px; margin: 23px 0 19px; }
label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.url-label { flex: 1; min-width: 0; }
.limit-label { width: 112px; }
input:not([type=checkbox]), select { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--control); border-radius: 7px; background: var(--field); font-size: 14px; font-weight: 400; caret-color: var(--accent); }
#collect input { min-height: 42px; }
input::placeholder { color: var(--muted); opacity: 1; }
.button { min-height: 37px; padding: 7px 13px; border: 1px solid var(--control); background: var(--surface); border-radius: 7px; white-space: nowrap; font-weight: 600; }
.button:hover:not(:disabled), .connection:hover { background: var(--tint); border-color: #5f7567; }
.button.primary { color: #11251b; background: var(--green); border-color: var(--green); }
.button.primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
#start { min-height: 42px; padding-inline: 20px; }
.button.quiet { color: var(--accent); border-color: transparent; background: var(--tint); }
.button.small { min-height: 31px; font-size: 12px; }
.capture-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
.status-wrap { display: grid; gap: 8px; }
#status { color: var(--muted); line-height: 1.55; }
#status[data-tone="attention"] { color: var(--warning); }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.actions:has(> :not([hidden])) { margin-top: 2px; }
.actions:not(:has(> :not([hidden]))) { display: none; }
.counts { display: flex; align-items: center; margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counts div { display: flex; align-items: baseline; gap: 7px; padding-inline: 12px; }
.counts div + div { border-left: 1px solid var(--line); }
.counts div:last-child { padding-right: 0; }
.counts dt { font-size: 12px; color: var(--muted); }
.counts dd { margin: 0; font-size: 17px; font-weight: 700; }
.workspace { display: grid; grid-template-columns: 226px minmax(0, 1fr); margin-top: 21px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.workspace aside { padding: 20px 14px; border-right: 1px solid var(--line); background: var(--sidebar); border-radius: 13px 0 0 13px; }
.aside-head { margin: 0 5px 13px; }
.aside-head span, summary span { font-size: 12px; color: var(--muted); }
#videos { display: grid; gap: 4px; }
.video-choice { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 37px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 8px; }
.video-choice span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-choice:hover, .video-choice[aria-pressed=true] { background: var(--tint); color: var(--accent); }
.video-choice[aria-pressed=true] { font-weight: 650; }
.video-choice span + span { color: var(--muted); font-size: 12px; }
.history { margin-top: 20px; border-top: 1px solid var(--line); padding: 13px 5px 0; }
summary { cursor: pointer; font-weight: 600; }
summary span { float: right; }
.job-choice { width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 8px; background: transparent; }
.job-choice:hover, .job-choice[aria-pressed=true] { background: var(--tint); }
.job-choice small { display: block; margin-top: 3px; color: var(--muted); }
.history p { padding: 8px 0; color: var(--muted); }
.comments { min-width: 0; }
.table-head { padding: 20px 22px 14px; }
.table-head p { font-size: 13px; }
.filters { display: flex; align-items: end; gap: 11px; flex-wrap: wrap; padding: 0 22px 16px; }
.filters label:first-child { flex: 1 1 170px; max-width: 340px; }
.filters select { min-width: 126px; }
.check { display: flex; align-items: center; gap: 5px; min-height: 38px; white-space: nowrap; padding-inline: 3px; }
.check input { accent-color: var(--accent); }
#edit-rules { align-self: end; margin-bottom: 3px; }
#rules p { margin-bottom: 9px; color: var(--muted); }
#rule-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin-bottom: 10px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
thead { background: var(--raised); color: var(--muted); }
th, td { padding: 11px 9px; vertical-align: top; }
th { white-space: nowrap; font-weight: 650; }
th:first-child, td:first-child { padding-left: 22px; min-width: 180px; width: 33%; }
th:last-child, td:last-child { padding-right: 22px; }
td { border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
td:nth-child(3), td:last-child { font-variant-numeric: tabular-nums; }
.comment-body { white-space: pre-wrap; }
.tag { display: inline-block; color: var(--accent); background: var(--tint); border-radius: 5px; padding: 2px 5px; margin: 0 3px 3px 0; white-space: nowrap; font-size: 11px; }
.empty { display: grid; place-items: center; gap: 9px; text-align: center; min-height: 241px; align-content: center; padding: 22px; color: var(--accent); }
.empty strong { color: var(--ink); }
.empty p { color: var(--muted); font-size: 13px; }
.pagination { display: flex; justify-content: end; align-items: center; gap: 10px; padding: 10px 22px; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; color: var(--muted); font-size: 12px; }
@media (max-width: 800px) {
  .top-inner, main { padding-inline: 16px; }
  main { padding-top: 20px; }
  .capture { padding-inline: 16px; }
  .workspace { grid-template-columns: 1fr; }
  .workspace aside { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 13px 13px 0 0; }
  #videos { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .history { margin-top: 9px; }
}
@media (max-width: 510px) {
  .top-inner { gap: 7px; }
  .brand { font-size: 13px; gap: 6px; }
  .brand svg { width: 24px; height: 24px; }
  .connection { padding: 5px 6px; gap: 4px; }
  #collect { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .url-label { grid-column: 1/-1; }
  .capture-status { align-items: start; flex-direction: column; }
  .counts div:first-child { padding-left: 0; }
  footer { flex-direction: column; }
}
