:root {
  --bg: #e4e7ea; --surface: #f8f9fa; --sunk: #f1f3f5; --ink: #1f2328; --ink-2: #565e67; --line: #d0d5da;
  --graphite: #1f2328; --on-graphite: #f8f9fa; --green: #1fbf5f; --green-ink: #0b6e35; --green-wash: #e5f6ec;
  --green-line: #b0e0c2; --blue: #2f6bff; --red-ink: #b42323; --red-wash: #fdecec; --red-line: #f3c2c2;
  --shadow: 0 1px 2px rgba(15, 18, 22, 0.06), 0 8px 24px -18px rgba(15, 18, 22, 0.35);
  --text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316; --surface: #1a1d21; --sunk: #14171a; --ink: #e7eaed; --ink-2: #9ba4ad; --line: #2c3137;
    --graphite: #e7eaed; --on-graphite: #16191c; --green: #3ddc84; --green-ink: #5fe69c; --green-wash: #12271b;
    --green-line: #245539; --blue: #6c9bff; --red-ink: #ff8f8f; --red-wash: #381a1c; --red-line: #5c2a2d;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.page { max-width: 600px; margin: 0 auto; padding: 28px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.005em; }
.mark { color: var(--graphite); flex: none; }
.mark-light { fill: var(--green); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.lead { margin: 0; font-size: 16.5px; line-height: 1.5; overflow-wrap: anywhere; }
.note { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.warn { margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--red-line); background: var(--red-wash); color: var(--red-ink); font-weight: 600; }
.steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.steps li::marker { font-weight: 700; color: var(--ink-2); }
.code { font: 700 22px/1.2 var(--mono); letter-spacing: 0.06em; white-space: nowrap; }
.codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--graphite); background: var(--graphite); color: var(--on-graphite); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:hover { opacity: 0.88; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.status::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: blink 1.6s ease-in-out infinite; }
.status[data-state=allowed] { background: var(--green-wash); border-color: var(--green-line); color: var(--green-ink); }
.status[data-state=allowed]::before { animation: none; background: var(--green-ink); }
.status[data-state=ended] { background: var(--red-wash); border-color: var(--red-line); color: var(--red-ink); }
.status[data-state=ended]::before { animation: none; background: var(--red-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
form { margin: 0; }
b, .name { overflow-wrap: anywhere; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (max-width: 560px) {
  .page { padding-top: 20px; }
  .panel { padding: 20px 18px 18px; }
  h1 { font-size: 21px; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .status::before { animation: none; } }
