/* Product surfaces — layered on marketing styles.css tokens. */

:root {
  --hm-radius: 14px;
  --hm-radius-lg: 20px;
  --hm-card: #fffdf9;
  --hm-shadow: 0 12px 40px rgba(31, 28, 24, 0.08);
  --hm-danger: #c0392b;
  --hm-transition: 180ms ease;
}

.hm-page {
  padding: 32px 0 80px;
  min-height: calc(100vh - 72px);
}

.hm-page-header {
  margin-bottom: 28px;
}

.hm-page-header h1 {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.hm-page-header p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

.hm-nav-auth {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hm-nav-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.hm-nav-link:hover,
.hm-nav-link.is-active {
  color: var(--sage);
}

.hm-nav-signin {
  white-space: nowrap;
}

.hm-account {
  position: relative;
}

.hm-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.hm-account-btn:hover,
.hm-account-btn.is-active,
.hm-account.is-open .hm-account-btn {
  border-color: var(--sage);
  color: var(--sage);
}

.hm-account-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.hm-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--hm-shadow);
  z-index: 80;
  display: grid;
  gap: 2px;
}

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

.hm-account-menu a,
.hm-account-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.hm-account-menu a:hover,
.hm-account-menu button:hover {
  background: rgba(74, 103, 65, 0.08);
  color: var(--sage);
}

.hm-account-menu .hm-account-switch {
  color: var(--ink);
  font-weight: 500;
  border: 0;
  border-radius: 8px;
  margin: 0;
  padding: 9px 12px;
}

.hm-account-menu [data-signout] {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  border-radius: 0 0 8px 8px;
}

.hm-drawer-switch {
  font-weight: 600;
  color: var(--sage) !important;
}

.hm-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.hm-chef-card,
.hm-dish-card,
.hm-booking-card,
.hm-panel {
  background: var(--hm-card);
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius-lg);
  overflow: hidden;
  transition: transform var(--hm-transition), box-shadow var(--hm-transition);
}

a.hm-chef-card:hover,
a.hm-dish-card:hover,
a.hm-booking-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hm-shadow);
  color: inherit;
}

a.hm-dish-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hm-chef-card-media,
.hm-dish-card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8dfd2, #d5cbbd);
  position: relative;
  overflow: hidden;
}

.hm-chef-card-media img,
.hm-dish-card-media img,
.hm-chef-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-chef-card-media img.is-broken,
.hm-dish-card-media img.is-broken {
  opacity: 0;
}

.hm-chef-card-body,
.hm-dish-card-body,
.hm-booking-card-body {
  padding: 16px 18px 18px;
}

.hm-chef-card h2,
.hm-dish-card h3,
.hm-booking-card h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 600;
}

.hm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hm-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--sage-soft);
  color: var(--sage);
}

.hm-badge-status {
  background: #f0ebe3;
  color: var(--ink);
}

.hm-badge-status.is-requested { background: #fff3d6; color: #8a5a00; }
.hm-badge-status.is-quoted { background: #fff3d6; color: #8a5a00; }
.hm-badge-status.is-accepted,
.hm-badge-status.is-shopping,
.hm-badge-status.is-on-way,
.hm-badge-status.is-arrived,
.hm-badge-status.is-in-progress { background: var(--sage-soft); color: var(--sage); }
.hm-badge-status.is-declined,
.hm-badge-status.is-cancelled,
.hm-badge-status.is-expired { background: #fde8e6; color: var(--hm-danger); }
.hm-badge-status.is-completed { background: #e8f0ec; color: #2f5d4c; }

.hm-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.hm-timeline-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  position: relative;
  padding-bottom: 14px;
}

.hm-timeline-step:last-child {
  padding-bottom: 0;
}

.hm-timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--hairline);
}

.hm-timeline-step.is-done:not(:last-child)::before,
.hm-timeline-step.is-current:not(:last-child)::before {
  background: rgba(59, 120, 102, 0.35);
}

.hm-timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  background: #fff;
  margin-top: 1px;
  box-sizing: border-box;
}

.hm-timeline-step.is-done .hm-timeline-dot {
  border-color: var(--sage);
  background: var(--sage);
}

.hm-timeline-step.is-current .hm-timeline-dot {
  border-color: var(--sage);
  background: #fff;
  box-shadow: inset 0 0 0 4px var(--sage);
}

.hm-timeline-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  padding-top: 1px;
}

.hm-timeline-step.is-done .hm-timeline-label {
  color: var(--ink);
}

.hm-timeline-step.is-current .hm-timeline-label {
  color: var(--sage);
  font-weight: 650;
}

.hm-status-note {
  border-left: 3px solid var(--sage);
}

.hm-continue-app {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-header:not(.site-header--chef) .hm-continue-app,
.hm-page .hm-continue-app {
  border-color: var(--hairline);
  background: #fff;
  color: var(--sage);
}


.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--hm-radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--hm-transition), color var(--hm-transition), border-color var(--hm-transition);
}

.hm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hm-btn-primary {
  background: var(--sage);
  color: #fff;
}

.hm-btn-primary:hover:not(:disabled) {
  background: #326957;
}

.hm-btn-ghost {
  background: var(--canvas);
  border-color: var(--hairline);
  color: var(--ink);
}

.hm-btn-danger {
  background: var(--hm-danger);
  color: #fff;
}

.hm-btn-block {
  width: 100%;
}

.hm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.hm-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.hm-field input,
.hm-field textarea,
.hm-field select {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.hm-field textarea {
  min-height: 110px;
  resize: vertical;
}

.hm-field input:focus,
.hm-field textarea:focus,
.hm-field select:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

.hm-error {
  color: var(--hm-danger);
  font-size: 0.92rem;
  margin: 8px 0 0;
}

.hm-muted {
  color: var(--muted);
}

.hm-skeleton {
  background: linear-gradient(90deg, #efe8dc 25%, #f7f2ea 50%, #efe8dc 75%);
  background-size: 200% 100%;
  animation: hm-shimmer 1.2s ease infinite;
  border-radius: var(--hm-radius);
  min-height: 18px;
}

@keyframes hm-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hm-toast-host {
  position: fixed;
  z-index: 80;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.hm-toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--hm-shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--hm-transition), transform var(--hm-transition);
  max-width: 320px;
  font-size: 0.92rem;
}

.hm-toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hm-toast-success { background: #2f5d4c; }
.hm-toast-error { background: var(--hm-danger); }

.hm-confirm {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.42);
  display: grid;
  place-items: center;
  padding: 24px;
}

.hm-confirm-card {
  width: min(360px, 100%);
  background: var(--hm-card);
  border-radius: 22px;
  border: 1px solid var(--hairline);
  padding: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.hm-confirm-card h2 {
  margin: 0 0 8px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 1.25rem;
}

.hm-confirm-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.hm-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Address-first hero (Uber pattern) */
.hm-hero-address {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  max-width: 460px;
}

.hm-address-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.hm-hero-address input {
  width: 100%;
  min-height: 52px;
  padding: 12px 44px 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
  box-sizing: border-box;
}

.hm-hero-address input:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

.hm-address-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hm-address-clear:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.hm-hero-address .button {
  border-radius: var(--hm-radius);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .hm-hero-address {
    flex-direction: column;
  }
}

/* Address typeahead dropdown (mounted on <body>, fixed — always on top) */
.hm-autocomplete {
  position: fixed;
  z-index: 10000;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 280px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.hm-autocomplete-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: pan-y;
}

.hm-autocomplete-item:hover,
.hm-autocomplete-item.is-active {
  background: rgba(107, 127, 106, 0.12);
}

.hm-autocomplete-item + .hm-autocomplete-item {
  border-top: 1px solid var(--hairline);
}

.hm-address-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  max-width: 640px;
}

.hm-chef-card.is-teaser {
  cursor: pointer;
}

.hm-chef-card.is-teaser:hover {
  transform: translateY(-2px);
  box-shadow: var(--hm-shadow);
}

/* Auth */
.hm-auth-card {
  width: min(420px, 100%);
  margin: 40px auto;
  padding: 28px;
  background: var(--hm-card);
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius-lg);
  box-shadow: var(--hm-shadow);
}

.hm-auth-card h1 {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 1.7rem;
  margin: 0 0 8px;
}

.hm-auth-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 28px 0 8px;
  text-align: center;
  color: var(--muted, #666);
  font-size: 0.95rem;
}

.hm-auth-pending[hidden] {
  display: none;
}

.hm-auth-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--hairline, #e5e2dc);
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: hm-auth-spin 0.7s linear infinite;
}

@keyframes hm-auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.hm-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.hm-auth-divider::before,
.hm-auth-divider::after {
  content: "";
  height: 1px;
  background: var(--hairline);
}

.hm-code-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 600;
}

/* Chef profile */
.hm-chef-hero {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 800px) {
  .hm-chef-hero {
    grid-template-columns: 1.1fr 1fr;
    align-items: end;
  }
}

.hm-chef-hero-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--hm-radius-lg);
  overflow: hidden;
  background: #e8dfd2;
}

.hm-chef-hero-copy h1 {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 10px;
}

/* Dish detail */
.hm-dish-detail {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}

@media (min-width: 800px) {
  .hm-dish-detail {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}

.hm-dish-detail-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--hm-radius-lg);
  overflow: hidden;
  background: #e8dfd2;
}

.hm-dish-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hm-dish-detail-copy h1 {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0;
}

.hm-dish-detail-desc {
  margin: 0 0 20px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--hm-ink, #1c1917);
}

.hm-dish-detail-chef {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 12px 0;
  border-top: 1px solid var(--hm-hairline, rgba(0, 0, 0, 0.08));
  border-bottom: 1px solid var(--hm-hairline, rgba(0, 0, 0, 0.08));
  margin-bottom: 8px;
}

.hm-dish-detail-chef-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8dfd2;
  flex-shrink: 0;
}

.hm-dish-detail-chef-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hm-sticky-cta {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  margin-top: 24px;
}

.hm-sticky-cta .hm-btn {
  box-shadow: var(--hm-shadow);
}

/* Booking stepper */
.hm-book-layout {
  display: grid;
  gap: 24px;
}

@media (min-width: 960px) {
  .hm-book-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .hm-book-summary {
    position: sticky;
    top: 88px;
  }
}

.hm-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hm-step-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #efe8dc;
  color: var(--muted);
}

.hm-step-pill.is-active {
  background: var(--sage);
  color: #fff;
}

.hm-step-pill.is-done {
  background: var(--sage-soft);
  color: var(--sage);
}

.hm-meal-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  background: #fff;
  margin-bottom: 10px;
}

.hm-meal-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #e8dfd2;
}

.hm-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px;
  background: var(--canvas);
}

.hm-stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
}

.hm-stepper span {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.hm-window-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hm-window-chip {
  border: 1px solid var(--hairline);
  background: #fff;
  border-radius: var(--hm-radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  font: inherit;
}

.hm-window-chip.is-selected {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage);
  font-weight: 600;
}

.hm-window-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hm-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.hm-cal-head {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}

.hm-cal-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
}

.hm-cal-day.is-muted { color: #c4bbb0; cursor: default; }
.hm-cal-day.is-off { color: #c4bbb0; text-decoration: line-through; cursor: default; }
.hm-cal-day.is-full { background: #fde8e6; color: var(--hm-danger); cursor: default; }
.hm-cal-day.is-partial { background: #fff3d6; }
.hm-cal-day.is-open { background: #fff; border-color: var(--hairline); }
.hm-cal-day.is-selected {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
  font-weight: 700;
}

.hm-price-lines {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.hm-price-lines .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hm-price-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
}

.hm-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 22px;
}

.hm-browse-toolbar .hm-segmented {
  margin-bottom: 0;
}

.hm-browse-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex: 1 1 320px;
  max-width: 520px;
}

.hm-browse-controls .hm-field {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 640px) {
  .hm-browse-controls {
    max-width: none;
    flex-basis: 100%;
  }
}

.hm-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.hm-tag-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hm-tag-add input {
  flex: 1 1 auto;
  min-width: 0;
}

.hm-see-more-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 8px;
}

.hm-segmented {
  display: inline-flex;
  padding: 4px;
  background: #efe8dc;
  border-radius: 999px;
  gap: 4px;
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .hm-segmented {
    width: 100%;
  }

  .hm-segmented button {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.92rem;
  }
}

.hm-segmented button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.hm-segmented button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hm-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--hairline);
  border-radius: var(--hm-radius-lg);
}

.hm-sides-allowed {
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  display: grid;
  gap: 8px;
}

.hm-sides-allowed legend {
  padding: 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hm-sides-allowed label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.95rem;
}

.hm-menu-subnav {
  display: flex;
  gap: 8px;
  margin: -8px 0 20px;
}

.hm-menu-subnav a,
.hm-menu-subnav button {
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}

.hm-menu-subnav a.is-active,
.hm-menu-subnav button.is-active {
  background: rgba(74, 103, 65, 0.12);
  color: var(--sage);
}

.hm-menu-subnav a:hover,
.hm-menu-subnav button:hover {
  color: var(--sage);
}

.hm-nav-primary {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}

.hm-nav-primary-link {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: inherit;
  opacity: 0.85;
  text-decoration: none;
}

.hm-nav-primary-link:hover,
.hm-nav-primary-link.is-active {
  opacity: 1;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
}

.hm-nav-primary-later {
  padding: 5px 10px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.4;
  cursor: default;
}

/* Fresh sage chef portal chrome */
.site-header--chef {
  background: #1f6b56;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-header--chef.is-scrolled {
  background: #1a5c49;
}

.site-header--chef .brand,
.site-header--chef .brand:hover,
.site-header--chef .hm-nav-link,
.site-header--chef .hm-nav-link:hover {
  color: #fff;
}

.site-header--chef .nav-menu-btn {
  color: #fff;
}

.site-header--chef .nav-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.site-header--chef .hm-account-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.site-header--chef .hm-account-btn:hover,
.site-header--chef .hm-account.is-open .hm-account-btn,
.site-header--chef .hm-account-btn.is-active {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  color: #fff;
}

.site-header--chef .hm-nav-primary-link:hover,
.site-header--chef .hm-nav-primary-link.is-active {
  background: rgba(255, 255, 255, 0.14);
}

.site-header--chef .nav-drawer {
  background: #1f6b56;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-header--chef .nav-drawer-links a,
.site-header--chef .nav-drawer-links button {
  color: #fff;
}

.site-header--chef .hm-drawer-switch {
  color: #d8f3e8 !important;
}

@media (min-width: 820px) {
  .site-header--chef .hm-nav-primary {
    display: flex;
  }

  .site-header--chef .nav-menu-btn {
    display: none;
  }
}

.hm-portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hm-portal-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.hm-portal-nav a.is-active,
.hm-portal-nav a:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.hm-portal-nav-later {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px dashed var(--hairline);
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: default;
}

.hm-portal-later-card {
  opacity: 0.72;
  border-style: dashed;
}

.hm-menu-header {
  margin-bottom: 28px;
}

.hm-menu-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hm-menu-title-row h1 {
  margin: 0;
}

.hm-add-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sage);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.hm-add-btn:hover {
  filter: brightness(0.95);
  color: #fff;
}

.hm-thumb-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background-color: #e8dfd2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' stroke='%239a9084' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='22' height='18' rx='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Cpath d='M3 19l6-6 4 4 5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.hm-table-row img,
.hm-table-row .hm-dish-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background-color: #e8dfd2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' stroke='%239a9084' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='22' height='18' rx='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Cpath d='M3 19l6-6 4 4 5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.hm-table-row img.is-broken,
.hm-dish-thumb.is-broken {
  /* Keep the slot; show placeholder art instead of a broken-image icon */
  object-position: -9999px;
  visibility: visible;
}

.hm-table-row-link {
  text-decoration: none;
  color: inherit;
}

.hm-table-row-link:hover {
  border-color: var(--sage);
}

.hm-dish-edit-preview {
  margin-bottom: 10px;
}

.hm-dish-edit-preview img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.hm-grocery-section {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.hm-grocery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.hm-grocery-heading h2 {
  margin: 0;
  font-size: 1.1rem;
}

.hm-grocery-list {
  display: grid;
  gap: 12px;
}

.hm-grocery-row {
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  background: #fff;
}

.hm-grocery-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hm-grocery-name {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.hm-grocery-warn {
  font-size: 0.78rem;
  color: #b45309;
}

.hm-grocery-controls {
  display: grid;
  gap: 10px;
}

.hm-seg {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow: hidden;
  width: fit-content;
}

.hm-seg-btn {
  margin: 0;
  padding: 8px 14px;
  border: 0;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.hm-seg-btn.is-selected {
  background: var(--sage);
  color: #fff;
}

.hm-grocery-qty {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.hm-grocery-qty label {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.hm-grocery-qty input,
.hm-grocery-qty select {
  min-width: 72px;
  max-width: 110px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.hm-grocery-unit-label {
  padding-bottom: 10px;
  font-size: 0.9rem;
}

.hm-grocery-price-ro {
  padding-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.hm-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(31, 28, 24, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.hm-picker-sheet {
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 16px 16px;
  padding: 18px;
  box-shadow: var(--hm-shadow);
}

.hm-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hm-picker-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.hm-picker-search {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font: inherit;
}

.hm-picker-list {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.hm-picker-item {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.hm-picker-item:hover {
  background: rgba(74, 103, 65, 0.08);
}

@media (min-width: 720px) {
  .hm-picker-backdrop {
    align-items: center;
  }

  .hm-picker-sheet {
    border-radius: 16px;
  }
}

.hm-table-list {
  display: grid;
  gap: 12px;
}

.hm-table-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
}

/* Sides have no thumb — name + status use full width, Edit on the right */
.hm-table-row.hm-side-row {
  grid-template-columns: 1fr auto;
}

#payment-element {
  margin: 16px 0;
}

.hm-landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--hm-radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.button-secondary:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.hm-chef-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 16px;
  overflow-x: auto;
  padding: 8px 2px 16px;
  scroll-snap-type: x mandatory;
}

.hm-chef-rail .hm-chef-card {
  scroll-snap-align: start;
}

.hm-section-title {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 1.6rem;
  margin: 0 0 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.hm-radius-map {
  height: 220px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline, #e5e2dc);
  overflow: hidden;
  background: #f3f1ec;
}

.hm-weekday-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hm-chip {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--hairline, #e5e2dc);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.hm-chip.is-on {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.hm-chip.is-selected {
  outline: 2px solid var(--sage, #3b7a62);
  outline-offset: 2px;
}

.hm-avail-cal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.hm-avail-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 72px;
  padding: 8px 4px;
  border: 1px solid var(--hairline, #e5e2dc);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.hm-avail-day.is-available {
  background: #eef6ee;
  border-color: #9fc49f;
}

.hm-avail-day.is-off {
  background: #f6f4f0;
  color: #888;
}

.hm-avail-day.is-booked {
  background: #f3e9e2;
  border-color: #d4a574;
  cursor: not-allowed;
  opacity: 0.9;
}

.hm-avail-day-dow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hm-avail-day-num {
  font-weight: 700;
  font-size: 1.05rem;
}

.hm-avail-day-state {
  font-size: 0.65rem;
}

.hm-avail-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #666;
}

.hm-avail-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.hm-window-offer-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hm-window-offer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--hairline, #e5e2dc);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hm-window-offer strong {
  font-size: 0.9rem;
}

.hm-window-offer span {
  font-size: 0.75rem;
  color: #666;
}

.hm-window-offer.is-on {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.hm-window-offer.is-on span {
  color: rgba(255, 255, 255, 0.75);
}

.hm-customize-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--hairline, #e5e2dc);
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.hm-section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.hm-hint-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--hairline, #cfcac2);
  border-radius: 999px;
  background: #fff;
  color: #666;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.hm-hint-btn[aria-expanded="true"] {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.hm-hint-panel {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3f1ec;
  color: #444;
  font-size: 0.9rem;
  line-height: 1.45;
}

.hm-avail-day.is-selected {
  outline: 2px solid #1a1a1a;
  outline-offset: 1px;
}

@media (max-width: 560px) {
  .hm-window-offer-row {
    grid-template-columns: 1fr;
  }
}

.hm-weekday-chips .hm-chip:disabled,
.hm-avail-cal .hm-avail-day:disabled {
  opacity: 1;
}

.hm-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.hm-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f1ec;
  font-size: 0.9rem;
}

.hm-context-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hm-hero-address.hm-hero-address {
  flex-wrap: wrap;
  max-width: 640px;
}

.hm-hero-address .hm-address-field {
  flex: 1 1 260px;
}

.hm-hero-address .hm-date-field {
  position: relative;
  flex: 0 0 auto;
  width: 170px;
}

.hm-hero-address .hm-date-field input {
  min-height: 52px;
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 1px solid var(--hairline, #e5e2dc);
  border-radius: var(--hm-radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
  /* Keep native picker; don't strip chrome entirely on mobile. */
  -webkit-appearance: none;
  appearance: none;
}

/* iOS Safari: empty date inputs show no format — fake laptop placeholder. */
.hm-date-placeholder {
  display: none;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9a968e;
  font: inherit;
  pointer-events: none;
  z-index: 1;
}

.hm-date-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1b19' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.hm-date-field[data-empty] .hm-date-placeholder {
  display: block;
}

.hm-date-field[data-empty] input {
  color: transparent;
}

.hm-date-field[data-empty] input::-webkit-datetime-edit,
.hm-date-field[data-empty] input::-webkit-datetime-edit-fields-wrapper,
.hm-date-field[data-empty] input::-webkit-datetime-edit-text,
.hm-date-field[data-empty] input::-webkit-datetime-edit-month-field,
.hm-date-field[data-empty] input::-webkit-datetime-edit-day-field,
.hm-date-field[data-empty] input::-webkit-datetime-edit-year-field {
  color: transparent;
}

.hm-date-field input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.hm-hero-address .button {
  min-height: 52px;
}

@media (max-width: 560px) {
  .hm-hero-address .hm-address-field,
  .hm-hero-address .hm-date-field,
  .hm-hero-address .button {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 859px) {
  .hm-nav-auth {
    display: none;
  }

  .hm-window-grid {
    grid-template-columns: 1fr;
  }
}
