/* ---------- home: the customer directory ----------
 *
 * The home page's own sheet, loaded from its <head>. Everything here is `dir-*`;
 * the `mkt-*` rules in app.css belong to /business and the legal pages, and the
 * two share only the wordmark (.mkt-logo), the footer and the tokens.
 *
 * Two layouts, one markup. From 768px the page is a travel site's front page:
 * wordmark, category tabs and actions in a sticky bar, the what + where pill under
 * it, rows of cards with arrows. Below that it is the app: no wordmark, a sticky
 * search pill and chips on a soft grey ground, rows that swipe, a bottom tab bar,
 * and the search in a sheet. The phone rules are in one block at the end.
 */

.dir-page {
  --dir-bar-h: 80px;
  --dir-gutter: clamp(16px, 3vw, 80px);
  --dir-gap: 16px;
  /* The page's own neutrals. The product tokens (--ink, --surface-2, --border) are
     all cut from the teal; here everything that is not an action is white, near-
     black, or a grey with no hue, so the shops' photos and the brand-coloured
     actions are the only colour on the screen. */
  --dir-ink: #222222;
  --dir-muted: #6a6a6a;
  --dir-muted-2: #9a9a9a;
  --dir-border: #ebebeb;
  --dir-border-2: #dddddd;
  --dir-gray-1: #f7f7f7;
  --dir-gray-2: #efefef;
  --dir-gray-3: #e4e4e4;
  --dir-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.05);
  --dir-shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
  --dir-shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
  min-height: 100dvh;
  background: var(--bg);
  color: var(--dir-ink);
  -webkit-tap-highlight-color: transparent;
}

.dir-container {
  width: 100%;
  max-width: 1760px;
  margin-inline: auto;
  padding-inline: var(--dir-gutter);
}

/* ---- buttons ---- */

.dir-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font: 700 0.875rem var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}

.dir-btn:hover { background: var(--brand-dark); }
.dir-btn:active { transform: scale(0.97); }
.dir-btn .mkt-icon { color: inherit; }

.dir-btn--lg {
  min-height: 50px;
  padding: 0 22px;
  font-size: 0.9375rem;
}

.dir-btn--dark {
  background: var(--dir-ink);
  color: #fff;
}

.dir-btn--dark:hover { background: #000; }

/* ---- header: top row ---- */

/* display:contents on desktop, so .dir-header__top sticks against the page on its
   own while the search row scrolls with the content. On the phone this becomes the
   sticky block (see the phone rules). */
.dir-chrome {
  display: contents;
}

.dir-header__top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  gap: 16px;
  align-items: center;
  height: var(--dir-bar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--dir-border);
}

.dir-header__logo {
  justify-self: start;
}

.dir-tabs {
  display: flex;
  gap: 2px;
  justify-self: center;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.dir-tabs::-webkit-scrollbar { display: none; }

.dir-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--dir-bar-h);
  padding: 0 10px;
  color: var(--dir-muted);
  font: 600 0.875rem var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

.dir-tab__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transition: transform 250ms var(--ease-out);
}

/* The category marks (CategoryGlyphHelper) are flat fills; the shadow lifts them
   off the white the way a rendered object would sit. */
.dir-glyph {
  display: block;
  flex: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.14));
}

.dir-tab:hover { color: var(--dir-ink); }
.dir-tab:hover .dir-tab__icon { transform: translateY(-2px) scale(1.06); }
.dir-tab[aria-current="page"] { color: var(--dir-ink); }

.dir-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--dir-ink);
}

.dir-tab:focus-visible {
  border-radius: var(--r-lg);
}

.dir-header__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.dir-header__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--dir-ink);
  font: 600 0.875rem var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

.dir-header__link:hover { background: var(--dir-gray-1); }

.dir-header__link--icon {
  width: 40px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--dir-border-2);
}

/* The header's install button reuses the how-to sheet styles from app.css; the
   button itself is a header link with an icon. */
.dir-header__actions .mkt-install__btn {
  border: 1px solid var(--dir-border-2);
}

/* The compact pill: only once the search row has scrolled under the bar. Sits in
   the tabs' grid cell; the two are never shown together. */
.dir-compact {
  display: none;
  grid-column: 2;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 6px 0 20px;
  border: 1px solid var(--dir-border-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--dir-shadow-sm);
  color: var(--dir-ink);
  font: 600 0.875rem var(--font-body);
  cursor: pointer;
  transition: box-shadow 200ms var(--ease-out);
}

.dir-compact:hover { box-shadow: var(--dir-shadow-md); }

.dir-compact__text {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-compact__go {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}

.dir-compact__go .mkt-icon { color: inherit; }

/* Between a tablet and a small laptop the six labelled tabs do not fit beside the
   wordmark and the actions: the icons carry them, and the labels stay for screen
   readers (the same recipe as .visually-hidden). */
@media (min-width: 768px) and (max-width: 1199px) {
  .dir-tab { padding: 0 6px; }

  .dir-tab__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .dir-tab[aria-current="page"]::after { left: 6px; right: 6px; }
}

@media (min-width: 768px) {
  .dir-page.is-compact .dir-tabs { display: none; }
  .dir-page.is-compact .dir-compact { display: flex; animation: dirCompactIn 220ms var(--ease-out); }
}

@keyframes dirCompactIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---- header: the search pill ---- */

.dir-header__search {
  display: flex;
  justify-content: center;
  padding-block: 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--dir-border);
}

.dir-pill {
  display: flex;
  align-items: center;
  width: min(720px, 100%);
  height: 66px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--dir-border-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--dir-shadow-sm);
  transition: box-shadow 200ms var(--ease-out);
}

.dir-pill:hover,
.dir-pill:focus-within { box-shadow: var(--dir-shadow-md); }

.dir-pill__field {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 100%;
  padding: 0 28px;
  border-radius: var(--r-pill);
  cursor: text;
  transition: background-color 160ms var(--ease-out);
}

.dir-pill__field:hover { background: var(--dir-gray-1); }

.dir-pill__field + .dir-pill__field::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--dir-border-2);
}

.dir-pill__label {
  font: 700 0.75rem/1 var(--font-body);
  color: var(--dir-ink);
}

.dir-pill__input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 500 0.875rem/1.2 var(--font-body);
  color: var(--dir-ink);
}

.dir-pill__input::placeholder { color: var(--dir-muted-2); }

/* The Where half of the pill holds three things: the label+input column, the
   crosshair, and (floating under the pill) Google's suggestions. The column keeps
   the field's own look; the row around it only adds the button. */
.dir-pill__field--where {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.dir-pill__where {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  cursor: text;
}

.dir-pill__locate {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dir-muted);
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.dir-pill__locate:hover { background: var(--dir-gray-2); color: var(--dir-ink); }
.dir-pill__locate .mkt-icon { color: inherit; }

/* Floats under the pill, aligned to the Where half. Above the results grid. */
.dir-pill__places {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(360px, 90vw);
  z-index: 5;
  background: #fff;
  border: 1px solid var(--dir-border);
  border-radius: 18px;
  box-shadow: var(--dir-shadow-md);
  overflow: hidden;
}

/* Google's place suggestions, shared by the pill (floating) and the sheet (in the
   flow): a name and the rest of the address under it. */
.near-me__list[hidden] { display: none; }

.near-me__suggestion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid var(--dir-border);
  background: none;
  text-align: left;
  cursor: pointer;
}
.near-me__suggestion:first-child { border-top: 0; }
.near-me__suggestion:hover,
.near-me__suggestion:focus-visible { background: var(--dir-gray-1); outline: 0; }
.near-me__suggestion strong { font: 600 0.9375rem var(--font-body); color: var(--dir-ink); }
.near-me__suggestion span { font: 400 0.8125rem var(--font-body); color: var(--dir-muted); }

.near-me__status {
  margin: 10px 0 0;
  font: 500 0.8125rem var(--font-body);
  color: var(--dir-muted);
}
.near-me__status:empty { display: none; }

.dir-pill__go {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}

.dir-pill__go .mkt-icon { color: inherit; }
.dir-pill__go:hover { background: var(--brand-dark); }
.dir-pill__go:active { transform: scale(0.95); }

/* The phone's pieces, off on desktop. */
.dir-pill-mini,
.dir-chips,
.dir-appbar,
.dir-tabbar,
.dir-row__more {
  display: none;
}

/* ---- the strapline ---- */

.dir-strapline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 28px 0 0;
}

.dir-strapline__title {
  margin: 0;
  font: 800 clamp(1.375rem, 1rem + 1.2vw, 1.75rem)/1.15 var(--font-head);
  letter-spacing: -0.6px;
  color: var(--dir-ink);
}

.dir-strapline__title span { color: var(--dir-muted); }

.dir-strapline__live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 500 0.875rem var(--font-body);
  color: var(--dir-muted);
}

/* ---- rows ---- */

.dir-main {
  padding-bottom: 48px;
}

.dir-row {
  padding-top: 28px;
}

.dir-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dir-row__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font: 800 1.25rem/1.2 var(--font-head);
  letter-spacing: -0.4px;
  color: var(--dir-ink);
  text-decoration: none;
}

.dir-row__arrow {
  color: var(--dir-ink);
  transition: transform 200ms var(--ease-out);
}

.dir-row__title:hover .dir-row__arrow { transform: translateX(3px); }

.dir-row__nav {
  display: flex;
  gap: 8px;
}

.dir-row__btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--dir-border-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--dir-ink);
  cursor: pointer;
  transition: opacity 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.dir-row__btn .mkt-icon { color: inherit; }
.dir-row__btn:hover { background: var(--dir-gray-1); }
.dir-row__btn[disabled] { opacity: 0.35; cursor: default; }
.dir-row__fwd { transform: rotate(-90deg); }

/* A trackpad or finger swipes; the arrows are for a mouse. */
@media (hover: none), (pointer: coarse) {
  .dir-row__nav { display: none; }
}

/* The strip: N whole cards across, whatever the width, and the next one starts
   exactly at the right edge so a scroll by one viewport lands on card edges. */
.dir-strip {
  --dir-cols: 6;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--dir-cols) - 1) * var(--dir-gap)) / var(--dir-cols));
  gap: var(--dir-gap);
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.dir-strip::-webkit-scrollbar { display: none; }
.dir-strip__item { scroll-snap-align: start; }

@media (max-width: 1599px) { .dir-strip { --dir-cols: 5; } }
@media (max-width: 1279px) { .dir-strip { --dir-cols: 4; } }
@media (max-width: 1023px) { .dir-strip { --dir-cols: 3; } }

/* ---- results grid (search) ---- */

.dir-results {
  padding-top: 24px;
}

.dir-results__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.dir-results__title {
  margin: 0;
  font: 800 1.25rem/1.2 var(--font-head);
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
}

.dir-results__count {
  margin: 0;
  font: 500 0.875rem var(--font-body);
  color: var(--dir-muted);
}

.dir-results__subtitle {
  margin: 36px 0 14px;
  font: 800 1.125rem/1.2 var(--font-head);
  letter-spacing: -0.3px;
  color: var(--dir-ink);
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px var(--dir-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dir-empty {
  max-width: 48ch;
  padding: 40px 0 8px;
}

.dir-empty__title {
  margin: 0;
  font: 700 1.125rem/1.35 var(--font-head);
}

.dir-empty__body {
  margin: 8px 0 0;
  font: 400 0.9375rem/1.55 var(--font-body);
  color: var(--dir-muted);
}

.dir-empty__body a {
  color: var(--brand);
  font-weight: 600;
}

/* ---- card ---- */

.dir-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-3xl);
  outline-offset: 4px;
}

.dir-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--r-3xl);
  background: var(--dir-gray-1);
}

.dir-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .dir-card:hover .dir-card__img { transform: scale(1.04); }
}

/* No photo yet -- true of most shops today: the category's glyph on a quiet grey
   ground, with the shop's initial. The badge still sits on top. */
.dir-card__photo--empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 80% 0%, #fff 0, transparent 55%),
    linear-gradient(160deg, #fafafa, var(--dir-gray-2));
}

.dir-card__glyph {
  width: 30%;
  height: 30%;
  color: var(--dir-ink);
  opacity: 0.22;
  stroke-width: 1.2;
}

.dir-card__initial {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font: 800 1.5rem var(--font-head);
  color: var(--dir-ink);
  opacity: 0.55;
}

.dir-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: var(--dir-shadow-sm);
  font: 700 0.75rem/1 var(--font-body);
  color: var(--dir-ink);
}

.dir-card__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.dir-card__badge--closed { color: var(--dir-muted); }
.dir-card__badge--closed::before { background: var(--dir-muted-2); }

.dir-card__body {
  padding: 10px 2px 0;
}

.dir-card__name {
  font: 700 0.9375rem/1.3 var(--font-body);
  color: var(--dir-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-card__meta {
  margin-top: 2px;
  font: 400 0.8125rem/1.4 var(--font-body);
  color: var(--dir-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-card__line {
  margin-top: 3px;
  font: 500 0.8125rem/1.4 var(--font-body);
  color: var(--dir-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-card__waiting {
  font-weight: 700;
  color: var(--dir-ink);
}

.dir-card__action { font-weight: 600; }
.dir-card__action--book { color: var(--brand); font-weight: 700; }
.dir-card__action--walkin { color: var(--warn-ink); }

/* The owner's note, in the same serif italic the public page renders it in. */
.dir-card__note {
  margin-top: 4px;
  font: italic 400 0.875rem/1.4 var(--font-serif);
  color: var(--dir-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A seeded stub: dashed, colourless, because there is no queue behind it. */
.dir-card--stub .dir-card__photo {
  border: 1.5px dashed var(--dir-border-2);
  background: var(--surface);
}

.dir-card--stub .dir-card__glyph,
.dir-card--stub .dir-card__initial { color: var(--dir-muted-2); }
.dir-card--stub .dir-card__name { color: var(--dir-muted); }
.dir-card--stub .dir-card__action { color: var(--brand); }

/* ---- the owner's door ---- */

.dir-band {
  background: var(--dir-gray-1);
  color: var(--dir-ink);
  border-top: 1px solid var(--dir-border);
  padding-block: 48px;
}

.dir-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dir-band__marker {
  margin: 0 0 8px;
  font: 700 0.75rem var(--font-body);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dir-muted);
}

.dir-band__title {
  margin: 0;
  font: 800 clamp(1.375rem, 1rem + 1.4vw, 1.875rem)/1.15 var(--font-head);
  letter-spacing: -0.6px;
}

.dir-band__body {
  max-width: 56ch;
  margin: 8px 0 0;
  font: 400 0.9375rem/1.5 var(--font-body);
  color: var(--dir-muted);
}

.dir-band__more {
  display: inline-block;
  margin-top: 12px;
  font: 600 0.875rem var(--font-body);
  color: var(--dir-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dir-band__more:hover { color: var(--dir-muted); }

/* ---- the search sheet (phone; on desktop the pill is the search) ---- */

.dir-sheet {
  padding: 0;
  background: var(--dir-gray-1);
}

.dir-sheet__form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.dir-sheet__top {
  position: relative;
  padding: 8px 64px 0 12px;
}

.dir-sheet__tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dir-sheet__tabs::-webkit-scrollbar { display: none; }

.dir-sheet__tab {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 10px;
  font: 600 0.75rem var(--font-body);
  color: var(--dir-muted);
  white-space: nowrap;
  cursor: pointer;
}

.dir-sheet__radio { position: absolute; opacity: 0; pointer-events: none; }
.dir-sheet__tab:has(.dir-sheet__radio:checked) { color: var(--dir-ink); }

.dir-sheet__tab:has(.dir-sheet__radio:checked)::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: var(--dir-ink);
}

.dir-sheet__tab:has(.dir-sheet__radio:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-lg);
}

.dir-sheet__close {
  position: absolute;
  right: 16px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--dir-shadow-sm);
  color: var(--dir-ink);
  cursor: pointer;
}

.dir-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  overflow-y: auto;
}

.dir-sheet__card {
  padding: 22px 18px 18px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--dir-shadow-lg);
}

.dir-sheet__title {
  margin: 0 0 14px;
  font: 800 1.5rem/1.2 var(--font-head);
  letter-spacing: -0.6px;
}

.dir-sheet__field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--dir-border-2);
  border-radius: var(--r-2xl);
  transition: border-color 160ms var(--ease-out);
}

.dir-sheet__field:focus-within { border-color: var(--dir-ink); }
.dir-sheet__field .mkt-icon { color: var(--dir-ink); }

.dir-sheet__input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  /* 16px: anything smaller makes iOS zoom the page in on focus. */
  font: 500 1rem var(--font-body);
  color: var(--dir-ink);
}

.dir-sheet__input::placeholder { color: var(--dir-muted-2); }

.dir-sheet__suggest {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

/* A link for the city rows, a button for "Use my location"; both wear this. */
.dir-sheet__suggestion {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

/* In the flow under the field, drawn like the city list it sits above. */
.dir-sheet__places {
  margin-top: 10px;
  border: 1px solid var(--dir-border);
  border-radius: 16px;
  overflow: hidden;
}

.dir-sheet__sq {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--dir-gray-1);
  color: var(--dir-ink);
}

.dir-sheet__sq .mkt-icon { color: inherit; }

.dir-sheet__suggest-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dir-sheet__suggest-text strong { font: 600 0.9375rem var(--font-body); color: var(--dir-ink); }
.dir-sheet__suggest-text span { font: 400 0.8125rem var(--font-body); color: var(--dir-muted); }

.dir-sheet__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px calc(14px + var(--safe-b));
  background: var(--surface);
  border-top: 1px solid var(--dir-border);
}

.dir-sheet__clear {
  font: 600 0.875rem var(--font-body);
  color: var(--dir-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- the My spot sheet (what the empty tab opens) ---- */

.dir-spot-sheet .dir-sheet__card { position: relative; }
.dir-spot-sheet .dir-sheet__title { margin-bottom: 6px; padding-right: 44px; }

.dir-spot-sheet__lede {
  margin: 0 0 6px;
  font: 400 0.9375rem/1.45 var(--font-body);
  color: var(--dir-muted);
}

.dir-spot-sheet__steps .dir-sheet__suggestion { cursor: default; }
.dir-spot-sheet__foot .dir-btn { width: 100%; justify-content: center; }

/* On a desktop the sheet is only ever reached by the no-JS #search jump; the
   modal frame from tokens.css already centres it. */

/* ==================== the phone: the app ==================== */

@media (max-width: 767px) {
  .dir-page {
    --dir-gutter: 20px;
    --dir-gap: 12px;
    background: var(--dir-gray-1);
  }

  /* "Get the app", the way an app's own website says it. Scrolls away. */
  .dir-appbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--dir-gray-2);
  }

  .dir-appbar__logo {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .dir-appbar__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .dir-appbar__text strong { font: 700 0.9375rem var(--font-body); }
  .dir-appbar__text span { font: 400 0.75rem/1.3 var(--font-body); color: var(--dir-muted); }
  .dir-appbar__btn { min-height: 38px; padding: 0 14px; }

  /* Once installed the controller hides the banner; keep the strip from leaving
     a ghost of padding behind. */
  .dir-appbar[hidden] { display: none; }

  /* One sticky block: pill and chips, no wordmark. */
  .dir-chrome {
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--dir-gray-1);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }

  .dir-header__top { display: none; }

  .dir-header__search {
    padding: 12px var(--dir-gutter) 10px;
    background: transparent;
    border-bottom: 0;
  }

  .dir-pill { display: none; }

  .dir-pill-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    border-radius: var(--r-pill);
    background: var(--surface);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    color: var(--dir-ink);
    font: 600 0.9375rem var(--font-body);
    text-decoration: none;
    transition: transform 120ms var(--ease-out);
  }

  .dir-pill-mini .mkt-icon { color: var(--dir-ink); stroke-width: 2.2; }
  .dir-pill-mini:active { transform: scale(0.985); }

  .dir-pill-mini span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dir-chips {
    display: flex;
    gap: 10px;
    padding: 4px var(--dir-gutter) 14px;
    overflow-x: auto;
    scroll-padding-left: var(--dir-gutter);
    scrollbar-width: none;
  }

  .dir-chips::-webkit-scrollbar { display: none; }

  .dir-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px 0 12px;
    border-radius: var(--r-pill);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.06);
    color: var(--dir-muted);
    font: 600 0.875rem var(--font-body);
    white-space: nowrap;
    text-decoration: none;
    transition: transform 120ms var(--ease-out);
  }

  .dir-chip:active { transform: scale(0.96); }

  .dir-chip[aria-current="page"] {
    background: var(--dir-ink);
    color: #fff;
  }

  .dir-chip[aria-current="page"] .dir-glyph { filter: none; }

  .dir-main {
    /* Room for the tab bar. */
    padding-bottom: calc(24px + 72px + var(--safe-b));
  }

  .dir-strapline { padding-top: 20px; }
  .dir-strapline__title { font-size: 1.25rem; }
  .dir-strapline__tail { display: none; }

  .dir-row { padding-top: 22px; }
  .dir-row__head { margin-bottom: 12px; }
  .dir-row__title { font-size: 1.125rem; }
  .dir-row__arrow { display: none; }
  .dir-row__nav { display: none; }

  /* The circle arrow: the row's "see all". Only rows with a URL have one. */
  .dir-row__more {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--dir-shadow-sm);
    color: var(--dir-ink);
  }

  .dir-row__more .mkt-icon { color: inherit; }

  /* The strip bleeds to the screen edges and shows two cards and a sliver of the
     third -- the sliver is what says "swipe". */
  .dir-strip {
    --dir-cols: 2.12;
    margin-inline: calc(-1 * var(--dir-gutter));
    padding-inline: var(--dir-gutter);
    scroll-padding-inline: var(--dir-gutter);
  }

  .dir-results { padding-top: 20px; }
  .dir-results__title { font-size: 1.125rem; }
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px var(--dir-gap); }

  .dir-card__photo { border-radius: var(--r-2xl); }
  .dir-card__badge { top: 10px; left: 10px; padding: 6px 9px; font-size: 0.6875rem; }
  .dir-card__initial { left: 10px; bottom: 8px; font-size: 1.125rem; }
  .dir-card__name { font-size: 0.875rem; }
  .dir-card__meta,
  .dir-card__line { font-size: 0.75rem; }
  /* The badge already carries the wait; the line keeps only the action. */
  .dir-card__waiting,
  .dir-card__sep,
  .dir-card__note { display: none; }

  /* White on the grey page, so it reads as a sheet rising from the bottom. */
  .dir-band {
    margin-top: 8px;
    padding-block: 32px;
    border-radius: 24px 24px 0 0;
    border-top: 0;
    background: var(--surface);
  }

  .dir-band__inner { flex-direction: column; align-items: flex-start; }

  /* The footer sits above the tab bar. */
  .dir-page .mkt-footer { padding-bottom: calc(24px + 72px + var(--safe-b)); }

  /* Bottom tab bar. */
  .dir-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 0 calc(8px + var(--safe-b));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--dir-border);
  }

  .dir-tabbar__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    font: 600 0.625rem var(--font-body);
    color: var(--dir-muted);
    text-decoration: none;
  }

  .dir-tabbar__icon { color: inherit; }
  .dir-tabbar__tab[aria-current="page"] { color: var(--brand); }
  .dir-tabbar__tab[aria-current="page"] .dir-tabbar__icon { stroke-width: 2.2; }
  .dir-tabbar__tab--empty { color: var(--dir-muted-2); }

  /* The empty My spot tab is a button (it opens a sheet); dress it like the links. */
  button.dir-tabbar__tab {
    border: 0;
    background: none;
    cursor: pointer;
  }

  .dir-tabbar__glyph { position: relative; display: grid; place-items: center; }

  /* The place in line, on the ticket's corner, so the tab answers "how long?"
     without being opened. */
  .dir-tabbar__badge {
    position: absolute;
    top: -6px;
    left: calc(100% - 10px);
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--dir-ink);
    box-shadow: 0 0 0 2px #fff;
    color: #fff;
    font: 700 0.6875rem/20px var(--font-body);
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
  }

  /* Next up or in the chair: brand colour, and a pulse that says "set off now". */
  .dir-tabbar__tab--soon { color: var(--brand); }
  .dir-tabbar__tab--soon .dir-tabbar__badge {
    background: var(--brand);
    animation: livePulse 2s infinite;
  }

  /* The sheet's inner spacing; gk-modal (app.css) anchors it to the bottom edge. */
  .dir-sheet { max-height: 92dvh; }
  .dir-sheet::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dir-page * { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
