:root {
  color-scheme: dark;
  --bg: #0b0f17; --panel: #141a25; --line: #263042; --text: #e8edf5; --muted: #8a96a8;
  --blue: #2f7bff; --green: #1fc58a; --red: #ff5d6c; --amber: #ffb547;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); padding-top: max(14px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--green)); }
.status { font-size: 14px; color: var(--muted); }
.status.on { color: var(--green); }
main { max-width: 560px; margin: 0 auto; padding: 22px 18px 60px; }
h1 { font-size: 24px; margin: 8px 0 6px; }
h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 28px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
a { color: var(--blue); }
.stack { display: grid; gap: 10px; margin-top: 18px; }
label { font-size: 14px; color: var(--muted); }
input { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
#code { font-size: 22px; letter-spacing: 3px; text-transform: uppercase; text-align: center; }
button { font: inherit; cursor: pointer; border-radius: 12px; }
.primary { border: 0; background: var(--blue); color: #fff; padding: 14px 18px; font-weight: 700; }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 10px 16px; }
.drop { width: 100%; border: 0; display: grid; gap: 2px; text-align: center; padding: 30px 18px; color: #fff; background: var(--blue); border-radius: 18px; }
.drop .big { font-size: 22px; font-weight: 700; }
.drop .small { opacity: .85; }
.drop:disabled { opacity: .5; }
.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; flex: 0 1 60%; }
.meta.done { color: var(--green); }
.meta.fail { color: var(--red); }
.bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 10px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .2s; }
.get { border: 0; background: var(--green); color: #04140d; font-weight: 700; padding: 10px 16px; flex: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
#wait { text-align: center; padding-top: 30px; }
.spinner { width: 42px; height: 42px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
