/* «Позже» web: tokens mirror lib/core/design/tokens.dart. No build step. */
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("/fonts/Nunito-Regular.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("/fonts/Nunito-Bold.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("/fonts/Nunito-Black.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  --bg: #15101F;
  --surface: #211933;
  --surface2: #2E263F;
  --border: #3D3846;
  --text: #F3EEFA;
  --muted: #847F8D;
  --card-muted: #958EA0;
  --accent: #FF7A3D;
  --accent-pressed: #DA6938;
  --accent-shadow: #B8582C;
  --on-accent: #15101F;
  --accent2: #FFD23F;
  --r-md: 19px;
  --r-lg: 30px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
.wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 17px;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 900; font-size: 22px; }
.brand img { width: 34px; height: 34px; flex: none; display: block; }

h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0; letter-spacing: -0.01em; overflow-wrap: break-word; }
h1 { font-size: clamp(30px, 8.6vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
.lead { color: var(--card-muted); font-size: 18px; }
.muted { color: var(--muted); font-size: 15px; }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.label { color: var(--card-muted); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }

/* Invite code */
.code {
  font-weight: 900;
  font-size: clamp(40px, 13vw, 54px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--accent2);
  text-align: center;
  padding: 17px 8px;
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

/* Buttons: chunky, 4px underside like the app's primary button */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--r-md);
  font: inherit;
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(.22,1,.36,1), box-shadow 160ms cubic-bezier(.22,1,.36,1);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.btn:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--accent-shadow); }
.btn-primary:active { background: var(--accent-pressed); }
.btn-secondary { background: var(--surface2); color: var(--text); box-shadow: 0 4px 0 #0E0A15; }
.btn[hidden] { display: none; }

/* Store badges (placeholders until the app is published) */
.stores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  line-height: 1.2;
}
.store small { color: var(--card-muted); font-weight: 400; font-size: 12px; }
.store[aria-disabled="true"] { cursor: default; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--card-muted); }
.steps li::before {
  content: counter(s);
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--accent2);
  font-weight: 900;
  font-size: 15px;
  display: grid; place-items: center;
}
.steps b { color: var(--text); }

.toast { min-height: 1.5em; text-align: center; color: var(--accent2); font-weight: 700; font-size: 15px; }
.footer { margin-top: 8px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer a { color: var(--muted); }

/* Long-form text (privacy policy) */
.doc { gap: 25px; }
.doc h1 { font-size: clamp(30px, 8.6vw, 40px); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.doc section { display: flex; flex-direction: column; gap: 10px; }
.doc h2 { font-size: 24px; margin-top: 8px; }
.doc h3 { font-size: 19px; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc li::marker { color: var(--accent); }
.doc .tbd { background: rgba(255, 210, 63, 0.14); color: var(--accent2); border-radius: 6px; padding: 0 4px; font-weight: 700; }
.doc .note { color: var(--accent2); font-size: 15px; }
.draft {
  border: 2px solid var(--accent2);
  border-radius: var(--r-md);
  padding: 13px 17px;
  background: rgba(255, 210, 63, 0.08);
  font-size: 15px;
}
.draft strong { color: var(--accent2); }
.data { display: flex; flex-direction: column; gap: 10px; }
.data .card { padding: 17px 20px; gap: 6px; border-radius: var(--r-md); }
.data dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 15px; }
.data dt { color: var(--card-muted); }
.data dd { margin: 0; }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
