.reservation-card {
  container-name: reservation-card;
  container-type: inline-size;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 88%);
  border-radius: 1rem;
  background: rgb(252 253 250 / 96%);
  box-shadow: 0 22px 54px rgb(15 40 33 / 24%), 0 2px 8px rgb(15 40 33 / 8%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@media (min-width: 701px) {
  .reservation-card {
    width: 81%;
    justify-self: end;
  }

  .reservation-form {
    gap: 0.3rem;
  }

  .reservation-heading {
    padding-block: 0.45rem;
  }

  .reservation-heading-copy > p:last-child {
    margin-top: 0.15rem;
  }

  .reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]),
  .reservation-message-field textarea {
    min-height: 2.45rem;
    height: 2.45rem;
    padding-block: 0.35rem;
  }

  .reservation-date-field {
    min-height: 2.7rem;
  }

  .reservation-date-field input {
    min-height: 2rem;
  }

  .reservation-counter,
  .reservation-counter-controls,
  .reservation-counter-controls input,
  .reservation-counter-controls button {
    min-height: 2.45rem;
  }

  .reservation-counter-controls button {
    width: 2rem;
    height: 2rem;
  }

  .reservation-terms,
  .reservation-note {
    font-size: 0.68rem;
  }

  .reservation-submit {
    min-height: 2.5rem;
  }
}

.reservation-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

.reservation-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgb(23 60 54 / 10%);
  background:
    radial-gradient(ellipse at 100% 0, rgb(255 255 255 / 34%), transparent 50%),
    linear-gradient(115deg, #f8dd86, #f3c64e);
  color: #173c36;
}

.reservation-heading-copy {
  min-width: 0;
}

.reservation-heading-eyebrow {
  margin: 0 0 0.16rem;
  color: #6d642f;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.reservation-heading h2 {
  margin: 0;
  font-size: clamp(1.12rem, 1.6vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.reservation-heading-copy > p:last-child {
  margin: 0.3rem 0 0;
  color: #4e5e4d;
  font-size: 0.68rem;
  line-height: 1.4;
}

.reservation-form {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem;
}

.reservation-form-section {
  display: grid;
  gap: 0.5rem;
}

.reservation-form-section:nth-child(2) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reservation-section-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #2d5542;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.reservation-section-label > span {
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 50%;
  color: #276b4d;
  background: #e8f1e8;
  font-size: 0.56rem;
  font-weight: 800;
}

.reservation-contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.6rem;
}

.reservation-contact-fields .reservation-field:first-child {
  grid-column: 1 / -1;
}

.reservation-field {
  display: grid;
  min-width: 0;
  gap: 0.28rem;
}

.reservation-field > label,
.reservation-counter > label {
  color: #40594e;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.reservation-field > label > span {
  color: #75827d;
  font-weight: 400;
}

.reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]),
.reservation-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d2ded6;
  border-radius: 0.55rem;
  outline: none;
  background: #fff;
  color: #243d35;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.reservation-form input::placeholder,
.reservation-form textarea::placeholder {
  color: #87948e;
  opacity: 1;
}

.reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]):hover,
.reservation-form textarea:hover {
  border-color: #afc4b8;
}

.reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]):focus,
.reservation-form textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(36 103 79 / 12%);
}

.reservation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 0.6rem;
}

.reservation-date-field {
  min-width: 0;
  min-height: 4.15rem;
  margin: 0;
  padding: 0.15rem 0.65rem 0.35rem;
  border: 1px solid #d2ded6;
  border-radius: 0.55rem;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.reservation-date-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(36 103 79 / 11%);
}

.reservation-date-field legend {
  max-width: 100%;
  margin-left: 0.1rem;
  padding-inline: 0.2rem;
  background: #f8faf8;
  color: #40594e;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
}

.reservation-required {
  color: #a63b32;
  font-weight: 700;
}

.reservation-date-field input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.15rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #243d35;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.2;
  color-scheme: light;
}

.reservation-date-field input:focus {
  box-shadow: none;
}

.reservation-guest-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.reservation-date-fields {
  grid-template-columns: minmax(0, 1fr);
}

.reservation-counter {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.reservation-counter-controls {
  display: flex;
  min-width: 0;
  align-self: stretch;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.2rem 0.3rem;
  border: 1px solid #d2ded6;
  border-radius: 0.55rem;
  background: #fff;
}

.reservation-counter-controls button {
  display: grid;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--brand-deep);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  transition: background-color 160ms ease;
}

.reservation-counter-controls button:hover {
  background: #e2eee6;
}

.reservation-counter-controls input {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #243d35;
  font: inherit;
  font-size: 0.7rem;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.reservation-counter-controls input::placeholder {
  color: #78847e;
  opacity: 1;
}

.reservation-counter-controls input::-webkit-inner-spin-button,
.reservation-counter-controls input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.reservation-terms {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.6rem;
  color: #5d6e66;
  font-size: 0.78rem;
  line-height: 1.5;
}

.reservation-terms input {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.08rem 0 0;
  accent-color: var(--brand);
}

.reservation-terms a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration-color: #a7bdb0;
  text-underline-offset: 0.16em;
}

.reservation-message-field textarea {
  min-height: 5.2rem;
  resize: vertical;
}

.reservation-submit {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 0.6rem;
  background: linear-gradient(110deg, #31875f, #26734f);
  box-shadow: 0 5px 12px rgb(36 103 79 / 17%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.reservation-submit svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  transition: transform 160ms ease;
}

.reservation-submit:hover {
  box-shadow: 0 7px 16px rgb(36 103 79 / 24%);
  transform: translateY(-1px);
}

.reservation-submit:hover svg {
  transform: translate(2px, -2px);
}

.reservation-submit:focus-visible,
.reservation-counter-controls button:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 2px;
}

.reservation-note {
  margin: 0;
  color: #65756c;
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

@container reservation-card (min-width: 24rem) {
  .reservation-heading {
    padding: 0.7rem 0.85rem;
  }

  .reservation-form {
    grid-template:
      "guest guest" auto
      "stay stay" auto
      "terms terms" auto
      "message message" auto
      "submit submit" auto
      "note note" auto
      / minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    align-content: space-between;
    gap: 0.3125rem 0.65rem;
    padding: 0.3125rem 0.75rem;
  }

  .reservation-form > .reservation-form-section:first-child {
    grid-area: guest;
  }

  .reservation-form > .reservation-form-section:nth-child(2) {
    grid-area: stay;
  }

  .reservation-form > .reservation-terms {
    grid-area: terms;
  }

  .reservation-form > .reservation-message-field {
    grid-area: message;
  }

  .reservation-form > .reservation-submit {
    grid-area: submit;
    min-height: 3rem;
    padding-block: 0.6rem;
  }

  .reservation-form > .reservation-note {
    grid-area: note;
    display: block;
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.2;
    text-align: center;
  }

  .reservation-form-section {
    gap: 0.35rem;
  }

  .reservation-contact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .reservation-contact-fields .reservation-field:first-child {
    grid-column: 1 / -1;
  }

  .reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]) {
    min-height: 3rem;
    padding-block: 0.55rem;
    font-size: 0.95rem;
  }

  .reservation-date-field {
    min-height: 4rem;
    padding: 0.1rem 0.45rem 0.2rem;
  }

  .reservation-date-field input {
    min-height: 3rem;
    font-size: 0.95rem;
  }

  .reservation-counter {
    min-height: 3rem;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .reservation-counter-controls {
    flex: 1 1 auto;
    gap: 0.3rem;
    padding: 0.2rem 0.35rem;
  }

  .reservation-counter-controls button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .reservation-counter-controls input {
    width: 0;
    min-width: 0;
    min-height: 2.75rem;
    font-size: 0.95rem;
  }

  .reservation-message-field textarea {
    height: 4rem;
    min-height: 4rem;
    padding-block: 0.55rem;
    font-size: 0.95rem;
  }

}

@container reservation-card (min-width: 26rem) {
  .reservation-form > .reservation-form-section:nth-child(2) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container reservation-card (max-width: 23.99rem) {
  .reservation-guest-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .reservation-counter-icon {
    display: none;
  }

  .reservation-counter-controls {
    flex: 1 1 auto;
    align-self: auto;
    width: 100%;
    justify-content: space-between;
    gap: 0;
    padding: 0.15rem;
  }

  .reservation-counter-controls button {
    width: 1.75rem;
    height: 1.75rem;
  }

  .reservation-counter-controls input {
    width: 0;
    min-width: 0;
    min-height: 2rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 700px) {
  .reservation-card {
    width: min(100%, 34rem);
    justify-self: center;
  }

  .reservation-form {
    gap: 0.9rem;
    padding: 1rem;
  }

  .reservation-contact-fields {
    gap: 0.7rem;
  }
}

@media (max-width: 430px) {
  .reservation-heading {
    padding: 0.8rem 0.85rem;
  }

  .reservation-form {
    padding: 0.85rem;
  }

}

@media (min-width: 701px) {
  .reservation-card {
    display: flex;
    flex-direction: column;
    border-color: rgb(255 255 255 / 96%);
    box-shadow:
      0 20px 50px rgb(15 40 33 / 24%),
      0 4px 16px rgb(194 155 48 / 10%),
      inset 0 1px 0 rgb(255 255 255 / 88%);
  }

  .reservation-heading {
    position: relative;
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    align-items: center;
    padding: 0 2.75rem 0 1.75rem;
    background:
      linear-gradient(90deg, #ffe7a3 0%, #ffd45f 100%);
  }

  .reservation-heading-eyebrow {
    position: relative;
    z-index: 1;
    display: block;
    margin: 0;
    color: #6a704f;
    font-size: 0.54rem;
    letter-spacing: 0.16em;
    line-height: 1;
  }

  .reservation-heading::before {
    content: "";
    position: absolute;
    right: 0.56rem;
    width: 1.72rem;
    height: 1.72rem;
    border: 1px solid rgb(99 111 69 / 22%);
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.3rem rgb(255 255 255 / 24%);
  }

  .reservation-heading::after {
    content: "";
    position: absolute;
    right: 0.02rem;
    top: 50%;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid rgb(91 111 76 / 10%);
    border-radius: 50%;
    transform: translateY(-50%);
  }

  .reservation-heading h2 {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    color: #245b61;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-align: left;
  }

  .reservation-heading-mark {
    position: absolute;
    z-index: 2;
    right: 0.7rem;
    top: 50%;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgb(38 108 79 / 52%);
    border-radius: 0.42rem;
    background: rgb(255 255 255 / 34%);
    transform: translateY(-50%);
  }

  .reservation-heading-mark::before,
  .reservation-heading-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.95rem;
    height: 0.95rem;
    border: 1px solid #2f765d;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .reservation-heading-mark::after {
    width: 0.4rem;
    height: 0.4rem;
    border: 0;
    border-radius: 50%;
    background: #2f765d;
    box-shadow:
      0 -0.52rem 0 -0.08rem #2f765d,
      0 0.52rem 0 -0.08rem #2f765d,
      0.52rem 0 0 -0.08rem #2f765d,
      -0.52rem 0 0 -0.08rem #2f765d;
  }

  .reservation-form {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    row-gap: 0;
    flex: 1;
    padding: 0.375rem 0.65rem;
    background:
      radial-gradient(circle at 100% 100%, rgb(243 198 78 / 7%), transparent 34%),
      linear-gradient(180deg, rgb(252 253 250 / 96%), rgb(247 250 247 / 98%));
  }

  .reservation-fields {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    flex: 1;
    min-height: 0;
  }

  .reservation-travel-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
    width: 100%;
  }

  .reservation-form-section {
    width: 100%;
    gap: 0.375rem;
  }

  .reservation-contact-fields {
    position: relative;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem 0.375rem;
  }

  .reservation-contact-fields::after {
    content: none;
  }

  .reservation-contact-fields .reservation-field:first-child {
    grid-column: 1 / -1;
  }

  .reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]) {
    min-height: 38px;
    height: 38px;
    border-radius: 0.4rem;
    padding: 0.45rem 0.68rem;
    border-color: #d5e1da;
    background: linear-gradient(180deg, #fff, #fafcfb);
    font-size: 0.78rem;
  }

  #reservation-name {
    min-height: 38px;
    height: 38px;
  }

  .reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"])::placeholder {
    color: #829188;
    font-weight: 550;
  }

  .reservation-form input:not([type="checkbox"]):not([type="number"]):not([type="date"]):focus,
  .reservation-message-field textarea:focus,
  .reservation-date-field:focus-within,
  .reservation-counter-controls:focus-within {
    border-color: #4f9476;
    box-shadow: 0 0 0 2px rgb(36 103 79 / 9%), 0 5px 12px rgb(36 103 79 / 7%);
    background: #fff;
  }

  .reservation-date-field {
    display: flex;
    align-items: center;
    min-height: 38px;
    height: 38px;
    border-radius: 0.38rem;
    padding: 0 0.55rem;
    border-color: #d5e1da;
    background: linear-gradient(180deg, #fff, #fcfdfc);
  }

  .reservation-date-field legend {
    margin-left: 0.1rem;
    padding: 0 0.2rem;
    background: #fff;
    color: #7b899f;
    font-size: 0.58rem;
    line-height: 1;
  }

  .reservation-date-field input {
    min-height: 38px;
    height: 38px;
    font-size: 0.76rem;
  }

  .reservation-terms,
  .reservation-message-field,
  .reservation-form > .reservation-submit {
    width: 100%;
  }

  .reservation-counter {
    min-height: 38px;
    height: 38px;
  }

  .reservation-counter-controls {
    gap: 0.25rem;
    min-height: 38px;
    height: 38px;
    border-radius: 0.5rem;
    padding: 0.1rem 0.25rem;
    border-color: #d5e1da;
    background: linear-gradient(180deg, #fff, #fcfdfc);
  }

  .reservation-counter-controls button {
    color: #2d7258;
    min-height: 1.55rem;
    height: 1.55rem;
    width: 1.55rem;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .reservation-counter-controls button:hover {
    color: #174c3d;
    background: #edf5f0;
    transform: scale(1.05);
  }

  .reservation-counter-controls button {
    width: 1.55rem;
    height: 1.55rem;
  }

  .reservation-counter-controls input {
    min-height: 38px;
    height: 38px;
    font-size: 0.72rem;
  }

  .reservation-message-field textarea {
    height: 4.1125rem;
    min-height: 4.1125rem;
    border-radius: 0.38rem;
    padding: 0.45rem 0.6rem;
    border-color: #d5e1da;
    background: linear-gradient(180deg, #fff, #fcfdfc);
    font-size: 0.76rem;
  }

  .reservation-form > .reservation-submit {
    position: relative;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 12%);
    background:
      linear-gradient(110deg, rgb(255 255 255 / 8%), transparent 45%),
      linear-gradient(105deg, #3d9870, #236b4f);
    box-shadow: 0 8px 18px rgb(36 103 79 / 20%), inset 0 1px 0 rgb(255 255 255 / 20%);
    font-weight: 800;
    letter-spacing: 0.01em;
  }

  .reservation-form > .reservation-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgb(255 255 255 / 14%) 48%, transparent 72%);
    transform: translateX(-120%);
    transition: transform 480ms ease;
  }

  .reservation-form > .reservation-submit:hover::after {
    transform: translateX(120%);
  }

  .reservation-form > .reservation-submit span,
  .reservation-form > .reservation-submit svg {
    position: relative;
    z-index: 1;
  }

  .reservation-form > .reservation-submit {
    min-height: 2.5rem;
    height: 2.5rem;
    border-radius: 0.38rem;
    padding-block: 0.4rem;
    font-size: 0.76rem;
  }

  .reservation-terms {
    gap: 0.45rem;
    align-items: center;
    font-size: 0.62rem;
    line-height: 1.3;
  }

  .reservation-terms input {
    width: 0.875rem;
    height: 0.875rem;
    margin: 0;
    border: 1.5px solid #3d8466;
    border-radius: 0.28rem;
    appearance: none;
    -webkit-appearance: none;
    background-color: #edf6f1;
    box-shadow: inset 0 1px 2px rgb(25 72 55 / 5%), 0 1px 2px rgb(25 72 55 / 5%);
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  }

  .reservation-terms input:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgb(36 103 79 / 8%), 0 2px 5px rgb(25 72 55 / 8%);
    transform: translateY(-0.5px);
  }

  .reservation-terms input:checked {
    border-color: var(--brand);
    background-color: var(--brand);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.2 4.8 8.5 9.7 3.5' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.78rem;
    box-shadow: 0 2px 5px rgb(36 103 79 / 18%);
    transform: scale(1.02);
  }

  .reservation-terms input:focus-visible {
    outline: 2px solid rgb(36 103 79 / 38%);
    outline-offset: 2px;
  }

  .reservation-note {
    display: block;
    margin: 0;
    color: #647269;
    font-size: 0.58rem;
    line-height: 1.25;
    text-align: center;
    text-wrap: balance;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reservation-form input,
  .reservation-form textarea,
  .reservation-counter-controls button,
  .reservation-submit,
  .reservation-submit svg {
    transition: none;
  }
}
