* {
  box-sizing: border-box;
}

:root {
  --brand-color: #1f6b5f;
  --brand-color-strong: #175047;
  --surface: #ffffff;
  --surface-soft: #f7f9f7;
  --ink: #18221e;
  --ink-muted: #5a6962;
  --line: #dbe3dc;
  --line-strong: #cad5cc;
  --danger-surface: #fff3f1;
  --danger-line: #dfb3af;
  --danger-text: #7a271f;
  --success-bg: #edf9f1;
  --success-border: #88c8a0;
  --success-text: #1f7043;
  --shadow-soft: 0 16px 34px rgba(16, 32, 24, 0.1);
  --shadow-panel: 0 20px 45px rgba(16, 34, 26, 0.12);
}

body {
  margin: 0;
  font-family: "Segoe UI", "Avenir Next", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% -10%, #e6ede7 0%, rgba(230, 237, 231, 0) 45%),
    radial-gradient(circle at 100% 0%, #eff2eb 0%, rgba(239, 242, 235, 0) 50%),
    #f5f7f4;
  color: var(--ink);
  line-height: 1.45;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 18px 36px;
}

[hidden] {
  display: none !important;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: start;
}

.hero {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  overflow: hidden;
  position: sticky;
  top: 14px;
  background:
    linear-gradient(138deg, rgba(255, 255, 255, 0.95), rgba(245, 249, 246, 0.92));
  box-shadow: var(--shadow-soft);
}

.hero-overlay {
  padding: 18px 18px 20px;
}

.hero-branding {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-logo {
  max-height: 72px;
  max-width: 110px;
  flex-shrink: 0;
  align-self: flex-start;
  object-fit: contain;
}

body.with-cover {
  background-image:
    linear-gradient(rgba(236, 241, 237, 0.82), rgba(236, 241, 237, 0.82)),
    var(--page-cover-url);
  background-size: auto, cover;
  background-position: 0 0, center;
  background-repeat: repeat, no-repeat;
  background-attachment: scroll, scroll;
}

.hero p {
  margin: 0 0 6px;
  color: var(--brand-color);
  font-weight: 700;
}

.hero-kicker {
  margin: 0 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  color: #557066;
  font-weight: 700;
}

.hero-name {
  margin: 0;
  color: #10211a;
  font-size: clamp(27px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.05;
}

.hero h1 {
  margin: 15px 0 0;
  color: #1f2f28;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-lead {
  margin: 4px 0 0;
  max-width: 440px;
  color: #7d9c8e;
  font-size: 13px;
  font-weight: 400;
}

.hero-intro {
  margin: 4px 0 0;
  max-width: 460px;
  color: #557066;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
}

.panel {
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #ffffff);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-panel);
}

.panel-header {
  margin-bottom: 12px;
}

.panel-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  color: #16231e;
  line-height: 1.12;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--ink-muted);
  line-height: 1.4;
  font-size: 13px;
}

.mode-notice {
  flex: 1;
  min-width: 0;
  color: #1b5e46;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slug-error {
  margin: 8px 0 14px;
  display: flex;
  justify-content: center;
}

.slug-error-card {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--danger-line);
  border-radius: 14px;
  background: var(--danger-surface);
  padding: 22px;
  text-align: center;
}

.slug-error-card h2 {
  margin: 0 0 8px;
  font-size: 25px;
  color: var(--danger-text);
}

.slug-error-card p {
  margin: 0;
  color: var(--danger-text);
  font-weight: 600;
  line-height: 1.4;
}

.slug-error-card button {
  margin-top: 16px;
  min-height: 40px;
  padding: 0 16px;
}

.slug-error-help {
  margin-top: 12px !important;
  color: #6f3a33 !important;
  font-size: 13px;
  font-weight: 500 !important;
}

.direct-mode-actions {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #cde0d6;
  border-radius: 10px;
  background: #ecf8f1;
  padding: 8px 8px 8px 14px;
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #2a3f37;
  font-weight: 600;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
}

.secondary-action:hover {
  border-color: #92a69b;
  background: #f2f6f3;
  color: #1e3028;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.section-block {
  border: 1px solid #e3e9e4;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
  margin-bottom: 12px;
}

.section-head {
  margin-bottom: 10px;
}

.section-head-secondary {
  margin-top: 12px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  color: #21362d;
}

.section-copy {
  margin: 4px 0 0;
  color: #5f6f67;
  font-size: 12px;
}

.criteria-grid {
  margin-bottom: 0;
}

.availability-block {
  margin-top: 2px;
}

.availability-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #4a5952;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
button {
  min-height: 46px;
  border-radius: 10px;
  font: inherit;
}

input,
select {
  border: 1px solid #b9c6be;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
button:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand-color) 55%, #abc2b8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-color) 20%, white);
}

button {
  border: 0;
  background: var(--brand-color);
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

button:hover {
  background: var(--brand-color-strong);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-height: 42px;
  align-items: center;
}

.slot {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 48%, #9cb4ab);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-color-strong);
  font-weight: 700;
  min-width: 74px;
  padding: 0 14px;
}

.slot.selected {
  background: color-mix(in srgb, var(--brand-color) 88%, #0f1713);
  color: #fff;
  border-color: color-mix(in srgb, var(--brand-color-strong) 78%, #0e1814);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-color) 22%, white);
}

.slot:disabled {
  border-color: #d3ddd5;
  background: #f4f7f4;
  color: #8b958f;
  cursor: not-allowed;
  transform: none;
}

.guest-grid {
  margin-bottom: 0;
}

.consent {
  display: flex;
  grid-template-columns: none;
  gap: 9px;
  align-items: flex-start;
  margin: 8px 0 14px;
  font-size: 13px;
  color: #4a5c53;
  font-weight: 500;
}

.consent input {
  margin-top: 2px;
}

#bookTable {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.confirmation-card {
  margin-top: 14px;
  border: 1px solid var(--success-border);
  border-radius: 14px;
  background: var(--success-bg);
  padding: 14px;
  color: var(--success-text);
}

.confirmation-kicker {
  margin: 0 0 4px;
  color: #2d7f4c !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700 !important;
}

.confirmation-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.confirmation-card p {
  margin: 0;
  line-height: 1.45;
}

.confirmation-meta {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.confirmation-meta div {
  margin: 0;
}

.confirmation-meta dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2d7b49;
  margin-bottom: 2px;
}

.confirmation-meta dd {
  margin: 0;
  font-weight: 700;
}

#message {
  margin: 10px 0 0;
  color: #1c7044;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 12px;
  background: #eef9f2;
  border: 1px solid #9ccfb0;
}

#message:empty {
  display: none;
}

#message.error {
  color: #b42318;
  background: #fff3f1;
  border-color: #dfb5b1;
}

#message.success {
  color: #1d6c3f;
  background: #ecf8f0;
  border-color: #92c8a5;
}

body.mode-invalid .panel-header,
body.mode-invalid .mode-notice,
body.mode-invalid .direct-mode-actions {
  display: none;
}

@media (max-width: 680px) {
  .shell {
    padding: 10px 12px 28px;
  }

  .booking-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-overlay {
    padding: 14px;
  }

  .hero {
    position: static;
    border-radius: 14px;
  }

  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .hero-name {
    font-size: clamp(23px, 8vw, 32px);
  }

  .hero h1 {
    font-size: clamp(24px, 8vw, 30px);
  }

  .hero-lead,
  .hero-intro {
    font-size: 13px;
  }

  .availability-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .availability-actions button {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 12px;
  }

  .slug-error-card {
    padding: 18px;
  }

  .confirmation-meta {
    grid-template-columns: 1fr;
  }
}
