:root {
  color-scheme: light;
  --ink: #171717;
  --graphite: #252525;
  --muted: #66686b;
  --line: #d9dadd;
  --line-strong: #9b9da1;
  --soft: #f5f5f4;
  --silver: #b6b8bc;
  --focus: #55585d;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fafafa 0, #fff 380px);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}

button, input, select, textarea { font: inherit; }

.page-shell {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  padding: 14px 0 42px;
}

.hero { text-align: center; }

.prototype-badge {
  display: inline-flex;
  border: 1px solid var(--silver);
  border-radius: 999px;
  padding: 5px 10px;
  color: #5c5d60;
  background: rgba(255, 255, 255, .86);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
}

.brand-logo {
  display: block;
  width: min(300px, 64vw);
  height: auto;
  margin: 12px auto 7px;
  object-fit: contain;
}

h1 {
  margin: 0;
  font: 400 clamp(34px, 5.2vw, 54px)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}

.intro {
  max-width: 650px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
}

.reservation-note {
  max-width: 600px;
  margin: 12px auto 0;
  font-size: 14px;
  font-weight: 600;
}

.evaluation-price {
  width: min(100%, 720px);
  margin: 28px auto 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f7f6;
  color: var(--muted);
  font-size: 14px;
}

.evaluation-price p { margin: 0; }
.evaluation-price p + p { margin-top: 8px; }
.evaluation-price__title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}
.evaluation-price__title strong {
  color: #000;
  font-size: 19px;
  letter-spacing: .01em;
}
.evaluation-price__note { color: #75777a; font-size: 13px; }

form { display: grid; gap: 24px; margin-top: 24px; }

.form-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .035);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 24px;
}

.step {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  border-top: 1px solid var(--ink);
  padding-top: 5px;
}

h2 { margin: 0; font: 400 clamp(23px, 3vw, 30px)/1.2 Georgia, serif; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

.date-groups { display: grid; gap: 10px; min-width: 0; }

.date-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: clip;
}

.date-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  cursor: pointer;
  font-weight: 600;
  list-style-position: inside;
}

.date-group summary:hover { background: #fafafa; }
.date-group summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.date-group summary small { color: var(--muted); font-weight: 400; white-space: nowrap; }

.slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 4px 14px 16px;
  min-width: 0;
}

.slot { min-width: 0; margin: 0; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }

.slot span {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
}

.slot span:hover { border-color: var(--line-strong); background: #fafafa; }
.slot input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.slot input:checked + span {
  border-color: var(--ink);
  background: var(--soft);
  box-shadow: inset 3px 0 0 var(--ink);
}
.slot input:checked + span::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 10px;
  font-weight: 700;
}
.slot.is-unavailable span {
  cursor: not-allowed;
  opacity: .48;
  background: #f4f4f3;
}
.slot strong { font-size: 16px; }
.slot small { color: var(--muted); line-height: 1.32; }

.selected-slot {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
}
.selected-slot.has-selection { color: var(--ink); font-weight: 600; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.form-grid label {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.form-grid .full { grid-column: 1 / -1; }
.optional { color: var(--muted); font-weight: 400; }

input, select, textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  transition: border-color .16s, box-shadow .16s;
}

input, select { min-height: 48px; }
textarea { resize: vertical; min-height: 96px; }

input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(75, 78, 83, .11);
}
[aria-invalid="true"] { border-color: #7b2727; }

.consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  margin: 24px 0 0;
  font-size: 14px;
}
.consent input { width: 18px; min-height: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--graphite); }

.field-error {
  min-height: 0;
  margin: 0;
  color: #7b2727;
  font-size: 13px;
  font-weight: 400;
}
.field-error:not(:empty) { margin-top: 5px; }

button {
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  border: 1px solid var(--graphite);
  border-radius: 10px;
  padding: 14px 20px;
  background: var(--graphite);
  color: #fff;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .16s, transform .16s, box-shadow .16s;
}
button:hover { background: #3a3a3a; box-shadow: 0 7px 20px rgba(0, 0, 0, .12); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; box-shadow: 0 0 0 2px var(--ink); }

#result { min-height: 24px; margin: 14px 0 0; text-align: center; font-size: 14px; }
footer { padding: 24px 0 0; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .06em; }

@media (max-width: 720px) {
  .page-shell { width: min(100% - 28px, 620px); padding-top: 10px; }
  .brand-logo { width: min(260px, 68vw); margin: 10px auto 6px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 24px); }
  .brand-logo { width: min(230px, 72vw); margin: 9px auto 5px; }
  .intro { font-size: 16px; }
  .evaluation-price { margin-top: 22px; padding: 16px; }
  form { margin-top: 30px; gap: 16px; }
  .form-card { padding: 20px 16px; border-radius: 10px; }
  .section-heading { gap: 11px; }
  .form-grid, .slots { grid-template-columns: minmax(0, 1fr); }
  .date-group summary { align-items: flex-start; padding: 14px; }
  .slots { padding: 2px 11px 13px; }
  .slot span { min-height: 72px; }
}
