:root {
  color-scheme: light dark;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #c9c9c9;
  --accent: #1a5fb4;
  --bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #9a9a9a;
    --border: #4a4a4a;
    --accent: #7cb3ff;
    --bg: #1a1a1a;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
.wrap { max-width: 640px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
header { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 1.5rem; }
header h1 { font-size: 1.5rem; }
header h1 a { color: inherit; text-decoration: none; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem; }
a { color: var(--accent); }
p { margin-bottom: 0.75rem; }
h2 { margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
code {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
  word-break: break-all;
}
.muted { color: var(--muted); font-size: 0.9rem; }
.small { font-size: 0.8rem; }
.error { color: #c0392b; }
.ok { color: #1e8e3e; }
input[type="text"] { width: min(100%, 24rem); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
.btn, button {
  display: inline-block;
  box-sizing: border-box;
  line-height: 1.5;
  text-align: center;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.btn:hover, button:hover { border-color: var(--accent); color: var(--accent); }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.file-name { max-width: 20rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-big {
  display: block;
  width: 100%;
  padding: 1.1rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}
.btn-big:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
progress { width: 100%; height: 1.25rem; }
.pow-row { display: flex; align-items: center; gap: 0.75rem; }
.bar {
  flex: 1;
  display: block;
  height: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s linear;
}
.bar-fill.up { background: #b0b3b8; }
.bar-fill.store { background: var(--accent); }
[x-cloak] { display: none; }
.md h2 { margin-top: 2rem; }
.md h3 { margin-top: 1.5rem; }
.md ul, .md ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.md p { margin-bottom: 0.75rem; }
