:root {
  --bg: #f6f5f2; --fg: #1d1d1b; --muted: #6b6a66; --card: #ffffff; --line: #dedcd6;
  --accent: #2f6f5e; --accent-fg: #ffffff; --accent-soft: #e3efe9; --err: #a33a2b; --err-soft: #f6e4e1;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --fg: #ecebe7; --muted: #9b9a95; --card: #20201e; --line: #34332f;
    --accent: #7cc4ad; --accent-fg: #10201b; --accent-soft: #1f3330; --err: #f09080; --err-soft: #3a2320; }
}
* { 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; -webkit-font-smoothing: antialiased; }
main { max-width: 560px; margin: 0 auto; padding: 56px 16px 48px; }
header { margin-bottom: 24px; }
h1 { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: .75rem; font-weight: 600; letter-spacing: 0; padding: 2px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); }
.lead, .muted { color: var(--muted); margin: 0; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 44px 16px;
  border: 2px dashed var(--line); border-radius: 16px; background: var(--card); cursor: pointer;
  text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.over { transform: scale(1.01); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop span { color: var(--muted); font-size: .9rem; }
.icon { width: 34px; height: 34px; margin-bottom: 6px; fill: none; stroke: var(--accent); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.hint { color: var(--muted); font-size: .85rem; margin: 10px 2px 0; }
.list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.item .row { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .status { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .9rem; }
.item .x { padding: 0 6px; background: none; border: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.item .x:hover { color: var(--err); }
.bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.item.done .status { color: var(--accent); }
.item.cancelled { opacity: .6; }
.item.error { background: var(--err-soft); border-color: transparent; }
.item.error .row { align-items: flex-start; }
.item.error .status { color: var(--err); white-space: normal; text-align: right; max-width: 65%; }
.share { margin-top: 10px; display: flex; gap: 8px; }
.share input { flex: 1; min-width: 0; }
.note { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
details { margin-top: 28px; }
summary { cursor: pointer; color: var(--muted); }
summary:hover { color: var(--fg); }
form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
input[type=password], .share input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--fg); font: inherit; }
input[type=password] { flex: 1; min-width: 160px; }
button { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-fg);
  font: inherit; font-weight: 500; cursor: pointer; }
button[type=button]:not(.x) { background: transparent; color: var(--muted); border: 1px solid var(--line); }
#keystate { margin-top: 8px; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
