:root {
  --ink: #1a1a1a;
  --muted: #5f6b76;
  --line: #e1e4e8;
  --accent: #1d5fa8;
  --accent-dark: #164a84;
  --accent-soft: #e8f0fb;
  --bg: #f3f5f7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
main { padding: 2.5rem 1rem 1rem; }
footer.site { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 1rem; }
a { color: var(--accent); }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.test-banner { background: #fff4d6; border-bottom: 1px solid #e8d08a; padding: 0.5rem 1rem; text-align: center; font-size: 0.9rem; }

/* Card */
.card {
  max-width: 1060px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}
.card.booking { display: flex; min-height: 560px; }
.card.home, .card.confirm { max-width: 640px; }

/* Left info panel */
.info { width: 340px; flex: none; padding: 1.75rem 1.5rem; border-right: 1px solid var(--line); position: relative; }
.back {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--accent); margin-bottom: 1rem;
}
.back:hover { background: var(--accent-soft); }
.host { color: var(--muted); font-weight: 600; margin: 0 0 0.25rem; }
.info h1 { font-size: 1.6rem; margin: 0 0 1.25rem; line-height: 1.2; }
.detail { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--muted); font-weight: 600; margin: 0 0 0.9rem; }
.detail.strong { color: var(--ink); }
.desc { color: var(--ink); margin-top: 1.25rem; font-size: 0.95rem; }

/* Picker */
.picker, .details { flex: 1; padding: 1.75rem 1.75rem 1.5rem; min-width: 0; }
.picker h2, .details h2 { font-size: 1.2rem; margin: 0 0 1.25rem; }
.picker-body { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.cal-col { flex: 1 1 300px; max-width: 440px; }
.cal-head { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.cal-title { font-weight: 500; min-width: 150px; text-align: center; }
.nav {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent-soft);
  color: var(--accent); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.nav:disabled { background: transparent; color: #b8c0c8; cursor: default; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.weekdays span { font-size: 0.72rem; color: var(--muted); padding-bottom: 0.5rem; }
.grid { row-gap: 0.4rem; }
.day {
  position: relative; justify-self: center; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: #8a949e; font-size: 0.95rem;
}
.day.blank { visibility: hidden; }
button.day { border: 0; font: inherit; cursor: pointer; }
.day.avail { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.day.avail:hover { background: #d3e2f6; }
.day.avail.selected { background: var(--accent); color: #fff; }
.day.today::after {
  content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor;
}
.tz { margin-top: 1.5rem; }
.tz-title { font-weight: 600; margin: 0 0 0.4rem; }
.tz-select { display: flex; align-items: center; gap: 0.4rem; color: var(--ink); }
.tz-select select { font: inherit; border: 0; background: transparent; color: var(--ink); width: 100%; min-width: 0; padding: 0.3rem 0; cursor: pointer; }
.cal-col, .tz, .tz-select { min-width: 0; }

/* Times */
.times-col { width: 220px; flex: none; }
.times-date { margin: 0.6rem 0 1.1rem; font-size: 0.95rem; }
.time-list { display: grid; gap: 0.6rem; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.time-row { display: flex; gap: 0.4rem; }
.time {
  width: 100%; height: 52px; border: 1px solid #9bb8dc; border-radius: 6px; background: #fff;
  color: var(--accent); font: inherit; font-weight: 700; cursor: pointer;
}
.time:hover { border: 2px solid var(--accent); }
.time-chosen, .next {
  flex: 1; height: 52px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.time-chosen { background: #666; color: #fff; }
.next { background: var(--accent); color: #fff; text-decoration: none; }
.next:hover { background: var(--accent-dark); }
.empty { color: var(--muted); }
.fallback-times { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fallback-times .time { width: auto; height: auto; padding: 0.5rem 0.8rem; text-decoration: none; }

/* Details form */
form { display: grid; gap: 1.1rem; max-width: 460px; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
label.radio { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; }
.optional { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  font: inherit; padding: 0.65rem 0.75rem; border: 1px solid #b9c1c9; border-radius: 6px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; padding: 0; }
button[type=submit] {
  font: inherit; font-weight: 700; padding: 0.75rem 1.4rem; border: 0; border-radius: 40px;
  background: var(--accent); color: #fff; cursor: pointer; justify-self: start;
}
button[type=submit]:hover { background: var(--accent-dark); }
.errors { background: #fdecec; border: 1px solid #f0b4b4; border-radius: 6px; padding: 0.4rem 1rem; margin-bottom: 1rem; }
.hp { position: absolute; left: -10000px; }

/* Home */
.home-head { text-align: center; padding: 2rem 1.5rem 1.5rem; border-bottom: 1px solid var(--line); }
.home-head h1 { margin: 0 0 0.5rem; font-size: 1.6rem; }
.meta { color: var(--muted); }
.types { padding: 0.5rem 0; }
.type {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.type:last-child { border-bottom: 0; }
.type:hover { background: #f8fafc; }
.type .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); flex: none; }
.type strong { display: block; font-size: 1.05rem; }
.type .meta { font-size: 0.9rem; }
.type .arrow { margin-left: auto; font-size: 1.6rem; color: var(--muted); }

/* Confirmation */
.confirm { padding: 2rem 1.75rem; }
.confirm-head { text-align: center; }
.confirm-head h1 { font-size: 1.4rem; margin: 0.5rem 0; }
.check svg { width: 36px; height: 36px; stroke: #fff; fill: #1f8a4c; stroke-width: 2.2; }
.confirm-box { border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.25rem 0.4rem; margin: 1.5rem 0; }
.confirm-title { font-weight: 700; font-size: 1.1rem; margin: 0 0 1rem; }
.center { text-align: center; }

/* Small screens: stack the panels */
@media (max-width: 900px) {
  main { padding-top: 1rem; }
  .card.booking { flex-direction: column; }
  .info { width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .picker-body { flex-direction: column; }
  .cal-col { max-width: none; }
  .times-col { width: auto; }
  .time-list { max-height: none; }
  .day { width: 40px; height: 40px; }
  .picker, .details { padding: 1.25rem 1rem; }
}
