:root {
  /* One column. Big drop target first, results as a grid of cards. */
  --ink: #16181b;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #e3e1da;
  --muted: #6a6e73;
  --accent: #e0442b;
  --accent-ink: #ffffff;
  --check-a: #ebe9e3;
  --check-b: #ffffff;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceae4;
    --paper: #121314;
    --card: #1b1c1e;
    --line: #2e3033;
    --muted: #a0a3a8;
    --accent: #ff6a50;
    --accent-ink: #1a0905;
    --check-a: #26282b;
    --check-b: #303236;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 18px 24px; }
.mark { font: 800 26px/1 var(--font); letter-spacing: -0.03em; text-decoration: none; }
.mark span { color: var(--accent); }
.promise { margin: 0; color: var(--muted); font-size: 14px; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px 24px; }

.drop {
  margin-top: 6vh; border: 2px dashed var(--line); border-radius: 20px; background: var(--card);
  padding: 64px 24px; display: grid; justify-items: center; gap: 18px; text-align: center;
}
body.hot .drop, body.hot .grid { border-color: var(--accent); outline: 2px dashed var(--accent); outline-offset: 6px; }
.drop h1 { margin: 0; font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; }
.big { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 19px; padding: 14px 30px; border-radius: 999px; cursor: pointer; }
.big:hover { filter: brightness(1.06); }
.hint { margin: 0; color: var(--muted); }
kbd { font: 13px var(--mono); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--paper); }
.fine { margin: 0; font-size: 13px; color: var(--muted); }
.center { text-align: center; margin-top: 16px; }

.tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0 16px; }
.bgs, .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; position: relative; overflow: hidden; display: inline-block; }
.chip[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip.clear { background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 12px 12px; }
.chip.white { background: #fff; }
.chip.black { background: #000; }
.chip.pick { background: conic-gradient(#e0442b, #f2c230, #3bb273, #2f6fde, #9b4fd1, #e0442b); }
.chip.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: 15px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; border-radius: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.pic { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 12px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 16px 16px; }
.pic canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.busy { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--card) 72%, transparent); font-weight: 600; }
.busy::before { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; margin-bottom: 8px; }
.busy { grid-template-rows: auto auto; align-content: center; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy::before { animation: none; } }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.name { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bar .btn { flex: none; }
.err { color: var(--accent); font-size: 14px; }

.ad { width: 100%; max-width: 760px; margin: 8px auto 0; padding: 0 24px; position: relative; }
.ad iframe { width: 100%; height: 120px; border: 0; display: block; }
.adlabel { position: absolute; top: -18px; left: 24px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.foot { max-width: 760px; margin: 0 auto; padding: 24px; font-size: 13px; color: var(--muted); text-align: center; display: grid; gap: 6px; }
.foot p { margin: 0; }
.status { font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90vw; z-index: 10; }
