/* Intermezzo — Eventbrite's feed, Google Calendar's month, Meetup's category row; one warm ivory system. */

:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --surface-2: #EEEBE4;
  --surface-3: #E6E2D9;
  --ink: #1D1B18;
  --ink-2: #47433D;
  --muted: #7A756C;
  --line: #E2DED5;
  --accent: #A3243B;
  --accent-ink: #FFFFFF;
  --accent-soft: #F5E2E5;
  --gold: #A9822F;
  --lime: #CCF24B;
  --lime-ink: #1F2A05;
  --blue: #1A73E8;
  --blue-soft: #D3E3FD;
  --t-main: #C0392B;
  --t-recital: #0B8A8C;
  --t-underground: #6A4C93;
  --t-social: #C27C0E;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 8px 24px rgba(30, 25, 15, .07);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 58px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1C1A18;
    --surface-2: #262320;
    --surface-3: #302C28;
    --ink: #F3EFE7;
    --ink-2: #D2CCC1;
    --muted: #9B958B;
    --line: #2F2B27;
    --accent: #E35A70;
    --accent-ink: #1A0B0E;
    --accent-soft: #3A1E24;
    --gold: #D6AE58;
    --blue: #8AB4F8;
    --blue-soft: #1F3354;
    --t-main: #EF6F61;
    --t-recital: #3CC3C4;
    --t-underground: #A68BD1;
    --t-social: #E6A53C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip; }
body {
  font: 16px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; }
input, select, textarea { font: inherit; color: inherit; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; overflow-x: clip; }
#view { padding: calc(var(--top) + 12px) 0 calc(var(--tabbar-h) + var(--bottom) + 24px); min-height: 100vh; }
.pad { padding: 0 18px; }

/* ---------------------------------------------------------------- tab bar (Eventbrite) */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 560px; margin: 0 auto;
  height: calc(var(--tabbar-h) + var(--bottom)); padding-bottom: var(--bottom);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--line);
  will-change: transform;     /* its own layer: no shimmy while the page scrolls under it */
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.tab svg { width: 25px; height: 25px; }
.tab.on { color: var(--ink); }
.tab.on::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; line-height: 16px; text-align: center; }

/* ---------------------------------------------------------------- discover header */
.loc-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 12px; }
.loc { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 21px; letter-spacing: -.01em; }
.loc svg { width: 24px; height: 24px; }
.loc .chev { width: 18px; height: 18px; color: var(--ink-2); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #2DB66B; display: inline-block; margin-left: 2px; }
.sync-dot.off { background: var(--muted); }
.sync-dot.busy { background: var(--gold); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-family: var(--serif); font-weight: 700; font-size: 19px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--accent); }
.avatar.pic { padding: 0; overflow: hidden; background: var(--surface-2); }
.avatar.pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.set-row.acct { justify-content: flex-start; }
.set-row.acct img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.set-row.acct span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.set-row.acct small { color: var(--muted); }

.search { margin: 0 16px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 32px;
  padding: 7px 7px 7px 20px; box-shadow: var(--shadow); }
.search svg.mag { width: 22px; height: 22px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 10px 0; }
.search input::placeholder { color: var(--muted); }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--surface); flex: none; position: relative; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .badge-n { position: absolute; top: -2px; right: -2px; background: var(--accent); color: var(--accent-ink); font-size: 10px;
  font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

/* ---------------------------------------------------------------- Meetup-style category row */
.cats { display: flex; justify-content: space-between; gap: 2px; padding: 18px 10px 0; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 1 0 auto; min-width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px 10px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; position: relative; white-space: nowrap; }
.cat .ic { width: 40px; height: 40px; display: grid; place-items: center; }
.cat .ic svg { width: 40px; height: 40px; overflow: visible; }
.cat.on { color: var(--ink); font-weight: 700; }
.cat.on::after { content: ""; position: absolute; bottom: -1px; left: 10px; right: 10px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); }
.cat .n { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: -4px; }

.chips { display: flex; gap: 8px; padding: 14px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 22px; font-weight: 650; font-size: 14.5px; color: var(--ink-2);
  background: transparent; border: 1px solid transparent; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.chip.ghost { border-color: var(--line); background: var(--surface); }

.tier-blurb { margin: 2px 18px 6px; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- cards (Eventbrite) */
.feed { padding: 8px 16px 0; display: flex; flex-direction: column; gap: 26px; }
.card { position: relative; }
.card-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2 / 1; background: var(--surface-2); }
.card-media img, .hero img, .ticket-card .tc-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media .badges { z-index: 2; }
.badges { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.badge { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 5px 9px 5px 8px;
  border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.badge svg { width: 13px; height: 13px; }
.badge.fast { background: var(--lime); color: var(--lime-ink); }
.badge.free { background: var(--lime); color: var(--lime-ink); }
.badge.pearl { background: linear-gradient(135deg, #FFFFFF 0%, #F1E9FF 40%, #E3F7F1 75%, #FFF6E0 100%); color: #4B3D63; }
.badge.cancel { background: #2B2B2B; color: #fff; }
.badge.new { background: var(--accent); color: var(--accent-ink); }
.badge.mine { background: var(--blue); color: #fff; }
.card-body { padding: 12px 2px 0; }
.card-head { display: flex; align-items: flex-start; gap: 14px; }
.card-title { flex: 1; margin: 0; font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.22; letter-spacing: -.005em; }
.card-actions { display: flex; gap: 14px; padding-top: 1px; }
.card-actions button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); }
.card-actions svg { width: 27px; height: 27px; }
.card-actions .on { color: var(--accent); }
.card-meta { margin: 5px 0 0; color: var(--ink-2); font-size: 16px; }
.card-price { margin: 4px 0 0; font-weight: 700; font-size: 16px; }
.card-why { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.why { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 3px 9px; border-radius: 12px; }
.why.p { background: var(--accent-soft); color: var(--accent); }
.divider { height: 1px; background: var(--line); margin: 0 2px; }

/* generated cover art for events without an image */
.art { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px 16px; overflow: hidden; }
.art::before { content: ""; position: absolute; inset: 0; opacity: .22;
  background: repeating-linear-gradient(180deg, transparent 0 13px, currentColor 13px 14px) 0 38% / 100% 70px no-repeat; }
.art .big { position: relative; font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: .95; letter-spacing: -.02em; }
.art .small { position: absolute; top: 14px; left: 16px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.art .glyph { position: absolute; right: 14px; bottom: 6px; font-family: var(--serif); font-size: 84px; line-height: 1; opacity: .25; }

/* horizontal pearl carousel */
.rail-h { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px 8px; }
.rail-h h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 700; }
.rail-h span { color: var(--muted); font-size: 13.5px; }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 236px; scroll-snap-align: start; }
.mini .card-media { aspect-ratio: 16 / 10; border-radius: 14px; }
.mini .art .big { font-size: 30px; }
.mini h3 { margin: 8px 0 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.22; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.section-sep { height: 8px; background: var(--surface-2); margin: 14px 0 6px; }
.empty { text-align: center; color: var(--muted); padding: 48px 28px; }
.empty .big { font-family: var(--serif); font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.more-btn { margin: 4px auto 0; display: block; padding: 12px 20px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; }

/* ---------------------------------------------------------------- page headers */
.ph { padding: 8px 18px 6px; }
.ph h1 { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 700; letter-spacing: -.015em; }
.ph p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- calendar (Google) */
.cal-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 12px 8px 14px; }
.cal-month { display: flex; align-items: center; gap: 8px; font-size: 30px; font-weight: 450; letter-spacing: -.01em; padding: 6px 10px; border-radius: 22px; }
.cal-month svg { width: 18px; height: 18px; }
.cal-tools { display: flex; gap: 6px; align-items: center; }
.cal-tools .tb { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.cal-tools .tb svg { width: 25px; height: 25px; }
.today-ic { width: 30px; height: 30px; border: 2.4px solid currentColor; border-radius: 7px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; position: relative; }
.pills { display: flex; gap: 10px; overflow-x: auto; padding: 4px 12px 12px; scrollbar-width: none; align-items: center; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 8px 18px; border-radius: 22px; border: 1.5px solid var(--ink-2); font-size: 16px; font-weight: 500; color: var(--ink); }
.pill.on { background: var(--blue-soft); border-color: transparent; }
.pill.yr { border: 0; padding: 8px 4px; font-weight: 500; }
.legend { display: flex; gap: 14px; padding: 0 16px 10px; font-size: 12.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .tg { margin-left: auto; padding: 5px 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; }
.legend .tg.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 13px; color: var(--ink-2); padding-bottom: 6px; }
.dow .sat { color: var(--blue); }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); }
.day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 2px 3px; overflow: hidden; }
.day:nth-child(7n) { border-right: 0; }
.day.other .dn { color: var(--muted); opacity: .55; }
.day .dn { display: block; width: 26px; height: 26px; margin: 0 auto 3px; border-radius: 50%; text-align: center; line-height: 26px; font-size: 13px; }
.day.today .dn { background: var(--blue); color: #fff; font-weight: 700; }
.ev { display: block; font-size: 10.5px; line-height: 15px; font-weight: 650; padding: 1px 3px; margin-bottom: 2px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: clip; border: 1.4px solid transparent; }
.ev.tk { color: #fff; }
.ev.kn { background: var(--bg); }
.ev.pk { border-style: dashed; color: var(--muted); border-color: var(--line); font-weight: 600; }
.ev.more { color: var(--muted); font-weight: 700; padding-left: 4px; }
.fab { will-change: transform; position: fixed; right: max(18px, calc(50% - 262px)); bottom: calc(var(--tabbar-h) + var(--bottom) + 18px); width: 62px; height: 62px;
  border-radius: 18px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; box-shadow: var(--shadow); z-index: 20; }
.fab svg { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- list rows (Pencilled, Tickets, agenda) */
.list { display: flex; flex-direction: column; }
.row { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.datebox { flex: none; width: 52px; text-align: center; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); padding: 6px 0 7px; }
.datebox .m { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.datebox .d { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.05; }
.datebox .w { font-size: 11px; color: var(--muted); font-weight: 600; }
.row-main { flex: 1; min-width: 0; }
.row-title { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.22; }
.row-sub { margin: 3px 0 0; color: var(--ink-2); font-size: 14.5px; }
.row-tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.countdown { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.status { font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--lime); color: var(--lime-ink); }
.status.bad { background: #2B2B2B; color: #fff; }
.status.ended { background: var(--surface-3); color: var(--muted); }
.row-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 24px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.small { padding: 7px 12px; font-size: 13.5px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; }
.seg { display: flex; gap: 6px; padding: 6px 16px 10px; }
.seg button { padding: 7px 14px; border-radius: 18px; font-weight: 650; font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); }
.seg button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.subhead { padding: 18px 18px 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ticket-card { margin: 8px 16px 14px; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.ticket-card .tc-top { position: relative; aspect-ratio: 2.6 / 1; background: var(--surface-2); }
.ticket-card .tc-body { padding: 14px 16px 16px; position: relative; }
.ticket-card .tc-body::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; border-top: 2px dashed var(--line); }
.tc-when { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.rate { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- sources */
.scrape-card { margin: 6px 16px 10px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.scrape-card .k { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.scrape-card .when { font-family: var(--serif); font-size: 25px; font-weight: 700; margin: 4px 0 2px; }
.scrape-card .ago { color: var(--ink-2); font-size: 14.5px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 12px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 9px 6px; text-align: center; }
.stat b { display: block; font-size: 19px; font-family: var(--serif); }
.stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.src { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.src .sd { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #2DB66B; }
.src .sd.empty { background: var(--gold); }
.src .sd.error, .src .sd.blocked { background: #E0443E; }
.src .sd.off, .src .sd.none { background: var(--surface-3); }
.src .sm { flex: 1; min-width: 0; }
.src .sn { font-weight: 650; font-size: 15.5px; }
.src .ss { color: var(--muted); font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src .sc { text-align: right; font-size: 13px; color: var(--ink-2); flex: none; }
.src .sc b { display: block; font-size: 16px; color: var(--ink); }
.new-n { color: var(--accent); font-weight: 700; }
.kind { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; margin-left: 6px; vertical-align: 2px; }
.item { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: baseline; text-align: left; width: 100%; }
.item .it { flex: 1; font-size: 14.5px; }
.item .id { color: var(--muted); font-size: 12.5px; flex: none; width: 92px; }

/* ---------------------------------------------------------------- event overlay */
#overlay-root .ov { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  animation: slidein .26s cubic-bezier(.2, .8, .2, 1); max-width: 560px; margin: 0 auto; }
/* the event page: a scrolling column and the action bar side by side (the bar is never inside what scrolls) */
#overlay-root .ov.evpage { overflow: hidden; }
.ov.evpage .ov-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; }
@keyframes slidein { from { transform: translateX(28px); } }
.ov-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; padding: calc(var(--top) + 10px) 14px 0; pointer-events: none; height: 0; }
.ov-bar button { pointer-events: auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.ov-bar button svg { width: 22px; height: 22px; }
.ov-bar .r { display: flex; gap: 10px; }
.ov-bar .on { color: var(--accent); }
.hero { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.hero .art .big { font-size: 58px; }
.ev-body { padding: 18px 18px calc(110px + var(--bottom)); }
.ev-kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tierdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ev-title { margin: 8px 0 4px; font-family: var(--serif); font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }
.ev-pres { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.why-box { margin: 16px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }
.why-box .wt { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.why-box .card-why { margin: 0; }
.why-box .why { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); }
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.dt { flex: none; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13.5px; line-height: 1.25; }
.dt b { display: block; font-size: 14.5px; }
.dt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dt.gone { opacity: .45; text-decoration: line-through; }
.dt .mk { color: var(--accent); font-weight: 800; }
.dt .dv { display: block; max-width: 150px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 12.5px; }
.dt.on .dv { color: var(--ink-2); }
.info { margin: 14px 0 6px; display: flex; flex-direction: column; gap: 14px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; }
.info-row svg { width: 24px; height: 24px; flex: none; margin-top: 1px; color: var(--ink-2); }
.info-row > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.info-row .l { font-weight: 650; }
.info-row .s { color: var(--muted); font-size: 14.5px; }
.info-row a, a.info-row { text-decoration: none; }
.sec { margin-top: 26px; }
.sec h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 10px; font-weight: 700; }
.prog { list-style: none; margin: 0; padding: 0; }
.prog li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.prog .c { font-weight: 700; }
.prog .w { color: var(--ink-2); }
.perf { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.perf .r { color: var(--muted); }
.desc { white-space: pre-line; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.ev-title, .card-title, .mini h3, .row-title { overflow-wrap: break-word; }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.link { color: var(--accent); font-weight: 650; text-decoration: none; }
.srcs { display: flex; flex-wrap: wrap; gap: 8px; }
.srcs a { font-size: 13.5px; padding: 6px 11px; border-radius: 16px; background: var(--surface-2); text-decoration: none; font-weight: 600; color: var(--ink-2); }
.cta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 55;
  padding: 12px 16px calc(12px + var(--bottom)); display: flex; gap: 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.cta .btn { flex: 1; padding: 13px 14px; font-size: 16px; }
.quiet-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- sheets */
.scrim { position: fixed; inset: 0; background: rgba(10, 8, 5, .38); z-index: 70; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-width: 560px; margin: 0 auto; background: var(--bg);
  border-radius: 22px 22px 0 0; max-height: 88vh; overflow-y: auto; padding: 8px 18px calc(22px + var(--bottom));
  animation: up .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
@keyframes up { from { transform: translateY(30%); } }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet h2 { font-family: var(--serif); font-size: 25px; margin: 2px 0 4px; }
.sheet h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.sheet .p { color: var(--muted); font-size: 14.5px; margin: 0 0 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 9px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14.5px; }
.opt.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row .tl { font-weight: 600; }
.toggle-row .ts { color: var(--muted); font-size: 13.5px; }
.sw { position: relative; width: 51px; height: 31px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; border-radius: 16px; background: var(--surface-3); transition: background .2s; }
.sw span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.sw input:checked + span { background: #34C759; }
.sw input:checked + span::after { transform: translateX(20px); }
.taste { display: flex; flex-direction: column; gap: 8px; }
.tw { display: flex; align-items: center; gap: 10px; }
.tw .tn { width: 132px; font-weight: 600; font-size: 14.5px; }
.tw .tb { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.tw .tb i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.tw .tb i.neg { background: var(--muted); }
.tw button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; outline: none; }
.field textarea { min-height: 70px; resize: vertical; }
.pick { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.pick button { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.pick button span { color: var(--muted); font-weight: 500; font-size: 14px; display: block; }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--bottom) + 18px); transform: translate(-50%, 30px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 22px; font-weight: 600; font-size: 14.5px; z-index: 110;
  transition: all .25s; pointer-events: none; max-width: 90vw; text-align: center; box-shadow: var(--shadow); }
#toast.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#toast button { color: var(--lime); font-weight: 800; margin-left: 10px; }

.banner { margin: 10px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.banner b { display: block; }
.banner .btn { flex: none; }
.offline { margin: 8px 16px 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; text-align: center; }

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

/* On Today */
.tbadge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800;
  letter-spacing: .03em; text-transform: uppercase; padding: 4px 8px; border-radius: 7px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tbadge.now { background: var(--accent); color: var(--accent-ink); }
.tbadge.done { background: rgba(20, 18, 16, .6); color: #fff; }
.mini.past { opacity: .5; }

/* sign-in (cloud server) */
body.locked { overflow: hidden; }
.login { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: calc(var(--top) + 24px) 28px calc(var(--bottom) + 24px); text-align: center; }
.login-ic { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); }
.login h1 { margin: 6px 0 0; font-family: var(--serif); font-size: 34px; letter-spacing: -.015em; }
.login-p { margin: 0 0 8px; color: var(--muted); font-size: 15px; max-width: 320px; }
.login-p code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; color: var(--ink-2); }
.login form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 10px; }
.login input[type=password] { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-size: 17px; outline: none; }
.login input[type=password]:focus { border-color: var(--accent); }
.login .btn { max-width: 320px; width: 100%; padding: 14px; font-size: 16px; }
.login-err { min-height: 20px; margin: 0; color: var(--accent); font-size: 14px; font-weight: 600; max-width: 320px; }
/* Google's button (branding guidelines: white or #131314, the four-colour G, "Sign in with Google") */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 320px; height: 50px;
  border-radius: 25px; border: 1px solid #747775; background: #FFFFFF; color: #1F1F1F; font-size: 16px; font-weight: 600;
  text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
.gbtn:active { transform: scale(.98); }
.gbtn.off { opacity: .6; pointer-events: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gbtn { background: #131314; color: #E3E3E3; border-color: #8E918F; } }
:root[data-theme="dark"] .gbtn { background: #131314; color: #E3E3E3; border-color: #8E918F; }
.login-alt { margin-top: 6px; background: none; border: 0; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px; }
.login-wait { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 15px; font-weight: 600; margin: 4px 0; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent);
  animation: turn .8s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.signed-in { padding: 26px 16px 4px; text-align: center; color: var(--muted); font-size: 13.5px; }
.signed-in b { color: var(--ink-2); font-weight: 600; }
.signed-in .link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; }

/* distance, busy hours, leave early */
.km { color: var(--muted); white-space: nowrap; }
.why.early { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }
.why.early svg { width: 13px; height: 13px; }
.busy-line { display: flex; align-items: center; gap: 7px; margin: 2px 18px 8px; color: var(--muted); font-size: 13.5px; }
.busy-line svg { width: 16px; height: 16px; flex: none; }
.busy-line .link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); }
.loc-actions { display: flex; align-items: center; gap: 12px; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.round-btn svg { width: 21px; height: 21px; }
.dt.busy { opacity: .55; }
.dt.busy .mk { color: var(--muted); }
.info-row.fit-ok svg { color: #2DB66B; }
.info-row.fit-early svg, .info-row.fit-early .l { color: var(--gold); }
.info-row.fit-busy svg { color: var(--muted); }

/* settings page */
.set-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 8px) 12px 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.set-top h1 { margin: 0; font-family: var(--serif); font-size: 26px; letter-spacing: -.01em; }
.set-back { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); flex: none; }
.set-back svg { width: 22px; height: 22px; }
.set-body { max-width: 560px; margin: 0 auto; padding: 4px 16px calc(var(--bottom) + 40px); }
.set-sec { margin: 22px 0 0; }
.set-sec h2 { margin: 0 2px 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.set-help { color: var(--muted); font-size: 14px; margin: 8px 2px 0; }
.set-fine { color: var(--muted); font-size: 12px; margin: 8px 2px 0; opacity: .85; }
.set-err { color: var(--accent); font-size: 14px; font-weight: 600; margin: 10px 2px 0; }
.set-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.home-now { display: flex; align-items: center; gap: 12px; }
.home-now > svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.home-now > div { flex: 1; min-width: 0; }
.home-now .tl { font-weight: 650; }
.home-now .ts { color: var(--muted); font-size: 13px; }
.home-now .link { background: none; border: 0; font-size: 14px; }
.addr { display: flex; gap: 8px; }
.addr input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; outline: none; }
.addr input:focus { border-color: var(--accent); }
.addr-res { display: flex; flex-direction: column; gap: 4px; margin-top: -4px; }
.addr-res button { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.addr-res button svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.addr-res small { color: var(--muted); font-size: 12.5px; }
.seg.wrap { flex-wrap: wrap; padding: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; }
.set-row select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 600; }
.set-row .link { background: none; border: 0; padding: 0; font-size: 15px; }
.days { gap: 0; padding: 4px 14px; }
.bday { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.bday:last-child { border-bottom: 0; }
.bday .bdn { width: 40px; font-weight: 700; }
.bday input[type=time] { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 15px;
  min-width: 0; width: 118px; }
.bday .to { color: var(--muted); }
.bday .freetxt { color: var(--muted); font-size: 14.5px; }
.set-sec h3 { margin: 18px 2px 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sw.sm { width: 44px; height: 27px; }
.sw.sm span::after { width: 23px; height: 23px; }
.sw.sm input:checked + span::after { transform: translateX(17px); }

/* map page */
.map-ov { overflow: hidden !important; }
#map { position: absolute; inset: 0; background: var(--surface-2); }
.map-top { position: absolute; z-index: 500; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--top) + 10px) 12px 10px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.map-chips::-webkit-scrollbar { display: none; }
.map-chips .chip { background: var(--surface); box-shadow: var(--shadow); }
.map-chips .chip.on { background: var(--accent); }
.map-note { position: absolute; z-index: 500; left: 12px; bottom: calc(var(--bottom) + 22px); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-weight: 650; padding: 6px 10px; border-radius: 14px; box-shadow: var(--shadow); }
.map-panel { position: absolute; z-index: 1100; left: 0; right: 0; bottom: 0; max-height: 52vh; overflow-y: auto; background: var(--bg);
  border-radius: 20px 20px 0 0; padding: 10px 16px calc(var(--bottom) + 14px); box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
.map-panel[hidden] { display: none !important; }
.mp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.mp-head b { display: block; font-family: var(--serif); font-size: 20px; }
.mp-head span { color: var(--muted); font-size: 13.5px; }
.mp-head button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.mp-head button svg { width: 18px; height: 18px; }
.mp-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.mp-item:last-child { border-bottom: 0; }
.mp-item .tierdot { margin-top: 7px; flex: none; }
.mp-item b { display: block; font-family: var(--serif); font-size: 16.5px; line-height: 1.25; }
.mp-item small { color: var(--muted); font-size: 13px; }
.mpin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff;
  font-size: 12px; font-weight: 800; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.3); cursor: pointer; padding: 0; }
.mhome { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg);
  border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.mhome svg { width: 17px; height: 17px; }
.maplibregl-map { font: inherit; }
.maplibregl-ctrl-bottom-right { margin-bottom: calc(var(--bottom) + 6px); }
.maplibregl-ctrl-group { border-radius: 12px !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-attrib.maplibregl-compact { font-size: 11px; }

/* notifications page */
.nsub { padding-left: 2px; transition: opacity .2s; }
.nsub.muted { opacity: .45; pointer-events: none; }
.nlabel { margin: 14px 0 8px; font-weight: 650; font-size: 14.5px; }
.nlabel span { color: var(--muted); font-weight: 500; font-size: 13px; }
.nchips { display: flex; flex-wrap: wrap; gap: 8px; }
.nchips .chip { padding: 7px 13px; font-size: 14px; }
.toggle-row select, .nquiet select { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; margin-top: 4px; }
.nquiet { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

/* your price */
.for-you { color: var(--muted); font-weight: 500; font-size: 14px; }
.tiers { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.tier.no { text-decoration: line-through; opacity: .5; }
.set-row input[type=date] { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
