:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --btn: #6a3dc8;
  --btn-text: #ffffff;
  --bar: #1f1f1f;
  --reset: #1f1f1f;
  --reset-text: #ffffff;
  --muted: color-mix(in srgb, var(--text) 60%, transparent);
  --line: color-mix(in srgb, var(--text) 18%, transparent);
  --soft: color-mix(in srgb, var(--btn) 8%, var(--bg));
  --danger: #c62828;
  --ok: #2e7d32;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bar {
  background: var(--bar);
  color: #fff;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
}
.bar img { max-height: 72px; max-width: 220px; display: block; }
.bar span { font-weight: 700; font-size: 20px; letter-spacing: .02em; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 6px; }
h2 { font-size: 20px; margin: 28px 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 14px; }

.topnav { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 14px; }

button, .btn {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 14px 20px;
  background: var(--btn);
  color: var(--btn-text);
  cursor: pointer;
  font-weight: 600;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--btn) 45%, transparent); outline-offset: 2px; }
.btn-reset { background: var(--reset); color: var(--reset-text); padding: 9px 16px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 9px 16px; font-size: 15px; }
.btn-big { width: 100%; font-size: 20px; padding: 18px; margin-top: 10px; }
.btn-link { background: none; color: var(--btn); padding: 6px 0; font-weight: 600; }

.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 16px 0; }
.choices.wide { grid-template-columns: 1fr; }
.choices button { padding: 18px 12px; font-size: 18px; }
.choices.nums { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.slot-sub { display: block; font-size: 13px; font-weight: 500; opacity: .85; margin-top: 2px; }

.rooms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 16px; }
.room {
  background: none;
  color: var(--text);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}
.room .pic {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--radius);
  background: var(--soft) center / cover no-repeat;
  display: grid;
  place-items: center;
  font-size: 40px;
  color: var(--btn);
  border: 1px solid var(--line);
}
.room .name { background: var(--btn); color: var(--btn-text); border-radius: 10px; padding: 12px 8px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
  background: var(--bg);
}
.card.soft { background: var(--soft); border-color: transparent; }

.field { margin: 0 0 16px; }
.field > label, .field > .label { display: block; font-weight: 600; margin-bottom: 6px; }
.req::after { content: " *"; color: var(--danger); }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%;
  font: inherit;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #111;
  min-height: 50px;
}
.row2 { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
}
.pills input { accent-color: var(--btn); width: 18px; height: 18px; margin: 0; }
.pills label:has(input:checked) { border-color: var(--btn); background: var(--soft); }

.check, .field > label.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 10px 0; font-weight: 500; }
.field > label.check.strong { font-weight: 700; }
.check input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: var(--btn); }
.check.strong { font-weight: 700; }

.waiver-text {
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  background: color-mix(in srgb, var(--text) 3%, var(--bg));
}
.waiver-text p { margin-bottom: 12px; }
.fine { font-size: 14px; color: var(--muted); }

.minor { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; align-items: end; border-top: 1px dashed var(--line); padding-top: 12px; }
.minor.has-bd { grid-template-columns: 1fr 1fr 170px; }
.minor .rm { grid-column: 1 / -1; justify-self: end; margin: -8px 0 8px; }
@media (max-width: 560px) { .minor, .minor.has-bd { grid-template-columns: 1fr; } }

.sig-wrap { position: relative; border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 200px; border-radius: var(--radius); }
.sig-wrap .hint { position: absolute; left: 16px; bottom: 12px; color: #999; pointer-events: none; font-size: 15px; }
.sig-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

.error {
  background: color-mix(in srgb, var(--danger) 10%, var(--bg));
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  font-weight: 600;
}
.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 25%, transparent); }

.done { text-align: center; padding-top: 20px; }
.done .tick {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 12px; font-size: 48px;
}
.stat-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.stat { background: var(--soft); border-radius: var(--radius); padding: 12px 18px; min-width: 110px; }
.stat b { display: block; font-size: 26px; }

.summary { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 15px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; overflow-wrap: anywhere; }

.date-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.date-quick button { padding: 10px 14px; font-size: 15px; background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.date-quick button.on { background: var(--btn); color: var(--btn-text); }

footer.legal { text-align: center; font-size: 13px; padding: 0 16px 24px; color: var(--muted); }
footer.legal a { color: var(--muted); }

.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
