
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; width: 100%; }

header { border-bottom: 1px solid var(--line); }
header nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 20px; height: auto; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.back {
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s;
}
.back:hover { border-color: var(--blaze); }

main {
  flex: 1;
  padding: clamp(28px, 6vw, 80px) 0 clamp(44px, 8vw, 96px);
  background:
    repeating-linear-gradient(0deg,  var(--grid) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 56px),
    var(--bg);
}

.formcard {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-1);
  max-width: 560px;
  margin: 0 auto;
}
.formcard h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.45rem, 6vw, 1.75rem); line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 10px;
}
.lede { color: var(--muted); font-size: .95rem; margin-bottom: 24px; }
.steplbl { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.step { margin-bottom: 22px; }

.cal { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; background: var(--bg); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head span { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.cal-nav {
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg);
  font-size: 1.25rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: border-color .12s, color .12s;
}
.cal-nav:hover:not(:disabled) { border-color: var(--blaze); color: var(--blaze); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.cal-dow span { text-align: center; font-size: .64rem; font-weight: 700; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cell {
  min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid transparent; background: var(--bg-2); color: var(--fg);
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.cal-cell:hover:not(.disabled):not(.empty) { border-color: var(--blaze); }
.cal-cell.disabled { color: var(--line); background: transparent; cursor: default; }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.sel { background: var(--blaze); color: var(--cream); border-color: transparent; font-weight: 700; }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.time {
  width: 100%; min-height: 44px; padding: 11px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg);
  font-family: var(--font-body); font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.time:hover { border-color: var(--blaze); }
.time.sel { background: var(--blaze); color: var(--cream); border-color: transparent; }
.slotmsg { color: var(--muted); font-size: .9rem; padding: 4px 0; }
.selected-when { margin-bottom: 18px; font-weight: 600; overflow-wrap: anywhere; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blaze); }

.bookbtn {
  width: 100%; display: inline-flex; justify-content: center; align-items: center;
  min-height: 50px; padding: 15px 28px; border: 0; border-radius: var(--r-sm); cursor: pointer;
  background: var(--blaze); color: var(--cream);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  transition: background .15s;
}
.bookbtn:hover { background: var(--ember); }
.bookbtn:disabled { opacity: .6; cursor: default; }
.err { color: #C43D2B; font-size: .88rem; margin-top: 12px; text-align: center; display: none; }
.note { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }

.offline {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 18px; font-size: .9rem; color: var(--fg);
  background: var(--bg-2);
}
.offline[hidden] { display: none; }

.centered { text-align: center; padding: 18px 4px; }
.centered h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.centered p { color: var(--muted); }
.booked-when {
  font-family: var(--font-display); font-weight: 600; font-size: 1.22rem;
  color: var(--fg); letter-spacing: -0.01em; margin: 4px 0 10px;
}
.divider { height: 1px; background: var(--line); margin: 24px 0 18px; }

.view { display: none; }
.view.on { display: block; }
#time-step, #detail-step { display: none; }

footer { border-top: 1px solid var(--line); padding: 28px 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-legal { font-size: 13px; color: var(--muted); }
.footer-legal a { color: inherit; }

@media (min-width: 620px) {
  .wrap { padding: 0 24px; }
  .formcard { padding: clamp(24px, 3.5vw, 40px); }
  .cal { padding: 18px; }
  .cal-grid, .cal-dow { gap: 6px; }
}

.choices { display:flex; flex-wrap:wrap; gap:8px; }
.choices button { min-height:44px; padding:10px 14px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--bg-2); color:var(--fg); font:inherit; cursor:pointer; }
.choices button[aria-pressed="true"] { background:var(--blaze); color:var(--cream); }
.choices button:disabled { opacity:.5; cursor:default; }
.formcard { width:100%; }
fieldset { border:0; padding:0; min-width:0; }
