:root {
  --pink: #ff2e93;
  --pink-soft: #ffd3e8;
  --violet: #a24ad8;
  --blue: #5b84d9;
  --grad: linear-gradient(100deg, #ec1fd6 0%, #a24ad8 50%, #5287d9 100%);
  --bg: #f4f1f7;
  --card: #ffffff;
  --text: #2b2233;
  --muted: #8a8094;
  --line: #ece6f2;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(162, 74, 216, .12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45;
}
.wrap { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
a { color: var(--violet); }
h1, h2, h3 { font-family: 'Comfortaa', 'Nunito', sans-serif; margin: 0; }

/* ---------- Главная ---------- */
.hero {
  background: radial-gradient(120% 90% at 50% 0%, #fff 55%, #ffe6f2 100%);
  padding: 22px 20px 26px; text-align: center; border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow);
}
.hero img.logo { mix-blend-mode: multiply; width: 72%; max-width: 300px; height: auto; display: block; margin: 0 auto 6px; }
.hero h1 { font-size: 21px; color: var(--pink); letter-spacing: .3px; }
.hero .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.about { display: grid; grid-template-columns: 42% 1fr; gap: 14px; padding: 20px 16px 4px; align-items: start; }
.about .photo {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 18px; display: block;
  box-shadow: 0 8px 22px rgba(255, 46, 147, .22); border: 3px solid #fff; background: var(--pink-soft);
}
.about .teacher { font-weight: 800; font-size: 17px; margin-bottom: 8px; }
.about .teacher small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.info-row { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 10px; }
.info-row .ico { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--pink-soft); color: var(--pink); display: grid; place-items: center; font-size: 13px; }
.info-row a { color: var(--text); text-decoration: none; font-weight: 700; }
.desc { font-size: 14px; color: #4d4357; white-space: pre-line; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 16px; padding: 16px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }
.map { width: 100%; height: 240px; border: 0; border-radius: 12px; display: block; background: var(--line); }
.map-links { display: flex; gap: 14px; margin-top: 10px; font-size: 14px; }
.contact-btns { display: flex; gap: 10px; }
.contact-btns a { flex: 1; text-align: center; padding: 12px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 15px; }
.btn-wa { background: #25d366; color: #fff !important; }
.btn-call { background: var(--pink-soft); color: var(--pink) !important; }

.sticky-cta { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(244,241,247,0)); }
.spacer { height: 8px; }

/* ---------- Кнопки ---------- */
.btn {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 15px 18px; font: inherit; font-size: 17px; font-weight: 700;
  color: #fff; background: var(--grad); text-align: center; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 20px rgba(162, 74, 216, .3); transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: default; }

/* ---------- Страница записи ---------- */
.topbar {
  background: var(--grad); color: #fff; height: 60px; display: flex; align-items: center; justify-content: center;
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 700; }
.topbar .back { position: absolute; left: 6px; top: 6px; width: 48px; height: 48px; border: 0; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.topbar .back svg { width: 24px; height: 24px; }
.page { padding: 18px 16px 30px; }
.step { display: none; animation: fade .25s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mini-logo { display: block; width: 150px; margin: 0 auto 16px; }

.tabs { display: grid; gap: 14px; }
.tab {
  display: flex; align-items: center; gap: 14px; background: var(--card); border: 0; border-radius: 16px; padding: 18px 16px; width: 100%;
  font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); color: var(--text);
}
.tab .t-ico { flex: 0 0 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--grad); }
.tab b { display: block; font-size: 17px; }
.tab span { color: var(--muted); font-size: 13px; }
.tab .arrow { margin-left: auto; color: var(--violet); font-size: 22px; }

.section-title { font-weight: 800; font-size: 15px; margin: 4px 0 10px; color: var(--text); }
.month-name { color: var(--muted); font-size: 13px; text-transform: capitalize; margin: 0 0 8px; }
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date {
  flex: 0 0 62px; scroll-snap-align: start; border: 0; background: var(--card); border-radius: 14px; padding: 10px 0; font: inherit; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.05); color: var(--text); text-align: center;
}
.date small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.date b { display: block; font-size: 20px; }
.date i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.date.sel { background: var(--grad); color: #fff; }
.date.sel small, .date.sel i { color: rgba(255,255,255,.85); }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.time {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 11px 0; font: inherit; font-weight: 700; cursor: pointer; color: var(--text);
}
.time.sel { border-color: transparent; background: var(--grad); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; background: var(--card); border-radius: var(--radius); }
.empty a { font-weight: 700; }

.certs { display: grid; gap: 10px; margin-bottom: 16px; }
.cert {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 2px solid transparent; background: var(--card); border-radius: 14px;
  padding: 16px; font: inherit; cursor: pointer; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,.05); color: var(--text);
}
.cert b { font-size: 16px; }
.cert .price { color: var(--pink); font-weight: 800; white-space: nowrap; }
.cert.sel { border-color: var(--violet); background: #faf4ff; }

.summary { background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; border-left: 4px solid var(--pink); }
.summary b { display: block; font-size: 15px; }

.field { margin-bottom: 14px; }
.input, textarea.input {
  width: 100%; border: 1px solid #fff; background: #fff; border-radius: 6px; padding: 16px 18px; font: inherit; font-size: 16px; color: var(--text); outline: none;
}
.input::placeholder { color: #9b97a0; }
.input:focus { border-color: var(--violet); }
.input.req { border-color: #d64545; }
.input.req:focus { border-color: var(--violet); }
textarea.input { min-height: 140px; resize: vertical; }
.phone-wrap { display: flex; align-items: center; background: #fff; border: 1px solid #fff; border-radius: 6px; }
.phone-wrap.req { border-color: #d64545; }
.phone-wrap:focus-within { border-color: var(--violet); }
.phone-wrap .cc { padding: 0 6px 0 18px; display: flex; align-items: center; gap: 6px; font-size: 15px; color: #444; white-space: nowrap; }
.phone-wrap .input { border: 0; padding-left: 10px; }
.promo-wrap { display: flex; align-items: center; background: #fff; border-radius: 6px; border: 1px solid #fff; }
.promo-wrap .input { border: 0; }
.promo-wrap button { border: 0; background: none; color: #4a9be8; font: inherit; font-size: 17px; padding: 0 18px; cursor: pointer; white-space: nowrap; }
.hint { font-size: 13px; margin-top: 6px; padding-left: 4px; }
.hint.ok { color: #1a9b55; } .hint.bad { color: #d64545; }
.err { color: #d64545; font-size: 14px; margin: -4px 0 12px; display: none; }
.err.show { display: block; }
.consent { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }

.success { text-align: center; padding-top: 10px; }
.success .big { width: 86px; height: 86px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 44px; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: var(--shadow); }
.success h2 { font-size: 20px; margin-bottom: 8px; }
.success p { color: #5b5166; margin: 0 0 18px; }
.success .btn-wa { display: block; padding: 15px; border-radius: 12px; text-decoration: none; font-weight: 700; margin-bottom: 10px; }
.link-btn { display: block; text-align: center; padding: 12px; color: var(--violet); font-weight: 700; text-decoration: none; }

.loader { text-align: center; padding: 30px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2b2233; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: 90%; display: none; }
.toast.show { display: block; }

@media (min-width: 521px) {
  body { background: #e9e3f0; }
  .wrap { box-shadow: 0 0 40px rgba(0,0,0,.08); }
}
