:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --accent: #1f6feb;
  --danger: #c62828;
  --border: #e3e5e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --card: #1b1e24;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --accent: #4c8dff;
    --danger: #ef6b6b;
    --border: #2c3038;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main {
  max-width: 640px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px 32px;
}
h1 { font-size: 1.4rem; margin: 8px 0 16px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.device { color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
form { display: flex; flex-wrap: wrap; gap: 8px; }
input[type=password], input[type=file], select {
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
input[type=password], input[type=file] { flex: 1 1 220px; min-width: 0; }
button {
  font: inherit;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button.link { background: none; color: var(--accent); padding: 4px; }
button.danger { background: none; color: var(--danger); padding: 4px 8px; }
progress { width: 100%; margin-top: 12px; }
.status, .muted { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--danger); }
.files { list-style: none; margin: 0; padding: 0; }
.files li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.files li:first-child { border-top: 0; }
.files .info { flex: 1; min-width: 0; }
.files .name { overflow-wrap: anywhere; }
.files .meta { color: var(--muted); font-size: 0.85rem; }
.files a.dl {
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
}
