:root {
  --sage: #a9b386;
  --sage-light: #d9dfc6;
  --sage-pale: #eef1e4;
  --olive: #6b7a45;
  --olive-dark: #4a5433;
  --ink: #2f3522;
  --text: #4b5140;
  --muted: #7c8270;
  --cream: #fbfaf5;
  --white: #ffffff;
  --line: #e3e6d6;
  --danger: #b5523b;

  --radius-sm: 12px;
  --radius: 20px;
  --shadow: 0 10px 30px -12px rgba(74, 84, 51, .25);

  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 560px;
  padding: 20px 16px 32px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--olive); }
button { font: inherit; cursor: pointer; }
h1, h2 { color: var(--ink); margin: 0; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* ===== Шапка ===== */
.top { display: flex; align-items: center; gap: 14px; }
.top__logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.top h1 { font-family: var(--font-head); font-size: 26px; font-weight: 600; }
.top p { color: var(--muted); font-size: 14px; }

.info { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.info li { display: flex; align-items: center; gap: 8px; }
.info .icon { color: var(--olive); width: 18px; height: 18px; }

/* ===== Карточка ===== */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; }

.step { display: grid; gap: 12px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.step__num { width: 28px; height: 28px; border-radius: 50%; background: var(--sage-pale); color: var(--olive-dark); display: grid; place-items: center; font-size: 14px; }

/* ===== Поля ===== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-weight: 700; font-size: 14px; color: var(--ink); }
.field input[type="text"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7a45' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 4px rgba(169, 179, 134, .3); }
.field input::placeholder, .field textarea::placeholder { color: #a9ad9c; }
.field__error { display: none; font-size: 13px; color: var(--danger); font-weight: 600; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); }

/* Питомец */
.pets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pet, .chip, .check { position: relative; }
.pet input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.pet span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; transition: all .2s; }
.pet span .icon { width: 26px; height: 26px; color: var(--olive); }
.pet input:checked + span { background: var(--olive); border-color: var(--olive); color: var(--white); }
.pet input:checked + span .icon { color: var(--white); }
.pet input:focus-visible + span, .chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(169, 179, 134, .4); }
.pet-other { margin-top: 4px; }
.field.is-invalid .pet span, .field.is-invalid .chip span { border-color: var(--danger); }

/* Дни и время */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.chip { flex-shrink: 0; scroll-snap-align: start; }
.chip span { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--ink); font-weight: 700; cursor: pointer; transition: all .15s; user-select: none; }
.chip:hover span { border-color: var(--sage); }
.chip input:checked + span { background: var(--olive); border-color: var(--olive); color: var(--white); }
.chip input:checked + span small { color: var(--sage-light); }
.days .chip span { width: 70px; padding: 8px 4px; line-height: 1.2; }
.days .chip small { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.days .chip b { font-size: 20px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.times .chip span { padding: 10px 4px; font-size: 15px; }
.times__empty { font-size: 14px; color: var(--muted); }

/* Согласие */
.check { flex-direction: row; align-items: flex-start; gap: 12px; font-size: 14px; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check__box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--sage); background: var(--white); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; color: transparent; transition: all .2s; }
.check__box .icon { width: 14px; height: 14px; }
.check input:checked + .check__box { background: var(--olive); border-color: var(--olive); color: var(--white); }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px rgba(169, 179, 134, .4); }
.check.is-invalid .check__box { border-color: var(--danger); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none;
  transition: transform .2s, background .2s, border-color .2s;
}
.btn--primary { background: var(--olive); color: var(--white); box-shadow: 0 8px 20px -8px rgba(107, 122, 69, .7); }
.btn--primary:hover { background: var(--olive-dark); }
.btn--outline { background: var(--white); color: var(--olive-dark); border-color: var(--sage); }
.btn--outline:hover { border-color: var(--olive); background: var(--sage-pale); }
.btn--lg { padding: 16px 30px; font-size: 17px; }
.submit { width: 100%; }
.submit[disabled] { opacity: .7; pointer-events: none; }
.note { margin-top: 12px; text-align: center; font-size: 14px; color: var(--muted); }
.fail { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: #f7e6e0; color: var(--danger); font-weight: 600; font-size: 14px; }

/* ===== Успех ===== */
.success { text-align: center; padding: 16px 4px; }
.success__icon { width: 80px; height: 80px; border-radius: 50%; background: var(--olive); color: var(--white); display: grid; place-items: center; margin: 0 auto 20px; animation: pop .4s; }
.success__icon .icon { width: 40px; height: 40px; }
.success h2 { font-family: var(--font-head); font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.success p { margin: 0 auto 10px; }
.success__when { font-size: 18px; font-weight: 800; color: var(--olive-dark); }
.success__small { font-size: 14px; color: var(--muted); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.foot { margin-top: 20px; text-align: center; }
.foot .btn { width: 100%; }
