:root {
  color-scheme: light;
  --paper: oklch(97% 0.008 250);
  --ink: oklch(28% 0.028 250);
  --muted: oklch(46% 0.025 250);
  --line: oklch(84% 0.016 250);
  --accent: oklch(42% 0.12 250);
  --surface: oklch(99% 0.003 250);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
main {
  width: min(100% - 2rem, 44rem);
  margin: 2rem auto 4rem;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.badge {
  color: var(--muted);
  font-size: 0.8rem;
}
h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 2rem 0 1rem;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
}
p {
  margin: 0.75rem 0;
}
.intro {
  color: var(--muted);
  margin-bottom: 2rem;
}
section {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
}
label {
  display: block;
  font-size: 0.9rem;
  margin: 1rem 0 0.4rem;
}
input,
select,
textarea {
  font: inherit;
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.7rem;
  min-height: 44px;
}
textarea {
  resize: vertical;
  overflow-wrap: anywhere;
}
button,
.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 0.35rem;
  padding: 0.65rem 1rem;
  margin: 1rem 0.5rem 0 0;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
  text-decoration: none;
}
.secondary {
  background: transparent;
  color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid oklch(60% 0.15 75);
  outline-offset: 3px;
}
.hint,
footer {
  font-size: 0.8rem;
  color: var(--muted);
}
.filename {
  overflow-wrap: anywhere;
  font-weight: 600;
}
progress {
  width: 100%;
  height: 0.8rem;
  accent-color: var(--accent);
}
#status {
  font-weight: 600;
  min-height: 1.6em;
}
#path,
li {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
summary {
  cursor: pointer;
  margin-top: 1rem;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
[hidden] {
  display: none !important;
}
.device-option {
  display: block;
  width: 100%;
  padding: 1.2rem;
  text-align: left;
}
.device-option span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 400;
}
#status-panel {
  padding: 0.75rem 0 1rem;
}
#diagnostic-panel {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
@media (max-width: 420px) {
  button,
  .button {
    width: 100%;
    margin-right: 0;
    text-align: center;
  }
}
