/* ============================================================
   Электронная книга жалоб и предложений — стили виджета
   ============================================================ */

:root {
  --brand: #d7263d;
  --brand-dark: #a81c2e;
  --brand-soft: #fdecef;
  --accent: #f4b942;

  --ink: #14181f;
  --ink-2: #3d4451;
  --muted: #777f90;
  --line: #e5e8ef;
  --line-strong: #d3d8e3;
  --bg: #f6f4f2;
  --surface: #ffffff;
  --success: #12a368;
  --danger: #d7263d;

  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-card: 0 30px 70px -30px rgba(23, 28, 38, 0.35), 0 6px 18px -8px rgba(23, 28, 38, 0.12);
  --shadow-btn: 0 12px 24px -10px rgba(215, 38, 61, 0.65);

  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(215, 38, 61, 0.16), transparent 62%),
    radial-gradient(900px 560px at 92% 0%, rgba(244, 185, 66, 0.18), transparent 58%),
    radial-gradient(800px 600px at 50% 110%, rgba(215, 38, 61, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

.app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 20px 56px;
}

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

.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 44px 44px;
  overflow: hidden;
  isolation: isolate;
}

.card__glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(215, 38, 61, 0.07), transparent);
  pointer-events: none;
  z-index: -1;
}

.head { margin-bottom: 32px; }

.head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 18px -8px rgba(215, 38, 61, 0.8);
}

.brand__text { display: flex; flex-direction: column; min-width: 0; }

.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.head__site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.18s, color 0.18s, transform 0.18s;
}
.head__site:hover { border-color: var(--line-strong); color: var(--brand); transform: translateY(-1px); }
.head__site:focus-visible { outline: 3px solid rgba(215, 38, 61, 0.28); outline-offset: 2px; }

.head__title {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.16;
  letter-spacing: -0.7px;
  font-weight: 800;
}

.head__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  color: var(--muted);
  max-width: 58ch;
}

/* ─────────────────────────── поля ─────────────────────────── */

.form { display: block; }

.field { margin-bottom: 26px; }

.field__label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.req { color: var(--brand); }

.input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: #fbfbfd;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  appearance: none;
}

.input::placeholder { color: #a6adbb; }

.input:hover:not(:disabled) { border-color: var(--line-strong); }

.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(215, 38, 61, 0.12);
}

.input:disabled { background: #f3f4f7; color: #9aa1af; cursor: not-allowed; }

.input--area {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
  padding-top: 14px;
}

.input--phone { letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }

.field__meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.counter { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-warn { color: var(--brand); }
.counter.is-danger { color: var(--danger); font-weight: 600; }

.field__hint { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.field__error {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--danger);
  font-weight: 500;
  min-height: 0;
}
.field__error:empty { display: none; }

.field.is-invalid .input,
.field.is-invalid .input--area { border-color: var(--danger); background: #fffafb; }
.field.is-invalid .input:focus { box-shadow: 0 0 0 4px rgba(215, 38, 61, 0.14); }

/* ─────────────────────── сегментированный контрол ─────────────────────── */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px;
  background: #f4f5f8;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: border-color 0.16s;
}
.segmented:focus-within { border-color: rgba(215, 38, 61, 0.28); }

.segmented__item { position: relative; cursor: pointer; }

.segmented__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.segmented__box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink-2);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  user-select: none;
}

.segmented__icon { width: 19px; height: 19px; opacity: 0.75; }

.segmented__item:hover .segmented__box { background: #fff; box-shadow: 0 4px 12px -6px rgba(23, 28, 38, 0.25); }

.segmented__input:checked + .segmented__box {
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(215, 38, 61, 0.9);
}
.segmented__input:checked + .segmented__box .segmented__icon { opacity: 1; }

.segmented__input:focus-visible + .segmented__box {
  outline: 3px solid rgba(215, 38, 61, 0.35);
  outline-offset: 2px;
}

/* ─────────────────────────── звёзды ─────────────────────────── */

.rating { display: flex; align-items: center; gap: 6px; }

.rating__star {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.rating__star svg {
  width: 34px;
  height: 34px;
  fill: #dfe3ec;
  stroke: none;
  transition: fill 0.16s ease, transform 0.16s ease;
}

.rating__star:hover { background: rgba(244, 185, 66, 0.12); transform: translateY(-2px); }
.rating__star:focus-visible { outline: 3px solid rgba(215, 38, 61, 0.3); outline-offset: 1px; }
.rating__star.is-hover svg { fill: #f7cd72; }
.rating__star.is-active svg { fill: var(--accent); }

.rating__value {
  margin-left: 10px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  min-width: 66px;
}

@media (hover: none) {
  .rating__star:hover { background: transparent; transform: none; }
}

/* ─────────────────────────── телефон ─────────────────────────── */

.phone { display: flex; gap: 10px; align-items: stretch; }

.phone__input-wrap { position: relative; flex: 1 1 auto; min-width: 0; }

.phone__badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: #e7f7ef;
  color: #0e7a4e;
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
  animation: pop 0.28s ease;
}

.phone__status { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--success); font-weight: 600; }
.phone__status:empty { display: none; }
.phone__status.is-error { color: var(--danger); }

.input--phone.is-verified { border-color: #b7e5cd; background: #f7fdfa; }

/* ─────────────────────────── кнопки ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, color 0.16s, border-color 0.16s;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible { outline: 3px solid rgba(215, 38, 61, 0.32); outline-offset: 2px; }

.btn--primary {
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(215, 38, 61, 0.75); }
.btn--primary:active:not(:disabled) { transform: translateY(0); }

.btn--outline {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-strong);
  flex: 0 0 auto;
}
.btn--outline:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }

.btn--ghost {
  background: var(--brand-soft);
  color: var(--brand);
  min-height: 46px;
  font-size: 14px;
}
.btn--ghost:hover { background: #fbdde3; }

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.btn--submit {
  width: 100%;
  min-height: 58px;
  font-size: 16.5px;
  letter-spacing: 0.2px;
  position: relative;
}

.btn__spinner {
  display: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2.4px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.92; }

/* ─────────────────────────── email ─────────────────────────── */

.field--email {
  padding: 18px 18px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: #fcfcfd;
}

.email__hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border-radius: 10px;
}
.email__hint svg { flex: 0 0 18px; color: var(--brand); margin-top: 1px; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
  user-select: none;
  width: fit-content;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.checkbox__box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  border: 1.6px solid var(--line-strong);
  background: #fff;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
}
.checkbox__box svg { width: 13px; height: 13px; color: #fff; opacity: 0; transition: opacity 0.14s; }
.checkbox input:checked + .checkbox__box {
  background: var(--brand);
  border-color: var(--brand);
}
.checkbox input:checked + .checkbox__box svg { opacity: 1; }
.checkbox input:focus-visible + .checkbox__box { outline: 3px solid rgba(215, 38, 61, 0.3); outline-offset: 2px; }
.checkbox:hover .checkbox__box { border-color: var(--brand); }

/* ─────────────────────────── honeypot ─────────────────────────── */

.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────── отправка ─────────────────────────── */

.field--submit { margin-top: 30px; margin-bottom: 0; }

.consent {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.form__status {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--danger);
  text-align: center;
}
.form__status:empty { display: none; }
.form__status.is-error {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdeef0;
}

/* ─────────────────────────── успех ─────────────────────────── */

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 0 6px;
  animation: rise 0.4s ease;
}
.success[hidden] { display: none; }

.success__icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(140deg, #13b377, #0a8f5f);
  box-shadow: 0 18px 34px -16px rgba(16, 163, 106, 0.8);
  margin-bottom: 22px;
  animation: pop 0.42s ease;
}
.success__icon svg { width: 38px; height: 38px; color: #fff; }

.success__title { margin: 0 0 12px; font-size: 25px; line-height: 1.25; letter-spacing: -0.4px; font-weight: 800; }

.success__text { margin: 0 0 14px; font-size: 15px; line-height: 1.62; color: var(--muted); max-width: 46ch; }

.success__id {
  margin: 0 0 24px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  background: #f4f5f8;
  font-variant-numeric: tabular-nums;
}
.success__id:empty { display: none; }

/* ─────────────────────────── модалка ─────────────────────────── */

.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(10, 14, 22, 0.55);
  overflow: visible;
}

.modal::backdrop {
  background: rgba(16, 20, 28, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal[open] { animation: modalIn 0.24s ease; }

.modal__inner {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 860px);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff7f8, #fff);
}

.modal__title { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -0.3px; font-weight: 800; }
.modal__sub { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.modal__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 11px;
  background: #f2f3f6;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.modal__close:hover { background: #e8eaf0; color: var(--ink); }
.modal__close:focus-visible { outline: 3px solid rgba(215, 38, 61, 0.3); outline-offset: 2px; }

.modal__body { padding: 20px 26px 26px; overflow-y: auto; overscroll-behavior: contain; }

.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }

.channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s, transform 0.16s;
}
.channel:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.channel:focus-visible { outline: 3px solid rgba(215, 38, 61, 0.3); outline-offset: 2px; }

.channel__icon { display: grid; place-items: center; width: 26px; height: 26px; color: var(--muted); }
.channel__icon svg { width: 24px; height: 24px; }
.channel__title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.channel__hint { font-size: 11px; color: var(--muted); }

.channel.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 10px 22px -16px rgba(215, 38, 61, 0.9);
}
.channel.is-active .channel__icon { color: var(--brand); }
.channel.is-active .channel__hint { color: var(--brand-dark); }

.channel:disabled,
.channel.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.channel:disabled:hover,
.channel.is-disabled:hover {
  border-color: var(--line);
  transform: none;
}

.instruction {
  padding: 16px 18px;
  border-radius: 14px;
  background: #f7f8fb;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.instruction__title { margin: 0 0 10px; font-size: 14.5px; font-weight: 750; }
.instruction__note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.steps li { margin-bottom: 4px; }
.steps li::marker { color: var(--brand); font-weight: 700; }
.steps:empty { display: none; }

.modal .btn--ghost { margin-top: 12px; width: 100%; }

.demo {
  border: 1.5px dashed #e8c26a;
  background: #fffaec;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.demo[hidden] { display: none; }

.demo__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }

.demo__badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #4a3400;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.demo__hint { font-size: 11.5px; color: #8a6a12; line-height: 1.4; }

.demo__code {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 9px;
  color: #7a5a00;
  text-align: center;
  padding: 6px 0 2px;
  font-variant-numeric: tabular-nums;
}

.code { margin: 0; }
.code__row { display: flex; gap: 10px; }

.input--code {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-height: 52px;
}

.code__help {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 650;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:disabled { color: #b7bcc7; cursor: not-allowed; text-decoration: none; }
.link:focus-visible { outline: 3px solid rgba(215, 38, 61, 0.28); outline-offset: 3px; border-radius: 4px; }

.modal__error {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--danger);
}
.modal__error:empty { display: none; }
.modal__error.is-error { padding: 10px 12px; border-radius: 10px; background: #fdeef0; }
.modal__error.is-success { color: var(--success); padding: 10px 12px; border-radius: 10px; background: #e9f9f1; }

/* ─────────────────────────── футер ─────────────────────────── */

.foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.foot p { margin: 0; }

/* ─────────────────────────── embed ─────────────────────────── */

body.is-embed { background: #fff; }
body.is-embed .app { padding: 8px; max-width: none; }
body.is-embed .card { box-shadow: none; border-radius: 18px; padding: 26px 22px 30px; }
body.is-embed .foot { display: none; }
body.is-embed .head__title { font-size: 25px; }

/* ─────────────────────────── адаптив ─────────────────────────── */

@media (max-width: 640px) {
  .app { padding: 20px 12px 40px; }
  .card { padding: 26px 20px 30px; border-radius: 20px; }
  .head__row { margin-bottom: 20px; }
  .head__title { font-size: 25px; letter-spacing: -0.5px; }
  .head__lead { font-size: 14px; }
  .head__site { display: none; }
  .field { margin-bottom: 22px; }
  .segmented__box { height: 48px; font-size: 14.5px; }
  .rating__star { width: 41px; height: 41px; }
  .rating__star svg { width: 31px; height: 31px; }
  .phone { flex-wrap: wrap; }
  .phone > .btn { width: 100%; }
  .phone__badge { position: static; transform: none; margin-top: 8px; }
  .field--email { padding: 15px 14px 18px; }
  .modal__head { padding: 20px 18px 15px; }
  .modal__body { padding: 16px 18px 22px; }
  .modal__title { font-size: 18px; }
  .channels { gap: 7px; }
  .channel { padding: 12px 4px 10px; }
  .channel__title { font-size: 12.5px; }
  .code__row { flex-wrap: wrap; }
  .code__row .btn { width: 100%; }
  .demo__code { font-size: 26px; letter-spacing: 7px; }
  .success__title { font-size: 22px; }
}

@media (max-width: 380px) {
  .rating__star { width: 38px; height: 38px; }
  .rating__star svg { width: 28px; height: 28px; }
  .rating__value { display: none; }
}

/* ─────────────────────────── тёмная тема ─────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f4f9;
    --ink-2: #cdd3de;
    --muted: #98a0af;
    --line: #2c333f;
    --line-strong: #3a4250;
    --bg: #0e1116;
    --surface: #171b22;
    --brand-soft: #33161d;
  }

  body {
    background:
      radial-gradient(1100px 620px at 12% -10%, rgba(215, 38, 61, 0.22), transparent 62%),
      radial-gradient(900px 560px at 92% 0%, rgba(244, 185, 66, 0.12), transparent 58%),
      var(--bg);
  }

  .card__glow { background: linear-gradient(180deg, rgba(215, 38, 61, 0.16), transparent); }
  .input { background: #12161d; color: var(--ink); }
  .input:focus { background: #151a22; }
  .input:disabled { background: #12161d; color: #6f7686; }
  .segmented { background: #12161d; }
  .segmented__item:hover .segmented__box { background: #1d232c; }
  .field--email { background: #14181f; }
  .email__hint { background: #33161d; color: #f0c9cf; }
  .checkbox__box { background: #12161d; }
  .modal__head { background: linear-gradient(180deg, #1c2029, #171b22); }
  .modal__close { background: #222833; }
  .instruction { background: #12161d; }
  .channel { background: #171b22; }
  .channel.is-active { background: #33161d; }
  .demo { background: #2a2415; border-color: #6b5620; }
  .demo__hint { color: #d8bb73; }
  .demo__code { color: #f2d492; }
  .success__id { background: #222833; }
  .btn--outline { background: #171b22; color: var(--ink-2); }
  .form__status.is-error { background: #33161d; }
  .modal__error.is-error { background: #33161d; }
  .modal__error.is-success { background: #12301f; }
  .phone__status { color: #4ade9b; }
  .input--phone.is-verified { background: #12301f; border-color: #1d5138; }
  .phone__badge { background: #12301f; color: #6ee7b7; }
  .footer, .foot { color: #7b8494; }
}

/* ─────────────────────────── анимации ─────────────────────────── */

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pop {
  0% { transform: scale(0.86); opacity: 0; }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes modalIn {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
