:root {
  --bg: #f9f9f7;
  --text: #1a1a1a;
  --muted: #707070;
  --faint: #b5b5ad;
  --line: #d8d8d2;
  --line-strong: #b9b9b0;
  --surface: #ffffff;
  --tint: #efefeb;
  --accent: #229ed9;
  --accent-hover: #1b8cc2;
  --accent-soft: #eaf5fb;
  --danger: #a32626;
  --ok: #2b7a4b;
  --font-display: "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease), opacity 140ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}

button:hover,
.button:hover {
  background: #000;
}

button.secondary,
.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

button.secondary:hover,
.button.secondary:hover {
  border-color: var(--text);
  background: transparent;
}

/* Синий акцент как у главной кнопки club.stefanov.tech. */
button.accent,
.button.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.accent:hover,
.button.accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button.telegram,
.button.telegram {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.telegram:hover,
.button.telegram:hover {
  background: #1b8cc2;
  border-color: #1b8cc2;
}

button.danger,
.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button.link:hover {
  background: transparent;
  color: var(--text);
}

button.small,
.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.button.large,
button.large {
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

button:disabled,
button[aria-busy="true"] {
  cursor: default;
  opacity: 0.55;
}

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

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 11px 13px;
  transition: border-color 140ms var(--ease);
}

input:hover,
textarea:hover,
select:hover {
  border-color: #8f8f87;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 0;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--text);
}

input[type="time"],
input[type="date"],
input[type="number"] {
  font-variant-numeric: tabular-nums;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

textarea {
  min-height: 112px;
  line-height: 1.5;
  resize: vertical;
}

label,
.field {
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.field > label {
  display: block;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field-error {
  color: var(--danger);
  font-size: 13px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
}

h3 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
}

p {
  margin: 0;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.noscript {
  padding: 40px 28px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- верхняя полоса ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}

.topbar-links a {
  text-decoration-color: var(--line-strong);
}

.topbar-links a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

body.embed .topbar {
  display: none;
}

/* ---------- страница записи ---------- */

.booking {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  column-gap: clamp(40px, 6vw, 88px);
  width: min(1140px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.aside {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.identity h1 {
  min-width: 0;
}

.with-photo h1 {
  font-size: clamp(34px, 3.2vw, 44px);
}

/* Фото — круг фишая: квадратный кроп по кругу объектива и круглая маска. */
.avatar {
  flex: none;
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}

.lead {
  margin-top: 22px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-line;
}

.facts {
  display: grid;
  margin: 32px 0 0;
  border-top: 1px solid var(--line);
}

.fact {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.fact dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.fact select {
  min-height: 40px;
  margin-top: 4px;
  padding: 8px 36px 8px 11px;
  font-size: 15px;
}

.types {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.type-option {
  justify-content: space-between;
  min-height: 42px;
  padding: 0 13px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.type-option:hover {
  background: var(--surface);
  border-color: var(--text);
}

.type-option[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  font-weight: 600;
}

.type-option span:last-child {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.host-clock {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

/* ---------- правая панель ---------- */

.panel {
  min-width: 0;
}

.step {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.step h2 {
  font-size: 24px;
}

.step .step-aside {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 250px);
  gap: 44px;
  padding-top: 28px;
}

.picker.flush {
  padding-top: 0;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-head h3 {
  font-size: 20px;
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-nav button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
}

.calendar-nav button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.calendar-nav button:disabled {
  opacity: 0.35;
}

.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekdays {
  margin-bottom: 8px;
}

.weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.day {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  max-height: 64px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.day:hover {
  background: transparent;
}

.day:disabled {
  opacity: 1;
}

.day.available {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.day.available:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.day.selected,
.day.selected:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.day.today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 4px;
  height: 4px;
  background: var(--accent);
  transform: translateX(-50%);
}

.day.today.selected::after {
  background: #fff;
}

.days.loading .day.available {
  opacity: 0.5;
}

.calendar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.times {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.zone-row {
  margin-bottom: 18px;
}

.zone-row select {
  min-height: 40px;
  padding: 8px 36px 8px 12px;
  font-size: 15px;
}

.times-head {
  min-height: 40px;
  margin-bottom: 18px;
}

.times-head h3 {
  font-size: 20px;
}

.times-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.time-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 4px 4px 0;
  list-style: none;
  max-height: 452px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.time-list.enter .time-row {
  animation: rise 260ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}

.time-row.selected {
  grid-template-columns: 1fr 1fr;
}

.time {
  width: 100%;
  min-height: 48px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.time:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.time-row.selected .time {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.time.current,
.time.current:hover {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
  opacity: 1;
}

.time-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.time-next {
  min-height: 48px;
  animation: slide 200ms var(--ease) both;
}

.times-empty {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.times-empty .button,
.times-empty button {
  margin-top: 14px;
}

.skeleton {
  height: 48px;
  background: linear-gradient(90deg, var(--tint), #f5f5f1, var(--tint));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

/* ---------- форма ---------- */

.form-wrap {
  max-width: 560px;
  padding-top: 28px;
}

.chosen {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.chosen strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.chosen span {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.chosen > div > span:first-child:not(:only-child):not(:last-child) {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.move-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chosen.was {
  border-style: dashed;
  background: transparent;
}

.chosen.was strong {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

/* Поля в ряд выравниваются по верху: подсказка под email не растягивает соседний инпут. */
.form-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.optional {
  color: var(--faint);
}

.form-actions {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.form-error {
  padding: 12px 14px;
  border-left: 2px solid var(--danger);
  background: #fbf1f1;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.fineprint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- подтверждение и управление записью ---------- */

.result {
  width: min(1140px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 72px 0 104px;
}

.result-main {
  max-width: 720px;
  animation: rise 420ms var(--ease) both;
}

.result h1 {
  margin-top: 16px;
  font-size: clamp(44px, 8vw, 92px);
}

.result h1 span {
  display: block;
}

.result h1.cancelled {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}

.result .lead {
  max-width: 600px;
}

.result .facts {
  max-width: 600px;
  margin-top: 36px;
}

.result .fact {
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
}

.result .fact dd {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.result .fact dd a {
  color: var(--accent);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 15px;
}

.result-links button {
  color: var(--muted);
}

.result-links button:hover {
  color: var(--text);
}

.status-ok {
  color: var(--accent);
}

.confirm-box {
  display: grid;
  gap: 16px;
  max-width: 600px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  animation: rise 240ms var(--ease) both;
}

.confirm-box .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.closed {
  max-width: 520px;
  padding-top: 28px;
}

.closed p {
  margin-top: 12px;
  color: var(--muted);
}

.closed .button {
  margin-top: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 13px 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  transform: translateX(-50%);
  animation: rise 220ms var(--ease) both;
}

.toast.error {
  background: var(--danger);
  color: #fff;
}

/* ---------- политика, условия, подвал ---------- */

.legal {
  width: min(720px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 64px 0 72px;
}

.legal h1 {
  margin: 14px 0 20px;
  font-size: clamp(36px, 6vw, 56px);
}

.legal h2 {
  margin: 40px 0 12px;
  font-size: 21px;
}

.legal p,
.legal li {
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.legal p + p {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal li + li {
  margin-top: 8px;
}

.legal-list {
  margin-top: 24px;
}

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

.legal code {
  font-size: 14px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  width: min(1140px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  text-decoration-color: var(--line-strong);
}

.site-footer a:hover {
  color: var(--accent);
}

body.embed .site-footer {
  display: none;
}

/* ---------- анимации ---------- */

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

@keyframes slide {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}

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

@media (max-width: 1080px) {
  .picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .time-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-height: none;
    overflow: visible;
  }

  .time-row.selected {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .booking {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 36px;
    width: calc(100vw - 32px);
    padding: 28px 0 72px;
  }

  .identity {
    gap: 14px;
  }

  .aside h1 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .avatar {
    width: 84px;
    height: 84px;
  }

  .lead {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.55;
  }

  /* На телефоне шапка компактная: календарь должен быть виден почти сразу. */
  .aside .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    margin-top: 20px;
  }

  .aside .fact {
    padding: 10px 0;
  }

  .fact-wide {
    grid-column: 1 / -1;
  }

  .fact-note,
  .fact-clock {
    display: none;
  }


  .result {
    width: calc(100vw - 32px);
    padding: 44px 0 72px;
  }

  .result .fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 16px;
  }

  .topbar-links {
    gap: 14px;
    font-size: 14px;
  }

  .step {
    flex-wrap: wrap;
  }

  .step .step-aside {
    width: 100%;
    margin-left: 0;
  }

  .days {
    gap: 4px;
  }

  .form-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .button,
  .form-actions button {
    width: 100%;
  }
}

/* ---------- админка ---------- */

.admin {
  width: min(980px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 44px 0 96px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  border-bottom: 1px solid var(--line);
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.admin-nav a[aria-current="page"] {
  border-bottom-color: var(--text);
  color: var(--text);
}

.admin-nav a:hover {
  color: var(--text);
}

.admin-nav .count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 36px 0 24px;
}

.admin-head h1 {
  font-size: clamp(36px, 5vw, 52px);
}

.admin-head p {
  margin-top: 10px;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
}

.segmented button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.segmented button + button {
  border-left: 1px solid var(--line-strong);
}

.segmented button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.day-group + .day-group {
  margin-top: 32px;
}

.day-group h3 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}

.booking-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.booking-time {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.booking-time small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
}

.booking-who strong {
  font-size: 16px;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.booking-meta a {
  color: var(--accent);
}

.booking-notes {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.warn {
  color: var(--danger);
}

.badge.ok {
  color: var(--ok);
}

.empty {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.section-label h2 {
  font-size: 19px;
}

.section-label p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section-body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.week {
  display: grid;
  border-top: 1px solid var(--line);
}

.week-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.week-day {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.intervals {
  display: grid;
  gap: 8px;
}

.interval {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.interval .time-select {
  width: 104px;
  min-height: 42px;
  padding: 8px 32px 8px 12px;
  font-variant-numeric: tabular-nums;
}

.interval .dash {
  color: var(--muted);
}

.interval-off {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: var(--faint);
  font-size: 15px;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
}

.icon-button:hover {
  border-color: var(--text);
  background: transparent;
  color: var(--text);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}

.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.save-status {
  color: var(--muted);
  font-size: 14px;
}

.save-status.error {
  color: var(--danger);
}

.override-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.override-row strong {
  font-variant-numeric: tabular-nums;
}

.override-new {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.preview-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-slots span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.slot-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

button.slot-choice {
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

button.slot-choice:hover {
  border-color: var(--text);
  background: var(--surface);
}

button.slot-choice.selected,
button.slot-choice.selected:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

button.slot-choice:disabled {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  opacity: 1;
}

.move-any {
  align-self: end;
  min-height: 46px;
}

.type-card {
  display: grid;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.type-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.type-card-head a {
  color: var(--accent);
  font-size: 14px;
}

.integration {
  display: grid;
  gap: 14px;
}

.integration-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  font-size: 16px;
}

.integration-status strong.ok {
  color: var(--ok);
}

.integration-status strong.warn {
  color: var(--danger);
}

.integration dl {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  font-size: 14px;
}

.integration dt {
  color: var(--muted);
}

.integration dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.notice {
  padding: 14px 16px;
  border-left: 2px solid var(--danger);
  background: #fbf1f1;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.notice.info {
  border-left-color: var(--accent);
  background: #eef7fc;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login {
  width: min(420px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18vh 0 80px;
}

.login h1 {
  font-size: 44px;
}

.login form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 760px) {
  .admin {
    width: calc(100vw - 32px);
    padding-top: 24px;
  }

  .booking-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .booking-actions {
    justify-content: flex-start;
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .week-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .integration dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .integration dd {
    margin-bottom: 8px;
  }
}
