:root {
  --bg: #f7f4ef;
  --paper: #ffffff;
  --text: #27231f;
  --muted: #82796e;
  --line: #e7ded2;
  --accent: #b87964;
  --accent-dark: #8f523f;
  --soft: #f3e4dc;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  width: min(960px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 22px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; }
h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.05; }
h2 { font-size: 18px; }

.lead {
  margin: 10px 0 0;
  color: var(--muted);
}

.status {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-top: 14px;
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panelHead span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, button {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  font: inherit;
}

.serviceList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.category {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.category h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.service:first-of-type { border-top: 0; }
.service strong { display: block; font-size: 14px; }
.service small { display: block; color: var(--muted); margin-top: 2px; }

.slotList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  color: var(--muted);
}

.staffPicker {
  margin-bottom: 14px;
}

.staffPicker label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.slot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
}

.slot span {
  font-size: 16px;
  font-weight: 900;
}

.slot small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.slot.selected {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.slot.unavailable,
.slot:disabled {
  border-style: dashed;
  background: #f7f4ef;
  color: var(--muted);
  cursor: not-allowed;
  opacity: .68;
}

.slot.unavailable small,
.slot:disabled small {
  color: #9d9185;
}

.bookingForm {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.bookingForm label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.message {
  margin: 12px 0 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.message.errorMessage {
  padding: 12px;
  border: 1px solid #f0c9c4;
  border-radius: 8px;
  background: #fff4f2;
  color: #9f352c;
}

.message strong,
.message span {
  display: block;
}

.message span {
  margin-top: 4px;
  line-height: 1.55;
}

.message .errorHint {
  color: #7b4a40;
  font-weight: 700;
}

.completePanel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  margin-top: 14px;
  box-shadow: 0 24px 70px -52px rgba(39, 35, 31, .45);
}

.completeMark {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 16px;
}

.completeDetails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.completeDetails div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdfb;
}

.completeDetails dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.completeDetails dd {
  margin: 0;
  font-weight: 800;
  line-height: 1.5;
}

.completeNotice {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent-dark);
}

.completeNotice p {
  margin: 5px 0 0;
  line-height: 1.7;
}

.completePanel button {
  margin-top: 18px;
}

@media (max-width: 720px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .bookingForm { grid-template-columns: 1fr; }
  .completePanel { padding: 20px; }
  .completeDetails { grid-template-columns: 1fr; }
}
