:root {
  --bg: #f7f5f2; --surface: #ffffff; --text: #16131d; --muted: #5f5a68; --line: #e7e2dc;
  --ink: #16131d; --ink-text: #ffffff;
  --action: #e8452c; --action-text: #ffffff;
  --mix-bg: #def5ee; --mix-text: #0b5b4a;
  --chip-bg: #f1ede8; --chip-text: #3d3846;
  --hero-from: #1a0f2e; --hero-mid: #4a1d4f; --hero-to: #e8452c;
  --shadow: 0 1px 2px rgba(22, 19, 29, .06), 0 4px 16px rgba(22, 19, 29, .06);
  --radius: 18px;
  --c-all: #c27803; --c-meet: #ea580c; --c-intl: #0284c7; --c-dance: #9333ea; --c-clubs: #0d9488; --c-bar: #db2777; --c-uni: #4f46e5; --c-free: #16a34a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110d18; --surface: #1c1725; --text: #f3f0f7; --muted: #aaa3b5; --line: #2c2537;
    --ink: #f3f0f7; --ink-text: #16131d;
    --action: #ff7a5c; --action-text: #1a0f2e;
    --mix-bg: #133b33; --mix-text: #9fe6d2;
    --chip-bg: #2a2333; --chip-text: #d9d3e2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --c-all: #fbbf24; --c-meet: #fb923c; --c-intl: #38bdf8; --c-dance: #c084fc; --c-clubs: #2dd4bf; --c-bar: #f472b6; --c-uni: #818cf8; --c-free: #4ade80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
/* The document never scrolls; .scroller does. A pull past the top or the bottom then moves
   nothing, so no gap opens above the header or below the footer. */
body { margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font: 16px/1.45 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; }
.scroller { height: 100%; overflow-y: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }

/* Hero */
.hero { background: radial-gradient(120% 140% at 85% 0%, var(--hero-to) 0%, var(--hero-mid) 45%, var(--hero-from) 80%); color: #fff; }
.hero-inner { position: relative; max-width: 640px; margin: 0 auto; padding: 22px 16px 26px; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 15px; opacity: .9; }
.brand span { color: #ffd2c7; }
.hero h1 { margin: 18px 0 4px; font-size: 38px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.subtitle { margin: 0; font-size: 15px; color: rgba(255, 255, 255, .82); }

/* "Dejanos un comentario": the header button and the bubble that points at it until closed or used */
.talk { position: absolute; top: 12px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.talk svg { width: 22px; height: 22px; }
.bubble { position: absolute; z-index: 1; top: 66px; right: 16px; max-width: min(300px, calc(100% - 32px)); border-radius: 16px; background: #fff; color: #16131d; box-shadow: 0 8px 28px rgba(10, 6, 18, .35); animation: pop .3s .8s both; }
.bubble::before { content: ""; position: absolute; top: -6px; right: 16px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.bubble-text { display: block; position: relative; width: 100%; padding: 12px 40px 12px 14px; border: 0; background: none; color: inherit; font-size: 14px; line-height: 1.35; text-align: left; cursor: pointer; }
.bubble-close { position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; border: 0; background: none; color: #5f5a68; font-size: 22px; line-height: 1; cursor: pointer; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.96); } }

/* Sticky filters */
.bar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar-inner { max-width: 640px; margin: 0 auto; padding: 10px 16px 12px; }
.tabs { display: flex; gap: 4px; background: var(--chip-bg); border-radius: 12px; padding: 4px; }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pills { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pills button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.pills button[aria-pressed="true"] { background: color-mix(in srgb, var(--action) 12%, var(--surface)); border-color: var(--action); color: var(--text); }

/* Timeline */
.list { max-width: 640px; margin: 0 auto; padding: 8px 16px 40px; }
.slot { position: relative; padding-left: 22px; margin-top: 22px; }
.slot::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -6px; border-left: 2px dashed var(--line); }
.slot h2 { position: relative; margin: 0 0 10px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.slot h2::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--action); box-shadow: 0 0 0 4px var(--bg); }
.slot h2 small { color: var(--muted); font-weight: 600; margin-left: 6px; }

.card { display: flex; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s ease; }
.card:active { transform: scale(.99); }
.card .body { flex: 1; min-width: 0; }
.time { font-weight: 800; font-size: 15px; color: var(--action); }
.time span { color: var(--muted); font-weight: 600; font-size: 13px; margin-left: 4px; }
.title { margin: 2px 0 4px; font-weight: 800; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.place { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place svg { flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: var(--chip-bg); color: var(--chip-text); }
.tag.mix { background: var(--mix-bg); color: var(--mix-text); }
.tag.price { background: none; padding-left: 0; color: var(--text); }
.tag.price.unknown { color: var(--muted); font-weight: 600; }
.thumb { flex: none; width: 88px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--chip-bg); display: grid; place-items: center; font-size: 34px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.more { width: 100%; min-height: 44px; margin: -2px 0 12px; border: 1.5px dashed var(--line); border-radius: 14px; background: none; color: var(--text); font-weight: 700; cursor: pointer; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.end { display: grid; gap: 8px; margin-top: 28px; }
.end button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 14px; background: none; font-weight: 800; cursor: pointer; }
.foot { max-width: 640px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 13px; }

/* Detail sheet */
dialog { width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--surface); color: var(--text); overflow: auto; }
dialog::backdrop { background: rgba(10, 6, 18, .55); }
/* The flyer whole, the same margin on every side, over a blur of itself */
.flyer { position: relative; z-index: 0; display: grid; place-items: center; overflow: hidden; padding: 24px; }
.flyer-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: blur(40px) saturate(1.6); transform: scale(1.4); opacity: .75; }
/* Full width inside the padding, so the margin is the same on all four sides; only very tall images (stories) get narrower. */
.flyer-img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; border-radius: 14px; }
.sheet-body { padding: 18px 18px 26px; }
.sheet-body h3 { margin: 4px 0 8px; font-size: 24px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.sheet-body p { margin: 10px 0; }
.how { background: var(--chip-bg); border-radius: 14px; padding: 12px 14px; }
.source { color: var(--muted); font-size: 13px; }
.actions { display: grid; gap: 8px; margin-top: 16px; }
.actions a { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 14px; font-weight: 800; text-decoration: none; }
.primary { background: var(--action); color: var(--action-text); }
.secondary { border: 1.5px solid var(--line); color: var(--text); }
.close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(10, 6, 18, .55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }

/* Share: our own event page, by WhatsApp or the phone's share sheet (Instagram) */
.share-label { margin: 18px 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share a, .share button { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 10px; border-radius: 14px; background: none; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }

/* Feedback form */
.feedback label { display: block; margin-top: 14px; font-weight: 700; font-size: 15px; }
.feedback small { color: var(--muted); font-weight: 600; }
.feedback textarea, .feedback input { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 16px; line-height: 1.4; }
.feedback textarea { resize: vertical; }
.captcha { margin-top: 16px; min-height: 65px; }
.form-error { color: var(--action); font-weight: 700; }
.feedback [type=submit] { width: 100%; min-height: 50px; margin-top: 12px; border: 0; border-radius: 14px; font-weight: 800; cursor: pointer; }
.feedback [type=submit]:disabled { opacity: .6; }

/* Event page (/e/<id>) and the "ya no está" page */
.event-page { max-width: 560px; margin: 0 auto; padding: 12px 0 40px; }
.event-page > h1, .event-page > p { padding: 0 18px; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin: 0 18px 4px; color: var(--text); font-weight: 700; text-decoration: none; }
.back.primary { justify-content: center; min-height: 50px; padding: 0 20px; border-radius: 14px; }

/* Icons (Lucide) instead of emoji; each category keeps its colour */
.i { flex: none; }
[data-icon="sparkles"] svg { color: var(--c-all); }
[data-icon="users"] svg { color: var(--c-meet); }
[data-icon="globe"] svg { color: var(--c-intl); }
[data-icon="music"] svg { color: var(--c-dance); }
[data-icon="disc"] svg { color: var(--c-clubs); }
[data-icon="martini"] svg { color: var(--c-bar); }
[data-icon="cap"] svg { color: var(--c-uni); }
[data-icon="tag"] svg { color: var(--c-free); }
.thumb { color: var(--muted); }
