:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface2: #fafafb;
  --hover: #f5f5f7;
  --line: #efeff1;
  --line2: #e2e2e5;
  --text: #2f2f31;
  --text2: #59595b;
  --text3: #6e6e73;
  --accent: #5e6ad2;
  --accent-soft: color-mix(in srgb, #5e6ad2 10%, #ffffff);
  --panel-shadow: 0 0 0 1px #eaeaec;
  --warn: #b7791f;
  --wait: #e0a106;
  --done: #2f8f5b;
  --danger: #d64545;
  --num-bg: #ececf1;
  --track: #e4e5ea;
  --dropzone: #f6f7fb;
  --mix: #ffffff;
  --thumb: #ffffff;
  --fs-base: 13;
  --fs: calc(var(--fs-base) * 1px);
  --fs-sm: calc((var(--fs-base) - 1) * 1px);
  --fs-xs: calc((var(--fs-base) - 2) * 1px);
  --fs-lg: calc((var(--fs-base) + 2) * 1px);
  --fs-xl: calc((var(--fs-base) + 9) * 1px);
  --sb-thumb: color-mix(in srgb, var(--text) 14%, transparent);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
  font-size: var(--fs);
  line-height: 1.5;
}

html[data-resolved="dark"] {
  color-scheme: dark;
  --bg: #141416;
  --surface: #1c1c1f;
  --surface2: #242428;
  --hover: #2a2a2f;
  --line: #2e2e34;
  --line2: #3c3c44;
  --text: #f3f3f4;
  --text2: #c9c9ce;
  --text3: #9c9ca6;
  --accent: #8b93e6;
  --accent-soft: color-mix(in srgb, #8b93e6 22%, #1c1c1f);
  --panel-shadow: 0 0 0 1px #2e2e34;
  --warn: #e3a84a;
  --wait: #f0c14a;
  --done: #46b67a;
  --danger: #f07676;
  --num-bg: #2e2e34;
  --track: #3c3c44;
  --dropzone: #232328;
  --mix: #1c1c1f;
  --thumb: #f3f3f4;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; min-width: 320px; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }

.layout { height: 100vh; display: flex; overflow: hidden; }
.sidebar { flex-shrink: 0; width: 248px; display: flex; flex-direction: column; background: transparent; transition: width 200ms cubic-bezier(.2, 0, 0, 1); }
.layout.nav-collapsed .sidebar { width: 56px; }
.nav-head { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px; flex-shrink: 0; }
.layout.nav-collapsed .nav-head { flex-direction: column; height: auto; padding: 10px 0; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-mark svg { stroke: #fff; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: var(--fs); font-weight: 600; white-space: nowrap; }
.brand-copy small { color: var(--text3); font-size: var(--fs-xs); }
.layout.nav-collapsed .brand-copy,
.layout.nav-collapsed .nav-text,
.layout.nav-collapsed .account-copy,
.layout.nav-collapsed .dept-copy,
.layout.nav-collapsed .dept-chev,
.layout.nav-collapsed .nav-chev,
.layout.nav-collapsed .kbd,
.layout.nav-collapsed .nav-label span { display: none; }
.dept { position: relative; margin: 0 8px 8px; }
.dept > summary, .dept > .dept-current { list-style: none; height: 40px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line2); display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.dept > summary::-webkit-details-marker { display: none; }
.dept > summary:hover, .dept[open] > summary { background: var(--hover); }
.dept-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.dept-copy b { font-size: var(--fs); font-weight: 600; }
.dept-copy small { color: var(--text3); font-size: var(--fs-xs); }
.dept-chev { color: var(--text3); flex-shrink: 0; }
.dept-mark { display: none; width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 600; }
.dept-menu { position: absolute; left: 0; right: 0; top: 44px; z-index: 5; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(9, 9, 10, .16), 0 0 0 1px var(--line); }
.dept-menu p { margin: 4px 8px 6px; color: var(--text3); font-size: var(--fs-xs); }
.dept-row { height: 32px; border-radius: 8px; background: var(--accent-soft); display: flex; align-items: center; padding: 0 8px; font-weight: 500; }
.dept-menu .later { margin: 8px 8px 4px; line-height: 1.5; }
.layout.nav-collapsed .dept { margin: 0 10px 8px; }
.layout.nav-collapsed .dept > summary, .layout.nav-collapsed .dept > .dept-current { width: 36px; height: 36px; padding: 0; justify-content: center; }
.layout.nav-collapsed .dept-mark { display: flex; }
.layout.nav-collapsed .dept-menu { left: 44px; right: auto; width: 220px; top: 0; }
.num { width: calc(var(--fs-xs) + 7px); height: calc(var(--fs-xs) + 7px); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--num-bg); color: var(--text2); font-size: var(--fs-xs); font-weight: 600; flex-shrink: 0; }
.nav-item.on .num, .step-label.on .num { background: var(--accent); color: #fff; }
.step-label { min-height: 32px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--text2); }
.step-label.on { color: var(--text); font-weight: 500; }
.nav-fold > summary { list-style: none; cursor: pointer; width: 100%; border-radius: 8px; font-weight: 400; }
.nav-fold > summary::-webkit-details-marker { display: none; }
.nav-fold > summary .nav-text { flex: 1; min-width: 0; }
.nav-fold > summary .nav-chev { color: var(--text3); flex-shrink: 0; transition: transform .15s ease; }
.nav-fold:not([open]) > summary .nav-chev { transform: rotate(-90deg); }
.nav-fold > summary:hover { background: var(--hover); }
@media (prefers-reduced-motion: reduce) {
  .nav-fold > summary .nav-chev { transition: none; }
}
.nav-item.sub { min-height: 30px; padding-left: 36px; }
.nav-item.quiet { color: var(--text3); }
.layout.nav-collapsed .nav-item.sub { display: none; }
.layout.nav-collapsed .step-label { width: 36px; margin: 2px auto; padding: 0; justify-content: center; }
.icon-btn { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--text3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.nav-tools { padding: 0 8px 6px; }
.layout.nav-collapsed .nav-tools { padding: 0 10px 6px; display: flex; justify-content: center; }
.nav-search { min-height: 30px; width: 100%; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line2); background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--text2); cursor: pointer; text-align: left; }
.nav-search:hover { background: var(--hover); }
.layout.nav-collapsed .nav-search { width: 36px; padding: 0; justify-content: center; }
.nav-groups { flex: 1; overflow: auto; padding: 4px 8px 8px; }
.nav-label { margin: 14px 10px 6px; color: var(--text3); font-size: var(--fs-xs); }
.layout.nav-collapsed .nav-label { height: 1px; margin: 8px 6px; padding: 0; background: var(--line); overflow: hidden; }
.nav-item { position: relative; min-height: 32px; border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--text2); width: 100%; text-align: left; }
.nav-item svg { flex-shrink: 0; stroke: var(--text3); }
.nav-item .nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--hover); }
.nav-item.active, .nav-item.on { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 0 0 1px var(--line2); }
.nav-item.active svg, .nav-item.on svg { stroke: var(--accent); }
.nav-item.staged { color: var(--text3); cursor: default; }
.nav-item.staged:hover { background: transparent; }
.nav-item .tag { margin-left: auto; font-size: var(--fs-xs); color: var(--text3); }
.layout.nav-collapsed .nav-item { width: 36px; margin: 2px auto; padding: 0; justify-content: center; }
.layout.nav-collapsed .nav-item .tag { display: none; }
.sidebar-footer { flex-shrink: 0; padding: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 4px; }
.account { position: relative; flex: 1; min-width: 0; }
.settings { position: relative; flex-shrink: 0; }
.settings > summary { list-style: none; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text2); cursor: pointer; }
.settings > summary::-webkit-details-marker { display: none; }
.settings > summary:hover, .settings[open] > summary { background: var(--hover); color: var(--text); }
.settings.on > summary { color: var(--accent); }
.settings-menu { position: absolute; left: 0; bottom: 40px; width: 280px; padding: 8px; border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(9, 9, 10, .18), 0 0 0 1px var(--line); z-index: 6; }
.settings-menu h2 { margin: 4px 8px 8px; font-size: var(--fs-sm); font-weight: 600; }
.settings-menu .branch { position: relative; }
.settings-menu .parent { width: 100%; min-height: 32px; margin: 0; padding: 0 8px; border: 0; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 600; text-align: left; }
.settings-menu .parent svg { flex-shrink: 0; color: var(--text3); }
.settings-menu .subs { display: none; padding: 2px 0 4px; }
.settings-menu .branch:hover > .parent,
.settings-menu .branch:focus-within > .parent { background: var(--hover); }
.settings-menu .branch:hover > .parent svg,
.settings-menu .branch:focus-within > .parent svg { color: var(--text); transform: rotate(90deg); }
.settings-menu .branch:hover > .subs,
.settings-menu .branch:focus-within > .subs { display: block; }
.settings-menu .parent.on { color: var(--accent); }
.settings-menu .group { margin: 10px 8px 6px; color: var(--text3); font-size: var(--fs-xs); font-weight: 500; }
.settings-menu a { min-height: 30px; border-radius: 8px; display: flex; align-items: center; padding: 0 8px; color: var(--text2); }
.settings-menu .subs a { padding-left: 18px; }
.settings-menu a.on { color: var(--accent); font-weight: 600; }
.font-size { display: flex; align-items: center; gap: 8px; margin: 2px 8px 6px; color: var(--text2); font-size: var(--fs-sm); }
.font-size span { flex-shrink: 0; }
.font-size output { width: 38px; flex-shrink: 0; text-align: right; color: var(--text3); font-variant-numeric: tabular-nums; }
.font-size input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--fill, 12.5%), var(--track) var(--fill, 12.5%)); box-shadow: none; cursor: pointer; }
.font-size input[type="range"]:focus { outline: none; box-shadow: none; }
.font-size input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--thumb); border: 2px solid var(--accent); box-shadow: 0 1px 2px rgba(16, 24, 40, .16); cursor: pointer; }
.font-size input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--thumb); border: 2px solid var(--accent); box-shadow: 0 1px 2px rgba(16, 24, 40, .16); cursor: pointer; }
.theme-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 8px 8px; color: var(--text2); font-size: var(--fs-sm); }
.theme-switch > span { flex-shrink: 0; }
.theme-switch div { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--hover); }
.theme-switch button { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text2); font-size: var(--fs-xs); }
.theme-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.font-size input[type="range"]::-moz-range-track { height: 4px; border: 0; background: transparent; }
.settings-menu a:hover { background: var(--hover); color: var(--text); }
.settings-menu a.on:hover { color: var(--accent); }
.layout.nav-collapsed .settings-menu { right: auto; left: 44px; }
.account > summary { list-style: none; height: 38px; border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 4px 6px; cursor: pointer; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { background: var(--hover); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--hover); color: var(--text2); display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 600; flex-shrink: 0; }
.account-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.account-copy b { font-weight: 600; white-space: nowrap; }
.account-copy span { font-size: var(--fs-xs); color: var(--text3); }
.account-menu { position: absolute; left: 8px; bottom: 52px; width: 240px; padding: 8px; border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(9, 9, 10, .18), 0 0 0 1px var(--line); }
.account-menu p { margin: 4px 8px 8px; color: var(--text3); font-size: var(--fs-xs); line-height: 1.6; }
.layout.nav-collapsed .account > summary { width: 36px; padding: 3px; justify-content: center; }
.layout.nav-collapsed .account-menu { left: 48px; }

.main-content { flex: 1; min-width: 0; display: flex; margin: 8px 8px 8px 0; background: var(--surface); border-radius: 12px; box-shadow: var(--panel-shadow); overflow: hidden; }
.page { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.page.plain { display: block; overflow: auto; }
.head, .page-header, .topbar { min-height: 52px; flex-shrink: 0; padding: 8px 16px 8px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page.plain > .page-header:first-child, .page.plain > .topbar:first-child { position: sticky; top: 0; z-index: 2; }
.head h1, .page-header h1, .topbar h1 { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.page-header > div, .topbar > div { flex: 1; min-width: 0; }
tbody th { color: var(--text3); white-space: nowrap; }
.kv .v { overflow-wrap: anywhere; }
.file-pick { display: flex; align-items: center; gap: 8px; }
.file-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: var(--fs-sm); color: var(--text2); }
.file-caption { line-height: 1.4; }
.file-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
[data-upload] { display: grid; gap: 12px; }
.dropzone { position: relative; display: flex; align-items: center; min-height: 74px; padding: 14px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 38%, var(--line2)); background: var(--dropzone); cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, var(--line2)); background: var(--surface); }
.dropzone.is-bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--mix)); }
.dropzone input[type="file"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; box-shadow: none; font-size: 0; }
.dropzone input[type="file"]:focus { outline: none; box-shadow: none; }
.dropzone-pill { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dropzone-mark { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--text2); flex-shrink: 0; }
.dropzone-mark svg { width: 16px; height: 16px; }
.dropzone:hover .dropzone-mark, .dropzone.drag .dropzone-mark, .dropzone.has-file .dropzone-mark { color: var(--accent); }
.dropzone-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dropzone-title { font-size: var(--fs); font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-hint, .dropzone-file { font-size: var(--fs-sm); color: var(--text3); }
.dropzone.is-pill { display: inline-flex; align-items: center; gap: 8px; width: auto; max-width: 100%; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.dropzone.is-pill:hover, .dropzone.is-pill.drag, .dropzone.is-pill:focus-within, .dropzone.is-pill.has-file, .dropzone.is-pill.is-bad { border: 0; background: transparent; box-shadow: none; }
.dropzone.is-pill .dropzone-pill { height: 28px; padding: 0 11px 0 9px; border-radius: 8px; background: var(--accent); color: #fff; gap: 6px; box-shadow: 0 1px 1px rgba(55, 62, 130, .18); }
.dropzone.is-pill:hover .dropzone-pill, .dropzone.is-pill.drag .dropzone-pill { filter: brightness(1.08); }
.dropzone.is-pill:focus-within .dropzone-pill { box-shadow: 0 0 0 3px var(--accent-soft); }
.dropzone.is-pill .dropzone-mark, .dropzone.is-pill .dropzone-mark svg, .dropzone.is-pill:hover .dropzone-mark { width: 14px; height: 14px; color: #fff; }
.dropzone.is-pill .dropzone-title { color: #fff; font-size: var(--fs-sm); font-weight: 500; }
.dropzone.is-pill .dropzone-hint { display: none; }
.dropzone.is-pill .dropzone-file { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.dropzone.is-pill .dropzone-file:empty { display: none; }
.dropzone.is-pill.is-bad .dropzone-file { color: var(--danger); }
.page-header .muted, .topbar .muted, .page-header p { margin: 2px 0 0; }
.eyebrow { display: block; margin: 0; color: var(--text3); font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0; }
.sp { flex: 1; }
.body { flex: 1; min-height: 0; display: flex; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; min-height: 0; overflow: auto; }
.pad { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 20px; }
aside.side { flex-shrink: 0; width: 320px; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
aside.side .sidehead { height: 44px; flex-shrink: 0; padding: 0 16px; display: flex; align-items: center; font-weight: 600; }
aside.side .sidebody { flex: 1; min-height: 0; overflow: auto; padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 14px; }

.btn, .button, .primary-link, form button[type="submit"] { min-height: 30px; height: auto; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); white-space: nowrap; font-size: var(--fs-sm); text-decoration: none; }
.btn:hover, .button:hover, .primary-link:hover, form button[type="submit"]:hover { background: var(--hover); }
.btn.pri, .button.primary, .primary-link, form button[type="submit"]:not(.button):not(.secondary) { border-color: transparent; background: var(--accent); color: #fff; font-weight: 500; }
.btn.pri:hover, .button.primary:hover, .primary-link:hover, form button[type="submit"]:not(.button):not(.secondary):hover { filter: brightness(1.06); background: var(--accent); }
.button.secondary, .btn.gho { background: var(--surface); color: var(--text); border-color: var(--line2); filter: none; }
.btn.sm, .button.sm { min-height: 26px; padding: 0 9px; }
button:disabled, .button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.text-link { color: var(--accent); font-size: var(--fs-sm); }
.chip, .status-pill, .pill { min-height: 22px; height: auto; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; background: var(--hover); color: var(--text2); font-size: var(--fs-xs); white-space: nowrap; font-weight: 500; }
.chip.done, .status-pill.status-valid { background: color-mix(in srgb, var(--done) 12%, transparent); color: var(--done); }
.chip.warn, .status-pill.status-pending, .status-pill.status-needs_review { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.chip.danger, .status-pill.status-invalid, .status-pill.status-failed { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.chip.acc, .status-pill.status-needs_review { background: var(--accent-soft); color: var(--accent); }
.meta, .muted { color: var(--text3); font-size: var(--fs-sm); }
.mini { color: var(--text3); font-size: var(--fs-xs); }
.stack { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.stack b { font-weight: 500; }

.kpis { display: grid; gap: 0; }
.kpi { padding: 8px 20px; border: 0; border-left: 1px solid var(--line); background: transparent; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; border-radius: 10px; color: inherit; }
.kpi:first-child { border-left: 0; padding-left: 4px; }
button.kpi { cursor: pointer; }
button.kpi:hover, button.kpi.on { background: var(--accent-soft); }
.kpi .k { font-size: var(--fs-sm); color: var(--text2); }
.kpi .v { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi .v.warn { color: var(--warn); }
.kpi .v.danger { color: var(--danger); }

.sechead, .panel-heading, .section-heading { display: flex; align-items: center; gap: 10px; }
.sechead h2, .panel-heading h2, .section-heading h2 { margin: 0; font-size: var(--fs); font-weight: 600; }
.panel { margin: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.panel-heading, .panel > .empty-state, .panel > p, .panel > .form-grid, .panel > form.form-grid { padding: 14px 16px; }
.panel > .table-wrap { padding: 0; }
.sheet { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.toolbar, .filter-form { min-height: 48px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-form { margin: 16px 20px; }
.filter-form label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--text3); }
.search { height: 30px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 8px; color: var(--text3); background: var(--surface); }
.search input { border: 0; outline: none; background: transparent; min-width: 0; width: 160px; font-size: var(--fs-sm); color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
thead th { text-align: left; font-weight: 400; color: var(--text3); font-size: var(--fs-xs); height: 34px; border-bottom: 1px solid var(--line); padding: 0 12px; white-space: nowrap; }
tbody td, tbody th { height: 48px; border-bottom: 1px solid var(--line); padding: 8px 12px; vertical-align: middle; text-align: left; font-weight: 400; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover, tbody tr.picked { background: var(--hover); }
tbody tr.picked { box-shadow: inset 2px 0 0 var(--accent); }
.table-wrap { overflow: auto; }
.product-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-name-text { min-width: 0; font-weight: 500; }
img.product-thumb { display: block; width: 30px; height: 30px; max-width: 30px; max-height: 30px; flex: 0 0 30px; object-fit: cover; background: #f1f1f3; border-radius: 8px; }
.product-thumb-empty { display: block; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: #f1f1f3; }
.product-preview { display: block; width: 96px; height: 96px; max-width: 96px; max-height: 96px; object-fit: cover; background: #f1f1f3; border-radius: 8px; }
.url-text { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--text3); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.master-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 20px 0; }
.master-tools .search { width: 256px; height: 30px; }
.master-tools .search input { width: 100%; }
.master-tools select { width: auto; min-width: 112px; height: 30px; min-height: 30px; padding-top: 0; padding-bottom: 0; }
.master-count { margin-left: auto; color: var(--text3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.master-pager { margin: 0 16px 12px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-xs); color: var(--text2); }

.kv { display: flex; gap: 12px; align-items: flex-start; min-height: 28px; }
.kv .k { width: 72px; flex-shrink: 0; color: var(--text3); font-size: var(--fs-sm); }
.kv .v { font-size: var(--fs-sm); line-height: 1.5; }
hr.sep { margin: 0; border: 0; border-top: 1px solid var(--line); }
.empty, .empty-state { padding: 28px 16px; display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.empty b, .empty-state strong, .empty-state h2 { font-size: var(--fs-lg); font-weight: 600; margin: 0; }
.empty p, .empty-state p { margin: 0; color: var(--text2); line-height: 1.7; }

label.field, .form-stack label, .project-form label, .form-grid > label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--text2); }
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, textarea, .inp {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
  font-size: var(--fs-sm);
}
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, .inp { min-height: 34px; height: auto; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: auto; height: auto; }
input[type="file"] { height: auto; padding: 6px 0; border: 0; box-shadow: none; }
.form-stack, .project-form, .form-grid { display: grid; gap: 12px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full-width, .project-form .wide, .form-actions.full-width { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel > .form-actions { padding: 0 16px 16px; }
.form-error, .error-banner { margin: 12px 20px; padding: 8px 12px; border-radius: 8px; color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--mix)); }
.kind-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--hover); margin: 16px 20px 0; }
.kind-switch a { min-height: 26px; padding: 0 12px; border-radius: 7px; display: inline-flex; align-items: center; color: var(--text2); font-size: var(--fs-sm); }
.kind-switch a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.project-list { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 24px; }
.project-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--surface); }
.project-card h2 { margin: 2px 0 8px; font-size: var(--fs-lg); }
.project-card-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.project-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0; }
.project-details div { min-width: 0; }
.project-details dt { color: var(--text3); font-size: var(--fs-xs); }
.project-details dd { margin: 2px 0 0; }
details summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); }
details ul { margin: 8px 0 0; padding-left: 18px; color: var(--text2); }

.scrim { position: absolute; inset: 0; background: rgba(9, 9, 10, .22); display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; z-index: 40; }
.dialog { width: min(480px, calc(100vw - 32px)); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 64px rgba(9, 9, 10, .28), 0 0 0 1px var(--line); overflow: hidden; }
.dialog .dbody { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.cmd-item { height: 34px; padding: 0 8px; border-radius: 7px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.cmd-item:hover, .cmd-item.hi { background: var(--hover); }
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--panel-shadow); padding: 28px 28px 24px; }
.login-card h1 { margin: 14px 0 4px; font-size: var(--fs-xl); letter-spacing: -.03em; }
.login-card .form-stack { margin-top: 18px; }
.login-card .form-error { margin: 12px 0 0; }
kbd { font-family: inherit; font-size: var(--fs-xs); color: var(--text3); }

@media (max-width: 1100px) {
  aside.side { display: none; }
  .form-grid, .project-details { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { overflow: auto; }
  .layout { display: block; height: auto; min-height: 100vh; }
  .sidebar { width: auto; }
  .nav-groups { display: flex; gap: 4px; overflow: auto; padding-bottom: 8px; }
  .nav-label, .nav-item.staged, .sidebar-footer { display: none; }
  .nav-item { width: auto; }
  .main-content { margin: 0 8px 8px; min-height: calc(100vh - 120px); }
}

.parse-note { margin: 16px 20px 0; max-width: 640px; color: var(--text2); line-height: 1.7; }
.parse-error { margin: 12px 20px 0; color: var(--danger); }
.parse-result { margin: 16px 20px 0; max-width: 520px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--done) 8%, var(--mix)); }
.parse-result ul { margin: 8px 0 0; padding-left: 18px; }
.parse-form { display: grid; gap: 12px; max-width: 520px; margin: 16px 20px 24px; }
.parse-form.task-publish { max-width: 760px; }
.task-pick { display: grid; gap: 8px; }
.task-pick-head, .task-pick-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.task-pick-row b { min-width: 3.5em; font-weight: 500; }
.parse-form .task-pick label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
.parse-form .task-pick label input { width: auto; height: auto; }
.date-picker { position: relative; display: flex; flex-direction: column; gap: 6px; max-width: 280px; }
.date-picker > label { width: fit-content; }
.date-picker-trigger { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); text-align: left; }
.date-picker-trigger span { white-space: nowrap; }
.date-picker-trigger:hover { border-color: var(--accent); }
.date-picker-trigger .is-empty { color: var(--text3); }
.date-popover { position: fixed; z-index: 30; display: flex; width: min(560px, calc(100vw - 16px)); background: var(--surface); border-radius: 12px; box-shadow: 0 16px 48px rgba(16, 24, 40, .16), 0 0 0 1px var(--line); overflow: hidden; }
.date-side { width: 168px; flex-shrink: 0; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--surface); }
.date-side-title { padding: 4px 8px 8px; color: var(--text3); font-size: var(--fs-sm); }
.date-side button[data-preset], .date-past { width: 100%; min-height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; }
.date-past { gap: 4px; padding-right: 4px; }
.date-past button[data-preset] { flex: 1; width: auto; min-width: 0; padding-left: 0; background: transparent; }
.date-step { display: inline-flex; gap: 0; }
.date-step button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--text3); font-size: 14px; }
.date-side button[data-preset]:hover, .date-past:hover, .date-step button:hover, .date-cal-head button:hover { background: var(--hover); }
.date-past button[data-preset]:hover, .date-past button[data-preset].on, .date-past.on .date-step button:hover { background: transparent; }
.date-side button[data-preset].on, .date-side button[data-preset].on:hover, .date-past.on, .date-past.on:hover { background: var(--accent-soft); }
.date-custom span { color: var(--text3); }
.date-cal { flex: 1; min-width: 0; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.date-cal-head { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; }
.date-cal-head strong { text-align: center; font-size: var(--fs-lg); font-weight: 600; letter-spacing: .02em; }
.date-cal-head button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); font-size: 16px; }
.date-week, .date-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.date-grid { justify-items: center; align-items: center; min-height: 204px; }
.date-week span { height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: var(--fs-sm); }
.date-day { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); padding: 0; }
.date-day:hover { background: var(--hover); }
.date-day.is-in-range, .date-day.is-in-range:hover { background: var(--accent-soft); color: var(--text); }
.date-day.is-selected, .date-day.is-selected:hover { background: var(--accent); color: #fff; font-weight: 500; }
.date-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text2); font-variant-numeric: tabular-nums; }
.date-actions { display: inline-flex; align-items: center; gap: 8px; }
.date-actions .button.secondary { border-color: transparent; background: transparent; color: var(--text2); }
.date-actions .button.secondary:hover { background: var(--hover); }
.date-actions .button.primary { min-width: 64px; border-color: transparent; background: var(--accent); color: #fff; }
.date-actions .button.primary:hover { background: var(--accent); filter: brightness(1.06); }
.parse-desk { margin: 16px 20px 0; max-width: 960px; }
.parse-desk table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.parse-desk th, .parse-desk td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; font-size: var(--fs); word-break: break-all; }
.parse-page .parse-note,
.parse-page .parse-error,
.parse-page .parse-result,
.parse-page .parse-form,
.parse-page .parse-desk { margin: 0; max-width: none; }
.parse-page .parse-form { max-width: 640px; }
.parse-steps { display: flex; gap: 6px; }
.parse-steps > a, .parse-steps > div { flex: 1; min-width: 0; height: 36px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--text3); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; overflow: hidden; }
.parse-steps > a:hover { color: var(--text); background: var(--hover); }
.parse-steps > .now { background: var(--accent-soft); color: var(--text); font-weight: 500; }
.page.plain > .parse-steps { margin: 16px 20px 0; }
.task-sheet { max-height: 322px; margin: 12px 20px 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.task-sheet thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.task-pager { min-height: 48px; margin: 0 20px; display: flex; align-items: center; gap: 16px; }
.task-pager label { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: var(--fs-sm); }
.task-pager select { width: auto; min-width: 72px; height: 28px; min-height: 28px; padding: 0 8px; }
.task-pager #task-page-count { color: var(--text3); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.task-pages { margin-left: auto; display: flex; gap: 4px; }
.task-pages button { min-width: 28px; height: 28px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: var(--fs-sm); }
.task-pages button[aria-current="page"] { background: var(--hover); font-weight: 600; }
.task-pages button:disabled { color: var(--text3); }
.import-board { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 16px; max-width: 960px; }
.import-board .kind-switch { margin: 0; flex-wrap: wrap; }
.import-board td form { margin: 0; }
.uat-target { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.uat-target .field { min-width: 220px; flex: 1; }
.kind-switch .count { margin-left: 6px; color: var(--text3); font-variant-numeric: tabular-nums; }
.kind-switch a.on .count { color: var(--text2); }
.import-lead { margin: 0; color: var(--text2); line-height: 1.7; }
.import-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.import-pager p { margin: 0; color: var(--text2); font-variant-numeric: tabular-nums; }
.import-pager .kind-switch { margin: 0; }
.import-pages { display: flex; gap: 6px; align-items: center; }
.import-pages a, .import-pages button, .import-pages span { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--text2); font-size: var(--fs-sm); text-decoration: none; }
.import-pages a:hover, .import-pages button:hover { background: var(--hover); color: var(--text); }
.desk-tools { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.desk-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.desk-line-label { width: 3em; flex: none; color: var(--text3); font-size: var(--fs-sm); }
.desk-tools .kind-switch { margin: 0; flex-wrap: wrap; }
.desk-tools .kind-switch button { min-height: 26px; padding: 0 12px; border: 0; border-radius: 7px; display: inline-flex; align-items: center; background: transparent; color: var(--text2); font-size: var(--fs-sm); cursor: pointer; }
.desk-tools .kind-switch button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.desk-tools .kind-switch button.on .count { color: var(--text2); }
.desk-tools .import-pager { margin: 0; }
[data-desk-pagebar] { display: flex; justify-content: flex-end; margin: 10px 0 0; }
.import-pages button { border: 0; background: transparent; cursor: pointer; font: inherit; }
.import-pages .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.import-meta-row td { height: auto; padding-top: 0; }
.import-meta-row details summary { cursor: pointer; color: var(--text2); font-size: var(--fs-sm); }
.import-meta-row details table { margin-top: 8px; }
.import-meta-row details th { width: 14em; color: var(--text2); font-weight: 500; }
.import-notes { margin: 8px 0; padding-left: 1.2em; }
.import-notes li { margin: 4px 0; }
.import-note-error { margin: 8px 0; color: var(--danger); }
.import-note-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 8px; }
.import-note-form label { display: flex; flex-direction: column; gap: 4px; color: var(--text2); font-size: var(--fs-sm); }
.import-note-form input, .import-note-form select { min-width: 16em; }
.parse-block { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line2); }
.parse-block h2 { margin: 0; font-size: var(--fs); font-weight: 600; }
.parse-block p { margin: 0; }
.parse-hash { word-break: break-all; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-xs); }
.parse-shot { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--surface2); }
.parse-live { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line2); }
.parse-live[hidden] { display: none; }
.parse-live-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.parse-live-head strong { font-size: var(--fs); }
.parse-live-head span, .parse-live .parse-note { color: var(--text2); font-variant-numeric: tabular-nums; }
.parse-meter { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.parse-meter > span { display: block; height: 100%; width: 0; background: var(--accent); }
.row-meter { display: flex; align-items: center; gap: 8px; min-width: 148px; }
.row-meter .parse-meter { flex: 1; min-width: 72px; }
.row-meter > span { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--text2); white-space: nowrap; }
.row-meter.is-done .parse-meter > span { background: var(--done); }
.row-meter.is-failed .parse-meter > span { background: var(--danger); }
.parse-live.is-busy .parse-meter > span {
  background-image: linear-gradient(90deg, transparent, color-mix(in srgb, white 40%, transparent), transparent);
  background-size: 40% 100%;
  animation: parse-slide 1.1s linear infinite;
}
@keyframes parse-slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) {
  .parse-live.is-busy .parse-meter > span { animation: none; }
}
.parse-live-rows { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow: auto; }
.parse-live-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; width: 100%; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; }
.parse-live-row:hover, .parse-live-row.is-current { background: var(--hover); }
.parse-live-row.is-running { background: var(--accent-soft); }
.parse-live-row b { font-weight: 500; }
.parse-state { flex: none; font-size: var(--fs-sm); color: var(--text3); }
.parse-state.is-running { color: var(--accent); }
.parse-state.is-done { color: var(--done); }
.parse-state.is-failed { color: var(--danger); }
.parse-live-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.parse-live-thumbs img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface2); }
.parse-page .parse-live { margin: 0; }
img.parse-thumb { width: 32px; height: 32px; max-width: 32px; max-height: 32px; object-fit: cover; border-radius: 8px; background: #f1f1f3; vertical-align: middle; margin-right: 6px; }
.parse-result-scroll { max-height: 28rem; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.parse-result-scroll table { margin-top: 0; }
.parse-result-scroll th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.parse-result-scroll td { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.parse-result-scroll td.parse-shot-cell { max-width: 5rem; }
.parse-actions { display: flex; gap: 8px; align-items: center; }
.parse-actions [data-parse-done] { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: var(--done); color: #fff; }
.parse-actions [data-parse-again] { flex: none; min-height: 36px; }
.parse-detail, .parse-zoom { width: min(960px, calc(100vw - 48px)); max-height: min(860px, calc(100vh - 48px)); margin: auto; border: 0; border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(9, 9, 10, .28), 0 0 0 1px var(--line); }
.parse-zoom { width: min(1080px, calc(100vw - 32px)); }
.parse-detail::backdrop, .parse-zoom::backdrop { background: rgba(9, 9, 10, .45); }
.parse-detail-bar { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.parse-detail-bar strong { font-size: var(--fs); }
.parse-detail-bar .parse-zoom-hint { margin-right: auto; color: var(--text3); font-size: var(--fs-sm); }
.parse-detail-bar button { margin-left: auto; }
.parse-detail-body { display: flex; flex-direction: column; gap: 18px; padding: 16px 20px 24px; overflow: auto; max-height: calc(100vh - 140px); }
.parse-highlights, .parse-meta { display: grid; gap: 14px 16px; }
.parse-highlights { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.parse-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.parse-highlights span, .parse-meta span, .parse-section p b { display: block; color: var(--text3); font-size: var(--fs-sm); font-weight: 500; }
.parse-highlights b { display: block; margin-top: 4px; font-size: var(--fs-lg); font-weight: 650; }
.parse-meta b { display: block; margin-top: 2px; font-weight: 600; }
.parse-section h3 { margin: 0 0 10px; font-size: var(--fs); }
.parse-section p { margin: 0 0 12px; line-height: 1.7; }
.parse-chat { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 16px; align-items: start; }
.parse-chat-shots { display: flex; flex-direction: column; gap: 8px; }
.parse-chat img { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); cursor: zoom-in; }
.parse-chat pre, .parse-zoom-text { margin: 0; white-space: pre-wrap; font: inherit; line-height: 1.7; }
.parse-zoom-stage { height: min(62vh, 640px); margin: 12px 16px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.parse-zoom-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; }
.parse-zoom-text { padding: 12px 16px 16px; max-height: 24vh; overflow: auto; }
@media (max-width: 800px) {
  .parse-highlights, .parse-meta, .parse-chat { grid-template-columns: 1fr 1fr; }
  .parse-chat { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .parse-page .body { flex-direction: column; }
  .parse-page aside.side { display: flex; width: 100%; border-left: 0; border-top: 1px solid var(--line); }
}

.notice { display: flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 28px; }
.notice-label { color: var(--text3); font-size: var(--fs-xs); }
.notice a.chip { text-decoration: none; }
.coverage { margin-top: 22px; }
.coverage-head { justify-content: space-between; flex-wrap: wrap; }
.coverage-legend { display: inline-flex; align-items: center; gap: 16px; margin-left: auto; color: var(--text2); font-size: var(--fs-xs); flex-wrap: wrap; }
.coverage-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.coverage-legend .mark { width: 16px; height: 16px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); font-style: normal; font-size: 11px; line-height: 1; font-weight: 650; flex: none; background: var(--surface); }
.coverage-legend .mark.tick { color: var(--done); }
.coverage-legend .mark.wait { border-radius: 50%; width: 11px; height: 11px; box-shadow: none; border: 1.5px solid var(--wait); background: color-mix(in srgb, var(--wait) 34%, var(--surface)); }
.coverage-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; }
.coverage .kind-switch { margin: 0; flex-wrap: wrap; }
.coverage-month { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); font-size: var(--fs-sm); }
.coverage-month > span { min-width: 5.5em; text-align: center; color: var(--text); }
.coverage-month a { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); border-radius: 7px; }
.coverage-month a:hover { background: var(--hover); }
.coverage-grid { overflow-x: auto; margin-top: 10px; }
.coverage table { width: max-content; }
.coverage thead th { height: 28px; padding: 0 2px; text-align: center; border-bottom: 0; }
.coverage tbody th { height: 32px; padding: 2px 10px 2px 0; border-bottom: 0; white-space: nowrap; color: var(--text); font-size: var(--fs-sm); }
.coverage tbody td { height: 32px; padding: 2px; border-bottom: 0; text-align: center; }
.coverage tr.idle th, .coverage tr.idle .meta { color: var(--text3); }
.coverage a.cell { width: 28px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.coverage a.cell:hover { background: var(--hover); }
.coverage a.cell.tick { color: var(--done); font-weight: 650; }
.coverage a.cell.wait::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--wait); background: color-mix(in srgb, var(--wait) 38%, var(--surface)); box-sizing: border-box; }
.coverage a.cell.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.coverage tr.idle a.cell { background: var(--hover); box-shadow: none; }
.coverage tr.idle a.cell.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.coverage-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.coverage-detail .files { max-height: 160px; margin: 0; padding-left: 18px; overflow: auto; color: var(--text2); }
.coverage-detail form { margin: 0; }

.inquiry-board { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 100%; padding: 16px 20px 20px; }
.inquiry-note { margin: 0; }
.inquiry-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; flex: none; }
.inquiry-bar .kind-switch { margin: 0; }
.inquiry-tools { display: flex; align-items: center; gap: 8px; margin: 0; }
.inquiry-tools label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--text2); }
.inquiry-tools input[type="date"] { width: 168px; min-height: 30px; height: 30px; padding: 4px 8px; }
.inquiry-block { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.inquiry-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex: none; }
.inquiry-kpis a.kpi { border-radius: 0; padding: 12px 16px; }
.inquiry-kpis a.kpi:hover { background: var(--hover); }
.inquiry-kpis a.kpi.on { background: var(--accent-soft); }
.inquiry-sheet { flex: 1; min-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.inquiry-sheet table { margin: 0; }
.inquiry-sheet thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.inquiry-sheet tbody td { height: 40px; }
.inquiry-sheet tbody tr:last-child td { border-bottom: 0; }
.inquiry-sheet tbody tr:hover td { background: var(--hover); }
.inquiry-sheet th.inquiry-num, .inquiry-sheet td.inquiry-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inquiry-count { font-weight: 600; }
.inquiry-name { font-weight: 500; color: var(--text); }
.inquiry-open { width: 1%; text-align: right; white-space: nowrap; }
.inquiry-days { table-layout: fixed; }
.inquiry-days th:first-child, .inquiry-days td:first-child { width: 7.5rem; position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.inquiry-days thead th:first-child { z-index: 2; }
.inquiry-days tbody td { height: 46px; }
.inquiry-days tbody tr:hover td:first-child { background: var(--hover); }
.inquiry-cell { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; width: 100%; min-height: 36px; padding: 4px 8px; border-radius: 8px; line-height: 1.25; }
.inquiry-cell b { font-weight: 600; font-variant-numeric: tabular-nums; }
.inquiry-cell:hover { background: var(--accent-soft); }
.inquiry-gap td, .inquiry-gap .inquiry-name { color: var(--text3); font-weight: 400; }
.inquiry-rate[data-abnormal="1"] { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.inquiry-sheet tbody tr:hover td.inquiry-rate[data-abnormal="1"] { background: color-mix(in srgb, var(--warn) 18%, var(--hover)); }
.inquiry-board a:focus-visible, .inquiry-board button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) {
  .inquiry-board { height: auto; padding: 14px 12px 16px; }
  .inquiry-kpis { grid-template-columns: 1fr; }
  .inquiry-kpis a.kpi { border-left: 0; border-top: 1px solid var(--line); }
  .inquiry-kpis a.kpi:first-child { border-top: 0; }
  .inquiry-tools { flex-wrap: wrap; }
  .inquiry-tools input[type="date"] { width: auto; flex: 1; min-width: 140px; }
  .inquiry-sheet { min-height: 280px; }
  .inquiry-name { min-width: 8rem; }
}
