/* FreeBite — dark base, amber means free, ember means going soon.
   Mobile-first: bottom nav, thumb-reachable actions, cards sized for a phone. */

:root {
  --ink:        #131110;
  --ink-2:      #1A1715;
  --surface:    #201C19;
  --surface-up: #2B2522;
  --line:       rgba(255,255,255,.07);
  --line-2:     rgba(255,255,255,.13);
  --cream:      #F8F4ED;
  --muted:      #8F8780;
  --muted-2:    #6B635C;
  --amber:      #FFB627;
  --amber-dim:  rgba(255,182,39,.14);
  --ember:      #FF5442;
  --ember-dim:  rgba(255,84,66,.13);
  --mint:       #6FD08C;
  --mint-dim:   rgba(111,208,140,.13);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --gut:  16px;

  --display: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --body:    system-ui, -apple-system, "Segoe UI", sans-serif;
  --data:    ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;

  --nav-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; background: var(--ink); color: var(--cream);
  font-family: var(--body); -webkit-font-smoothing: antialiased; }

body {
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 78px);
  max-width: 760px; margin-inline: auto;
}

button, select, input { font-family: inherit; }

/* ---------- gate ---------- */

.gate[hidden], .sheet[hidden] { display: none !important; }

.gate {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: var(--gut);
}

.gate-panel { max-width: 380px; width: 100%; text-align: center; }

.gate-icon {
  font-size: 40px; color: var(--amber);
  margin-bottom: 14px; line-height: 1;
}

.gate-panel h1 {
  font-family: var(--display); font-size: 26px;
  margin: 0 0 10px; line-height: 1.2;
}

.gate-panel p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 20px; }

.gate-points {
  list-style: none; padding: 0; margin: 0 0 24px;
  text-align: left; display: flex; flex-direction: column; gap: 9px;
}

.gate-points li {
  color: var(--muted); font-size: 13.5px;
  padding-left: 22px; position: relative;
}

.gate-points li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--mint); font-weight: 700;
}

/* ---------- topbar ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gut) 10px;
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(var(--ink) 72%, transparent);
}

.brand { font-family: var(--data); font-size: 14px; letter-spacing: 2.2px; }
.brand-mark { color: var(--amber); font-weight: 700; }

.loc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: none; color: var(--cream);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer;
  max-width: 190px;
}

.loc-chip:active { background: var(--surface-up); }

#locLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.loc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted-2); flex-shrink: 0;
}

.loc-chip.is-live .loc-dot { background: var(--mint); box-shadow: 0 0 0 3px var(--mint-dim); }

/* ---------- views ---------- */

.view { display: none; padding: 0 var(--gut); }
.view.is-active { display: block; animation: fade .18s ease-out; }

@keyframes fade { from { opacity: 0; transform: translateY(5px); } }

.alert-strip { font-size: 13.5px; font-weight: 500; color: var(--ember);
  margin: 2px 0 12px; }
.muted-strip { color: var(--muted); font-weight: 400; }

/* The close button floats top-right; keep headings clear of it. */
#sheetBody > h2:first-child { padding-right: 46px; }

/* ---------- welcome offer banner ----------
   Amber-tinted rather than red: this is good news waiting to be collected,
   not something about to expire. */

.welcome-banner {
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent);
  border-radius: 12px;
  padding: 11px 13px;
  margin: 2px 0 12px;
  font-size: 13.5px;
  line-height: 1.45;
}
.welcome-banner { padding: 0; }
.welcome-open {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title arrow" "sub arrow";
  gap: 2px 10px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  background: none; border: 0; border-radius: 12px;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.welcome-open strong { grid-area: title; color: var(--amber); }
.welcome-open .muted { grid-area: sub; font-size: 12.5px; }
.welcome-arrow { grid-area: arrow; color: var(--amber); font-size: 18px; }
.welcome-open:active { opacity: .7; }

/* ---------- welcome offer list (inside the sheet) ---------- */

.wo-list { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 4px; }
.wo-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cream) 8%, transparent);
}
.wo-main { flex: 1; min-width: 0; }
.wo-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.wo-merchant { font-weight: 700; font-size: 14px; }
.wo-value { font-family: var(--data); font-size: 11.5px; color: var(--muted); }
.wo-title { font-size: 13.5px; margin-top: 2px; }
.wo-req { font-size: 12px; color: var(--muted); margin-top: 3px; }
.wo-trust { font-family: var(--data); font-size: 10px; letter-spacing: .6px;
  color: var(--muted); margin-top: 5px; text-transform: uppercase; }
.wo-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.wo-actions .btn-primary { text-align: center; text-decoration: none; }

@media (max-width: 380px) {
  .wo-row { flex-direction: column; align-items: stretch; }
  .wo-actions { flex-direction: row; }
  .wo-actions > * { flex: 1; }
}

/* ---------- upcoming food holidays ---------- */

.holiday-strip {
  background: var(--surface);
  border-radius: 12px;
  padding: 11px 13px 4px;
  margin: 0 0 14px;
}
.holiday-row {
  display: flex; gap: 8px; align-items: baseline;
  padding: 6px 0;
  font-size: 13px;
  border-top: 1px solid color-mix(in srgb, var(--cream) 8%, transparent);
}
.holiday-strip .holiday-row:first-of-type { border-top: 0; }
.holiday-when {
  font-family: var(--data); font-size: 11px;
  color: var(--amber); white-space: nowrap;
  min-width: 74px;
}
.holiday-name { font-weight: 600; }
.holiday-row .muted { font-size: 12px; margin-left: auto; text-align: right; }

@media (max-width: 380px) {
  .holiday-row { flex-wrap: wrap; }
  .holiday-row .muted { margin-left: 0; width: 100%; text-align: left; }
}

/* ---------- claimed list ----------
   Deliberately quieter than the deal cards. This is a record, not an offer —
   it shouldn't compete for attention with food you can still get. */

.claimed-summary {
  font-family: var(--data); font-size: 12px; color: var(--muted);
  margin: 0 0 12px;
}
.claim-month {
  font-family: var(--data); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted);
  margin: 18px 0 6px;
}
.claim-month:first-child { margin-top: 2px; }

.claim-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cream) 8%, transparent);
}
.claim-row.is-dead { opacity: .45; }
.claim-main { flex: 1; min-width: 0; }
.claim-head { display: flex; gap: 8px; align-items: baseline; }
.claim-merchant { font-weight: 700; font-size: 14px; }
.claim-value { font-family: var(--data); font-size: 11.5px; color: var(--mint); margin-left: auto; }
.claim-title { font-size: 13.5px; margin-top: 2px; }
.claim-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 6px;
  font-family: var(--data); font-size: 10px; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
}
.claim-when { color: var(--amber); }
.claim-req { font-size: 12px; color: var(--muted); margin-top: 5px; }
.claim-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.claim-actions .btn-ghost { text-align: center; text-decoration: none; white-space: nowrap; }
.btn-danger { color: var(--ember); border-color: color-mix(in srgb, var(--ember) 35%, transparent); }

@media (max-width: 380px) {
  .claim-row { flex-direction: column; }
  .claim-actions { flex-direction: row; width: 100%; }
  .claim-actions > * { flex: 1; }
}

/* ---------- filters ---------- */

.filter-row {
  display: flex; gap: 8px; align-items: center;
  padding-bottom: 14px; flex-wrap: wrap;
}

.pill-toggle {
  background: var(--surface); border: 1px solid transparent;
  color: var(--muted); border-radius: 999px;
  padding: 8px 15px; font-size: 13px; font-weight: 500; cursor: pointer;
}

.pill-toggle.is-on {
  background: var(--amber-dim); border-color: rgba(255,182,39,.35);
  color: var(--amber);
}

.range-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border-radius: 999px;
  padding: 7px 15px; font-family: var(--data); font-size: 12.5px;
  color: var(--muted);
}

.range-chip input { accent-color: var(--amber); width: 92px; }

.input {
  display: block; width: 100%;
  background: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); color: var(--cream);
  padding: 12px; font-size: 14.5px; margin: 8px 0;
}

.input-sm { width: auto; flex: 1; min-width: 130px; margin: 0;
  padding: 8px 11px; font-size: 13px; border-radius: 999px; }

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

.btn-primary {
  background: var(--amber); color: var(--ink); border: none;
  border-radius: 13px; padding: 13px 20px;
  font-family: var(--display); font-weight: 700; font-size: 15.5px; cursor: pointer;
}

.btn-ghost {
  background: transparent; border: 1px solid var(--line-2); color: var(--cream);
  border-radius: 13px; padding: 12px 18px; font-size: 14px; cursor: pointer;
}

.btn-ghost:active { background: var(--surface); }
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 999px; }

/* ---------- cards ---------- */

.card-list { display: flex; flex-direction: column; gap: 11px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--gut);
  width: 100%; text-align: left; color: inherit;
  font-family: var(--body); cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}

.card:active { transform: scale(.988); background: var(--surface-up); }
.card.is-urgent { border-color: rgba(255,84,66,.4); }
.card.is-now    { border-color: rgba(111,208,140,.38); }
.card.is-dim    { opacity: .6; }

.card-head {
  display: flex; justify-content: space-between;
  gap: 10px; align-items: flex-start;
}

.merchant {
  font-family: var(--data); font-size: 10.5px; letter-spacing: 1.3px;
  color: var(--muted-2); text-transform: uppercase;
}

.card-title {
  font-family: var(--display); font-size: 18.5px; font-weight: 700;
  margin: 4px 0 0; line-height: 1.25;
}

.card-body { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; line-height: 1.5; }

.card-foot {
  display: flex; align-items: center; gap: 11px;
  margin-top: 13px; flex-wrap: wrap;
}

.badge {
  font-family: var(--data); font-size: 10px; font-weight: 700;
  letter-spacing: .7px; padding: 4px 9px; border-radius: 999px;
  white-space: nowrap;
}

.badge-free  { background: var(--amber); color: var(--ink); }
.badge-now   { background: var(--mint);  color: var(--ink); }
.badge-soft  { background: var(--surface-up); color: var(--cream); }
.badge-warn  { background: var(--ember); color: #fff; }
.badge-la    { background: var(--surface-up); color: var(--mint); }

.requirement { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.meta-line   { font-family: var(--data); font-size: 11.5px; color: var(--muted-2); margin: 7px 0 0; }

.countdown {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--data); font-size: 12.5px; font-weight: 600;
  color: var(--amber); font-variant-numeric: tabular-nums;
}

.countdown.is-urgent { color: var(--ember); }
.countdown .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.countdown.is-urgent .dot { animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .22; } }

.distance { font-family: var(--data); font-size: 11.5px; color: var(--muted); }

.trust { font-size: 10.5px; margin-left: auto; }
.trust.verified  { color: var(--mint); }
.trust.community { color: var(--amber); }
.trust.unverified{ color: var(--muted-2); }

.link-out {
  color: var(--amber); font-size: 12.5px; text-decoration: none;
  display: inline-block; margin-top: 9px;
  border: 1px solid var(--amber); border-radius: 999px; padding: 6px 13px;
}

/* ---------- map ---------- */

#mapCanvas {
  height: 58vh; min-height: 340px;
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.map-controls { display: flex; gap: 8px; padding-bottom: 12px; flex-wrap: wrap; }

.map-note { font-size: 11.5px; color: var(--muted-2); margin: 11px 0 0; line-height: 1.5; }

.leaflet-container { background: #1A1715; font-family: var(--body); }

/* Dark basemap without a paid tile provider.

   OpenStreetMap only publishes a light basemap, and CARTO's dark one now wants
   an API key (it started stamping "API KEY REQUIRED" across every tile). So the
   tiles come from OSM and get darkened here instead.

   Scoped to .leaflet-tile-pane on purpose: Leaflet keeps markers, popups and
   controls in sibling panes, so they keep their real colors and the amber pins
   still read as amber. Inverting the whole map container would turn them blue.

   invert + hue-rotate is the standard pairing — invert alone flips the color
   wheel too, so the 180° rotation puts hues back where they started; the rest
   just takes the glare off. */
.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.55);
}

.leaflet-popup-content-wrapper {
  background: var(--surface); color: var(--cream);
  border-radius: var(--r-sm); box-shadow: 0 8px 26px rgba(0,0,0,.5);
}

.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 13px 15px; font-size: 13.5px; }

.pop-name { font-family: var(--display); font-weight: 700; font-size: 15px; margin: 0 0 3px; }
.pop-sub  { color: var(--muted); font-size: 12.5px; margin: 0 0 7px; }
.pop-link { color: var(--amber); font-size: 12.5px; text-decoration: none; font-weight: 600; }

.pin {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--ink);
  border: 2px solid rgba(0,0,0,.35);
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.pin-deal  { background: var(--amber); }
.pin-happy { background: var(--mint); }
.pin-me    { background: #4C9BFF; width: 16px; height: 16px;
             box-shadow: 0 0 0 6px rgba(76,155,255,.25); }

/* ---------- hungry button ---------- */

.hungry-btn {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  width: min(calc(100% - 32px), 728px);
  background: var(--amber); color: var(--ink); border: none;
  border-radius: 999px; padding: 16px;
  font-family: var(--display); font-weight: 700; font-size: 16.5px;
  cursor: pointer; z-index: 40;
  box-shadow: 0 8px 28px rgba(0,0,0,.55), 0 0 0 1px rgba(255,182,39,.3);
}

.hungry-btn:active { transform: translateX(-50%) scale(.982); }
.hungry-glyph { margin-right: 7px; }

/* ---------- bottom nav ---------- */

.bottom-nav {
  position: fixed; left: 0; right: 0;
  bottom: 0; z-index: 50;
  display: flex;
  background: rgba(19,17,16,.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 2px; color: var(--muted-2);
  height: var(--nav-h);
  justify-content: center;
}

.nav-glyph { font-size: 17px; line-height: 1; }
.nav-label { font-size: 10px; letter-spacing: .2px; }
.nav-item.is-active { color: var(--amber); }

/* ---------- sheets ---------- */

.sheet {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.66);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease-out;
}

.sheet-panel {
  background: var(--ink); width: min(100%, 760px);
  max-height: 92vh; overflow-y: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 26px var(--gut) calc(40px + env(safe-area-inset-bottom, 0px));
  position: relative; animation: rise .22s cubic-bezier(.2,.8,.3,1);
}

.sheet-compact { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }

@keyframes rise { from { transform: translateY(26px); } }

.sheet-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface); border: none; color: var(--muted);
  font-size: 15px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
}

.sheet-title { font-family: var(--display); font-size: 19px; margin: 0 0 16px; }

.sheet-panel h2:not(.sheet-title) {
  font-family: var(--display); font-size: 27px;
  margin: 6px 0 10px; line-height: 1.18;
}

.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.more-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 17px 14px;
  color: var(--cream); font-size: 14.5px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  font-weight: 500;
}

.more-item span { font-size: 19px; color: var(--amber); }
.more-item:active { background: var(--surface-up); }

.facts { display: flex; gap: 22px; margin: 19px 0; flex-wrap: wrap; }
.fact-label { font-family: var(--data); font-size: 9.5px; letter-spacing: 1px;
  color: var(--muted-2); text-transform: uppercase; }
.fact-value { font-family: var(--data); font-size: 14.5px; margin-top: 3px; }

.warn {
  background: var(--ember-dim); color: var(--ember);
  border-radius: var(--r-sm); padding: 13px;
  font-size: 13.5px; font-weight: 500; margin: 14px 0; line-height: 1.5;
}

.redeem-btn {
  display: block; width: 100%; text-align: center;
  background: var(--amber); color: var(--ink); border: none;
  border-radius: 14px; padding: 16px;
  font-family: var(--display); font-weight: 700; font-size: 16.5px;
  text-decoration: none; cursor: pointer; margin: 10px 0 14px;
}

.outcome, .steps {
  background: var(--surface); border-radius: var(--r); padding: 15px; margin: 14px 0;
}

.outcome h3, .steps h3 { font-family: var(--display); font-size: 15.5px; margin: 0 0 11px; }
.outcome-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-yes { background: var(--mint); color: var(--ink); border: none;
  border-radius: 11px; padding: 11px 17px; font-weight: 600; cursor: pointer; }
.btn-no { background: transparent; color: var(--ember); border: 1px solid var(--ember);
  border-radius: 11px; padding: 11px 17px; font-weight: 600; cursor: pointer; }

.steps ol { margin: 0; padding-left: 20px; color: var(--muted);
  font-size: 13.5px; line-height: 1.75; }
.steps ol::marker { color: var(--amber); }

.secondary-row { display: flex; gap: 9px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- panels + stats ---------- */

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--gut); margin-bottom: 12px;
}

.panel h2 { font-family: var(--display); font-size: 17px; margin: 0 0 7px; }

.muted { color: var(--muted); font-size: 13.5px; margin: 0 0 11px; line-height: 1.5; }
.fineprint { color: var(--muted-2); font-size: 11.5px; margin: 10px 0 0; line-height: 1.5; }

.eyebrow { font-family: var(--data); font-size: 10.5px; letter-spacing: 1.4px;
  color: var(--muted-2); text-transform: uppercase; }

.stat-huge { font-family: var(--data); font-size: 46px; font-weight: 700;
  color: var(--amber); font-variant-numeric: tabular-nums; margin: 5px 0; }
.stat-big  { font-family: var(--data); font-size: 34px; font-weight: 700;
  color: var(--amber); margin: 4px 0; }

.stat-head { display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; padding: 4px 0 18px; }

.savings-hero { padding: 8px 0 22px; }
.section-title { font-family: var(--display); font-size: 17px; margin: 0 0 11px; }

.group-head {
  font-family: var(--display); font-size: 15.5px; margin: 22px 0 10px;
  display: flex; align-items: center; gap: 8px;
}

.group-head .count { font-family: var(--data); font-size: 11.5px;
  font-weight: 400; color: var(--muted-2); }

.history-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border-radius: var(--r-sm); padding: 13px;
}

.history-row .amt { font-family: var(--data); color: var(--mint); font-size: 14.5px; }
.history-row .sub { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

.empty { text-align: center; padding: 64px 16px; }
.empty-mark { font-size: 32px; color: var(--muted-2); margin-bottom: 12px; }
.empty h2 { font-family: var(--display); font-size: 19px; margin: 0 0 7px; }
.empty p { color: var(--muted); font-size: 13.5px; margin: 0; }

.bday-inputs { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Dine LA ---------- */

.dl-hero {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px var(--gut);
  text-align: center; margin-bottom: 13px;
}

.dl-hero h2 { font-family: var(--display); font-size: 25px; margin: 9px 0; line-height: 1.22; }
.dl-state { font-family: var(--data); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted-2); }
.dl-state.is-active { color: var(--mint); }
.dl-state.is-soon { color: var(--amber); }
.dl-countdown { font-family: var(--data); font-size: 38px; font-weight: 700;
  color: var(--amber); font-variant-numeric: tabular-nums; margin: 11px 0 5px; }
.dl-dates { font-family: var(--data); font-size: 13.5px; color: var(--muted); margin: 0 0 18px; }
.dl-cta { display: inline-block; background: var(--amber); color: var(--ink);
  border-radius: 13px; padding: 13px 22px; font-family: var(--display);
  font-weight: 700; font-size: 15px; text-decoration: none; }
.dl-note { background: var(--surface); border-radius: var(--r); padding: 15px;
  font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.dl-note strong { color: var(--cream); font-weight: 600; }
.dl-checked { font-family: var(--data); font-size: 10.5px; color: var(--muted-2);
  text-align: center; margin-top: 14px; }

/* ---------- sports ---------- */

.trigger-line { font-family: var(--data); font-size: 11.5px; color: var(--mint);
  margin: 8px 0 0; line-height: 1.5; }
.trigger-line.is-pending { color: var(--muted-2); }

.code-chip {
  display: inline-block; background: var(--ink-2);
  border: 1px dashed var(--amber); color: var(--amber);
  font-family: var(--data); font-size: 13px; font-weight: 700; letter-spacing: 1.2px;
  padding: 6px 13px; border-radius: var(--r-sm); margin-top: 10px;
}

.urgent-flag { background: var(--ember-dim); color: var(--ember);
  border-radius: var(--r-sm); padding: 11px; font-size: 11.5px;
  margin-top: 10px; line-height: 1.55; }

/* ---------- happy hour ---------- */

.hh-window { font-family: var(--data); font-size: 12.5px; font-weight: 600;
  color: var(--amber); margin-top: 8px; display: block; }
.hh-window.is-now { color: var(--mint); }
.hh-window.is-later { color: var(--muted); }
.hh-ending { font-family: var(--data); font-size: 11.5px; color: var(--ember);
  margin-top: 5px; display: block; }

/* ---------- birthday ---------- */

.window-line { font-family: var(--data); font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.note-line { font-size: 12px; color: var(--muted-2); font-style: italic; margin-top: 6px; }
.validity { font-family: var(--data); font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

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

@media (min-width: 620px) {
  .card-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .more-grid { grid-template-columns: repeat(3, 1fr); }
  #mapCanvas { height: 62vh; }
}

/* ---------- craving picker ---------- */

.craving-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px;
}
.craving {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--cream); font-family: var(--body);
}
.craving:active { background: var(--surface-up); }
.craving-label { font-size: 14px; font-weight: 600; }
.craving-count {
  font-family: var(--data); font-size: 12px; color: var(--amber);
}
.craving.is-empty { opacity: .35; cursor: default; }
.craving.is-empty .craving-count { color: var(--muted-2); }

/* ---------- student category chips ----------
   A horizontal scroller rather than a wrapping grid: sixteen categories
   wrapped four deep pushed the actual deals below the fold. */

.cat-row {
  display: flex; gap: 7px;
  overflow-x: auto;
  padding: 2px 0 12px;
  margin: 0 -16px 2px;
  padding-left: 16px; padding-right: 16px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cream) 14%, transparent);
  background: var(--surface);
  color: var(--cream);
  font: inherit; font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.cat-chip.is-on {
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  border-color: color-mix(in srgb, var(--amber) 45%, transparent);
  color: var(--amber);
}
.cat-n { font-family: var(--data); font-size: 10.5px; opacity: .65; }
.cat-chip.is-on .cat-n { opacity: .9; }

/* ---------- auth sheet ---------- */

.auth-oauth { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 4px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 12px;
  color: var(--muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: color-mix(in srgb, var(--cream) 12%, transparent);
}

.auth-pw { margin-top: 14px; }
.auth-pw summary {
  cursor: pointer; font-size: 13px; color: var(--muted);
  padding: 6px 0; list-style: none;
}
.auth-pw summary::-webkit-details-marker { display: none; }
.auth-pw summary::before { content: '▸ '; }
.auth-pw[open] summary::before { content: '▾ '; }
.auth-row { display: flex; gap: 8px; margin-top: 8px; }
.auth-row > * { flex: 1; }

#authNote.is-error { color: var(--ember); }
