/* SOBIRA — clean, modern, friendly, social, map-oriented.
   Mobile-first: 360 / 390 / 430 are the primary targets. */

:root {
  --brand: #117d72;
  --brand-dark: #0c675e;
  --brand-light: #14b8a6;
  --brand-soft: #e6f5f1;
  --accent: #f97316;
  --text: #172b38;
  --muted: #657682;
  --border: #e2ebed;
  --bg: #f6faf9;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
  --success: #16855b;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
  --header-h: 56px;
  --bottom-nav-h: 72px;
  /* Layer scale, low -> high:
         1  map (its own isolated stacking context)
        40  dropdown filter panel
        50  sticky header
        60  bottom navigation / header dropdowns
       100  modal (support)
     Add new layers inside this scale; never reach for a magic number such
     as 999999. The map is isolated at --z-map so a provider's internal panes
     (Leaflet ships z-index up to 1000) can never paint over the header or a
     header dropdown. */
  --z-map: 1;
  --z-header: 50;
  --z-dropdown: 60;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  /* Inline-only gutters: a plain "padding" shorthand here used to fight the
     .section vertical shorthand on every ".section.container" element (the
     later rule won and cancelled one of the two axes). Keeping the axes
     independent makes the two utilities composable. */
  padding-inline: 16px;
}

.app-main { min-height: calc(100vh - var(--header-h)); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 18px;
  color: var(--brand);
  display: flex;
  align-items: center;
}
.brand-logo { height: 44px; width: 132px; display: block; }
/* 320px-class phones: keep the logo from crowding the locale/avatar controls. */
@media (max-width: 380px) { .brand-logo { width: 112px; height: 37px; } }
.header-left { display: flex; align-items: center; min-width: 0; margin-right: auto; }
.header-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.desktop-nav { display: none; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--brand-dark);
  transition: none;
}
.nav-link:hover { color: var(--brand); }
.nav-link.is-active:not(.nav-create) { color: var(--brand-dark); background: var(--brand-soft); border-color: #9bd9cc; }
.nav-link.nav-create,
.nav-link.nav-create.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }
.nav-link.nav-create:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.site-header .nav-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.lang-switcher { position: relative; }
.lang-switcher summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--brand);
  border: 1px solid var(--border);
  background: #fff;
}
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.lang-menu a { padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.lang-menu a:hover { background: var(--bg); }
.lang-menu a.is-active { color: var(--brand); font-weight: 700; }
.profile-link {
  width: 44px;
  height: 44px;
  aspect-ratio: 1 / 1;
  flex: 0 0 44px;
  overflow: hidden;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  border: 1px solid var(--border);
}
.profile-link-avatar { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; }
.profile-link:focus-visible,
.avatar-trigger:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.profile-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-light);
}
.avatar-menu { position: relative; }
.avatar-trigger { cursor: pointer; position: relative; }
.avatar-unread {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid #fff;
  box-sizing: content-box;
  pointer-events: none;
}
.avatar-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: var(--z-dropdown);
}
.avatar-dropdown[hidden] { display: none; }
.avatar-menu-profile { display:flex; align-items:center; gap:11px; padding:12px 12px 10px; }
.avatar-menu-profile-avatar { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; overflow:hidden; border-radius:50%; background:var(--brand-soft); color:var(--brand-dark); font-weight:700; }
.avatar-menu-profile-avatar img { width:100%; height:100%; object-fit:cover; }
.avatar-menu-profile-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.avatar-menu-profile-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.avatar-menu-profile-copy > span { color:var(--muted); font-size:12px; }
.avatar-menu-open-profile { display:flex; justify-content:space-between; align-items:center; padding:9px 12px; border-radius:8px; color:var(--brand-dark); font-size:13px; font-weight:650; }
.avatar-menu-open-profile:hover, .avatar-menu-open-profile:focus-visible { background:var(--brand-soft); }
.avatar-menu-group { border-top:1px solid var(--border); padding:8px 0 5px; }
.avatar-menu-heading { display:block; padding:3px 12px 5px; color:var(--muted); font-size:10px; font-weight:750; letter-spacing:.09em; }
.avatar-menu-icon { flex:0 0 18px; width:18px; color:var(--muted); font-size:17px; line-height:1; text-align:center; }
.avatar-menu-item { justify-content:flex-start; }
.avatar-menu-item > :last-child:not(.avatar-menu-icon) { margin-left:auto; }
.avatar-menu-form { border-top:1px solid var(--border); padding-top:5px; margin-top:4px; }
.avatar-menu-logout { color:#b42318; }
.avatar-dropdown { width: min(310px, calc(100vw - 24px)); max-height: min(78vh, 680px); overflow-y: auto; overscroll-behavior: contain; }
.avatar-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.avatar-menu-group .avatar-menu-item { justify-content: flex-start; }
.avatar-menu-item:hover { background: var(--bg); }
.avatar-menu-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--bg); }
.avatar-menu-badge {
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex: 0 0 auto;
}
@media (max-width: 767px) {
  .page-home .date-filters .chip-date-week,
  .page-home .date-filters .chip-date { display: none; }
  .page-home .category-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 2px 10px;
    margin-inline: -2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .page-home .category-picker:not(.is-collapsed) .category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-inline: 0;
    margin-inline: 0;
    scroll-snap-type: none;
  }
  .page-home .category-card { flex: 0 0 112px; scroll-snap-align: start; }
  .page-home .category-art { max-width: 64px; }
  .avatar-dropdown {
    position: fixed;
    top: calc(var(--header-h) + 8px + env(safe-area-inset-top));
    right: 12px;
    width: min(360px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - var(--header-h) - var(--bottom-nav-h) - 32px - env(safe-area-inset-top));
    border-radius: 16px;
  }
}
/* ---------- Page hero (single shared component for every page) ----------
   One component (partials/page-hero.php), rendered once from layouts/app.php,
   so no page duplicates this markup or its CSS. The same artwork is framed
   differently per variant, so the whole site reads as one visual system rather
   than the same banner copy-pasted on every screen.

   Variants:
     .page-hero            legacy decorative band (no title) — kept intact for
                           pages that still own their <h1> (migrated in rollout).
     .page-hero--home      full immersive hero (homepage).
     .page-hero--inner     integrated hero with title / subtitle / actions.
     .page-hero--compact   short functional band (map / messages / funds …).
     .page-hero--auth      quiet background for sign-in / sign-up screens.
   Framing presets: .page-hero--crop-left / --crop-center / --crop-right. */
.page-hero {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--brand-soft) 62%, var(--bg) 100%);
}
.page-hero__art {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  height: clamp(140px, 30vw, 300px);
}
/* Shared primitive: the hero picture always fills its box, never distorts. */
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}
/* header-banner.webp is an illustration with transparent margins, so "contain"
   is deliberate for the legacy band: "cover" would crop the figures on wide
   screens. The rich variants below switch to "cover" with a chosen crop. */
.page-hero__art img {
  object-fit: contain;
  object-position: center;
}
@media (min-width: 1024px) {
  .page-hero__art { height: clamp(220px, 22vw, 320px); }
}

/* Framing presets — 2-3 reusable crops instead of per-page object-position. */
.page-hero--crop-left .page-hero__art img { object-position: 22% center; }
.page-hero--crop-center .page-hero__art img { object-position: 50% center; }
.page-hero--crop-right .page-hero__art img { object-position: 78% center; }

/* ---------- Hero / Discover ---------- */
.hero {
  padding: 28px 0 24px;
  background: linear-gradient(180deg, var(--brand-soft), transparent);
}
/* Home: transparent artwork, navigation and content share one landscape. */
body.page-home { background: var(--brand-soft); }
.page-home .site-header {
  position: fixed;
  inset: 0 0 auto;
}
/* Use the shared logo dimensions so the artwork stays inside the 56px header. */
.page-home :is(.brand, .page-hero__cta, .lang-switcher summary):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
.page-home > .flash-wrap {
  position: absolute;
  inset: calc(var(--header-h) + 12px) 0 auto;
  z-index: 10;
  margin-top: 0;
}
/* ---------- HOME variant — full immersive hero (homepage) ---------- */
.page-hero--home {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 440px;
  padding: 250px 0 24px;
  background:
    radial-gradient(ellipse at 65% 22%, rgba(182, 218, 239, 0.48), transparent 65%),
    radial-gradient(ellipse at 15% 44%, rgba(159, 219, 190, 0.3), transparent 62%),
    var(--brand-soft);
}
.page-hero--home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.18), transparent 22%, transparent 56%, rgba(240, 253, 250, 0.5) 77%, var(--brand-soft) 100%);
}
.page-hero--home .page-hero__art {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  height: 245px;
  max-width: 1920px;
  margin-inline: auto;
  z-index: -2;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent);
}
.page-hero--home .page-hero__art img {
  object-fit: cover;
  object-position: 61% top;
}
.page-hero--home .page-hero__panel {
  max-width: 1000px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 32px rgba(17, 94, 89, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
}
.page-hero--home .page-hero__heading { display: contents; }
.page-hero--home .page-hero__title {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(28px, 7.5vw, 34px);
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.page-hero--home .page-hero__subtitle { margin: 10px 0 0; color: #45655f; font-size: 16px; line-height: 1.5; }
.page-hero--home .page-hero__cta {
  order: 1;
  flex: 0 0 auto;
  gap: 18px;
  min-height: 50px;
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  background: var(--brand);
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.page-hero--home .page-hero__cta span { font-size: 21px; line-height: 1; }
@media (hover: hover) {
  .page-hero--home .page-hero__cta:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 7px 18px rgba(15, 118, 110, 0.2); }
}
.page-hero--home .page-hero__cta:active { transform: translateY(1px); }
.discover-search { padding: 0 0 12px; }
.discover-search .city-bar { margin-top: 0; }
.discover-search .search-form input { min-width: 0; }
.page-home .section.container { padding-inline: 16px; }
@media (max-width: 767px) {
  .page-home .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .page-home .header-inner, .page-home .header-right { gap: 6px; }
  .page-home .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 600px) {
  .page-hero--home { min-height: 430px; padding-top: 285px; padding-bottom: 28px; }
  .page-hero--home .page-hero__art { top: 70px; height: 280px; }
  .page-hero--home .page-hero__panel { padding: 24px 28px; }
  .page-hero--home .page-hero__title { font-size: 32px; }
  .page-hero--home .page-hero__heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .page-hero--home .page-hero__cta { margin-top: 0; }
}
@media (min-width: 768px) {
  .page-home .section.container { padding-inline: 24px; }
}
@media (min-width: 1024px) {
  .page-hero--home { min-height: 460px; padding-top: 300px; padding-bottom: 32px; }
  .page-hero--home .page-hero__art { top: 70px; bottom: auto; height: auto; aspect-ratio: 2172 / 600; }
  .page-hero--home .page-hero__art img { object-position: center top; }
  .page-hero--home .page-hero__panel { padding: 24px 32px; }
  .page-hero--home .page-hero__title { font-size: clamp(32px, 2.5vw, 38px); }
  .page-hero--home .page-hero__subtitle { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero--home .page-hero__cta { transition: none; }
  .page-hero--home .page-hero__cta:hover, .page-hero--home .page-hero__cta:active { transform: none; }
}

/* ---------- INNER variant — integrated hero with title / subtitle / actions ---------- */
.page-hero--inner {
  display: flex;
  align-items: flex-end;
  min-height: clamp(200px, 52vw, 250px);
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--brand-soft) 46%, var(--bg) 100%);
}
.page-hero--inner .page-hero__art {
  position: absolute;
  inset: 0;
  height: 100%;
  max-width: none;
  margin-inline: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 72%, transparent 100%);
  mask-image: linear-gradient(#000 72%, transparent 100%);
}
.page-hero--inner .page-hero__art img { object-fit: cover; object-position: center; }
.page-hero--inner .page-hero__fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.14), transparent 30%, transparent 52%, rgba(248, 250, 252, 0.58) 84%, var(--bg) 100%);
}
.page-hero--inner .page-hero__inner { position: relative; width: 100%; }
.page-hero--inner .page-hero__title {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-hero--inner .page-hero__subtitle { margin: 8px 0 0; color: #45655f; font-size: 15px; line-height: 1.5; }
.page-hero--inner .page-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.page-hero--inner .page-hero__actions .btn { border-radius: var(--radius-sm); }

/* ---------- COMPACT variant — short functional band (map / messages / funds) ---------- */
.page-hero--compact {
  display: flex;
  align-items: flex-end;
  min-height: clamp(140px, 38vw, 180px);
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--brand-soft) 40%, var(--bg) 100%);
}
.page-hero--compact.page-hero--discovery { min-height: clamp(205px, 55vw, 230px); }
.page-hero--compact .page-hero__art {
  position: absolute;
  inset: 0;
  height: 100%;
  max-width: none;
  margin-inline: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent 100%);
  mask-image: linear-gradient(#000 60%, transparent 100%);
}
.page-hero--compact .page-hero__art img { object-fit: cover; object-position: center; }
.page-hero--compact .page-hero__fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.1), transparent 28%, rgba(248, 250, 252, 0.66) 76%, var(--bg) 100%);
}
.page-hero--compact .page-hero__inner { position: relative; width: 100%; }
.page-hero--compact .page-hero__title {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(22px, 4vw, 27px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.page-hero--compact .page-hero__subtitle { margin: 4px 0 0; color: #45655f; font-size: 14px; }
.page-hero--compact .page-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.page-hero--compact .page-hero__actions .btn { border-radius: var(--radius-sm); }

/* The Places directory shares the illustration; keep the figures' heads visible. */
.page-hero--compact.page-hero--places { min-height: clamp(220px, 26vw, 340px); }
.page-hero--places .page-hero__art { top: 12px; height: calc(100% - 12px); }
.page-hero--places .page-hero__art img { object-position: center top; }

/* ---------- AUTH variant — quiet background for sign-in / sign-up ---------- */
.page-hero--auth {
  min-height: clamp(140px, 32vw, 200px);
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%);
}
.page-hero--auth .page-hero__art { position: absolute; inset: 0; height: 100%; max-width: none; margin-inline: 0; overflow: hidden; }
.page-hero--auth .page-hero__art img { object-fit: cover; object-position: center; opacity: 0.45; }

/* Home no longer carries the hero inside <main>, so it must not force a tall main. */
.page-home .app-main { min-height: 0; }

/* Inner pages with an integrated hero keep the shared header in document flow. */
body.has-page-hero .site-header {
  position: sticky;
  top: 0;
}
body.has-page-hero :is(.brand, .page-hero__cta, .lang-switcher summary):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

/* ---------- SLIM modifier — a short band for full-viewport tools (the map) ---------- */
:root { --hero-slim-h: 96px; }
.page-hero--compact.page-hero--slim { min-height: var(--hero-slim-h); }
.page-hero--slim .page-hero__title { font-size: clamp(18px, 3vw, 22px); }
@media (min-width: 1024px) {
  :root { --hero-slim-h: 110px; }
}

/* ---------- Rich hero content surface (shared) ----------
   One translucent white surface carries the whole composition — title,
   subtitle and the primary action — on the inner/compact heroes, so the copy
   reads on any part of the artwork while the illustration stays visible
   through the glass. It is sized to its content (never stretched into a
   full-width bar) and contrast comes from the surface, not from text-shadow. */
.page-hero--inner .page-hero__content,
.page-hero--compact .page-hero__content {
  width: fit-content;
  max-width: min(720px, 100%);
  margin: 0 0 22px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(17, 94, 89, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.page-hero--compact .page-hero__content { margin-bottom: 16px; padding: 14px 18px; }
.page-hero--slim .page-hero__content { margin-bottom: 12px; padding: 10px 16px; border-radius: var(--radius-sm); }

/* Desktop framing for the rich inner heroes. */
@media (min-width: 768px) {
  .page-hero--inner { min-height: clamp(240px, 32vw, 300px); }
  .page-hero--compact { min-height: clamp(150px, 20vw, 190px); }
}
@media (min-width: 1024px) {
  .page-hero--inner { min-height: clamp(240px, 24vw, 300px); }
  .page-hero--compact { min-height: clamp(160px, 17vw, 220px); }
  .page-hero--auth { min-height: clamp(160px, 20vw, 240px); }
}
.hero-title {
  margin: 0;
  font-size: 40px;
  letter-spacing: 0.06em;
  color: var(--brand);
  line-height: 1;
}
.hero-tagline { margin: 12px 0 0; font-size: 20px; font-weight: 700; }
.hero-subtagline { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.hero-cta { margin-top: 16px; }

.city-bar { margin: 18px 0 14px; }
.city-picker summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}
.city-picker summary::-webkit-details-marker { display: none; }
.city-menu {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  width: 220px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
}
.city-menu a,
.city-my-location {
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  font-size: 15px;
}
.city-menu a:hover,
.city-my-location:hover { background: var(--bg); }
.city-my-location { color: var(--brand); font-weight: 600; }

.search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  box-shadow: var(--shadow);
}
.search-form input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 16px;
  padding: 10px 0;
  background: transparent;
}
.search-form button {
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.search-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.date-filters {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.chip {
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.chip:hover { border-color: var(--brand-light); }
.chip-date input { border: 0; outline: 0; font: inherit; background: transparent; color: var(--brand); }

/* ---------- Sections ---------- */
/* Vertical rhythm only. A shorthand here would zero the .container gutter when
   both classes sit on the same element (see .container above). */
.section { padding-block: 24px; }
.section-title { margin: 0 0 16px; font-size: 20px; }

/* ---------- Category grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 8px 4px;
  background: var(--card);
  border: 1px solid #e1efed;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(15, 118, 110, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.category-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
@media (hover: hover) {
  .category-card:hover { border-color: var(--brand-light); box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12); transform: translateY(-3px); }
}
/* One cached atlas. Each 384x300 window excludes the adjacent row's halo. */
.category-art {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  max-width: 90px;
  aspect-ratio: 32 / 25;
  background-image: url('../img/categories-v1.webp');
  background-size: 400% 341.333333%;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
}
.category-art--hiking { background-position: 0 5.524862%; }
.category-art--climbing { background-position: 33.333333% 5.524862%; }
.category-art--running { background-position: 66.666667% 5.524862%; }
.category-art--football { background-position: 100% 5.524862%; }
.category-art--cycling { background-position: 0 47.651934%; }
.category-art--board_games { background-position: 33.333333% 47.651934%; }
.category-art--gaming { background-position: 66.666667% 47.651934%; }
.category-art--fitness { background-position: 100% 47.651934%; }
.category-art--meetings { background-position: 0 89.779006%; }
.category-art--creative { background-position: 66.666667% 89.779006%; }
.category-art--other { background-position: 100% 89.779006%; }
.category-art--walking, .category-art--fishing, .category-art--volleyball,
.category-art--culture, .category-art--dancing, .category-art--travel,
.category-art--bowling, .category-art--basketball, .category-art--extreme_sports {
  background-image: url('../img/categories-extra-v1.webp');
  background-size: 300% 200%;
  aspect-ratio: 1;
  max-width: 76px;
  margin-block: -3px;
}
.category-art--walking { background-position: 0 0; }
.category-art--fishing { background-position: 50% 0; }
.category-art--volleyball { background-position: 100% 0; }
.category-art--culture { background-position: 0 100%; }
.category-art--dancing { background-position: 50% 100%; }
.category-art--travel { background-position: 100% 100%; }
.category-art--bowling, .category-art--basketball, .category-art--extreme_sports {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.category-art--bowling { background-image: url('../img/category-bowling-v1.png'); }
.category-art--basketball { background-image: url('../img/category-basketball-v1.png'); }
.category-art--extreme_sports { background-image: url('../img/category-extreme-sports-v1.png'); }
.category-emoji { display: grid; place-items: center; width: 100%; max-width: 90px; aspect-ratio: 32 / 25; font-size: 36px; }
.category-label { display: grid; place-items: center; min-height: 2.6em; min-width: 0; width: 100%; font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.category-picker.is-collapsed .category-card:nth-child(n+10) { display: none; }
.category-toggle { display: block; margin: 12px auto 0; }
.category-toggle[hidden] { display: none; }
.catalog-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--brand); }
.catalog-page { padding-inline: 16px; }
.catalog-intro { max-width: 780px; line-height: 1.6; color: var(--muted); }
.catalog-subcategories { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.catalog-subcategories .chip { white-space: normal; }
.catalog-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 28px; }
.catalog-filters .field { flex: 1 1 180px; margin: 0; }
.catalog-filters .btn { min-height: 44px; }
.event-route { overflow-wrap: anywhere; color: var(--muted); }
@media (min-width: 768px) {
  .category-art { max-width: 112px; }
  .category-art--walking, .category-art--fishing, .category-art--volleyball,
  .category-art--culture, .category-art--dancing, .category-art--travel,
  .category-art--bowling, .category-art--basketball,
  .category-art--extreme_sports { max-width: 94px; }
  .category-picker.is-collapsed .category-card:nth-child(n+10):nth-child(-n+12) { display: flex; }
  .category-label { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .category-card { transition: none; }
  .category-card:hover { transform: none; }
}

/* ---------- Empty state ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 20px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-state-large { padding: 56px 20px; border: 0; background: transparent; }
.empty-icon { font-size: 40px; }
.empty-title { margin: 0; font-size: 18px; font-weight: 700; }
.empty-text { margin: 0; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 0;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

/* ---------- Legal ---------- */
.legal-wrap { display: flex; flex-direction: column; gap: 20px; }
.legal-tabs { display: flex; gap: 8px; overflow-x: auto; }
.legal-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}
.legal-tab.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.legal-content { max-width: 680px; }
.legal-content h1 { margin: 0 0 14px; font-size: 24px; }
.legal-content p { margin: 0; color: var(--text); font-size: 15px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; margin-bottom: 18px; background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; color: var(--muted); }
.legal-toc { padding: 14px 16px; margin-bottom: 18px; background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.legal-toc ol { margin: 8px 0 0; padding-left: 20px; }
.legal-toc li { margin: 4px 0; }
.legal-toc a { color: var(--brand); }
.legal-doc-body { display: flex; flex-direction: column; gap: 14px; }
.legal-doc-body section { display: flex; flex-direction: column; gap: 10px; }
.legal-doc-body h2 { margin: 6px 0 0; font-size: 19px; line-height: 1.35; }
.legal-doc-body p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; }
.legal-doc-body ul, .legal-doc-body ol { margin: 0; padding-left: 22px; color: var(--text); font-size: 15px; line-height: 1.6; }
.legal-doc-body li { margin: 4px 0; }
.legal-doc-body .legal-summary { font-size: 16px; }
.legal-related { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; }
.legal-related ul { margin: 8px 0 0; padding-left: 20px; }
.legal-related a { color: var(--brand); }
.legal-support { margin-top: 16px; }

/* Legal consent (registration, plan create/join, re-accept) */
.auth-consent { align-items: flex-start; gap: 8px; }
.auth-consent input[type="checkbox"] { margin-top: 3px; }
.auth-consent a { color: var(--brand); font-weight: 600; }
.consent-doc-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.consent-doc { background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.consent-doc-head { display: flex; flex-direction: column; gap: 2px; }
.consent-doc-link { font-weight: 700; color: var(--brand); }
.consent-doc-meta { font-size: 13px; color: var(--muted); }
.apply-form .checkbox-field { align-items: flex-start; }
.apply-form .checkbox-field a { color: var(--brand); font-weight: 600; }
.apply-paid-summary { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin-bottom: 8px; background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--text); }

/* ---------- Footer & bottom nav ---------- */
.site-footer { border-top: 1px solid var(--border); background: linear-gradient(180deg, #fbfffd 0%, #f3faf7 100%); }
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-dropdown);
  display: flex;
  background: #fff;
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 2px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
/* Five predictable destinations, with safe area reserved once on the bar. */
.bottom-nav-item { min-height: var(--bottom-nav-h); justify-content: center; }
.bottom-nav-item.is-active { color: var(--brand); }
.bottom-nav-icon { font-size: 20px; line-height: 1; }
.bottom-nav-item.is-primary .bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: -14px;
  background: var(--brand);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
  border: 3px solid #fff;
}
.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 28px 16px 20px;
  color: var(--muted);
  font-size: 13px;
}
.footer-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; width: 100%; }
.footer-col { min-width: 0; }
.footer-col h3 { margin: 0 0 10px; color: var(--text); font-size: 13px; letter-spacing: .02em; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { min-height: 24px; color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; padding-top: 14px; border-top: 1px solid var(--border); }
.footer-creator { color: var(--brand-dark); font-weight: 650; }

/* Mobile: reserve space for the fixed bottom nav. */
.app-main { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px); }
.footer-legal { margin-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }

.error-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 24px; }

/* ---------- Tablet (>= 768px) ---------- */
@media (min-width: 768px) {
  .container { padding-inline: 24px; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  /* The fixed bottom nav stays visible until 1024px, so the space reserved for
     it must stay reserved until the same breakpoint. */
  .footer-legal { display: block; }
  .footer-legal-meta { margin-top: 20px; }
}
@media (max-width: 767px) {
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .footer-links a { min-height: 32px; display: flex; align-items: center; }
}

/* ---------- Desktop (>= 1024px) ---------- */
@media (min-width: 1024px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
  }
  .header-left { margin-right: 0; justify-self: start; }
  .header-center { justify-self: center; }
  .header-right { justify-self: end; }
  .desktop-nav { display: flex; }
  .bottom-nav { display: none; }
  .hero-title { font-size: 52px; }
  .category-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .legal-wrap { flex-direction: row; gap: 40px; }
  .legal-tabs { flex-direction: column; }
  /* Bottom nav is hidden from here on: release the space it reserved. */
  .app-main { padding-bottom: 24px; }
  .footer-legal { margin-bottom: 0; }
}

/* ---------- Large desktop (>= 1440px) ---------- */
@media (min-width: 1440px) {
  .container { max-width: 1280px; }
}

/* ---------- Flash ---------- */
.flash-wrap { margin-top: 12px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-success { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #99f6e4; }

/* ---------- Auth ---------- */
.auth-wrap { display: flex; justify-content: center; padding-top: 32px; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.auth-title { margin: 0 0 8px; font-size: 24px; }
.auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field input {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15); }
.btn-block { width: 100%; }
.auth-legal { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.auth-legal a { color: var(--brand); font-weight: 600; }
.auth-back { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--brand); font-weight: 600; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-avatar {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
}
.profile-name { margin: 0; font-size: 24px; }
.profile-meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.profile-bio { margin: 0 0 20px; color: var(--text); }
.profile-stats { display: flex; gap: 12px; margin-bottom: 24px; }
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat strong { font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.btn-ghost:hover { color: #b91c1c; border-color: #fca5a5; }
.logout-form { margin-top: 28px; }

/* ---------- Forms ---------- */
.form-wrap { max-width: 560px; margin: 0 auto; }
.form-title { margin: 0 0 20px; font-size: 24px; }
.event-form { display: flex; flex-direction: column; gap: 16px; }
.form-wrap.event-form-wrap { max-width: 900px; }
.event-form-section { display: grid; gap: 14px; min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.event-form-section > *, .event-form-section .field { min-width: 0; }
.event-form-section select, .event-form-section textarea, .event-form-section input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) { width: 100%; min-width: 0; max-width: 100%; }
.event-form-section > .form-group-title { margin: 0 0 2px; font-size: 19px; }
.event-form-actions { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 10px; align-items: center; }
.event-extra-settings { padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.event-extra-settings__summary { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; list-style: none; }
.event-extra-settings__summary::-webkit-details-marker { display: none; }
.event-extra-settings__summary::before { content: '+'; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.event-extra-settings[open] > .event-extra-settings__summary::before { content: '−'; }
.event-extra-settings__summary .field-hint { margin-left: auto; text-align: right; }
.event-extra-settings__body { display: grid; gap: 14px; padding-top: 12px; }
.event-minimum-settings { margin-top: 12px; }
.event-minimum-settings > summary, .event-advanced-time > summary { min-height: 42px; display: flex; align-items: center; cursor: pointer; color: var(--brand); font-weight: 650; }
.event-advanced-time { padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cover-dropzone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px; border: 1px dashed var(--brand); border-radius: var(--radius); background: var(--brand-soft); text-align: center; cursor: pointer; }
.cover-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cover-dropzone:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.cover-dropzone__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 22px; }
.cover-dropzone__text { font-weight: 700; }
.cover-current { display: grid; gap: 8px; margin-top: 10px; }
.cover-preview { display: block; width: min(100%, 520px); max-height: 260px; object-fit: cover; border-radius: var(--radius); }
.event-preview-dialog { width: min(720px, calc(100vw - 28px)); max-height: 90vh; overflow: auto; padding: 0; border: 0; border-radius: 18px; color: var(--text); background: var(--card); box-shadow: 0 24px 80px rgb(0 0 0 / 30%); }
.event-preview-dialog::backdrop { background: rgb(10 20 28 / 65%); }
.event-preview-dialog__content { position: relative; padding: 24px; }
.event-preview-dialog__close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--card); font-size: 26px; cursor: pointer; }
.event-preview-cover img { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius); }
.event-preview-category, .event-preview-meta, .event-preview-note { color: var(--muted); }
.event-preview-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.event-preview-note { margin: 18px 0; font-size: 13px; }
.rich-description { border: 1px solid var(--border, #d8dee8); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.rich-description-toolbar { display: flex; gap: 6px; padding: 6px; border-bottom: 1px solid var(--border, #d8dee8); background: var(--surface-muted, #f7f8fa); }
.rich-description-toolbar button { min-width: 42px; min-height: 42px; border: 1px solid var(--border, #d8dee8); border-radius: 8px; background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.rich-description-editor { min-height: 112px; padding: 12px; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-description-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted, #77808d); pointer-events: none; }
.rich-description-editor:focus { box-shadow: inset 0 0 0 2px var(--primary, #4361ee); }
.event-rich-description p { margin: 0 0 .75em; }
.event-rich-description p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .rich-description-toolbar button { min-width: 46px; min-height: 46px; } .event-form-section { padding: 14px; } .event-form-actions { grid-template-columns: 1fr; } .event-extra-settings__summary { flex-wrap: wrap; } .event-extra-settings__summary .field-hint { margin-left: 36px; text-align: left; } }
.event-repeat-overlay { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 20px; background: rgb(15 23 42 / 58%); }
.event-repeat-dialog { width: min(100%, 460px); padding: 24px; border: 1px solid var(--border, #d7dce2); border-radius: 18px; background: var(--surface, #fff); box-shadow: 0 24px 80px rgb(15 23 42 / 28%); }
.application-success-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(84vh, 760px); overflow-y: auto; padding: 28px; border: 0; border-radius: 20px; color: var(--text, #17252d); background: var(--surface, #fff); box-shadow: 0 24px 80px rgb(15 23 42 / 30%); }
.application-success-dialog::backdrop { background: rgb(12 23 30 / 62%); backdrop-filter: blur(2px); }
.application-success-dialog h2 { margin: 8px 0 12px; }
.application-success-dialog p { line-height: 1.6; }
.application-success-dialog__icon { font-size: 30px; }
.application-success-dialog__pending { font-weight: 700; }
.application-success-dialog .btn { margin-top: 8px; }
.application-success-dialog.is-fallback-open { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); z-index: 1500; }
.application-success-dialog.is-fallback-open::backdrop { display: none; }
.application-success-fallback-backdrop { position: fixed; inset: 0; z-index: 1499; background: rgb(12 23 30 / 62%); }
body.application-dialog-open { overflow: hidden; }
@media (max-width: 600px) { .application-success-dialog { width: calc(100vw - 24px); max-height: 88vh; padding: 22px 18px; border-radius: 18px; } }
.event-repeat-dialog h1 { margin: 0 0 10px; font-size: 23px; }
.event-repeat-dialog > p { margin: 0 0 22px; color: var(--muted); }
.event-repeat-form { display: grid; gap: 22px; }
.event-repeat-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) { .event-repeat-dialog { padding: 20px; } .event-repeat-actions { display: grid; grid-template-columns: 1fr; } .event-repeat-actions > * { width: 100%; text-align: center; } }
.local-group-form { border: 1px solid var(--border, #d7dce2); border-radius: 12px; padding: 16px; margin: 14px 0; display: grid; gap: 10px; min-width: 0; }
.local-groups-create-option { padding: 12px 14px; border: 1px solid var(--border, #d7dce2); border-radius: 12px; }
.local-group-picker { margin-top: 8px; min-height: 260px; }
.local-suggest-details > summary,
[data-local-add-place] > summary { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; min-height: 46px; padding: 10px 18px; border: 2px solid var(--primary, #0f766e); border-radius: 999px; background: #e8f7f5; color: var(--primary, #0f766e); font-weight: 700; cursor: pointer; list-style: none; }
.local-suggest-details > summary::-webkit-details-marker,
[data-local-add-place] > summary::-webkit-details-marker { display: none; }
.local-suggest-details > summary::before,
[data-local-add-place] > summary::before { content: '＋'; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary, #0f766e); color: #fff; }
.local-suggest-details[open] > summary::before,
[data-local-add-place][open] > summary::before { content: '−'; }
.local-suggest-details > summary:hover,
[data-local-add-place] > summary:hover { background: #d8f0ed; }
.local-group-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.local-group-card { border: 1px solid var(--border, #d7dce2); border-radius: 12px; padding: 16px; }
.local-group-card[data-state="EMPTY"] { background: #f3f4f6; }
.local-group-card[data-state="FORMING"] { background: #fff8dd; }
.local-group-card[data-state="READY"] { background: #e7f7ed; }
.local-group-card[data-state="FULL"] { background: #f4e8e8; }
.local-group-card[data-state="CLOSED"], .local-group-card[data-state="CANCELLED"] { opacity: .65; }
.local-group-card p { margin: 7px 0; }
.local-group-slots { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0; }
@media (max-width: 600px) {
  .local-group-list { grid-template-columns: minmax(0, 1fr); }
  .local-group-card [data-local-select], [data-local-suggest] .btn-primary { min-height: 44px; width: 100%; }
  .local-group-card { overflow-wrap: anywhere; }
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* Unified date+time field: one label, date input + time input (the "Начало
   события" reference). Identical layout/styles for every datetime control. */
.datetime-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.datetime-row input { width: 100%; }
.datetime-field.is-invalid .datetime-row input { border-color: #dc2626; }
.recurrence-fields { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.recurrence-weekdays { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.recurrence-day { cursor: pointer; }
.recurrence-day input { position: absolute; opacity: 0; pointer-events: none; }
.recurrence-day span { display: inline-flex; min-width: 40px; justify-content: center; padding: 8px 7px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; }
.recurrence-day input:checked + span { color: #fff; background: var(--brand); border-color: var(--brand); }
.recurrence-day input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.recurrence-schedules { display: grid; gap: 10px; margin: 12px 0; }
.recurrence-schedule { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.recurrence-schedule[hidden] { display: none !important; }
.recurrence-schedule h4 { margin: 0 0 10px; }
.recurrence-slot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: 10px; margin: 8px 0; }
.recurrence-slot .field { min-width: 0; }
.recurrence-copy { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.recurrence-copy .field { min-width: min(260px, 100%); }
.recurrence-schedule [data-recurrence-add][hidden], .recurrence-slot [data-recurrence-remove][hidden] { display: none; }
@media (max-width: 640px) {
  .recurrence-slot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recurrence-slot [data-recurrence-remove] { grid-column: 1 / -1; justify-self: start; }
}
.recurrence-preview { margin-top: 10px; color: var(--brand-dark); font-size: 13px; font-weight: 650; }
.notification-preference-table { display: grid; gap: 0; margin: 16px 0; }
.notification-preference-head, .notification-preference-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; align-items: center; gap: 12px; padding: 11px 8px; border-bottom: 1px solid var(--border); }
.notification-preference-head { color: var(--muted); font-size: 12px; font-weight: 750; }
.notification-preference-head > :not(:first-child), .notification-preference-row > label { text-align: center; justify-self: center; }
.notification-preference-row input { width: 20px; height: 20px; }
@media (max-width: 540px) {
  .notification-preference-head, .notification-preference-row { grid-template-columns: minmax(0, 1fr) 60px 60px; gap: 6px; font-size: 13px; }
}
.field select, .field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
  font-family: inherit;
  background: #fff;
}
.field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15); }
.field textarea { resize: vertical; }
.field-hint { font-size: 12px; color: var(--muted); }
.cover-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; }

/* ---------- Event card ---------- */
.event-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.event-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.discover-event-list { align-items: stretch; }
.discover-event-list .event-card { display: flex; flex-direction: column; height: 100%; }
.discover-event-list .event-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; }
.discover-event-list .event-card-desc { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.discover-event-list .event-card-foot { width: 100%; margin-top: auto; padding-top: 8px; }
.event-card:hover { box-shadow: var(--shadow); border-color: var(--brand-light); }
.event-card-cover { display: block; width: 100%; height: 160px; object-fit: cover; background-size: cover; background-position: center; }
.event-card-cover-empty { display: flex; align-items: center; justify-content: center; font-size: 48px; background: var(--brand-soft); }
.event-card-body { padding: 14px 16px; }
.event-card-cat { font-size: 13px; color: var(--brand); font-weight: 600; }
.event-card-body > .event-card-cat { display: inline; }
.event-card-title { margin: 6px 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.event-card-meta { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
/* The participant counter had no rule at all while sitting in the same flex row
   as the 18px favourite button; give it a sane, shrinkable box. The class name
   is asserted by tests/event-payments-http.php, so it is styled, never renamed. */
.event-card-people { min-width: 0; overflow-wrap: anywhere; }
.event-card-flex-together { display: flex; flex-wrap: wrap; column-gap: 5px; }
.event-card-desc { margin: 8px 0; font-size: 14px; color: var(--text); }
.event-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.event-card-fav { font-size: 18px; }
.series-card-label { color: var(--brand-dark); font-weight: 650; }
.event-series-dates, .plan-series-summary { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--brand-soft); }
.series-date-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.series-date-link { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 13px; }
.series-date-link.is-current { border-color: var(--brand); color: var(--brand-dark); font-weight: 700; }
.plan-series-actions { display: flex; justify-content: flex-end; margin: 12px 0 20px; }
.series-occurrence-list { display: grid; gap: 8px; }
.series-occurrence { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
@media (max-width: 600px) { .series-occurrence { grid-template-columns: 1fr auto; } .series-occurrence > :last-child { grid-column: 1 / -1; } }

/* ---------- Event page ---------- */
.event-page { max-width: 880px; }
/* width/height attributes on the <img> only provide the intrinsic aspect ratio
   (for CLS); height:auto makes the photo scale by width and keep its proportions. */
.event-cover-link { display:block; margin-bottom:16px; border-radius:var(--radius); overflow:hidden; }
.event-cover { display:block; width:100%; height:auto; aspect-ratio:16 / 9; object-fit:cover; border-radius:var(--radius); }
.event-cover-empty { display:grid; place-items:center; margin-bottom:16px; background:var(--brand-soft); font-size:64px; }
@media(max-width:600px) { .event-cover { aspect-ratio:4 / 3; } }
.event-head { margin-bottom: 12px; }
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.event-cat { font-size: 14px; color: var(--brand); font-weight: 600; }
.event-title { margin: 6px 0; font-size: 26px; line-height: 1.2; }
.event-date { margin: 0; font-size: 15px; color: var(--muted); }
.event-organizer { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--brand); font-weight: 600; }
.event-organizer-attendance { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0 10px; padding: 5px 9px; border-radius: 999px; background: var(--surface-muted, #f3f5f7); color: var(--muted); font-size: 13px; font-weight: 650; }
.event-organizer-attendance.is-attending { color: #176b45; background: #e7f5ed; }
.event-people { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 16px 0; padding: 12px 16px; background: var(--brand-soft); border-radius: var(--radius); font-size: 15px; }
.event-seats { color: var(--brand-dark); font-weight: 700; }
.event-signup-closes { margin: -8px 0 16px; color: var(--muted); font-size: 13px; }
.status-badge-outcome { background: #e0f2fe; color: #075985; }
.event-people-link { cursor: pointer; }
.event-people-link:hover { border-color: var(--brand-light); }
.event-admin-reservations { margin: 14px 0 20px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.event-admin-reservations h2 { margin: 0 0 10px; font-size: 15px; }
.event-admin-reservations__step, .event-admin-reservations__manual { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.event-admin-reservations__step form { margin: 0; }
.event-admin-reservations__step strong { min-width: 2ch; text-align: center; font-size: 18px; }
.event-admin-reservations__summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 12px 0; }
.event-admin-reservations__summary div { display: flex; justify-content: space-between; gap: 8px; }
.event-admin-reservations__summary dt { color: var(--muted); }
.event-admin-reservations__summary dd { margin: 0; font-weight: 700; }
.event-admin-reservations__manual .field { flex: 1 1 180px; margin: 0; }
.event-admin-reservations__manual input { max-width: 180px; }
.event-section { margin: 20px 0; }
.event-section h2 { font-size: 16px; margin: 0 0 6px; }
.event-section p { margin: 0; color: var(--text); }
.event-desc { white-space: pre-line; }
.event-owner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.event-owner-actions form { margin: 0; }
.btn-danger { background: #dc2626; color: #fff; padding: 10px 18px; border-radius: 999px; border: 0; font-weight: 600; font-size: 14px; }
.event-share { margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.event-share h2 { font-size: 16px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* Every footer action is one entry point into the single share modal, so the
   affordance must read as clickable on touch and on desktop alike. */
.share-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; max-width: 100%; }
.share-btn:hover { border-color: var(--brand-light); color: var(--brand); }
.share-btn:focus-visible { outline: 2px solid var(--brand, #0f766e); outline-offset: 2px; }
.share-btn:active { background: var(--brand-soft, #ecfdf5); border-color: var(--brand-light, #99f6e4); }
.share-btn[disabled] { opacity: .55; cursor: not-allowed; }
.sobira-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: #111827;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  z-index: 9999;
  text-align: center;
}
/* The full join form stays in the event page flow so it cannot cover the plan. */
.event-apply-bar {
  margin-top: 28px;
  padding: 20px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.event-apply-bar .event-apply-inner { max-width: 680px; margin-inline: auto; }
.event-apply-actions { width: 100%; max-width: 420px; margin-inline: auto; }
.event-join-link { margin-top: 16px; }
.apply-note { text-align: center; color: var(--muted); margin: 0; }
.application-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 20px;
  padding: 16px 18px;
  border: 1px solid #f3d28d;
  border-left: 5px solid #d99112;
  border-radius: var(--radius, 14px);
  background: #fffbeb;
  color: #4b3a16;
}
.application-state--approved { border-color: #a7dfca; border-left-color: #0f8a67; background: #effcf6; color: #164e3b; }
.application-state--rejected { border-color: #f3c1c1; border-left-color: #c24141; background: #fff5f5; color: #6b2525; }
.application-state--cancelled { border-color: var(--border); border-left-color: #809099; background: var(--card); color: var(--text); }
.application-state__heading { display: flex; align-items: center; gap: 12px; }
.application-state__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.75); font-size: 20px; }
.application-state__heading strong { display: block; font-size: 16px; }
.application-state__heading p, .application-state__note { margin: 3px 0 0; color: inherit; }
.application-state__action { margin: 2px 0 0; }
.application-state .privacy-note { margin: 0; max-width: 100%; }
@media (max-width: 600px) {
  .application-state { padding: 14px; margin: 10px 0 16px; }
  .application-state .btn { width: 100%; }
}

/* ---------- Created ---------- */
.created-card { max-width: 460px; margin: 0 auto; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 24px; box-shadow: var(--shadow); }
.created-icon { font-size: 56px; }
.created-title { margin: 12px 0 4px; font-size: 26px; }
.created-text { margin: 0 0 20px; color: var(--muted); }
.created-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.created-card .share-buttons { justify-content: center; }

/* Tablet: two-column event list */
@media (min-width: 768px) {
  .event-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .event-list { grid-template-columns: repeat(3, 1fr); }
}
.discover-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.discover-pagination a { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--brand); text-decoration: none; background: var(--card); }
.discover-pagination a:hover, .discover-pagination a.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }

/* ---------- Geo ---------- */
.geo-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 4px 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.geo-suggest:not(:empty) {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.geo-suggest-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  background: #fff;
}
.geo-suggest-item:last-child { border-bottom: 0; }
.geo-suggest-item:hover { background: var(--brand-soft); }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.checkbox-field input { width: 18px; height: 18px; }
/* Isolation keeps provider panes inside the map stacking context. */
.geo-map { position: relative; z-index: var(--z-map); isolation: isolate; height: 260px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: #eef2f7; }
.geo-map-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 14px; }

/* ---------- Meeting place + route (under the plan map) ----------
   The block is a sibling of the map, never a child: a MapGL / Google / Leaflet
   pane sits in its own stacking context and must never cover the route CTA. */
.event-route {
  margin: 12px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-route__point { display: flex; align-items: flex-start; gap: 10px; }
.event-route__pin { margin: 0; font-size: 18px; line-height: 1.3; flex: 0 0 auto; }
.event-route__body { min-width: 0; }
.event-route__title { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.event-route__emojis { font-size: 13px; }
.event-route__name { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
/* The address repeats the primary CTA on purpose: tapping the place itself is the
   gesture people already have, the button is only the obvious one. */
.event-route__address { margin: 2px 0 0; display: inline-block; color: var(--brand); font-weight: 600; overflow-wrap: anywhere; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.event-route__address:hover { color: var(--brand-dark); text-decoration-style: solid; }
.event-route__address.is-plain { color: var(--text); font-weight: 500; text-decoration: none; }
.event-route__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.event-route__btn { min-height: 44px; }
.event-route__copy { white-space: nowrap; }
.event-route__status { font-size: 13px; font-weight: 600; color: var(--brand-dark); }
/* Menu on <details>: native keyboard and no-JS behaviour, no focus trap needed. */
.event-route__picker { position: relative; }
.event-route__picker > summary { display: inline-flex; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.event-route__picker > summary::-webkit-details-marker { display: none; }
.event-route__picker > summary::marker { content: ''; }
.event-route__picker[open] > summary { background: var(--brand-dark); }
.event-route__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 210px;
  max-width: calc(100vw - 40px);
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.event-route__panel-title { margin: 4px 6px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.event-route__option { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; color: var(--text); }
.event-route__option:hover, .event-route__option:focus-visible { background: var(--brand-soft); color: var(--brand-dark); }
.event-route__option[data-route-default]::after { content: '•'; margin-left: 8px; color: var(--brand); }
.event-route__point--secondary { border-top: 1px solid var(--border); padding-top: 12px; }
@media (min-width: 600px) {
  .event-route__actions { flex-wrap: nowrap; }
}
@media (max-width: 599px) {
  /* Mobile CTA rules: the route button is the thumb target, full width, and the
     copy action stays secondary right under it. */
  .event-route__picker { width: 100%; }
  .event-route__picker > summary { width: 100%; }
  .event-route__copy { flex: 0 0 auto; }
  .event-route__panel { left: 0; right: 0; min-width: 0; }
  .event-route__status { flex: 1 1 100%; }
}

/* ---------- Unified map layer (map.js) ---------- */
.sobira-map-host { position: relative; isolation: isolate; z-index: 0; }
.sobira-map-stage { position: absolute; inset: 0; }
.sobira-map-switch {
  position: absolute; top: 10px; right: 10px; z-index: 600;
  display: inline-flex; gap: 4px; padding: 3px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  box-shadow: var(--shadow);
}
.sobira-map-switch-btn {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  white-space: nowrap;
}
.sobira-map-switch-btn.is-active { background: var(--brand); color: #fff; }
.sobira-map-overlay {
  position: absolute; inset: 0; z-index: 650;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.92);
}
.sobira-map-overlay[hidden] { display: none; }
.sobira-map-overlay-inner { text-align: center; padding: 16px; }
.sobira-map-overlay-text { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.sobira-map-overlay-btn {
  border: 0; background: var(--brand); color: #fff; padding: 9px 16px;
  border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.sobira-marker {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  color: #fff; font-weight: 700; line-height: 1;
}
.sobira-marker-pair { filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); overflow: visible; }
.map-count-legend { position:absolute; top:112px; left:12px; z-index:500; display:flex; flex-wrap:wrap; gap:14px; padding:9px 12px; max-width:calc(100% - 24px); border:1px solid var(--border); border-radius:12px; background:#fff; box-shadow:var(--shadow); font-size:13px; }
.map-count-place { color:#2563eb; }
.map-count-plan { color:#117D72; }
.map-count-legend.is-error { border-color:#b42318; }
.map-count-error { width:100%; color:#b42318; }
.map-group-preview { padding:16px; }
.map-group-preview h3 { margin:0 30px 8px 0; font-size:15px; }
.map-group-preview p { margin:0 0 8px; color:var(--muted); font-size:13px; }
.map-group-members { display:grid; gap:8px; max-height:min(40vh,320px); overflow:auto; margin-bottom:10px; }
.map-group-member { display:grid; gap:3px; padding:10px 12px; border:1px solid var(--border); border-left:4px solid #117D72; border-radius:10px; min-height:44px; }
.map-group-member--place { border-left-color:#2563eb; }
.map-group-member small,.map-group-member span { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.map-group-member strong { font-size:14px; overflow-wrap:anywhere; }
.map-group-close { position:absolute; top:4px; right:4px; width:44px; height:44px; border:0; border-radius:50%; background:rgb(255 255 255 / .9); cursor:pointer; font-size:24px; }
.map-list-place { display:block; width:100%; text-align:left; border-left:4px solid #2563eb; font:inherit; }
@media(max-width:1023px) {
  .map-page .map-search-this { top:58px; left:60px; right:auto; transform:none; width:calc(100% - 84px); max-width:360px; min-height:44px; }
  .map-page .map-discover-area { top:112px; left:60px; right:auto; max-width:calc(100% - 84px); min-height:44px; }
  .map-page .map-count-legend { top:166px; }
}
@media(min-width:1024px) {
  .map-page .map-canvas { right:344px; }
  .map-page .map-search-this { left:calc((100% - 344px) / 2); }
  .map-page .map-discover-area { right:348px; top:64px; }
  .map-page .map-count-legend { top:12px; left:60px; }
}

/* ---------- Geo point mode selector ---------- */
.geo-mode { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.geo-mode-btns { display: inline-flex; gap: 4px; }
.geo-mode-btn {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.geo-mode-btn.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.geo-mode-hint { font-size: 12px; color: var(--muted); }

/* ---------- Map context menu + create-plan drawer ---------- */
.map-context {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 560; width: min(360px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.map-context[hidden] { display: none; }
.map-context-close {
  position: absolute; top: 8px; right: 8px; border: 0; background: transparent;
  font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted);
}
.map-context-title { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.map-context-coords { margin: 0 0 12px; font-size: 12px; color: var(--muted); font-family: monospace; }
.map-context-actions { display: flex; flex-direction: column; gap: 8px; }
.map-context-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left;
}
.map-context-btn:hover { border-color: var(--brand-light); }
.map-context-btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.map-context-btn-primary:hover { border-color: var(--brand-dark); }

.map-drawer-backdrop {
  position: absolute; inset: 0; z-index: 700; background: rgba(17, 24, 39, 0.35);
}
.map-drawer-backdrop[hidden] { display: none; }
.map-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 710;
  width: 420px; max-width: calc(100vw - 24px);
  background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.2s ease;
}
.map-drawer.is-open { transform: translateX(0); }
.map-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.map-drawer-title { margin: 0; font-size: 18px; }
.map-drawer-close { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.map-drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.map-drawer-body .form-wrap { max-width: none; }

@media (max-width: 767px) {
  .map-drawer { width: 100%; max-width: none; left: 0; }
}

/* ---------- Discover filters / suggest ---------- */
.suggest-box:not(:empty) { border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-top: 6px; overflow: hidden; }
.suggest-item { padding: 10px 14px; cursor: pointer; font-size: 14px; background: #fff; border-bottom: 1px solid var(--border); }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover { background: var(--brand-soft); }
.discover-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.discover-toolbar .section-title { margin: 0; }
.filters { position: relative; }
.filter-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 280px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.results-count { color: var(--muted); font-size: 14px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.category-card.is-active { border-color: var(--brand-light); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-light), 0 4px 18px rgba(15, 118, 110, 0.06); }
.category-card.is-active::after { content: '\2713'; position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 17px; font-weight: 700; line-height: 1; }
.chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Map page ---------- */
.map-page { position: relative; z-index: var(--z-map); isolation: isolate; overflow: hidden; height: calc(100vh - var(--header-h) - 70px - var(--hero-slim-h)); }
.map-canvas { position: absolute; inset: 0; }
.map-search-this { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; box-shadow: var(--shadow); }
.map-discover-area { position: absolute; top: 12px; right: 16px; z-index: 500; box-shadow: var(--shadow); background: var(--surface, #fff); }
.map-preview { position: absolute; bottom: 16px; left: 12px; right: 12px; z-index: 500; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.map-preview-details { display:grid; gap:8px; max-height:34vh; overflow:auto; padding:10px 14px; border-top:1px solid var(--border); }
.map-preview-details p,.map-preview-details ul { margin:0; }
.map-preview-details ul { padding-left:20px; }
.map-preview-error { padding:8px 14px; color:var(--muted); font-size:13px; }
.map-preview-link { display: flex; gap: 12px; align-items: stretch; }
.map-preview-cover { width: 96px; height: 96px; object-fit: cover; flex: 0 0 auto; }
.map-preview-cover-empty { display: flex; align-items: center; justify-content: center; font-size: 34px; background: var(--brand-soft); }
.map-preview-body { padding: 10px 12px; flex: 1; min-width: 0; }
.map-preview-title { margin: 2px 0; font-size: 15px; }
.map-preview-date, .map-preview-people { margin: 0; font-size: 13px; color: var(--muted); }
.map-sidebar { display: none; }
.map-list-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; background: #fff; }
.map-list-item:hover { border-color: var(--brand); }
.map-list-title { margin: 0; font-size: 14px; }
.map-list-meta { margin: 0; font-size: 12px; color: var(--muted); }
@media (min-width: 1024px) {
  .map-page { height: calc(100vh - var(--header-h) - 20px - var(--hero-slim-h)); }
  .map-sidebar { display: block; position: absolute; top: 12px; right: 12px; bottom: 12px; width: 320px; z-index: 500; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-y: auto; padding: 16px; }
  .map-preview { left: auto; right: 348px; width: 360px; }
}

/* ---------- Applications / notifications / my ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-title { margin: 0; font-size: 24px; }
.application-list { display: flex; flex-direction: column; gap: 12px; }
.application-card { display: flex; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.application-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: 0 0 auto; }
.application-body { flex: 1; min-width: 0; }
.application-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.application-user { font-weight: 700; }
.application-stat { color: var(--muted); font-size: 13px; }
.application-message { margin: 6px 0; color: var(--text); font-style: italic; }
.application-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.application-status-pending { background: #fef3c7; color: #92400e; }
.application-status-approved { background: var(--brand-soft); color: var(--brand-dark); }
.application-status-rejected { background: #fef2f2; color: #b91c1c; }
.application-actions { display: flex; gap: 8px; margin-top: 10px; }
.application-actions form { margin: 0; }
.apply-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.apply-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; resize: vertical; }
.my-events { display: flex; flex-direction: column; gap: 10px; }
.my-event { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.my-event-link { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.my-event-meta { color: var(--muted); font-size: 13px; }
.notification-list { display: flex; flex-direction: column; gap: 8px; }
.notification-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.notification-icon { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; font-weight: 750; }
.notification-message { flex: 1 1 auto; min-width: 0; }
.notification-time { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 600px) { .notification-item { flex-wrap: wrap; padding: 12px; } .notification-time { margin-left: 36px; } }
.notification-item.is-unread { border-left: 3px solid var(--brand); background: var(--brand-soft); }
.bell-link { position: relative; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); border: 1px solid var(--border); }
.bell-badge { position: absolute; top: -4px; right: -4px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------- Profile / favorites / my sections ---------- */
.profile-actions { display: flex; gap: 8px; margin-top: 24px; }
.profile-actions form { margin: 0; }
.interest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.interest-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; }
.interest-item input { width: 16px; height: 16px; }
.fav-toggle { background: transparent; border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.fav-toggle.is-fav { color: #dc2626; border-color: #fca5a5; }
.event-title-row { display: flex; align-items: flex-start; gap: 12px; }
.event-title-row .event-title { flex: 1; }
/* Visible SEO context under the H1: activity path + invitation/city/place. */
.event-seo-context { margin: 6px 0 2px; }
.event-seo-crumbs { margin: 0; font-size: 13px; font-weight: 600; color: var(--brand); }
.event-seo-summary { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.my-tag { font-size: 18px; }

/* ---------- Admin / report ---------- */
.admin-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.admin-card { display: flex; flex-direction: column; align-items: center; padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-card strong { font-size: 28px; }
.admin-card span { color: var(--muted); font-size: 14px; }
.admin-table { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); align-items: center; }
.admin-row-main { min-width: 0; }
.admin-meta { color: var(--muted); font-size: 13px; display: block; }
.admin-detail { margin: 4px 0 0; font-size: 13px; }
.admin-actions { display: flex; gap: 6px; }
.admin-actions form { margin: 0; }
.radio-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.radio-item input { width: 16px; height: 16px; }
@media (min-width: 768px) { .admin-cards { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Reviews ---------- */
.review-section { margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.review-average { margin: 0 0 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.review-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.review-item { padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review-rating { font-weight: 800; color: var(--brand); }
.review-comment { margin: 6px 0 0; color: var(--text); font-size: 14px; }
.review-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* ---------- Messages ---------- */
.messages-wrap { max-width: 680px; margin: 0 auto; }
.conversation-list { display: flex; flex-direction: column; gap: 8px; }
.conversation-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.conversation-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: 0 0 auto; }
.conversation-body { flex: 1; min-width: 0; }
.conversation-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.conversation-unread { background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.conversation-preview { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.thread-msg { display: flex; gap: 8px; align-items: flex-start; }
.thread-msg.is-mine { flex-direction: row-reverse; }
.thread-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.thread-avatar img, .discussion-avatar img, .application-avatar img, .conversation-avatar img { display:block; width:100%; height:100%; aspect-ratio:1 / 1; object-fit:cover; border-radius:50%; }
.thread-msg.is-mine .thread-avatar { background: var(--accent); }
.thread-body { display: flex; flex-direction: column; gap: 2px; max-width: 72%; }
.thread-msg.is-mine .thread-body { align-items: flex-end; }
.thread-sender { font-size: 12px; color: var(--muted); font-weight: 600; }
.thread-bubble { padding: 10px 14px; border-radius: 16px; background: var(--brand-soft); border: 1px solid var(--border); font-size: 15px; }
.thread-msg.is-mine .thread-bubble { background: var(--brand); color: #fff; border-color: var(--brand); }
.thread-meta { color: var(--muted); font-size: 11px; }
.thread-form { display: flex; gap: 8px; align-items: flex-end; }
.thread-form textarea { flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; resize: vertical; min-height: 52px; }
.apply-cancel-form { margin-top: 8px; }
.page-title-link { color: var(--text); }
.page-title-link:hover { color: var(--brand); }

/* ---------- Support tickets (user ↔ admin threads) ---------- */
.support-list-wrap { max-width: 680px; margin: 0 auto; }
.support-tickets { display: flex; flex-direction: column; gap: 8px; }
.support-ticket { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.support-ticket-head { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; cursor: pointer; list-style: none; }
.support-ticket-head::-webkit-details-marker { display: none; }
.support-ticket-head:hover { background: var(--bg); }
.support-ticket-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-ticket-subject { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.support-new-label { color: #dc2626; }
.support-ticket-body { border-top: 1px solid var(--border); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.support-conversation { display: flex; flex-direction: column; gap: 12px; }
.support-reply-form { margin-top: 2px; }
.support-closed-note { color: var(--muted); font-size: 13px; margin: 0; }
.support-avatar-admin { background: var(--brand); }

/* ---------- Avatar images ---------- */
.profile-avatar { overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
/* In the profile views the class sits straight on <img>, so the image must cover its own square box. */
img.profile-avatar { object-fit: cover; display: block; }
.profile-link-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.profile-avatar-lg { width: 96px; height: 96px; font-size: 40px; }
.people-avatar, .thread-avatar, .conversation-avatar, .application-avatar { overflow: hidden; }
.people-avatar img, .thread-avatar img, .conversation-avatar img, .application-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Avatar editor ---------- */
.avatar-editor { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.avatar-editor-preview { display: flex; justify-content: center; }
.avatar-editor input[type=file] { font-size: 14px; }
.avatar-crop-box { max-width: 100%; max-height: 340px; overflow: hidden; background: #000; border-radius: var(--radius-sm); }
.avatar-crop-box img { display: block; max-width: 100%; }
.avatar-editor-actions { display: flex; gap: 8px; }

/* ---------- People list (participants / organizers) ---------- */
.participation-list { display: flex; flex-direction: column; gap: 12px; }
.participation-card { padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.participation-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.participation-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.people-list { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--border); padding-top: 10px; }
.people-item { display: flex; align-items: center; gap: 10px; }
.people-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.people-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.people-name { font-weight: 600; font-size: 14px; }
.people-role { color: var(--muted); font-size: 12px; }
.people-act { font-size: 16px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; background: #fff; }

/* ---------- Rating badge ---------- */
.rating-badge { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; color: #fff; display: inline-block; margin: 2px 0; }
.rating-green { background: #16a34a; }
.rating-yellow { background: #d97706; }
.rating-red { background: #dc2626; }
.rating-gray { background: #9ca3af; }
.application-user-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Calendar ---------- */
.profile-calendar { margin: 20px 0; }
.calendar { max-width: 560px; margin: 0 auto; }
.calendar-full { max-width: 720px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar-title { font-weight: 700; font-size: 16px; }
.calendar-nav { font-size: 22px; padding: 0 10px; color: var(--brand); font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.calendar-cell { min-height: 46px; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 3px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.calendar-cell.is-empty { background: transparent; border-color: transparent; }
.calendar-cell.has-events { border-color: var(--brand-light); }
.calendar-daynum { font-size: 14px; font-weight: 600; color: var(--text); }
.calendar-mark { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.calendar-count { font-size: 11px; font-weight: 700; color: #fff; border-radius: 999px; padding: 0 6px; line-height: 18px; }
.calendar-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-green { background: #16a34a; }
.cal-yellow { background: #f59e0b; }
.cal-red { background: #dc2626; }
.calendar-full .calendar-cell { min-height: 92px; }
.calendar-day-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.calendar-day-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.calendar-day-title { flex: 1; font-weight: 600; }
.calendar-day-meta { color: var(--muted); font-size: 13px; }

/* ---------- Support button + modal ---------- */
.support-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.support-btn:hover { background: var(--brand); color: #fff; }
.support-intro { color: var(--muted); margin: 0 0 16px; }
.support-contacts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.support-modal { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.support-modal[hidden] { display: none; }
.support-modal-box { width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.support-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 700; font-size: 17px; }
.support-close { background: transparent; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); }
.support-form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Review actions ---------- */
.review-author { font-weight: 700; }
.review-date { color: var(--muted); font-size: 12px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.review-details summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 600; }
.review-details .review-form { margin-top: 8px; }
.review-comments { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.review-comment-item { font-size: 13px; color: var(--text); }
.review-comment-item strong { color: var(--brand); margin-right: 6px; }
/* ---------- Regional Partner page ---------- */
.partners-hero { background: linear-gradient(180deg, var(--brand-soft), var(--bg)); border-bottom: 1px solid var(--border); padding: 40px 0 32px; text-align: center; }
.partners-hero h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.15; }
.partners-hero-sub { margin: 0 auto 20px; font-size: 16px; color: var(--muted); max-width: 640px; }
.partners-lead { margin: 0 0 14px; color: var(--text); font-size: 15px; max-width: 720px; }
.partners-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

.partners-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.partners-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.partners-card h3 { margin: 0 0 8px; font-size: 16px; }
.partners-card p { margin: 0; color: var(--text); font-size: 14px; }

.partners-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text); font-size: 15px; }

.partners-flow { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.partners-flow-step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.partners-flow-ico { font-size: 22px; line-height: 1; }
.partners-flow-arrow { text-align: center; color: var(--brand); font-size: 18px; transform: rotate(90deg); }

.partners-table-wrap { overflow-x: auto; }
.partners-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; background: var(--card); }
.partners-table th, .partners-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.partners-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.partners-table tr:last-child td { border-bottom: 0; }

.partners-calc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.partners-calc-inputs { display: grid; grid-template-columns: 1fr; gap: 12px; }
.partners-calc-output { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.partners-calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.partners-calc-row:last-child { border-bottom: 0; }
.partners-calc-row span { color: var(--muted); }
.partners-calc-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.partners-calc-row.is-em { font-size: 16px; }
.partners-calc-row.is-em strong { color: var(--brand-dark); }
.partners-calc-row.is-regional strong { color: var(--brand); font-size: 18px; }
.partners-calc-explanation { margin: 0; font-size: 14px; color: var(--text); background: var(--brand-soft); padding: 12px 14px; border-radius: var(--radius-sm); }
.partners-calc-error { margin: 0; font-size: 14px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; padding: 10px 12px; border-radius: var(--radius-sm); }
.partners-calc-formula { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-line; }

.partners-split { display: grid; grid-template-columns: 1fr; gap: 10px; }
.partners-split-bar { padding: 14px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.partners-split-bar::before { content: ''; display: block; height: 8px; width: var(--w, 50%); border-radius: 999px; background: var(--brand); }
.partners-split-bar:first-child::before { background: var(--accent); }
.partners-split-bar span { color: var(--muted); font-size: 14px; }
.partners-split-bar strong { font-size: 20px; color: var(--text); }

.partners-share { display: flex; flex-direction: column; gap: 10px; }
.partners-share-block { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.partners-share-block span { font-size: 14px; font-weight: 600; color: var(--text); }
.partners-share-block strong { font-size: 24px; }
.partners-share-block.is-regional { background: var(--brand-soft); border-color: #99f6e4; }
.partners-share-block.is-regional strong { color: var(--brand-dark); }
.partners-share-block.is-referral { background: #fff7ed; border-color: #fed7aa; }
.partners-share-block.is-referral strong { color: #c2410c; }
.partners-share-block.is-hq { background: #f1f5f9; border-color: var(--border); }
.partners-share-block.is-hq strong { color: var(--muted); }

.partners-timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.partners-timeline li { position: relative; }
.partners-timeline li::before { content: ''; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.partners-timeline strong { display: block; font-size: 15px; }
.partners-timeline span { color: var(--muted); font-size: 14px; }

.partners-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.partners-chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--border); background: var(--card); color: var(--muted); }
.partners-chip.is-sev-minor { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.partners-chip.is-sev-medium { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.partners-chip.is-sev-major { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.partners-chip.is-sev-critical { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.partners-chip.is-active { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.partners-chip.is-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.partners-chip.is-atrisk { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.partners-chip.is-probation { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.partners-chip.is-suspended { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.partners-chip.is-terminated { background: #f1f5f9; color: #334155; border-color: var(--border); }

.partners-faq { display: flex; flex-direction: column; gap: 8px; }
.partners-faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.partners-faq-item summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.partners-faq-item summary::-webkit-details-marker { display: none; }
.partners-faq-item summary::after { content: '+'; color: var(--brand); font-size: 20px; font-weight: 700; line-height: 1; }
.partners-faq-item[open] summary::after { content: '−'; }
.partners-faq-item p { margin: 0; padding: 0 16px 14px; color: var(--text); font-size: 14px; }

.partners-cta { background: var(--brand); color: #fff; text-align: center; padding: 40px 16px; margin-top: 8px; }
.partners-cta h2 { margin: 0 0 10px; font-size: 26px; }
.partners-cta p { margin: 0 auto 20px; color: #ccfbf1; font-size: 15px; max-width: 560px; }
.partners-cta .btn-primary { background: #fff; color: var(--brand-dark); }
.partners-cta .btn-primary:hover { background: var(--brand-soft); }
.partners-cta .partners-note { color: #99f6e4; }

.footer-legal-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.footer-creator { color: var(--muted); font-size: 12px; }
.footer-creator:hover { color: var(--brand); }

@media (min-width: 768px) {
  .partners-hero h1 { font-size: 44px; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-calc-inputs { grid-template-columns: repeat(3, 1fr); }
  .partners-flow { flex-direction: row; align-items: center; }
  .partners-flow-step { flex: 1; justify-content: center; }
  .partners-flow-arrow { transform: rotate(0deg); }
  .partners-split { grid-template-columns: 1fr 1fr; }
  .partners-share { flex-direction: row; }
  .partners-share-block { flex: 1; }
}

@media (min-width: 1024px) {
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ============================= Admin panel ============================= */
.admin-body { background: #f3f6f5; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px; flex: 0 0 240px;
  background: #0f3d38; color: #fff;
  padding: 20px 0; display: flex; flex-direction: column; gap: 6px;
}
.admin-brand { font-weight: 700; font-size: 18px; padding: 0 20px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; }
.admin-nav form { margin: 0; }
.admin-nav-item {
  display: block; width: 100%; text-align: left;
  color: rgba(255,255,255,.85); text-decoration: none; font: inherit;
  background: transparent; border: 0; cursor: pointer;
  padding: 10px 14px; border-radius: 8px;
}
.admin-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav-item.is-active { background: #0f766e; color: #fff; }
.admin-nav-logout { color: rgba(255,255,255,.6); margin-top: 8px; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0; }

.admin-main { flex: 1; padding: 24px; max-width: 1000px; }
.admin-main .section { padding: 0; }
.admin-main .flash { margin-bottom: 16px; }
.admin-main-login { max-width: 480px; margin: 60px auto; }

.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-filters input[type=text], .admin-filters select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); font: inherit;
}

.admin-links { margin: 0; padding-left: 18px; }
.admin-links a { color: var(--brand); word-break: break-all; }

.admin-pagination { display: flex; gap: 6px; margin-top: 12px; }
.admin-pagination a { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--brand); }
.admin-pagination a.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.admin-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.admin-approve, .admin-reject { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.admin-approve .field, .admin-reject .field { margin-bottom: 10px; }

.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: #e8f0ee; color: #0f766e;
}
.status-badge-verified { background: #0f766e; color: #fff; }



/* Public status badge + avatar menu extras */
.status-badge-plain { background: #eef1f0; color: var(--muted); }
.avatar-menu-form { margin: 0; }
.avatar-menu-form .avatar-menu-item { width: 100%; }
.avatar-menu-logout { color: #b91c1c; }

/* Admin small utilities */
.admin-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.admin-inline-form { margin: 0; display: inline; }
.admin-inline-form button { display: inline-block; }
.admin-row-main .profile-avatar { margin-bottom: 8px; }


@media (max-width: 767px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex: 0 0 auto; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; }
  .admin-brand { padding: 0 12px 0 0; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
  .admin-nav { flex-direction: row; padding: 0; }
  .admin-nav form { display: inline; }
  .admin-nav-item { width: auto; padding: 8px 10px; white-space: nowrap; }
  .admin-nav-logout { border-top: 0; border-left: 1px solid rgba(255,255,255,.12); margin-top: 0; }
  .admin-main { padding: 16px; }
  .admin-actions-row { grid-template-columns: 1fr; }
}

/* ============================= Stage 4: cabinet (funds + affiliate) ============================= */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.cabinet-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 640px; }
.section-title { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Funds: "why funds exist" intro. Explanatory content only — no financial UI here. */
.funds-intro {
  padding: 18px 16px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.funds-intro-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.funds-intro-col { min-width: 0; }
.funds-intro-title { margin: 0 0 10px; font-size: 21px; line-height: 1.25; color: var(--brand-dark); overflow-wrap: anywhere; }
.funds-intro-lead { margin: 0 0 12px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.funds-intro-text { margin: 0 0 10px; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.funds-intro-subtitle { margin: 18px 0 10px; font-size: 16px; overflow-wrap: anywhere; }
.funds-intro-col > .funds-intro-subtitle:first-child { margin-top: 0; }

.funds-benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.funds-benefit {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; font-size: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.funds-benefit-icon { flex: 0 0 auto; font-size: 16px; line-height: 1.35; }
.funds-benefit-text { min-width: 0; overflow-wrap: anywhere; }

.funds-intro-accent {
  margin: 14px 0 0; padding: 12px 14px;
  font-size: 14px; font-weight: 600; overflow-wrap: anywhere;
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}

.funds-steps { list-style: none; counter-reset: funds-step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.funds-step {
  display: flex; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.funds-step-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700;
}
.funds-step-num::before { counter-increment: funds-step; content: counter(funds-step); }
.funds-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.funds-step-title { font-size: 14px; overflow-wrap: anywhere; }
.funds-step-text { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.funds-organizer { margin-top: 16px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.funds-organizer-title { margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.funds-organizer p { margin: 0 0 8px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.funds-organizer p:last-child { margin-bottom: 0; }

@media (min-width: 600px) {
  .funds-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .funds-intro-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
  .funds-intro { padding: 22px 24px; }
}

.money-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.money-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.money-card-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.money-card-value { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.money-card.is-total { background: var(--brand-soft); border-color: #99f6e4; }
.money-card.is-total .money-card-value { color: var(--brand-dark); }
.money-card-note { color: var(--muted); font-size: 12px; }
.stats-grid .money-card-value { font-size: 18px; }

.funds-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.funds-action-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.funds-action-form .field { flex: 1 1 160px; }
.funds-action-form input { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; }

.ui-state { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 0 0 12px; }
.ui-state-icon { line-height: 1.2; }
.ui-state.is-disabled { background: #f1f5f9; border: 1px solid var(--border); color: var(--muted); }
.ui-state.is-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.ui-state.is-empty { display: block; padding: 0; margin: 0 0 12px; border: 0; background: transparent; }

.tx-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.tx-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-type { font-weight: 700; font-size: 15px; }
.tx-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex: 0 0 auto; }
.tx-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.is-in { color: #15803d; }
.tx-amount.is-out { color: #b91c1c; }
.tx-amount.is-neutral { color: var(--muted); }
.tx-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); }
.tx-status.is-finalized { background: #f0fdf4; color: #166534; }
.tx-status.is-pending { background: #fffbeb; color: #92400e; }
.tx-status.is-failed, .tx-status.is-cancelled { background: #fef2f2; color: #b91c1c; }
.tx-status.is-reversed { background: #f1f5f9; color: #334155; }

.pager { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pager-info { color: var(--muted); font-size: 13px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.privacy-note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
button.is-loading, .btn.is-loading { opacity: .7; cursor: progress; }

.card-block { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.card-block-hint { margin: 0; color: var(--muted); font-size: 14px; }
.affiliate-input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; background: var(--bg); font-variant-numeric: tabular-nums; }
.affiliate-input:focus { outline: 2px solid var(--brand-light); outline-offset: 1px; }
.affiliate-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.deeplink-form, .campaign-form { display: grid; grid-template-columns: 1fr; gap: 12px; }
.deeplink-form input, .deeplink-form select, .campaign-form input, .campaign-form select { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; }
.deeplink-result { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.deeplink-result .affiliate-input { flex: 1 1 220px; }
.campaign-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.campaign-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.campaign-name { font-size: 14px; font-weight: 600; }

.status-banner { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.status-banner-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.status-banner-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.status-banner-value { font-size: 18px; }
.status-banner p { margin: 0; font-size: 14px; }
.status-banner-meta { color: var(--muted); font-size: 13px; }
.status-banner.is-active { background: #f0fdf4; border-color: #bbf7d0; }
.status-banner.is-active .status-banner-value { color: #166534; }
.status-banner.is-passive { background: #fffbeb; border-color: #fde68a; }
.status-banner.is-passive .status-banner-value { color: #92400e; }
.status-banner.is-expired { background: #f1f5f9; }
.status-banner.is-expired .status-banner-value { color: #334155; }
.status-banner.is-suspended { background: #fef2f2; border-color: #fecaca; }
.status-banner.is-suspended .status-banner-value { color: #b91c1c; }

.conv-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 16px; }
.conv-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.conv-row:last-child { border-bottom: 0; }
.conv-row span { color: var(--muted); }
.conv-row strong { font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.attr-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); }
.attr-status.is-qualified { background: #f0fdf4; color: #166534; }
.attr-status.is-pending { background: #fffbeb; color: #92400e; }
.attr-status.is-expired, .attr-status.is-reversed { background: #f1f5f9; color: #334155; }
.attr-status.is-suspended { background: #fef2f2; color: #b91c1c; }

@media (min-width: 600px) {
  .money-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deeplink-form, .campaign-form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; }
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .money-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-bottom: 1px solid var(--border); padding: 6px 0; }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { display: flex; justify-content: space-between; gap: 12px; border-bottom: 0; padding: 6px 12px; white-space: normal; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
}

/* ============================= Stage 5: admin funds + partners ============================= */
.admin-nav-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted); }
.admin-kv { display: grid; grid-template-columns: 1fr; gap: 2px 20px; margin: 0 0 16px; }
.admin-kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--border); padding: 8px 0; }
.admin-kv span { color: var(--muted); }
.admin-kv strong { text-align: right; overflow-wrap: anywhere; }
.admin-perms { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 8px 0; }
.admin-perms label { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.admin-inline-details { margin: 8px 0; }
.admin-inline-details summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 14px; padding: 6px 0; }
.admin-inline-form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 8px 8px 0; }
.admin-inline-form input[type=text], .admin-inline-form input[type=number] { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.partner-status.is-active { color: #166534; }
.partner-status.is-passive { color: #92400e; }
.partner-status.is-expired { color: #334155; }
.partner-status.is-suspended { color: #b91c1c; }
@media (min-width: 768px) {
  .admin-kv { grid-template-columns: 1fr 1fr; }
  .admin-perms { grid-template-columns: 1fr 1fr; }
}

/* AUTH V2 / Stage 4: authentication UI polish (accessibility, touch targets,
   mobile balance). Uses the existing SOBIRA palette and components only. */
.field input, .field select, .field textarea { min-height: 48px; }
.btn:focus-visible, .btn-oauth:focus-visible, .auth-alt a:focus-visible,
.identity-action button:focus-visible, .identity-action a:focus-visible,
.checkbox-row input:focus-visible, #password:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-oauth { min-height: 48px; }
.oauth-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg, #f1f5f9); color: var(--muted); font-size: 13px; font-weight: 700;
}
.oauth-name { flex: 1; text-align: center; }
.auth-form-label { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
/* Secondary CTA ("Зарегистрироваться" / "Войти"). Deliberately a compact
   ghost button: clearly stronger than the helper links below, clearly weaker
   than the primary full-width action above. */
.auth-alt-create { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 22px 0 0; }
.auth-alt-create .auth-alt-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 8px 18px;
  border: 1px solid var(--brand); border-radius: 999px;
  background: transparent; color: var(--brand-dark);
  font-size: 15px; font-weight: 700;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
@media (hover: hover) {
  .auth-alt-create .auth-alt-cta:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
}
.auth-minimal-note { margin: -6px 0 0; }
.auth-verify-hint { display: block; margin-top: 14px; }
.identity-value { font-family: inherit; }
.identity-value-empty { color: var(--muted); }
.identity-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin: 0; }
.identity-action form { margin: 0; }
.flash { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .auth-wrap { padding-top: 20px; }
  .auth-card { padding: 18px; }
  .auth-title { font-size: 22px; }
  .identity-row { align-items: flex-start; }
  .identity-action { align-items: flex-start; }
}

/* AUTH V2: contact details block (phone is information, never a credential). */
.contact-block { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 14px; gap: 10px; }
.contact-current { display: flex; align-items: baseline; gap: 8px; margin: 0; flex-wrap: wrap; }
.contact-kind { font-size: 13px; color: var(--muted); }
.contact-value { font-weight: 600; }
.contact-value-empty { font-weight: 500; color: var(--muted); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.checkbox-row input { width: auto; margin: 0; }

/* AUTH V2: provider buttons and the identity list (email / Google / Yandex). */
.auth-providers { display: flex; flex-direction: column; gap: 10px; }
.btn-oauth {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; color: var(--text, #111); border: 1px solid var(--border, #d7dbe0);
    padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
}
.btn-oauth:hover { border-color: var(--brand); color: var(--brand); }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border, #e5e7eb); }
.auth-alt { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--brand); font-weight: 600; }
.form-title-sm { font-size: 18px; margin-top: 28px; }
.identity-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.identity-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 12px 14px;
}
.identity-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.identity-badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: var(--muted); }
.identity-badge.is-ok { background: #dcfce7; color: #166534; }
.identity-badge.is-warn { background: #fef3c7; color: #92400e; }
.identity-action { margin: 0; }

/* ============================= Paid events v1: price, payment method, organizer participation ============================= */

/* Grouped form sections (participants / participation cost). */
.form-group { margin: 0 0 18px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.form-group-title { padding: 0 6px; margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--brand-dark); }
.form-group .field-hint { display: block; margin: 6px 0 0; }

/* Radio rows used by the payment method and organizer controls. */
.radio-field { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; background: var(--bg); }
.radio-field:last-child { margin-bottom: 0; }
.radio-field input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; }
.radio-field:focus-within { outline: 2px solid var(--brand-light); outline-offset: 1px; }
.radio-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.radio-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.radio-field small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.radio-field.is-disabled { background: #f1f5f9; border-style: dashed; color: var(--muted); cursor: not-allowed; opacity: .75; }
.radio-field.is-disabled input { cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-soft { background: var(--bg); border: 1px solid var(--border); color: var(--muted); }

.price-mode { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.price-mode .radio-field { flex: 1 1 140px; margin-bottom: 0; }

/* Price input with the currency symbol kept outside the editable value. */
.price-input { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.price-input input { flex: 1 1 auto; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; font-variant-numeric: tabular-nums; }
.price-currency { flex: 0 0 auto; font-size: 16px; font-weight: 700; color: var(--muted); }

/* The paid details appear only while "Paid" is selected. Pure CSS so the control
   also behaves without JavaScript; an engine without :has() simply shows the block,
   which is harmless because the backend ignores price and method for a free event. */
.price-details { margin-top: 4px; }
[data-price-group]:has(input[name="price_mode"][value="free"]:checked) .price-details { display: none; }

/* Event detail page: price line and the on-site payment explanation. */
.event-price { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 16px; }
.event-price-value { font-size: 18px; overflow-wrap: anywhere; }
.event-price-value.is-free { color: var(--brand-dark); }
.event-pay-label { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--border); color: var(--brand-dark); font-size: 13px; font-weight: 700; }
.event-pay-note { margin: 0 0 8px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* Event card: one compact price chip inside the existing footer row. */
.event-card-price { font-weight: 700; color: var(--brand-dark); overflow-wrap: anywhere; }
.event-card-price.is-free { color: var(--muted); }
.event-card-pay { font-weight: 400; color: var(--muted); }

@media (max-width: 640px) {
  .event-card-foot { flex-wrap: wrap; gap: 6px; }
  .event-card-price { flex: 1 1 100%; }
  .event-card-people { flex: 1 1 auto; }
}

/* ---------- Friends ---------- */
.friend-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.friend-actions form { margin: 0; }
.friend-state { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.friend-list { display: flex; flex-direction: column; gap: 8px; }
.friend-card { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
.friend-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: 0 0 auto; overflow: hidden; }
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.friend-name { font-weight: 600; font-size: 15px; }
.friend-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.friends-tabs { display: flex; gap: 8px; margin: 20px 0 16px; flex-wrap: wrap; }
.friend-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; font-weight: 600; background: #fff; color: inherit; }
.friend-tab.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.friends-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.friend-tab.is-active .friends-count { background: rgba(255,255,255,0.2); color: #fff; }
.friends-sub { margin: 16px 0 8px; font-size: 15px; color: var(--muted); }
.friends-requests { margin-bottom: 8px; }

/* ---------- Unified own/public profile: header actions + tabs ---------- */
.profile-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.profile-actions-top { margin-top: 0; flex-wrap: wrap; align-items: center; }
.profile-interests { margin: 0 0 8px; }
.profile-interests-empty { margin: 0 0 8px; }
.profile-tabs { display: flex; gap: 4px; margin: 20px 0 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.profile-tab { padding: 10px 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; }
.profile-tab:hover { color: var(--brand-dark); }
.profile-tab.is-active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.profile-tab-panel { display: block; }
@media (max-width: 640px) {
  .profile-header { flex-direction: column; }
  .profile-actions-top { width: 100%; }
  .profile-actions-top .btn { max-width: 100%; white-space: normal; text-align: center; }
  .profile-tab { padding: 8px 10px; font-size: 13px; }
}

/* The profile page uses ".section.container" like every other page; the gutter
   now comes from .container alone (see the axis-independent paddings above). */

/* ---------- Wall ---------- */
.wall-create { margin-bottom: 16px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.wall-create summary { cursor: pointer; font-weight: 700; }
.wall-form { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.wall-list { display: flex; flex-direction: column; gap: 16px; }
.wall-post { padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.wall-post-head { display: flex; gap: 12px; align-items: flex-start; }
.wall-post-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: 0 0 auto; overflow: hidden; }
.wall-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wall-post-head-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wall-post-author { font-weight: 700; }
.wall-post-date { color: var(--muted); font-size: 13px; }
.wall-post-owner-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wall-post-owner-actions form { margin: 0; }
.wall-post-body { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wall-post-attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.wall-post-image { width: 100%; border-radius: var(--radius-sm); display: block; }
.wall-post-link { display: inline-block; margin-top: 12px; color: var(--brand-dark); font-weight: 600; overflow-wrap: anywhere; }
.wall-post-foot { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.wall-like-form { margin: 0; }
.wall-like { background: transparent; border: 0; cursor: pointer; font-size: 18px; color: var(--muted); }
.wall-like.is-liked { color: #dc2626; }
.wall-comment-count { color: var(--muted); font-size: 14px; }
.wall-comments { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wall-comment { display: flex; gap: 8px; align-items: flex-start; }
.wall-comment-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: 0 0 auto; overflow: hidden; }
.wall-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wall-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wall-comment-body span { overflow-wrap: anywhere; }
.wall-comment-body time { color: var(--muted); font-size: 12px; }
.wall-comment-delete { margin: 0; }
.wall-comment-form { display: flex; gap: 8px; margin-top: 6px; }
.wall-comment-form input { flex: 1; min-width: 0; }
.wall-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.wall-edit-form textarea { width: 100%; }

/* ---------- Profile: plans tab filters ---------- */
.plans-filter-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.plans-filter-head .section-title { margin: 0; }

/* ---------- Reviews: avatar / event / date / "left" marker ---------- */
.review-author { display: inline-flex; align-items: center; gap: 8px; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: 0 0 auto; overflow: hidden; }
img.review-avatar { object-fit: cover; }
.review-for { color: var(--muted); font-weight: 700; }
.review-event { display: inline-block; margin: 4px 0; color: var(--brand-dark); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.review-date { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- Plan discussion ---------- */
.event-discussion { margin-top: 16px; }
.discussion-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.discussion-message { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.discussion-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; overflow: hidden; }
.discussion-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discussion-body { flex: 1; min-width: 0; }
.discussion-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.discussion-author { font-weight: 700; color: var(--brand-dark); text-decoration: none; }
.discussion-time { color: var(--muted); font-size: 12px; }
.discussion-text { margin: 4px 0 0; overflow-wrap: anywhere; }
.discussion-delete { margin: 0; }
.discussion-form { display: flex; flex-direction: column; gap: 8px; }
.discussion-form textarea { width: 100%; min-height: 64px; resize: vertical; }
.discussion-form button { align-self: flex-end; }
.discussion-empty { margin: 4px 0; }

/* ---------- Attendance ---------- */
.event-attendance, .event-attendance-summary { margin-top: 16px; }
.attendance-current { font-weight: 700; }
.attendance-claim-form { margin: 8px 0; }
.qr-box { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.qr-canvas { background: #fff; padding: 8px; border-radius: 8px; }
.qr-canvas img, .qr-canvas canvas { max-width: 100%; height: auto; }
.qr-link { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; color: var(--muted); }
.qr-hint { font-size: 13px; color: var(--muted); }
.attendance-summary-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; }
.application-attendance { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.application-attendance-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.application-seats { margin: 4px 0; color: var(--muted); font-size: 14px; }
.attendance-badge { display: inline-block; align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #f1f5f9; color: #334155; }
.attendance-badge-attended, .attendance-badge-auto_attended { background: #dcfce7; color: #166534; }
.attendance-badge-absent { background: #fee2e2; color: #991b1b; }
.attendance-badge-partial { background: #fef3c7; color: #92400e; }
.attendance-badge-pending { background: #f1f5f9; color: #475569; }

/* ---------- Attendance count modal ---------- */
.attendance-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.attendance-modal[hidden] { display: none; }
.attendance-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); }
.attendance-modal-card { position: relative; z-index: 1; width: 100%; max-width: 360px; background: #fff; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25); }
.attendance-modal-card h3 { margin: 0; }
.attendance-modal-text { margin: 0; color: var(--muted); }
.attendance-modal-reserved { margin: 0; }
.attendance-stepper { display: flex; align-items: center; justify-content: center; gap: 16px; }
.stepper-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 22px; cursor: pointer; }
.stepper-value { min-width: 48px; text-align: center; font-size: 22px; font-weight: 800; }
.attendance-modal-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Photo report ---------- */
.event-photos { margin-top: 16px; }
.event-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.event-photo-grid a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.event-photo-grid img { width: 100%; height: 140px; object-fit: cover; display: block; }
.photo-upload-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---------- Important profile data ---------- */
.important-data-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 18px; margin: 16px 0; background: #f8fafc; display: flex; flex-direction: column; gap: 12px; }
.important-data-title { font-weight: 800; font-size: 17px; padding: 0 6px; }
.field-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Share toast ---------- */
.share-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 1300; max-width: 90vw; overflow-wrap: anywhere; }
.share-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- QR scanner ---------- */
.scan-page { display: flex; flex-direction: column; gap: 12px; }
.scan-video-wrap { position: relative; background: #0f172a; border-radius: var(--radius); overflow: hidden; }
.scan-video-wrap video { width: 100%; max-height: 60vh; display: block; object-fit: cover; }
.scan-manual { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Check-in page ---------- */
.checkin-page { max-width: 520px; }
.checkin-user { font-weight: 700; }
.checkin-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* ---------- Admin attendance ---------- */
.admin-attendance-form { display: flex; gap: 6px; align-items: center; }
.admin-attendance-count { width: 72px; }

@media (max-width: 480px) {
    .discussion-message { padding: 8px; }
    .attendance-modal-card { padding: 14px; }
    .event-photo-grid img { height: 110px; }
}

/* ================= Partnership tracks: hub, sponsors, investors ================= */
.partner-hub-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.partner-hub-card .partners-list { flex: 1; }
.partner-hub-card .btn { margin-top: auto; }

.sponsor-pools { display: grid; grid-template-columns: 1fr; gap: 14px; }
.sponsor-pool { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.sponsor-pool-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.sponsor-pool-head strong { font-size: 17px; }
.sponsor-pool-stats { display: grid; grid-template-columns: 1fr; gap: 10px; }
.sponsor-pool-stat { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sponsor-pool-stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.sponsor-pool-stat strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.sponsor-pool-stat.is-confirmed { background: var(--brand-soft); border-color: #99f6e4; }
.sponsor-pool-stat.is-confirmed strong { color: var(--brand-dark); }
.sponsor-progress { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.sponsor-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); }
.sponsor-pool-reward { margin: 0; font-size: 15px; }
.sponsor-pool-reward strong { color: var(--brand-dark); }
.sponsor-supported-label { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.sponsor-brand-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sponsor-brand { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.sponsor-brand img { height: 18px; width: auto; }
.sponsor-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sponsor-logo-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--text); }
.sponsor-logo-card img { max-height: 44px; width: auto; }
.sponsor-ad-preview { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 12px; margin: 12px 0 0; }
.sponsor-ad-preview span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sponsor-ad-preview strong { font-size: 20px; color: var(--brand-dark); }
.sponsor-ad-preview em { font-style: normal; font-size: 12px; color: var(--muted); }

.lead-form { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.lead-form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lead-form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.lead-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lead-radio, .lead-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }

.investor-flows .partners-card.is-investor { border-color: #99f6e4; }
.investor-note { background: var(--brand-soft); border: 1px solid #99f6e4; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.investor-note p { margin: 0; font-size: 15px; color: var(--text); }
.investor-legal { border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: var(--radius-sm); padding: 14px 16px; background: #f8fafc; }
.investor-legal p { margin: 0; font-size: 13px; color: var(--muted); }
.section-subtitle { font-size: 15px; margin: 20px 0 10px; color: var(--text); }
.admin-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }

@media (min-width: 640px) {
  .sponsor-pool-stats { grid-template-columns: repeat(3, 1fr); }
  .sponsor-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .sponsor-pools { grid-template-columns: repeat(2, 1fr); }
  .lead-form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .sponsor-pools { grid-template-columns: repeat(3, 1fr); }
}
.wish-entry { display: inline-flex; margin-top: .5rem; }
.wish-system-badge { color: #0f766e; font-weight: 700; }
.wish-system-disclaimer { padding: .85rem 1rem; background: #eef8f4; border-radius: .75rem; margin-top: 1rem; }
.wish-page { max-width: 980px; }
.wish-form, .wish-preferences { display: grid; gap: 1rem; }
.wish-quick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.wish-quick legend { margin-bottom: .5rem; }
.wish-quick .chip { cursor: pointer; }
.wish-quick input { accent-color: #0f766e; }
.wish-shortcuts { display: grid; gap: .75rem; }
.wish-shortcut-group { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.wish-shortcut-group strong { min-width: 6rem; font-size: .9rem; }
.wish-shortcut-group .chip { cursor: pointer; }
.wish-shortcut-group .chip[aria-pressed="true"] { border-color: #0f766e; background: #e8f7f4; color: #0b625b; }
.wish-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.wish-form textarea, .wish-form input, .wish-form select { max-width: 100%; }
.wish-list { display: grid; gap: 1rem; margin: 1rem 0 2rem; }
.wish-item { padding: 1rem; border: 1px solid var(--border, #d6e1dc); border-radius: 1rem; }
.wish-item h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.wish-category-link { display: block; }
.wish-category-link:hover, .wish-category-link.is-active { border-color: var(--brand); background: var(--brand-soft); }
.wish-demand-item { background: #fff; }
.wish-demand-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; }
.wish-demand-head h3 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.wish-demand-normalized { margin: .5rem 0 0; color: var(--muted); }
.wish-demand-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem 1.25rem; margin: 1rem 0 0; }
.wish-demand-details div { min-width: 0; }
.wish-demand-details dt { color: var(--muted); font-size: .8rem; }
.wish-demand-details dd { margin: .2rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.wish-demand-details a { color: var(--brand); }
.wish-demand-created { margin: 1rem 0 0; }
.wish-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.wish-actions form { margin: 0; }
@media (max-width: 640px) { .wish-form-grid { grid-template-columns: 1fr; } .wish-quick .chip { flex: 1 1 44%; } }


/* ---- Rewards (Stage 9) ---- */
.rewards-page .rewards-hero { background: linear-gradient(135deg,#0f766e,#134e4a); color:#fff; border-radius:16px; padding:20px; margin-bottom:16px; }
.rewards-hero-scope { text-transform:uppercase; letter-spacing:.08em; font-size:12px; opacity:.85; }
.rewards-hero-title { margin:4px 0 14px; font-size:22px; }
.rewards-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.rewards-stat-value { font-size:18px; font-weight:700; }
.rewards-stat-label { display:block; font-size:12px; opacity:.8; }
.rewards-note { font-size:12px; opacity:.85; margin:10px 0 0; }
.rewards-card { background:var(--surface,#fff); border:1px solid var(--border,#e5e7eb); border-radius:14px; padding:16px; margin-bottom:16px; }
.rewards-me-grid { display:flex; flex-wrap:wrap; gap:18px; }
.rewards-estimate-value { font-size:20px; }
.rewards-distance { margin:10px 0 0; font-weight:600; }
.leaderboard-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--border,#f1f5f9); }
.leaderboard-row.is-me { background:rgba(15,118,110,.08); border-radius:8px; }
.leaderboard-rank { width:52px; font-variant-numeric:tabular-nums; opacity:.8; }
.leaderboard-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.leaderboard-sc { font-weight:700; font-variant-numeric:tabular-nums; }
.leaderboard-zone-boundary { text-align:center; font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:#0f766e; padding:8px 0; border-top:2px dashed #0f766e; border-bottom:2px dashed #0f766e; }
.rewards-opps { list-style:none; padding:0; margin:0; }
.rewards-opps li { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--border,#f1f5f9); }
.badge-qualified { background:#0f766e; color:#fff; }
.badge-zone { background:#f59e0b; color:#1f2937; }
.awards-summary { border:1px solid var(--border,#e5e7eb); border-radius:14px; padding:14px; margin-bottom:14px; }
.awards-summary-total { font-size:20px; font-weight:700; }
.awards-summary-counters { display:flex; flex-wrap:wrap; gap:12px; margin:8px 0; }
.awards-summary-meta { display:flex; flex-wrap:wrap; gap:14px; font-size:13px; opacity:.85; }
.awards-grid { display:grid; grid-template-columns:1fr; gap:10px; }
.award-card { border:1px solid var(--border,#e5e7eb); border-radius:12px; padding:10px 12px; }
.award-card-head { display:flex; align-items:center; gap:10px; cursor:pointer; }
.award-card-title { flex:1; }
.award-card-rank { font-weight:700; opacity:.75; }
.award-detail { margin-top:8px; font-size:13px; display:grid; gap:4px; }
.award-card.is-progress { opacity:.65; }
.award-select { display:flex; align-items:center; gap:10px; border:1px solid var(--border,#e5e7eb); border-radius:12px; padding:10px; cursor:pointer; }
.award-select.is-featured { border-color:#0f766e; box-shadow:0 0 0 2px rgba(15,118,110,.15); }
@media (min-width:768px){ .rewards-stats { grid-template-columns:repeat(4,minmax(0,1fr)); } .awards-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ---------- SOBIRA Weekly ---------- */
.bottom-nav-label { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:360px){ .bottom-nav-label { font-size:12px; } }

.weekly-page { display:flex; flex-direction:column; gap:16px; }
.weekly-page .rewards-hero { margin-bottom:0; }
.weekly-info { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:50%; border:1px solid currentColor; font-size:10px; font-weight:700; cursor:help; vertical-align:middle; }
.weekly-cta-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.weekly-section-head { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin-bottom:10px; }
.weekly-section-head .section-title { margin:0; }

/* Empty (no period) state */
.weekly-empty { background:var(--surface,#fff); border:1px solid var(--border,#e5e7eb); border-radius:16px; padding:22px; }
.weekly-empty-head { text-align:center; margin-bottom:18px; }
.weekly-empty-icon { font-size:40px; line-height:1; }
.weekly-empty-title { margin:8px 0 6px; font-size:22px; }
.weekly-empty-text { margin:0 auto; max-width:560px; color:var(--muted,#64748b); }
.weekly-how { margin:8px 0 18px; }
.weekly-how-list { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.weekly-how-item { display:flex; gap:12px; align-items:flex-start; }
.weekly-how-num { flex:0 0 auto; width:26px; height:26px; border-radius:50%; background:var(--brand-soft,#d1fae5); color:var(--brand,#0f766e); font-weight:700; display:flex; align-items:center; justify-content:center; }
.weekly-how-item p { margin:2px 0 0; color:var(--muted,#64748b); font-size:14px; }

/* Pool card + countdown */
.weekly-pool-head { display:flex; flex-direction:column; gap:2px; }
.weekly-pool-main { display:flex; flex-wrap:wrap; gap:16px; justify-content:space-between; align-items:flex-end; margin:10px 0 14px; }
.weekly-pool-amount { display:flex; flex-direction:column; gap:2px; }
.weekly-pool-value { font-size:34px; line-height:1.1; }
.weekly-countdown-block { display:flex; flex-direction:column; gap:2px; }
.weekly-countdown { font-variant-numeric:tabular-nums; font-size:20px; }
.weekly-countdown-line { margin:6px 0 14px; }
.weekly-pool-stats .rewards-stat-value { font-size:16px; }
.rewards-page .weekly-pool-card { background:linear-gradient(135deg,#0f766e,#134e4a); color:#fff; border-radius:16px; padding:20px; margin-bottom:0; }
.weekly-pool-card .rewards-note { color:rgba(255,255,255,.85); }
.weekly-pool-card .weekly-info { color:#fff; }

/* Personal card */
.weekly-me-top { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:12px; }
.weekly-me-rank, .weekly-me-sc, .weekly-me-zone { display:flex; flex-direction:column; gap:2px; }
.weekly-big { font-size:24px; line-height:1.1; }
.weekly-me-zone { flex-direction:row; align-items:center; gap:8px; grid-column:1 / -1; padding:8px 10px; border-radius:10px; background:#f1f5f9; }
.weekly-me-zone.is-in { background:#dcfce7; color:#166534; }
.weekly-me-zone.is-near { background:#fef3c7; color:#92400e; }
.weekly-me-zone.is-out { background:#f1f5f9; color:#475569; }
.weekly-estimate-row { display:flex; flex-wrap:wrap; gap:10px; align-items:baseline; padding-top:10px; border-top:1px solid var(--border,#e5e7eb); }
.weekly-progress { margin:8px 0 4px; }
.weekly-progress-head { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; margin-bottom:6px; }
.weekly-bar { height:10px; border-radius:999px; background:#e2e8f0; overflow:hidden; }
.weekly-bar > span { display:block; height:100%; background:linear-gradient(90deg,#0f766e,#34d399); border-radius:999px; }
.weekly-guest-title { font-weight:700; margin:0 0 4px; }

/* Earn SC */
.weekly-earn-grid { display:grid; gap:10px; }
.weekly-earn-item { display:flex; gap:12px; align-items:flex-start; border:1px solid var(--border,#e5e7eb); border-radius:12px; padding:12px; }
.weekly-earn-icon { font-size:22px; line-height:1; }
.weekly-earn-body { flex:1; min-width:0; }
.weekly-earn-body p { margin:2px 0 0; color:var(--muted,#64748b); font-size:13px; }
.weekly-earn-side { display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
.weekly-earn-points { font-weight:800; color:#0f766e; white-space:nowrap; }

/* Tabs */
.weekly-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.weekly-tab { padding:6px 12px; border-radius:999px; border:1px solid var(--border,#e5e7eb); font-size:13px; font-weight:600; color:var(--muted,#64748b); background:#fff; }
.weekly-tab.is-active { color:var(--brand,#0f766e); background:var(--brand-soft,#d1fae5); border-color:transparent; }
.weekly-board-tabs { display:grid; gap:10px; margin-bottom:12px; }

/* Leaderboard */
.weekly-leaderboard { display:flex; flex-direction:column; }
.weekly-you { font-size:11px; font-weight:700; color:#0f766e; background:#d1fae5; border-radius:999px; padding:1px 8px; }
.weekly-board-sep { margin:12px 0 4px; font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted,#64748b); }
.weekly-pagination { display:flex; align-items:center; gap:12px; justify-content:center; margin:12px 0; }

/* Awards */
.weekly-awards-grid { display:grid; gap:10px; }
.weekly-award { display:flex; gap:10px; align-items:flex-start; border:1px solid var(--border,#e5e7eb); border-radius:12px; padding:12px; }
.weekly-award.is-earned { border-color:#0f766e; background:#f0fdf4; }
.weekly-award-icon { font-size:20px; line-height:1; }
.weekly-award-body { display:flex; flex-direction:column; gap:2px; }
.weekly-award-progress { font-weight:700; color:#0f766e; }

/* SC history */
.weekly-sc-list { list-style:none; margin:0; padding:0; }
.weekly-sc-item { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px 0; border-bottom:1px solid var(--border,#f1f5f9); }
.weekly-sc-amount { font-weight:800; color:#0f766e; min-width:76px; font-variant-numeric:tabular-nums; }
.weekly-sc-amount.is-negative { color:#b91c1c; }
.weekly-sc-label { flex:1; min-width:0; }
.weekly-sc-meta { display:flex; gap:8px; align-items:center; font-size:12px; color:var(--muted,#64748b); }
.weekly-sc-status { padding:1px 8px; border-radius:999px; background:#f1f5f9; }
.weekly-sc-status.is-confirmed, .weekly-sc-status.is-eligible, .weekly-sc-status.is-settled { background:#dcfce7; color:#166534; }
.weekly-sc-status.is-pending { background:#fef3c7; color:#92400e; }
.weekly-sc-status.is-hold, .weekly-sc-status.is-reversed { background:#fee2e2; color:#991b1b; }
.weekly-sc-empty-title { font-weight:700; margin:0 0 4px; }

/* Weekly history */
.weekly-history-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.weekly-history-item { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border,#f1f5f9); }
.weekly-history-meta { display:flex; gap:12px; align-items:center; font-variant-numeric:tabular-nums; }

/* Podium */
.weekly-podium-grid { display:grid; gap:10px; }
.weekly-podium-item { display:flex; gap:10px; align-items:center; padding:10px; border-radius:12px; background:#f8fafc; }
.weekly-podium-medal { font-size:22px; }
.weekly-podium-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Rules / FAQ */
.weekly-rule { border-top:1px solid var(--border,#f1f5f9); padding:10px 0; }
.weekly-rule:first-of-type { border-top:0; }
.weekly-rule summary { cursor:pointer; font-weight:600; }
.weekly-rule p { margin:6px 0 0; color:var(--muted,#64748b); font-size:14px; }

/* Admin launch form */
.admin-fieldset { border:1px solid var(--border,#e5e7eb); border-radius:10px; padding:10px 12px; margin:10px 0; }
.admin-fieldset legend { font-weight:700; padding:0 6px; }
.admin-form-actions { display:flex; flex-wrap:wrap; gap:8px; }
.admin-warning { color:#92400e; background:#fef3c7; border-radius:8px; padding:8px 10px; }
.weekly-preview { position:relative; }

@media (min-width:768px) {
  .weekly-earn-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .weekly-awards-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .weekly-me-top { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .weekly-me-zone { grid-column:auto; }
  .weekly-podium-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* ---------- SEO: breadcrumbs, related plans, 404 actions ---------- */
.breadcrumbs { margin: 0 0 14px; font-size: 13px; }
.breadcrumbs-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.breadcrumbs-item { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs-item + .breadcrumbs-item::before { content: '\2192'; color: var(--muted); }
.breadcrumbs-item a { color: var(--brand); text-decoration: none; }
.breadcrumbs-item a:hover { text-decoration: underline; }
.event-related { margin-top: 28px; }
.event-related-all { margin-top: 12px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.city-quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* ==========================================================================
   PRE-LAUNCH HARDENING (public beta, Almaty)
   Launch markers, honest empty state, plan status, trust signals, onboarding
   and the mobile tuning the responsive audit flagged as missing.
   ========================================================================== */

/* ---------- Launch region markers ---------- */
.launch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid var(--brand-light);
}
.launch-badge.is-soon { background: var(--bg); color: var(--muted); border-color: var(--border); }
.launch-badge.is-beta { background: #fff4d6; color: #7a4e00; border-color: #f0d89a; }

.city-menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.city-menu-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.city-picker summary .launch-badge { margin-left: 6px; }

.launch-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}
.launch-note .launch-badge { flex: 0 0 auto; }

/* ---------- Home hero ---------- */
.page-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.page-hero--home .page-hero__subtitle { max-width: 62ch; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* The legacy home hero gave the CTA "order: 1" so it could sit beside the title.
   Inside this dedicated action row the DOM order is the intended order, so the
   inherited order and offset are reset (primary action first). */
.page-hero__actions > * { order: 0; }
.page-hero__actions .page-hero__cta { margin-top: 0; }
/* Higher specificity than ".page-hero--home .page-hero__cta { order: 1 }" above;
   declared later so the dedicated action row wins. */
.page-hero--home .page-hero__actions > * { order: 0; }
.page-hero--home .page-hero__actions .page-hero__cta { margin-top: 0; }
.page-hero--home .page-hero__actions { margin-top: 20px; }
.home-hero-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.home-hero-link { color: var(--brand-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Honest empty state ---------- */
.empty-state-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.empty-state-block { width: 100%; margin-top: 8px; text-align: left; }
.empty-state-block > h3 { margin: 0 0 8px; font-size: 15px; }
.empty-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Plan status ---------- */
.plan-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
}
.plan-status.is-open { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-light); }
.plan-status.is-almost { background: #fff4d6; color: #7a4e00; border-color: #f0d89a; }
.plan-status.is-full { background: #f1f5f9; color: #334155; }
.plan-status.is-closed { background: #f1f5f9; color: #475569; }
.plan-status.is-live { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.plan-status.is-done { background: var(--bg); color: var(--muted); }
.plan-status.is-cancelled { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* ---------- Social proof: "already going" ---------- */
.plan-going { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; }
.plan-going-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  margin-left: -8px;
}
.avatar-stack-item:first-child { margin-left: 0; }
.avatar-stack-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-stack-more { background: var(--bg); color: var(--muted); }

.event-location-private { margin: 8px 0; color: var(--muted); font-size: 14px; }

/* ---------- Trust signals ---------- */
.reputation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.reputation-title { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.reputation-item { min-width: 0; }
.reputation-value { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.reputation-label { display: block; font-size: 12px; color: var(--muted); }
.reputation-empty { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); }
@media (min-width: 600px) {
  .reputation { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reputation-item.is-wide { grid-column: span 2; }
}

/* ---------- How it works / Safety / Rules ---------- */
.how-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.how-step { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.how-step-num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.how-step-body { min-width: 0; }
.how-step-body h2, .how-step-body h3 { margin: 0 0 6px; font-size: 18px; }
.how-step-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.how-list { margin: 0; padding-left: 18px; color: var(--muted); }
.how-list li { margin-bottom: 4px; }
@media (min-width: 768px) { .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.doc-section { margin: 0 0 22px; }
.doc-section > h2 { margin: 0 0 10px; font-size: 20px; }
.doc-section > p { margin: 0 0 10px; }
.doc-list { margin: 0 0 10px; padding-left: 20px; }
.doc-list li { margin-bottom: 6px; }
.doc-note { padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: var(--radius-sm); margin: 0 0 12px; overflow-wrap: anywhere; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ---------- Onboarding ---------- */
.onboarding-card { max-width: 620px; margin: 0 auto; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.onboarding-progress { display: flex; gap: 6px; margin-bottom: 14px; }
.onboarding-dot { flex: 1; height: 4px; border-radius: 999px; background: var(--border); }
.onboarding-dot.is-active { background: var(--brand); }
.onboarding-step-title { margin: 0 0 6px; font-size: 22px; }
.onboarding-step-body { margin: 0 0 14px; color: var(--muted); }
.onboarding-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.onboarding-choice { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; font-size: 15px; min-height: 44px; }
.onboarding-choice input { margin: 0; }
.onboarding-choice.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.onboarding-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.onboarding-actions > [hidden] { display: none; }
.onboarding-skip { margin-left: auto; color: var(--muted); text-decoration: underline; }
.onboarding-city-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.onboarding-city { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; min-height: 48px; }
.onboarding-city.is-selected { border-color: var(--brand); background: var(--brand-soft); }
@media (min-width: 600px) { .onboarding-city-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Support form: consent note ---------- */
.support-consent-note { margin: 6px 0 0; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); }

/* ---------- Registration: compact consent ---------- */
.auth-consent { align-items: flex-start; }
.auth-consent > span { min-width: 0; }
.auth-consent-details { margin-top: 2px; }
.auth-consent-details > summary { cursor: pointer; font-size: 13px; color: var(--brand-dark); font-weight: 600; }
.auth-consent-details > p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Buttons: loading state (no double submit) ---------- */
.btn[aria-busy="true"], .btn.is-loading { opacity: .75; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: sobira-spin 700ms linear infinite;
}
@keyframes sobira-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::after { animation: none; } }

/* ---------- Footer ---------- */
.footer-brand { display: block; font-weight: 700; color: var(--muted); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; width: 100%; }
.footer-col > h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.footer-col .footer-links { flex-direction: column; gap: 8px; align-items: flex-start; }
@media (min-width: 768px) { .footer-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Mobile tuning flagged by the responsive audit ---------- */
@media (max-width: 430px) {
  .page-hero--home .page-hero__panel { padding: 16px; border-radius: var(--radius); }
  .page-hero__title { font-size: clamp(24px, 8vw, 30px); overflow-wrap: anywhere; }
  .page-hero__cta { width: 100%; justify-content: center; }
  .field-row, .datetime-row { grid-template-columns: minmax(0, 1fr); }
  .weekly-pool-value { font-size: 26px; overflow-wrap: anywhere; }
  .rewards-hero-title { font-size: 19px; overflow-wrap: anywhere; }
  .reputation-value { font-size: 19px; }
  .profile-stats { flex-wrap: wrap; }
  .stat { flex: 1 1 40%; padding: 12px; }
  .stat strong { font-size: 20px; }
  .calendar-cell { min-height: 38px; font-size: 12px; }
  .map-search-this { max-width: calc(100vw - 24px); }
  .map-discover-area { top: 58px; right: 12px; padding-inline: 10px; font-size: 12px; }
  .event-card-cover { height: 160px; }
  .footer-links { gap: 12px; }
  .how-step { padding: 14px; gap: 10px; }
}

/* ---------- Share loop (plan -> share -> new user) ---------- */

/* Title-row actions: favorite + share, side by side on every breakpoint. */
.event-title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: var(--brand-soft, #ecfdf5); color: var(--brand-dark, #115e59);
  border: 1px solid var(--brand-light, #99f6e4); font: inherit; font-weight: 600; font-size: 14px;
}
.share-toggle:hover { background: #d1fae5; }
.share-toggle:focus-visible { outline: 2px solid var(--brand, #0f766e); outline-offset: 2px; }
.share-toggle__label { white-space: nowrap; }

/* Contextual, honest invitation next to the share action. */
.event-share-nudge {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 12px 0; padding: 12px 14px; border-radius: var(--radius, 12px);
  background: var(--brand-soft, #ecfdf5); border: 1px solid var(--brand-light, #99f6e4);
}
.event-share-nudge__text { font-size: 14px; font-weight: 600; color: var(--brand-dark, #115e59); }
.event-share-guest { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.event-share-guest a { color: var(--brand, #0f766e); }

/* Small share action on a plan card in "my plans". */
.event-card-share {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--brand-dark, #115e59);
  font: inherit; font-size: 13px; font-weight: 600;
}
.event-card-share:hover { background: var(--brand-soft, #ecfdf5); }

/* The one share surface. */
.share-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.share-modal[hidden] { display: none; }
.share-modal__scrim { position: absolute; inset: 0; background: rgba(4, 12, 16, 0.55); }
.share-modal__panel {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: var(--card, #fff); border-radius: 20px 20px 0 0; padding: 18px 18px 24px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
}
.share-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.share-modal__head h2 { margin: 0; font-size: 19px; }
.share-modal__sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.share-modal__close {
  border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer;
  color: var(--muted); padding: 0 6px;
}
.share-modal__close:focus-visible { outline: 2px solid var(--brand, #0f766e); outline-offset: 2px; }
.share-modal__body { margin-top: 14px; }
.share-modal__hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.share-modal__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.share-modal__guest { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.share-modal__guest a { color: var(--brand, #0f766e); }
body.share-open { overflow: hidden; }

.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.share-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--card, #fff);
  cursor: pointer; font: inherit; font-size: 12px; color: var(--text); text-align: center;
}
.share-tile:hover { border-color: var(--brand-light, #99f6e4); background: var(--brand-soft, #ecfdf5); }
.share-tile:focus-visible { outline: 2px solid var(--brand, #0f766e); outline-offset: 2px; }
.share-tile__icon { font-size: 22px; line-height: 1; }
.share-tile__label { font-weight: 600; overflow-wrap: anywhere; }

.share-story { display: flex; justify-content: center; }
.share-story__canvas {
  width: auto; max-width: 100%; max-height: 46vh; height: auto;
  border-radius: 12px; border: 1px solid var(--border); background: #0b1a20;
}
.share-story__formats { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.share-story__formats .is-active { border-color: var(--brand, #0f766e); color: var(--brand-dark, #115e59); }

.share-qr { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.share-qr__canvas { width: 160px; height: 160px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.share-qr__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; }
.share-qr__meta code { overflow-wrap: anywhere; font-size: 12px; color: var(--muted); }

.share-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px);
  z-index: 1300; padding: 10px 18px; border-radius: 999px;
  background: rgba(8, 20, 25, 0.94); color: #fff; font-size: 14px;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
  max-width: min(92vw, 420px); text-align: center;
}
.share-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Post-create success screen. */
.created-title { margin: 0 0 6px; font-size: 24px; }
.created-hint { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

@media (max-width: 430px) {
  .share-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .share-tile { padding: 12px 4px; font-size: 11px; }
  .share-modal__panel { padding: 16px 14px 20px; border-radius: 16px 16px 0 0; }
  .share-toggle__label { display: none; }
  .share-toggle { padding: 8px 10px; }
  .share-qr__canvas { width: 140px; height: 140px; }
}
@media (max-width: 360px) {
  .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------------
   FLEXIBLE PLAN (fixed/flexible time and meeting point)
   ---------------------------------------------------------------------------
   Everything below is additive: no existing selector is modified, so a fixed
   plan's page is styled exactly as before. Mobile first: the slot grid, the
   toggles and the finalization buttons are sized for a thumb (>=44px), and every
   flex child carries min-width:0 so long area names cannot force a horizontal
   scrollbar. */
.flexible-group { padding: 0; overflow: hidden; }
.flexible-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.flexible-summary::-webkit-details-marker { display: none; }
.flexible-summary-title { font-size: 15px; font-weight: 700; color: var(--brand-dark); }
.flexible-group[open] .flexible-summary { border-bottom: 1px solid var(--border); }
.flexible-fields { padding: 14px; }

.flexible-plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--card); }
.flexible-lead { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.flexible-note { margin: 8px 0 0; font-size: 13px; color: var(--text); }
.flexible-call { margin: 12px 0 6px; font-weight: 700; }
.flexible-warning { margin: 8px 0; padding: 8px 10px; border-radius: var(--radius-sm); background: #fff7ed; color: #9a3412; font-size: 13px; }
.flexible-subtitle { margin: 16px 0 6px; font-size: 14px; font-weight: 700; }

.flex-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.flex-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  min-width: 0;
}
.flex-status-row.is-decided { background: #f0fdf4; border-color: #bbf7d0; }
.flex-status-body { min-width: 0; overflow-wrap: anywhere; }
.flex-status-flag { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.flex-status-row.is-open .flex-status-flag { color: var(--brand-dark); }
.flex-status-row.is-decided .flex-status-flag { color: #15803d; }

.flexible-organizer { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.flexible-ready { margin: 0 0 6px; font-weight: 600; }
.flexible-recommendation { margin: 10px 0 6px; font-weight: 700; color: var(--brand-dark); }

.flex-tally { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.flex-tally-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  min-width: 0;
}
.flex-tally-row.is-best { border-color: var(--brand); background: #eff6ff; }
.flex-tally-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 52px; }
.flex-tally-count { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.flex-tally-star { font-size: 15px; }
.flex-approve { margin-left: auto; }
.flex-approve.is-primary { margin: 8px 0 0; }

/* Availability: a tap-friendly grid, not a narrow list. */
.flex-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
.flex-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.flex-slot input { width: 18px; height: 18px; flex: 0 0 auto; }
.flex-slot:has(input:checked) { border-color: var(--brand); background: #eff6ff; color: var(--brand-dark); }
.flex-slot:focus-within { outline: 2px solid var(--brand-light); outline-offset: 1px; }
.flex-slot-time { font-variant-numeric: tabular-nums; }

.flex-location-form .geo-map,
.flexible-organizer .geo-map { height: 240px; margin: 10px 0; }
.flex-location-form .geo-map { margin-bottom: 0; }
.flex-map-crosshair { position: absolute; z-index: 500; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--brand-dark); font-size: 30px; font-weight: 700; line-height: 1; text-shadow: 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; }
.flex-map-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 0; }
.flex-finalize-location { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.flex-reopen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
[data-flex-pick-status].is-error { color: #b91c1c; font-weight: 600; }

.event-flex-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}
.event-date-flex, .event-route-flex { margin-top: 2px; }

.event-card-flex { font-size: 12px; }
.event-card-flex.is-final { color: #15803d; font-weight: 600; }
.event-card-flex-together { font-size: 12px; color: var(--brand-dark); font-weight: 600; }

@media (max-width: 640px) {
  .flex-slot-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
  .flex-approve { margin-left: 0; }
  .flex-tally-row { flex-direction: column; align-items: stretch; }
  .flex-tally-row .flex-approve .btn { width: 100%; }
  .flexible-organizer .btn-block, .flex-finalize-location .btn { width: 100%; }
}

/* Flexible plans PRO: alternatives list in the organizer time recommendation. */
.flex-alternatives {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.flex-alternative {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
}
.flex-alternative-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.flex-alternative-count { color: var(--muted); }

/* Regional partner dashboard */
.partner-dashboard { padding-top: 28px; padding-bottom: 52px; }
.partner-dashboard h1 { margin-bottom: 6px; }
.partner-box, .partner-lock { margin: 18px 0; padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.partner-box h2 { margin: 0 0 14px; font-size: 19px; }
.partner-lock { background: #fef3c7; color: #92400e; }
.partner-territories { display: flex; flex-wrap: wrap; gap: 10px; }
.partner-territory { display: grid; gap: 5px; min-width: 210px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.partner-territory span, .partner-kpi small { color: var(--muted); font-size: 13px; }
.partner-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 18px 0; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.partner-filters label { display: grid; gap: 5px; min-width: 170px; font-size: 13px; }
.partner-filters input, .partner-filters select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); }
.partner-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.partner-kpi { display: grid; gap: 8px; min-width: 0; padding: 17px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.partner-kpi span { color: var(--muted); font-size: 13px; }
.partner-kpi strong { font-size: 27px; font-variant-numeric: tabular-nums; }
.partner-kpi small { line-height: 1.35; }
.partner-months { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 10px; }
.partner-months div { display: grid; gap: 6px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13px; }
.partner-table-wrap { max-width: 100%; overflow-x: auto; }
.partner-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.partner-table th, .partner-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.partner-table th { color: var(--muted); white-space: nowrap; }
.partner-table td small { display: block; color: var(--muted); margin-top: 4px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 16px; }
.admin-form-grid label { display: grid; gap: 5px; }
.admin-form-grid input, .admin-form-grid select, .admin-form-grid textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); }
.admin-form-grid textarea { min-height: 80px; }
.admin-form-wide { grid-column: 1 / -1; }
@media(max-width:767px) { .partner-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } .partner-box,.partner-lock { padding: 15px; } .admin-form-grid { grid-template-columns: 1fr; } .admin-form-wide { grid-column: auto; } }
@media(max-width:380px) { .partner-kpis { grid-template-columns: 1fr; } }

/* SOBIRA Places directory, profile, opening schedule, and admin forms. */
.places-search { display:grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) auto; align-items:end; gap:10px; margin:0 0 18px; }
.places-search label { display:grid; gap:5px; }
.places-search input,.venue-admin-form input,.venue-admin-form select,.venue-admin-form textarea,.venue-exception-form input { width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--card); color:var(--text); }
.places-search select { width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--card); color:var(--text); }
.unified-discovery { display:grid; gap:22px; }
.unified-discovery-form { grid-template-columns: minmax(0,1fr) auto; }
.unified-discovery-form .discovery-query { min-width:0; }
.discovery-filter-panel { grid-column:1/-1; min-width:0; }
.discovery-filter-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.discovery-filter-panel summary { margin-bottom:10px; }
.unified-discovery-form .checkbox-field { display:flex; align-items:center; gap:8px; min-height:42px; }
.unified-discovery-form .checkbox-field input { width:auto; min-height:0; }
.discovery-scopes { display:flex; flex-wrap:wrap; gap:8px; }
.discovery-results { min-width:0; }
.discovery-results .section-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.discovery-results .place-card h3 { margin:0; overflow-wrap:anywhere; }
.discovery-results .place-card h3 a { color:inherit; text-decoration:none; }
.discovery-mixed-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.discovery-item { min-width:0; display:flex; flex-direction:column; gap:8px; }
.discovery-item > :is(.event-card,.place-card) { flex:1; }
.discovery-kind { width:fit-content; padding:4px 10px; border-radius:999px; background:var(--brand-soft); color:var(--brand-dark); font-size:13px; font-weight:700; }
.discovery-kind--offers { background:#fff2dd; color:#80550c; }
.discovery-more { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
#catalog { scroll-margin-top:calc(var(--header-h) + 16px); }
@media (max-width:1023px) { .discovery-mixed-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:767px) {
  .discovery-mixed-grid,.discovery-filter-fields { grid-template-columns:1fr; }
  .unified-discovery-form { grid-template-columns:minmax(0,1fr) auto; }
  .unified-discovery-form .discovery-submit { padding-inline:14px; }
}
.discover-empty { color:var(--muted); padding:12px 0; }
.place-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:14px; }
.place-card { min-width:0; display:grid; align-content:start; gap:9px; padding:17px; border:1px solid var(--border); border-radius:var(--radius); background:var(--card); }
.place-card-cover { position:relative; display:block; height:170px; margin:-17px -17px 4px; }
.place-card-cover > img:first-child { width:100%; height:100%; object-fit:cover; border-radius:var(--radius) var(--radius) 0 0; }
.place-card-logo { position:absolute; left:12px; bottom:-16px; width:54px; height:54px; object-fit:contain; padding:4px; border:1px solid var(--border); border-radius:50%; background:#fff; }
.place-card-cover + h2 { margin-top:12px; }
.place-card-logo-only { width:60px; height:60px; object-fit:contain; border:1px solid var(--border); border-radius:50%; background:#fff; }
.place-card h2,.place-card p { margin:0; overflow-wrap:anywhere; }
.place-card h2 { font-size:19px; }
.place-card h2 a { color:inherit; text-decoration:none; }
.place-card-city,.place-card-operator,.place-hours-note { color:var(--muted); font-size:13px; }
.place-card-description { line-height:1.5; }
.place-profile { max-width:1080px; }
.place-back { display:inline-block; margin-bottom:12px; }
.place-profile-header { margin:8px 0 20px; }
.place-profile-header h1 { margin:4px 0 8px; }
.place-open-status { display:inline-flex; padding:5px 10px; border-radius:999px; font-size:13px; }
.place-open-status.is-open { color:#17643f; background:#e5f5eb; }
.place-open-status.is-closed { color:var(--muted); background:var(--bg); }
.place-profile-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(270px,.8fr); gap:28px; align-items:start; }
.place-profile-main,.place-hours { min-width:0; }
.place-profile-main h2,.place-hours h2 { margin:20px 0 10px; }
.place-profile-main address { font-style:normal; }
.place-map-link { margin-top:10px; }
.place-description { max-width:780px; margin:18px 0; line-height:1.65; overflow-wrap:anywhere; }
.place-hours { padding:16px; border:1px solid var(--border); border-radius:var(--radius); background:var(--card); }
.place-hours h2 { margin-top:0; }
.place-hours dl { margin:0; }
.place-hours-day { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:9px 0; border-top:1px solid var(--border); }
.place-hours-day dt { font-weight:600; }
.place-hours-day dd { margin:0; text-align:right; }
.place-hours-day dd small { display:block; max-width:210px; color:var(--muted); }
.place-exception-tag { display:block; color:var(--muted); font-size:11px; font-weight:400; }
.venue-admin-form { display:grid; gap:16px; }
.venue-location-field { display:grid; gap:6px; }
.venue-field-label { font-weight:600; }
.venue-editor-map { position:relative; height:360px; min-height:280px; overflow:hidden; border:1px solid var(--border); border-radius:var(--radius); background:#e7eceb; }
.venue-editor-map .sobira-map-stage { position:absolute; inset:0; }
.venue-submission-page { max-width: 960px; }
.venue-submission-form { display:grid; gap:18px; }
.venue-submission-form fieldset { display:flex; flex-wrap:wrap; gap:16px; border:1px solid var(--border); border-radius:var(--radius); padding:14px; }
.venue-submission-form fieldset label { display:flex; align-items:center; gap:6px; }
.venue-submission-form > label,.venue-submission-grid > label { display:grid; gap:7px; }
.venue-submission-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.venue-submission-wide { grid-column:1/-1; }
.venue-submission-search { position:relative; }
.venue-submission-search > label { display:grid; gap:7px; }
.venue-submission-search [data-venue-search-results] { display:grid; gap:6px; margin-top:8px; }
.submission-place-result { display:block; border:1px solid var(--border); border-radius:12px; padding:10px 14px; background:#fff; }
.submission-details { display:grid; grid-template-columns:minmax(140px,220px) 1fr; gap:6px 16px; }
.submission-details dt { color:var(--muted); }
@media(max-width:640px) { .venue-submission-grid { grid-template-columns:1fr; } .venue-submission-wide { grid-column:auto; } .submission-details { grid-template-columns:1fr; } }
.venue-admin-form small,.venue-admin-form .field-hint { color:var(--muted); }
.venue-logo-preview { width:88px; height:88px; object-fit:contain; border:1px solid var(--border); border-radius:var(--radius-sm); background:#fff; }
.venue-cover-preview { display:block; width:min(100%,520px); max-height:220px; object-fit:cover; border-radius:var(--radius-sm); }
.venue-image-previews,.place-photo-gallery { display:flex; flex-wrap:wrap; gap:10px; }
.venue-submission-media { display:grid; gap:12px; margin:18px 0; }
.venue-submission-media > div { display:grid; gap:8px; }
.venue-image-previews img { width:112px; height:84px; object-fit:cover; border-radius:var(--radius-sm); }
.place-profile-cover { display:block; width:100%; max-height:420px; object-fit:cover; border-radius:var(--radius); margin:16px 0; }
.place-profile-header { display:flex; align-items:center; gap:16px; }
.place-profile-logo { width:80px; height:80px; object-fit:contain; background:#fff; border:1px solid var(--border); border-radius:50%; }
.place-photo-gallery { margin-top:22px; }
.place-photo-gallery img { width:clamp(140px,24%,260px); height:180px; object-fit:cover; border-radius:var(--radius-sm); }
.venue-hours-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; max-width:1400px; margin:16px 0 20px; }
.venue-hours-tool { display:grid; align-content:start; gap:10px; min-width:0; padding:14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--card); }
.venue-hours-tool-controls { display:flex; flex-wrap:wrap; align-items:end; gap:10px; }
.venue-hours-tool-controls > label:not(.next-day-check) { display:grid; gap:5px; min-width:130px; }
.venue-hours-tool-controls input[type=time],.venue-hours-tool-controls select { min-height:40px; }
.venue-hours-tool-controls .next-day-check { align-self:end; min-height:40px; }
.venue-hours-tool small { color:var(--muted); }
.venue-hours-feedback { grid-column:1/-1; margin:0; color:var(--brand); font-size:13px; }
.venue-hours-feedback:empty { display:none; }
.venue-hours-feedback.is-error { color:var(--danger,#b42318); }
.venue-hours-editor { display:grid; gap:7px; max-width:1400px; }
.venue-hours-head,.venue-hours-row { display:grid; grid-template-columns:minmax(100px,.55fr) repeat(4,minmax(185px,1fr)); gap:8px; align-items:center; }
.venue-hours-head { color:var(--muted); font-size:12px; }
.venue-hours-row { padding:9px 0; border-top:1px solid var(--border); }
.venue-hours-fields { display:grid; grid-template-columns:minmax(70px,1fr) auto minmax(70px,1fr); gap:5px; align-items:center; }
.venue-hours-fields input[type=time] { min-width:0; padding:5px; }
.next-day-check { grid-column:1/-1; display:flex; gap:6px; align-items:center; color:var(--muted); font-size:12px; }
.next-day-check input,.venue-exception-form .checkbox-field input { width:18px; min-height:18px; }
.venue-exceptions { margin-top:28px; }
.venue-exception-form { max-width:850px; margin-top:16px; padding:0; }
.activity-occurrences { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:14px; }
.activity-profile .place-profile-header { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.activity-profile .place-profile-header > * { min-width:0; }
@media(max-width:1000px) and (min-width:701px) {
  .venue-hours-head,.venue-hours-row { grid-template-columns:minmax(85px,.45fr) repeat(4,minmax(125px,1fr)); gap:6px; }
}
@media(max-width:700px) {
  .venue-hours-tools { grid-template-columns:1fr; }
  .places-search { grid-template-columns:1fr; }
  .discovery-scopes .chip { flex:1 1 auto; text-align:center; }
  .place-profile-grid { grid-template-columns:1fr; gap:14px; }
  .venue-hours-head { display:none; }
  .venue-hours-row { grid-template-columns:1fr; gap:5px; }
  .venue-hours-fields { max-width:380px; }
  .place-hours-day { grid-template-columns:1fr; gap:3px; }
  .place-hours-day dd { text-align:left; }
  .activity-profile .place-profile-header { align-items:flex-start; flex-direction:column; }
  .activity-profile .place-profile-header .btn { width:100%; text-align:center; }
}

/* External organizer directory and admin form surfaces. */
.organizer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 14px; }
.event-parties { display:grid; margin:14px 0 18px; border:1px solid var(--border); border-radius:var(--radius); background:var(--card); overflow:hidden; }
.event-party { display:flex; align-items:center; gap:12px; min-width:0; padding:12px; color:var(--text); text-decoration:none; }
.event-party-entry + .event-party-entry { border-top:1px solid var(--border); }
.event-party-contacts { padding:0 12px 12px 80px; font-size:13px; }
a.event-party:hover { background:var(--brand-soft); }
a.event-party:focus-visible { outline:2px solid var(--brand); outline-offset:-3px; }
.event-party-identity { display:grid; gap:3px; min-width:0; flex:1; overflow-wrap:anywhere; }
.event-party-name { font-weight:700; }
.event-party-role,.event-party-details { color:var(--muted); font-size:13px; }
.event-party-arrow { flex:none; font-size:24px; color:var(--brand-dark); }
.event-party .organizer-avatar { border-radius:var(--radius-sm); }
.organizer-card { min-width: 0; display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.organizer-card-main,.event-external-organizer-main { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.organizer-card-identity,.event-external-organizer-main > span:last-child { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.organizer-card-identity span,.event-external-organizer-main small,.organizer-status,.organizer-count,.event-published-by { color: var(--muted); font-size: 13px; }
.organizer-avatar { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.organizer-avatar-fallback { display: inline-grid; place-items: center; font-weight: 700; color: var(--muted); }
.organizer-links { display: flex; flex-wrap: wrap; gap: 8px 14px; min-width: 0; overflow-wrap: anywhere; }
.organizer-links a { max-width: 100%; overflow-wrap: anywhere; }
.organizer-profile-header { display: flex; align-items: center; gap: 18px; margin: 18px 0; }
.organizer-profile-avatar { width: 104px; height: 104px; flex: 0 0 104px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.organizer-description { max-width: 780px; margin: 20px 0; line-height: 1.65; overflow-wrap: anywhere; }
.organizer-events { margin: 24px 0; }
.organizer-back { display: inline-block; margin-bottom: 12px; }
.event-external-organizer { display: grid; gap: 8px; max-width: 420px; margin: 12px 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.event-external-organizer h2 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.external-organizer-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.external-organizer-picker .field { flex: 1 1 280px; margin: 0; }
.event-organizer-venue { display: grid; gap: 18px; min-width:0; }
.event-organizer-venue .external-organizer-picker,.event-organizer-venue .external-organizer-picker .field { min-width:0; }
.event-organizer-venue select { width:100%; max-width:100%; min-width:0; }
.event-organizer-venue .external-organizer-picker { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.event-venue-picker { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; min-width: 0; }
.event-venue-picker .field { min-width: 0; margin: 0; }
.event-venue-picker .field-hint { grid-column: 1 / -1; margin: 0; }
@media(max-width:600px) {
  .event-venue-picker { grid-template-columns: minmax(0,1fr); }
  .event-venue-picker > .btn { width: 100%; }
}
.organizer-quick-dialog { width: min(560px,calc(100vw - 24px)); max-width: none; max-height: min(90dvh,850px); padding: 22px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); }
.organizer-quick-dialog::backdrop { background: rgb(0 0 0 / .58); }
.organizer-quick-dialog form { display: grid; gap: 12px; }
.organizer-quick-dialog h2 { margin: 0 0 4px; }
.organizer-quick-error { color: var(--danger,#b42318); overflow-wrap: anywhere; }
.organizer-edit-form { display: grid; gap: 12px; padding: 14px 0; }
.organizer-edit-details { min-width: 0; grid-column: 1 / -1; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.organizer-editor { margin: 0 0 18px; }
.organizer-editor > summary { display: inline-flex; cursor: pointer; list-style: none; }
.organizer-editor > summary::-webkit-details-marker { display: none; }
.organizer-visibility-form { margin-top: 8px; }
@media(max-width:600px) {
  .organizer-profile-header { align-items: flex-start; gap: 12px; }
  .organizer-profile-avatar { width: 76px; height: 76px; flex-basis: 76px; }
  .organizer-card { padding: 13px; }
  .organizer-quick-dialog { padding: 16px; }
  .external-organizer-picker > button { width: 100%; }
}

.visit-intent-box { margin: 22px 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.visit-intent-box h2 { margin-top: 0; }
.visit-intent-box > p,.visit-contact-requests > p { color: var(--muted); }
.visit-intent-form { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; max-width: 560px; }
.visit-intent-form .field,.visit-intents-page .field { min-width: 0; }
.visit-intent-form select,.visit-intents-page select { width: 100%; min-width: 0; max-width: 100%; }
.visit-intent-time { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.visit-intent-form input[type="date"],.visit-intent-form input[type="time"] { width: 100%; min-height: 42px; }
.visit-match-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.visit-match-list li { display: grid; justify-items: start; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.visit-match-list small { color: var(--muted); }
.visit-contact-requests { margin-top: 24px; }
@media(max-width:600px) { .visit-intent-time { grid-template-columns: 1fr; } .visit-intent-box { padding: 14px; } }

/* The two crops share one focal point; the stored image stays uncropped. */
.cover-framing { display:grid; gap:10px; margin-top:12px; }
.cover-framing-previews { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cover-framing-previews > div { min-width:0; font-size:13px; color:var(--muted); }
.cover-frame { margin-top:6px; overflow:hidden; border-radius:var(--radius-sm); background:var(--brand-soft); cursor:crosshair; }
.cover-frame-desktop { aspect-ratio:16 / 9; }
.cover-frame-mobile { aspect-ratio:4 / 3; }
.cover-frame img { display:block; width:100%; height:100%; object-fit:cover; }
.cover-frame img[hidden] { display:none; }
.cover-framing input[type=range] { width:100%; min-height:44px; }
/* Participation controls fit the existing narrow form column. */
.social-participation-settings { min-inline-size: 0; }
.social-participation-settings .field, .event-going-form .field { min-width: 0; }
.social-participation-settings select, .event-going-form select { min-width: 0; max-width: 100%; width: 100%; }
#going-plan .plan-going { flex-wrap: wrap; }
#going-plan .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* Independent intention and registration actions. */
.participation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.event-going-form { margin-bottom: 1rem; min-width: 0; }
.participation-actions .booking-entry { margin: 0; }
.booking-form-panel > summary { cursor: pointer; font-weight: 600; padding: 1rem; }
.booking-form-panel .event-apply-inner { position: static; }
