:root {
  --bg: #fafaf7; --fg: #1d2530; --soft: #5d6877; --line: #d9dde3;
  --accent: #1f6feb; --on-accent: #fff; --warn: #9a5b00;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181d; --fg: #e8ecf1; --soft: #9aa5b4; --line: #2b333d; --accent: #5b9bff; --on-accent: #0b1220; --warn: #f0b45a; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { max-width: 32rem; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.5rem; margin: 0 0 20px; }
section[hidden] { display: none; }
form, section { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--soft); }
input:not([type=file]):not([type=checkbox]), select {
  font: inherit; color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px;
}
.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { width: 20px; height: 20px; }
details { display: flex; flex-direction: column; gap: 12px; }
details[open] summary { margin-bottom: 12px; }
summary { cursor: pointer; padding: 8px 0; min-height: 48px; display: flex; align-items: center; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  font: inherit; font-weight: 600; color: var(--fg); text-decoration: none;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:disabled { opacity: .45; cursor: default; }
.file { align-items: stretch; position: relative; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file:focus-within .btn, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { font-size: .85rem; color: var(--soft); margin: 0; text-align: center; }
progress { width: 100%; height: 10px; accent-color: var(--accent); }
ul { margin: 0; padding-left: 20px; color: var(--warn); font-size: .9rem; }
ul:empty { display: none; }
p { margin: 0; }
#msg { color: var(--warn); }
