/* DESIGN.md §2 color tokens. Light is derived, dark is the source; the page follows the system setting. */
:root {
  color-scheme: light dark;
  --bg: #F4F4F1; --surface: #FFFFFF; --surface-raised: #F0EFEB; --stroke: #E6E5E0; --stroke-strong: #C9C8C2;
  --text-primary: #141418; --text-secondary: #66666E; --accent: #F2650F; --on-accent: #140800;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0F; --surface: #16161B; --surface-raised: #202027; --stroke: #26262E; --stroke-strong: #3A3A44;
    --text-primary: #F5F5F2; --text-secondary: #A1A1AA; --accent: #FF7A1A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 1.0625rem; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word;
}
main {
  max-width: 30rem; margin: 0 auto;
  padding: max(2.5rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 3rem max(1.25rem, env(safe-area-inset-left));
}
h1 { font-size: 1.75rem; line-height: 1.3; margin: 0 0 .75rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
.wordmark { font-weight: 700; color: var(--text-secondary); margin-bottom: 2rem; }
.sub { color: var(--text-secondary); font-size: .9375rem; }
.card {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: 20px;
  padding: 1.25rem; margin: 1.5rem 0 .75rem;
}
.label { font-size: .75rem; font-weight: 600; color: var(--text-secondary); margin: 0 0 .25rem; }
.code {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  font-size: clamp(2.25rem, 12vw, 3rem); font-weight: 700; letter-spacing: .12em; line-height: 1.2;
  margin: 0 0 1rem; user-select: all; -webkit-user-select: all;
}
.button {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 56px; padding: .75rem 1rem; border: 0; border-radius: 16px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
}
.button.secondary { min-height: 48px; background: var(--surface-raised); color: var(--text-primary); }
.button:active { opacity: .9; }
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.status { margin: .5rem 0 0; font-size: .9375rem; color: var(--text-secondary); text-align: center; }
a { color: var(--text-primary); }
footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--stroke); font-size: .8125rem; color: var(--text-secondary); }
footer a { color: var(--text-secondary); margin-right: 1rem; display: inline-block; padding: .5rem 0; }
[hidden] { display: none !important; }
