/* Built-in look: neutral, light or dark with the system. A theme.css from
   FILEDROP_BRANDING_DIR loads after this and can override any of these
   variables (and add rules for .site-name and .logo). */
:root {
  color-scheme: light dark;
  --bg: #f6f6f4;
  --fg: #1d1d1f;
  --heading: #1d1d1f;
  --card: #ffffff;
  --field: #f6f6f4;
  --line: #d9d9de;
  --muted: #6b6b70;
  --accent: #2f6fde;
  --accent-hover: #2a62c4;
  --accent-fg: #ffffff;
  --focus: #2f6fde;
  --ok: #23863a;
  --bad: #c4372f;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --heading-font: 600 1.5rem var(--font);
  --heading-spacing: normal;
  --logo-width: 120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a;
    --fg: #ececf0;
    --heading: #ececf0;
    --card: #222226;
    --field: #17171a;
    --line: #3a3a40;
    --muted: #9a9aa2;
    --accent: #6c9dfa;
    --accent-hover: #82acfb;
    --accent-fg: #0d1117;
    --focus: #6c9dfa;
    --ok: #5cc072;
    --bad: #f07a72;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  font: 16px/1.5 var(--font);
  color: var(--fg);
  background: var(--bg);
}
.site-name {
  position: absolute;
  top: clamp(1.25rem, 4vw, 3rem);
  left: clamp(1.25rem, 4vw, 3rem);
  margin: 0;
  color: var(--heading);
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  letter-spacing: .08em;
}
main {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) 1.5rem 3rem;
}
.logo { display: block; width: var(--logo-width); height: auto; margin: 0 auto 1rem; }
h1 {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--heading);
  font: var(--heading-font);
  letter-spacing: var(--heading-spacing);
}
section {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
section > p:first-child { margin-top: 0; }
form { display: flex; gap: .5rem; }
input#code {
  flex: 1;
  min-width: 0;
  padding: .6rem .8rem;
  font: 1.1rem var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}
input#code:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
button {
  padding: .6rem 1rem;
  font: inherit;
  color: var(--accent-fg);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .6; cursor: default; }
button.link { padding: 0; color: var(--muted); background: none; text-decoration: underline; }
.error { min-height: 1.5em; color: var(--bad); }
.muted { margin-top: .25rem; color: var(--muted); }
progress { width: 100%; height: .6rem; accent-color: var(--accent); }
#dropzone {
  display: block;
  margin: 1.5rem 0;
  padding: 2.5rem 1rem;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
}
#dropzone.over, #dropzone:hover { border-color: var(--focus); }
#dropzone input { display: block; margin: 1rem auto 0; color: var(--fg); }
#queue { list-style: none; padding: 0; }
#queue li {
  display: grid;
  grid-template-columns: 1fr 8rem 7rem;
  gap: .75rem;
  align-items: center;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
}
#queue .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#queue .state { color: var(--muted); font-size: .9rem; text-align: right; }
#queue li.done .state { color: var(--ok); }
#queue li.failed .state { color: var(--bad); }
