:root {
  --paper: #f3efe6;
  --surface: #fffdf8;
  --ink: #16140f;
  --muted: #6b6559;
  --line: #d9d2c3;
  --tape: #ffd23f;
  --tape-ink: #16140f;
  --ok: #1f8a4c;
  --bad: #c2321f;
  --radius: 14px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12110e;
    --surface: #1c1a16;
    --ink: #f1ece1;
    --muted: #a39c8e;
    --line: #34302a;
    --ok: #4cc47f;
    --bad: #ff6b55;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 48px;
}

/* Hazard tape across the top: the whole app is held together with it. */
.tape-bar {
  width: calc(100% + 32px);
  height: 10px;
  margin: 0 -16px 28px;
  background: repeating-linear-gradient(-45deg, var(--tape) 0 14px, var(--tape-ink) 14px 28px);
}

main { width: 100%; max-width: 560px; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
}
.brand b {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand span {
  font-size: 13px;
  color: var(--muted);
}

h1 {
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 8px;
}
.lede { color: var(--muted); margin: 0 0 24px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card.taped::before {
  /* A strip of tape pinning the card down. */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 92px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--tape);
  opacity: 0.9;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.08);
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { border-color: var(--ink); }
.drop.over { background: color-mix(in srgb, var(--tape) 18%, var(--surface)); }
.drop strong { font-size: 20px; letter-spacing: -0.02em; }
.drop small { color: var(--muted); }
.drop input { display: none; }

.files { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.file {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.file .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file .meta { grid-column: 1; font: 13px/1.4 var(--mono); color: var(--muted); }
.file .meta.bad { color: var(--bad); }
.file .actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.2s; }
.file.done .bar i { background: var(--ok); }

button, .button {
  font: 600 16px/1 var(--font);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  background: var(--tape);
  color: var(--tape-ink);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--tape-ink);
}
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tape-ink); }
.primary:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: 0 3px 0 var(--tape-ink); }
.ghost {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  font-size: 14px;
}
.ghost:hover { border-color: var(--ink); }
.icon { width: 36px; padding: 0; font-size: 18px; }

.summary {
  display: flex;
  justify-content: space-between;
  font: 13px/1.4 var(--mono);
  color: var(--muted);
  margin: 12px 0 0;
}

.notice { font-size: 14px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.error { color: var(--bad); font-weight: 600; }
.big-emoji { font-size: 48px; line-height: 1; margin-bottom: 12px; }

.linkbox {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.linkbox input {
  flex: 1;
  min-width: 0;
  font: 14px var(--mono);
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 8px; }
code {
  font: 0.92em var(--mono);
  background: color-mix(in srgb, var(--tape) 35%, transparent);
  padding: 1px 6px;
  border-radius: 6px;
}

.hidden { display: none !important; }

footer { margin-top: 32px; font-size: 13px; color: var(--muted); text-align: center; }
