:root { color-scheme: light; font-family: Inter, "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif; background: #f5f7fb; color: #172033; font-synthesis: none; }
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #f5f7fb; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #a4c5fb; outline-offset: 3px; }
.shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 4px 18px; font-size: 13px; color: #647184; }
.topbar a { color: #34435c; text-decoration: none; }
.topbar a:hover { color: #1f6feb; }
.site-brand { display: inline-flex; align-items: center; gap: 7px; }
.site-brand img { width: 24px; height: 24px; object-fit: contain; }
.panel { background: white; border: 1px solid #dde3ef; border-radius: 8px; box-shadow: 0 24px 70px #23314e12; padding: 36px 44px; }
.heading { display: grid; gap: 10px; margin-bottom: 26px; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0; color: #526170; font-size: 13px; font-weight: 700; text-transform: uppercase; }
#app-version { min-height: 28px; padding: 2px 0; color: #65748a; background: transparent; font-size: 12px; font-weight: 400; }
#app-version:hover { color: #1f6feb; text-decoration: underline; }
h1 { margin: 0; font-size: 36px; line-height: 1.2; overflow-wrap: anywhere; }
.form { display: grid; gap: 18px; }
fieldset { margin: 0; border: 0; }
legend { margin-bottom: 8px; padding: 0 4px; font-size: 14px; font-weight: 700; color: #243044; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; border: 1px solid #cbd4e1; border-radius: 8px; background: #eef3f9; }
.segmented label { position: relative; display: block; }
.segmented input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.segmented span { display: grid; min-height: 42px; place-items: center; border-radius: 6px; color: #526170; font-weight: 700; cursor: pointer; }
.segmented input:checked + span { color: white; background: #1f6feb; box-shadow: 0 5px 14px #1f6feb22; }
.segmented input:focus-visible + span { outline: 3px solid #a4c5fb; outline-offset: 2px; }
label, .field { display: grid; gap: 8px; font-size: 14px; font-weight: 700; color: #243044; }
input { min-width: 0; width: 100%; min-height: 46px; border: 1px solid #cbd4e1; border-radius: 6px; padding: 0 14px; color: #172033; background: #fbfcff; font-size: 14px; font-weight: 400; }
input::placeholder { color: #a6b0c0; opacity: 1; }
input:focus { border-color: #2e6bff; }
input[aria-invalid="true"] { border-color: #c43e43; }
input:disabled { opacity: .7; }
.path-row { display: flex; align-items: stretch; gap: 10px; }
.path-row input { flex: 1; text-overflow: ellipsis; }
button { min-height: 46px; border: 0; border-radius: 6px; padding: 0 18px; font-weight: 700; font-size: 14px; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
.icon-button { width: 44px; min-width: 44px; padding: 0; font-size: 23px; font-weight: 400; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions.single-action { grid-template-columns: 1fr; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.primary { color: white; background: #1f6feb; }
.primary:hover:not(:disabled) { background: #165bc7; }
.secondary { color: #24334a; background: #e8edf6; }
.secondary:hover:not(:disabled) { background: #dce4f0; }
.button-tag { font-size: 11px; font-weight: 400; color: #65748a; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid #ffffff70; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.is-loading .spinner { display: block; }
.status { margin-top: 22px; border-left: 3px solid #cbd4e1; padding: 14px 16px; background: #f8fafc; }
.status-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.status strong { font-size: 15px; }
.status p { margin: 7px 0 0; color: #526170; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#progress-label { font-size: 12px; color: #526170; font-variant-numeric: tabular-nums; }
progress { display: block; appearance: none; width: 100%; height: 8px; margin-top: 14px; border: 0; border-radius: 4px; overflow: hidden; background: #e2e8f0; }
progress::-webkit-progress-bar { background: #e2e8f0; }
progress::-webkit-progress-value { background: #1f6feb; transition: width .3s; }
progress::-moz-progress-bar { background: #1f6feb; }
progress:indeterminate { background: #cbdcf5; }
.status.success { border-color: #43a56a; background: #f1fbf5; }
.status.error { border-color: #d76e6a; background: #fff5f5; }
.status-actions { display: flex; justify-content: flex-end; gap: 8px; }
.status-actions button { margin-top: 12px; min-height: 36px; }
.result-panel { margin-top: 20px; border-top: 1px solid #c6dfd1; padding-top: 20px; }
.result-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: #22613b; font-size: 14px; }
.result-list { display: grid; gap: 10px; margin: 0; }
.result-list div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
.result-list dt { color: #526170; font-size: 13px; font-weight: 700; }
.result-list dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.result-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 22px; color: #7a8492; font-size: 11px; line-height: 1.6; }
dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); border: 1px solid #dde3ef; border-radius: 8px; padding: 24px; color: #243044; }
dialog::backdrop { background: #17203366; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog h2 { margin: 0; font-size: 20px; } dialog h3 { font-size: 15px; margin-top: 22px; }
dialog p, dialog li { font-size: 14px; line-height: 1.8; } dialog ul { padding-left: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .shell { width: calc(100% - 20px); padding-top: 18px; }
  .panel { padding: 24px 20px; }
  .topbar { font-size: 12px; }
  h1 { font-size: 30px; }
  .actions { grid-template-columns: 1fr; }
  .path-row { gap: 7px; }
  .path-row button { padding: 0 12px; }
  .result-list div { grid-template-columns: 72px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
