:root {
  --hb-green: #0d4f45;
  --hb-green-dark: #083c35;
  --hb-ink: #1f2926;
  --hb-muted: #67736f;
  --hb-line: #dce3df;
  --hb-soft: #f4f7f5;
  --hb-paper: #ffffff;
  --hb-error: #a13030;
  --hb-success: #216b4d;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--hb-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--hb-soft);
  color: var(--hb-ink);
}

button,
select {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.hb-shell {
  width: min(680px, calc(100% - 2rem));
  margin-inline: auto;
}

.hb-header {
  padding: max(1.15rem, env(safe-area-inset-top)) 0 1.15rem;
  background: var(--hb-green);
  color: white;
  text-align: center;
}

.hb-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 6vw, 2.15rem);
  font-weight: 400;
  line-height: 1.1;
}

.hb-header p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hb-checkout {
  padding: 1.25rem 0 max(2rem, env(safe-area-inset-bottom));
}

.hb-panel {
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid var(--hb-line);
  border-radius: 1rem;
  background: var(--hb-paper);
}

.hb-section-title {
  display: block;
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 750;
}

.hb-room-select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 2.75rem 0.75rem 0.9rem;
  border: 1px solid #c9d3ce;
  border-radius: 0.7rem;
  background: white;
  color: var(--hb-ink);
  font-size: 1rem;
}

.hb-room-select:focus-visible,
.hb-quantity-button:focus-visible,
.hb-primary-button:focus-visible,
.hb-secondary-button:focus-visible {
  outline: 3px solid rgba(13, 79, 69, 0.25);
  outline-offset: 2px;
}

.hb-products-section {
  margin-top: 1.5rem;
}

.hb-products-section[hidden],
.hb-payment-section[hidden],
.hb-success[hidden],
.hb-wallet-wrap[hidden] {
  display: none !important;
}

.hb-products-grid {
  display: grid;
  gap: 0.65rem;
}

.hb-product {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  align-items: center;
  min-height: 4.5rem;
  overflow: hidden;
  border: 1px solid var(--hb-line);
  border-radius: 0.8rem;
  background: white;
}

.hb-product-image {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
}

.hb-product-copy {
  min-width: 0;
  padding: 0.65rem 0.75rem;
}

.hb-product h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 680;
  line-height: 1.25;
}

.hb-product-price {
  margin: 0.2rem 0 0;
  color: var(--hb-muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.hb-quantity {
  display: grid;
  grid-template-columns: 2.5rem 1.9rem 2.5rem;
  align-items: center;
  gap: 0.2rem;
  padding-right: 0.65rem;
}

.hb-quantity-button {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
  border: 1px solid #cbd5d0;
  border-radius: 50%;
  background: white;
  color: var(--hb-green);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.hb-quantity-button:hover:not(:disabled) {
  border-color: var(--hb-green);
  background: var(--hb-green);
  color: white;
}

.hb-quantity-button:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.hb-quantity-value {
  text-align: center;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.hb-order-bar {
  position: sticky;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.85rem;
  background: var(--hb-green-dark);
  color: white;
  box-shadow: 0 0.5rem 1.5rem rgba(8, 60, 53, 0.2);
}

.hb-total-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hb-total {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hb-primary-button,
.hb-secondary-button {
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  font-weight: 720;
  cursor: pointer;
}

.hb-primary-button {
  border: 1px solid white;
  background: white;
  color: var(--hb-green-dark);
}

.hb-primary-button:hover:not(:disabled) {
  background: #e9f2ef;
}

.hb-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hb-secondary-button {
  border: 1px solid #cbd5d0;
  background: transparent;
  color: var(--hb-ink);
}

.hb-payment-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hb-line);
}

.hb-payment-section h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.hb-wallet-wrap {
  margin-bottom: 1rem;
}

.hb-payment-lead {
  margin: 0 0 0.7rem;
  color: var(--hb-muted);
  font-size: 0.85rem;
}

.hb-wallet-buttons {
  display: grid;
  gap: 0.65rem;
}

#hb-apple-pay,
#hb-google-pay {
  min-height: 3.25rem;
}

.hb-card-fallback {
  display: grid;
  gap: 0.5rem;
}

.hb-card-button {
  width: 100%;
  border-color: var(--hb-green);
  background: var(--hb-green);
  color: white;
}

.hb-card-button:hover:not(:disabled) {
  background: var(--hb-green-dark);
}

.hb-card-fallback p {
  margin: 0;
  color: var(--hb-muted);
  font-size: 0.76rem;
  line-height: 1.4;
  text-align: center;
}

.hb-separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
  color: var(--hb-muted);
  font-size: 0.78rem;
}

.hb-separator::before,
.hb-separator::after {
  height: 1px;
  background: var(--hb-line);
  content: "";
}

.hb-payment-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.hb-status {
  min-height: 1.3rem;
  margin: 0.7rem 0 0;
  color: var(--hb-muted);
  font-size: 0.85rem;
}

.hb-status.is-error {
  color: var(--hb-error);
}

.hb-status.is-success {
  color: var(--hb-success);
}

.hb-success {
  padding: 2rem 1.25rem;
  border: 1px solid #bcd8ca;
  border-radius: 1rem;
  background: white;
  color: var(--hb-success);
  text-align: center;
}

.hb-pending {
  margin: 0 auto;
  max-width: 36rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgba(28, 83, 65, 0.18);
  border-radius: 1rem;
  background: #fff;
  text-align: center;
}

.hb-pending h2 {
  margin-top: 0;
}

.hb-wallet-wrap.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.hb-success h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.hb-success p {
  margin: 0;
}

.hb-noscript {
  margin: 1rem 0 0;
  padding: 0.8rem;
  border-radius: 0.7rem;
  background: #fff4da;
}

@media (max-width: 520px) {
  .hb-shell {
    width: min(100% - 1rem, 680px);
  }

  .hb-checkout {
    padding-top: 0.5rem;
  }

  .hb-panel {
    padding: 0.85rem;
    border-radius: 0.8rem;
  }

  .hb-product {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    min-height: 4rem;
  }

  .hb-product-image {
    width: 4rem;
    height: 4rem;
  }

  .hb-product-copy {
    padding-inline: 0.6rem;
  }

  .hb-product h3 {
    font-size: 0.88rem;
  }

  .hb-quantity {
    grid-template-columns: 2.35rem 1.6rem 2.35rem;
    padding-right: 0.45rem;
  }

  .hb-quantity-button {
    width: 2.35rem;
    height: 2.35rem;
  }

  .hb-order-bar {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .hb-order-bar > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }

  .hb-payment-actions {
    display: block;
  }

  .hb-payment-actions .hb-secondary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
