/* Eventually — "Clay" brand theme (Direction 01, Ellipsis).
 * Cream canvas, ink text, clay reserved for the one thing to tap.
 * Sora for display/UI, Space Mono for the facts. */
:root {
  --cream:   #F4ECE2;
  --canvas:  #EAE1D4;
  --paper:   #ffffff;
  --ink:     #211A15;
  --clay:    #CB5A3C;
  --apricot: #E0875F;
  --ember:   #8A3B1E;

  --muted:   #6f665a;
  --faint:   #8a8071;
  --hint:    #a89c8a;
  --line:    #e6dccd;
  --line-2:  #d9cdba;

  /* aliases kept so existing selectors resolve onto the new palette */
  --bg: var(--canvas); --bg2: var(--cream);
  --panel: rgba(255,255,255,0.82); --panel-2: #ffffff;
  --stroke: var(--line); --stroke-2: var(--line-2);
  --text: var(--ink); --cyan: var(--clay); --accent: var(--clay);

  --radius: 14px;
  --shadow:    0 1px 3px rgba(33,26,21,0.10);
  --shadow-lg: 0 20px 50px rgba(33,26,21,0.20);
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  /* grey "outer space" — cream sphere reads as a planet against it */
  background:
    radial-gradient(1150px 780px at 72% -8%, #bdbab3 0%, #aaa79f 46%, #9a978f 100%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* faint dotted paper texture instead of a starfield */
#stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(33,26,21,0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: .5;
}

#globe { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; cursor: grab; }
#globe.grabbing { cursor: grabbing; }

#hovertip {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%);
  z-index: 20; padding: 6px 13px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  border: 1px solid rgba(203,90,60,0.55);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  opacity: 0; transition: opacity .2s; pointer-events: none;
  box-shadow: var(--shadow);
}
/* Subtle "loading live events" hint while the globe waits for the backend. */
#globe-loading {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 18; display: none; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(33,26,21,0.72); color: var(--cream);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  pointer-events: none; box-shadow: var(--shadow);
}
#globe-loading.show { display: inline-flex; }
#globe-loading .gl-dots { display: inline-flex; gap: 4px; }
#globe-loading .gl-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--clay); opacity: .4; animation: glPulse 1s infinite; }
#globe-loading .gl-dots i:nth-child(2) { animation-delay: .15s; }
#globe-loading .gl-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes glPulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 22px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dots { display: flex; align-items: center; gap: 5px; }
.brand-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--clay); display: block; }
.brand-dots i:nth-child(1) { opacity: .35; }
.brand-dots i:nth-child(2) { opacity: .65; }
.brand-dots i:nth-child(3) { animation: evPulse 1.8s ease-in-out infinite; }
@keyframes evPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.28); opacity: .55; } }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }

.search-wrap { position: relative; flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; }
.search-ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--faint); z-index: 1;
}
#search {
  flex: 1; min-width: 0; padding: 11px 14px 11px 40px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); font-size: 14px; font-family: var(--font);
  outline: none; transition: border-color .2s, box-shadow .2s; box-shadow: var(--shadow);
}
#search:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(203,90,60,.14); }
#search::placeholder { color: var(--hint); }

#search-results {
  position: absolute; top: 50px; left: 0; right: 0; display: none;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg);
}
#search-results.show { display: block; }
#search-results button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; background: none; border: 0; color: var(--ink);
  font-size: 14px; font-family: var(--font); text-align: left; cursor: pointer;
}
#search-results button:hover { background: #faf3ea; }
#search-results button small { color: var(--faint); margin-left: auto; font-family: var(--mono); font-size: 11px; }
#search-results .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
#search-results .no-hits { padding: 14px; color: var(--muted); font-size: 14px; }
/* City results sit at the top, visually distinct from individual events. */
#search-results .sr-city { font-weight: 700; border-bottom: 1px solid var(--line); }
#search-results .sr-city:last-of-type { border-bottom: 1px solid var(--line-2); }
#search-results .dot.city { width: auto; height: auto; font-size: 13px; line-height: 1; }
#search-results .sr-explore small { color: var(--clay); }

.nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.stats { display: flex; gap: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.stats b { color: var(--ink); font-size: 13px; font-weight: 700; }
.stats .muted b { color: var(--faint); }
.nav-btn {
  padding: 9px 14px; border-radius: 11px; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  background: var(--clay); color: var(--cream); border: 0;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.nav-btn:hover { transform: translateY(-1px); background: #b94e32; box-shadow: 0 8px 22px rgba(203,90,60,.30); }
.nav-btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line-2); }
.nav-btn.ghost:hover { background: #faf3ea; border-color: var(--clay); box-shadow: none; }
.nav-btn.signed { display: flex; align-items: center; gap: 8px; background: var(--paper); color: var(--ink); border: 1px solid var(--line-2); }
.avatar {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--clay); color: var(--cream); font-size: 12px; font-weight: 700;
}

/* ---------- legend ---------- */
.legend {
  position: fixed; left: 22px; bottom: 150px; z-index: 25;
  display: flex; flex-direction: column; gap: 9px;
  font-size: 12.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
  padding: 14px 16px; border-radius: 14px; backdrop-filter: blur(8px); box-shadow: var(--shadow);
}
.legend div { display: flex; align-items: center; gap: 9px; }
.legend .lg { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-up { background: var(--apricot); box-shadow: 0 0 8px rgba(224,135,95,.6); }
.pillar { width: 4px !important; height: 16px !important; border-radius: 3px !important; background: linear-gradient(var(--ink), var(--clay)); }
.bright { background: var(--clay); box-shadow: 0 0 12px rgba(203,90,60,.7); }
.count { width: 16px !important; height: 13px !important; border-radius: 5px !important; background: var(--clay); box-shadow: none; }
.legend-hint { margin-top: 4px; color: var(--hint); font-size: 11.5px; }

/* ---------- globe controls ---------- */
.globe-controls {
  position: fixed; right: 22px; bottom: 150px; z-index: 27;
  display: flex; flex-direction: column; gap: 8px;
}
.ctl {
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; font-size: 20px; font-weight: 600;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--ink);
  box-shadow: var(--shadow); transition: .15s;
}
.ctl:hover { border-color: var(--clay); transform: translateY(-1px); }
.ctl.active { background: var(--clay); border-color: var(--clay); color: var(--cream); }
.ctl svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- location popup ---------- */
.place {
  position: fixed; top: 78px; right: -460px; z-index: 40;
  width: 400px; max-width: calc(100vw - 28px);
  max-height: calc(100vh - 180px); display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg);
  transition: right .35s cubic-bezier(.22,1,.36,1);
}
.place.open { right: 18px; }
.place-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--line);
}
.place-city { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.place-count { margin: 6px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); }
.place-close {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none;
  background: #ece2d4; color: var(--ink); border: 0; font-size: 14px;
}
.place-close:hover { background: var(--clay); color: var(--cream); }
.place-list { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.place-list::-webkit-scrollbar { width: 8px; }
.place-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }

.badge { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.badge.live { color: var(--cream); background: var(--clay); }
.badge.soon { color: var(--ember); background: rgba(224,135,95,.22); }

/* compact event card */
.ev {
  display: flex; gap: 0; border-radius: 14px; overflow: hidden;
  flex: 0 0 auto; width: 100%; text-align: left; cursor: pointer; padding: 0; color: inherit;
  font-family: var(--font);
  background: var(--paper); border: 1px solid var(--line); transition: border-color .18s, box-shadow .18s;
}
.ev:hover { border-color: var(--clay); box-shadow: var(--shadow); }
.ev-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.ev-srcs { font-family: var(--mono); font-size: 10.5px; letter-spacing: .03em; color: var(--ember); }
.ev-srcs.native { color: var(--hint); }
.ev-view { font-size: 12.5px; font-weight: 700; color: var(--clay); margin-left: auto; }
.ev.focus { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(203,90,60,.25); }
.ev-banner { width: 6px; flex: none; }
.ev-main { flex: 1; padding: 13px 15px; min-width: 0; }
.ev-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ev-cat { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ev-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.ev-date { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
/* live countdown chip (event cards + detail) */
.ev-cd { text-transform: none; letter-spacing: 0; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-cd.urgent, .ev-cd.now { color: var(--clay); font-weight: 700; }
.evd-cd { display: flex; align-items: baseline; gap: 9px; margin: 2px 0 14px; }
.evd-cd .cd-label { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.evd-cd .ev-cd { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--ink); }
.evd-cd .ev-cd.urgent, .evd-cd .ev-cd.now { color: var(--clay); }
.ev-desc {
  margin: 0 0 11px; font-size: 12.5px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-actions { display: flex; gap: 7px; align-items: center; }
.ev-like, .ev-attend, .ev-ticket {
  padding: 7px 11px; border-radius: 9px; cursor: pointer; font-family: var(--font);
  font-size: 12px; font-weight: 600; border: 1px solid var(--line-2);
  background: #faf3ea; color: var(--ink); transition: .15s;
}
.ev-like:hover, .ev-attend:hover { border-color: var(--clay); }
.ev-like.on { background: rgba(203,90,60,.14); border-color: var(--clay); color: var(--ember); }
.ev-attend.on { background: rgba(224,135,95,.20); border-color: var(--apricot); color: var(--ember); }
.ev-ticket { margin-left: auto; background: var(--clay); color: var(--cream); border: 0; font-weight: 700; }
.ev-ticket:hover { background: #b94e32; box-shadow: 0 6px 16px rgba(203,90,60,.3); }
.ev-native { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--hint); }

/* ---------- timeline ---------- */
.timeline {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 28; width: min(460px, calc(100vw - 36px));
  background: transparent; border: 0; padding: 0 4px;
}
.tl-head { display: flex; align-items: center; gap: 6px; margin-bottom: 1px; }
.tl-btn {
  width: 20px; height: 20px; border-radius: 6px; cursor: pointer; flex: none;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--ink);
  font-size: 13px; line-height: 1; box-shadow: var(--shadow);
}
.tl-btn:hover { border-color: var(--clay); }
.tl-date { flex: 1; text-align: center; line-height: 1.1; }
.tl-label { display: none; }
.tl-value { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.tl-today {
  padding: 3px 9px; border-radius: 6px; cursor: pointer; flex: none;
  font-family: var(--mono); font-weight: 700; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--clay); border: 1px solid var(--clay); color: var(--cream);
}
.tl-track { position: relative; height: 20px; }
.tl-spark { position: absolute; inset: 0 0 9px; width: 100%; height: 11px; opacity: .9; }
.tl-range {
  position: absolute; left: 0; right: 0; top: 1px; width: 100%; height: 12px;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; margin: 0;
}
.tl-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--clay); border: 2px solid var(--cream); box-shadow: 0 1px 4px rgba(33,26,21,.4); cursor: grab;
}
.tl-range::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; background: var(--clay);
  border: 2px solid var(--cream); box-shadow: 0 1px 4px rgba(33,26,21,.4); cursor: grab;
}
.tl-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; }
.tl-ticks span {
  position: absolute; transform: translateX(-50%); font-family: var(--mono);
  font-size: 8.5px; letter-spacing: .03em; color: var(--faint); white-space: nowrap;
}

/* ---------- AI host ---------- */
.ai-host {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 28; display: flex; align-items: center; gap: 13px;
  width: min(620px, calc(100vw - 36px)); height: 58px; padding: 0 14px 0 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg);
}
.ah-play {
  position: relative;
  width: 42px; height: 42px; flex: none; border-radius: 50%; cursor: pointer; border: 0;
  background: var(--clay); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(203,90,60,.4);
}
.ah-focus { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--clay); }
/* "new briefing ready" cue on the Play button after a search while stopped */
.ah-cue { position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ember); border: 2px solid var(--paper); }
.ah-play.has-cue { animation: ahpulse 1.6s ease-in-out infinite; }
@keyframes ahpulse { 0%, 100% { box-shadow: 0 2px 10px rgba(203,90,60,.4); } 50% { box-shadow: 0 0 0 6px rgba(203,90,60,.12), 0 2px 14px rgba(203,90,60,.7); } }
.ah-play svg { width: 20px; height: 20px; fill: var(--cream); }
.ah-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ah-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ah-live { color: var(--clay); font-weight: 700; }
.ah-caption { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ah-spon { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .08em; color: var(--cream); background: var(--ember); padding: 2px 6px; border-radius: 4px; flex: none; }
.ah-caption.ah-tappable { cursor: pointer; }
.ah-text { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; transition: opacity .18s; }
.ah-run { display: inline-block; white-space: nowrap; will-change: transform; }
.ah-text .ah-w.active { color: var(--clay); }
.ah-caption.is-sponsor .ah-text { color: var(--ember); }
/* Read-along transcript panel (tap the caption to open) */
.ah-expand { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(30,22,18,0.35); }
.ah-exp-card { width: min(620px, calc(100vw - 24px)); max-height: 62vh; margin-bottom: 86px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; }
.ah-exp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); }
.ah-exp-x { border: 0; background: transparent; font-size: 15px; cursor: pointer; color: var(--muted); line-height: 1; }
.ah-exp-body { padding: 18px 20px; overflow-y: auto; font-size: 18px; line-height: 1.7; color: var(--ink); }
.ah-exp-body .ah-w.active { color: var(--clay); background: rgba(203,90,60,0.12); border-radius: 4px; box-shadow: 0 0 0 2px rgba(203,90,60,0.12); }
@media (max-width: 560px) { .ah-exp-body { font-size: 17px; } .ah-exp-card { margin-bottom: 78px; } }
@media (prefers-reduced-motion: reduce) { .ah-run { transition: none !important; } }
.ah-wave { width: 60px; flex: none; height: 38px; }
.ah-briefing {
  flex: none; cursor: pointer; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--cream); color: var(--ink); font-family: var(--font); font-weight: 700;
  font-size: 11.5px; padding: 7px 12px; white-space: nowrap;
}
.ah-briefing:hover { border-color: var(--clay); color: var(--clay); }
.ah-briefing:disabled { opacity: .55; cursor: default; }
.ah-home {
  flex: none; cursor: pointer; border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--muted); font-family: var(--font); font-weight: 700;
  font-size: 11.5px; padding: 7px 12px; white-space: nowrap;
}
.ah-home:hover { border-color: var(--clay); color: var(--clay); }
/* Music mute toggle (music only — narration keeps playing) */
.ah-mute { flex: none; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--muted); }
.ah-mute:hover { border-color: var(--clay); color: var(--clay); }
.ah-mute.is-muted { color: var(--clay); border-color: var(--clay); }
.ah-mute svg { width: 18px; height: 18px; fill: currentColor; display: block; }
/* Buffering: premium briefing being prepared → pulse the play button */
.ah-buffering .ah-play { animation: ahpulse 1.2s ease-in-out infinite; }
.ah-buffering .ah-text { opacity: 0.75; }
@media (max-width: 560px) {
  .ah-wave { display: none; }
  .ah-briefing, .ah-home { font-size: 11px; padding: 6px 10px; }
  .ah-mute { width: 32px; height: 32px; }
}

/* ---------- auth modal ---------- */
.auth { position: fixed; inset: 0; z-index: 60; display: none; }
.auth.open { display: block; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(33,26,21,.45); backdrop-filter: blur(4px); }
.auth-modal {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 380px; max-width: calc(100vw - 32px);
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 22px; padding: 32px 28px; text-align: center; box-shadow: var(--shadow-lg);
}
.auth-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--faint); font-size: 16px; cursor: pointer; }
.auth-modal .brand-mark, .auth-modal .brand-dots { justify-content: center; }
.auth-modal h2 { margin: 14px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.sso { display: flex; flex-direction: column; gap: 10px; }
.sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; border-radius: 12px; cursor: pointer; font-family: var(--font);
  font-size: 14.5px; font-weight: 600; background: var(--paper); color: var(--ink); border: 1px solid var(--line-2);
}
.sso-btn:hover { transform: translateY(-1px); border-color: var(--clay); }
.sso-btn[data-sso="apple"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.sso-btn span { font-weight: 800; font-size: 16px; }
.auth-or { position: relative; margin: 18px 0; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.auth-or::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-or span { position: relative; background: var(--cream); padding: 0 12px; }
.magic { display: flex; gap: 8px; }
.magic input {
  flex: 1; padding: 12px 14px; border-radius: 12px; font-family: var(--font); font-size: 14px;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); outline: none;
}
.magic input:focus { border-color: var(--clay); }
.magic button {
  padding: 0 16px; border-radius: 12px; cursor: pointer; font-family: var(--font);
  font-weight: 700; font-size: 13px; background: var(--clay); color: var(--cream); border: 0; white-space: nowrap;
}
.auth-fine { margin: 16px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--hint); }
.auth-legal { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--hint); text-align: center; }
.auth-legal a { color: var(--muted); text-decoration: underline; }

/* ---------- coordinator portal ---------- */
/* Create an event — a Help-centre-style modal with a blurred backdrop + single-column form. */
.coordinator { position: fixed; inset: 0; z-index: 60; display: none; }
.coordinator.open { display: flex; align-items: center; justify-content: center; }
.co-backdrop { position: absolute; inset: 0; background: rgba(33,26,21,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.co-modal {
  position: relative; z-index: 1; width: 720px; max-width: calc(100vw - 40px); max-height: 85vh;
  display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg);
}
/* Two columns on desktop: details on the left, location + publish on the right. */
.co-cols { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
.co-col { min-width: 0; }
.co-col-side { display: flex; flex-direction: column; }
/* Below ~720px there isn't room for two columns → stack into one, narrower modal. */
@media (max-width: 720px) {
  .co-modal { width: calc(100vw - 28px); max-width: 480px; }
  .co-cols { display: block; }
  .co-col-side .co-loc { margin-top: 6px; }
}
.co-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.co-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); }
.co-head h2 { margin: 5px 0 0; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
.co-close { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; flex: none; background: #ece2d4; border: 0; color: var(--ink); }
.co-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 18px 16px;
  /* soft fade at the top & bottom so it's clear there's more to scroll */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
/* Fixed action footer — Publish stays visible while the form scrolls above it. */
.co-foot { flex: none; padding: 12px 18px 15px; border-top: 1px solid var(--line); background: var(--cream); }
.co-foot .co-publish { margin-top: 0; }
.co-foot .co-cancel-edit { margin-bottom: 8px; }
.co-body label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 11px; }
.co-opt { color: var(--faint); font-weight: 400; }
.co-row { display: grid; gap: 10px; margin-bottom: 11px; }
.co-row label { margin-bottom: 0; min-width: 0; }   /* let grid cells shrink → no horizontal scroll */
.co-row-2 { grid-template-columns: 1fr 1fr; }
.co-card-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.co-loc { margin: 4px 0 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.co-body input, .co-body select, .co-body textarea {
  display: block; width: 100%; max-width: 100%; min-width: 0; margin-top: 5px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--ink);
  font-family: var(--font); font-size: 16px; outline: none; resize: vertical;   /* 16px avoids iOS zoom-on-focus */
}
/* iOS renders date/time inputs at an intrinsic width that can overflow — normalise them. */
.co-body input[type="date"], .co-body input[type="time"] { -webkit-appearance: none; appearance: none; }
.co-body input:focus, .co-body select:focus, .co-body textarea:focus { border-color: var(--clay); background: #fff; }
/* Auto event-colour preview (derived from category — no manual picker) */
.co-catcolor { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; padding: 11px 13px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.co-catdot { width: 22px; height: 22px; border-radius: 7px; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.co-catcolor-t { font-size: 12px; color: var(--muted); line-height: 1.4; }
.co-catcolor-t b { color: var(--ink); font-weight: 700; }
.co-feature { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; cursor: pointer; }
.co-body input.f-feature { width: auto; margin: 3px 0 0; flex: none; accent-color: var(--clay); }
.co-feature-txt { display: flex; flex-direction: column; }
.co-feature-txt b { font-size: 13.5px; color: var(--ink); font-weight: 700; }
.co-feature-txt small { font-size: 11px; color: var(--hint); line-height: 1.4; margin-top: 2px; }
.co-publish {
  width: 100%; padding: 13px; border-radius: 12px; cursor: pointer; font-family: var(--font);
  font-weight: 700; font-size: 15px; background: var(--clay); color: var(--cream); border: 0;
}
.co-publish:hover { background: #b94e32; box-shadow: 0 10px 26px rgba(203,90,60,.3); }
.co-note { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--hint); margin: 8px 0 0; text-align: center; }
.map-canvas { width: 100%; border-radius: 12px; border: 1px solid var(--line); cursor: crosshair; display: block; }
.co-loc.co-need-loc .map-canvas, .co-loc.co-need-loc .f-addr { border-color: #b3402a; box-shadow: 0 0 0 2px rgba(179,64,42,.16); }
.co-coords { margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.co-coords .co-place { margin: 0; }
.co-coords .latlon { margin: 0; }
.f-addr {
  width: 100%; padding: 10px 13px; border-radius: 11px; background: #faf3ea;
  border: 1px solid var(--line-2); color: var(--ink); font-family: var(--font); font-size: 14px; outline: none;
}
.f-addr:focus { border-color: var(--clay); }
.latlon { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.latlon strong { color: var(--clay); }
.co-place { margin-top: 6px; font-size: 13px; color: var(--ink); }
.co-place strong { color: var(--clay); font-weight: 700; }
/* address autocomplete */
.co-search { position: relative; }
.co-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; display: none;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg);
  overflow: hidden; max-height: 240px; overflow-y: auto; }
.co-suggest.show { display: block; }
.co-sug { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); line-height: 1.35; }
.co-sug:last-child { border-bottom: 0; }
.co-sug:hover { background: #faf3ea; }
.an-empty { color: var(--muted); font-size: 14px; }
.an-kpis { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.kpi {
  flex: 1; min-width: 120px; background: #faf3ea; border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; text-align: center;
}
.kpi strong { display: block; font-size: 26px; font-weight: 800; }
.kpi span { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.an-row { display: grid; grid-template-columns: 1.4fr 2fr auto; align-items: center; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.an-bar { height: 8px; border-radius: 99px; background: #efe4d4; overflow: hidden; }
.an-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--clay), var(--apricot)); border-radius: 99px; }
.an-row small { color: var(--faint); white-space: nowrap; font-family: var(--mono); font-size: 11px; }
/* My-events management rows */
.an-row2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.an-row2:last-child { border-bottom: 0; }
.an-r-main { min-width: 0; }
.an-r-main strong { font-size: 14px; }
.an-r-main small { display: block; color: var(--faint); font-family: var(--mono); font-size: 11px; margin-top: 3px; }
.an-badge { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ember); background: #f0e0d8; border-radius: 5px; padding: 2px 5px; }
.an-badge.an-pending { color: #8a6d1e; background: #f4ead0; }
.an-badge.an-rejected { color: #b3402a; background: #f6ddd6; }
.an-reason { display: block; color: #b3402a; font-size: 11px; margin-top: 2px; }
.an-r-actions { display: flex; gap: 6px; flex: none; }
.an-act { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; }
.an-act:hover { border-color: var(--clay); }
.an-danger { color: #b3402a; }
.an-danger:hover { border-color: #b3402a; background: rgba(179,64,42,.06); }
.co-cancel-edit { width: 100%; margin-top: 8px; padding: 11px; border-radius: 12px; cursor: pointer; background: var(--paper); border: 1px solid var(--line-2); color: var(--muted); font-family: var(--font); font-weight: 600; font-size: 13px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translate(-50%, 20px);
  z-index: 70; padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: var(--ink); border: 1px solid var(--ink); color: var(--cream);
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- location chip + menu ---------- */
.loc-wrap { position: relative; }
.loc-chip {
  display: flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 11px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2);
}
.loc-chip:hover { border-color: var(--clay); }
.loc-chip.set { color: var(--clay); }
.loc-menu {
  position: absolute; top: 46px; right: 0; width: 220px; display: none; z-index: 50;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg);
  overflow: hidden; max-height: 340px; overflow-y: auto;
}
.loc-menu.show { display: block; }
.loc-menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; cursor: pointer; font-family: var(--font); font-size: 13.5px; color: var(--ink); }
.loc-menu button:hover { background: #faf3ea; }
.loc-detect { color: var(--clay) !important; font-weight: 700; border-bottom: 1px solid var(--line) !important; }
.loc-list button { color: var(--muted); }
.loc-search { padding: 8px 10px; }
.loc-input { width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--cream); color: var(--ink); font-family: var(--font); font-size: 13.5px; }
.loc-input:focus { outline: none; border-color: var(--clay); }
.loc-sug { display: flex; flex-direction: column; margin-top: 4px; }
.loc-sug:empty { display: none; }
.loc-sug .loc-pick { padding: 8px 11px; font-size: 12.5px; line-height: 1.35; color: var(--ink); }

.plus-tag { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .08em; background: var(--clay); color: var(--cream); padding: 1px 5px; border-radius: 4px; margin-left: 4px; }

/* ---------- featured (sponsored) + partner ---------- */
.badge.featured { color: var(--cream); background: var(--ember); }
.ev.is-featured { border-color: rgba(224,135,95,.6); box-shadow: 0 0 0 1px rgba(224,135,95,.35); }
.ev-save { padding: 7px 10px !important; }
.ev-save.on { color: var(--clay); border-color: var(--clay); }
.partner {
  display: flex; gap: 10px; align-items: flex-start; flex: 0 0 auto;
  background: #faf3ea; border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px 14px;
}
.partner-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ember); background: rgba(224,135,95,.2); padding: 3px 7px; border-radius: 5px; flex: none; }
.partner-body { display: flex; flex-direction: column; gap: 2px; }
.partner-body strong { font-size: 14px; }
.partner-body span { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ---------- profile / You panel ---------- */
.profile, .saved {
  position: fixed; top: 78px; right: -440px; z-index: 45;
  width: 380px; max-width: calc(100vw - 28px); max-height: calc(100vh - 180px);
  display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-lg); transition: right .35s cubic-bezier(.22,1,.36,1);
}
.profile.open, .saved.open { right: 18px; }

/* ---- Saved events: month calendar + day list ---- */
.sv-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.sv-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.sv-sub { margin: 5px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--clay); }
.sv-close { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none; background: #ece2d4; color: var(--ink); border: 0; font-size: 14px; }
.sv-body { overflow-y: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.sv-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sv-month { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.sv-month .sv-yr { color: var(--faint); font-weight: 700; margin-left: 5px; }
.sv-nav { display: flex; gap: 6px; }
.sv-nav button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line2); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 15px; line-height: 1; }
.sv-nav button:hover { border-color: var(--clay); }
.sv-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.sv-weekdays span { text-align: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sv-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.sv-cell { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; border: 1px solid transparent; }
.sv-cell.sv-empty { visibility: hidden; }        /* leading/trailing blanks */
.sv-cell.sv-muted { color: var(--faint); cursor: default; }   /* no saved events that day */
.sv-cell:not(.sv-muted):not(.sv-sel):hover { background: #ece2d4; }
.sv-cell.sv-today:not(.sv-sel) { box-shadow: inset 0 0 0 1.5px var(--clay); }   /* today ring */
.sv-cell.sv-sel { background: var(--clay); color: #fff; box-shadow: 0 4px 12px rgba(203,90,60,.32); }
.sv-dots { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; gap: 2px; justify-content: center; }
.sv-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--clay); }
.sv-cell.sv-sel .sv-dots i { background: #fff; }
/* Busy days (3+ saved) show a count badge instead of dots */
.sv-badge { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); min-width: 15px; height: 13px; padding: 0 3px;
  border-radius: 7px; background: var(--clay); color: #fff; font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1; }
.sv-cell.sv-sel .sv-badge { background: #fff; color: var(--clay); }
.sv-day { border-top: 1px solid var(--line); padding-top: 12px; }
.sv-day-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.sv-day-title { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.sv-day-count { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.sv-list { display: flex; flex-direction: column; }
.sv-item { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.sv-item:first-child { border-top: 0; }
.sv-item:hover .sv-it-title { color: var(--clay); }
.sv-time { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--clay); flex: none; width: 44px; padding-top: 1px; }
.sv-it-main { border-left: 2px solid var(--line2); padding-left: 12px; min-width: 0; }
.sv-it-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.sv-it-sub { margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.sv-it-sub .sv-dot { color: var(--faint); margin: 0 5px; }
.sv-empty-state { text-align: center; color: var(--hint); font-size: 13px; line-height: 1.6; padding: 22px 8px; }
.sv-empty-state b { color: var(--ink); }
/* "For you" recommendations at the bottom of the calendar */
.sv-foryou { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
.sv-fy-head { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.sv-fy-list { display: flex; flex-direction: column; }
.sv-fy-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 0; cursor: pointer; text-align: left; font-family: inherit; }
.sv-fy-item:first-child { border-top: 0; }
.sv-fy-item:hover .sv-fy-title { color: var(--clay); }
.sv-fy-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 5px; }
.sv-fy-main { min-width: 0; display: flex; flex-direction: column; }
.sv-fy-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.sv-fy-sub { margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
/* Calendar | List view toggle */
.sv-viewtabs { display: flex; gap: 6px; padding: 12px 16px 0; }
.sv-vtab { flex: 1; padding: 8px; border-radius: 9px; border: 1px solid var(--line2); background: var(--paper); color: var(--muted); font-family: var(--font); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.sv-vtab.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
/* List view — every saved event with a ✕ delete */
.sv-lrow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.sv-lrow:first-child { border-top: 0; }
.sv-litem { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; background: none; border: 0; padding: 11px 0; cursor: pointer; text-align: left; font-family: inherit; }
.sv-litem:hover .sv-ltitle { color: var(--clay); }
.sv-ldot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 5px; }
.sv-lmain { min-width: 0; display: flex; flex-direction: column; }
.sv-ltitle { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.sv-lsub { margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.sv-ldel { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line2); background: var(--paper); color: var(--faint); font-size: 12px; cursor: pointer; }
.sv-ldel:hover { border-color: #b3402a; color: #b3402a; }

/* Profile: clickable "Saved events" shortcut row */
.pf-savedrow { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font-family: inherit; font-size: 13.5px; color: var(--muted); text-align: left; }
.pf-savedrow:hover .pf-k, .pf-savedrow:hover .pf-savedval { color: var(--clay); }
.pf-savedval { color: var(--ink); font-weight: 700; }
.pf-savedrow .pf-chev { color: var(--faint); font-weight: 700; }

/* Eventually Plus — modal content (Help-centre style, blurred backdrop) */
.plus-modal { display: flex; flex-direction: column; gap: 14px; }
.plus-hero { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.plus-hero b { color: var(--clay); }
.plus-soon { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--clay); background: #f0e0d8; border-radius: 6px; padding: 3px 8px; }
.plus-feats { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.plus-feats li { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.plus-status { margin: 0; font-size: 12.5px; color: var(--hint); line-height: 1.5; }
.plus-cta { width: 100%; padding: 12px; border-radius: 12px; border: 0; background: var(--clay); color: #fff; font-family: var(--font); font-weight: 700; font-size: 14px; cursor: pointer; }
.plus-cta:hover:not(:disabled) { background: #b94e32; }
.plus-cta:disabled { opacity: .6; cursor: default; }
.plus-fine { margin: 0; font-size: 11px; color: var(--faint); text-align: center; }
.pf-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.pf-greeting { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.pf-plus-state { margin: 5px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--clay); }
.pf-close { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none; background: #ece2d4; color: var(--ink); border: 0; font-size: 14px; }
.pf-body { overflow-y: auto; padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.pf-sec { display: flex; flex-direction: column; gap: 10px; }
.pf-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.pf-row .pf-loc, .pf-row b { color: var(--ink); font-weight: 700; }
.pf-label { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.pf-interests, .pf-langs { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-hint { margin: 9px 0 0; font-size: 11.5px; color: var(--hint); line-height: 1.5; }
.pf-id-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pf-id-row { font-size: 13px; color: var(--ink); }
.pf-id-row span { color: var(--clay); font-weight: 600; }
.pf-id-loading { font-size: 12px; color: var(--faint); }
.pf-id-link { align-self: flex-start; padding: 9px 14px; border-radius: 10px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); font-family: var(--font); font-weight: 600; font-size: 13px; }
.pf-id-link:hover { border-color: var(--clay); }
/* account details (view + inline edit) */
.pf-acct { display: flex; flex-direction: column; margin-top: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pf-acct-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 11px 13px; border-top: 1px solid var(--line); }
.pf-acct-row:first-child { border-top: 0; }
.pf-acct-row .pf-acct-k { color: var(--muted); flex: none; min-width: 96px; font-size: 12.5px; }
.pf-acct-row .pf-acct-v { color: var(--ink); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-acct-row .pf-acct-v i { color: var(--faint); font-weight: 400; font-style: normal; }
.pf-acct-edit { flex: none; padding: 5px 11px; border-radius: 8px; cursor: pointer; background: var(--paper);
  border: 1px solid var(--line-2); color: var(--ink); font-family: var(--font); font-weight: 600; font-size: 12px; }
.pf-acct-edit:hover { border-color: var(--clay); }
.pf-acct-note { flex: none; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.pf-acct-row.is-edit { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 12px 13px;
  background: var(--cream); border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.pf-acct-row.is-edit .pf-acct-k { min-width: 0; }
.pf-acct-in, .pf-addr-f, .pf-addr-search { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--cream); color: var(--ink); font-family: var(--font); font-size: 13.5px; }
.pf-acct-in:focus, .pf-addr-f:focus, .pf-addr-search:focus { outline: none; border-color: var(--clay); }
.pf-acct-btns { display: flex; gap: 8px; margin-top: 2px; }
.pf-acct-save { padding: 8px 14px; border-radius: 9px; cursor: pointer; background: var(--clay); border: 1px solid var(--clay);
  color: var(--cream); font-family: var(--font); font-weight: 700; font-size: 13px; }
.pf-acct-cancel { padding: 8px 14px; border-radius: 9px; cursor: pointer; background: transparent; border: 1px solid var(--line-2);
  color: var(--muted); font-family: var(--font); font-weight: 600; font-size: 13px; }
.pf-addr-sug { display: flex; flex-direction: column; gap: 4px; }
.pf-addr-sug:empty { display: none; }
.pf-addr-pick { text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; background: var(--cream);
  border: 1px solid var(--line); color: var(--ink); font-family: var(--font); font-size: 12.5px; line-height: 1.35; }
.pf-addr-pick:hover { border-color: var(--clay); }
.pf-acct-comms { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pf-acct-comms > .pf-acct-k { padding: 10px 13px 3px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.pf-comm.pf-toggle { border: 0; border-radius: 0; background: none; border-top: 1px solid var(--line); padding: 10px 13px; font-weight: 600; }
.pf-comm.pf-toggle.on { background: none; }
.pf-acct-comms > .pf-acct-k + .pf-comm { border-top: 0; }
.pf-acct-signin { align-self: flex-start; margin-top: 8px; padding: 9px 16px; border-radius: 10px; cursor: pointer;
  background: var(--clay); border: 1px solid var(--clay); color: var(--cream); font-family: var(--font); font-weight: 700; font-size: 13px; }
.chip {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-family: var(--font); font-size: 12.5px; font-weight: 600;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--muted);
}
.chip.on { background: var(--clay); border-color: var(--clay); color: var(--cream); }
.pf-recs { display: flex; flex-direction: column; gap: 6px; }
.pf-rec { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 10px; cursor: pointer; background: var(--paper); border: 1px solid var(--line); font-family: var(--font); font-size: 13.5px; color: var(--ink); }
.pf-rec:hover { border-color: var(--clay); }
.pf-rec .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pf-rec small { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.pf-empty { font-size: 13px; color: var(--muted); margin: 0; }
.pf-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; border-radius: 11px; cursor: pointer; background: var(--paper); border: 1px solid var(--line-2); font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pf-toggle .tg-state { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.pf-toggle.on { border-color: var(--clay); }
.pf-toggle.on .tg-state { color: var(--clay); }
.pf-plus { background: var(--ink); color: var(--cream); border-radius: 16px; padding: 18px; }
.pf-plus-h { font-size: 17px; letter-spacing: -0.02em; }
.pf-plus-h b { color: var(--apricot); }
.pf-plus-list { margin: 12px 0 14px; padding-left: 18px; font-size: 12.5px; line-height: 1.7; color: #d8cdbf; }
.pf-plus-btn { width: 100%; padding: 12px; border-radius: 11px; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: 14px; background: var(--clay); color: var(--cream); border: 0; }
.pf-plus-btn:hover { background: #b94e32; }
.pf-fine { margin: 9px 0 0; text-align: center; font-family: var(--mono); font-size: 9.5px; color: #a8957d; }
.pf-logout { padding: 11px; border-radius: 11px; cursor: pointer; background: none; border: 1px solid var(--line-2); color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 600; }
.pf-logout:hover { border-color: var(--ember); color: var(--ember); }

/* ---------- display ad bar (Revenue 1) ---------- */
.adbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; height: calc(56px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; padding: 0 16px env(safe-area-inset-bottom, 0px);
  background: rgba(244,236,226,0.94); border-top: 1px solid var(--line-2); backdrop-filter: blur(8px);
}
.ad-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line-2); padding: 3px 6px; border-radius: 5px; flex: none; }
.ad-body { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; }
.ad-body strong { font-size: 13.5px; white-space: nowrap; }
.ad-body span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-plus { margin-left: auto; flex: none; padding: 7px 13px; border-radius: 9px; cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 700; background: var(--clay); color: var(--cream); border: 0; }
.ad-plus:hover { background: #b94e32; }

/* ---------- provider-agnostic ad slots (in-feed + detail panel) ---------- */
/* Reserved containers so real ad fills cause no layout shift. Keep min-heights
   in sync with SLOT_H in monetize.js. */
.ad-slot { position: relative; border-radius: 12px; overflow: hidden; }
.ad-slot .adsbygoogle { display: block; width: 100%; }
/* In-feed native card (between event cards in the place list). */
.ad-slot.ad-infeed { display: flex; align-items: center; gap: 10px; min-height: 96px;
  padding: 12px 14px; margin: 8px 0; background: #fbf5ec; border: 1px solid var(--line-2); }
.ad-native-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-native-body strong { font-size: 14px; }
.ad-native-body span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.ad-slot.ad-infeed .ad-cta { margin-left: auto; flex: none; font-family: var(--mono); font-size: 11px;
  font-weight: 700; color: var(--clay); }
/* Rectangle panel inside the event-detail view. */
.ad-slot.ad-panel { display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 250px; padding: 18px; margin: 16px 0 4px; text-align: center;
  background: #fbf5ec; border: 1px solid var(--line-2); }
.ad-slot.ad-panel strong { font-size: 16px; }
.ad-slot.ad-panel span { font-size: 13px; color: var(--muted); }
.ad-slot.ad-panel .ad-cta { margin-top: 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--clay); }
.ad-slot.ad-infeed .ad-tag, .ad-slot.ad-panel .ad-tag { position: absolute; top: 8px; right: 8px; }

/* lift the floating bottom UI when the ad bar is present. The ad bar's height is
   56px + safe-area-inset-bottom, so these offsets MUST add the same inset or the
   host bar overlaps the ad on notch/home-bar devices. */
body.has-ad .ai-host { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
body.has-ad .timeline { bottom: calc(138px + env(safe-area-inset-bottom, 0px)); }
body.has-ad .globe-controls { bottom: calc(204px + env(safe-area-inset-bottom, 0px)); }
body.has-ad .legend { bottom: calc(204px + env(safe-area-inset-bottom, 0px)); }
body.has-ad .toast { bottom: calc(144px + env(safe-area-inset-bottom, 0px)); }

/* ---------- ⋯ menu + dropdown ---------- */
.menu-wrap { position: relative; }
.menu-btn {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px; border-radius: 11px; cursor: pointer;
  background: var(--clay); border: 0; color: var(--cream); transition: background .15s;
}
.menu-btn:hover { background: #b94e32; }
.menu-btn.signed { background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); padding: 0 10px; }
.menu-dots { display: flex; gap: 4px; }
.menu-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: block; }
.menu-btn .avatar { width: 24px; height: 24px; }

.dropdown {
  position: absolute; top: 48px; right: 0; width: 242px; display: none; z-index: 50;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 6px;
}
.dropdown.show { display: block; }
.dd-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-user .avatar { width: 32px; height: 32px; }
.dd-user strong { font-size: 14px; display: block; }
.dd-user small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); }
.dd-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; background: none; border-radius: 9px; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink);
}
.dd-item:hover { background: #faf3ea; }
.dd-primary { color: var(--clay); }
.dd-plus { color: var(--ember); }
.dd-muted { color: var(--muted); font-weight: 500; }
.dd-badge { font-family: var(--mono); font-size: 11px; background: #efe4d4; color: var(--muted); padding: 1px 7px; border-radius: 99px; }
.dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ---------- shared modal (help / contact / event types) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(33,26,21,.45); backdrop-filter: blur(4px); }
.modal-box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 460px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.modal-close { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none; background: #ece2d4; border: 0; color: var(--ink); font-size: 14px; }
.modal-body { padding: 18px 20px 22px; overflow-y: auto; }
.modal-lead { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.modal-fine { margin: 10px 0 0; font-family: var(--mono); font-size: 10px; color: var(--hint); text-align: center; }
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chips .chip { display: inline-flex; align-items: center; gap: 7px; }
.type-chips .chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.type-actions { display: flex; gap: 8px; margin-top: 16px; }
.type-actions button { padding: 8px 14px; border-radius: 9px; cursor: pointer; font-family: var(--font); font-size: 12.5px; font-weight: 600; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); }
.type-actions button:hover { border-color: var(--clay); }
.help details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.help details:last-child { border-bottom: 0; }
.help summary { cursor: pointer; font-weight: 700; font-size: 14.5px; }
.help p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.help p b, .help summary b { color: var(--ink); }
/* Event colour-code swatches in the Help centre */
.help-cats { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.help-cat { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.help-sw { width: 12px; height: 12px; border-radius: 3px; flex: none; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.help-cat-t b { color: var(--ink); font-weight: 700; }
.help-cat-d { color: var(--muted); }
.help-legal { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--muted); }
.help-legal a { color: var(--muted); text-decoration: underline; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.contact-form input, .contact-form textarea { padding: 11px 13px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); font-family: var(--font); font-size: 14px; outline: none; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--clay); }
.contact-form button[type=submit] { padding: 12px; border-radius: 11px; cursor: pointer; background: var(--clay); color: var(--cream); border: 0; font-family: var(--font); font-weight: 700; font-size: 14px; }
/* Complete-your-profile step */
.ps-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 13px; }
.ps-form input { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 11px;
  background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); font-family: var(--font); font-size: 16px; outline: none; }
.ps-form input:focus { border-color: var(--clay); background: #fff; }
.ps-opt { color: var(--faint); font-weight: 400; font-size: 11px; }
.ps-fine { font-size: 11px; color: var(--hint); margin: 2px 0 16px; line-height: 1.45; }
.ps-actions { display: flex; gap: 10px; }
.ps-skip { flex: 0 0 auto; padding: 12px 16px; border-radius: 12px; cursor: pointer; background: var(--paper);
  border: 1px solid var(--line-2); color: var(--muted); font-family: var(--font); font-weight: 600; }
.ps-save { flex: 1; padding: 12px; border-radius: 12px; cursor: pointer; background: var(--clay); color: var(--cream);
  border: 0; font-family: var(--font); font-weight: 700; font-size: 15px; }
/* Destructive variant (e.g. Cancel Plus) — muted, not the primary clay CTA. */
.ps-save.cx-danger { background: var(--paper); color: #b3402a; border: 1px solid rgba(179,64,42,.4); }
.ps-save.cx-danger:hover { background: rgba(179,64,42,.06); }
/* Trial/status line inside the Plus panel. */
.pf-plus-status { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #e8dccb; }
.pf-plus-status:empty { display: none; }

/* ---------- full event detail (dedup view) ---------- */
.evdetail {
  position: fixed; top: 78px; right: -480px; z-index: 50;
  width: 420px; max-width: calc(100vw - 28px); max-height: calc(100vh - 180px);
  display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-lg); transition: right .35s cubic-bezier(.22,1,.36,1);
}
.evdetail.open { right: 18px; }
.evd-scroll { overflow-y: auto; }
.evd-banner { position: relative; height: 120px; display: flex; align-items: flex-end; padding: 14px; }
.evd-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(33,26,21,.5), transparent 60%); }
.evd-back, .evd-x { position: absolute; top: 12px; z-index: 2; border: 0; cursor: pointer; background: rgba(33,26,21,.42); color: #fff; border-radius: 999px; }
.evd-back { left: 12px; padding: 6px 12px; font-family: var(--font); font-size: 13px; font-weight: 600; }
.evd-x { right: 12px; width: 30px; height: 30px; font-size: 14px; }
.evd-cat { position: relative; z-index: 1; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(33,26,21,.4); padding: 4px 10px; border-radius: 999px; }
.evd-body { padding: 16px 18px 22px; }
.evd-badges { display: flex; gap: 8px; margin-bottom: 8px; }
.evd-title { margin: 2px 0 6px; font-size: 23px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.evd-meta { margin: 0 0 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.evd-dedup { background: #faf3ea; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; margin-bottom: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--ember); display: flex; flex-direction: column; gap: 4px; }
.evd-dedup small { font-family: var(--font); font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.evd-desc { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.evd-actions { display: flex; gap: 8px; margin-bottom: 18px; }
.evd-section { border-top: 1px solid var(--line); padding-top: 16px; }
.evd-sec-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.avail-list { display: flex; flex-direction: column; gap: 8px; }
.avail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 12px; cursor: pointer; background: var(--paper); border: 1px solid var(--line-2); font-family: var(--font); transition: .15s; }
.avail-row:hover { border-color: var(--clay); box-shadow: var(--shadow); }
.avail-row.cheapest { border-color: var(--clay); background: rgba(203,90,60,.06); }
.avail-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avail-left strong { font-size: 14px; color: var(--ink); }
.avail-badge { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #efe4d4; padding: 2px 6px; border-radius: 5px; }
.avail-right { display: flex; align-items: center; gap: 9px; flex: none; }
.avail-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--cream); background: var(--clay); padding: 2px 7px; border-radius: 5px; }
.avail-price { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.avail-go { color: var(--clay); font-weight: 700; }
.native-cta { width: 100%; padding: 14px; border-radius: 12px; cursor: pointer; background: var(--clay); color: var(--cream); border: 0; font-family: var(--font); font-weight: 700; font-size: 15px; }
.native-cta:hover { background: #b94e32; }
/* Outbound "Get Tickets" CTA → the official provider via the /go redirect. */
.evd-tickets { display: block; width: 100%; box-sizing: border-box; text-align: center; text-decoration: none;
  padding: 14px; border-radius: 12px; cursor: pointer; background: var(--clay); color: var(--cream);
  font-family: var(--font); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; transition: background .15s; }
.evd-tickets:hover { background: #b94e32; }
.evd-note { margin: 11px 0 0; font-size: 12px; color: var(--hint); line-height: 1.5; }

/* ---------- "Types" dropdown (in the search bar) ---------- */
.types-wrap { position: relative; flex: none; }
.types-btn {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600; white-space: nowrap;
  background: #faf3ea; border: 1px solid var(--line-2); color: var(--ink);
}
.types-btn:hover { border-color: var(--clay); }
.types-btn.active { border-color: var(--clay); color: var(--clay); }
.types-caret { color: var(--faint); font-size: 10px; }
.types-badge {
  background: var(--clay); color: var(--cream); font-family: var(--mono); font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.types-menu {
  position: absolute; top: 46px; right: 0; width: 210px; display: none; z-index: 50;
  /* Frosted glass so the globe stays faintly visible behind the menu. */
  background: rgba(252, 247, 240, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 6px;
}
.types-menu.show { display: block; }
/* On the frosted surface, keep hover/dividers translucent so blur shows through. */
.types-menu .topt:hover { background: rgba(203, 90, 60, 0.10); }
.types-menu .topt-all { border-bottom-color: rgba(33, 26, 21, 0.12); }
.topt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 11px; border: 0; background: none; border-radius: 9px; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.topt:hover { background: #faf3ea; }
.topt .tdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.topt .tcheck { margin-left: auto; color: var(--clay); font-weight: 700; }
.topt-all { color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px; padding-bottom: 11px; }
.topt-all.on { color: var(--clay); }

/* ---------- in-card filter + sort (dropdowns) ---------- */
.place-tools { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pfilter, .psort {
  padding: 8px 11px; border-radius: 9px; cursor: pointer; font-family: var(--font); font-size: 12.5px; font-weight: 600;
  background: #faf3ea; border: 1px solid var(--line-2); color: var(--ink); outline: none;
}
.pfilter { flex: 1; }
.pfilter:focus, .psort:focus { border-color: var(--clay); }
.psort { flex: none; }
.see-all {
  flex: 0 0 auto; width: 100%; padding: 11px; border-radius: 12px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--clay);
  background: #faf3ea; border: 1px dashed var(--line-2);
}
.see-all:hover { border-color: var(--clay); background: rgba(203,90,60,.06); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  /* iOS Safari zooms toward any focused text input whose font-size is < 16px, which
     shifts the visual viewport and leaves the page "out of frame" (the user then has
     to pinch back). Force EVERY text-entry control to 16px on mobile so focusing the
     search box / city + address autocompletes / any form field never triggers zoom.
     Applies to current and future inputs; the per-field rules below can style
     everything else but can't drop these back under 16px. !important is deliberate:
     this is a zoom guard that must beat the per-field id/class selectors (#search,
     .loc-input, .f-addr, .contact-form input, …) regardless of their specificity. */
  input, textarea, select { font-size: 16px !important; }
  .types-btn { padding: 9px 10px; }
  /* 2-column grid so all 10 categories fit without a tall, overlapping menu. */
  .types-menu { right: 0; width: min(92vw, 360px); max-height: 62vh; overflow-y: auto; padding: 8px; }
  .types-menu.show { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; align-content: start; }
  .types-menu .topt-all { grid-column: 1 / -1; }
  .types-menu .topt { padding: 11px 10px; font-size: 13px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .search-wrap { order: 3; max-width: none; flex-basis: 100%; }
  .stats { display: none; }
  .legend { display: none; }
  .nav-btn.ghost { display: none; }
  .loc-chip .loc-name { display: none; }
  .timeline { bottom: 82px; }
  .globe-controls { bottom: 138px; right: 14px; }
  .ctl { width: 38px; height: 38px; }
  /* Mobile drawers: pin to BOTH edges (always fit) + slide via TRANSFORM. The old
     rule animated `right` from -460px (closed) to 50% (open); browsers can't
     interpolate px↔%, so the transition silently failed and the panel stayed parked
     off-screen. Transform/opacity interpolate cleanly and the panel can't overflow. */
  /* Mobile drawers keep the desktop side-slide — a px→px `right` transition, which
     works reliably. Only the open offset + top/bottom change. The original bug was
     animating `right` across px↔% units (-460px → 50%), which browsers can't
     interpolate, so the transition silently failed and parked the panel off-screen. */
  .place, .profile, .evdetail, .saved {
    top: calc(70px + env(safe-area-inset-top, 0px));
    bottom: calc(124px + env(safe-area-inset-bottom, 0px)); max-height: none;
    transition: none;   /* animating position on these fixed drawers freezes mid-transition
                           on mobile, leaving them parked off-screen — snap into place instead */
  }
  .place.open, .profile.open, .evdetail.open, .saved.open { right: 12px; }
  /* MUST include the safe-area inset (the ad bar is 56px + inset) or the host bar
     overlaps the ad on notch/home-bar phones. */
  body.has-ad .ai-host { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  body.has-ad .timeline { bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
  body.has-ad .globe-controls { bottom: calc(188px + env(safe-area-inset-bottom, 0px)); }

  /* --- Auth ("Join Eventually") card: compact + stack the magic form --- */
  .auth-modal { padding: 24px 18px; border-radius: 18px; }
  .auth-modal h2 { font-size: 22px; }
  .auth-sub { font-size: 13px; margin-bottom: 16px; }
  .magic { flex-direction: column; }
  .magic input { font-size: 16px; }            /* 16px avoids iOS focus-zoom */
  .magic button { padding: 13px; width: 100%; }

  /* --- Coordinator ("Publish to the globe") on phones: leave a margin so the blurred
     background shows around it (not edge-to-edge). Height capped → scrolls inside. --- */
  .co-modal { width: calc(100vw - 20px); max-width: none; max-height: 90vh; border-radius: 18px; }
  .co-head { padding: 14px 16px 12px; }
  .co-head h2 { font-size: 18px; }
  .co-body { padding: 12px 16px 16px; }
  .map-canvas { max-height: 190px; }
}

/* ============================ Signature opening ============================ */
/* The launch "brand moment": cinematic splash, animated wordmark + live count,
   free-only Plus invite; sonic logo fires on first tap. Once per session. */
.signature {
  position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center;
  padding: 24px; cursor: pointer; color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% 12%, #3a2c22 0%, #241a14 55%, #17100b 100%);
  animation: sg-in .5s ease both;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.signature.sg-out { animation: sg-out .46s ease both; pointer-events: none; }
.sg-inner { max-width: 460px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0; }
.sg-dots { display: inline-flex; gap: 9px; margin-bottom: 22px; }
.sg-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--clay); opacity: .35;
  animation: sg-dot 1.35s ease-in-out infinite; }
.sg-dots i:nth-child(2) { animation-delay: .18s; background: var(--apricot); }
.sg-dots i:nth-child(3) { animation-delay: .36s; }
.sg-word { margin: 0; font-family: var(--font); font-weight: 800; font-size: clamp(38px, 12vw, 60px);
  letter-spacing: -0.045em; line-height: 1; color: #fff; animation: sg-rise .7s .1s ease both; }
.sg-tag { margin: 14px 0 0; font-size: clamp(14px, 3.6vw, 16px); line-height: 1.5; color: #e7d8c6;
  max-width: 22em; animation: sg-rise .7s .24s ease both; }
.sg-count { margin: 26px 0 0; font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; color: #d7b8a4; animation: sg-rise .7s .4s ease both; }
.sg-count .sg-num { color: var(--apricot); font-size: 18px; font-weight: 700; }
.sg-plus { margin: 26px 0 0; padding: 12px 18px; border-radius: 999px; cursor: pointer;
  background: rgba(203,90,60,.16); border: 1px solid rgba(224,135,95,.5); color: #f5e7db;
  font-family: var(--font); font-weight: 600; font-size: 13px; line-height: 1.35; max-width: 24em;
  animation: sg-rise .7s .54s ease both; transition: background .15s; }
.sg-plus:hover { background: rgba(203,90,60,.28); }
.sg-enter { margin: 30px 0 0; padding: 13px 26px; border-radius: 999px; cursor: pointer;
  background: var(--clay); color: #fff; border: 0; font-family: var(--font); font-weight: 700; font-size: 15px;
  animation: sg-rise .7s .66s ease both, sg-pulse 2.4s 1.4s ease-in-out infinite; }
.sg-enter span { display: inline-block; margin-left: 4px; }
.sg-off { margin: 16px 0 0; padding: 6px; background: none; border: 0; cursor: pointer;
  color: #a8917f; font-family: var(--font); font-size: 12px; text-decoration: underline; opacity: .8;
  animation: sg-rise .7s .78s ease both; }
.sg-off:hover { color: #d7b8a4; }
@keyframes sg-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes sg-out { from { opacity: 1; } to { opacity: 0; transform: scale(1.015); } }
@keyframes sg-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes sg-dot { 0%,100% { opacity: .3; transform: translateY(0); } 45% { opacity: 1; transform: translateY(-6px); } }
@keyframes sg-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(203,90,60,.45); } 50% { box-shadow: 0 0 0 12px rgba(203,90,60,0); } }
/* Reduced motion: no rise/pulse/count animations, just a quiet fade. */
.signature.sg-reduced, .signature.sg-reduced * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
@media (prefers-reduced-motion: reduce) {
  .sg-dots i, .sg-enter { animation: none !important; }
  .sg-word, .sg-tag, .sg-count, .sg-plus, .sg-enter, .sg-off { animation: sg-in .3s ease both !important; }
}
/* Tap acknowledged: controls fade out while the sonic logo plays, then the splash
   reveals the globe. Without this the ~1.7s hold reads as an unresponsive tap. */
.signature.sg-entering .sg-enter,
.signature.sg-entering .sg-plus,
.signature.sg-entering .sg-off { opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.signature.sg-entering .sg-inner { transform: scale(1.02); transition: transform 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .signature.sg-entering .sg-inner { transform: none; } }
