/* Цвета заведения меняются здесь. */
:root {
  --bg: #FBF8F4;
  --surface: #FFFFFF;
  --text: #2A2420;
  --muted: #6B6159;
  --line: #DDD4CA;
  --accent: #A8481F;
  --accent-text: #FFFFFF;
  --accent-soft: #F6E9E1;
  --error: #B3261E;
  --star-off: #CFC6BB;
  --star-on: #C77700;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1815;
    --surface: #27221E;
    --text: #F3EDE6;
    --muted: #B5AAA0;
    --line: #453D36;
    --accent: #E08A5F;
    --accent-text: #1C1815;
    --accent-soft: #3A2A21;
    --error: #F2978F;
    --star-off: #5A5048;
    --star-on: #F0B24A;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100vh;
  padding: 16px 16px 40px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[hidden] { display: none !important; }

a { color: var(--accent); }

/* Переключатель языка */
.lang {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.lang__item {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lang__item[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--text);
}

/* Логотип и название */
.brand {
  margin: 4px 0 20px;
  text-align: center;
}
.brand__logo {
  display: block;
  margin: 0 auto 8px;
  border-radius: 50%;
}
.brand__name {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Экраны */
.view { animation: appear 0.32s ease-out; }

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  text-align: center;
  outline: none;
}
.lead {
  margin: 0 0 20px;
  color: var(--muted);
  text-align: center;
}

/* Две равноценные кнопки: у них один класс и одна высота */
.choices {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 14px 16px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.choice:hover,
.choice:active { background: var(--accent-soft); }
.choice__icon {
  flex: none;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.choice__text { display: block; min-width: 0; }
.choice__label {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.choice__hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

/* Ссылка «назад» */
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 4px;
  font-weight: 500;
  text-decoration: none;
}
.back--below { margin: 16px 0 0; }

.table-chip {
  width: fit-content;
  margin: 0 auto 16px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 14px;
}

/* Форма */
.field {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}
.field label,
.field legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-weight: 600;
}
textarea,
input[type="text"] {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit; /* 16px: иначе iOS увеличивает страницу при вводе */
}
textarea {
  min-height: 120px;
  resize: vertical;
}
textarea:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
[aria-invalid="true"] { border-color: var(--error); }

.field__hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.field__error,
.form-error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
}
.form-error { margin-top: 16px; }

/* Оценка */
.rating__stars { display: flex; gap: 2px; }
.rating--main {
  margin: 0 0 20px;
  text-align: center;
}
.rating--main legend { width: 100%; }
.rating--main .rating__stars { justify-content: center; }
.field .star {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
.star input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.star__shape {
  display: block;
  width: 44px;
  height: 44px;
  color: var(--star-off);
  font-size: 34px;
  line-height: 44px;
  text-align: center;
  transition: color 0.12s ease;
}
.star.is-on .star__shape { color: var(--star-on); }
.star input:focus-visible + .star__shape {
  border-radius: 8px;
  outline: 2px solid var(--accent);
}

/* Ловушка для ботов: убрана за край экрана */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.submit:disabled { opacity: 0.65; cursor: progress; }

.note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Текст о персональных данных */
.privacy { overflow-wrap: anywhere; }
.privacy h2 {
  margin: 20px 0 4px;
  font-size: 16px;
}
.privacy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
