/* Zdrasti! live stylesheet (docs/15_DESIGN.md). Bamya's own language (crm-modern.css): white page,
   hairlines, one dark ink for buttons, mint and violet as signals, the dotted panels.
   Rebuilt 2026-11-20 (owner: "very suttle filter navigation on top and very modern looking
   design"). No inline styles anywhere (the CSP forbids them): everything is here. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-extrabold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #ffffff; --text: #15171a; --ink: #17191c; --ink-2: #383d44; --nav: #272b30;
  --dim: #5b6470; --faint: #6b7480;
  --line: #e7e9ec; --line-card: #e4e7ea; --line-strong: #d3d7dc; --line-hover: #aeb4bb; --dash: #b4bbc2;
  --tint: #fafbfb; --dot: #dfe3e7;
  --mint: #38d9be; --mint-text: #0b8573; --mint-deep: #075e51; --mint-tint: #e6faf5; --mint-line: #9fe6d6;
  --violet: #a78bfa; --violet-text: #5636c7; --violet-tint: #f0ebff; --violet-line: #cfc2fb;
  --stage: #f4fdfb; --dark: #0c0e10; --dark-text: #f3f5f6; --dark-dim: #9aa5ab;
  --warn: #8a5300; --warn-tint: #fff6e8; --warn-line: #f3d9a8;
  --grad: linear-gradient(135deg, #a78bfa, #38d9be);
  --shadow-card: 0 1px 1px rgba(16,24,40,.03), 0 14px 34px -16px rgba(16,24,40,.18);
  --shadow-hover: 0 18px 38px -20px rgba(16,24,40,.32);
  --shadow-pop: 0 24px 48px -12px rgba(16,24,40,.22), 0 2px 6px rgba(16,24,40,.06);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--mint-text); text-underline-offset: 2px; }
a:hover { color: var(--mint-deep); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
p { margin: 0; }
img, svg { max-width: 100%; }
img { height: auto; }
.icon { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
.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; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 9px; background: var(--ink); color: #fff; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.inline { display: inline; }
.dot-sep { color: var(--line-hover); margin: 0 4px; }
/* The darker teal for small words: 4.5:1 and more on the mint and light panels too (visual review
   2026-11-22, v1-10: the brand teal was 4.39:1 there); the lighter teal stays for icons and edges. */
.eyebrow { font-size: 13.5px; font-weight: 600; color: var(--mint-deep); letter-spacing: .01em; }
.lede { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--dim); max-width: 640px; }
.display { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; font-weight: 600; letter-spacing: -.035em; }
.h-section { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.03em; }

/* ------------------------------------------------------------------ buttons */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  font: 500 14.5px/1 var(--font); letter-spacing: -.005em; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s; }
.btn:hover, button:hover { border-color: var(--line-hover); background: var(--tint); color: var(--text); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-dark, button.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(16,24,40,.28); }
.btn-dark:hover, button.btn-dark:hover { background: #000; border-color: #000; color: #fff; }
.btn-line { background: #fff; }
.btn-white { background: #fff; border-color: #fff; color: var(--ink); }
.btn-white:hover { background: var(--mint-tint); border-color: var(--mint-tint); color: var(--ink); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--mint-deep); }
.btn-ghost:hover { background: var(--mint-tint); border-color: transparent; color: var(--mint-deep); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); transition: border-color .15s, background .15s; }
.icon-btn:hover { border-color: var(--line-hover); background: var(--tint); color: var(--text); }

/* ------------------------------------------------------------------ header and footer */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: .476em; color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 21px; letter-spacing: -.045em; }
.wordmark:hover { color: var(--text); }
.wordmark-sm { font-size: 17px; }
/* The name's two words (templates/_brand.html): "Zdrasti!" in the wordmark's weight, then a lighter
   "live" in mint, the dot's colour. Sizes in em, so the big logo scales onto the small one. */
.wordmark-words { white-space: nowrap; }
.wordmark-live { font-weight: 500; letter-spacing: -.03em; color: var(--mint-text); }
.pulse { display: inline-block; flex: none; width: .43em; height: .43em; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 .143em rgba(56,217,190,.22); }
.header-nav { display: flex; align-items: center; gap: 6px 20px; }
.nav-link { color: var(--nav); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.nav-link:hover { color: var(--text); text-decoration: underline; }
.nav-button { min-height: 0; padding: 0; border: 0; background: none; }
.nav-button:hover { background: none; }
.nav-qr { gap: 7px; }
.nav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--ink-2); background: #fff; }
.nav-avatar:hover { border-color: var(--line-hover); color: var(--text); background: var(--tint); }
.nav-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 8px;
  border-radius: 999px; background: var(--tint); border: 1px solid var(--line); color: var(--dim); font-size: 12px; font-weight: 600; text-decoration: none; }
.nav-lang:hover { color: var(--text); border-color: var(--line-strong); }
.site-footer { margin-top: 0; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 26px; padding-bottom: 34px; }
.footer-line { font-size: 14px; color: var(--dim); }
.footer-line a { color: var(--dim); }
.footer-bamya { width: 100%; font-size: 13px; color: var(--faint); }
/* The footer's links as their own row (UX review 2026-11-21: inline in the tagline they were tiny
   targets on a phone); each is 44 px tall there (the phone sizes below). */
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); font-weight: 500; }
.footer-links a:hover { color: var(--text); }

/* ------------------------------------------------------------------ filter bar */
.filterbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.filterbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; min-height: 58px; padding-top: 11px; padding-bottom: 11px; }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); font-size: 13.5px; font-weight: 500;
  cursor: pointer; user-select: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.pill:hover { border-color: var(--line-hover); }
.pop[open] > .pill { border-color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
/* No filter set yet: the pills pulse one by one, left to right, then rest, and again (owner,
   2026-11-21: "the filters should pulsate one by one in direction from left to right until at
   least 1 is set"). Stops for an open pill; off with reduced motion (the global rule). */
.pills.is-unset .pill { animation: pill-wave 4.8s ease-out infinite; }
.pills.is-unset > :nth-child(2) > .pill, .pills.is-unset > .pill:nth-child(2) { animation-delay: .35s; }
.pills.is-unset > :nth-child(3) > .pill, .pills.is-unset > .pill:nth-child(3) { animation-delay: .7s; }
.pills.is-unset > :nth-child(4) > .pill, .pills.is-unset > .pill:nth-child(4) { animation-delay: 1.05s; }
.pills.is-unset > :nth-child(5) > .pill, .pills.is-unset > .pill:nth-child(5) { animation-delay: 1.4s; }
.pills.is-unset > :nth-child(6) > .pill, .pills.is-unset > .pill:nth-child(6) { animation-delay: 1.75s; }
.pills.is-unset > :nth-child(7) > .pill, .pills.is-unset > .pill:nth-child(7) { animation-delay: 2.1s; }
.pills.is-unset > :nth-child(8) > .pill, .pills.is-unset > .pill:nth-child(8) { animation-delay: 2.45s; }
.pills.is-unset .pop[open] > .pill, .pills.is-unset:has(.pop[open]) .pill { animation: none; }
@keyframes pill-wave {
  0%, 12%, 100% { box-shadow: 0 0 0 0 rgba(56,217,190,0); border-color: var(--line-strong); transform: scale(1); }
  4% { box-shadow: 0 0 0 4px rgba(56,217,190,.4); border-color: var(--mint-text); transform: scale(1.05); }
}
.pill-label { color: inherit; }
.pill.is-active .pill-label { color: rgba(255,255,255,.7); }
/* A chosen value's name: the contacts page's event pill (the list's pills show a count). */
.pill-value { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pill-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--mint); color: var(--ink); font-size: 11.5px; font-weight: 700; }
.pill-caret { opacity: .55; transition: transform .15s; }
.pop[open] .pill-caret { transform: rotate(180deg); }
.pill-clear { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px; color: var(--dim);
  font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.pill-clear:hover { color: var(--text); }
.pop-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: max-content; min-width: 260px; max-width: 440px;
  padding: 14px; background: #fff; border: 1px solid var(--line-card); border-radius: 16px; box-shadow: var(--shadow-pop); }
.pop-title { margin: 2px 2px 10px; font-size: 12.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip-cloud .chip-filter { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background .15s, border-color .15s; }
.chip-cloud .chip-filter:hover { border-color: var(--line-hover); background: var(--tint); color: var(--text); }
.chip-cloud .chip-filter.is-chosen { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-cloud .chip-filter.is-chosen .icon { color: var(--mint); }
.chip-clear { display: inline-block; margin: 12px 2px 0; font-size: 13px; font-weight: 500; color: var(--dim); }
.mini-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.mini-field select, .mini-field input { height: 38px; padding: 0 10px; font-size: 15px; }
.filterbar-end { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.search-box { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: #fff; color: var(--faint); transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--mint-text); box-shadow: 0 0 0 3px rgba(56,217,190,.22); }
.search-box input { width: 150px; height: 34px; padding: 0; border: 0; background: transparent; font: 400 14px var(--font); color: var(--text); outline: none; transition: width .2s; }
/* One focus ring, the box's (UX review 2026-11-21: the input drew its own halo inside it). */
.search-box input:focus, .search-box input:focus-visible { box-shadow: none; outline: none; }
.search-box input::placeholder { color: var(--faint); opacity: 1; }
.search-box input:focus { width: 210px; }
.search-box input::-webkit-search-cancel-button { display: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--tint); border: 1px solid var(--line); }
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  color: var(--dim); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.seg a:hover { color: var(--text); }
.seg a[aria-current] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 0 0 1px var(--line); }
/* Not used yet: a soft mint ring breathes around it, slower than the pills' wave (owner,
   2026-11-23: "make the toggle pulsate gently until they use it at least once"); `data-new` goes at
   the first press (public.js, the `switch` cookie). Off with reduced motion (the global rule). */
.seg[data-new] { animation: seg-breathe 3.2s ease-in-out infinite; }
@keyframes seg-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,217,190,0); border-color: var(--line); }
  50% { box-shadow: 0 0 0 5px rgba(56,217,190,.26); border-color: var(--mint-line); }
}
/* Icons only (owner, 2026-11-20: "make the view just icons"); the words stay as the tooltip and
   for screen readers (display: none would leave the links with no name at all). */
.seg a { justify-content: center; width: 38px; padding: 0; }
.seg span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* While the list loads in place (public.js), the old results fade a little. */
.listing { transition: opacity .15s; }
.listing.is-loading { opacity: .5; }

/* ------------------------------------------------------------------ calendar head */
.calendar { padding-top: 34px; padding-bottom: 72px; }
.cal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cal-title { display: flex; flex-direction: column; gap: 6px; }
.h-week { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; letter-spacing: -.032em; }
.cal-sub { font-size: 15px; color: var(--dim); }
.week-nav { display: flex; align-items: center; gap: 8px; }

/* The list's line when it holds no more (`.tl-empty`, public/_listing.html). */
.tl-empty { font-size: 14px; color: var(--faint); }

/* ------------------------------------------------------------------ event cards */
.rows { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ev-card { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding: 16px 16px 16px 20px; background: #fff; border: 1px solid var(--line-card); border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s, transform .18s; }
.ev-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.ev-when { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.ev-time { font-size: 20px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
/* "2,5 часа" stays on one line, like "3 часа" (visual review 2026-11-22, v1-28). */
.ev-len { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.ev-date { display: flex; flex-direction: column; margin-bottom: 6px; }
.ev-wd { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.ev-dn { font-size: 26px; line-height: 1.05; font-weight: 600; letter-spacing: -.03em; }
.ev-mo { font-size: 12.5px; color: var(--dim); }
.ev-date + .ev-time { font-size: 14px; color: var(--ink-2); }
.ev-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ev-title { font-size: 17.5px; line-height: 1.3; font-weight: 600; letter-spacing: -.014em; }
.ev-title a { color: var(--text); text-decoration: none; }
.ev-title a:hover { color: var(--text); }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13.5px; color: var(--dim); }
.ev-org, .ev-place { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ev-place .icon { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ev-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 3px; }
.ev-side { display: flex; align-items: flex-start; }
.ev-thumb { display: block; width: 168px; aspect-ratio: 1200 / 627; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--tint); }
.ev-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--grad); border: 0; color: #fff;
  font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ev-card.is-cancelled { background: var(--tint); }
.ev-card.is-cancelled .ev-title a { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--dim); }
.ev-card.is-cancelled .ev-thumb { filter: grayscale(1); opacity: .55; }

/* ------------------------------------------------------------------ chips and avatars */
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid;
  font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; max-width: 100%; min-width: 0; }
/* A long chip (a price like "Standard 50 EUR, Duo 100 EUR, ...") ends in "..." instead of
   widening the page: on a phone it made the whole page 518 px wide (found 2026-11-20). */
.chips > .chip { display: inline-block; line-height: 22px; overflow: hidden; text-overflow: ellipsis; }
.chips { min-width: 0; max-width: 100%; }
.chip-tag { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
a.chip-tag:hover { border-color: var(--line-hover); color: var(--text); }
.chip-violet { background: var(--violet-tint); border-color: var(--violet-line); color: var(--violet-text); }
.chip-mint { background: var(--mint-tint); border-color: var(--mint-line); color: var(--mint-deep); }
.chip-price { background: var(--tint); border-color: var(--line); color: var(--text); }
.chip-warn { background: var(--warn-tint); border-color: var(--warn-line); color: var(--warn); }
/* "Само с покана" on the card and in the window (main's default, 2026-11-23, review 2026-11-22b r2-8):
   ink, apart from the tag's white and the status's amber, so it is read before the trip. */
.chip-invite { background: var(--ink); border-color: var(--ink); color: #fff; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover; }
.avatar-initials { background: var(--grad); color: #fff; font-weight: 600; }
.avatar-20 { width: 20px; height: 20px; font-size: 9px; }
.avatar-26 { width: 26px; height: 26px; font-size: 10px; }
.avatar-40 { width: 40px; height: 40px; font-size: 14px; }
.avatar-88 { width: 88px; height: 88px; font-size: 28px; }

/* ------------------------------------------------------------------ list view, past, empty */
.upcoming .group { margin-top: 30px; }
.group-title { margin: 0 0 12px; font-size: 20px; letter-spacing: -.02em; }
.past .rows { margin-top: 24px; }
.pages { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.empty { margin-top: 18px; padding: 30px 26px; border: 1px dashed var(--dash); border-radius: var(--radius); background: #fff;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.empty-line { font-size: 17px; }
.empty-hint { color: var(--dim); font-size: 14.5px; margin-bottom: 8px; }

/* ------------------------------------------------------------------ marquee, how, organisers band */
.marquee { overflow: hidden; padding: 30px 0; color: #fff;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px),
    radial-gradient(820px 340px at 30% 112%, rgba(56,217,190,.3), transparent 70%),
    radial-gradient(820px 340px at 72% 112%, rgba(167,139,250,.28), transparent 70%), var(--dark); }
.marquee-track { display: flex; width: max-content; }
.marquee ul { display: flex; align-items: center; gap: 30px; margin: 0; padding: 0 30px 0 0; list-style: none; }
.marquee li { display: inline-flex; align-items: center; gap: 30px; font-size: clamp(24px, 3vw, 40px); font-weight: 600; letter-spacing: -.035em; white-space: nowrap; }
.marquee li::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.marquee li:nth-child(2n)::after { background: var(--violet); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 60s linear infinite; }
  @keyframes marquee { to { transform: translateX(-50%); } }
}
.how { padding-top: 84px; padding-bottom: 84px; display: flex; flex-direction: column; gap: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line-card); border-radius: var(--radius);
  background-color: var(--tint); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.step p { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
/* Ink on the gradient (UX review 2026-11-21, contrast: white on it was 1.8:1; ink is 6.5:1 and more). */
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: var(--ink); font-weight: 700; }
.organisers-band { color: #fff;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px),
    radial-gradient(820px 340px at 32% 112%, rgba(56,217,190,.3), transparent 70%),
    radial-gradient(820px 340px at 70% 112%, rgba(167,139,250,.28), transparent 70%), var(--dark); }
.band-inner { padding-top: 84px; padding-bottom: 84px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.organisers-band .lede { color: var(--dark-dim); }

/* ------------------------------------------------------------------ the modal */
dialog { color: var(--text); }
/* Rounded on every corner (owner, 2026-11-20: "I want the other side also to be with rounded
   corners"): the window clips and its inside (`.modal-body`) scrolls, so a computer's scrollbar
   sits inside the curve instead of squaring off the right side. */
.modal { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: 22px;
  background: #fff; box-shadow: 0 40px 90px -30px rgba(12,14,16,.5); overflow: hidden; }
.modal[open] { display: flex; flex-direction: column; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: #fff; overflow-anchor: none; }
/* No scroll anchoring inside (review 2026-11-22, r5-16): a whole picture that arrives late (the hero
   holds 1200 x 627 until it knows its shape) would have Chrome jump the scroll by the picture's growth
   to keep the words in place, so a poster first showed 93 % faded; now the picture shows whole, from
   where the reader is. The page behind an open window does not scroll (r5-12: a wheel over the
   backdrop scrolled the list, squeezed the masthead and popped premium cards unseen), by wheel, keys
   or finger; the scroll bar's room is kept, so nothing behind shifts (measured: the list, the fixed
   masthead, its logo and menu stay where they were). Only for a window the script opened (`:modal`):
   without JavaScript the open dialog is part of the page. The login modal too (review 2026-11-22b
   r1-3, F1's handoff: the page behind it scrolled). */
html:has(dialog.modal:modal), html:has(dialog.login-modal:modal) { overflow: hidden; scrollbar-gutter: stable; }
/* The scroll bar's moving part: solid white inside a black edge, so it is easy to see and find on
   any background, the event's picture included (owner, 2026-11-21: "make thin black border on the
   vertical scroll moving part to be sure it's visible on all kind of backgrounds. and make it a
   solid color", "solid grey please. not solid green", then "make it solid white inside", and on
   2026-11-22 "be grey, not black": the edge is now grey). Chrome,
   Edge and Safari draw it from these (a `scrollbar-color` would override
   them there, so it is given only where these are not known); Firefox draws no edge, so there it is
   grey (white alone would vanish on the white words). */
.modal-body::-webkit-scrollbar { width: 12px; }
/* The track starts and ends clear of the window's 22 px corners, so the moving part is never cut by
   the curve (owner, 2026-11-21: "the scroll now start a bit cut because of the rounded corner"). */
.modal-body::-webkit-scrollbar-track { margin: 20px 0; background: transparent; }
.modal-body::-webkit-scrollbar-thumb { min-height: 40px; border: 2px solid #9aa1a9; border-radius: 999px; background: #fff; }  /* 2 px edge inside the same 12 px (owner, 2026-11-21: "thicker black border ... the black should go inwards"); grey, Firefox's grey (owner, 2026-11-22: "be grey, not black") */
.modal-body::-webkit-scrollbar-thumb:hover { background: #e9ecef; }
@supports not selector(::-webkit-scrollbar) {
  .modal-body { scrollbar-color: #9aa1a9 transparent; }
}
.modal::backdrop { background: rgba(12,14,16,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-event { position: relative; }
/* The close button's holder: sticky at the top, taking no room (its height is given back under
   it). No white band behind the X (owner, 2026-11-21: "there is a white header when the image is
   scolled up where the X sits - this isn't required"): the X floats on its own white circle. */
.modal-top { position: sticky; top: 0; z-index: 5; height: 72px; margin: 0 0 -72px; pointer-events: none; }
/* Over a picture the X waits until the picture is scrolled past (owner, 2026-11-21: "make the X in
   the modal to appear after they scrolled beyond the image"; public.js puts `is-scrolled` on the
   dialog once the words reach the top). Hidden,
   it is out of the Tab order too; Esc, Back and the Затвори at the end still close. */
.modal:has(.event-picture, .organiser-banner) .modal-top .modal-close { visibility: hidden; opacity: 0;
  transition: opacity .15s, visibility 0s .15s; }
.modal.is-scrolled:has(.event-picture, .organiser-banner) .modal-top .modal-close { visibility: visible; opacity: 1;
  transition: opacity .15s; }
/* The holder as low as the X needs: a phone (the X 10 px under the safe area), a short screen. */
@media (max-width: 640px) {
  .modal-top { height: calc(env(safe-area-inset-top) + 64px); margin-bottom: calc(-1 * (env(safe-area-inset-top) + 64px)); }
}
@media (max-height: 500px) and (min-width: 641px) {
  .modal-top { height: 60px; margin-bottom: -60px; }
  .modal-top .modal-close { top: 8px; right: 10px; }
}
/* A short screen (a phone turned sideways, review 2026-11-22, v2-4) gets the whole screen, as a phone
   does: the computer's centred box left 342 px of room there. `dialog.modal` outweighs the wider
   windows' widths (the kit, my calendar, my QR); the sides keep clear of a notch. */
@media (max-height: 500px) {
  dialog.modal { width: auto; max-height: none; }
  dialog.modal[open] { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0;
    border-radius: 0; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
}
.modal-close { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.94); border: 1px solid var(--line);
  color: var(--text); box-shadow: 0 6px 18px -8px rgba(12,14,16,.45); pointer-events: auto; }
.modal-close:hover { background: #fff; color: var(--text); }
/* The event's picture whole (owner, 2026-11-20: "I want the image always to show the full height
   (not cropped)"): its own shape once loaded, 1200 x 627 until then. A long one scrolls until its
   bottom shows, then stays and fades while the words slide up over it ("to stop and to fade out
   via scroll to give space for the text that continue scrolling up"): sticky, with the `top`
   (the window's height less the picture's, at most 0) set by public.js.
   The fade is a scroll-driven animation (owner: "the transition is somehow choppy and not smooth"):
   the browser runs it with the scroll itself, off the page's script, on the picture's own layer;
   public.js only measures where it starts and ends (--hero-fade-from, --hero-fade-to) and, in a
   browser without scroll-driven animations, sets the opacity itself. */
.modal-hero > img, .event-picture { display: block; width: 100%; height: auto; aspect-ratio: auto 1200 / 627; }
.modal-event .modal-hero { position: sticky; top: 0; z-index: 0; will-change: opacity; }
@supports (animation-timeline: scroll()) {
  .modal-event .modal-hero.is-timed { animation: hero-fade linear both; animation-timeline: scroll(nearest block);
    animation-range: var(--hero-fade-from, 0px) var(--hero-fade-to, 400px); }
}
@keyframes hero-fade { from { opacity: 1; } to { opacity: 0; } }
.modal-event .modal-content { position: relative; z-index: 1; background: #fff; }
/* The picture under the scroll bar (owner, 2026-11-21: "the image to go below the scroll bar ... to
   remove the thin white vertical line"; "only the image, the text below should honor the scroll").
   Where the bar takes room public.js draws the picture on `.modal-under`, a layer of the dialog
   behind the scrolling inside, as wide as the dialog; the inside is clear over it, the picture in
   the page keeps its room unseen, and the words keep their white and their place. The layer rises
   until a long picture's bottom shows, then fades, on the inside's scroll (as the sticky one did). */
.modal-under { position: absolute; top: 0; left: 0; right: 0; z-index: 0; overflow: hidden; pointer-events: none;
  will-change: transform, opacity; }
/* The copy fills the layer exactly (review 2026-11-22, r5-14: `cover` on the wider layer cut 12 px off
   a poster's top and bottom): the layer is the bar's 12 px wider than the picture's room, so the picture
   is drawn 1.6 % wider, never cut. A band (the event's without a picture, the organiser's empty banner;
   v1-3) is cloned and fills it the same way. */
.modal-under > img { display: block; width: 100%; height: 100%; object-fit: fill; }
.modal-under > :not(img) { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; }
/* The inside is clear over both layers. Beside the words the bar's track stays white as before:
   `.modal-skirt`, a white layer from where the words start (`--under-room`, the picture's room, set
   on the dialog by public.js), rises with them. Both layers move by transform only, which the
   browser does on the graphics card (owner, 2026-11-21: the first scroll was choppy when the white
   edge was a very tall background repainted on every frame). */
.modal.has-under .modal-body { position: relative; z-index: 1; background: transparent; }
.modal-skirt { position: absolute; top: var(--under-room, 0px); left: 0; right: 0; z-index: 0; height: 100%;
  background: #fff; pointer-events: none; will-change: transform; }
.modal-event .modal-hero.is-under, .modal-organiser .org-cover.is-under { visibility: hidden; animation: none; will-change: auto; }
@supports (timeline-scope: --a) and (animation-timeline: scroll()) {
  .modal.has-under { timeline-scope: --modal-inside; }
  .modal.has-under .modal-body { scroll-timeline: --modal-inside block; }
  .modal-skirt.is-timed { animation: skirt-rise linear both; animation-timeline: --modal-inside;
    animation-range: 0px var(--under-room, 0px); }
  .modal-under.is-timed { animation: under-rise linear both, hero-fade linear both;
    animation-timeline: --modal-inside, --modal-inside;
    animation-range: 0px var(--hero-fade-from, 0px), var(--hero-fade-from, 0px) var(--hero-fade-to, 400px); }
}
@keyframes skirt-rise { from { transform: translateY(0); } to { transform: translateY(calc(-1 * var(--under-room, 0px))); } }
@keyframes under-rise { from { transform: translateY(0); } to { transform: translateY(calc(-1 * var(--hero-fade-from, 0px))); } }
/* With less motion asked for (review 2026-11-22, r5-3), these still run: they are the picture and the
   white beside the words keeping their place as the person scrolls, nothing that moves by itself
   (without them a tall poster's bottom never showed and a strip of picture ran beside the words).
   They are named here over the page's rule that stops every animation. */
@media (prefers-reduced-motion: reduce) {
  @supports (animation-timeline: scroll()) {
    .modal-event .modal-hero.is-timed:not(.is-under) { animation: hero-fade linear both !important;
      animation-timeline: scroll(nearest block) !important;
      animation-range: var(--hero-fade-from, 0px) var(--hero-fade-to, 400px) !important; }
  }
  @supports (timeline-scope: --a) and (animation-timeline: scroll()) {
    .modal-skirt.is-timed { animation: skirt-rise linear both !important; animation-timeline: --modal-inside !important;
      animation-range: 0px var(--under-room, 0px) !important; }
    .modal-under.is-timed { animation: under-rise linear both, hero-fade linear both !important;
      animation-timeline: --modal-inside, --modal-inside !important;
      animation-range: 0px var(--hero-fade-from, 0px), var(--hero-fade-from, 0px) var(--hero-fade-to, 400px) !important; }
  }
}
/* Without a picture: a light band with the date and the organiser (UX review 2026-11-21: it held the
   title, which the heading under it repeated). */
.stage-band { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 8px; aspect-ratio: 1200 / 500; padding: 28px 30px;
  background: linear-gradient(180deg, #fff 0, rgba(255,255,255,0) 40%), repeating-linear-gradient(90deg, rgba(11,133,115,.08) 0 1px, transparent 1px 6px),
    radial-gradient(520px 260px at 20% 120%, #d9f8f0, rgba(217,248,240,0) 70%), radial-gradient(520px 260px at 82% 120%, #e7e0fd, rgba(231,224,253,0) 70%), var(--stage); }
.stage-when { max-width: calc(100% - 40px); font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -.024em; line-height: 1.15; color: var(--text); }
.stage-org { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.modal-content { padding: 24px 30px 30px; display: flex; flex-direction: column; gap: 16px; }
/* On a computer the words keep clear of the floating X's column (review 2026-11-22, v1-26: scrolled
   down, the X sat on the first line in view): 64 px on the right, the X's 14 + 44 px and a little air.
   Phones keep their 16 px: the X floats over the words there, as the owner chose (no band). */
@media (min-width: 641px) {
  .modal-event .modal-content, .modal-organiser .modal-content, .modal-kit .kit, .modal-mycal .mycal { padding-right: 64px; }
  .modal-kit .kit-head, .modal-mycal .mycal-head { padding-right: 0; }  /* the column's own 64 px keep the X clear */
}
.event-title { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -.028em; }
.event-title.is-cancelled { text-decoration: line-through; text-decoration-color: var(--warn); color: var(--dim); }
.banner { padding: 11px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 500; }
.banner-warn { background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--warn); }
.banner-draft { background: var(--violet-tint); border: 1px solid var(--violet-line); color: var(--violet-text); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 4px 0 0; padding: 18px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--tint); }
.fact dt { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.fact dt .icon { color: var(--mint-text); }
.fact dd { margin: 5px 0 0 26px; font-size: 15px; line-height: 1.45; }
.fact-when { grid-column: 1 / -1; }
.fact-where { grid-column: 1 / -1; }
.fact-length { color: var(--faint); }
.map-link, .join-link { display: inline-flex; margin-left: 6px; font-size: 13.5px; font-weight: 600; }
/* Mint links on a tinted panel are --mint-deep (UX review 2026-11-21, contrast: --mint-text is
   4.39:1 on --tint, --mint-deep 7.4:1): "Карта" in the facts, the sign-in box's links on its page,
   the kit's dotted controls. */
.facts a, .panel a:not([class]), .maker-controls a:not([class]), .maker-controls .btn-ghost, .step a:not([class]) { color: var(--mint-deep); }
.facts a:hover, .panel a:not([class]):hover, .maker-controls a:not([class]):hover { color: var(--text); }
.where-online, .where-tba { display: block; color: var(--dim); }
.organiser-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-card);
  border-radius: 14px; color: var(--text); text-decoration: none; transition: background .15s, border-color .15s; }
.organiser-card:hover { background: var(--tint); border-color: var(--line-strong); color: var(--text); }
.organiser-card-text { display: flex; flex-direction: column; min-width: 0; }
.organiser-card-label { font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.organiser-card-name { font-size: 15.5px; font-weight: 600; }
.organiser-card-arrow { margin-left: auto; color: var(--faint); }
/* The venue page (docs/31_VENUES.md): its card in the event window is the organiser card; in its own
   window the transport runs the facts' whole width and keeps its line breaks as short paragraphs. */
.venue-facts .fact-transport { grid-column: 1 / -1; }
.venue-transport p { margin: 0; }
.venue-transport p + p { margin-top: 6px; }
/* "Добави събитие"'s advice window (templates/public/_add_event.html; docs/19_ORGANISATIONS.md section 14). */
.add-event { padding-top: 8px; }
.add-event-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 16px; background: var(--mint-tint); color: var(--mint-deep); }
.add-event-lead { font-size: 17px; font-weight: 600; color: var(--text); }
.add-event-go { margin-top: 4px; }
.login-for-events { color: var(--mint-deep); font-weight: 600; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.action-kit { width: 100%; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.add-calendar { position: relative; }
.add-calendar > summary { list-style: none; }
.add-calendar > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 10; min-width: 220px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line-card); border-radius: 12px; box-shadow: var(--shadow-pop); }
.menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14.5px; }
.menu a:hover { background: var(--tint); }
.description { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.description p + p { margin-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.modal-end { padding-top: 6px; }

/* Organiser modal and pages that reuse the cards */
.org-banner { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
.org-head { display: flex; align-items: flex-end; gap: 16px; margin-top: -44px; position: relative; }
.org-head .avatar-88 { border: 4px solid #fff; background: #fff; }

/* ------------------------------------------------------------------ forms, panels (sign-in, suggest, admin) */
.panel { background-color: var(--tint); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 480px; margin: 40px auto; }
/* On a phone the narrow panels (sign-in, suggest) keep the page's side margin (UX review
   2026-11-21: they ran flush to the screen's edges). */
@media (max-width: 520px) { main > .panel.narrow { margin-left: 16px; margin-right: 16px; padding: 22px 18px; } }
main > section.panel, main > .prose { margin-top: 32px; margin-bottom: 48px; }
.prose { max-width: 760px; margin: 0 auto; padding: 0 24px; line-height: 1.65; }
.prose h1 { font-size: clamp(30px, 3.6vw, 42px); margin: 36px 0 12px; }
.prose h2 { font-size: 22px; margin: 26px 0 8px; }
.prose p, .prose ul { margin: 0 0 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field-check { flex-direction: row; }
input, select, textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mint-text); box-shadow: 0 0 0 3px rgba(56,217,190,.22); }
.code-input { font-size: 28px; letter-spacing: .3em; }
.form-errors, .error { color: var(--warn); }
small { color: var(--dim); font-size: 13px; }
/* Hints, not values (UX review 2026-11-21: "Мария Петрова" read as filled in). */
input::placeholder, textarea::placeholder { color: #8a929c; opacity: 1; }

/* The privacy page: about 70 characters a line on a computer (UX review 2026-11-21: it ran about
   180 across the whole width, flush to the edges). */
/* Long text on a plain white panel, not the dotted one (visual review 2026-11-22, v1-25). */
.privacy { max-width: 720px; margin: 36px auto 64px; padding: 34px 44px 38px; background: #fff; background-image: none; }
.privacy h1 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 10px; }
.privacy .lede { margin-bottom: 6px; }
.privacy h2 { font-size: 21px; letter-spacing: -.018em; margin: 30px 0 10px; }
.privacy p, .privacy li { max-width: 60ch; line-height: 1.65; color: var(--ink-2); }
.privacy p + p { margin-top: 10px; }
.privacy ul { display: grid; gap: 8px; margin: 10px 0 12px; padding-left: 22px; }
.privacy .dim { margin-top: 30px; font-size: 14px; color: var(--dim); }

/* The error pages (UX review 2026-11-21: bare words flush to the edge, no 500 page): one panel in
   the page, what happened, and the two ways on. */
.error-page { max-width: 620px; margin: 56px auto 96px; padding: 36px 38px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.error-code { font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-deep); }
.error-title { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -.03em; }
.error-text { font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
@media (max-width: 760px) {
  .privacy { margin: 16px 16px 40px; padding: 24px 20px 28px; }
  .error-page { margin: 24px 16px 56px; padding: 26px 22px; }
  .error-actions { width: 100%; }
  .error-actions .btn { flex: 1 1 auto; }
}

/* Admin helpers (the admin keeps the same tokens, denser: 15_DESIGN.md 7.10) */
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.own-chip { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--violet-tint); color: var(--violet-text); border: 1px solid var(--violet-line); }
.flash { padding: 10px 14px; border-radius: 10px; background: var(--mint-tint); color: var(--mint-deep); border: 1px solid var(--mint-line); }
.warning { padding: 10px 14px; border-radius: 10px; background: var(--warn-tint); color: var(--warn); border: 1px solid var(--warn-line); }
.action { display: inline; }
main > .admin, body.admin main { max-width: 1160px; margin: 0 auto; padding: 16px 24px 48px; }

/* ------------------------------------------------------------------ phones and small screens */
@media (max-width: 860px) {
  .hide-sm { display: none; }
  .filterbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .filterbar-inner { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .filterbar-end { margin-left: 0; }
  .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
  .pills::-webkit-scrollbar { display: none; }
  .filterbar-end { justify-content: space-between; }
  .search-box { flex: 1; }
  .search-box input, .search-box input:focus { width: 100%; }
  .pop { position: static; }
  .pop[open]::before { content: ""; position: fixed; inset: 0; z-index: 39; background: rgba(12,14,16,.35); }
  .pop-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 72vh; overflow: auto;
    border-radius: 22px 22px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 20px); }
  .steps { grid-template-columns: 1fr; }
  html { scroll-padding-top: 120px; }
}
@media (max-width: 640px) {
  /* The sides only: the shorthand zeroed the top and bottom of every section that is also a .wrap
     ("Как работи", the dark band, the footer; visual review 2026-11-22, v2-2). Those keep a phone's
     own spacing. */
  .wrap { padding-left: 16px; padding-right: 16px; }
  .how, .band-inner { padding-top: 56px; padding-bottom: 56px; }
  .calendar { padding-bottom: 48px; }
  .calendar { padding-top: 24px; }
  .ev-card { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px 14px 14px 16px; }
  .ev-time { font-size: 17px; }
  .ev-title { font-size: 16.5px; }
  .ev-side { display: none; }
  .modal { width: auto; max-height: none; }
  .modal[open] { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .modal-close { top: calc(env(safe-area-inset-top) + 10px); right: 10px; }
  .modal-content { padding: 18px 16px calc(env(safe-area-inset-bottom) + 24px); }
  .facts { grid-template-columns: 1fr; padding: 14px; }
  .header-nav { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ organiser modal */
.org-banner { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
.org-banner-empty { background: repeating-linear-gradient(90deg, rgba(11,133,115,.08) 0 1px, transparent 1px 6px),
  radial-gradient(520px 200px at 20% 120%, #d9f8f0, rgba(217,248,240,0) 70%), radial-gradient(520px 200px at 82% 120%, #e7e0fd, rgba(231,224,253,0) 70%), var(--stage); }
.modal-organiser .modal-content { padding-top: 0; }
.modal-organiser .org-head { margin-top: -46px; }
.modal-organiser .org-head .avatar-88 { border: 4px solid #fff; background: #fff; box-shadow: 0 8px 22px -12px rgba(12,14,16,.45); }
/* An organiser without a logo keeps its initials on the gradient (the white above, meant behind a
   logo's transparent parts, painted over them: white letters on white). */
.modal-organiser .org-head .avatar-88.avatar-initials { background: var(--grad); }
.organiser-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.organiser-upcoming, .organiser-past { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.organiser-past .ev-card { background: var(--tint); }
.dim { color: var(--dim); }
.join-link { display: inline-flex; margin: 2px 0 0; }
.where-online { display: inline; margin-left: 6px; }

/* ------------------------------------------------------------------ the "Там съм!" kit, a modal */
/* Always a modal (owner, 2026-11-20: "should definitely be a modal. always"), wider than an
   event's: the card beside its controls. */
@media (min-width: 761px) { .modal:has(.modal-kit) { width: min(1000px, calc(100% - 32px)); } }
.modal-kit { position: relative; }
.kit { padding: 26px 30px 32px; display: flex; flex-direction: column; gap: 20px; }
.kit-head { display: flex; flex-direction: column; gap: 8px; padding-right: 56px; }
.kit-back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--dim); text-decoration: none; }
.kit-back:hover { color: var(--text); }
.kit-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.06; letter-spacing: -.032em; }
.kit-event { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 16px; }
.kit-when { color: var(--dim); }
/* After Ще отида: signed out, Register and Sign in; signed in, "saved" (owner, 2026-11-20). The
   request is neutral, the saved line mint (UX review 2026-11-21: a mint request read as done). */
.kit-going { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 16px 18px;
  border-radius: 16px; background: var(--tint); border: 1px solid var(--line-strong); }
.kit-going-text { flex: 1 1 260px; color: var(--ink-2); }
.kit-going-text strong { color: var(--text); }
.kit-going-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-saved { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; background: var(--mint-tint);
  border: 1px solid var(--mint-line); color: var(--mint-deep); font-weight: 600; }
.moments ul { display: inline-flex; gap: 4px; margin: 0; padding: 4px; list-style: none; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.moment { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--dim);
  font-size: 14.5px; font-weight: 600; text-decoration: none; }
.moment:hover { color: var(--text); }
.moment.is-current { background: var(--ink); color: #fff; }
/* The post's one text and its pen (owner: "make only 1 text of the publication", "option to
   edit the template with pen icon"). */
.kit-post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kit-post-own { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--violet-tint); color: var(--violet-text);
  font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.pen { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; min-height: 0; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; }
.pen:hover { border-color: var(--line-hover); color: var(--ink); }
.pen[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.post-text { width: 100%; resize: vertical; min-height: 150px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  font: 400 15.5px/1.55 var(--font); color: var(--text); }
.post-text:not([readonly]) { border-color: var(--mint-text); box-shadow: 0 0 0 3px rgba(56,217,190,.18); outline: none; }
.kit-post-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-post-edit { display: flex; flex-direction: column; gap: 10px; }
.kit-post-edit[hidden], .kit-post-row[hidden] { display: none; }
.kit-tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-token { display: inline-flex; align-items: center; gap: 4px; height: 32px; min-height: 0; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--violet-line); background: var(--violet-tint); color: var(--violet-text); font: 600 13px var(--font); cursor: pointer; }
.kit-token:hover { border-color: var(--violet-text); }
.kit-post-error { color: var(--warn); font-size: 14px; font-weight: 500; }
/* The pen's "saved" and "our text is back", beside the buttons just pressed (UX review 2026-11-21:
   it showed under the card, off screen on a phone). */
.kit-post-note { display: flex; align-items: center; gap: 6px; min-height: 20px; color: var(--mint-deep); font-size: 14px; font-weight: 600; }
.kit-post-note:empty { display: none; }

/* ------------------------------------------------------------------ the card maker (kit.js) */
.maker { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 30px; align-items: start; }
.maker-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
/* The right column: the choices (moment, name, role, photo), then the post's text. */
.maker-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-frame { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 70px -28px rgba(16,40,50,.45); background: var(--tint); aspect-ratio: 1080 / 1350; }
.card-frame canvas { display: block; width: 100%; height: auto; }
.card-noscript { padding: 24px; color: var(--dim); }
/* The styles: three pulsing squares on the card's top right corner (owner, 2026-11-20: "the
   style choice should be just on the card on the top right corner as 3 pulsating squares"),
   stacked down the right edge, in the card's margin beside its "zdrasti.live" line. Each is a
   44 px press with the small square drawn in its corner (UX review 2026-11-21: 16 to 18 px were
   too small to press); they pulse until a style is chosen (`is-picked`, kit.js). */
.style-dots { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; gap: 0; }
.style-dots[hidden] { display: none; }
.style-dot, .style-dot:hover { position: relative; display: block; width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; cursor: pointer; }
.style-dot::before { content: ""; position: absolute; top: 12px; right: 4px; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid rgba(12,14,16,.22); box-shadow: 0 2px 6px -2px rgba(12,14,16,.35); animation: style-pulse 2.4s ease-in-out infinite; }
.style-dot:nth-child(2)::before { animation-delay: .3s; }
.style-dot:nth-child(3)::before { animation-delay: .6s; }
.style-dot-light::before { background: #fff; }
.style-dot-dark::before { background: #0c0e10; border-color: #0c0e10; }
.style-dot-ticket::before { background: var(--violet-tint); border: 1.5px dashed var(--violet-text); }
/* The four business-card looks (Yana, 2026-11-24): each square a small picture of its ground. */
.style-dot:nth-child(4)::before { animation-delay: .9s; }
.style-dot:nth-child(5)::before { animation-delay: 1.2s; }
.style-dot:nth-child(6)::before { animation-delay: 1.5s; }
.style-dot:nth-child(7)::before { animation-delay: 1.8s; }
.style-dot-viz::before { background: linear-gradient(90deg, #10c4a7, #7c5cf0) top / 100% 5px no-repeat, #f7f9f9; }
.style-dot-viznight::before { background: linear-gradient(90deg, #38d9be, #a78bfa) top / 100% 5px no-repeat, #0c0e10; border-color: #0c0e10; }
.style-dot-vizbright::before { background: linear-gradient(150deg, #2ed3b7, #5aa6f2 48%, #9a7df8); border-color: transparent; }
.style-dot-vizlilac::before { background: linear-gradient(#15181b, #15181b) bottom / 100% 8px no-repeat, #e4dcfd; }
.style-dot.is-current::before { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mint); animation: none; }
.style-dots.is-picked .style-dot::before { animation: none; }
.style-dot:focus-visible { outline: none; }
.style-dot:focus-visible::before { outline: 2px solid var(--ink); outline-offset: 3px; }
/* A phone's one column (review 2026-11-22, v2-6, r5-11): the card reaches the floating X's column, so
   scrolled to frame the card the X sat on the first square and a tap meant to pick a style closed the
   kit, and on a card under about 360 px the top square covered "Bamya CRM". Up to 535 px (where the
   centred card's right edge enters the X's column) the squares stand on the card's left edge instead,
   below the "zdrasti.live" pill (its bottom is 140 of the card's 1350): never under the X. */
@media (max-width: 535px) {
  .style-dots { right: auto; left: 0; top: 10.4%; }
  .style-dot::before { right: auto; left: 2px; }  /* its ring (4 px) clear of the 76/1080 margin even on a 328 px card */
}
@keyframes style-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56,217,190,.5); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 5px rgba(56,217,190,0); }
}
.maker-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.maker-actions .btn-dark { flex: 1 1 auto; }
.icon-down { transform: rotate(90deg); }
.maker-status { min-height: 20px; font-size: 14px; color: var(--mint-deep); font-weight: 500; }
.maker-status:empty { min-height: 0; }
/* While the animation is made (kit.js: disabled, aria-busy). */
.maker-actions [aria-busy="true"] { opacity: .6; cursor: progress; }
.maker-controls { display: flex; flex-direction: column; gap: 22px; padding: 22px; border: 1px solid var(--line-card); border-radius: var(--radius);
  background-color: var(--tint); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.control { display: flex; flex-direction: column; gap: 10px; }
.control-label { font-size: 12.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.control-help { font-size: 13px; color: var(--dim); }
.control-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.control-fields .mini-field { min-width: 0; }
.control-fields input { width: 100%; min-width: 0; height: 44px; padding: 0 12px; font-size: 16px; text-overflow: ellipsis; }
.control-fields input::placeholder { font-size: 15px; }
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-pick { cursor: pointer; }
/* One column: the card, then what goes on it (moment, name, role, photo), then the downloads, then
   the post's text (UX review 2026-11-21: "Изтегли" came before the name, so a first download had
   none). The two columns' boxes step aside (display: contents) and their parts take this order. */
@media (max-width: 860px) {
  .maker { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .maker-preview, .maker-side { display: contents; }
  .card-frame { order: 1; width: 100%; max-width: 420px; margin: 0 auto; }
  .maker-controls { order: 2; padding: 18px; }
  .maker-actions { order: 3; }
  .maker-status { order: 4; }
  .maker-post { order: 5; }
}
@media (max-width: 760px) {
  .kit { padding: 18px 16px calc(env(safe-area-inset-bottom) + 28px); }
  .moments ul { display: flex; overflow-x: auto; }
}
/* The photo on its own button once picked, and the word under it (kit.js photoControl/photoSaid). */
.photo-thumb { width: 26px; height: 26px; margin-left: -4px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--mint); }
.photo-thumb[hidden], .photo-pick.has-photo .photo-plus { display: none; }
.photo-said { font-size: 14px; font-weight: 600; color: var(--mint-deep); }
.photo-said:empty { display: none; }
.photo-said.is-refused { color: var(--warn); }
.kit-edit { display: none; }
/* A phone's kit (owner, 2026-11-25: "we need to reduce the options in mobile or to hide them somehow
   not to be too complex"): the card, then one button that opens the choices (moment, name, position,
   photo, logo), then Сподели and Изтегли картинка, then the post's text. The animation and Пусни пак
   are not offered (a tester's phone opened the GIF in an unrelated app; a tap on the card plays it). */
@media (max-width: 760px) {
  .card-frame { order: 1; cursor: pointer; }
  .maker-status { order: 2; }
  .maker-status:empty { display: none; }
  .kit-edit:not([hidden]) { order: 3; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px;
    border: 1px solid var(--line-card); border-radius: 14px; background: #fff; color: var(--text); font: inherit; text-align: left; }
  .kit-edit-word { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
  .kit-edit-word strong { font-size: 15px; font-weight: 600; }
  .kit-edit-word span { font-size: 13px; color: var(--dim); }
  .kit-edit-chev { transition: transform .2s; }
  .kit-edit[aria-expanded="true"] .kit-edit-chev { transform: rotate(180deg); }
  .maker-controls.kit-choices { order: 4; }
  .maker[data-kit-wired]:not(.is-editing) .kit-choices { display: none; }
  .maker-actions { order: 5; }
  .maker-actions .btn { flex: 1 1 0; min-height: 48px; }
  .maker-actions [data-kit="gif"], .maker-actions [data-kit="play"] { display: none; }
  .kit-post-fold:not([hidden]) { order: 6; }
  .maker-post { order: 7; }
  .maker[data-kit-wired]:not(.is-post-open) .maker-post { display: none; }
  /* Opened, the fold's button already names it: the box keeps only the pen (and "own" mark). */
  .kit-post-fold:not([hidden]) ~ .maker-post .kit-post-word { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 480px) {
  .control-fields { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ my calendar, a modal (owner,
   2026-11-20: "in the sense of their own calendar of events that they plan to attend", "should be a
   modal"); the month grid's own styles below. */
@media (min-width: 761px) { .modal:has(.modal-mycal) { width: min(1000px, calc(100% - 32px)); } }
/* My QR in a big modal (owner, 2026-11-21); full screen on phones like every modal. */
@media (min-width: 761px) { .modal:has(.modal-qr) { width: min(620px, calc(100% - 32px)); } }
@media (min-width: 761px) { .modal:has(.qw) { width: min(780px, calc(100% - 32px)); } }  /* the QR window: its Edit tab keeps two fields a row */
.mycal { padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 14px; }
.mycal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; padding-right: 56px; }
.mycal-head .eyebrow { flex-basis: 100%; }
.mycal-title { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.028em; line-height: 1.1; }
.mycal-note { font-size: 14px; color: var(--dim); }
.month-mine { margin-top: 0; }
/* My calendar has few events a day and room for their names (UX review 2026-11-21: cut after a
   word or two on a computer): up to three lines, the time on its own line above. */
@media (min-width: 641px) {
  .month-mine .mev { flex-wrap: wrap; align-items: center; row-gap: 1px; }
  .month-mine .mev-title { flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; line-clamp: 3; }
  .month-mine .mday { min-height: 112px; }
}
.mycal-empty { padding: 14px 16px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); color: var(--ink-2); }
.mycal-foot { display: flex; justify-content: flex-start; }
.mycal-list { display: none; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 6px; }
.mycal-item { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-card);
  background: #fff; color: var(--text); text-decoration: none; }
.mycal-item.is-going { border-color: var(--mint-line); }
.mycal-item.is-going .icon { color: var(--mint-text); align-self: center; }
.mycal-when { font-size: 13.5px; font-weight: 600; color: var(--dim); }
.mycal-what { font-weight: 600; }
.mycal-item.is-maybe .mycal-what { color: var(--violet-text); }
/* My calendar's tabs (templates/public/_my_calendar.html; moved into this section from the file's end,
   review 2026-11-22b r9-7).
   Owner, 2026-11-22: "remove моите from the header. make it as a tab in the personal calendar
   modal": Календар | Моите, links the modal follows in place, drawn as the QR window's tabs. */
.mycal-tabs { display: flex; gap: 4px; margin: 0 48px 2px 0; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint); }
.mycal-tabs a { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 10px;
  border-radius: 11px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none; }
.mycal-tabs a:hover { color: var(--text); background: rgba(255,255,255,.6); }
.mycal-tabs a[aria-current] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 0 0 1px var(--line); }
.mycal-tabs a[aria-current] .icon { color: var(--mint-text); }
.mycal-mine .group { margin-top: 18px; }
.mycal-mine .group-title { margin-bottom: 10px; font-size: 16px; }
@media (max-width: 760px) {
  .mycal { padding: 18px 16px calc(env(safe-area-inset-bottom) + 24px); }
  .mycal-list { display: flex; }
}

/* ------------------------------------------------------------------ month grid (owner, 2026-11-20:
   "I need also a proper calendar type version") */
.month { margin-top: 24px; border: 1px solid var(--line-card); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }
.month-head, .month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head { background: var(--tint); border-bottom: 1px solid var(--line); }
.month-wd { padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.month-week + .month-week { border-top: 1px solid var(--line); }
.mday { position: relative; min-height: 128px; padding: 8px 8px 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mday:first-child { border-left: 0; }
.mday.is-out { background: #fcfcfd; }
/* Quieter, still readable (UX review 2026-11-21, contrast: --line-hover was 2.0:1; this is 3.3:1). */
.mday.is-out .mday-num { color: #858d97; }
.mday.is-past:not(.is-today) .mday-num { color: var(--faint); }
.mday-num { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.mday.is-today .mday-num { background: var(--mint-tint); color: var(--mint-deep); box-shadow: inset 0 0 0 1px var(--mint-line); }
.mday-events { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.mev { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 4px 8px; border-radius: 8px; font-size: 12.5px; line-height: 1.3;
  text-decoration: none; border-left: 3px solid; transition: filter .15s, transform .15s; }
.mev:hover { filter: brightness(.97); transform: translateY(-1px); }
.mev-in-person { background: var(--mint-tint); border-color: var(--mint); color: var(--mint-deep); }
.mev-online { background: var(--violet-tint); border-color: var(--violet); color: var(--violet-text); }
.mev-cancelled { background: var(--tint); border-color: var(--line-hover); color: var(--faint); }
.mev-cancelled .mev-title { text-decoration: line-through; }
.mev-time { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.mev-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.mev-online .mev-title, .mev-in-person .mev-title { color: var(--ink-2); }
.mday-dots { display: none; }
@media (max-width: 860px) {
  .mday { min-height: 104px; padding: 6px 5px 8px; }
  .mev { padding: 3px 6px; font-size: 11.5px; }
  .mev-time { display: none; }
}
@media (max-width: 640px) {
  .month { border-radius: 14px; }
  .month-wd { padding: 8px 0; text-align: center; font-size: 11px; letter-spacing: .02em; }
  .mday { min-height: 58px; padding: 6px 0 8px; align-items: center; gap: 4px; }
  .mday-num { min-width: 32px; height: 32px; font-size: 14px; }
  .mday-events { display: none; }
  .mday-dots { display: flex; gap: 3px; height: 6px; }
  .mday-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
  .mday-dots i.dot-online { background: var(--violet); }
  .mday-dots i.dot-cancelled { background: var(--line-hover); }
}

/* ------------------------------------------------------------------ going / maybe / not going */
.ev-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.attend { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.att { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.att .icon { display: none; }
.att:hover { border-color: var(--line-hover); background: var(--tint); color: var(--text); }
.att-going.is-on { background: var(--mint-tint); border-color: var(--mint-line); color: var(--mint-deep); }
.att-going.is-on .icon { display: inline; color: var(--mint-text); }
.att-maybe.is-on { background: var(--violet-tint); border-color: var(--violet-line); color: var(--violet-text); }
.att-not.is-on { background: var(--tint); border-color: var(--line-hover); color: var(--dim); }
.ev-card.is-going { border-color: var(--mint-line); box-shadow: inset 4px 0 0 var(--mint); }
.ev-card.is-maybe { box-shadow: inset 4px 0 0 var(--violet); }
/* A phone's event window offers Ще ходя and Може би, as the lists do (owner, 2026-11-25: "скрий
   няма да ходя on phones. leave them to be able to unselect a selected one - the same logic as it's
   in the lists"): Няма да ходя shows only while it is the mark, so it can be pressed off (pressing
   the chosen answer again clears it, public.py `attend`). */
@media (max-width: 760px) { .attend-block .att-not:not(.is-on) { display: none; } }
.attend-block { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line-card); background: #fff; }
.attend-question { font-size: 15px; font-weight: 600; }
.attend-block .att { height: 42px; min-height: 42px; padding: 0 16px; font-size: 14.5px; }
/* "Направи картичка" on the answers' row, black, pushed to the right (owner, 2026-11-21); on a
   narrow screen it wraps under them and still keeps to the right. */
.attend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.attend-row .attend { display: contents; }  /* its three buttons share the row with the card's */
.attend-row .action-kit-beside { width: auto; margin-left: auto; height: 42px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; font-size: 14.5px; }
/* The tick only on a chosen "Ще отида" (UX review 2026-11-21: shown unchosen, it read as done);
   Следвай keeps its bell and its check, each in its own state's words. */
.follow-button .icon { display: inline; }
.attend-hint { font-size: 13px; color: var(--dim); }
.mev.is-going { box-shadow: inset 0 0 0 1px var(--mint); font-weight: 700; }
.mev.is-going .mev-title { color: var(--mint-deep); font-weight: 700; }
.mev.is-maybe .mev-title { color: var(--violet-text); font-weight: 600; }
.mev-check { flex: none; align-self: center; color: var(--mint-text); }
.past-link { margin-top: 26px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px); z-index: 60; transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 16px 34px -14px rgba(12,14,16,.55); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .ev-actions { margin-left: 0; }
  .ev-foot { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------------ the list in two columns on a computer
   (owner, 2026-11-20: "make the list be 2 columns on PC"): in half the width a card shows its
   picture across the top, then its one-line date over the title (owner, 2026-11-23: "23.10 (вт) -
   15:00"; it no longer fits a column beside the title), meta, chips and marks. */
@media (min-width: 960px) {
  .upcoming .rows, .past .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .upcoming .ev-card, .past .ev-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "when" "main";
    grid-template-rows: auto auto 1fr; gap: 0; padding: 0 0 18px; overflow: hidden; align-items: stretch; }
  .upcoming .ev-side, .past .ev-side { grid-area: side; display: block; }
  .upcoming .ev-thumb, .past .ev-thumb { width: 100%; aspect-ratio: 1200 / 460; object-fit: cover; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .upcoming .ev-when, .past .ev-when { grid-area: when; padding: 16px 18px 0; }
  .upcoming .ev-main, .past .ev-main { grid-area: main; padding: 6px 18px 0; }
  .upcoming .ev-foot, .past .ev-foot { margin-top: auto; padding-top: 4px; }
  .upcoming .ev-card.is-going, .past .ev-card.is-going { box-shadow: inset 0 -4px 0 var(--mint); }
  .upcoming .ev-card.is-maybe, .past .ev-card.is-maybe { box-shadow: inset 0 -4px 0 var(--violet); }
}

/* ------------------------------------------------------------------ the grid view (`/?view=grid`)
   (owner, 2026-11-20: "make 3rd view which is called grid and is basically 4 columns view"): the
   list's groups with their cards as tiles, four across on a computer, three on a tablet, two on a
   phone. Each tile: the picture across the top, the date and time on one line, the title (three
   lines at most), organiser and place on a line each, the chips and marks at the bottom. These
   rules come last so they win over the list's two columns above. The tile's look is also the
   pinned row's, in the list as in the grid (`[data-tiles]`: two to four copies; "premium and
   pinned cards" below), never its columns, spans or lone tiles. */
.upcoming-grid .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .upcoming-grid .rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .upcoming-grid .rows { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
:is(.upcoming-grid, [data-tiles]) .ev-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "when" "main";
  grid-template-rows: auto auto 1fr; gap: 0; padding: 0; overflow: hidden; align-items: stretch; }
:is(.upcoming-grid, [data-tiles]) .ev-side { grid-area: side; display: block; }
:is(.upcoming-grid, [data-tiles]) .ev-thumb { width: 100%; aspect-ratio: 1200 / 627; object-fit: cover; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
:is(.upcoming-grid, [data-tiles]) .ev-thumb-empty { font-size: 26px; border-bottom: 0; }
:is(.upcoming-grid, [data-tiles]) .ev-when { grid-area: when; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 14px 16px 0; }
:is(.upcoming-grid, [data-tiles]) .ev-date { flex-direction: row; align-items: baseline; gap: 5px; margin: 0; }
:is(.upcoming-grid, [data-tiles]) .ev-dn { font-size: 18px; }
:is(.upcoming-grid, [data-tiles]) .ev-mo { font-size: 13px; }
:is(.upcoming-grid, [data-tiles]) .ev-date + .ev-time { font-size: 13.5px; }
:is(.upcoming-grid, [data-tiles]) .ev-main { grid-area: main; gap: 6px; padding: 6px 16px 16px; }
:is(.upcoming-grid, [data-tiles]) .ev-title { font-size: 16px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
/* A grid, not the row's wrapping flex: a wrapping column grows as wide as its longest
   unbroken line, and a long organiser name ran past the tile's edge (found 2026-11-20). */
:is(.upcoming-grid, [data-tiles]) .ev-meta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; font-size: 13px; }
:is(.upcoming-grid, [data-tiles]) .ev-org, :is(.upcoming-grid, [data-tiles]) .ev-place { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
:is(.upcoming-grid, [data-tiles]) .ev-org .avatar, :is(.upcoming-grid, [data-tiles]) .ev-place .icon { display: inline-flex; vertical-align: -4px; margin-right: 6px; }
:is(.upcoming-grid, [data-tiles]) .ev-foot { flex-direction: column; align-items: flex-start; margin-top: auto; padding-top: 6px; }
:is(.upcoming-grid, [data-tiles]) .ev-actions { margin-left: 0; }
:is(.upcoming-grid, [data-tiles]) .ev-card.is-going { box-shadow: inset 0 -4px 0 var(--mint); }
:is(.upcoming-grid, [data-tiles]) .ev-card.is-maybe { box-shadow: inset 0 -4px 0 var(--violet); }
/* ------------------------------------------------------------------ every row full
   (owner, 2026-11-21: "the cards should always take the full width / for example in list view - if
   there is only 1 card in a row it should take both columns / in grid - if there are 3, they should
   make 3 column row and so on"). Each date group's last row fills the width: in the list a lone last
   card spans both columns; the grid has 12 tracks, so a tile takes 6, 4 or 3 of them (2, 3 or 4
   across) and the last row's tiles share the whole width (3 left: 4 each; 2 left: 6 each; 1: all).
   "Покажи още" adds cards to the same group, and `:last-child` follows. A card across the whole
   width lies down: date and words, its picture on the right (on top it would be twice as tall). */
@media (min-width: 960px) {
  /* Not while the first visit's story plays (visual review 2026-11-22, v1-1): a lone card across
     both columns ran under the story's right column, cutting its last line and "Ясно". Then every
     card keeps to its column, the right ones fade, and the story has the right column to itself. */
  .upcoming:not(.upcoming-grid):not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > .ev-card:nth-child(odd):last-child,
  .past .rows > .ev-card:nth-child(odd):last-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 34%);
    grid-template-areas: "when side" "main side"; grid-template-rows: auto 1fr; gap: 0 22px; padding: 0; }
  .upcoming:not(.upcoming-grid):not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > .ev-card:nth-child(odd):last-child .ev-when,
  .past .rows > .ev-card:nth-child(odd):last-child .ev-when { padding: 18px 0 0 20px; }
  .upcoming:not(.upcoming-grid):not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > .ev-card:nth-child(odd):last-child .ev-main,
  .past .rows > .ev-card:nth-child(odd):last-child .ev-main { padding: 6px 0 18px 20px; }
  .upcoming:not(.upcoming-grid):not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > .ev-card:nth-child(odd):last-child .ev-side,
  .past .rows > .ev-card:nth-child(odd):last-child .ev-side { align-self: stretch; }
  .upcoming:not(.upcoming-grid):not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > .ev-card:nth-child(odd):last-child .ev-thumb,
  .past .rows > .ev-card:nth-child(odd):last-child .ev-thumb { height: 100%; aspect-ratio: auto; min-height: 180px;
    border-bottom: 0; border-left: 1px solid var(--line); }
}
.upcoming-grid .rows { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.upcoming-grid .rows > li { grid-column: span 6; }
@media (max-width: 719px) {
  .upcoming-grid .rows > li:nth-child(2n+1):last-child { grid-column: span 12; }
}
@media (min-width: 720px) and (max-width: 1023px) {
  .upcoming-grid .rows > li { grid-column: span 4; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(3n+1):nth-last-child(2),
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(3n+2):last-child { grid-column: span 6; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(3n+1):last-child { grid-column: span 12; }
}
@media (min-width: 1024px) {
  .upcoming-grid .rows > li { grid-column: span 3; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+1):nth-last-child(3),
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+2):nth-last-child(2),
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+3):last-child { grid-column: span 4; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+1):nth-last-child(2),
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+2):last-child { grid-column: span 6; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+1):last-child { grid-column: span 12; }
}
/* While the first visit's story plays on a computer (`story-on`), no row widens and no tile lies
   down: each keeps its column, as the list's lone card does, and story.js fades the ones in the
   story's half. */
/* A tile across the whole grid lies down too: date and words on the left, its picture on the right
   (on a phone it keeps its picture on top). */
@media (min-width: 720px) and (max-width: 1023px) {
  .upcoming-grid:not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > li:nth-child(3n+1):last-child { grid-template-columns: minmax(0, 1fr) minmax(0, 38%); grid-template-areas: "when side" "main side";
    grid-template-rows: auto 1fr; }
  .upcoming-grid:not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > li:nth-child(3n+1):last-child .ev-side { align-self: stretch; }
  .upcoming-grid:not(.story-on):not(.story-due) .group:not([data-tiles]) > .rows > li:nth-child(3n+1):last-child .ev-thumb { height: 100%; aspect-ratio: auto; min-height: 180px; border-bottom: 0; border-left: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+1):last-child { grid-template-columns: minmax(0, 1fr) minmax(0, 38%); grid-template-areas: "when side" "main side";
    grid-template-rows: auto 1fr; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+1):last-child .ev-side { align-self: stretch; }
  .upcoming-grid:not(.story-on):not(.story-due) .rows > li:nth-child(4n+1):last-child .ev-thumb { height: 100%; aspect-ratio: auto; min-height: 180px; border-bottom: 0; border-left: 1px solid var(--line); }
}
@media (max-width: 640px) {
  :is(.upcoming-grid, [data-tiles]) .rows { gap: 10px; }
  :is(.upcoming-grid, [data-tiles]) .ev-when { padding: 10px 11px 0; gap: 0 6px; }
  :is(.upcoming-grid, [data-tiles]) .ev-dn { font-size: 16px; }
  :is(.upcoming-grid, [data-tiles]) .ev-time { font-size: 13px; }
  :is(.upcoming-grid, [data-tiles]) .ev-len { display: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-main { padding: 4px 11px 12px; gap: 5px; }
  :is(.upcoming-grid, [data-tiles]) .ev-title { font-size: 14.5px; line-height: 1.28; }
  :is(.upcoming-grid, [data-tiles]) .ev-meta { font-size: 12.5px; }
  :is(.upcoming-grid, [data-tiles]) .ev-org { display: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-thumb-empty { font-size: 20px; }
  /* Two tiles across a phone leave about 150 px: no tag (the kit stays in the event's modal).
     Ще отида / Може би came back (owner, 2026-11-23: "add ще отида и може би buttons on mobile
     also"), side by side, slimmer, the chosen one without its tick (the tile's mint or violet
     bottom edge and the button's colour say it); "a computer's cards" below puts them across. */
  :is(.upcoming-grid, [data-tiles]) .chip-tag { display: none; }
  /* More compact than the touch rule's 44 px (owner, 2026-11-23: "make the shte otida i moje bi in
     mobile more compact - too much empty space there now"): 32 px in a tile, 36 px in the list. */
  :is(.upcoming-grid, [data-tiles]) .ev-card .attend-compact .att { height: 32px; min-height: 32px; padding: 0 4px; font-size: 12px; }
  :is(.upcoming-grid, [data-tiles]) .attend { gap: 5px; }
  :is(.upcoming-grid, [data-tiles]) .att-going.is-on .icon { display: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-foot { padding-top: 2px; }
  /* The phone's date box (owner, 2026-11-23: "in mobile grid - move the date and time be in a ticket
     style and be in the bottom left corner of the image itself. give 30% more space for the text so
     more text to be visible", then "bottom right corner", then "no ticket. rectangle"): the tile's
     date line (`ev-stamp`, public/_rows.html, "23.11 (пн) - 19:00") sits on the picture's bottom
     right in a white rectangle with round corners ("with rounder corner"), a dashed line between
     the day and the time and a soft shadow ("I liked the separation. return the separation and add
     some shadow"). The place sits in a box 30% smaller on the top right (`ev-loc`; "put another
     rectangle but 30% smaller as size for location in the top right corner for mobile"), the line
     under the title giving way to it, and no premium star ("remove the star for premium in
     mobile"). Both boxes are 30% see-through ("make both rectangles be 40% transperant", then
     "increase opacity with 10%"), the
     picture blurred behind them so the words stay readable on any picture. The date box's day side
     is pale yellow on a weekday and pale green on a weekend, and says no weekday name ("make the
     weekdays slightly yelloe tint on the weekday side, and weekends slightly greenish and remove
     (чт) from mobile"; `is-weekend`, public.py `_row`). The words under the picture start right under it and the
     title shows four lines, not three. The box lets a press through to the card's link. */
  :is(.upcoming-grid, [data-tiles]) .ev-card { grid-template-areas: "side" "main"; grid-template-rows: auto 1fr; }
  :is(.upcoming-grid, [data-tiles]) .ev-when { grid-area: side; align-self: end; justify-self: end; position: relative; z-index: 2;
    margin: 0 7px 7px 0; padding: 0; pointer-events: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp ~ .ev-date, :is(.upcoming-grid, [data-tiles]) .ev-stamp ~ .ev-time { display: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp { display: inline-flex; align-items: stretch; overflow: hidden;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text);
    border-radius: 8px; box-shadow: 0 6px 16px -4px rgba(12,14,16,.45), 0 1px 3px rgba(12,14,16,.22);
    font-size: 11.5px; line-height: 1; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp-day { display: inline-flex; align-items: baseline; padding: 5px 7px 5px 9px;
    background: rgba(255,240,178,.7); }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp.is-weekend .ev-stamp-day { background: rgba(196,242,214,.7); }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp-wd { display: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp-dn { font-size: 15px; letter-spacing: -.02em; }
  :is(.upcoming-grid, [data-tiles]) .ev-stamp-dash { display: none; }  /* the dashed line says it */
  :is(.upcoming-grid, [data-tiles]) .ev-stamp-time { display: inline-flex; align-items: center; padding: 0 9px 0 7px;
    border-left: 1.5px dashed var(--line-hover); background: rgba(255,255,255,.7); }
  :is(.upcoming-grid, [data-tiles]) .ev-main { padding: 8px 11px 12px; }
  :is(.upcoming-grid, [data-tiles]) .ev-title { -webkit-line-clamp: 4; }
  :is(.upcoming-grid, [data-tiles]) .ev-meta { display: none; }  /* the organiser was already off; the place is on the picture */
  :is(.upcoming-grid, [data-tiles]) .ev-loc { grid-area: side; align-self: start; justify-self: end; position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 14px); margin: 7px 7px 0 0; padding: 4px 7px;
    background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text);
    border-radius: 6px; box-shadow: 0 4px 11px -3px rgba(12,14,16,.45), 0 1px 2px rgba(12,14,16,.2);
    font-size: 10.5px; line-height: 1; font-weight: 700; white-space: nowrap; pointer-events: none; }
  :is(.upcoming-grid, [data-tiles]) .ev-loc > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  :is(.upcoming-grid, [data-tiles]) .ev-loc .icon { flex: none; }
  .ev-card .ev-star { display: none; }  /* every phone card (over the premium block's own rule further down) */
  :is(.upcoming-grid, [data-tiles]) .ev-card.is-cancelled .ev-stamp { color: var(--dim); }
}

/* ------------------------------------------------------------------ a computer's cards (and a phone's)
   (owner, 2026-11-23: "for PC: remove the tags from the listing in the lists. make the buttons ще
   отида and може би use the whole width 50/50 / from there remove the duration info / make the
   date be format: 23.10 (вт) - 15:00 (23 should be bigger)"). Every event card from 960 px, in the
   list, the grid, the Промо row, My calendar and the organiser's: the one-line date
   (`ev-stamp`, public/_rows.html) in place of the stacked parts, no length, no tag chips and no
   format chip (then: "also remove the tag хибридно"; Онлайн goes with it, the place line keeps its
   camera), a chips line left empty going too (the status and invitation chips stay), and Ще отида /
   Може би side by side across the card. Then, the same day, the phone: "add ще отида и може би
   buttons on mobile also" (the buttons across every card, at every width; too narrow a tile for
   both on one line puts them one under the other) and "remove хибридно from mobile" (the format
   chip goes on a phone's cards, the list's and the grid's). A tablet keeps the rest as it was. */
.ev-stamp, .ev-loc { display: none; }
.ev-card .ev-foot { flex-direction: column; align-items: stretch; }
.ev-card .ev-actions { margin-left: 0; }
.ev-card .attend-compact { display: flex; flex-wrap: wrap; width: 100%; }
.ev-card .attend-compact .att { flex: 1 1 0; min-width: max-content; justify-content: center; }
@media (max-width: 640px) {
  .ev-card .attend-compact .att { height: 36px; min-height: 36px; }  /* the phone's list; a tile's is 32 px (above) */
  .ev-card .chip-violet, .ev-card .chips:not(:has(> .chip:not(.chip-violet))),
  :is(.upcoming-grid, [data-tiles]) .chips:not(:has(> .chip:not(.chip-tag):not(.chip-violet))) { display: none; }
}
@media (min-width: 960px) {
  /* A row card outside the list and the grid (My events, the organiser window, My calendar's Моите):
     the one-line date no longer fits the row's 74 px column, so it goes over the title, the picture
     on the right of both (owner, 2026-11-23, "fix this": the date ran into the title). The list's
     and the grid's own rules (more specific) keep their layouts. */
  .ev-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when side" "main side"; grid-template-rows: auto 1fr;
    gap: 6px 18px; }
  .ev-card > .ev-when { grid-area: when; }
  .ev-card > .ev-main { grid-area: main; }
  .ev-card > .ev-side { grid-area: side; }
  .ev-stamp { display: block; font-size: 14px; line-height: 1.2; font-weight: 600; color: var(--ink-2); white-space: nowrap;
    font-variant-numeric: tabular-nums; }
  .ev-stamp-dn { font-size: 24px; letter-spacing: -.03em; color: var(--text); }
  .ev-stamp ~ .ev-date, .ev-stamp ~ .ev-time, .ev-card .ev-len { display: none; }
  .ev-card .chip-tag, .ev-card .chip-violet, .ev-card .chips:not(:has(> .chip:not(.chip-tag):not(.chip-violet))) { display: none; }
}
@media (min-width: 960px) and (pointer: fine) {  /* a touch screen keeps its 44 px (the phone block below) */
  .ev-card .attend-compact .att { height: 36px; min-height: 36px; font-size: 13.5px; }
}

/* ------------------------------------------------------------------ the masthead (templates/public/_masthead.html)
   Owner, 2026-11-20: half the screen of a big, tilted Zdrasti! live with its line under it; scrolling
   squeezes it into the header, the logo flies to its place, the line fades and the filters rise in,
   all driven by the scroll (static/js/masthead.js, like crm.bamya.co). Without JavaScript or with
   motion reduced: the plain header with the filter bar under it, both kept on screen.
   On <html>: has-stage, stage-ready, --stage-max, --stage-min (set when measured); on the masthead
   itself, every frame: --cut, --bar-y, --p and is-docked (so a frame restyles the masthead, not the page). */
.masthead { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
/* One row: the logo, the filter bar, the menu (owner, 2026-11-20: "put all filters, the search icon,
   the view toggles in the same row as the logo"); narrower than 1040 px the bar wraps under them. */
.masthead-bar { gap: 14px; }
.masthead .filterbar { position: static; flex: 1 1 auto; min-width: 0; background: transparent; -webkit-backdrop-filter: none;
  backdrop-filter: none; border: 0; }
.masthead .filterbar-inner { max-width: none; min-height: 0; padding: 0; }
@media (max-width: 1240px) {
  .masthead .pill-clear-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1040px) {
  .masthead-bar { flex-wrap: wrap; row-gap: 0; }
  /* The header row 64 px as on every other page, so its buttons sit 10 px from the top (visual review
     2026-11-22, v2-21: the touch rule's `.wordmark { min-height: 44px }` shrank it to 44). */
  .masthead .masthead-home { order: 1; min-height: 64px; }
  .masthead .header-actions { order: 2; margin-left: auto; }
  .masthead .filterbar { order: 3; flex: 1 0 100%; margin: 0 -24px; padding: 0 24px; border-top: 1px solid var(--line); }
  .masthead .filterbar-inner { min-height: 54px; padding: 8px 0; }
}
@media (max-width: 640px) {
  .masthead .filterbar { margin: 0 -16px; padding: 0 16px; }
}
.masthead-bg, .masthead-space { display: none; }
.masthead-bar { position: relative; z-index: 2; }

html.has-stage { --stage-max: clamp(340px, 50vh, 640px); --stage-min: 124px; scroll-padding-top: var(--stage-min); }
/* Fixed and always the stage's height; it lets presses through except on the header row and the
   docked filter bar. masthead.js moves the back, the stage, the logo, the line and the bar, each
   by its own transform, and puts `is-docked` on it once docked. */
html.has-stage .masthead { position: fixed; left: 0; right: 0; height: var(--stage-max); background: transparent; border-bottom: 0;
  pointer-events: none; }
html.has-stage .masthead-bar { pointer-events: auto; }
html.has-stage .masthead-space { display: block; height: var(--stage-max); }
html.has-stage .masthead-bg { display: block; position: absolute; top: 0; left: 0; right: 0; height: var(--stage-max); overflow: hidden;
  background: #fff; will-change: transform;
  transition: box-shadow .25s; }
html.has-stage .masthead.is-docked .masthead-bg { box-shadow: 0 1px 0 var(--line), 0 14px 30px -26px rgba(12,14,16,.45); }
/* The stage moves back down as much as its back moves up: it stays put and is cut at the edge. */
html.has-stage .masthead-stage { position: absolute; inset: 0; will-change: transform; }
html.has-stage .masthead-home { opacity: 0; }
html.has-stage .masthead.is-docked .masthead-home { opacity: 1; }
html.has-stage .masthead.is-docked .masthead-logo { visibility: hidden; }
/* The filter bar fades in at its place in the row as the stage docks (masthead.js); docked it has
   no transform at all (a transformed parent would hold the phone's sheets). */
html.has-stage .masthead .filterbar { pointer-events: none; opacity: 0; will-change: transform, opacity; }
html.has-stage .masthead.is-docked .filterbar { transform: none; will-change: auto; opacity: 1; pointer-events: auto; }
/* Mostly shown, it takes presses before it docks (masthead.js `is-live`; owner, 2026-11-21). */
html.has-stage .masthead.is-live .filterbar { pointer-events: auto; }
html.has-stage .listing { min-height: 60vh; }

/* The stage: a faint dot grid and two soft glows, gone as it docks. */
.masthead-glow { position: absolute; inset: 0; will-change: opacity;
  background:
    radial-gradient(620px 320px at 88% 18%, rgba(167,139,250,.22), rgba(167,139,250,0) 70%),
    radial-gradient(720px 380px at 6% 96%, rgba(56,217,190,.24), rgba(56,217,190,0) 70%),
    radial-gradient(circle at 1px 1px, #dfe3e7 1.1px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, rgba(0,0,0,0)); mask-image: linear-gradient(180deg, #000 55%, rgba(0,0,0,0)); }
.masthead-hero { position: absolute; left: 0; right: 0; top: 64px; height: calc(var(--stage-max, 400px) - 64px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(10px, 1.5vw, 20px); text-align: center; }
/* The big logo: the header's wordmark at stage size (its dot and gap are in em, so scaling it
   down lands it exactly on the small one). masthead.js moves, scales and straightens it. */
.masthead-logo { display: inline-flex; align-items: center; gap: .476em; font-size: clamp(54px, 11.5vw, 150px); font-weight: 800;
  letter-spacing: -.045em; line-height: 1; color: var(--ink); white-space: nowrap; transform-origin: 50% 50%;
  transform: rotate(-6deg); will-change: transform; }
/* meetfor.business's name is about a third longer than "Zdrasti! live" (docs/30_TWO_SITES.md): smaller,
   so ".business" stays on a 320 px phone and inside a 1366 px screen. */
.masthead-logo-meetfor { font-size: clamp(32px, 9.6vw, 132px); }
.masthead-logo .pulse { animation: stage-pulse 2.6s ease-out infinite; }
@keyframes stage-pulse { 0% { box-shadow: 0 0 0 0 rgba(56,217,190,.5); } 70%, 100% { box-shadow: 0 0 0 .32em rgba(56,217,190,0); } }
/* The line under it: a tilted sticker that lifts and fades first. */
/* Yana, 2026-11-24: the page's subtitle, in a clear order under the name (it was a small sticker
   that came late and could not be read): plain words a third of the way to the logo's size, calm
   grey, "business network" the only dark, marked part. */
.masthead-tagline { max-width: min(92vw, 980px); padding: 0; border-radius: 0; background: none; border: 0; box-shadow: none;
  font-size: clamp(20px, 2.7vw, 36px); font-weight: 500; letter-spacing: -.028em; line-height: 1.2; color: #6b7480; text-wrap: balance;
  transform-origin: 50% 50%; transform: rotate(-6deg); will-change: transform, opacity; }

/* The search, in the menu since 2026-11-21 ("move search into the menu"): a full-width box on top. */
.menu-search { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 2px 2px 10px; border-bottom: 1px solid var(--line); }
.menu-search .search-box { flex: 1; min-width: 0; height: 40px; }
.menu-search .search-box input, .menu-search .search-box input:focus { width: 100%; height: 38px; font-size: 16px; text-overflow: ellipsis; }
/* The hint whole (UX review 2026-11-21: "Събитие, организатор, място..." was cut): a size smaller
   than what is typed (16 px, so a phone does not zoom), and a wider panel on a computer. */
.menu-search .search-box input::placeholder { font-size: 14.5px; }
.menu-search .btn { flex: none; height: 40px; }
@media (min-width: 761px) { .menu-panel:has(.menu-search) { min-width: 380px; } }


@media (max-width: 860px) {
  /* A phone or a tablet: every pill on screen, none in a sideways strip (UX review 2026-11-21, #1:
     only Кога and Град showed; Вид, Сектор, Цена and "Изчисти" hid behind the icons). The pills,
     "Изчисти" and the icons share one row that wraps onto a second (the pills' box steps aside,
     display: contents), the icons together at its end. Nothing clips the pulse's ring now.
     masthead.js measures the docked height with the rows as they wrap. Each pill is 38 px with
     an invisible 44 px press around it, the rows 8 px apart so the presses do not overlap. */
  .masthead .filterbar-inner { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 6px; padding: 8px 0 10px; }
  .masthead .pills { display: contents; }
  /* 44 px pills and icons on a phone or a tablet (visual review 2026-11-22, v2-12: 38 px). */
  .masthead .pill, .masthead .pill-clear { position: relative; height: 44px; }
  .masthead .pill-clear { padding: 0 10px 0 8px; border-radius: 999px; color: var(--ink-2); font-weight: 600; }
  .masthead .pill-clear-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }
  .masthead .filterbar-end { flex: none; gap: 6px; margin-left: auto; }
  .masthead .seg { gap: 2px; padding: 0; height: 44px; }
  .masthead .seg a { position: relative; width: 44px; height: 44px; margin: -1px 0; }
}
/* A narrow phone: the pills without their small arrows, so the five fit one row and the bar stays
   two rows high (three cost a third of a 360 x 640 screen). They still open their sheet. */
@media (max-width: 420px) {
  .masthead .pill-caret { display: none; }
  .masthead .pills > .pop > .pill, .masthead .pills > .pill { padding: 0 12px; gap: 5px; }
  /* "Изчисти" as its round X, as on a computer under 1240 px; the word stays its name. */
  .masthead .pill-clear { justify-content: center; width: 44px; padding: 0; border: 1px solid var(--line-strong); background: #fff; }
  /* "Изчисти" after the five pills, beside the icons (visual review 2026-11-22, v2-9: the bar stays
     two rows on a 360 x 640 screen). */
  .masthead .pill-clear { order: 1; }
  .masthead .filterbar-end { order: 2; }
  .masthead .pill-clear-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ------------------------------------------------------------------ the header's menu (templates/_header_nav.html)
   Owner, 2026-11-20: "make hamburger menu, put in the hamburger menu language toggle, vhod,
   predloji subitie". A dropdown on a computer, a sheet from the bottom on a phone. */
.menu-pop { position: relative; flex: none; }
.menu-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.menu-button:hover { border-color: var(--line-hover); background: var(--tint); }
.menu-pop[open] > .menu-button { border-color: var(--ink); }
.menu-panel { left: auto; right: 0; min-width: 260px; padding: 8px; }
.menu-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.menu-item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 11px; color: var(--text);
  font-size: 15px; font-weight: 500; text-decoration: none; }
.menu-item:hover { background: var(--tint); color: var(--text); }
.menu-item .icon { color: var(--dim); }
.menu-item-dark { margin-bottom: 4px; background: var(--ink); color: #fff; }
.menu-item-dark:hover { background: #2b2e33; color: #fff; }
.menu-item-dark .icon { color: var(--mint); }
.menu-lang { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding: 10px 4px 2px 12px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px; }
.menu-lang .icon { margin-right: 6px; }
.menu-lang a { padding: 6px 12px; border-radius: 999px; color: var(--dim); font-weight: 500; text-decoration: none; }
.menu-lang a:hover { background: var(--tint); color: var(--text); }
.menu-lang a[aria-current] { background: var(--ink); color: #fff; }
/* Събития, Места and Организатори, the menu's top row (owner, 2026-11-24: "on top on one line and with
   different formatting", then "in 1 line ... but smaller as size to fit"): three small tiles, the icon
   over the word, tinted, the current page's dark. The panel is a little wider on a computer so
   "Организатори" fits whole. */
.menu-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.menu-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 54px;
  padding: 0 4px; border: 1px solid var(--line-card); border-radius: 12px; background: var(--tint); color: var(--text);
  font-size: 12.5px; font-weight: 650; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s; }
.menu-tile .icon { width: 17px; height: 17px; color: var(--mint-deep); }
.menu-tile:hover { border-color: var(--line-strong); background: #fff; color: var(--text); }
.menu-tile[aria-current] { border-color: var(--ink); background: var(--ink); color: #fff; }
.menu-tile[aria-current] .icon { color: var(--mint); }
@media (min-width: 861px) { .menu-pop .menu-panel { min-width: 300px; } }
@media (max-width: 860px) {
  .menu-panel { left: 0; right: 0; min-width: 0; padding: 10px 12px calc(env(safe-area-inset-bottom) + 18px); }
  .menu-item { height: 50px; font-size: 16px; }
}

/* ------------------------------------------------------------------ the login modal (static/js/login.js)
   Owner, 2026-11-20: "everything that requires login should pop login modal". A small card in the
   middle of a computer screen; near the top on a phone, where the keyboard leaves it in view. */
.login-modal { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 22px;
  background: #fff; color: var(--text); box-shadow: 0 30px 80px -30px rgba(12,14,16,.55); overflow: auto; }
.login-modal::backdrop { background: rgba(12,14,16,.45); }
.login-modal-body { padding: 30px 28px 26px; }
/* A filled 44 px X, plainly visible on white (UX review 2026-11-21: 36 px, near-white on white). */
.login-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: #f1f3f5;
  color: var(--text); cursor: pointer; }
.login-close:hover { background: var(--line); border-color: var(--line-hover); color: var(--text); }
.login-box .login-title { padding-right: 52px; }
.login-box { display: flex; flex-direction: column; gap: 12px; }
.login-title { font-size: 26px; letter-spacing: -.025em; }
.login-intro { color: var(--dim); font-size: 15px; }
.login-box form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.login-box .field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.login-box .field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.login-box .field input { height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; font: 400 17px var(--font); color: var(--text); background: #fff; }
.login-box .field input:focus { outline: none; border-color: var(--mint-text); box-shadow: 0 0 0 3px rgba(56,217,190,.22); }
.login-box .code-input { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-weight: 600; }
.login-submit { width: 100%; justify-content: center; }
.login-other { font-size: 14px; }
/* Under the sign-up button: what signing up accepts, with the privacy page (UX review 2026-11-21). */
.login-terms { font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.login-terms a { color: var(--ink-2); font-weight: 600; }
@media (max-width: 640px) {
  .login-modal { margin: max(16px, env(safe-area-inset-top)) auto auto; }
  .login-modal-body { padding: 26px 20px 22px; }
}
/* The password and its eye (owner, 2026-11-20: "e-mail and password with view password option"). */
.password-wrap { position: relative; display: block; }
.password-wrap input { width: 100%; padding-right: 52px; }
.reveal { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--dim); cursor: pointer; }
.reveal:hover { background: var(--tint); color: var(--text); }
.reveal .reveal-hide, .reveal[aria-pressed="true"] .reveal-show { display: none; }
.reveal[aria-pressed="true"] .reveal-hide { display: inline; }
.login-box .field input { width: 100%; }

/* ------------------------------------------------------------------ why a free account (account/_why.html)
   Owner, 2026-11-24: where sign-up is offered, what it does for what the person was doing, and 6-7
   more benefits (app/services/signup_why.py); sign-up only, never the sign-in. On a phone the reason
   sits over the box's title and the benefits under the form; on a computer (the sign-up box, in the
   login modal or on /register) two columns: the reason and the benefits on the left on the mint
   stage, the form on the right. The
   pages that offer sign-up in their own way show the benefits alone (`why-compact`), in two
   columns only in the "Там съм!" window's wide note (the others are narrow columns). */
.login-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.why-lead { display: flex; flex-direction: column; gap: 6px; padding-right: 52px; }  /* clear of the X */
.why-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--mint-text); }
.why-title { font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.why-text { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.has-why .login-main { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.has-why .login-title { padding-right: 0; font-size: 22px; }
.why-more { margin-top: 10px; padding: 16px 16px 14px; border-radius: 16px; background: var(--stage); border: 1px solid #d9f4ec; text-align: left; }  /* the check-in page centres its words */
.why-more-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--text); }
.why-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.why-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.why-list .icon { flex: none; margin-top: 1px; color: var(--mint-text); }
.why-free { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--mint-deep); }
.why-free .icon { flex: none; }
@media (min-width: 760px) {
  .login-modal:has(.has-why) { width: min(900px, calc(100vw - 48px)); }
  .panel.narrow:has(.has-why) { max-width: 940px; }
  .has-why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "lead main" "more main";
    grid-template-rows: auto 1fr; column-gap: 32px; row-gap: 0; align-items: start; }
  .has-why .why-lead { grid-area: lead; padding: 24px 24px 8px; background: var(--stage); border-radius: 18px 18px 0 0; }
  .has-why .why-title { font-size: 24px; }
  .has-why .why-more { grid-area: more; align-self: stretch; margin: 0; padding: 14px 24px 24px; border: 0; border-radius: 0 0 18px 18px; }
  .has-why .login-main { grid-area: main; margin: 0; padding: 8px 0 0; border-top: 0; }
  .has-why .login-title { padding-right: 52px; font-size: 26px; }
  .kit-going .why-compact .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 22px; }  /* the kit's wide note */
}
/* In the "Там съм!" window's note (a row that wraps) the benefits take a row of their own. */
.kit-going .why-more { flex: 1 1 100%; margin-top: 2px; }
/* A phone folds them behind one "Още с профила" line, closed at first (owner, 2026-11-25; the
   macro's `fold`, kit.js marks the box `is-foldable`); "Безплатно. Винаги." stays in sight. */
.why-fold-toggle { display: none; }
@media (max-width: 760px) {
  .why-fold.is-foldable { padding-top: 6px; padding-bottom: 12px; }
  .why-fold.is-foldable .why-more-title { display: none; }
  .why-fold.is-foldable .why-fold-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; text-align: left; }
  .why-fold-chev { transition: transform .2s; }
  .why-fold-toggle[aria-expanded="true"] .why-fold-chev { transform: rotate(180deg); }
  .why-fold.is-foldable:not(.is-open) .why-list { display: none; }
  .why-fold.is-foldable.is-open .why-list { margin-top: 4px; }
  .why-fold.is-foldable:not(.is-open) .why-free { margin-top: 0; }
}
.login-switch { font-size: 14.5px; color: var(--dim); }
.login-switch a { font-weight: 600; }
.login-box .field small { color: var(--faint); font-size: 13px; }
/* Continue with Google (owner, 2026-11-21; templates/account/_google.html), in Google's button
   branding: white, a grey stroke, the four-colour G, dark text; then an "или" line. */
.btn-google, .btn-google:hover { width: 100%; gap: 12px; border: 1px solid #747775; color: #1f1f1f; font-weight: 500; }
.btn-google { background: #fff; }
.btn-google:hover { background: #f6f8fa; }
.g-mark { flex: none; }
.login-or { display: flex; align-items: center; gap: 12px; margin: 2px 0; color: var(--faint); font-size: 13px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------------ the Terms box
   Every sign-up ticks it (owner, 2026-11-22; templates/account/_terms.html), the newsletter's line
   and its own box under it. Each box with its words is one whole press, at least 44 px high; the
   links inside open their page in a new tab. The step at /me/terms (templates/me/terms.html). */
.terms-pick { display: flex; flex-direction: column; gap: 0; text-align: left; }
.terms-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; margin: 0;
  font-size: 15px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.terms-check input { flex: none; width: 22px; height: 22px; margin: 0; padding: 0; accent-color: var(--ink); cursor: pointer; }
.terms-check input:focus { box-shadow: none; }
.terms-check input:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }
.terms-check a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.terms-news { margin: 0 0 0 32px; font-size: 14px; line-height: 1.5; color: var(--dim); }
.terms-check-news { align-items: center; padding: 4px 0; margin-left: 32px; font-size: 14px; color: var(--ink-2); }
.terms-check-news input { width: 20px; height: 20px; }
.terms-pick.has-error .terms-check:first-child { color: var(--warn); }
.terms-pick.has-error .terms-check:first-child input { outline: 2px solid var(--warn); outline-offset: 2px; }
.terms-error { margin: 0 0 6px 32px; padding: 8px 10px; border-radius: 10px; background: var(--warn-tint); border: 1px solid var(--warn-line);
  color: var(--warn); font-size: 14px; font-weight: 500; line-height: 1.45; }
.terms-step .eyebrow { margin-bottom: 6px; }
.terms-step-h { font-size: 26px; letter-spacing: -.025em; line-height: 1.2; }
.terms-step-lead { margin-top: 8px; color: var(--dim); font-size: 15px; }
.terms-step-all a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--mint-deep); }
.terms-step-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.terms-step-go { width: 100%; justify-content: center; }
.terms-step-out { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.terms-step-out > span { flex-basis: 100%; }
.terms-step-out form { margin: 0; }
.terms-step-out .btn { min-height: 44px; }
.privacy .terms-in-force { margin: 4px 0 0; }

/* ------------------------------------------------------------------ the band: confirming the e-mail afterwards
   A sign-up from a scan is signed in before its e-mail is confirmed (owner, 2026-11-22; docs/04,
   "Signing up from a scan"; templates/account/_confirm_band.html): a calm band under the header on
   every page but the moment of the action, the code typed right in it. 44 px targets, a 16 px+ field. */
.confirm-band { background: var(--violet-tint); border-bottom: 1px solid var(--violet-line); color: var(--ink-2); }
.confirm-band.is-last-day { background: var(--warn-tint); border-bottom-color: var(--warn-line); }
.confirm-band.is-done { background: var(--mint-tint); border-bottom-color: var(--mint-line); color: var(--mint-deep); }
.confirm-band-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 10px; padding-bottom: 10px; }
.confirm-band-text { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 300px; margin: 0; font-size: 15px; line-height: 1.4; }
.confirm-band-text strong { color: var(--ink); font-weight: 600; }
.confirm-band-text .icon { flex: none; margin-top: 1px; color: var(--violet-text); }
.confirm-band.is-last-day .confirm-band-text .icon { color: var(--warn); }
.confirm-band.is-done .confirm-band-text { font-weight: 600; }
.confirm-band.is-done .confirm-band-text .icon { color: var(--mint-text); }
.confirm-band-forms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.confirm-band-form { display: flex; gap: 8px; margin: 0; }
.confirm-band-code { width: 8.5em; height: 44px; padding: 0 12px; border-color: var(--violet-line); font-size: 17px;
  letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.confirm-band-code::placeholder { letter-spacing: 0; }
.confirm-band-button { min-height: 44px; }
.confirm-band-new { margin: 0; }
.confirm-band-link { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--violet-text); font-size: 14.5px;
  font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.confirm-band-link:hover { border: 0; background: rgba(255,255,255,.6); color: var(--ink); }
.confirm-band-note { flex: 1 0 100%; margin: 0; font-size: 14px; color: var(--ink-2); }
.confirm-band-note.is-error { color: var(--warn); font-weight: 600; }
@media (max-width: 560px) {
  .confirm-band-inner { padding-left: 16px; padding-right: 16px; }
  .confirm-band-forms { width: 100%; min-width: 0; }
  .confirm-band-form { flex: 1 1 100%; min-width: 0; }
  /* width 0 and a zero basis: the field takes what the button leaves, never pushing it off screen. */
  .confirm-band-code { flex: 1 1 0; width: 0; min-width: 0; }
}

/* ------------------------------------------------------------------ the bell (docs/16_MEMBERS.md) */
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
/* "Как работи" at every width (owner, 2026-11-25: "как работи бутона трябва да се вижда винаги - дори и на
   мобилна версия"): a word in the header's row; on a phone, where the row is full (logo, scan, QR, bell,
   menu), a thin line of its own under it (owner's choice), the header row keeping its 64 px. */
.head-how { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap; }
.head-how:hover { background: var(--tint); }
.how-line { display: none; }
@media (max-width: 640px) {
  .head-how { display: none; }
  .header-inner { flex-wrap: wrap; row-gap: 0; }
  .header-inner > :first-child { min-height: 64px; }
  .how-line { order: 2; display: flex; flex: 1 0 100%; align-items: center; justify-content: flex-end; gap: 2px; min-height: 34px;
    margin: 0 -16px; padding: 0 12px 0 16px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600;
    color: var(--ink); text-decoration: none; }
  .how-line:hover { border-top: 1px solid var(--line); background: var(--tint); }
}
.bell-pop { position: relative; }
.bell-button { position: relative; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--mint); color: var(--ink); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.bell-panel { min-width: 320px; max-width: 380px; }
.bell-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bell-item a { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px; border-radius: 10px; color: var(--text);
  font-size: 14px; line-height: 1.35; text-decoration: none; }
.bell-item a:hover { background: var(--tint); color: var(--text); }
.bell-item .icon { flex: none; margin-top: 1px; color: var(--dim); }
.bell-item.is-unread a { font-weight: 600; }
.bell-item.is-unread .icon { color: var(--mint-text); }
.bell-empty { padding: 6px 10px 2px; color: var(--dim); font-size: 14px; }
.bell-all { margin-top: 6px; padding: 8px 10px 2px; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 860px) {
  .bell-panel { left: 0; right: 0; min-width: 0; max-width: none; }
}
/* Моят QR in a phone's header (owner, 2026-11-22: "the QR button should be visible in mobile",
   "bell also should be there, but should be in the menu only if the check-in button is visible",
   "so we have only 2 seperate buttons there. QR and bell or QR and check-in"): beside the menu,
   the QR and the bell, or "Тук съм ✓" and the QR while the check-in's button shows. Then the bell
   is the menu's "Известия", with its count, and a mint dot on the menu while something is unread;
   checkin.js hides "Тук съм ✓" when its time is up, and the bell is back on its own (`:has`).
   Since 2026-11-22 the QR button is in the header at every width ("the QR button above which is
   always visible") and the filter bar has none; a computer and a tablet keep the bell, and never
   the menu's "Известия". Since 2026-11-23 the scan icon sits right beside it, at every width (owner:
   "the scan button should always be visible in mobile, next to the QR"), and the QR button shows a
   business card ("also the QR icon should adopt business card icon"). */
.menu-bell, .menu-dot { display: none; }
.head-qr { display: inline-flex; }  /* at every width (owner, 2026-11-22: "the QR button above which is always visible") */
.head-scan { display: inline-flex; }  /* beside it on a phone and a tablet (owner, 2026-11-23) */
/* Not on a computer (owner, 2026-11-23: "hide the button to scan a QR for PC in the menu"): a wide
   screen with a mouse; a touch tablet keeps it, its camera scans. /me/scan still answers. */
@media (min-width: 960px) and (pointer: fine) { .head-scan { display: none; } }
.head-qr, .head-qr:hover, .head-scan, .head-scan:hover { color: var(--text); text-decoration: none; }
.menu-pop > .menu-button { position: relative; }
.menu-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 2px #fff; }
.menu-count { margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--mint);
  color: var(--ink); font-size: 12px; font-weight: 700; line-height: 21px; text-align: center; }
@media (max-width: 640px) {
  .header-actions:has(.here-button:not([hidden])) .bell-pop { display: none; }
  .header-actions:has(.here-button:not([hidden])) .menu-bell,
  .header-actions:has(.here-button:not([hidden])) .menu-dot { display: block; }
}

/* ------------------------------------------------------------------ members who go (docs/16_MEMBERS.md) */
.members-block { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line-card);
  background: linear-gradient(180deg, #fff, var(--stage, #fafbfb)); }
.members-title { display: flex; align-items: center; gap: 8px; font-size: 16px; letter-spacing: -.012em; }
.members-title .icon { color: var(--mint-text); }
.member-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.member-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--text); text-decoration: none; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.member-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); color: var(--text); }
.member-card-text { display: flex; flex-direction: column; min-width: 0; }
.member-card-name { font-size: 14.5px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.member-card-sub { font-size: 13px; color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.members-note, .members-empty { font-size: 13px; color: var(--dim); }
.members-teaser { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.members-teaser .icon { color: var(--mint-text); }
.members-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.members-mine-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--dim); }
.members-mine-state.is-on { color: var(--mint-deep); font-weight: 600; }
.members-make { font-size: 13.5px; font-weight: 600; }
.member-write { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.member-arrived { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; color: var(--ink-2); }
.member-arrived .icon { color: var(--violet-text); }
.member-write-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.member-write-label { font-size: 15px; font-weight: 600; }
.member-write-help, .member-sends { font-size: 13px; color: var(--dim); }
.member-write-form textarea { width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
  font: 400 15px/1.45 var(--font); color: var(--text); resize: vertical; }
.member-write-form textarea:focus { outline: none; border-color: var(--mint-text); box-shadow: 0 0 0 3px rgba(56,217,190,.22); }
.member-write-form .btn { align-self: flex-start; }
.member-sensitive { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--warn); }
.member-sensitive .icon { flex: none; margin-top: 2px; }
.member-sent { padding: 10px 12px; border-radius: 12px; background: var(--mint-tint); color: var(--mint-deep); font-size: 14px; font-weight: 500; }
.member-need-card { font-size: 14px; color: var(--ink-2); }

/* The question after Ще отида (public.js askKit: "Искаш ли да споделиш с другите?"). */
.share-ask { width: min(460px, calc(100vw - 24px)); padding: 26px 26px 22px; border: 0; border-radius: 22px; background: #fff; color: var(--text);
  box-shadow: 0 30px 80px -30px rgba(12,14,16,.55); }
.share-ask::backdrop { background: rgba(12,14,16,.45); }
.share-ask-title { font-size: 21px; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 10px; }
.share-ask-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* Сподели's question (kit.js askShare): its three answers one under the other, full width. */
.share-ask-stack .share-ask-buttons { flex-direction: column; }
.share-ask-stack .share-ask-buttons .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .share-ask { margin: auto auto max(12px, env(safe-area-inset-bottom)); padding: 22px 20px 20px; }
  .share-ask-buttons .btn { flex: 1; justify-content: center; }
}

/* The kit's own link and its counts. */
.kit-own { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--violet-line); background: var(--violet-tint); }
.kit-own-line { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--violet-text); }
.kit-own-line .icon { flex: none; margin-top: 2px; }
.kit-own a:not([class]) { color: var(--violet-text); }
.kit-own-url { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kit-own-url code { padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--violet-line); font-size: 13.5px; word-break: break-all; }
.kit-own-stats { font-size: 14px; color: var(--ink-2); }
.kit-own-help { display: block; font-size: 12.5px; color: var(--dim); }

/* ------------------------------------------------------------------ the first visit's story (templates/public/_story.html)
   Owner, 2026-11-21: when the first row reaches the top the list holds still, the right column
   fades out and the six points appear beside the left column, each with its own hand-drawn arrow
   pointing left at the cards, the arrows making one drawn thread; "Ясно" waits under the points and
   grows at the end. static/js/story.js toggles the classes; CSS does the motion. */
.upcoming { position: relative; }
.upcoming.story-held { position: sticky; }
.upcoming .rows > li { transition: opacity .5s ease, transform .5s ease; }
.story { position: absolute; z-index: 5; left: 0; right: 0; pointer-events: none; }
.story-panel { display: flex; flex-direction: column; padding: 8px 0 0; opacity: 0; transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease; }
.story.is-on .story-panel { opacity: 1; transform: none; }
.story.is-done .story-panel { opacity: 0; transform: translateY(-8px); }
.story-steps { display: flex; flex-direction: column; gap: 26px; margin: 0; padding: 0; list-style: none; }
.story-step { position: relative; min-height: 34px; padding-left: 84px; }
/* The old points' words, hand-drawn arrows and underline, the grid's `is-aside` tiles and "Ясно"'s
   nod went with their markup and script (review 2026-11-24, frontend-copy 5). */
/* "Ясно": under the points, quiet while they come, big and dark at the end. */
.story-ok { pointer-events: none; align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
  margin: 34px 0 0 84px; height: 36px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); font: 600 14px var(--font); cursor: pointer; opacity: 0; visibility: hidden;
  transition: opacity .4s ease .3s, height .35s ease, padding .35s ease, font-size .35s ease, background .35s ease, color .35s ease,
    border-color .35s ease, box-shadow .35s ease, visibility 0s linear .7s; }
/* Hidden (out of the Tab order) and taking no clicks until the story plays (review 2026-11-20,
   M21: invisible, it lay over a card and a click there dismissed the story unseen). Back above
   the story it takes no clicks at once, so a click while it fades reaches the card under it,
   and it is hidden once faded. */
.story.is-on .story-ok { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: .3s, 0s, 0s, 0s, 0s, 0s, 0s, 0s, 0s; }
.story.is-end .story-ok { height: 56px; padding: 0 34px; font-size: 18px; background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 16px 34px -16px rgba(12,14,16,.65), 0 0 0 6px rgba(56,217,190,.18); }
.story-ok:hover { border-color: var(--ink); }
/* A finger-sized "Ясно" on touch screens from the start (UX review 2026-11-21). */
@media (max-width: 959px), (pointer: coarse) {
  .story-ok { height: 44px; padding: 0 22px; font-size: 15px; }
}
/* The held panel never runs below the screen (review 2026-11-20, H3: on a phone, a landscape phone
   or a short window "Ясно" sat under the edge while the page was held, and touch users were stuck).
   story.js sets --story-top, where the held panel starts (under the docked masthead); the panel is
   at most the rest of the visible height (dvh counts a phone's toolbars; vh where dvh is unknown)
   and scrolls inside, story.js keeping the newest point in view; "Ясно" is pinned to its bottom
   (sticky), so it is on screen at every size. The panel takes no pointer: swipes still move the page.
   Room under "Ясно" for its shadow, which the panel would cut (a phone's white card has its own). */
.story-panel { box-sizing: border-box; padding-bottom: 36px; overflow: hidden;
  max-height: calc(100vh - var(--story-top, 0px) - 10px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - var(--story-top, 0px) - 10px - env(safe-area-inset-bottom, 0px)); }
.story-panel > * { flex-shrink: 0; }
.story-ok { position: sticky; bottom: 10px; z-index: 1; }
/* A computer: the story takes the right half; in the list every second card steps aside. */
@media (min-width: 960px) {
  .story { left: calc(50% + 9px); }
  .upcoming:not(.upcoming-grid).story-on .rows > li:nth-child(even) { opacity: 0; transform: translateX(18px) scale(.98); pointer-events: none; }
}
/* A phone or a tablet: one column, so the cards dim and the story sits over them on a white card.
   No arrows here (UX review 2026-11-21: on the card they pointed at its own empty margin): each
   point has a dot in its arrow's colour, and a thin line joins the dots, the same thread. */
@media (max-width: 959px) {
  .story-panel { margin: 0 -4px; padding: 20px 16px 22px 0; border-radius: 20px; background: #fff;
    box-shadow: 0 20px 50px -26px rgba(12,14,16,.45); border: 1px solid var(--line); }
  .story-ok { margin-left: 46px; }
  .story-step { padding-left: 46px; }
  .story-step::before { content: ""; position: absolute; left: 19px; top: .5em; width: 11px; height: 11px; border-radius: 50%;
    background: var(--ink); opacity: 0; transform: scale(.4); transition: opacity .35s ease, transform .35s ease; }
  .story-step-2::before, .story-step-5::before { background: var(--violet-text); }
  .story-step-3::before, .story-step-6::before { background: var(--mint-text); }
  .story-step:not(:last-child)::after { content: ""; position: absolute; left: 24px; top: calc(.5em + 15px); bottom: -18px; width: 1.5px;
    background: var(--line-strong); transform-origin: top; transform: scaleY(0); transition: transform .45s ease .2s; }
  .story-step.is-on::before { opacity: 1; transform: none; }
  .story-step.is-on::after { transform: none; }
  .story-steps { gap: 22px; }
  .upcoming .group-title { transition: opacity .5s ease; }
  .upcoming.story-on .rows > li, .upcoming.story-on .group-title { opacity: .12; pointer-events: none; }
}
/* A short screen (a landscape phone, a low window; review 2026-11-20, H3): the points closer
   together, so more of them fit in the held panel. */
@media (max-height: 560px) {
  .story-steps { gap: 16px; }
  .story-ok { margin-top: 20px; }
}

/* ------------------------------------------------------------------ phone sizes (UX review 2026-11-21, #15)
   The owner's phone rules: every tap target 44 px, every text at least 13 px, inputs 16 px. Buttons
   keep their look and grow; small things in a row keep their size and gain an invisible 44 px
   press (an ::after around them); short inline links gain one too. A touch screen of any width
   gets the targets, a phone the text sizes. */
@media (max-width: 640px), (pointer: coarse) {
  .btn, button, .btn-sm { min-height: 44px; }
  .btn-sm { padding: 0 14px; font-size: 14px; }
  .icon-btn, .menu-button { width: 44px; height: 44px; }
  .menu-lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; }
  /* The cards' Ще отида / Може би: 44 px (visual review 2026-11-22, v2-12: 38). */
  .att { position: relative; height: 44px; min-height: 44px; padding: 0 14px; font-size: 14px; }
  .pill { height: 44px; }
  .attend-block .att, .attend-row .action-kit-beside { height: 44px; min-height: 44px; padding: 0 14px; }
  .chip-cloud { gap: 8px; }
  .chip-cloud .chip-filter { height: 44px; padding: 0 15px; font-size: 15px; }
  /* The event's topic chips, the "add to calendar" choices, the logos and the skip link. */
  .tags { gap: 8px 6px; }
  .tags a.chip { position: relative; height: 36px; padding: 0 13px; }
  .tags a.chip::after { content: ""; position: absolute; inset: -5px 0; }
  .chip-clear { display: inline-flex; align-items: center; min-height: 44px; }
  .menu a { display: flex; align-items: center; min-height: 44px; }
  .wordmark { min-height: 44px; }
  .skip { display: inline-flex; align-items: center; min-height: 44px; }
  /* The kit: moments, the pen and its placeholder buttons, the photo button (a label). */
  .moment { height: 44px; padding: 0 18px; }
  .pen { width: 44px; height: 44px; }
  .kit-token { height: 44px; padding: 0 14px; font-size: 14px; }
  .photo-pick { min-height: 44px; }
  .kit-back { min-height: 44px; }
  .reveal { width: 44px; height: 44px; right: 2px; }
  /* Short links in running text. */
  .map-link, .join-link, .login-other a, .login-switch a, .login-terms a, .members-make, .bell-all a, .kit-own-line a { position: relative; }
  .map-link::after, .join-link::after, .login-other a::after, .login-switch a::after, .login-terms a::after, .members-make::after,
  .bell-all a::after, .kit-own-line a::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }
  .footer-links a { min-height: 44px; }
  .bell-item a { min-height: 44px; }
  .organiser-links .btn { min-height: 44px; }
  /* The boxes' own small links are whole 44 px presses, not only an invisible area (visual review
     2026-11-22, v2-15: 17 to 20 px boxes). */
  .login-other a, .login-switch a, .members-make, .me-members-stats a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* The 13 px floor on every touch screen, a landscape phone and a tablet too (visual review
   2026-11-22, v2-13: at 641 px and wider the computer's 11.5 to 12.5 px applied). */
@media (max-width: 640px), (pointer: coarse) {
  .chip { height: 26px; font-size: 13px; }
  .chips > .chip { line-height: 24px; }
  .ev-wd, .ev-mo, .ev-len { font-size: 13px; }
  .ev-wd { letter-spacing: .04em; }
  .month-wd { font-size: 13px; letter-spacing: 0; }
  .pill-count, .bell-count { min-width: 21px; height: 21px; font-size: 13px; line-height: 21px; }
  .fact dt, .organiser-card-label, .control-label, .pop-title, .story-eyebrow, .mini-field { font-size: 13px; }
  .kit-own-help, .member-sensitive { font-size: 13px; }
  .upcoming-grid .ev-meta { font-size: 13px; }
  .header-actions { gap: 6px; }
}
/* Four buttons beside the logo on a phone since 2026-11-23 (the scan icon joined the QR, the bell or
   "Тук съм ✓", and the menu; owner: "the scan button should always be visible in mobile, next to the
   QR"): up to 400 px the gaps narrow (4 px between the buttons, 8 px after the logo), so the row fits
   360 px with the logo at its size; below 357 px the logo's letters are 17 px (from 21: the footer's
   wordmark size), still whole, so it fits 340 px too. Every button stays 44 px; nothing moves into
   the menu. */
@media (max-width: 400px) {
  .header-actions { gap: 4px; }
  .header-inner, .masthead-bar { column-gap: 8px; }
}
@media (max-width: 356px) {
  .header-inner > .wordmark, .masthead .masthead-home { font-size: 17px; }
}

/* Sign out in the menu (UX review 2026-11-21): a menu item that is a form's button, set apart by a
   hairline. */
.menu-out { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.menu-form { margin: 0; }
.menu-item-button, .menu-item-button:hover { width: 100%; justify-content: flex-start; min-height: 0; border: 0; background: none;
  font: 500 15px var(--font); color: var(--text); }
.menu-item-button:hover { background: var(--tint); }
@media (max-width: 860px) { .menu-item-button, .menu-item-button:hover { font-size: 16px; } }

/* ------------------------------------------------------------------ premium and pinned cards (migration 017)
   Owner, 2026-11-21: "Premium - listing with slightly different presentation in the list to look
   more premium and slightly visually pop slightly bigger as animation once when it's on the
   screen / pinned - if it's in the list (if not filtered out) to have a copy that stays in the
   beggining of the list". The list and the grid only (public.py `_list_row`), the month grid none.
   - Premium: the brand's violet-to-mint gradient as the card's 2 px edge (owner, 2026-11-22: "make
     the premium border slightly thicker"; was 1 px; still only the two signal colours), a soft violet and mint glow under it, and a small violet
     star in the top right corner; no words (if premium is ever sold, a "promoted" label may be
     needed). The white card and the page's white stay.
   - The pop: public.js adds `is-popping` once per card and page view, when the card first comes on
     screen: 1.03 and back in 600 ms (the `scale` property, so the hover's lift is untouched).
     Never under reduced motion (public.js does not start it, and the rule needs no-preference).
   - A pinned copy: no mark of its own (owner, 2026-11-22: the "Закачено" pill went, the frame's
     "Промо" says it); screen readers hear "Промо:" before its title, inside the link.
   - The pinned block (owner, 2026-11-22: "should have a thin line around the pinned area and very
     small title in the top left corner of the border itself called Промо"): a 1 px frame round the
     copies, and its heading "Промо" set into the frame's top edge on the left, small, the line
     cut behind it by the page's white. While the first visit's story is on, the frame and its
     title fade with the cards. */
.ev-card.is-premium { --premium-glow: 0 1px 1px rgba(16,24,40,.03), 0 16px 34px -18px rgba(86,54,199,.34), 0 8px 22px -16px rgba(11,133,115,.28);
  border-width: 2px; border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #a78bfa, #38d9be) border-box;
  box-shadow: var(--premium-glow); }
.ev-card.is-premium:hover { border-color: transparent; box-shadow: var(--premium-glow), 0 18px 38px -20px rgba(16,24,40,.3); }
.ev-card.is-premium.is-going { border-color: transparent; box-shadow: inset 4px 0 0 var(--mint), var(--premium-glow); }
.ev-card.is-premium.is-maybe { box-shadow: inset 4px 0 0 var(--violet), var(--premium-glow); }
@media (min-width: 960px) {
  .upcoming .ev-card.is-premium.is-going { box-shadow: inset 0 -4px 0 var(--mint), var(--premium-glow); }
  .upcoming .ev-card.is-premium.is-maybe { box-shadow: inset 0 -4px 0 var(--violet), var(--premium-glow); }
}
:is(.upcoming-grid, [data-tiles]) .ev-card.is-premium.is-going { box-shadow: inset 0 -4px 0 var(--mint), var(--premium-glow); }
:is(.upcoming-grid, [data-tiles]) .ev-card.is-premium.is-maybe { box-shadow: inset 0 -4px 0 var(--violet), var(--premium-glow); }
.ev-star { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--violet-text); pointer-events: none;
  box-shadow: 0 0 0 1px var(--violet-line), 0 6px 14px -6px rgba(86,54,199,.45); }
.ev-star .icon { fill: currentColor; }
@keyframes premium-pop { 0%, 100% { scale: 1; } 40% { scale: 1.03; } }
@media (prefers-reduced-motion: no-preference) {
  .ev-card.is-popping { z-index: 3; animation: premium-pop .6s cubic-bezier(.3, .7, .4, 1) both; }
}
.upcoming .group-pinned { position: relative; margin-top: 26px; padding: 18px 14px 14px; border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 6px); transition: border-color .5s ease; }
.pinned-label { position: absolute; top: 0; left: 16px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; margin: 0;
  padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--violet-text, #5636c7); color: #fff; font-size: 11.5px; font-weight: 700;
  line-height: 1.4; letter-spacing: .03em; transition: opacity .5s ease; }
.pinned-label svg { transform: rotate(18deg); }
/* The pin a pinned card wears (Yana, 2026-11-24), on its top left corner. */
.ev-pin { position: absolute; left: 8px; top: 8px; z-index: 3; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--violet-text, #5636c7); color: #fff; box-shadow: 0 6px 12px -6px rgba(86, 54, 199, .8), 0 0 0 2px #fff; transform: rotate(18deg);
  pointer-events: none; }
.upcoming.story-on .ev-pin { opacity: 0; }
.upcoming.story-on .group-pinned { border-color: transparent; }
.upcoming.story-on .pinned-label { opacity: 0; }
@media (max-width: 640px) {
  .upcoming .group-pinned { padding: 16px 8px 8px; border-radius: calc(var(--radius) + 4px); }
  .pinned-label { left: 12px; }
}
/* The pinned copies always on one row, in the list as in the grid (owner, 2026-11-22: "the pinned
   posts should be between 1 and 4, but should always be on 1 row doesn't matter list or grid").
   One copy is the view's own lone card across the width. Two to four (`data-tiles`, _listing.html)
   are the grid's tiles in both views, side by side and sharing the width: on a computer always all
   of them. Narrower than 960 px a tile keeps at least 200 px (44 % on a phone, so two share it), and
   a row that does not fit slides sideways, the next tile peeking at the edge: four on a tablet,
   three or four on a phone. The room above and under the sliding row keeps the hover's lift. */
.upcoming .group-pinned[data-tiles] > .rows { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.upcoming .group-pinned[data-tiles] > .rows > li.ev-card { grid-column: auto; }
@media (max-width: 959px) {
  .upcoming .group-pinned[data-tiles] > .rows { grid-auto-columns: minmax(min(200px, 44%), 1fr); overflow-x: auto;
    overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 0 8px; margin: -2px 0 -8px; }
  .upcoming .group-pinned[data-tiles] > .rows::-webkit-scrollbar { display: none; }
  .upcoming .group-pinned[data-tiles] > .rows > li.ev-card { scroll-snap-align: start; }
}
/* While the first visit's story holds the right half, the tiles under it step aside as the list's
   right-hand cards do: of two the second, of three the second and third, of four the third and
   fourth (the second of four stays: it ends where the story begins). */
@media (min-width: 960px) {
  .upcoming.story-on .group-pinned[data-tiles] .rows > li:first-child:nth-last-child(3) ~ li,
  .upcoming.story-on .group-pinned[data-tiles] .rows > li:first-child:nth-last-child(4) ~ li:nth-child(n+3) {
    opacity: 0; transform: translateX(18px) scale(.98); pointer-events: none; }
  .upcoming.story-on .group-pinned[data-tiles] .rows > li:first-child:nth-last-child(4) + li { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 640px) {
  /* One column without the picture: the star sits in the corner, so the words keep clear of it. */
  .upcoming:not(.upcoming-grid) .group:not([data-tiles]) .ev-card.is-premium .ev-main { padding-right: 26px; }
  /* Two small tiles across a phone: a smaller star, closer to the corner, covering less of the picture. */
  :is(.upcoming-grid, [data-tiles]) .ev-star { top: 6px; right: 6px; width: 24px; height: 24px; }
  :is(.upcoming-grid, [data-tiles]) .ev-star .icon { width: 12px; height: 12px; }
}


/* ------------------------------------------------------------------ the confirmed badge (docs/19_ORGANISATIONS.md)
   Owner, 2026-11-22: "all listings from registered organisation should have badge 'confirmed'".
   A calm blue with a check: never Premium's violet star, never the mint "Ще отида". Small and
   inline beside the organiser's name, so the card's line keeps its height (15_DESIGN.md). */
.ok-badge { display: inline-flex; align-items: center; gap: 3px; height: 18px; margin-left: 6px; padding: 0 6px 0 4px;
  border-radius: 999px; border: 1px solid #c3d4f5; background: #eef3fd; color: #1f4fa8; font-size: 11.5px; font-weight: 600;
  line-height: 1; letter-spacing: .01em; white-space: nowrap; vertical-align: 1px; }
.ok-badge .icon { flex: none; width: 11px; height: 11px; stroke-width: 3; }
.ok-badge-long { height: 26px; margin-left: 0; padding: 0 10px 0 8px; gap: 5px; font-size: 13.5px; }
.ok-badge-long .icon { width: 14px; height: 14px; }
.organiser-confirmed { margin-top: 8px; }
.organiser-card-name .ok-badge { vertical-align: 2px; }
/* In the grid's tiles and on a phone's card the badge is its check alone (the word stays for screen
   readers and in its title), the blue "verified" mark people know, so the name keeps its room. */
.ev-org .ev-org-name { min-width: 0; }
.ev-org .ok-badge { flex: none; margin-left: 0; }
.upcoming-grid .ev-org .ok-badge { width: 18px; padding: 0; justify-content: center; }
.upcoming-grid .ev-org .ok-badge > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 641px) {
  /* The grid's tile: the name and its badge side by side, the name cut short first (the phone's
     tile hides the organiser, as before). */
  .upcoming-grid .ev-org:has(.ok-badge) { display: flex; align-items: center; gap: 6px; }
  .upcoming-grid .ev-org:has(.ok-badge) .avatar { margin-right: 0; }
}
@media (max-width: 640px) {
  .ev-org .ok-badge { width: 18px; padding: 0; justify-content: center; }
  .ev-org .ok-badge > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ------------------------------------------------------------------ visual review 2026-11-22 (fixes_visual.md)
   The badge's word at 13 px (v2-13: 11.5). A short organiser name keeps the word on a phone's card
   (v2-14: a bare check people could not explain) and in a computer's tile; a wide tile shows it whatever
   the name (v1-20). The tile is its own size container, so its width decides. */
.ok-badge { height: 20px; font-size: 13px; }
@media (max-width: 640px) {
  .ev-org .ok-badge-word { width: auto; padding: 0 6px 0 4px; }
  .ev-org .ok-badge-word > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
.upcoming-grid .ev-card { container: tile / inline-size; }
@container tile (min-width: 240px) {
  .upcoming-grid .ev-org .ok-badge-word { width: auto; padding: 0 6px 0 4px; }
  .upcoming-grid .ev-org .ok-badge-word > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@container tile (min-width: 400px) {
  .upcoming-grid .ev-org .ok-badge { width: auto; padding: 0 6px 0 4px; }
  .upcoming-grid .ev-org .ok-badge > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
/* v1-16 (the logo's "live" on "Кога" while the bar rises in) is handled by masthead.js, which moves
   only the pills clear of the logo as drawn; a CSS shift of the whole bar put its icons under Menu. */

/* ------------------------------------------------------------------ the organisers page (/organisers)
   (owner, 2026-11-24: "same design as the list design but with logo and banner", then "it's grid
   style, not list. list is 2 columns"): the list's cards, two columns on a computer as the list's
   (from 960 px), one under the other below; the same white card with its hover. Each card: the
   organiser's banner across the top whole (4:1, as it was made), its logo over the banner's lower
   edge as in the organiser's window, then the name, the count of events to come and the next one.
   An organiser with none (`is-quiet`) keeps its card, its count grey. The Места page (/venues)
   wears the same cards, a venue's address under its name, the list's filter bar on top. */
.orgs .cal-head { margin-bottom: 24px; }
.org-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 960px) { .org-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.org-tile { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff;
  border: 1px solid var(--line-card); border-radius: var(--radius); transition: border-color .18s, box-shadow .18s, transform .18s; }
.org-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.org-tile-banner { display: block; width: 100%; aspect-ratio: 4 / 1; max-height: 160px; object-fit: cover; background: var(--tint);
  border-bottom: 1px solid var(--line); }
.org-tile-banner-empty { background: var(--grad); opacity: .3; border-bottom: 0; }
.org-tile-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 18px 18px; }
.org-tile-logo { position: relative; width: 72px; height: 72px; margin-top: -36px; border: 3px solid #fff; background: #fff;
  box-shadow: 0 6px 16px -10px rgba(12, 14, 16, .45); font-size: 22px; }
.org-tile-logo.avatar-initials { background: var(--grad); }
.org-tile-name { margin: 2px 0 0; font-size: 17.5px; line-height: 1.3; font-weight: 600; letter-spacing: -.014em; overflow-wrap: anywhere; }
.org-tile-name a { color: var(--text); text-decoration: none; }
/* A venue's address and city (the Места page), on one line. */
.org-tile-place { display: flex; align-items: center; gap: 6px; max-width: 100%; margin: -2px 0 0; font-size: 13.5px; color: var(--dim); }
.org-tile-place .icon { flex: none; color: var(--faint); }
.org-tile-place span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.org-tile-count { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0; padding: 4px 10px; border-radius: 999px;
  background: var(--tint); color: var(--faint); font-size: 13px; font-weight: 600; }
.org-tile-count .icon { flex: none; }
.org-tile-count.has-events { background: var(--mint-tint); color: var(--mint-deep); }
.org-tile-next { display: grid; gap: 2px; width: 100%; margin: auto 0 0; padding-top: 6px; font-size: 13.5px; color: var(--dim); }
.org-tile-when { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.org-tile-when strong { font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -.025em; }
.org-tile-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .org-tile-body { gap: 7px; padding: 0 14px 14px; }
  .org-tile-logo { width: 60px; height: 60px; margin-top: -30px; font-size: 19px; }
  .org-tile-name { font-size: 16.5px; }
  .org-tile-when strong { font-size: 18px; }
}
