:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #16181d;
  --muted: #646a75;
  --line: #d9dce2;
  --accent: #1f5eff;
  --accent-text: #ffffff;
  --error: #c62828;
  --notice-bg: #fff6d6;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --card: #1c1f26;
    --text: #eef0f4;
    --muted: #9aa1ad;
    --line: #333845;
    --accent: #5b8cff;
    --accent-text: #0b1020;
    --error: #ff8a80;
    --notice-bg: #3a3214;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  justify-content: center;
}

/* ---------- реклама ---------- */

.ads {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  aspect-ratio: 16 / 10;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.ads__track {
  display: flex;
  height: 100%;
  transition: transform .45s ease;
}

.slide {
  flex: 0 0 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.slide img, .slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide--text {
  background: linear-gradient(135deg, var(--accent), #7a3cff);
  color: #fff;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.slide__caption {
  position: relative;
  padding: 14px 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slide--image .slide__caption, .slide--video .slide__caption {
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.slide__caption strong { font-size: 18px; }
.slide__caption span { font-size: 14px; opacity: .92; }

.ads__dots {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
}
.dot--on { background: #fff; }

/* ---------- карточка ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 { margin: 0 0 12px; font-size: 24px; line-height: 1.2; }

.lead { margin: 0 0 16px; color: var(--muted); }
.muted { color: var(--muted); margin: 0 0 8px; font-size: 14px; }

label { display: block; font-size: 14px; margin: 12px 0 6px; }

input[type=email], input[type=text] {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
#code { letter-spacing: .3em; text-align: center; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 18px;
  font-size: 14px;
  color: var(--muted);
}
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.check a { color: inherit; }

button, .button {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button:disabled { opacity: .55; cursor: default; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }

.trial { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

.links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.link {
  width: auto;
  padding: 0;
  background: none;
  color: var(--accent);
  font-weight: 500;
  font-size: 14px;
}
.link-plain { display: block; margin-top: 12px; text-align: center; color: var(--accent); font-size: 14px; }

.notice { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--notice-bg); font-size: 14px; }
.error { margin: 14px 0 0; color: var(--error); font-size: 14px; }

.foot { text-align: center; font-size: 13px; }
.foot a { color: var(--muted); }

/* документ с условиями */
.doc h2 { font-size: 17px; margin: 20px 0 6px; }
.doc p, .doc li { color: var(--text); font-size: 15px; }
.todo { background: var(--notice-bg); padding: 0 4px; border-radius: 4px; }

/* Атрибут hidden сильнее любого display из правил выше */
[hidden] { display: none !important; }
