:root {
  --bg: #f6f5f2; --card: #ffffff; --ink: #17171a; --muted: #6b6b73; --line: #e4e2dc;
  --brand: #111111; --accent: #0a7c4a; --accent-soft: #e6f4ec; --warn: #9a5b00; --warn-soft: #fff4e0;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121214; --card: #1c1c20; --ink: #f2f2f3; --muted: #a0a0a8; --line: #2e2e34;
    --brand: #f2f2f3; --accent: #3ccf8e; --accent-soft: #143024; --warn: #f5b24a; --warn-soft: #33270f; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 48px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 16px; }
.logo { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.logo small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: 0; }
h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.btn.google { background: var(--accent); color: #fff; border-color: var(--accent); font-size: 17px; min-height: 58px; }
.btn + .btn { margin-top: 10px; }
.btn.link { background: none; border: none; min-height: 40px; color: var(--muted); font-weight: 500; }
select, input[type=text], input[type=password] { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.grup { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 4px 0 8px; }
.ideas { margin: 0; padding: 0; list-style: none; }
.ideas li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--bg); }
.ideas b { display: block; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ok { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.list { display: grid; gap: 8px; }
.list a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.list a span { color: var(--muted); font-weight: 400; font-size: 14px; }
.qrbox { background: #fff; border-radius: 16px; padding: 12px; display: grid; place-items: center; margin: 8px auto 12px; max-width: 320px; }
.qrbox svg { width: 100%; height: auto; display: block; }
.big-stat { font-size: 34px; font-weight: 800; line-height: 1; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.script { border-left: 3px solid var(--accent); padding: 6px 0 6px 12px; margin: 0 0 14px; }
.script b { display: block; font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--brand); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; transition: .2s; pointer-events: none; z-index: 9; }
#toast.show { opacity: 1; transform: translateX(-50%); }
.hidden { display: none !important; }
footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; }
.fullscreen-qr { position: fixed; inset: 0; background: #fff; color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; z-index: 8; text-align: center; }
.fullscreen-qr .qrbox { max-width: min(86vw, 70vh); width: 100%; }
.fullscreen-qr h2 { font-size: 22px; }
