:root {
  color-scheme: light;
  --ink: #172b43;
  --muted: #485c72;
  --blue: #164d84;
  --blue-deep: #153b64;
  --blue-soft: #edf5ff;
  --orange: #f4a348;
  --orange-deep: #df8731;
  --orange-soft: #fff2df;
  --paper: #f3f6fa;
  --white: #fff;
  --line: #d7e1ec;
  --green: #185a40;
  --green-soft: #e5f3ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 "Segoe UI", system-ui, sans-serif;
}

.shell {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
}

main.shell { padding-bottom: 36px; }
p, dl, dd { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(2rem, 3.9vw, 2.85rem); letter-spacing: -0.04em; }
h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.section-note { margin-top: 7px; font-size: 0.875rem; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}

.brand { color: var(--blue-deep); font-size: 1.0625rem; font-weight: 750; }

.demo-label {
  padding: 0.28rem 0.68rem;
  border-radius: 6px;
  background: var(--orange-soft);
  color: #754616;
  font-size: 0.8125rem;
  font-weight: 650;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 31px 0 22px;
}

.business-name {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
}

.intro-note { margin-top: 9px; }

.service {
  min-width: 118px;
  display: grid;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
}

.service time { color: var(--muted); }

.card {
  min-width: 0;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.day-header, .date-form {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.day-header h2 + p { margin-top: 4px; }

.capacity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.capacity div {
  padding: 11px 13px;
  border-radius: 7px;
  background: var(--blue-soft);
}

.capacity dt { color: var(--blue-deep); font-size: 0.875rem; }
.capacity dd { color: var(--blue-deep); font-size: 1.6rem; font-weight: 750; line-height: 1.2; }
.capacity .capacity-available { background: var(--orange-soft); }

.workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.booking-form { display: grid; gap: 13px; margin-top: 16px; }
.booking-form > button { justify-self: start; }
.field { display: grid; gap: 5px; min-width: 0; }

label { font-weight: 650; font-size: 0.875rem; }

input, button { font: inherit; }

input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #a9bbcf;
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
}

.date-form input { min-width: 145px; }
input::placeholder { color: #576b81; }

button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
}

button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: 0.56; }

.button-secondary { background: var(--white); color: var(--blue-deep); }
.button-secondary:not(:disabled):hover { background: var(--blue-soft); }

.button-primary { border-color: #bc6619; background: var(--orange); color: #21170e; }
.button-primary:not(:disabled):hover { background: var(--orange-deep); }

.notice {
  margin-bottom: 16px;
  padding: 10px 13px;
  border: 1px solid #b7cce2;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.notice-error { background: #fff0eb; border-color: #e6b3a3; color: #852d1c; }

.empty-state {
  margin-top: 15px;
  padding: 12px;
  background: var(--paper);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.875rem;
}

.reservations {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.reservation, .waiting-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reservation-details, .waiting-panel > div { overflow-wrap: anywhere; min-width: 0; }
.reservation-details p { font-size: 0.875rem; }

.reservation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reservation-actions button { font-size: 0.8125rem; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: #edf0f4;
  color: #49596a;
  font-size: 0.8125rem;
  font-weight: 700;
}

.badge-confirmed { background: var(--green-soft); color: var(--green); }
.badge-waiting { background: var(--orange-soft); color: #754616; }

.waiting-panel { margin-top: 14px; background: var(--paper); }
.waiting-panel h3 { margin-bottom: 4px; }

@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
  .card { padding: 17px; }
}

@media (max-width: 560px) {
  .page-intro, .day-header { align-items: start; flex-direction: column; }
  .page-intro { margin-top: 23px; }
  .date-form { width: 100%; justify-content: start; flex-wrap: wrap; gap: 8px; }
  .capacity { gap: 6px; }
  .capacity div { padding: 8px; }
  .capacity dt { font-size: 0.75rem; }
  .capacity dd { font-size: 1.35rem; }
}
