:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --danger: #b91c1c;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 40px 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  display: grid;
  grid-template-columns: 300px 1fr;
  overflow: hidden;
}
.intro { padding: 28px; border-right: 1px solid var(--line); }
.main { padding: 28px; min-width: 0; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent); font-weight: 700; font-size: 18px;
}
.owner { margin: 14px 0 2px; color: var(--muted); font-weight: 500; }
h1 { font-size: 22px; margin: 0 0 8px; line-height: 1.25; }
h2 { font-size: 18px; margin: 0 0 16px; }
h3 { font-size: 15px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.field { margin: 18px 0 0; border: 0; padding: 0; min-width: 0; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
input, select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #d1d5db; border-radius: 9px; padding: 9px 11px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent);
}
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 64px; font: inherit; cursor: pointer;
  background: #fff; border: 1px solid #d1d5db; border-radius: 9px; padding: 8px 10px; color: var(--text);
}
.seg button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.summary { margin-top: 22px; padding: 14px; border-radius: 10px; background: var(--soft); font-size: 14px; }
.summary strong { display: block; }

.pick { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; font-size: 16px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--text);
}
.icon-btn:disabled { opacity: .35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow span { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.day {
  aspect-ratio: 1; max-height: 52px; border: 0; border-radius: 50%; background: transparent;
  font: inherit; color: #9ca3af; cursor: default; position: relative;
}
.day.avail { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 9%, white); cursor: pointer; }
.day.avail:hover { background: color-mix(in srgb, var(--accent) 18%, white); }
.day.sel { background: var(--accent); color: #fff; }
.day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.times h3 { min-height: 22px; }
.time-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.time-list button {
  font: inherit; font-weight: 600; cursor: pointer; padding: 10px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, white); background: #fff; color: var(--accent);
}
.time-list button:hover { background: var(--accent); color: #fff; }
.status { color: var(--muted); font-size: 14px; min-height: 20px; margin: 16px 0 0; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:not(:empty) { margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 14px; }
.chip button { border: 0; background: #e5e7eb; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; line-height: 1; }
.options { display: grid; gap: 8px; }
.option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, white); }
.option input { width: auto; margin: 3px 0 0; accent-color: var(--accent); }
#f-video-url { margin-top: 8px; }
.btn { font: inherit; font-weight: 600; border-radius: 9px; padding: 10px 18px; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--accent); color: #fff; margin-top: 22px; width: 100%; padding: 12px; }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: #fff; border-color: #d1d5db; color: var(--text); }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; margin-bottom: 14px; }
.error { color: var(--danger); min-height: 0; margin: 14px 0 0; font-size: 14px; }
.error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done-icon { width: 48px; height: 48px; border-radius: 50%; background: #dcfce7; color: #15803d; display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 18px 0 24px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; word-break: break-word; }
.details a { color: var(--accent); }

@media (max-width: 820px) {
  .wrap { padding: 16px; }
  .card { grid-template-columns: 1fr; }
  .intro { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }
  .main { padding: 22px; }
  .pick { grid-template-columns: 1fr; }
  .time-list { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .row { grid-template-columns: 1fr; }
}
