:root {
  color-scheme: light;
  --surface: #fff;
  --ink: #162439;
  --muted: #4c5d75;
  --line: #d7e0ed;
  --brand: #2149aa;
  --selection: #ecf2ff;
  --danger: #a13537;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 15px/1.6 "Source Sans 3", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.local-panel { padding: 20px 22px 26px; }
h1, h2, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.3; }
h2 { font-size: 17px; line-height: 1.45; }
.helper { margin-top: 6px; color: var(--muted); font-size: 14px; }
.import { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.file-name { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 15px; min-height: 44px; border: 1px solid #8797af; border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
.button.primary { border-color: var(--brand); background: var(--brand); color: var(--surface); }
.button:not(:disabled):hover { filter: brightness(.94); }
.button:disabled { opacity: .54; cursor: default; }
:focus-visible, .visually-hidden:focus-visible + .button { outline: 2px solid var(--brand); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notice { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--selection); font-size: 14px; }
.notice.error { border: 1px solid #efd1d0; background: #fff2f2; color: var(--danger); }
.subform { margin-top: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.subform .button { margin-top: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; margin-top: 8px; }
.subform label { display: grid; gap: 4px; font-size: 14px; }
select { width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid #8797af; border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.preview { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.table-area { margin-top: 11px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; overflow-wrap: anywhere; }
thead th { font-size: 13px; color: var(--muted); }
.count { width: 22%; text-align: right; font-variant-numeric: tabular-nums; }
#preview-table .count { width: 26%; }
code { font: 14px/1.5 var(--mono); overflow-wrap: anywhere; }
.domain-label { display: inline-flex; align-items: start; gap: 8px; max-width: 100%; cursor: pointer; }
.domain-label code { padding-block: 3px; }
.domain-label input { flex: none; width: 16px; height: 16px; margin: 5px 0 0; accent-color: var(--brand); }
.excluded { color: var(--muted); }
.local-paths, .expand-paths { color: var(--brand); font: inherit; font-size: 13px; }
.local-paths { margin: 3px 0 0 23px; }
.local-paths summary { cursor: pointer; }
.local-paths p { color: var(--ink); }
.expand-paths { display: table; border: 0; border-radius: 6px; background: var(--selection); margin-top: 4px; padding: 3px 9px; min-height: 28px; cursor: pointer; text-align: left; }
.path-detail td { background: #f6f8fd; }
.path-detail td:first-child { padding-left: 12px; border-left: 2px solid var(--line); }
.local-actions { display: flex; justify-content: end; margin-top: 16px; }

@media (max-width: 460px) {
  .local-panel { padding: 15px; }
  .fields { grid-template-columns: 1fr; }
  .count { width: 24%; }
}
