:root {
  --accent: #24406b;   /* синий со щита логотипа */
  --gold: #b08d3f;     /* оттуда же, для акцентов помельче */
  --bg: #f6f3ea;       /* кремовый фон логотипа */
  --surface: #ffffff;
  --text: #1f2530;
  --muted: #6f7683;
  --line: #e3ddcd;
  --disabled: #bdb6a5;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #9db9e2;
    --gold: #d7b56b;
    --bg: #14181f;
    --surface: #1c212b;
    --text: #eae7df;
    --muted: #9aa0ab;
    --line: #2f3542;
    --disabled: #4c5461;
  }
}

* { box-sizing: border-box; }

/* явный display у .steps перебил бы служебное правило [hidden] */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "PT Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.head__mark { height: 52px; width: auto; object-fit: contain; }
.head__name { font-weight: 700; font-size: 18px; }

.shell {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* шаги */
.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.steps li {
  flex: 1;
  padding-top: 8px;
  border-top: 3px solid var(--line);
}
.steps li[data-state="done"] { border-top-color: var(--gold); color: var(--text); }
.steps li[data-state="current"] { border-top-color: var(--accent); color: var(--text); font-weight: 700; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 20px 0 8px; font-weight: 700; }
.muted { color: var(--muted); margin: 0; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 16px 0 0; }

/* список выбора */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.item:hover:not(:disabled) { border-color: var(--accent); }
.item:disabled { color: var(--disabled); cursor: not-allowed; }
.item__main { flex: 1; min-width: 0; }
.item__name { font-weight: 700; }
.item__sub { color: var(--muted); font-size: 14px; }
.item__chev { color: var(--muted); }

.avatar {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--bg);
  display: grid; place-items: center;
  font-weight: 700; color: var(--gold);
}

/* календарь */
.cal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0 12px;
}
.cal__title { font-weight: 700; }
.cal__nav {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.cal__nav:hover:not(:disabled) { border-color: var(--accent); }
.cal__nav:disabled { color: var(--disabled); border-color: var(--line); cursor: not-allowed; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow {
  text-align: center; font-size: 12px; color: var(--muted);
  text-transform: uppercase; padding-bottom: 4px;
}
.cal__day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--disabled);
  font: inherit;
  cursor: default;
}
.cal__day[data-free="1"] {
  color: var(--text);
  border-color: var(--line);
  cursor: pointer;
  font-weight: 700;
}
.cal__day[data-free="1"]:hover { border-color: var(--accent); }
.cal__day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 8px; }
.slot {
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.slot:hover { border-color: var(--accent); }

/* сводка и кнопки */
.summary { margin: 0 0 4px; }
.summary dt { color: var(--muted); font-size: 13px; }
.summary dd { margin: 0 0 12px; font-weight: 700; }

.btn {
  display: block; width: 100%;
  padding: 14px;
  border: 0; border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit; font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
}
@media (prefers-color-scheme: dark) { .btn { color: #101623; } }

.btn--link {
  background: transparent;
  color: var(--accent);
  font-weight: 400;
  margin-top: 8px;
  text-decoration: underline;
}

.tz { color: var(--muted); font-size: 13px; margin-top: 14px; }
.error { color: #b3261e; }
@media (prefers-color-scheme: dark) { .error { color: #f2b8b5; } }

.foot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 16px 28px;
}
.foot__label { font-size: 13px; color: var(--muted); }
.foot__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.foot__mark { height: 24px; width: auto; object-fit: contain; }
