:root {
  color-scheme: dark;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --gold: #d7b16d;
  --gold-deep: #a97c35;
  --ink: #13151a;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.76);
  --line: rgba(255, 255, 255, 0.2);
  --danger: #ffb3a9;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #edf3fa;
  color: #354253;
}

button,
input,
select {
  font: inherit;
}

.booking-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: #edf3fa;
}

.home-screen {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.home-screen.is-hidden {
  display: none;
}

.booking-page::after {
  content: none;
}

.booking-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    calc(14px + env(safe-area-inset-top)) 16px
    calc(24px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 0 0 1px rgba(168, 182, 198, 0.34);
}

.form-hero {
  display: block;
  width: calc(100% + 32px);
  margin:
    calc(-14px - env(safe-area-inset-top)) -16px 0;
  aspect-ratio: 1200 / 830;
  object-fit: cover;
  object-position: center top;
}

.booking-form {
  width: 100%;
  padding: 28px 22px 0;
  background: #fff;
}

.field + .field {
  margin-top: 10px;
}

.field {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 6px;
  align-items: center;
}

.field label {
  display: block;
  height: 38px;
  color: #5f6874;
  font-size: 16px;
  font-weight: 500;
  line-height: 38px;
  text-align: left;
  white-space: nowrap;
}

.field label span {
  color: #8f5630;
}

.field input,
.field select,
.select-trigger {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: #354253;
  font-size: 16px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field select,
.select-trigger {
  appearance: none;
  padding-right: 28px;
  font-size: 16px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%238f969f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 14px 8px;
  color: #969da7;
}

.select-trigger {
  font-size: 15px;
}

.field select:valid,
.select-trigger:not(.is-placeholder) {
  color: #354253;
}

.model-select {
  position: relative;
}

.select-trigger {
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.select-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 4;
  display: none;
  max-height: min(356px, 58vh);
  overflow-y: auto;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  -webkit-overflow-scrolling: touch;
}

.select-menu[hidden] {
  display: none;
}

.model-select.is-open .select-menu {
  display: block;
}

.select-group {
  margin: 0;
  padding: 7px 11px 3px;
  color: #a2a9b2;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.select-option {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  background: transparent;
  color: #354253;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.select-option:active {
  background: #f4f6f8;
}

.field select option {
  color: #354253;
  font-weight: 400;
}

.field select option[value=""] {
  color: #969da7;
}

.field select optgroup {
  color: #a2a9b2;
  font-weight: 700;
}

.field select optgroup option {
  color: #354253;
  font-weight: 400;
}

.field input::placeholder {
  color: #a0a5ad;
}

.field input:focus,
.field select:focus,
.select-trigger:focus {
  border-color: #f29356;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(242, 147, 86, 0.18);
}

.field.is-error input,
.field.is-error select,
.field.is-error .select-trigger {
  border-color: rgba(255, 136, 124, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 136, 124, 0.18);
}

.field-error {
  grid-column: 2;
  display: none;
  margin: 4px 0 -2px;
  color: #d4513e;
  font-size: 12px;
  line-height: 1.2;
}

.field.is-error .field-error {
  display: block;
}

.submit-button {
  display: block;
  width: 154px;
  height: 40px;
  margin: 28px auto 0;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffa768 0%, #f0874b 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow:
    0 0 0 3px #fff,
    0 13px 24px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.submit-button:active {
  transform: translateY(1px);
  filter: brightness(0.94);
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.booking-form.is-hidden {
  display: none;
}

.success-panel {
  display: none;
  padding: 42px 16px 0;
  color: #354253;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.success-panel.is-visible {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 2;
  max-width: min(88vw, 420px);
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-height: 620px) {
  .booking-shell {
    padding-top: calc(10px + env(safe-area-inset-top));
  }

  .booking-form {
    padding-top: 22px;
  }
}

@media (max-width: 360px) {
  .booking-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .form-hero {
    width: calc(100% + 24px);
    margin-right: -12px;
    margin-left: -12px;
  }

  .booking-form {
    padding-right: 14px;
    padding-left: 14px;
  }

  .field {
    grid-template-columns: 70px minmax(0, 1fr);
    column-gap: 6px;
  }

  .field label,
  .field input,
  .field select {
    font-size: 15px;
  }
}
