:root {
  --bg: #eef0f4; --surface: #fff; --surface-2: #e2e6ec; --ink: #14171f; --ink-2: #4b5260; --ink-3: #7b8290;
  --line: rgba(20, 23, 31, .08); --accent: #1f6fe0; --accent-text: #1a5fc4; --red: #c4382e; --green: #1d7d46;
  --shadow: 0 1px 2px rgba(15, 20, 30, .06), 0 6px 20px rgba(15, 20, 30, .06);
  --font: 'Figtree', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1016; --surface: #171b23; --surface-2: #232834; --ink: rgba(255,255,255,.94); --ink-2: rgba(255,255,255,.7);
    --ink-3: rgba(255,255,255,.5); --line: rgba(255,255,255,.09); --accent: #4d9bff; --accent-text: #6aaeff;
    --red: #ff7b72; --green: #4cc38a; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
main { max-width: 520px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top, 0px)) 18px calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand b { font-size: 20px; letter-spacing: -.01em; }
.mark { width: 44px; height: 44px; border-radius: 13px; background: #111827; color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 21px; flex: none; }
.mark.small { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
h1 { font-size: 30px; font-weight: 750; letter-spacing: -.025em; margin: 10px 0 0; }
.sub { color: var(--ink-2); font-size: 16.5px; line-height: 1.45; margin: -4px 0 4px; }
.sub b { color: var(--ink); }
.hint { color: var(--ink-3); font-size: 14px; line-height: 1.45; margin: 0; }
.err { color: var(--red); font-size: 15.5px; margin: 0; }
.ok { color: var(--green); font-size: 15.5px; margin: 0; }
button, .btn { appearance: none; font: inherit; font-size: 17.5px; font-weight: 650; min-height: 54px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center;
  justify-content: center; gap: 10px; padding: 0 22px; cursor: pointer; text-decoration: none; }
button[disabled] { opacity: .5; cursor: default; }
button svg, .btn svg { width: 21px; height: 21px; flex: none; }
.accent { background: var(--accent); color: #fff; border-color: transparent; }
.black { background: #000; color: #fff; border-color: transparent; }
.link { min-height: 0; border: 0; background: none; padding: 6px 0; color: var(--accent-text); font-size: 16px; align-self: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 14.5px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
input { font: inherit; font-size: 18px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; outline: none; width: 100%; }
input:focus { border-color: var(--accent); }
input.code { font-size: 24px; font-weight: 700; letter-spacing: .2em; }
form { display: flex; flex-direction: column; gap: 12px; }
.lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 14px 4px -6px; }
.list { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t b { font-size: 16.5px; font-weight: 650; overflow-wrap: anywhere; }
.t small { font-size: 14px; color: var(--ink-3); line-height: 1.35; }
.act { min-height: 0; border: 0; background: none; padding: 8px 0 8px 8px; color: var(--accent-text); font-size: 15px; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 14px; margin: 4px 4px 0; }
.av { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; font-size: 22px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.who .t b { font-size: 19px; }
.ghost { margin-top: 18px; }
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 22, .38); display: flex; align-items: flex-end; justify-content: center; z-index: 5; }
.sheet { width: 100%; max-width: 520px; background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 18px 22px calc(26px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
/* While it loads (design/loading/, B + A): the page's shape, a line at the top while last time's page is checked, and a
   note in its place when the check fails. Last time's buttons wait for the fresh answer. */
.sk { display: block; flex: none; max-width: 100%; border-radius: 7px; background-size: 300% 100%; animation: sk 1.7s ease-in-out infinite;
  background-image: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 45%, var(--surface)) 50%, var(--surface-2) 70%); }
.sk.round { border-radius: 50%; }
.who .t:has(.sk), .row .t:has(.sk) { gap: 8px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.topline { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 3px; overflow: hidden; z-index: 6; pointer-events: none; }
.topline::before { content: ''; position: absolute; top: 0; bottom: 0; width: 38%; border-radius: 2px; background: var(--accent); animation: topline 1.5s cubic-bezier(.45, .05, .4, 1) infinite; }
@keyframes topline { from { left: -38%; } to { left: 100%; } }
.stale-note { margin: 0; padding: 9px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; color: #8f5200; background: color-mix(in srgb, #f2a024 16%, var(--bg)); }
.stale-note button { min-height: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; }
.stale .act, .stale #addface { opacity: .45; pointer-events: none; }
@media (prefers-color-scheme: dark) { .stale-note { color: #f2b45a; } }
@media (prefers-reduced-motion: reduce) { .sk, .topline::before { animation: none; } .topline::before { left: 0; width: 100%; opacity: .5; } }
