:root {
  --red: #e30613;
  --ink: #1d232b;
  --muted: #5d6673;
  --line: #e3e6ea;
  --bg: #f5f6f8;
  --ok: #17803d;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }

.bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.brand { color: var(--red); font-weight: 900; letter-spacing: 1px; font-size: 22px; }
.brand-team { font-weight: 900; font-style: italic; font-size: 16px; }
.code { color: var(--muted); font-weight: 700; font-size: 14px; margin-left: 4px; }

main { width: 100%; max-width: 680px; margin: 0 auto; padding: 18px 16px 32px; flex: 1; }
h1 { font-size: 22px; line-height: 1.25; margin: 4px 0 8px; }
h2 { font-size: 18px; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.small { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 16px;
}
.reminder { border-left: 4px solid var(--red); }
.reminder ul { margin: 0; padding-left: 20px; }
.reminder li { margin: 4px 0; }

.pick { display: block; position: relative; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pick input:disabled { cursor: not-allowed; }
.pick-button, button {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font: 700 17px/1.2 inherit;
  font-family: inherit;
  padding: 15px 18px;
  text-align: center;
  cursor: pointer;
}
.pick input:focus-visible + .pick-button, button:focus-visible { outline: 3px solid #1d232b55; outline-offset: 2px; }
button.secondary { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
button.link { background: none; color: var(--muted); text-decoration: underline; font-weight: 600; min-height: 44px; }
.pick-note { text-align: center; margin: 8px 0 0; }
.hint { color: var(--muted); font-size: 14px; text-align: center; margin: 10px 0 0; }

#working { text-align: center; padding-top: 48px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 16px;
  border: 4px solid var(--line); border-top-color: var(--red); border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ok { color: var(--ok); font-weight: 700; margin: 0 0 8px; }
#warnings { margin: 0 0 12px; padding-left: 20px; color: #8a5a00; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 16px; }
#previews canvas, #previews img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 12px;
  box-shadow: 0 1px 3px #0001;
}
#error h2 { color: var(--red); }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }

