/* Restaurant listing (/restaurants) — a web port of the app's list screen
   (apps/mobile/app/index.tsx + components/VenueCard.tsx, Badge.tsx, FilterSheet.tsx).
   Same values: ink outlines 2px, hard offset 4px (no blur), radius 12 on cards,
   999 only on chips, offer badge tomato/-7deg/offset 5, Gabarito 900 + Onest. */

.rest-page {
  background: var(--surface);
}
.rest-page header.site {
  background: var(--sun);
}
.rest-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---- Hero: title + one search pill (text · day · hour · people · button) -------------- */
.rest-hero {
  background: var(--sun);
  border-bottom: var(--outline) solid var(--ink);
  padding: 4px 0 24px;
}
.rest-hero-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}
.rest-hero-lede {
  margin: 0 0 24px;
  font-size: 17px;
}
.rest-pill {
  display: flex;
  align-items: stretch;
  min-height: 68px;
  padding: 6px;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 0 var(--ink);
}
.rest-pill-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  min-width: 0;
}
.rest-pill-search svg {
  position: absolute;
  left: 20px;
  color: var(--ink);
  pointer-events: none;
}
.rest-pill-search input {
  width: 100%;
  height: 100%;
  padding: 0 16px 0 52px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
}
.rest-pill-search input::placeholder {
  font-weight: 400;
  color: var(--mute);
}
.rest-pill-search input:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: -3px;
}
/* The "when" fields turn into quiet segments of the pill: no emojis, no boxes. */
.rest-pill .when-bar,
.rest-pill .when-bar.is-active {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  flex: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.rest-pill .when-field {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 22px;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(27, 20, 20, 0.2);
  border-radius: 0;
}
.rest-pill .when-date-btn {
  min-width: 92px;
  padding: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--mute);
}
.rest-pill .when-date-btn.has-value {
  color: var(--ink);
}
.rest-pill .when-date-btn::after,
.rest-pill .when-field select {
  /* chevron drawn in CSS so every segment reads the same */
}
.rest-pill .when-field select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 18px 0 0;
  font-size: 15.5px;
  font-weight: 700;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231B1414' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center;
}
.rest-pill .when-field select:disabled {
  opacity: 0.4;
}
.rest-pill .when-colon {
  margin: 0 2px;
  color: var(--mute);
}
.rest-pill .when-clear {
  align-self: center;
  margin-right: 10px;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--mute);
}
.rest-pill-go {
  align-self: center;
  flex: none;
  min-height: 48px;
  margin: 0 2px 0 6px;
  padding: 0 28px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  color: var(--on-grape);
  background: var(--grape);
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 0 var(--ink);
  cursor: pointer;
}
.rest-pill-go:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--ink);
}
.rest-mobile-only {
  display: none;
}

/* List column: the app's list, one column of cards */
.rest-split {
  display: block;
  padding-top: 18px;
  padding-bottom: 56px;
}
.rest-list {
  min-width: 0;
}
.rest-count {
  font-size: 13.5px;
  color: var(--mute);
}
.rest-map {
  display: none;
}

/* Chips row (sort · map · filters), same chips as the app */
.rest-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.rest-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease-out;
}
.app-chip-btn:active {
  transform: scale(0.97);
}
.app-chip-btn.is-active {
  background: var(--grape);
  color: var(--surface);
}
.app-chip-btn:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 2px;
}
.app-chip-caret {
  font-size: 10px;
  font-weight: 800;
}
.rest-sortwrap {
  position: relative;
}
.rest-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 190px;
  padding: 4px 0;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.rest-menu[hidden] {
  display: none;
}
.rest-menu button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.rest-menu button:hover,
.rest-menu button[aria-checked='true'] {
  background: rgba(27, 20, 20, 0.07);
}

/* ---- Grid of app cards ------------------------------------------------------ */
.rest-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 480px;
  margin-inline: auto;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 4px 0 0 var(--ink);
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--ink);
}
.app-card:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}
.app-card:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 3px;
}

.app-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(27, 20, 20, 0.06);
  border-radius: 10px 10px 0 0;
}
.app-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.app-photo .initial {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 96px;
  color: rgba(27, 20, 20, 0.15);
}

/* Chips on the photo */
.app-photochip {
  position: absolute;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
}
.app-photochip.is-open {
  left: 8px;
  bottom: 8px;
  background: var(--mint);
}
.app-photochip.is-closure {
  left: 8px;
  bottom: 8px;
  background: var(--ink);
  color: var(--surface);
}
.app-photochip.is-takeaway {
  left: 8px;
  top: 8px;
}

/* Offer sticker (the Badge component): tomato, ink outline 2.5, offset 5, -7deg */
.app-offer {
  position: absolute;
  right: 8px;
  top: 8px;
}
.app-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 10px 14px 8px;
  background: var(--tomato);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 5px 5px 0 0 var(--ink);
  transform: rotate(-7deg);
}
.app-badge-label {
  max-width: 150px;
  text-align: center;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.app-badge-punch {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
}
.app-badge-extra {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 10px;
  font-weight: 800;
  color: var(--surface);
  background: var(--ink);
  border: 1.5px solid var(--surface);
  border-radius: 999px;
}
/* Locked / "available from" chip in place of the sticker */
.app-lockedchip {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 999px;
}

/* Body */
.app-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}
.app-namerow {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-heart {
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.app-heart svg {
  fill: none;
}
.app-heart[aria-pressed='true'] svg {
  fill: var(--tomato);
}
.app-meta {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-pricebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(27, 20, 20, 0.85);
}
.app-price,
.app-rating {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.app-rating small {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--mute);
}
.app-caveat {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--mute);
}
/* The purple bottom bar: a cue, the whole card is the link */
.app-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--surface);
  background: var(--grape);
  border-top: var(--outline) solid var(--ink);
  border-radius: 0 0 10px 10px;
}

/* ---- States --------------------------------------------------------------------- */
.rest-skeleton {
  aspect-ratio: 4 / 4.2;
  border: var(--outline) solid rgba(27, 20, 20, 0.15);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(27, 20, 20, 0.07) 0 52%, transparent 52%);
  animation: rest-pulse 1.2s ease-in-out infinite;
}
@keyframes rest-pulse {
  50% {
    opacity: 0.55;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rest-skeleton {
    animation: none;
  }
  .app-card,
  .app-card:hover,
  .app-card:active {
    transition: none;
    transform: none;
  }
}
.rest-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 16px;
  text-align: center;
  font-size: 15px;
}
.rest-empty p {
  margin: 0;
  max-width: 44ch;
}

/* ---- Filter sheet (the app's FilterSheet / PickerSheet) -------------------------- */
.rest-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.rest-sheet-overlay[hidden] {
  display: none;
}
.rest-sheet {
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: 82vh;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
@media (min-width: 700px) {
  .rest-sheet-overlay {
    align-items: center;
  }
  .rest-sheet {
    max-height: 86vh;
    border-bottom: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 0 var(--ink);
  }
}
.rest-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 6px;
}
.rest-sheet-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.rest-sheet-close {
  display: grid;
  place-items: center;
  padding: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.rest-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 16px;
}
.rest-sheet-group {
  padding: 12px 0 4px;
}
.rest-sheet-group h3 {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
}
.rest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid rgba(110, 82, 48, 0.33);
  cursor: pointer;
}
.rest-row input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  display: inline-grid;
  place-content: center;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
}
.rest-row input[type='radio'] {
  border-radius: 999px;
}
.rest-row input:checked {
  background: var(--grape);
}
.rest-row input[type='checkbox']:checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border: solid var(--on-grape);
  border-width: 0 0 3px 3px;
  transform: translateY(-1px) rotate(-45deg);
}
.rest-row input[type='radio']:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--on-grape);
}
.rest-row input:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 2px;
}
.rest-sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
}
.rest-sheet-foot button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 3px 3px 0 0 var(--ink);
  cursor: pointer;
}
.rest-sheet-foot button.is-primary {
  color: var(--on-grape);
  background: var(--grape);
}
.rest-sheet-foot button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--ink);
}

/* Map: desktop only, sticky under the bar */
@media (min-width: 1000px) {
  .rest-split {
    display: grid;
    grid-template-columns: 520px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  .rest-grid,
  .rest-toolbar {
    max-width: none;
    margin-inline: 0;
  }
  .rest-map {
    display: block;
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    min-height: 420px;
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: 4px 4px 0 0 var(--ink);
    overflow: hidden;
  }
  .rest-mapbtn {
    display: none;
  }
}
#map {
  width: 100%;
  height: 100%;
  background: #e7e2d4;
}
.rest-maptool {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
}
.rest-map .leaflet-top.leaflet-left {
  top: 0;
}

/* Map pins (same sticker chips as the map page) */
.map-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}
.map-pin-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px;
  white-space: nowrap;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.map-pin-item {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
}
.map-pin-punch {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}
.map-pin-tail {
  width: 10px;
  height: 10px;
  margin-top: -6px;
  background: var(--surface);
  border-right: var(--outline) solid var(--ink);
  border-bottom: var(--outline) solid var(--ink);
  transform: rotate(45deg);
}
.leaflet-marker-icon.is-active .map-pin-badge,
.leaflet-marker-icon.is-active .map-pin-tail {
  background: var(--sun);
}
.app-card.is-flash {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--ink);
}
.app-lockedchip.is-count { color: var(--mute); }


/* Count on the left of the list toolbar, as a small headline */
.rest-count {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.rest-toolbar {
  margin-bottom: 18px;
}
@media (min-width: 1000px) {
  .rest-split {
    padding-top: 28px;
  }
}

/* Small screens: the pill becomes a stacked card (search on top, three fields below) */
@media (max-width: 999px) {
  .rest-hero {
    padding: 0 0 18px;
  }
  .rest-pill {
    flex-wrap: wrap;
    min-height: 0;
  }
  .rest-pill-search {
    flex: 1 1 100%;
    height: 54px;
  }
  .rest-pill .when-bar,
  .rest-pill .when-bar.is-active {
    flex: 1 1 100%;
    border-top: 1px solid rgba(27, 20, 20, 0.2);
  }
  .rest-pill .when-field {
    flex: 1 1 0;
    min-height: 52px;
    padding: 0 14px;
  }
  .rest-pill .when-field:first-child {
    border-left: 0;
  }
  .rest-pill .when-date-btn {
    min-width: 0;
  }
  .rest-pill-go {
    display: none;
  }
  .rest-mobile-only {
    display: inline-flex;
  }
}

.rest-pill .when-time select {
  flex: none;
  min-width: 66px;
}
.rest-pill .when-field select#whenPeople {
  min-width: 112px;
}

.app-chip-btn {
  white-space: nowrap;
}
@media (max-width: 999px) {
  .rest-pill .when-field {
    padding: 0 12px;
    overflow: hidden;
  }
  .rest-pill .when-time select,
  .rest-pill .when-field select#whenPeople {
    min-width: 0;
  }
  .rest-pill .when-field select {
    padding-right: 16px;
    font-size: 14.5px;
  }
  .rest-pill .when-date-btn {
    font-size: 14.5px;
  }
  .rest-pill .when-date {
    overflow: visible;
  }
  .rest-count {
    flex: 1 1 100%;
  }
  .rest-toolbar-right {
    flex-wrap: wrap;
  }
}

/* ---- Pill segments: day / time / people as quiet rounded buttons ------------------------- */
.when-model {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.rest-pill .when-field {
  align-self: center;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
}
.rest-pill .when-field::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(27, 20, 20, 0.2);
}
.pill-btn,
.rest-pill .when-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 0 22px 0 50px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--mute);
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
}
.pill-btn.has-value,
.rest-pill .when-date-btn.has-value {
  color: var(--ink);
}
.pill-btn::after,
.rest-pill .when-date-btn::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231B1414' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
}
.pill-btn:focus-visible,
.rest-pill .when-date-btn:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: -3px;
}

/* Popovers under a segment: same card language as the calendar */
.pill-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 14px);
  left: 0;
  width: 300px;
  max-height: 340px;
  overflow-y: auto;
  padding: 12px;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.pill-pop[hidden] {
  display: none;
}
.pill-pop-people {
  width: 240px;
}
.pill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.pill-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.pill-opt {
  padding: 9px 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
}
.pill-opt:hover:not(:disabled) {
  background: rgba(27, 20, 20, 0.08);
}
.pill-opt.is-selected {
  color: var(--on-grape);
  background: var(--grape);
}
.pill-opt:disabled {
  opacity: 0.3;
  cursor: default;
}
.pill-opt-any {
  display: block;
  width: 100%;
  text-align: center;
  color: var(--grape);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rest-pill .when-clear {
  display: none;
}

/* ---- Autocomplete ------------------------------------------------------------------------------ */
.rest-pill-search {
  position: relative;
}
.suggest {
  position: absolute;
  z-index: 70;
  top: calc(100% + 14px);
  left: 0;
  width: max(100%, 420px);
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.suggest[hidden] {
  display: none;
}
.suggest-group {
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.suggest-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.suggest-item.is-active {
  background: rgba(27, 20, 20, 0.08);
}
.suggest-label {
  font-size: 15px;
  font-weight: 700;
}
.suggest-sub {
  font-size: 13px;
  color: var(--mute);
}

@media (max-width: 999px) {
  .rest-pill {
    border-radius: 24px;
    padding: 0;
  }
  .rest-pill-search input {
    border-radius: 24px 24px 0 0;
  }
  .rest-pill .when-field {
    height: 52px;
    border-radius: 0;
  }
  .pill-btn,
  .rest-pill .when-date-btn {
    padding: 0 12px;
    font-size: 14.5px;
  }
  .pill-pop {
    left: auto;
    right: 0;
    width: min(300px, calc(100vw - 32px));
  }
  .suggest {
    width: 100%;
  }
}

/* Segment icons (the app's own calendar / clock / users) */
.pill-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  color: var(--ink);
  pointer-events: none;
}
.rest-pill .pill-btn:hover,
.rest-pill .when-date-btn:hover {
  color: var(--ink);
}
@media (max-width: 999px) {
  .pill-icon {
    left: 12px;
  }
  .pill-btn,
  .rest-pill .when-date-btn {
    padding-left: 38px;
  }
}

.app-photochip.is-delivery {
  background: var(--grape);
  color: var(--on-grape);
}

/* ---- Launch mode (launch.js): row cards like the big restaurant sites — photo on the left, text and button on the right ---- */
html.sr-launch .rest-grid {
  max-width: none;
  gap: 16px;
}
html.sr-launch .app-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-areas:
    'photo body'
    'photo cta';
  grid-template-rows: 1fr auto;
}
html.sr-launch .app-photo {
  grid-area: photo;
  aspect-ratio: auto;
  min-height: 200px;
  border-radius: 10px 0 0 10px;
}
html.sr-launch .app-photo img {
  /* out of the flow: a tall or square photo must not stretch the row, it is cropped to the box */
  position: absolute;
  inset: 0;
}
html.sr-launch .app-photo .initial {
  font-size: 56px;
}
html.sr-launch .app-body {
  grid-area: body;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px 6px;
}
html.sr-launch .app-name {
  font-size: 21px;
}
html.sr-launch .app-pricebar {
  justify-content: flex-start;
  gap: 14px;
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}
html.sr-launch .app-cta {
  grid-area: cta;
  justify-self: end;
  margin: 0 14px 14px 0;
  padding: 8px 16px;
  border: var(--outline) solid var(--ink);
  border-radius: 10px;
  font-size: 13.5px;
}
@media (max-width: 520px) {
  html.sr-launch .app-card {
    grid-template-columns: 136px minmax(0, 1fr);
  }
  html.sr-launch .app-photo {
    min-height: 160px;
  }
  html.sr-launch .app-body {
    padding: 12px 12px 4px;
  }
  html.sr-launch .app-name {
    font-size: 17px;
  }
  html.sr-launch .app-cta {
    margin: 0 10px 10px 0;
    padding: 7px 12px;
  }
}
