/* Recomp web: tokens from docs/reference/tokens.json (light + dark have the same keys). */
:root {
  --paper: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #fafbf6;
  --ink: #101210;
  --ink-2: #3b403a;
  --muted: #5f665d;
  --line: #dfe1da;
  --accent: #c9f24c;
  --accent-soft: #eef9cf;
  --accent-ink: #42620a;
  --on-accent: #0b0d06;
  --danger: #b93326;
  --danger-soft: #fadcd8;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #08090a;
    --surface: #131416;
    --surface-2: #1b1d20;
    --ink: #f3f5f0;
    --ink-2: #aeb4ab;
    --muted: #8a9188;
    --line: #242729;
    --accent-soft: #1f2b0d;
    --accent-ink: #c9f24c;
    --danger: #ff7466;
    --danger-soft: #3a1c19;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
main { width: 100%; max-width: 420px; }

.brand { display: flex; align-items: center; gap: 10px; margin: 8px 0 28px; font-weight: 600; font-size: 18px; letter-spacing: 0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}
h1 { font-size: 24px; line-height: 1.25; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; color: var(--ink-2); }
.muted { color: var(--muted); font-size: 14px; }
.client { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

ul.perms { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 10px; }
ul.perms li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 15px; }
ul.perms li::before {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%;
  background: var(--accent-ink);
}
ul.perms li.no::before { background: var(--muted); }

label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; color: var(--ink-2); }
input {
  width: 100%;
  font: inherit;
  font-size: 17px; /* ≥16px: no zoom on iOS */
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
input.code { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; text-align: center; font-size: 22px; }

.actions { display: grid; gap: 10px; margin-top: 4px; }
button {
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 20px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, opacity 120ms ease;
}
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: default; transform: none; }
button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.primary { background: var(--accent); color: var(--on-accent); }
.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.link { background: none; border: 0; min-height: 0; padding: 0; color: var(--accent-ink); font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.msg { border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.msg.info { background: var(--accent-soft); color: var(--accent-ink); }

.who { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.who span { overflow-wrap: anywhere; min-width: 0; }
.who .link { flex: none; white-space: nowrap; }

footer { margin-top: 20px; text-align: center; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { button { transition: none; } button:active { transform: none; } }
