/* Дизайн сайта записи — перенесён из макета, тема «Крем» */

:root {
  --bg: #F2EADF;
  --surface: #FBF8F2;
  --ink: #1D1D1B;
  --muted: rgba(29, 29, 27, 0.52);
  --line: rgba(29, 29, 27, 0.13);
  --accent: #13351D;
  --accent-ink: #F2EADF;
  --accent-soft: rgba(19, 53, 29, 0.08);
  --busy: rgba(29, 29, 27, 0.05);
  --busy-ink: rgba(29, 29, 27, 0.28);
  --shadow: 0 18px 40px -22px rgba(29, 29, 27, 0.35);
  --r: 14px;
  --font-head: 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body { font-family: 'Golos Text', sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:disabled { cursor: default; }

.root {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

/* ── Шапка ── */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); align-self: center;
}
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: 0.01em; }
.brand-sep { color: var(--muted); }
.brand-sub { color: var(--muted); font-size: 14px; letter-spacing: 0.04em; }
.top-link {
  color: var(--ink); text-decoration: none; font-size: 14px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px;
  transition: border-color 0.2s, background 0.2s;
}
.top-link:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ── Hero ── */
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 64px; }
.hero { padding: clamp(32px, 6vw, 64px) 0 28px; }
.h1 {
  font-family: var(--font-head);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 600; line-height: 1.05; letter-spacing: 0.005em;
}
.lead {
  margin-top: 12px; max-width: 52ch; color: var(--muted);
  font-size: clamp(15px, 1.8vw, 17px); line-height: 1.55; text-wrap: pretty;
}
.tz-note {
  margin-top: 14px; font-size: 15px;
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: calc(var(--r) * 0.75); padding: 10px 14px;
  display: inline-block;
}
.tz-note strong { color: var(--accent); }

/* ── Сегмент режимов ── */
.seg {
  margin-top: 26px;
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .seg { grid-template-columns: repeat(3, 1fr); } }
.seg-opt {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.seg-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.seg-opt.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.seg-title { font-weight: 600; font-size: 15px; }
.seg-hint { font-size: 13px; opacity: 0.62; }

/* ── Лэйаут ── */
.layout { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 36px; } }

/* ── Тип урока ── */
.type-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.type-pill {
  border: 1px solid var(--line); border-radius: 99px;
  padding: 10px 18px; background: var(--surface);
  display: flex; align-items: baseline; gap: 8px;
  font-weight: 600; font-size: 14px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.type-pill em { font-style: normal; font-weight: 400; font-size: 12.5px; opacity: 0.62; }
.type-pill:hover { border-color: var(--accent); }
.type-pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ── Расписание ── */
.sched {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 4px);
  padding: clamp(14px, 2.5vw, 24px);
}
.sched-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.sched-week-label { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.week-nav { display: flex; gap: 6px; align-items: center; }
.week-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}
.week-btn:not(:disabled):hover { border-color: var(--accent); background: var(--accent-soft); }
.week-btn:disabled { opacity: 0.3; }
.week-pill {
  padding: 7px 14px; border-radius: 99px; font-size: 13px;
  border: 1px solid transparent; color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.week-pill:hover { color: var(--ink); }
.week-pill.on { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }

.grid-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.grid { display: grid; gap: 8px; min-width: 560px; }
.day-col { display: flex; flex-direction: column; gap: 8px; }
.day-head {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  padding: 6px 0 8px; border-bottom: 1px solid var(--line);
}
.day-name { font-weight: 600; font-size: 13.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.day-date { color: var(--muted); font-size: 13px; }
.day-slots { display: flex; flex-direction: column; gap: 6px; }

.slot {
  height: 40px; border-radius: calc(var(--r) * 0.65);
  display: grid; place-items: center;
  font-size: 13.5px; font-variant-numeric: tabular-nums;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.slot.busy {
  background: var(--busy); color: var(--busy-ink);
  text-decoration: line-through; text-decoration-color: currentColor; text-decoration-thickness: 1px;
}
.slot.free {
  border: 1px solid var(--line); background: transparent; font-weight: 500;
}
.slot.free:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.slot.free.sel {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow); font-weight: 600;
}

.legend { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.leg { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dot-free { border: 1px solid var(--ink); opacity: 0.55; }
.dot-busy { background: var(--busy); border: 1px solid var(--line); }
.dot-sel { background: var(--accent); }

.sunday-note {
  margin-top: 14px; font-size: 13.5px; color: var(--muted); line-height: 1.5;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.sunday-note a { color: var(--accent); }

/* ── Форма ── */
.form-card, .success {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 4px);
  padding: clamp(18px, 3vw, 28px);
  position: sticky; top: 20px;
}
.form-title { font-family: var(--font-head); font-size: 26px; font-weight: 600; margin-bottom: 14px; }
.picked {
  border: 1px dashed var(--line); border-radius: calc(var(--r) * 0.75);
  padding: 11px 14px; font-size: 14px; margin-bottom: 16px;
  background: var(--accent-soft); font-weight: 500;
}
.picked-empty { color: var(--muted); font-weight: 400; }

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block; font-size: 12.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: calc(var(--r) * 0.75);
  background: transparent; color: var(--ink);
  font: inherit; font-size: 15px;
  transition: border-color 0.2s;
  appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
select.input option { color: #1D1D1B; background: #F2EADF; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); }

.mini-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  border: 1px solid var(--line); border-radius: calc(var(--r) * 0.75); padding: 4px;
}
.mini-opt {
  padding: 8px 10px; border-radius: calc(var(--r) * 0.55); font-size: 14px;
  color: var(--muted); transition: background 0.18s, color 0.18s;
}
.mini-opt.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ── Поиск себя (перенос) ── */
.find-row { display: flex; gap: 8px; }
.find-row .input { flex: 1; }
.btn.small {
  width: auto; padding: 11px 18px; margin: 0;
  border-radius: calc(var(--r) * 0.75);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px;
}
.find-error { color: #a33b1f; font-size: 13.5px; margin: -6px 0 12px; line-height: 1.45; }
.lesson-list { display: flex; flex-direction: column; gap: 6px; }
.lesson-opt {
  text-align: left; border: 1px solid var(--line);
  border-radius: calc(var(--r) * 0.65); padding: 10px 14px;
  font-size: 14px; background: transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.lesson-opt:hover { border-color: var(--accent); }
.lesson-opt.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.btn {
  width: 100%; padding: 14px 18px; border-radius: 99px;
  font-weight: 600; font-size: 15px; margin-top: 6px;
  transition: opacity 0.2s, transform 0.15s, background 0.2s;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:not(:disabled):hover { transform: translateY(-1px); }
.btn.primary:disabled { opacity: 0.35; }
.btn.ghost { border: 1px solid var(--line); margin-top: 18px; }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.fine { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.form-error { color: #a33b1f; font-size: 13.5px; margin-top: 10px; line-height: 1.45; }

/* Поле-ловушка для спам-ботов: визуально скрыто */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Успех ── */
.success-mark {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; margin-bottom: 16px;
}
.success-title { font-family: var(--font-head); font-size: 28px; font-weight: 600; }
.success-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; line-height: 1.5; }
.success-summary {
  margin-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.sum-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.sum-k { color: var(--muted); flex-shrink: 0; }
.sum-v { text-align: right; font-weight: 500; }

/* ── Подвал ── */
.foot {
  border-top: 1px solid var(--line);
  padding: 20px clamp(18px, 4vw, 48px);
  color: var(--muted); font-size: 13px; text-align: center;
}
.foot strong { color: var(--ink); }
