:root {
  --ink: #282946;
  --muted: #6b6f86;
  --line: #e3e7f0;
  --bg: #f2f5fa;
  --card: #fff;
  --accent: #326bff;
  --accent-dark: #1959ff;
  --accent-soft: #eaf0ff;
  --danger: #c4314b;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 "Instrument Sans", Helvetica, Arial, sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; }
.card {
  width: 100%; max-width: 1000px; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(40, 41, 70, .06), 0 12px 40px rgba(40, 41, 70, .08);
  display: grid; grid-template-columns: 320px 1fr; overflow: hidden;
}
.card.single { grid-template-columns: 1fr; max-width: 560px; }
.side { padding: 36px 32px; border-right: 1px solid var(--line); }
.host { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); }
.side h1 { font-size: 28px; line-height: 1.2; margin: 18px 0 16px; letter-spacing: -.01em; }
.facts { list-style: none; padding: 0; margin: 0 0 20px; color: var(--muted); font-weight: 500; }
.facts li { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.facts svg { width: 20px; height: 20px; flex: none; }
.desc p { margin: 0 0 12px; font-size: 15px; }
.panel { padding: 36px 32px; min-height: 520px; }
.panel h2 { font-size: 20px; margin: 0 0 20px; }
.loading, .note { color: var(--muted); }

/* Picker */
.picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.picker.has-day { grid-template-columns: minmax(0, 1fr) 200px; }
.month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month strong { font-size: 16px; }
.month button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent);
  cursor: pointer; font-size: 18px; line-height: 1;
}
.month button:disabled { background: transparent; color: #c5c9d6; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.grid .dow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 4px; }
.day {
  aspect-ratio: 1; max-width: 48px; width: 100%; margin: 0 auto; border-radius: 50%; border: 0; background: transparent;
  color: #b4b8c7; font-weight: 500; cursor: default;
}
.day.open { background: var(--accent-soft); color: var(--accent); font-weight: 700; cursor: pointer; }
.day.open:hover { background: #d9e4ff; }
.day.selected, .day.selected:hover { background: var(--accent); color: #fff; }
.day.today { box-shadow: inset 0 0 0 1.5px currentColor; }
.tz { margin-top: 22px; font-size: 14px; color: var(--muted); }
.tz label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.tz select { width: 100%; max-width: 360px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.times h3 { font-size: 15px; margin: 6px 0 14px; font-weight: 600; }
.times .list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.slot {
  display: flex; gap: 8px; border-radius: 8px; overflow: hidden;
}
.slot button {
  flex: 1; padding: 11px 8px; border-radius: 8px; border: 1.5px solid #b9cbff; background: #fff; color: var(--accent);
  font-weight: 700; cursor: pointer; transition: background .12s;
}
.slot button:hover { border-color: var(--accent); }
.slot.chosen .pick { background: #5b6077; border-color: #5b6077; color: #fff; }
.slot .go { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot .go:hover { background: var(--accent-dark); }
.empty { color: var(--muted); font-size: 15px; }

/* Form */
.back { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; margin-bottom: 18px; font-weight: 600; }
.chosen-time { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 22px; font-weight: 600; }
.chosen-time span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
form .field { margin-bottom: 16px; max-width: 520px; }
form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
form label .opt { font-weight: 400; color: var(--muted); }
form input, form select, form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cfd5e3; border-radius: 8px; background: #fff;
}
form textarea { min-height: 92px; resize: vertical; }
form input:focus, form select:focus, form textarea:focus, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; border: 0; background: var(--accent); color: #fff;
  font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #a6243b; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.error { color: var(--danger); font-weight: 600; margin: 4px 0 14px; }

/* Done */
.done .check {
  width: 52px; height: 52px; border-radius: 50%; background: #e4f6ec; color: #1f8a4c; display: grid; place-items: center; margin-bottom: 16px;
}
.done h2 { font-size: 24px; margin-bottom: 10px; }
.done p { margin: 0 0 12px; }

@media (max-width: 820px) {
  .wrap { padding: 0; }
  .card { grid-template-columns: 1fr; border-radius: 0; box-shadow: none; min-height: 100vh; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 22px 20px; }
  .side h1 { font-size: 24px; margin: 14px 0 10px; }
  .panel { padding: 24px 22px 40px; min-height: 0; }
  .picker.has-day { grid-template-columns: 1fr; }
  .times .list { max-height: none; }
}
