:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --ink: #1b1c1e;
  --ink-2: #55585e;
  --ink-3: #8b8e94;
  --line: #e7e4dd;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: #e8efff;
  --accent-soft-ink: #1d4ed8;
  --ok: #15803d;
  --err: #b91c1c;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 12px 40px rgba(20, 20, 20, .07);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --card: #1a1d20;
    --ink: #eceef0;
    --ink-2: #a7abb1;
    --ink-3: #737880;
    --line: #2a2e33;
    --accent: #5b8cff;
    --accent-ink: #0b1020;
    --accent-soft: #1f2a44;
    --accent-soft-ink: #a9c1ff;
    --ok: #4ade80;
    --err: #f87171;
    --shadow: 0 12px 40px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px 24px; }
.card {
  width: 100%; max-width: 1040px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 340px 1fr; overflow: hidden;
}
footer { margin-top: 20px; font-size: 13px; }
footer a { color: var(--ink-3); text-decoration: none; }
footer a:hover { color: var(--ink-2); }

/* Profile column */
.profile { padding: 36px 32px; border-right: 1px solid var(--line); }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.eyebrow { margin: 20px 0 2px; font-size: 13px; letter-spacing: .02em; color: var(--ink-3); }
h1 { font: 400 38px/1.1 "Instrument Serif", Georgia, serif; margin: 0 0 12px; letter-spacing: -.01em; }
.blurb { margin: 0 0 24px; color: var(--ink-2); font-size: 15px; }

.types { display: grid; gap: 8px; margin-bottom: 24px; }
.type {
  text-align: left; width: 100%; background: transparent; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; transition: border-color .15s, background .15s;
}
.type:hover { border-color: var(--ink-3); }
.type[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.type .t { font-weight: 600; font-size: 15px; }
.type .d { grid-column: 1 / -1; color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.type .m { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.type[aria-checked="true"] .m { color: var(--accent-soft-ink); font-weight: 500; }

.meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--ink-2); font-size: 14.5px; }
.meta li { display: flex; align-items: center; gap: 10px; }
.ico svg { width: 18px; height: 18px; display: block; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#tz {
  appearance: none; -webkit-appearance: none; border: 0; color: var(--ink-2); padding: 0 18px 0 0; max-width: 250px; cursor: pointer;
  text-overflow: ellipsis; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238b8e94' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center;
}
#tz:hover { color: var(--ink); }

/* Panel */
.panel { padding: 36px 36px 32px; min-height: 560px; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 24px; letter-spacing: -.01em; }
.picker { display: grid; grid-template-columns: 1fr 220px; gap: 32px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-weight: 500; }
.nav { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--ink-2); }
.nav:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-soft-ink); }
.nav:disabled { opacity: .3; cursor: default; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.dow span { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 8px; }
.grid { gap: 4px; }
.day {
  aspect-ratio: 1; max-height: 52px; width: 100%; border: 0; border-radius: 50%; background: transparent;
  font-variant-numeric: tabular-nums; font-size: 15px; color: var(--ink-3); position: relative;
}
.day:disabled { cursor: default; }
.day.avail { background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 600; }
.day.avail:hover { filter: brightness(.96); }
.day.sel { background: var(--accent); color: var(--accent-ink); }
.day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }

.times { min-width: 0; }
.day-label { margin: 6px 0 16px; font-weight: 500; min-height: 24px; }
.slot-list { display: grid; gap: 8px; max-height: 410px; overflow-y: auto; padding-right: 4px; }
.slot {
  border: 1px solid var(--accent); color: var(--accent-soft-ink); background: transparent; border-radius: 10px;
  padding: 11px 0; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; transition: background .12s, color .12s;
}
.slot:hover { background: var(--accent); color: var(--accent-ink); }
.empty { color: var(--ink-3); font-size: 14px; }
.status { color: var(--ink-3); font-size: 14px; margin: 16px 0 0; min-height: 21px; }
.skeleton { height: 46px; border-radius: 10px; background: linear-gradient(90deg, var(--line), transparent, var(--line)); background-size: 200% 100%; animation: sh 1.2s infinite linear; opacity: .6; }
@keyframes sh { to { background-position: -200% 0; } }

/* Form */
form { max-width: 460px; }
.back { border: 0; background: transparent; color: var(--ink-2); padding: 0; margin-bottom: 18px; font-size: 14px; }
.back:hover { color: var(--ink); }
.when { margin: -12px 0 24px; color: var(--ink-2); }
.when b { color: var(--ink); font-weight: 600; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.opt { color: var(--ink-3); font-weight: 400; }
input, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.error { color: var(--err); font-size: 14px; min-height: 20px; margin: 0 0 8px; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); padding: 12px 26px; font-weight: 600; font-size: 15px; text-decoration: none;
}
.primary:hover { filter: brightness(1.06); }
.primary:disabled { opacity: .6; cursor: wait; }
.ghost { border: 0; background: transparent; color: var(--ink-2); margin-top: 14px; font-size: 14px; }
.ghost:hover { color: var(--ink); }

/* Done */
.done { text-align: center; max-width: 420px; margin: 40px auto 0; }
.done .when { margin: -12px 0 10px; }
.muted { color: var(--ink-2); margin: 0 0 28px; }
.check { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, transparent); }
.check svg { width: 28px; height: 28px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done .ghost { display: block; margin: 14px auto 0; }

/* Responsive */
@media (max-width: 900px) {
  .card { grid-template-columns: 1fr; }
  .profile { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel { min-height: 0; }
}
@media (max-width: 640px) {
  .shell { padding: 16px 12px; justify-content: flex-start; }
  .profile, .panel { padding: 24px 20px; }
  .picker { grid-template-columns: 1fr; gap: 20px; }
  .slot-list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: none; }
  h1 { font-size: 32px; }
}
