:root {
  --bg: #0b0a0d;
  --surface: #17151c;
  --text: #ece8f2;
  --muted: #a49cb2;
  --accent: #a15ff5;
  --danger: #ff6b7a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 48px 16px 64px; }
header.top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 40px; }
header.top a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 22px; }
nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 15px; text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--text); }
h1 { font-size: 36px; line-height: 1.2; margin: 0 0 16px; overflow-wrap: break-word; hyphens: auto; }
h2 { overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: 22px; margin: 36px 0 8px; }
p, li { color: var(--muted); }
strong { color: var(--text); }
a { color: var(--accent); }
.card { background: var(--surface); border-radius: 20px; padding: 24px; margin: 24px 0; }
.button {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 24px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button.danger { background: var(--danger); }
.button:disabled { opacity: .5; cursor: default; }
.lang { color: var(--muted); font-size: 14px; }
footer { margin-top: 64px; color: var(--muted); font-size: 14px; }
.status { margin-top: 16px; }
.status.ok { color: #7ee2a8; }
.status.error { color: var(--danger); }

/* Телефон: меньше отступы и заголовки, длинные слова переносятся, а не вылезают за экран */
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding: 20px 16px 48px; }
  header.top { flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
  nav { margin-left: 0; }
  header.top a { font-size: 20px; }
  nav { gap: 12px; }
  nav a { font-size: 14px; }
  h1 { font-size: clamp(22px, 7.5vw, 28px); }
  h2 { font-size: 20px; margin-top: 28px; }
  .card { padding: 18px; border-radius: 16px; }
  .button { display: block; width: 100%; text-align: center; }
}
