:root {
  --dark: #214F49;
  --dark-2: #2E6A61;
  --accent: #1a8a7a;
  --accent-soft: #e3f2ef;
  --mint: #9fd0c4;
  --coral: #c8553d;
  --bg: #F3F6FA;
  --card: #ffffff;
  --text: #1f2a2a;
  --muted: #5f6b6b;
  --line: #e1e7ea;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 50, 45, .06), 0 8px 24px rgba(20, 50, 45, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
a { color: var(--accent); }

.top { background: var(--dark); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top img { height: 30px; width: auto; display: block; }
.top a.back { color: #d6ece6; text-decoration: none; font-size: 15px; }
.top a.back:hover { color: #fff; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.hero { background: var(--dark); color: #fff; padding: 36px 0 84px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 44px); }
.hero h1 .dot { color: var(--mint); }
.hero p { color: #cfe6e0; max-width: 560px; margin: 12px 0 0; font-size: 18px; }
.hero .who { display: flex; gap: 14px; align-items: center; margin-top: 26px; }
.hero .who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--mint); }
.hero .who small { display: block; color: #a9cfc6; font-size: 14px; }

.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: -56px; padding-bottom: 56px; }
.type {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px;
  border: 2px solid transparent; transition: transform .15s ease, border-color .15s ease;
}
.type:hover, .type:focus-visible { transform: translateY(-2px); border-color: var(--accent); outline: none; }
.type h2 { font-size: 21px; }
.type p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--dark); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.pill svg { width: 14px; height: 14px; }
.type .go { color: var(--accent); font-weight: 600; font-size: 15px; }

.book { display: grid; grid-template-columns: 300px 1fr; gap: 20px; margin-top: -56px; padding-bottom: 56px; align-items: start; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.summary h1 { font-size: 26px; margin: 8px 0 10px; }
.summary p { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.summary .chosen { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; display: none; }
.summary .chosen.on { display: block; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h2 { font-size: 20px; }
.navbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; color: var(--dark); }
.navbtn:disabled { opacity: .35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.grid .wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0; text-transform: uppercase; letter-spacing: .04em; }
.day { aspect-ratio: 1; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: 15px; color: #a5b0b0; cursor: default; }
.day.free { background: var(--accent-soft); color: var(--dark); font-weight: 600; cursor: pointer; }
.day.free:hover { background: var(--mint); }
.day.sel { background: var(--accent) !important; color: #fff !important; }
.day.today { box-shadow: inset 0 0 0 1px var(--mint); }

.layout { display: grid; grid-template-columns: 1fr 210px; gap: 24px; }
.times h3 { font-size: 16px; margin-bottom: 10px; }
.times .list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 2px; }
.slot { border: 1.5px solid var(--accent); color: var(--accent); background: #fff; border-radius: 10px; padding: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.slot:hover { background: var(--accent-soft); }
.slot.sel { background: var(--accent); color: #fff; }
.hint { color: var(--muted); font-size: 14px; }

form { display: none; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
form.on { display: block; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
label .opt { font-weight: 400; color: var(--muted); }
input, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 84px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 16px 0; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 13px 22px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--dark-2); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.err { color: var(--coral); font-weight: 600; margin-top: 12px; min-height: 1em; }

.done { text-align: center; padding: 44px 24px; }
.done .check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 18px; }
.done h2 { font-size: 26px; margin-bottom: 10px; }
.done p { color: var(--muted); max-width: 460px; margin: 8px auto; }
.done .box { display: inline-block; text-align: left; background: var(--bg); border-radius: 12px; padding: 14px 18px; margin: 16px 0; font-weight: 600; }
.done .box span { display: block; font-weight: 400; color: var(--muted); }

.narrow { max-width: 560px; margin: -56px auto 56px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 0 28px; }
footer a { color: var(--muted); }

.spinner { width: 22px; height: 22px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .book { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .times .list { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .slot { flex: 1 0 84px; }
}
@media (max-width: 520px) {
  .fields { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .grid { gap: 4px; }
  .day { border-radius: 9px; font-size: 14px; }
  .top img { height: 24px; }
}
