/*
  Публичная страница отзывов /Reviews (Views/Reviews/Index.cshtml).
  Визуальный язык главной (home-editorial.css): Manrope, крупные плотные заголовки,
  uppercase-кикеры, мягкие серые поверхности, радиусы 1.5rem, pill-кнопки.
  Тёмная тема — через класс .dark на уровне сайта.
*/

.rv-page {
  --rv-accent: #7657ff;
  --rv-accent-deep: #5638df;
  --rv-accent-soft: #ece8ff;
  --rv-on-accent: #f8f7ff;
  --rv-bg: #f3f4f8;
  --rv-surface: #ffffff;
  --rv-surface-soft: #e8eaf1;
  --rv-ink: #17162a;
  --rv-muted: #5c5b6e;
  --rv-line: rgb(23 22 42 / 12%);
  --rv-line-strong: rgb(23 22 42 / 22%);
  --rv-star: #f59e0b;
  --rv-radius-sm: 1rem;
  --rv-radius: 1.5rem;
  --rv-shadow: 0 24px 80px rgb(42 35 89 / 12%);
  --rv-ease: cubic-bezier(.23, 1, .32, 1);

  color: var(--rv-ink);
  background: var(--rv-bg);
  font-family: Manrope, "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

.dark .rv-page {
  --rv-accent: #9a85ff;
  --rv-accent-deep: #b9aaff;
  --rv-accent-soft: rgb(154 133 255 / 14%);
  --rv-on-accent: #120d2b;
  --rv-bg: #111019;
  --rv-surface: #1b1a26;
  --rv-surface-soft: #242231;
  --rv-ink: #f2f0f7;
  --rv-muted: #aaa7ba;
  --rv-line: rgb(242 240 247 / 14%);
  --rv-line-strong: rgb(242 240 247 / 24%);
  --rv-shadow: 0 28px 90px rgb(0 0 0 / 32%);
}

.rv-page *,
.rv-page *::before,
.rv-page *::after { box-sizing: border-box; }

.rv-page [hidden] { display: none !important; }

.rv-shell {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

/* ---------- Hero ---------- */

.rv-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }

.rv-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

.rv-kicker {
  margin: 0 0 .75rem;
  color: var(--rv-accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rv-page h1 {
  margin: 0;
  color: var(--rv-ink);
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.rv-lead {
  max-width: 38rem;
  margin: 1.1rem 0 0;
  color: var(--rv-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.rv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: .75rem;
  margin: 0;
}

.rv-stat {
  display: flex;
  flex-direction: column-reverse;
  gap: .2rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--rv-radius);
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
}

.rv-stat dt {
  color: var(--rv-muted);
  font-size: .8rem;
  line-height: 1.35;
}

.rv-stat dd {
  margin: 0;
  color: var(--rv-ink);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.rv-stat__star { margin-left: .2rem; color: var(--rv-star); font-size: .7em; vertical-align: .15em; }

/* ---------- Фильтры ---------- */

.rv-body { padding-bottom: clamp(3rem, 7vw, 5rem); }

.rv-filters {
  position: relative;
  display: grid;
  gap: .75rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 6rem;
}

.rv-chips,
.rv-subchips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.rv-chip,
.rv-subchip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--rv-line-strong);
  background: var(--rv-surface);
  color: var(--rv-ink);
  font: inherit;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--rv-ease), border-color .2s var(--rv-ease), color .2s var(--rv-ease), transform .16s var(--rv-ease);
}

.rv-chip:hover,
.rv-subchip:hover { border-color: var(--rv-accent); color: var(--rv-ink); }

.rv-chip:active,
.rv-subchip:active { transform: scale(.97); }

.rv-chip:focus-visible,
.rv-subchip:focus-visible,
.rv-btn:focus-visible,
.rv-card__toggle:focus-visible,
.rv-card__service:focus-visible,
.rv-card__shot:focus-visible {
  outline: 2px solid var(--rv-accent);
  outline-offset: 3px;
}

.rv-chip[aria-current="true"] {
  background: var(--rv-ink);
  border-color: var(--rv-ink);
  color: var(--rv-bg);
}

.rv-chip--preset:not([aria-current="true"]) {
  border-color: var(--rv-accent);
  background: var(--rv-accent-soft);
}

.rv-chip__count {
  min-width: 1.6rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: var(--rv-surface-soft);
  color: var(--rv-muted);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rv-chip[aria-current="true"] .rv-chip__count { background: rgb(255 255 255 / 18%); color: inherit; }
.dark .rv-page .rv-chip[aria-current="true"] .rv-chip__count { background: rgb(0 0 0 / 14%); }

.rv-subchips {
  padding: .6rem;
  border-radius: var(--rv-radius);
  background: var(--rv-surface-soft);
}

.rv-subchip { min-height: 2.4rem; font-size: .86rem; font-weight: 600; }

.rv-subchip[aria-pressed="true"] {
  background: var(--rv-accent);
  border-color: var(--rv-accent);
  color: var(--rv-on-accent);
}

.rv-subchip[aria-pressed="true"] .rv-chip__count { background: rgb(255 255 255 / 20%); color: inherit; }

.rv-result {
  margin: 0;
  color: var(--rv-muted);
  font-size: .9rem;
}

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

.rv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-card article {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  height: 100%;
  padding: 1.35rem;
  border-radius: var(--rv-radius);
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
  transition: box-shadow .25s var(--rv-ease), border-color .25s var(--rv-ease);
}

@media (hover: hover) {
  .rv-card article:hover { border-color: var(--rv-line-strong); box-shadow: var(--rv-shadow); }
}

.rv-card__head {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
}

.rv-card__avatar {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--rv-accent-soft);
  color: var(--rv-accent-deep);
  font-weight: 800;
}

.rv-card__who { min-width: 0; }

.rv-card__author {
  margin: 0;
  overflow: hidden;
  color: var(--rv-ink);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rv-card__who time { color: var(--rv-muted); font-size: .82rem; }

.rv-card__new {
  padding: .2rem .6rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .72rem;
  font-weight: 700;
}

.dark .rv-page .rv-card__new { background: rgb(34 197 94 / 16%); color: #86efac; }

.rv-stars { display: inline-flex; gap: 2px; }
.rv-stars svg { width: 1rem; height: 1rem; fill: var(--rv-line-strong); }
.rv-stars svg.is-on { fill: var(--rv-star); }

.rv-card__text {
  margin: 0;
  color: var(--rv-ink);
  font-size: .97rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.rv-card__text.is-clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  line-clamp: 7;
}

.rv-card__toggle {
  margin-top: .4rem;
  padding: .3rem 0;
  border: 0;
  background: none;
  color: var(--rv-accent);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}

.rv-card__toggle:hover { text-decoration: underline; text-underline-offset: 3px; }

.rv-card__shot {
  position: relative;
  display: block;
  max-height: 22rem;
  overflow: hidden;
  border-radius: var(--rv-radius-sm);
  border: 1px solid var(--rv-line);
  background: var(--rv-surface-soft);
}

.rv-card__shot img { display: block; width: 100%; height: auto; }

.rv-card__shot-label {
  position: absolute;
  inset: auto 0 0;
  padding: 2.5rem 1rem .8rem;
  background: linear-gradient(to top, rgb(18 17 29 / 82%), transparent);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}

.rv-card__foot {
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--rv-line);
}

/* Запрет автора на распространение (ч. 10 ст. 10.1 152-ФЗ): прижат к футеру карточки. */
.rv-card__notice {
  margin: auto 0 0;
  color: var(--rv-muted);
  font-size: .78rem;
  line-height: 1.4;
}

.rv-card__notice + .rv-card__foot { margin-top: 0; }

.rv-card__service {
  display: grid;
  gap: .1rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rv-card__category {
  color: var(--rv-accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rv-card__service-name {
  color: var(--rv-muted);
  font-size: .86rem;
  line-height: 1.4;
}

.rv-card__service:hover .rv-card__service-name { color: var(--rv-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Кнопки, пустое состояние, CTA ---------- */

.rv-more { display: flex; justify-content: center; margin-top: 1.75rem; }

.rv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--rv-ease), border-color .2s var(--rv-ease), color .2s var(--rv-ease), transform .16s var(--rv-ease);
}

.rv-btn:active { transform: scale(.97); }

.rv-btn--primary { background: var(--rv-accent); color: var(--rv-on-accent); }
.rv-btn--primary:hover { background: var(--rv-accent-deep); color: var(--rv-on-accent); }

.rv-btn--ghost { background: var(--rv-surface); border-color: var(--rv-line-strong); color: var(--rv-ink); }
.rv-btn--ghost:hover { border-color: var(--rv-accent); color: var(--rv-ink); }

.rv-empty {
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 3rem 1.5rem;
  border-radius: var(--rv-radius);
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
  text-align: center;
}

.rv-empty h2 { margin: 0; color: var(--rv-ink); font-size: 1.5rem; font-weight: 800; }
.rv-empty p { margin: 0 0 .6rem; color: var(--rv-muted); }

.rv-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--rv-radius);
  background: var(--rv-surface-soft);
}

.rv-cta h2 {
  margin: 0 0 .35rem;
  color: var(--rv-ink);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.rv-cta p { margin: 0; color: var(--rv-muted); }

/* ---------- Адаптив ---------- */

@media (max-width: 1023px) {
  .rv-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-stat { padding: .9rem 1rem; }

  /* Длинный ряд категорий — горизонтальная прокрутка вместо высокой стены чипов */
  .rv-chips {
    flex-wrap: nowrap;
    margin-inline: -1rem;
    padding: 0 1rem .25rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .rv-chips::-webkit-scrollbar { display: none; }
  .rv-chip { flex: 0 0 auto; white-space: nowrap; }

  .rv-cta { flex-direction: column; align-items: stretch; }
  .rv-cta .rv-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-page * { transition: none !important; }
}

/* =========================================================
   Форма отзыва /SendReview (Views/SendReview/Index.cshtml)
   ========================================================= */

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

.rv-hero--compact { padding-bottom: clamp(1.25rem, 3vw, 2rem); }
.rv-hero--compact .rv-lead { max-width: 44rem; }

.rf-layout {
  max-width: 50rem;
}

.rf-card {
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  border-radius: var(--rv-radius);
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
}

.rf-card .rv-empty { border: 0; padding: 1.5rem 0; }

.rf-form { display: grid; gap: 1.25rem; }

/* Фокус на ошибочном поле не должен прятаться под фиксированной шапкой сайта */
.rf-form input,
.rf-form select,
.rf-form textarea { scroll-margin-top: 7rem; }

/* align-content: start — иначе в ряду «Имя / Email» колонка без подсказки растягивается и поле уезжает вниз */
.rf-field { display: grid; gap: .45rem; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }

.rf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }

.rf-label {
  padding: 0;
  color: var(--rv-ink);
  font-size: .95rem;
  font-weight: 750;
}

.rf-optional {
  margin-left: .35rem;
  color: var(--rv-muted);
  font-size: .8rem;
  font-weight: 500;
}

.rf-fl { position: relative; }

/* Поля как в форме на главной/Contacts: иконка слева, подпись уезжает вверх при фокусе или вводе */
.rf-input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 1.25rem 1rem .45rem 42px;
  border: 1px solid var(--rv-line);
  border-radius: .5rem;
  background-color: var(--rv-surface);
  background-position: 12px 50%;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  color: var(--rv-ink);
  font: inherit;
  font-size: 1rem; /* 16px — iOS не зумит поле при фокусе */
  font-weight: 500;
  line-height: 1.4;
  box-shadow: none;
  transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}

textarea.rf-input {
  min-height: 7.5rem;
  padding-top: 1.6rem;
  background-position: 12px 1rem;
  resize: vertical;
}

.rf-input:hover { border-color: var(--rv-line-strong); }

.rf-input:focus {
  border-color: var(--rv-accent);
  outline: none;
  background-color: var(--rv-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rv-accent) 15%, transparent), 0 6px 18px rgb(17 24 39 / 8%);
}

.rf-input[data-icon="user"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }
.rf-input[data-icon="mail"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E"); }
.rf-input[data-icon="msg"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H7l-4 4V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E"); }
.rf-input[data-icon="tag"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4 13.4 20.6a2 2 0 0 1-2.8 0L3 13V3h10l7.6 7.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E"); }

.rf-fl__label {
  position: absolute;
  top: 50%;
  left: 42px;
  padding: 0 .25rem;
  color: #6b7280;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  pointer-events: none;
  transform: translateY(-50%);
  transition: top .18s ease, font-size .18s ease, color .18s ease, transform .18s ease;
}

textarea.rf-input + .rf-fl__label { top: 1.6rem; }

.dark .rv-page .rf-fl__label { color: #9ca3af; }

.rf-fl:focus-within .rf-fl__label,
.rf-input:not(:placeholder-shown) + .rf-fl__label,
.rf-fl--select .rf-fl__label {
  top: 5px;
  left: 40px;
  color: var(--rv-accent);
  font-size: .72rem;
  transform: none;
}

.rf-fl--select .rf-fl__label { color: var(--rv-muted); }
.rf-fl--select:focus-within .rf-fl__label { color: var(--rv-accent); }

.rf-fl--select .rf-input {
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.rf-fl--select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: .5rem;
  height: .5rem;
  border-right: 2px solid var(--rv-muted);
  border-bottom: 2px solid var(--rv-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.rf-fl--select select:invalid { color: var(--rv-muted); }
.rf-fl--select option,
.rf-fl--select optgroup { color: var(--rv-ink); background: var(--rv-surface); }

.rf-req { margin-left: .1rem; color: #ef4444; }

.rf-field.is-invalid .rf-input { border-color: #dc2626; }

.rf-error {
  margin: 0;
  color: #dc2626;
  font-size: .86rem;
  font-weight: 600;
}

.dark .rv-page .rf-error,
.dark .rv-page .rf-req { color: #f87171; }

.rf-hint,
.rf-meta {
  margin: 0;
  color: var(--rv-muted);
  font-size: .82rem;
}

.rf-meta { display: flex; justify-content: space-between; gap: 1rem; }

.rf-hint--info { display: flex; align-items: flex-start; gap: .4rem; }

.rf-hint--info svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: .1rem;
  color: var(--rv-accent);
}
.rf-counter { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rf-counter.is-near { color: #b45309; font-weight: 700; }

/* Звёзды: радиокнопки идут 5→1, ряд развёрнут, поэтому ~ подсвечивает звёзды левее */
.rf-rating { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1rem; }
.rf-rating { margin-top: -.35rem; }

.rf-stars { display: inline-flex; flex-direction: row-reverse; gap: .25rem; }
.rf-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.rf-stars label {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .8rem;
  cursor: pointer;
  transition: transform .16s var(--rv-ease), background-color .2s var(--rv-ease);
}

.rf-stars svg { width: 1.9rem; height: 1.9rem; fill: var(--rv-line-strong); transition: fill .15s var(--rv-ease); }

.rf-stars label:hover svg,
.rf-stars label:hover ~ label svg,
.rf-stars input:checked ~ label svg { fill: var(--rv-star); }

.rf-stars:hover input:checked ~ label:not(:hover):not(:hover ~ label) svg { fill: var(--rv-line-strong); }

.rf-stars label:active { transform: scale(.9); }
.rf-stars input:focus-visible + label { outline: 2px solid var(--rv-accent); outline-offset: 2px; }

/* Выбранная звезда «подпрыгивает», из неё разлетаются золотые искры (JS: burst в SendReview/Index) */
.rf-stars label { position: relative; }
.rf-stars label.is-pop svg { animation: rf-star-pop .45s var(--rv-ease); }

.rf-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size, .6rem);
  height: var(--size, .6rem);
  margin: calc(var(--size, .6rem) / -2) 0 0 calc(var(--size, .6rem) / -2);
  pointer-events: none;
  animation: rf-burst .7s var(--delay, 0ms) cubic-bezier(.16, 1, .3, 1) both;
}

.rf-stars .rf-spark svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--rv-star);
  filter: drop-shadow(0 0 3px rgb(245 158 11 / 55%));
}

@keyframes rf-star-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35) rotate(-8deg); }
  100% { transform: scale(1); }
}

@keyframes rf-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); }
}

.rf-rating__caption {
  display: inline-block;
  min-width: 1.6rem;
  font-size: 1.6rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.rf-rating__caption.is-pop { animation: rf-emoji-pop .45s var(--rv-ease); }

@keyframes rf-emoji-pop {
  0% { opacity: 0; transform: scale(.4) rotate(-15deg); }
  60% { opacity: 1; transform: scale(1.2) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

.rf-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  color: var(--rv-ink);
  font-size: .9rem;
  line-height: 1.45;
  cursor: pointer;
}

/* Настоящий чекбокс остаётся для клавиатуры и валидации, рисуем фирменный (как в форме на главной) */
.rf-check__input {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rf-box {
  display: grid;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--rv-ink) 22%, transparent);
  border-radius: .45rem;
  background: var(--rv-surface);
  color: var(--rv-on-accent);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .22s ease, transform .16s var(--rv-ease);
}

.rf-box svg {
  width: .95rem;
  height: .95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset .26s var(--rv-ease);
}

.rf-check__input:checked + .rf-box {
  border-color: transparent;
  background: linear-gradient(120deg, var(--rv-accent), var(--rv-accent-deep));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--rv-accent) 40%, transparent);
}

.rf-check__input:checked + .rf-box svg { stroke-dashoffset: 0; transition-delay: 60ms; }
.rf-check__input:focus-visible + .rf-box { outline: 3px solid color-mix(in srgb, var(--rv-accent) 65%, white); outline-offset: 2px; }
.rf-check:active .rf-box { transform: scale(.9); }
.rf-field.is-invalid .rf-box { border-color: #dc2626; }

@media (hover: hover) and (pointer: fine) {
  .rf-check:hover .rf-check__input:not(:checked) + .rf-box {
    border-color: var(--rv-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--rv-accent) 14%, transparent);
  }
}

.rf-check strong { display: block; font-weight: 700; }
.rf-check small { display: block; margin-top: .1rem; color: var(--rv-muted); font-size: .82rem; }
.rf-check a { color: var(--rv-accent); text-decoration: underline; text-underline-offset: 3px; }

.rf-alert {
  margin: 0;
  padding: .85rem 1rem;
  border-radius: var(--rv-radius-sm);
  background: #fef2f2;
  color: #991b1b;
  font-size: .92rem;
  font-weight: 600;
}

.dark .rv-page .rf-alert { background: rgb(220 38 38 / 14%); color: #fca5a5; }

.rf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: .55rem;
  min-height: 3.1rem;
  padding: .5rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--rv-accent), var(--rv-accent-deep));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--rv-accent) 40%, transparent);
  color: var(--rv-on-accent);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s var(--rv-ease), box-shadow .2s ease, opacity .2s ease;
}

.rf-submit svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--rv-ease);
}

@media (hover: hover) and (pointer: fine) {
  .rf-submit:hover svg { transform: translateX(3px); }
}

.rf-submit:active { transform: scale(.97); }
.rf-submit:disabled { opacity: .7; cursor: progress; }
.rf-submit.is-loading svg { animation: rf-fly .9s ease-in-out infinite; }
.rf-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--rv-accent) 65%, white); outline-offset: 3px; }

@keyframes rf-fly { 50% { transform: translateX(5px); opacity: .5; } }

.rf-success {
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 2rem 0;
  text-align: center;
  outline: none;
}

.rf-success svg { width: 4rem; height: 4rem; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rf-success circle { stroke: var(--rv-accent-soft); fill: var(--rv-accent-soft); }
.rf-success path { stroke: var(--rv-accent); stroke-dasharray: 40; stroke-dashoffset: 40; animation: rf-check .5s .15s var(--rv-ease) forwards; }

@keyframes rf-check { to { stroke-dashoffset: 0; } }

.rf-success h2 { margin: .4rem 0 0; color: var(--rv-ink); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.rf-success p { margin: 0; color: var(--rv-muted); }
.rf-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .8rem; }


@media (max-width: 639px) {
  .rf-row { grid-template-columns: 1fr; }
  .rf-submit { justify-self: stretch; width: 100%; }
  .rf-meta { flex-direction: column; gap: .2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rf-success path { animation: none; stroke-dashoffset: 0; }
  .rf-submit.is-loading svg { animation: none; }
  .rf-stars label.is-pop svg { animation: none; }
  .rf-rating__caption.is-pop { animation: none; }
}
