/* Layout: colour-blocked bands (strip, masthead, illustrated hero, wavy ribbon, finder, footer);
   finder = list of colour-tinted cards beside a sticky illustrated map. Deliberately one light look. */
:root {
  --cream: #f7f0e3;
  --paper: #fffaf0;
  --ink: #1d2b1f;
  --ink-soft: #4a5547;
  --forest: #1f4a32;
  --olive: #6f7d2c;
  --pink: #f4c7bd;
  --rose: #ee9aa2;
  --sky: #79a7cf;
  --mustard: #f4c438;
  --orange: #f3a24e;
  --lavender: #aeb0e6;
  --red: #e2462f;
  --river: #9fc3e3;
  --park: #cfe3b4;

  /* pin colours */
  --c-food_deal: #f3a24e; --c-popup: #8d8fe0; --c-event: #4f86c0; --c-market: #e6b21e;
  --c-nightlife: #e0607a; --c-freebie: #6f9a3a; --c-other: #a49b88;
  /* card tints */
  --t-food_deal: #f8c48c; --t-popup: #cfd0f3; --t-event: #b9d4ec; --t-market: #f8dc78;
  --t-nightlife: #f5b7c0; --t-freebie: #d3e6b2; --t-other: #ede2cc;

  --display: 'Bowlby One', 'Arial Black', Impact, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --hand: 'Caveat', 'Bradley Hand', 'Comic Sans MS', cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--forest);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.strip {
  background: var(--rose);
  text-align: center;
  font: 12px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-block: 9px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- masthead ---------- */
.masthead {
  background: var(--cream);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 16px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.logo {
  font: 30px/1 var(--display); color: var(--olive); text-decoration: none; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.logo-pill {
  font: italic 700 20px/1 var(--serif); color: var(--paper); background: var(--olive);
  padding: 4px 12px 6px; border-radius: 999px; transform: rotate(-4deg); display: inline-block;
}
#search {
  flex: 1 1 240px; max-width: 380px;
  padding: 10px 16px; border-radius: 999px; border: 2.5px solid var(--ink);
  background: var(--paper); color: var(--ink); font: 15px var(--body);
}
#search::placeholder { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero {
  background: var(--cream);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  padding-block: 8px 40px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.hero-art { width: 100%; max-width: 560px; height: auto; justify-self: center; }
.hero-copy { max-width: 30rem; }
.eyebrow { font: 12px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 12px; color: var(--olive); }
.hero h1 {
  font: 700 clamp(30px, 4.4vw, 48px)/1.08 var(--serif); margin: 0 0 14px; letter-spacing: -0.01em; text-wrap: balance;
}
.lede { margin: 0 0 22px; color: var(--ink-soft); font-size: 17px; max-width: 32ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  font: 13px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  border: 2.5px solid var(--ink); border-radius: 999px; padding: 12px 20px; transition: transform .15s;
}
.pill:hover { transform: translateY(-2px) rotate(-1deg); }
.pill-blue { background: var(--lavender); }
.pill-orange { background: var(--orange); }

/* ---------- ribbon ---------- */
.ribbon { display: block; width: 100%; height: 92px; background: var(--pink); }
.ribbon text { font: 19px var(--display); letter-spacing: 0.12em; fill: var(--ink); dominant-baseline: middle; }

/* ---------- finder ---------- */
.finder {
  background: var(--pink);
  padding-block: 8px 48px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  white-space: nowrap; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper); font: 500 14px var(--body);
}
.chips button[aria-checked="true"], .chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chips .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; border: 1.5px solid var(--ink); }
.chips button[aria-pressed="true"] .dot { border-color: var(--paper); }
.toggle { font: 500 14px var(--body); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.toggle input { accent-color: var(--ink); width: 18px; height: 18px; }

.view-switch { display: none; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.map-wrap {
  position: sticky; top: 16px; height: calc(100vh - 32px); max-height: 820px; min-height: 420px;
  border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--cream);
}
#map { position: absolute; inset: 0; background: var(--cream); }

.day-label {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 0; font: 14px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase;
}
.day-label::after { content: ""; flex: 1; height: 3px; background: var(--ink); border-radius: 3px; }
.day-label:first-child { margin-top: 0; }

.card {
  background: var(--t-other); border-radius: 18px; padding: 16px 18px; cursor: pointer;
  border: 3px solid transparent; transition: border-color .15s, transform .15s;
}
.card:hover { transform: translateY(-2px); }
.card.active { border-color: var(--ink); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kicker { font: 11px/1.4 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.kicker .sep { opacity: .5; margin: 0 4px; }
.card-icon { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; }
.card-icon svg { width: 34px; height: 34px; }
.card h3 { margin: 6px 0 8px; font: 700 21px/1.2 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.deal {
  display: inline-block; margin: 0 0 8px; padding: 4px 12px; border-radius: 999px;
  background: var(--paper); border: 2px solid var(--ink); font: 700 14px var(--body);
}
.card p { margin: 0 0 8px; font-size: 15px; max-width: 60ch; }
.where { font: 600 22px/1.1 var(--hand); }
.where .off-map { font: 500 13px var(--body); color: var(--ink-soft); }
.sources { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sources a {
  font: 500 12px var(--body); text-decoration: none; color: var(--ink); padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 250, 240, 0.7); border: 1.5px solid var(--ink);
}
.sources a:hover { background: var(--paper); }
.empty { text-align: center; padding: 40px 16px; font: 600 26px var(--hand); }
.banner { background: var(--paper); border: 2px dashed var(--ink); border-radius: 16px; padding: 10px 14px; font-size: 14px; }

/* category tints */
.cat-food_deal { background: var(--t-food_deal); } .cat-popup { background: var(--t-popup); }
.cat-event { background: var(--t-event); } .cat-market { background: var(--t-market); }
.cat-nightlife { background: var(--t-nightlife); } .cat-freebie { background: var(--t-freebie); }

/* ---------- map bits ---------- */
.leaflet-container { font-family: var(--body); background: var(--cream); }
.leaflet-bar { border: 2.5px solid var(--ink) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { color: var(--ink) !important; background: var(--paper) !important; }
.leaflet-popup-content-wrapper { border: 2.5px solid var(--ink); border-radius: 14px; background: var(--paper); box-shadow: none; }
.leaflet-popup-tip { background: var(--paper); border: 2.5px solid var(--ink); box-shadow: none; }
.leaflet-popup-content { margin: 10px 14px; font: 14px/1.4 var(--body); }
.leaflet-popup-content b { font: 700 16px/1.25 var(--serif); }
.pop-deal { font-weight: 700; }
.pin svg { display: block; filter: drop-shadow(0 2px 0 rgba(29, 43, 31, 0.25)); }
.pin.active svg { transform: scale(1.25); transform-origin: 50% 100%; }
.landmark svg { display: block; overflow: visible; }
.landmark span { display: block; text-align: center; font: 600 17px/1 var(--hand); color: var(--ink); white-space: nowrap; margin-top: 2px; }
.area-label { color: var(--ink-soft); font: 600 18px/1 var(--hand); text-align: center; white-space: nowrap; pointer-events: none; }
.preview-note { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 4px 10px; font: 12px var(--body); }

/* ---------- footer ---------- */
.foot {
  background: var(--olive); color: var(--paper); text-align: center;
  padding-block: 20px 28px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.foot-art { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto 6px; }
.foot p { margin: 0; font: 12px var(--display); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-block: 0 28px; }
  .hero-art { max-width: 440px; }
  .hero-copy { max-width: none; }
  .logo { font-size: 24px; }
  .logo-pill { font-size: 17px; }
  #search { max-width: none; }
  .layout { grid-template-columns: 1fr; }
  .view-switch {
    display: flex; margin: 0 0 16px; padding: 4px;
    background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px;
  }
  .view-switch button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 999px; font: 13px var(--display); letter-spacing: .08em; text-transform: uppercase; }
  .view-switch button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .layout[data-view="list"] .map-wrap { display: none; }
  .layout[data-view="map"] .list { display: none; }
  .map-wrap { position: relative; top: 0; height: 72vh; min-height: 380px; }
}

/* softened OpenStreetMap tiles + landmark zoom behaviour */
.tint { filter: grayscale(0.6) sepia(0.28) saturate(1.15) brightness(1.05) contrast(0.9); }
.lm-nolabels .landmark span { display: none; }
.lm-hide .landmark { display: none; }

/* your regular deals */
:root {
  --c-happy_hour: #e2462f; --t-happy_hour: #f7bfae;
  --c-bottomless: #b0569e; --t-bottomless: #ecc9e4;
}
.cat-happy_hour { background: var(--t-happy_hour); }
.cat-bottomless { background: var(--t-bottomless); }
.today-pill {
  display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 10px/1.4 var(--display); letter-spacing: .08em;
}
.card.compact { padding: 12px 16px; }
.card.compact h3 { font-size: 18px; margin: 4px 0 6px; }
.card.compact .card-icon { width: 44px; height: 44px; }
.card.compact .card-icon svg { width: 27px; height: 27px; }
.card.compact .where { font-size: 19px; }
.card.compact .sources { margin-top: 6px; }

/* day picker + live now (inspired by happy hour map filters) */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; flex: 1 1 100%; max-width: 560px; }
.days button {
  position: relative; padding: 10px 0 12px; border-radius: 14px; border: 2px solid var(--ink);
  background: var(--paper); font: 500 14px var(--body);
}
.days button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.day-dot { position: absolute; left: 50%; bottom: 4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mustard); }
.live-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper); font: 500 14px var(--body); white-space: nowrap;
}
.live-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #2fa84f; box-shadow: 0 0 0 3px rgba(47, 168, 79, 0.25); }
.live-pill {
  display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px;
  background: #2fa84f; color: #fff; font: 10px/1.4 var(--display); letter-spacing: .08em;
}
@media (prefers-reduced-motion: no-preference) {
  .live-pill, .live-toggle[aria-pressed="true"] .live-dot { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .65; } }
}

/* ---------- details page ---------- */
.detail {
  position: fixed; inset: 0; z-index: 2000; overflow-y: auto; background: var(--cream);
  padding-block: max(16px, env(safe-area-inset-top, 0px)) 48px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
body.detail-open { overflow: hidden; }
.d-wrap { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.d-back { font: 600 15px var(--body); color: var(--ink); text-decoration: none; }
.d-back:hover { text-decoration: underline; }
.d-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.d-head h1 { margin: 0 0 6px; font: 700 clamp(32px, 5vw, 52px)/1.05 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.d-meta { margin: 0; font-size: 16px; color: var(--ink-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.d-meta .sep { margin: 0 6px; opacity: .5; }
.d-live { color: #1f8a3e; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.d-today { color: var(--ink); font-weight: 700; }
.d-actions { display: flex; gap: 10px; }
.d-actions .pill { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
.pill-yellow { background: var(--mustard); }
.pill-plain { background: var(--paper); }
.d-hero {
  border-radius: 24px; border: 3px solid var(--ink); padding: 28px; min-height: 160px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px; position: relative; overflow: hidden;
}
.d-hero-icon { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 120px; height: 120px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); display: grid; place-items: center; }
.d-hero-icon svg { width: 66px; height: 66px; }
.d-deal { margin: 0; font: 700 clamp(22px, 3.2vw, 32px)/1.15 var(--serif); max-width: calc(100% - 150px); text-wrap: balance; }
.d-summary { margin: 0; max-width: min(60ch, calc(100% - 150px)); font-size: 16px; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.d-grid h2 { font: 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 12px; }
.d-grid section > h2:not(:first-child) { margin-top: 28px; }
.d-week { list-style: none; margin: 0; padding: 0; border: 2.5px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--paper); }
.d-week li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1.5px solid #e5dccb; font-variant-numeric: tabular-nums; }
.d-week li:first-child { border-top: 0; }
.d-week li.off { color: #9a9384; }
.d-week li.on .d-time { font-weight: 700; }
.d-week li.is-today { background: var(--mustard); color: var(--ink); }
.d-week em { font: 10px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; font-style: normal; margin-left: 6px; }
.d-when { font-size: 17px; margin: 0; }
.minis { display: grid; gap: 10px; }
.mini {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; text-decoration: none; color: var(--ink);
  border: 2.5px solid transparent; transition: border-color .15s;
}
.mini.cat-other { background: var(--t-other); }
.mini:hover { border-color: var(--ink); }
.mini .card-icon { width: 34px; height: 34px; }
.mini .card-icon svg { width: 18px; height: 18px; }
.mini-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mini-body b { font: 700 16px/1.2 var(--serif); }
.mini-body span { font-size: 14px; }
.mini-body small { font-size: 12px; color: var(--ink-soft); }
.d-map { height: 260px; border-radius: 20px; border: 3px solid var(--ink); overflow: hidden; background: var(--cream); display: grid; place-items: center; }
.d-map p { font: 600 20px var(--hand); }
.d-links { margin-top: 12px; }
.d-share-note { font-size: 13px; color: var(--ink-soft); word-break: break-word; }
.pop-more { font-weight: 700; color: var(--ink); }
@media (max-width: 820px) {
  .d-grid { grid-template-columns: 1fr; }
  .d-hero { padding: 22px; }
  .d-hero-icon { width: 76px; height: 76px; right: 14px; }
  .d-hero-icon svg { width: 42px; height: 42px; }
  .d-deal, .d-summary { max-width: calc(100% - 96px); }
}
.also-tag {
  display: inline-block; vertical-align: 3px; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  border: 1.5px dashed var(--ink); background: var(--paper); font: 500 11px/1.4 var(--body);
}
.chips-label { align-self: center; font: 11px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; white-space: nowrap; }
.chips .count { font-size: 11px; opacity: .6; margin-left: 2px; }
.me-dot { width: 10px; height: 10px; border-radius: 50%; background: #2f6fd6; box-shadow: 0 0 0 3px rgba(47, 111, 214, 0.25); }

/* ---------- option B: calendar strip + type tiles ---------- */
.filters { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 14px; min-width: 0; }
.filters > * { min-width: 0; max-width: 100%; }
.daystrip {
  /* each day at least 74px (phones scroll sideways); on wider screens they stretch to fill the row */
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(74px, 1fr); gap: 8px;
  overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 6px; scrollbar-width: none;
}
.daystrip::-webkit-scrollbar { display: none; }
.daystrip button {
  scroll-snap-align: start; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--paper);
  padding: 8px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s;
}
.daystrip button.wide { grid-column: span 1; }
.daystrip button:hover { transform: translateY(-2px); }
.daystrip button[aria-checked="true"] { background: var(--mustard); }
.daystrip small { font: 10px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.daystrip strong { font: 24px/1.1 var(--display); }
.daystrip button.wide strong { font-size: 15px; line-height: 1.6; }
.daystrip em { font: normal 500 11px/1 var(--body); color: var(--ink-soft); white-space: nowrap; }

.band { background: var(--cream); border: 2.5px solid var(--ink); border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tiles button {
  border: 2.5px solid transparent; border-radius: 14px; padding: 9px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font: 500 13px/1.2 var(--body); background: var(--t-other); transition: border-color .15s, transform .15s;
}
.tiles button:hover { transform: translateY(-1px); }
.tiles button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.tiles .tile-icon svg { width: 24px; height: 24px; display: block; }
.band-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.band-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.more-btn { border: 0; background: none; font: 600 14px var(--body); text-decoration: underline; text-underline-offset: 4px; padding: 6px 2px; }
.more-panel { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; border-top: 2px dashed rgba(29, 43, 31, 0.25); padding-top: 12px; }
@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles button { font-size: 12px; }
}
.more-panel[hidden] { display: none; }

/* "Show more" under the list (cards are drawn 150 at a time so phones don't run out of memory) */
.show-more {
  display: block; width: 100%; margin: 18px 0 8px; padding: 14px 20px;
  border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 600 16px var(--body); cursor: pointer;
}
.show-more:hover { transform: translateY(-1px); }

/* "New to EatClub/First Table? Sign up with my invite" link on cards */
.sources a.promo { background: var(--olive, #5b6b2f); color: var(--paper); border-color: var(--ink); }

/* Food deal sub-filters under the tiles, and the "top deal" badge */
.food-srcs { margin: 10px 0 2px; }
.food-srcs [data-featured] { border-color: var(--ink); font-weight: 600; }
.top-pill {
  display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px;
  background: #f4c438; color: var(--ink); border: 1.5px solid var(--ink); font: 10px/1.4 var(--display); letter-spacing: .08em;
}
.food-srcs[hidden] { display: none; }

/* Cuisine pictures in the cuisine chips */
.chip-icon { display: inline-flex; vertical-align: -4px; margin-right: 5px; }
.chip-icon svg { width: 18px; height: 18px; }
.chips button[aria-pressed="true"] .chip-icon svg { filter: drop-shadow(0 0 0 var(--paper)); }

/* Cuisine group tiles (food deals): a sideways-scrolling row of picture tiles */
.cuisine-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; }
.cuisine-tiles::-webkit-scrollbar { display: none; }
.cuisine-tiles[hidden] { display: none; }
.cuisine-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 10px 6px 8px;
  border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .15s;
}
.cuisine-tile:hover { transform: translateY(-1px); }
.cuisine-tile[aria-pressed="true"] { background: var(--mustard); }
.cuisine-pic svg { width: 34px; height: 34px; }
.cuisine-name { font: 600 12px/1.2 var(--body); text-align: center; }
.cuisine-tile .count { font: 11px/1 var(--body); color: var(--ink-soft); }

/* Picture on the right of a card with its neighbourhood underneath */
.card-badge { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 92px; }
.card-hood {
  font: 600 11px/1.15 var(--body); text-align: center; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Filters, layout A: one slim bar + a Filters panel that slides up ---- */
.fbar { position: relative; display: flex; gap: 6px; align-items: center; }
.when-btn {
  flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 2.5px solid var(--ink); border-radius: 999px; background: var(--mustard); color: var(--ink);
  padding: 9px 14px; font: 700 15px var(--body); cursor: pointer;
}
.fbar .live-toggle { flex: none; }
.filters-btn {
  flex: none; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper);
  padding: 9px 14px; font: 700 15px var(--body); cursor: pointer;
}
.fcount { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--mustard); color: var(--ink); font: 700 13px var(--body); }
.fcount[hidden] { display: none; }
.when-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 1200;
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: 20px; padding: 10px; box-shadow: 0 12px 30px rgba(29, 43, 31, .18);
}
.when-menu[hidden] { display: none; }
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.active-chips:empty { display: none; }
.achip { border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); padding: 4px 10px; font: 500 13px var(--body); cursor: pointer; }
.achip-clear { background: transparent; border-style: dashed; }

.sheet-dim { position: fixed; inset: 0; z-index: 2000; background: rgba(29, 43, 31, .4); }
.sheet-dim[hidden] { display: none; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px; max-height: 85vh; z-index: 2001;
  display: flex; flex-direction: column; background: var(--cream); border: 3px solid var(--ink); border-bottom: 0;
  border-radius: 26px 26px 0 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(29, 43, 31, .25);
}
.sheet[hidden] { display: none; }
.sheet .grab { width: 46px; height: 5px; border-radius: 3px; background: var(--ink-soft); margin: 0 auto 8px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font: 20px var(--display); }
.sheet-clear { background: none; border: 0; text-decoration: underline; font: 600 14px var(--body); color: var(--ink); cursor: pointer; }
.sheet-body { overflow-y: auto; padding: 2px 2px 8px; }
.sheet-label { margin: 16px 2px 8px; font: 11px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.sheet .chips { flex-wrap: wrap; overflow: visible; }
.sheet .cuisine-tiles { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); overflow: visible; }
.sheet .toggle { display: inline-flex; margin-top: 14px; }
.sheet-go { margin-top: 10px; width: 100%; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); padding: 13px; font: 700 16px var(--body); cursor: pointer; }
body.sheet-open { overflow: hidden; }
/* Narrow phones: tighter bar so "Today" isn't cut off */
@media (max-width: 440px) {
  .fbar { gap: 5px; }
  .fbar .cal { display: none; }
  .when-btn, .filters-btn { padding: 8px 11px; font-size: 14px; }
  .fbar .live-toggle { padding: 7px 10px; font-size: 14px; }
}

/* ---- Phones: compact top (logo + search on one line, the whole drawing small beside a one-line
   headline, slimmer ribbon) so the first deals are on screen straight away ---- */
@media (max-width: 760px) {
  .masthead { flex-wrap: nowrap; padding-block: 10px; gap: 10px; }
  .logo { font-size: 22px; gap: 6px; }
  .logo-pill { font-size: 15px; padding: 3px 9px 4px; }
  #search { flex: 1 1 auto; min-width: 0; padding: 8px 12px; font-size: 14px; }
  .hero { grid-template-columns: 132px 1fr; padding-block: 0 8px; gap: 12px; align-items: center; }
  .hero-art { width: 132px; height: auto; }
  .eyebrow { margin: 0 0 4px; font-size: 10px; }
  .hero h1 { font-size: 19px; margin: 0; }
  .lede, .hero-actions { display: none; }
  .ribbon { height: 56px; }
  .ribbon text { font-size: 15px; }
}

/* "Times checked 7:52pm" under EatClub / First Table deals */
.forecast-note { margin: -2px 0 6px; font: 500 12px/1.3 var(--body); color: var(--ink-soft); }

/* "Arrive 6pm–9:30pm today" on EatClub cards */
.forecast-note .arrive { color: var(--ink); font-weight: 700; font-size: 13px; }

/* Card right column floats, so the heading, name and deal sit beside it; times stack under the picture */
.card .card-top { display: block; }
.card .card-badge { float: right; margin: 0 0 6px 10px; }
.card .sources { clear: both; }
.card .sources:empty { display: none; }
.times { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 4px; }
.times-label { font: 10px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.times .slot { display: inline-block; border: 2px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 2px 8px; font: 700 12px var(--body); white-space: nowrap; }
.times-more { font: 600 11px var(--body); color: var(--ink-soft); }
.times-checked { font: 500 10px/1.2 var(--body); color: var(--ink-soft); text-align: center; }
.card::after { content: ""; display: block; clear: both; }

/* How to get the deal, under the big deal in the details */
.d-how { margin: 6px 0 10px; font: 600 15px/1.35 var(--body); }
.d-how-btn {
  display: inline-block; margin-bottom: 6px; padding: 9px 16px; border-radius: 999px; border: 2.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 700 15px var(--body); text-decoration: none;
}
.d-hero .d-how { max-width: calc(100% - 96px); }
.d-hero .d-how-btn { display: inline-block; width: auto; max-width: calc(100% - 96px); }

/* Which app/source a similar deal is from */
.mini-src { display: inline-block; margin-top: 3px; padding: 1px 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font: 600 11px var(--body); width: fit-content; }

/* ---------- add to home screen helper ---------- */
.install {
  position: fixed; inset: 0; z-index: 3000; background: rgba(29, 43, 31, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.install[hidden] { display: none; }
.install-card {
  width: 100%; max-width: 440px; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px;
  padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 12px; text-align: left;
}
.install-icon { border-radius: 18px; border: 2.5px solid var(--ink); align-self: center; }
.install-card h2 { margin: 0; font: 700 22px/1.2 var(--serif); text-align: center; text-wrap: balance; }
.install-card p { margin: 0; font-size: 15px; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; }
.share-ico { display: inline-flex; vertical-align: middle; color: #2f6fd6; }
.install-note { color: var(--ink-soft); font-size: 13px !important; }
.install-go { align-self: center; color: var(--ink); }
.install-close { border: 0; background: none; font: 600 14px var(--body); text-decoration: underline; text-underline-offset: 4px; padding: 6px; align-self: center; color: var(--ink); }
.foot .add-home { color: var(--paper); font: 600 14px var(--body); text-transform: none; letter-spacing: 0; }
@media (min-width: 821px) { .install { align-items: center; } }

/* "on EatClub" / "on First Table" badge next to the deal */
.app-pill {
  display: inline-block; vertical-align: 3px; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  border: 1.5px solid var(--ink); font: 700 11px/1.4 var(--body); letter-spacing: .02em; white-space: nowrap;
  background: var(--ink); color: var(--paper);
}
.app-eatclub { background: #1d2b1f; color: #fffaf0; }
.app-firsttable { background: #fffaf0; color: #1d2b1f; }
.app-neotaste { background: #cfd0f3; color: #1d2b1f; }
.app-unidays { background: #b9d4ec; color: #1d2b1f; }

/* Several deals at one place: one identical row each */
.deal-rows { clear: both; list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 6px; }
.deal-rows li { min-width: 0; }
.deal-rows a { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 16px; background: #fffaf0; color: var(--ink); text-decoration: none; }
.deal-rows .dr-deal { font: 700 15px/1.2 var(--body); }
.deal-rows .app-pill { margin-left: 0; vertical-align: 0; }
.deal-rows .dr-times { flex-basis: 100%; min-width: 0; max-width: 100%; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin-top: 3px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.deal-rows .dr-times::-webkit-scrollbar { display: none; }
.deal-rows .dr-times > * { flex: none; }
.deal-rows .dr-when { font: 9.5px/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; margin-right: 1px; }
.deal-rows .slot { display: inline-block; border: 1.5px solid var(--ink); background: var(--t-other, #ede2cc); border-radius: 999px; padding: 2px 7px; font: 700 12px var(--body); white-space: nowrap; }
.deal-rows .dr-more, .deal-rows .dr-checked { font: 500 11.5px var(--body); color: var(--ink-soft); }
.app-other { background: #fffaf0; color: #1d2b1f; }
.picker-card .pick { display: grid; gap: 2px; text-align: left; width: 100%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 16px; background: #fffaf0; font: 15px var(--body); color: var(--ink); }
.picker-card .pick span { font-size: 13px; opacity: .75; }

.deal-rows .dr-other { font: 500 12.5px var(--body); color: var(--ink-soft); padding-left: 4px; }

/* Open now / Closed (opening hours from OpenStreetMap) */
.open-pill { display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--ink); font: 700 11px/1.3 var(--body); text-align: center; white-space: nowrap; }
.open-pill.is-open { background: #d3e6b2; }
.open-pill.is-closed { background: #fffaf0; color: var(--ink-soft); }
.card-badge .open-pill { white-space: normal; max-width: 92px; }
