/* =========================================================================
   Entro design system
   One stylesheet for every page. Tokens come from the logo (mauve to deep
   navy) and the mobile app (violet actions, amber highlights, Poppins).
   Components use the "e-" prefix. The bottom section ("Legacy bridge")
   restyles older pages that still use their own class names.
   ========================================================================= */

:root {
  --e-ink: #17132e;
  --e-ink-2: #3a3555;
  --e-muted: #6b6784;
  --e-faint: #9a96ad;
  --e-navy: #231e5c;
  --e-deep: #2d264b;
  --e-accent: #6c5ce7;
  --e-accent-2: #5a49d8;
  --e-accent-soft: #efedfd;
  --e-mauve: #b98cb9;
  --e-mauve-soft: #f6eef6;
  --e-amber: #e4aa3d;
  --e-amber-soft: #fdf4e3;
  --e-green: #0f9d6b;
  --e-green-soft: #e6f6ef;
  --e-red: #d64545;
  --e-red-soft: #fdeeee;
  --e-bg: #f7f6fb;
  --e-surface: #ffffff;
  --e-line: #e8e6f0;
  --e-line-2: #d9d6e5;

  --e-font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --e-display: 'Poppins', 'DM Sans', system-ui, sans-serif;

  --e-r-sm: 10px;
  --e-r: 14px;
  --e-r-lg: 20px;
  --e-r-xl: 28px;
  --e-shadow-sm: 0 1px 2px rgba(23, 19, 46, .06);
  --e-shadow: 0 1px 2px rgba(23, 19, 46, .05), 0 8px 24px -8px rgba(23, 19, 46, .12);
  --e-shadow-lg: 0 24px 60px -20px rgba(23, 19, 46, .35);
  --e-ring: 0 0 0 3px rgba(108, 92, 231, .28);
  --e-header-h: 64px;
  --e-ease: cubic-bezier(.2, .7, .2, 1);

  /* Legacy tokens used by older inline styles, remapped to the new palette. */
  --purple: var(--e-accent);
  --purple-dk: var(--e-accent-2);
  --dark: var(--e-ink);
  --gray: var(--e-muted);
  --light: var(--e-bg);
  --white: #fff;
  --pink: var(--e-mauve);
  --yellow: var(--e-amber);
  --green: var(--e-green);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--e-header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--e-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--e-ink);
  background: var(--e-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--e-display); color: inherit; letter-spacing: -.02em; line-height: 1.2; }
img { max-width: 100%; }
a { color: inherit; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--e-ring); border-radius: 8px; }
.e-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.e-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .e-wrap { padding: 0 28px; } }
.e-hide, [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Header ---------- */
.e-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(23, 19, 46, .07);
}
.e-header .e-wrap { display: flex; align-items: center; gap: 12px; height: var(--e-header-h); }
.e-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--e-navy); flex-shrink: 0; }
.e-brand img { width: 34px; height: 34px; }
.e-brand img.e-wordmark { width: auto; height: 22px; display: block; }
.e-header .e-brand img.e-wordmark, .a-top .e-brand img.e-wordmark { height: 17px; }
.e-sheet-top .e-brand img.e-wordmark { height: 17px; }
.e-brand span { font-family: var(--e-display); font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.e-nav { display: none; align-items: center; gap: 2px; margin-left: 18px; }
.e-nav a {
  text-decoration: none; color: var(--e-ink-2); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px; transition: background .15s, color .15s;
}
.e-nav a:hover { background: var(--e-bg); color: var(--e-ink); }
.e-nav a[aria-current="page"] { color: var(--e-accent); }
.e-hsearch {
  display: none; align-items: center; gap: 8px; flex: 1; max-width: 340px; margin-left: auto;
  background: var(--e-bg); border: 1px solid transparent; border-radius: 999px; padding: 0 14px; height: 40px;
  transition: border-color .15s, background .15s;
}
.e-hsearch:focus-within { background: #fff; border-color: var(--e-line-2); box-shadow: var(--e-ring); }
.e-hsearch svg { color: var(--e-faint); flex-shrink: 0; }
.e-hsearch input { border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; width: 100%; color: var(--e-ink); }
.e-hactions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
@media (min-width: 960px) { .e-hsearch + .e-hactions { margin-left: 8px; } }
.e-icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: transparent; color: var(--e-ink); cursor: pointer; text-decoration: none; position: relative;
}
.e-icon-btn:hover { background: var(--e-bg); }
.e-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--e-mauve), var(--e-navy)); color: #fff; font-weight: 700; font-size: 14px;
  font-family: var(--e-display); flex-shrink: 0;
}
.e-avatar img { width: 100%; height: 100%; object-fit: cover; }
.e-acct { position: relative; }
.e-acct > button { border: 0; background: transparent; padding: 2px; border-radius: 50%; cursor: pointer; display: flex; }
.e-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; background: #fff;
  border: 1px solid var(--e-line); border-radius: var(--e-r); box-shadow: var(--e-shadow-lg); padding: 8px;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.e-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.e-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--e-line); margin-bottom: 6px; }
.e-menu-head b { display: block; font-size: 15px; }
.e-menu-head small { color: var(--e-muted); font-size: 13px; word-break: break-all; }
.e-menu a, .e-menu button.e-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--e-ink); font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left;
}
.e-menu a:hover, .e-menu button.e-menu-item:hover { background: var(--e-bg); }
.e-menu svg { color: var(--e-muted); }
.e-menu hr { border: 0; border-top: 1px solid var(--e-line); margin: 6px 0; }
.e-btn.e-hlink { display: none; }
@media (max-width: 959px) { .e-btn.e-hlink--keep { display: inline-flex; } }
@media (min-width: 960px) {
  .e-nav { display: flex; }
  .e-hsearch { display: flex; }
  .e-btn.e-hlink { display: inline-flex; }
  .e-only-mobile { display: none !important; }
}
@media (max-width: 959px) { .e-only-desktop { display: none !important; } }

/* Mobile sheet */
.e-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(23, 19, 46, .45); z-index: 950; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.e-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.e-sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 360px); background: #fff; z-index: 960;
  transform: translateX(100%); transition: transform .25s var(--e-ease); display: flex; flex-direction: column;
  padding: 14px 16px 24px; overflow-y: auto;
}
.e-sheet.open { transform: none; }
.e-sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.e-sheet nav a {
  display: flex; align-items: center; gap: 12px; padding: 13px 10px; border-radius: 12px; text-decoration: none;
  color: var(--e-ink); font-size: 16px; font-weight: 500;
}
.e-sheet nav a:hover, .e-sheet nav a[aria-current="page"] { background: var(--e-bg); }
.e-sheet nav svg { color: var(--e-muted); }
.e-sheet-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--e-faint); padding: 14px 10px 4px; }
.e-sheet .e-btn { margin-top: 8px; }
body.e-locked { overflow: hidden; }

/* Mobile search overlay */
.e-search-overlay {
  position: fixed; inset: 0; z-index: 970; background: #fff; display: none; flex-direction: column;
}
.e-search-overlay.open { display: flex; }
.e-search-overlay form { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--e-line); }
.e-search-overlay input { flex: 1; border: 0; outline: none; font: inherit; font-size: 17px; padding: 10px 4px; }
.e-search-hints { padding: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buttons ---------- */
.e-btn {
  --b-bg: var(--e-accent); --b-fg: #fff; --b-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.e-btn:hover { background: var(--e-accent-2); }
.e-btn:active { transform: translateY(1px); }
.e-btn[disabled], .e-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.e-btn--dark { --b-bg: var(--e-ink); }
.e-btn--dark:hover { background: #000; }
.e-btn--light { --b-bg: #fff; --b-fg: var(--e-ink); --b-bd: var(--e-line-2); }
.e-btn--light:hover { background: var(--e-bg); }
.e-btn--soft { --b-bg: var(--e-accent-soft); --b-fg: var(--e-accent-2); }
.e-btn--soft:hover { background: #e3dffc; }
.e-btn--ghost { --b-bg: transparent; --b-fg: var(--e-ink); }
.e-btn--ghost:hover { background: var(--e-bg); }
.e-btn--onDark { --b-bg: rgba(255,255,255,.12); --b-fg: #fff; --b-bd: rgba(255,255,255,.28); }
.e-btn--onDark:hover { background: rgba(255,255,255,.2); }
.e-btn--danger { --b-bg: var(--e-red-soft); --b-fg: var(--e-red); }
.e-btn--danger:hover { background: #fbdcdc; }
.e-btn--sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.e-btn--lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.e-btn--block { width: 100%; }
.e-btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.e-btn.is-loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--b-fg) transparent var(--b-fg) transparent; animation: e-spin .7s linear infinite;
}
@keyframes e-spin { to { transform: rotate(360deg); } }

/* ---------- Chips ---------- */
.e-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.e-chips::-webkit-scrollbar { display: none; }
.e-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--e-line-2); background: #fff; color: var(--e-ink-2); font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: all .15s; flex-shrink: 0;
}
.e-chip:hover { border-color: var(--e-ink-2); color: var(--e-ink); }
.e-chip[aria-pressed="true"], .e-chip.is-active { background: var(--e-ink); border-color: var(--e-ink); color: #fff; }

/* ---------- Badges ---------- */
.e-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--e-accent-soft); color: var(--e-accent-2); white-space: nowrap;
}
.e-badge--green { background: var(--e-green-soft); color: var(--e-green); }
.e-badge--amber { background: var(--e-amber-soft); color: #9a6a12; }
.e-badge--red { background: var(--e-red-soft); color: var(--e-red); }
.e-badge--gray { background: #f0eff5; color: var(--e-muted); }
.e-badge--dark { background: rgba(23,19,46,.78); color: #fff; backdrop-filter: blur(6px); }

/* ---------- Forms ---------- */
.e-field { display: grid; gap: 7px; margin-bottom: 16px; }
.e-label { font-size: 14px; font-weight: 600; color: var(--e-ink); }
.e-hint { font-size: 13px; color: var(--e-muted); }
.e-input, .e-select, .e-textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--e-line-2); background: #fff;
  font: inherit; font-size: 16px; color: var(--e-ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.e-textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.e-input::placeholder, .e-textarea::placeholder { color: var(--e-faint); }
.e-input:focus, .e-select:focus, .e-textarea:focus { border-color: var(--e-accent); box-shadow: var(--e-ring); }
.e-input[aria-invalid="true"] { border-color: var(--e-red); }
.e-error { font-size: 13px; color: var(--e-red); }
.e-pass { position: relative; }
.e-pass .e-input { padding-right: 48px; }
.e-pass button { position: absolute; right: 4px; top: 4px; }
.e-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--e-ink-2); cursor: pointer; }
.e-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--e-accent); flex-shrink: 0; }

/* ---------- Cards & surfaces ---------- */
.e-card { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: var(--e-r-lg); }
.e-card--pad { padding: 20px; }
@media (min-width: 720px) { .e-card--pad { padding: 28px; } }
.e-divider { border: 0; border-top: 1px solid var(--e-line); margin: 20px 0; }

/* ---------- Section headings ---------- */
.e-section { padding: 40px 0; }
@media (min-width: 720px) { .e-section { padding: 64px 0; } }
.e-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.e-sec-head h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 700; margin: 0; }
.e-sec-head p { margin: 6px 0 0; color: var(--e-muted); }
.e-link { color: var(--e-accent-2); font-weight: 600; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.e-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.e-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--e-accent-2); }

/* ---------- Event card ---------- */
.e-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .e-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .e-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1180px) { .e-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.e-rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 300px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; padding: 4px 16px 8px; margin: 0 -16px; }
.e-rail::-webkit-scrollbar { display: none; }
.e-rail > * { scroll-snap-align: start; }
@media (min-width: 720px) { .e-rail { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; padding: 0; margin: 0; } }
@media (min-width: 960px) { .e-rail { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.e-ev { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--e-r-lg); border: 1px solid var(--e-line); overflow: hidden; transition: transform .2s var(--e-ease), box-shadow .2s; }
.e-ev:hover { transform: translateY(-3px); box-shadow: var(--e-shadow); }
.e-ev-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #ece8f6, #f6eef6); overflow: hidden; }
.e-ev-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--e-ease), opacity .3s; }
.e-ev:hover .e-ev-media img { transform: scale(1.03); }
.e-ev-media img.is-loading { opacity: 0; }
.e-ev-tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }
.e-ev-save {
  position: absolute; right: 10px; top: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: var(--e-ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--e-shadow-sm);
}
.e-ev-save[aria-pressed="true"] { color: #e0457b; }
.e-ev-save[aria-pressed="true"] svg { fill: currentColor; }
.e-ev-date {
  position: absolute; left: 12px; bottom: 12px; background: #fff; border-radius: 12px; padding: 6px 10px; text-align: center; line-height: 1.05;
  box-shadow: var(--e-shadow-sm); min-width: 50px;
}
.e-ev-date b { display: block; font-family: var(--e-display); font-size: 20px; }
.e-ev-date small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--e-accent-2); }
.e-ev-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.e-ev-cat { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--e-muted); }
.e-ev-title { font-family: var(--e-display); font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.e-ev-title a { text-decoration: none; color: var(--e-ink); }
.e-ev-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.e-ev-meta { display: flex; align-items: center; gap: 6px; color: var(--e-muted); font-size: 14px; min-width: 0; }
.e-ev-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-ev-meta svg { flex-shrink: 0; color: var(--e-faint); }
.e-ev-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.e-price { font-family: var(--e-display); font-weight: 700; font-size: 16px; color: var(--e-ink); }
.e-price small { font-family: var(--e-font); font-weight: 500; font-size: 13px; color: var(--e-muted); }
.e-price--free { color: var(--e-green); }
.e-ev-left { font-size: 13px; color: var(--e-muted); }
.e-ev-left.is-low { color: #b45309; font-weight: 600; }
.e-ev.is-past { opacity: .72; }

/* List variant */
.e-ev--row { flex-direction: row; }
.e-ev--row .e-ev-media { width: 132px; aspect-ratio: auto; flex-shrink: 0; }
.e-ev--row .e-ev-date, .e-ev--row .e-ev-tags { display: none; }

/* ---------- Skeletons ---------- */
.e-skel { position: relative; overflow: hidden; background: #eeecf4; border-radius: 8px; }
.e-skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: e-shimmer 1.3s infinite; }
@keyframes e-shimmer { to { transform: translateX(100%); } }
.e-skel-card { border-radius: var(--e-r-lg); border: 1px solid var(--e-line); background: #fff; overflow: hidden; }
.e-skel-card .e-skel:first-child { aspect-ratio: 4 / 3; border-radius: 0; }
.e-skel-line { height: 12px; margin: 12px 16px 0; }
.e-skel-line:last-child { margin-bottom: 18px; }

/* ---------- Empty / status states ---------- */
.e-empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--e-line-2); border-radius: var(--e-r-lg); background: #fff; }
.e-empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--e-accent-soft); color: var(--e-accent-2); }
.e-empty h3 { font-size: 19px; margin: 0 0 6px; }
.e-empty p { color: var(--e-muted); margin: 0 auto 18px; max-width: 420px; }
.e-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--e-accent-soft); color: var(--e-ink-2); }
.e-note svg { flex-shrink: 0; color: var(--e-accent-2); margin-top: 1px; }
.e-note--amber { background: var(--e-amber-soft); }
.e-note--amber svg { color: #b7791f; }
.e-note--red { background: var(--e-red-soft); }
.e-note--red svg { color: var(--e-red); }
.e-note--green { background: var(--e-green-soft); }
.e-note--green svg { color: var(--e-green); }

/* ---------- Toasts ---------- */
.e-toasts { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2000; display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.e-toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; background: var(--e-ink); color: #fff;
  box-shadow: var(--e-shadow-lg); font-size: 15px; pointer-events: auto; animation: e-toast-in .25s var(--e-ease);
}
.e-toast svg { flex-shrink: 0; margin-top: 2px; }
.e-toast--error svg { color: #ff8f8f; }
.e-toast--success svg { color: #5fe0a8; }
.e-toast button { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; padding: 0 2px; font-size: 18px; line-height: 1; }
@keyframes e-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Dialog ---------- */
.e-dialog-backdrop { position: fixed; inset: 0; background: rgba(23,19,46,.5); z-index: 1500; display: grid; place-items: end center; padding: 0; animation: e-fade .2s; }
@media (min-width: 640px) { .e-dialog-backdrop { place-items: center; padding: 20px; } }
.e-dialog { background: #fff; width: 100%; max-width: 460px; border-radius: 22px 22px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--e-shadow-lg); animation: e-rise .25s var(--e-ease); max-height: 92vh; overflow-y: auto; }
@media (min-width: 640px) { .e-dialog { border-radius: 22px; padding: 26px; } }
.e-dialog h3 { margin: 0 0 6px; font-size: 20px; }
.e-dialog p { margin: 0 0 18px; color: var(--e-muted); }
.e-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.e-dialog-actions .e-btn { flex: 1; }
@keyframes e-fade { from { opacity: 0; } }
@keyframes e-rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Footer ---------- */
.e-footer { background: var(--e-ink); color: rgba(255,255,255,.72); padding: 48px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 0; }
.e-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.e-footer a:hover { color: #fff; }
.e-foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.e-foot-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .e-foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .e-foot-brand { grid-column: auto; } }
.e-foot-brand .e-brand { color: #fff; }
.e-foot-brand p { margin: 12px 0 18px; max-width: 340px; font-size: 15px; }
.e-foot-col h4 { color: #fff; font-size: 14px; font-family: var(--e-font); font-weight: 700; letter-spacing: 0; margin: 0 0 12px; }
.e-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.e-socials { display: flex; gap: 8px; }
.e-socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.e-socials a:hover { background: rgba(255,255,255,.16); }
.e-foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 14px; }
.e-app-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff !important; font-size: 13px; line-height: 1.2; }
.e-app-badge b { display: block; font-size: 15px; }

/* ---------- Utility ---------- */
.e-row { display: flex; align-items: center; gap: 10px; }
.e-stack { display: grid; gap: 12px; }
.e-muted { color: var(--e-muted); }
.e-center { text-align: center; }
.e-mt { margin-top: 16px; }
.e-page-head { padding: 28px 0 8px; }
@media (min-width: 720px) { .e-page-head { padding: 44px 0 12px; } }
.e-page-head h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 700; margin: 0; }
.e-page-head p { color: var(--e-muted); margin: 8px 0 0; font-size: 17px; max-width: 640px; }
.e-backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--e-muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; }
.e-backlink:hover { color: var(--e-ink); }

/* =========================================================================
   Legacy bridge: older pages keep their own markup; these rules bring their
   type, colour and controls in line until each page is rebuilt.
   ========================================================================= */
body.e-legacy h1, body.e-legacy h2, body.e-legacy h3, body.e-legacy h4 { font-family: var(--e-display); letter-spacing: -.02em; }
body.e-legacy { background: var(--e-bg); }
body.e-legacy input, body.e-legacy select, body.e-legacy textarea, body.e-legacy button { font-family: var(--e-font); }
body.e-legacy .container { max-width: 1200px; }
body.e-legacy [class*="btn"]:not(.e-btn) { border-radius: 12px; }

/* ---------- Auth layout (sign in, sign up, password reset) ---------- */
.a-page { min-height: 100vh; display: grid; background: #fff; }
@media (min-width: 960px) { .a-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.a-side { display: none; position: relative; overflow: hidden; color: #fff; background: var(--e-ink); padding: 48px; flex-direction: column; justify-content: space-between; }
.a-side::before { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 60% at 90% 0%, rgba(185,140,185,.5), transparent 60%), radial-gradient(60% 60% at 0% 100%, rgba(108,92,231,.55), transparent 60%), linear-gradient(160deg, #17132e, #231e5c); }
.a-side > * { position: relative; }
@media (min-width: 960px) { .a-side { display: flex; } }
.a-side .e-brand { color: #fff; }
.a-side h2 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; max-width: 460px; }
.a-side p { color: rgba(255,255,255,.75); font-size: 17px; max-width: 420px; margin: 0; }
.a-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.a-points li { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.9); }
.a-points span { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; flex-shrink: 0; }
.a-main { display: flex; flex-direction: column; padding: 16px 16px 32px; }
@media (min-width: 720px) { .a-main { padding: 28px 40px 40px; } }
.a-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 960px) { .a-top .e-brand { visibility: hidden; } }
.a-form { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; }
.a-form h1 { font-size: clamp(28px, 4vw, 34px); margin: 0 0 6px; }
.a-form > p { color: var(--e-muted); margin: 0 0 24px; }
.a-or { display: flex; align-items: center; gap: 12px; color: var(--e-faint); font-size: 13px; margin: 18px 0; }
.a-or::before, .a-or::after { content: ''; flex: 1; border-top: 1px solid var(--e-line); }
.a-google { gap: 10px; }
.a-form .a-foot { text-align: center; margin: 22px 0 0; color: var(--e-muted); font-size: 15px; }
.a-foot a, .a-link { color: var(--e-accent-2); font-weight: 600; text-decoration: none; }
.a-foot a:hover, .a-link:hover { text-decoration: underline; }
.a-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.a-strength { display: flex; gap: 4px; margin-top: 2px; }
.a-strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--e-line); transition: background .2s; }
.a-msg { margin-bottom: 16px; }
.a-done { text-align: center; }
.a-done .e-empty-icon { width: 64px; height: 64px; border-radius: 50%; }

/* ---------- Organizer tab bar ---------- */
.e-subnav { border-top: 1px solid rgba(23,19,46,.06); }
.e-subnav .e-wrap { display: flex; gap: 4px; height: 48px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.e-subnav .e-wrap::-webkit-scrollbar { display: none; }
.e-subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--e-muted); text-decoration: none; font-size: 14.5px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.e-subnav a:hover { color: var(--e-ink); }
.e-subnav a[aria-current="page"] { color: var(--e-ink); border-bottom-color: var(--e-accent); }
.e-subnav .e-subnav-cta { margin-left: auto; color: var(--e-accent-2); }
html:has(.e-subnav) { scroll-padding-top: calc(var(--e-header-h) + 60px); }

/* Older pages style bare header/nav/footer elements; keep those rules off the shell. */
.e-header nav, .e-footer nav { height: auto; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; justify-content: flex-start; }
.e-header nav.e-nav { justify-content: flex-start; }
.e-subnav .e-wrap { height: 48px; }
header.e-header { padding: 0; box-shadow: none; }
footer.e-footer { margin: 0; }
footer.e-footer ul { margin: 0; padding: 0; }
