/*
 * style.css - весь внешний вид Mini App «Сплетницы».
 * 1. Токены цветов (светлая и тёмная тема) - менять цвета только здесь
 * 2. Каркас приложения: экраны, нижняя панель, safe area
 * 3. Анимации переходов (slide 280ms, fade 220ms)
 * 4. Компоненты: карточки, кнопки, плашки, чипы, формы
 * 5. Экраны: афиша, встреча, запись, клубы, о нас
 * Правила из брифа: кнопки от 44px (главные 52px), шрифт от 14px, белый текст на жёлтом не используем
 */

/* ========== 1. ТОКЕНЫ ========== */
:root,
:root[data-theme="light"] {
  --bg: #FDE2EA;            /* розовый фон */
  --card: #FFFFFF;          /* белые карточки */
  --text: #3B2A30;          /* тёмный тёплый текст */
  --hint: #86707A;
  --accent: #FFC93C;        /* фирменный жёлтый: главные кнопки, активная вкладка */
  --accent-ink: #D99A00;    /* жёлтый для иконок на белом (читается лучше) */
  --accent-soft: rgba(255, 201, 60, .38);
  --on-accent: #3B2A30;     /* текст на жёлтом - только тёмный */
  --pink-soft: #FCEEF2;
  --pink-soft2: #FAD4DF;
  --line: rgba(59, 42, 48, .08);
  --line-strong: rgba(59, 42, 48, .16);
  --shadow: 0 6px 22px rgba(176, 72, 110, .10), 0 1px 3px rgba(176, 72, 110, .08);
  --link: #B8406F;
  --ok-bg: rgba(52, 168, 83, .14);
  --ok-text: #1E7B3A;
  --hot-bg: #FFF1CC;
  --hot-text: #8A5A00;
  --danger: #D93A4A;
  --muted-bg: #F1E4E9;
  --bar: rgba(255, 246, 249, .9);
  --input-bg: #FFF9FB;
  --sk: #F6E6EC;
  --press: #FFF3F7;
  --toast-bg: #3B2A30;
  --toast-text: #FFFFFF;
  /* Узор из ромашек: тихий, низкий контраст */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cdefs%3E%3Cg id='d'%3E%3Cg fill='%23fff' fill-opacity='.75'%3E%3Cellipse cy='-7' rx='3' ry='6'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(45)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(90)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(135)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(180)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(225)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(270)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(315)'/%3E%3C/g%3E%3Ccircle r='3.2' fill='%23FFC93C' fill-opacity='.55'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23d' transform='translate(34 38)'/%3E%3Cuse href='%23d' transform='translate(118 112) scale(.75)'/%3E%3Cuse href='%23d' transform='translate(124 30) scale(.5)'/%3E%3Cuse href='%23d' transform='translate(40 128) scale(.55)'/%3E%3C/svg%3E");

  --tabbar-h: 64px;
  --safe-top: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Тёмная тема включается сама по теме Telegram (tg.js ставит data-theme) */
:root[data-theme="dark"] {
  --bg: #1C1417;
  --card: #281D22;
  --text: #F6EAEE;
  --hint: #B49DA6;
  --accent: #FFC93C;
  --accent-ink: #FFC93C;
  --accent-soft: rgba(255, 201, 60, .22);
  --on-accent: #3B2A30;
  --pink-soft: #34252B;
  --pink-soft2: #43303A;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .16);
  --shadow: 0 6px 22px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
  --link: #FF9EC0;
  --ok-bg: rgba(111, 213, 142, .14);
  --ok-text: #7EDC9B;
  --hot-bg: rgba(255, 201, 60, .16);
  --hot-text: #FFD66B;
  --danger: #FF6B78;
  --muted-bg: #34282D;
  --bar: rgba(32, 23, 27, .92);
  --input-bg: #21181C;
  --sk: #33262C;
  --press: #30232A;
  --toast-bg: #F6EAEE;
  --toast-text: #2A1F23;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cdefs%3E%3Cg id='d'%3E%3Cg fill='%23fff' fill-opacity='.05'%3E%3Cellipse cy='-7' rx='3' ry='6'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(45)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(90)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(135)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(180)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(225)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(270)'/%3E%3Cellipse cy='-7' rx='3' ry='6' transform='rotate(315)'/%3E%3C/g%3E%3Ccircle r='3.2' fill='%23FFC93C' fill-opacity='.12'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23d' transform='translate(34 38)'/%3E%3Cuse href='%23d' transform='translate(118 112) scale(.75)'/%3E%3Cuse href='%23d' transform='translate(124 30) scale(.5)'/%3E%3Cuse href='%23d' transform='translate(40 128) scale(.55)'/%3E%3C/svg%3E");
}

/* ========== 2. КАРКАС ========== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;              /* прокручиваются только экраны, не страница */
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Приложение - колонка до 430px (на широком экране по центру) */
#app {
  position: fixed;
  top: 0; left: 0; right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 430px;
  height: var(--app-h, 100%);    /* высота от стабильного viewport Telegram, не 100vh */
  overflow: hidden;
  overflow: clip;                /* фокус на поле не должен сдвигать весь каркас */
  background: var(--bg) var(--pattern);
}

#stack { position: absolute; inset: 0; }

.screen {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: var(--bg) var(--pattern);  /* непрозрачный, чтобы при сдвиге не просвечивал нижний экран */
  padding-top: var(--safe-top);
  padding-bottom: calc(28px + var(--safe-bottom));
}
.screen-in { min-height: 100%; }
body.has-tabbar .screen { padding-bottom: calc(var(--tabbar-h) + 24px + var(--safe-bottom)); }
body.has-main .screen { padding-bottom: calc(96px + var(--safe-bottom)); }
.is-hidden { visibility: hidden; }

.pad { padding: 0 16px; }
.top-gap { padding-top: 16px; }
.stack-gap { display: flex; flex-direction: column; gap: 12px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }

/* Нижняя панель вкладок */
#tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: var(--bar);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 240ms var(--ease);
}
body.has-tabbar #tabbar { transform: none; }

.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-height: 52px;
  border: 0; background: none; padding: 0;
  color: var(--hint);
  font: 500 14px/1.1 var(--sans);
  letter-spacing: -.2px;
  white-space: nowrap;
}
.tab-ic {
  font-size: 20px; line-height: 28px;
  padding: 0 16px;
  border-radius: 14px;
  transition: background-color 200ms;
  filter: grayscale(.6) opacity(.75);
}
.tab.active { color: var(--text); font-weight: 650; }
.tab.active .tab-ic { background: var(--accent-soft); filter: none; }

/* ========== 3. АНИМАЦИИ ========== */
@keyframes push      { from { transform: translateX(100%); } to { transform: none; } }
@keyframes under     { from { transform: none; opacity: 1; } to { transform: translateX(-28%); opacity: .5; } }
@keyframes pop       { from { transform: none; } to { transform: translateX(100%); } }
@keyframes backUnder { from { transform: translateX(-28%); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade      { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes shimmer   { from { background-position: -200px 0; } to { background-position: 200px 0; } }
@keyframes popIn     { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw      { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes bloom     { from { transform: rotate(-40deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.anim-push       { animation: push 280ms var(--ease) both; z-index: 2; box-shadow: -10px 0 30px rgba(0, 0, 0, .12); }
.anim-under      { animation: under 280ms var(--ease) both; z-index: 1; }
.anim-pop        { animation: pop 250ms cubic-bezier(.4, 0, .6, 1) both; z-index: 2; box-shadow: -10px 0 30px rgba(0, 0, 0, .12); }
.anim-back-under { animation: backUnder 250ms cubic-bezier(.4, 0, .6, 1) both; z-index: 1; }
.anim-fade       { animation: fade 220ms ease-out both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Отклик на касание: лёгкое сжатие */
.tap { cursor: pointer; transition: transform 140ms var(--ease), background-color 140ms, opacity 140ms, filter 140ms; }
.tap:active { transform: scale(.97); }
.mrow.tap:active, .club-card.tap:active, .banner.tap:active { transform: scale(.985); }
.btn:active, .chip:active { filter: brightness(.94); }

/* ========== 4. КОМПОНЕНТЫ ========== */
button { font-family: inherit; color: inherit; -webkit-appearance: none; appearance: none; }

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.hint { color: var(--hint); font-size: 15px; line-height: 1.4; }
.label { display: block; color: var(--hint); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.label .hint { font-size: 14px; font-weight: 400; }
.small-gap { margin-top: 10px; }

.h1 { font: 700 28px/1.15 var(--serif); margin: 4px 0 6px; letter-spacing: -.2px; }
.h2 { font: 700 20px/1.2 var(--serif); margin: 0; }
.h2.sec { margin-top: 10px; }
.lead { color: var(--hint); font-size: 15px; margin: 0 0 4px; }

/* Иконки */
.ic { width: 20px; height: 20px; flex: none; }
.ic-accent { color: var(--accent-ink); width: 22px; height: 22px; }
.ic-lg { width: 32px; height: 32px; }
.ic-xl { width: 56px; height: 56px; color: var(--hint); }
.row-ic { display: flex; gap: 12px; align-items: flex-start; }
.row-ic > div { flex: 1; min-width: 0; }

/* Ссылка-кнопка: зона касания больше, чем текст */
.link {
  background: none; border: 0;
  padding: 12px 2px; margin: -12px -2px;
  color: var(--link);
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border: 0; border-radius: 16px;
  font: 600 16px/1.2 var(--sans);
  text-align: center;
}
.btn .ic { width: 20px; height: 20px; }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(255, 180, 0, .28); }
.btn-soft { background: var(--pink-soft2); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border: 1.5px solid currentColor; }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; border-radius: 14px; font-size: 15px; flex: none; }
.btn-sm .ic { width: 18px; height: 18px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-pair .btn { padding: 0 10px; font-size: 15px; }

/* Плашки */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 14px; font-weight: 600; line-height: 1;
  white-space: nowrap;
}
.pill .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.pill-soft  { background: var(--pink-soft); }
.pill-line  { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.pill-hot   { background: var(--hot-bg); color: var(--hot-text); }
.pill-ok    { background: var(--ok-bg); color: var(--ok-text); }
.pill-wait  { background: var(--accent-soft); }
.pill-off   { background: var(--muted-bg); color: var(--hint); }
.pill-glass { background: rgba(255, 255, 255, .88); color: #3B2A30; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Чипы-фильтры */
.chips {
  display: flex; gap: 8px;
  margin: 16px -16px 14px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 0; border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  font: 600 15px/1 var(--sans);
  transition: background-color 180ms, transform 140ms;
}
.chip.active { background: var(--accent); color: var(--on-accent); }

/* Переключатель из двух вариантов */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px;
  border-radius: 15px;
  background: var(--pink-soft);
}
.seg-wide { margin: 12px 0 16px; background: var(--card); box-shadow: var(--shadow); }
.seg-btn {
  min-height: 44px;
  border: 0; border-radius: 11px;
  background: transparent;
  color: var(--hint);
  font: 600 15px/1.1 var(--sans);
  transition: background-color 200ms, color 200ms;
}
.seg-btn.active { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.seg-wide .seg-btn.active { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.seg-btn:disabled { opacity: .45; }

/* Три варианта в переключателе (повтор, «1 из 2») */
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-3 .seg-btn { padding: 0 4px; font-size: 14px; }

/* Поле ввода (16px, чтобы iOS не увеличивал страницу) */
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--text);
  font: 16px/1.4 var(--sans);
  resize: none;
  outline: none;
  user-select: text; -webkit-user-select: text;
  transition: border-color 160ms;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--hint); opacity: .8; }

/* Галочка согласия */
.check { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; font-size: 15px; line-height: 1.4; }
.check input { position: absolute; left: 16px; top: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.check .box {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 2px solid var(--line-strong);
  transition: background-color 160ms, border-color 160ms;
}
.check .box .ic { width: 18px; height: 18px; stroke-width: 3; opacity: 0; color: var(--on-accent); transition: opacity 160ms; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box .ic { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--link); outline-offset: 2px; }

/* Плашка статуса на карточке встречи */
.banner {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 52px;
  padding: 12px 14px;
  border: 0; border-radius: 16px;
  font: 600 15px/1.35 var(--sans);
  text-align: left;
}
.banner .link { margin-left: auto; padding-left: 8px; }
.banner-ok   { background: linear-gradient(var(--ok-bg), var(--ok-bg)), var(--card); color: var(--ok-text); box-shadow: var(--shadow); }
.banner-ok .ic { stroke-width: 2.6; }
.banner-wait { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--card); box-shadow: var(--shadow); }
.banner-off  { background: var(--card); box-shadow: var(--shadow); justify-content: space-between; }

/* Аватары */
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-letter { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 20px; font-weight: 700; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 42% 18%; flex: none; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.who { display: flex; align-items: center; gap: 12px; }

/* Пустые и ошибочные состояния */
.state { text-align: center; padding: 48px 24px; }
.state-ic { display: flex; justify-content: center; margin-bottom: 14px; }
.state h2 { font: 700 21px/1.2 var(--serif); margin: 0; }
.state p { margin: 8px 0 20px; }

/* Skeleton при загрузке */
.sk-box, .sk-line {
  background: linear-gradient(90deg, var(--sk) 0, var(--pink-soft) 50%, var(--sk) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.2s linear infinite;
}
.sk-line { height: 14px; border-radius: 7px; margin: 6px 0; }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }

/* Тост */
#toast {
  position: absolute; left: 50%; z-index: 50;
  bottom: calc(var(--tabbar-h) + 20px + var(--safe-bottom));
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--toast-bg); color: var(--toast-text);
  font-size: 15px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity 200ms, transform 220ms var(--ease);
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Просмотр фото на весь экран */
#viewer { position: absolute; inset: 0; z-index: 60; background: rgba(15, 8, 11, .96); opacity: 0; transition: opacity 200ms; }
#viewer.open { opacity: 1; }
.viewer-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: center; padding: 16px; }
.viewer-slide img { max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; }
.viewer-count { position: absolute; left: 0; right: 0; bottom: calc(20px + var(--safe-bottom)); text-align: center; color: #fff; font-size: 15px; opacity: .85; }

/* Кнопки-заменители для проверки в браузере (в Telegram скрыты) */
#fake-back {
  position: absolute; z-index: 20;
  top: calc(10px + var(--safe-top)); left: 12px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--card); color: var(--text);
  box-shadow: var(--shadow);
}
#fake-main {
  position: absolute; z-index: 20;
  left: 16px; right: 16px; bottom: calc(12px + var(--safe-bottom));
  min-height: 52px;
  border: 0; border-radius: 16px;
  background: var(--accent); color: var(--on-accent);
  font: 600 17px/1 var(--sans);
  box-shadow: 0 8px 20px rgba(255, 180, 0, .35);
}
#fake-main:disabled { background: var(--muted-bg); color: var(--hint); box-shadow: none; }
body.in-telegram #fake-back, body.in-telegram #fake-main { display: none !important; }
/* В браузере освобождаем место под стрелку «назад» */
body:not(.in-telegram) .top-gap { padding-top: 66px; }
.nowrap { white-space: nowrap; }

/* Заставка */
#splash {
  position: absolute; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg) var(--pattern);
  transition: opacity 350ms ease, transform 350ms ease;
}
#splash.hide { opacity: 0; transform: scale(1.04); pointer-events: none; }
.splash-daisy { animation: bloom 700ms var(--ease) both; filter: drop-shadow(0 8px 18px rgba(176, 72, 110, .18)); margin-bottom: 8px; }
.splash-title { font: 700 36px/1.1 var(--serif); animation: fade 500ms 200ms ease-out both; }
.splash-sub { color: var(--hint); font-size: 15px; animation: fade 500ms 320ms ease-out both; }

/* ========== 5. ЭКРАНЫ ========== */

/* Шапка с логотипом */
.brandbar { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.logo { font: 700 24px/1 var(--serif); letter-spacing: -.3px; }
.city {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--hint); font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.hello { font: 700 28px/1.15 var(--serif); margin: 18px 0 6px; }

/* Строка встречи в ленте */
.mrow {
  display: flex; gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0; border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
}
.mrow.is-muted { opacity: .6; }
.mrow-img { position: relative; flex: none; width: 92px; height: 116px; border-radius: 14px; overflow: hidden; background: var(--sk); }
.mrow-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.date-badge {
  position: absolute; top: 6px; left: 6px;
  min-width: 42px;
  padding: 4px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  color: #3B2A30;
  display: flex; flex-direction: column; align-items: center;
  font-size: 14px; line-height: 1.05;
}
.date-badge b { font-size: 18px; }
.mrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 2px 2px 2px 0; }
.mrow-club { color: var(--hint); font-size: 14px; font-weight: 600; }
.mrow-title { font-size: 17px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mrow-meta { color: var(--hint); font-size: 14px; }
.mrow .pills { margin-top: auto; padding-top: 6px; }
.mrow.sk { box-shadow: var(--shadow); }

/* Большая обложка */
.hero { position: relative; height: min(84vw, 340px); border-radius: 0 0 28px 28px; overflow: hidden; background: var(--sk); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(30, 10, 18, .72) 100%); }
.hero-text { position: absolute; left: 16px; right: 16px; bottom: 44px; color: #fff; }
.hero-text h1 { font: 700 30px/1.12 var(--serif); margin: 10px 0 4px; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.hero-sub { font-size: 15px; opacity: .92; }
.hero + .pad { margin-top: -28px; position: relative; }
/* Плашка статуса не заезжает на обложку: сначала чистое фото, под ним плашка */
.hero + .pad > .banner:first-child { margin-top: 40px; }

/* Информация о встрече */
.info { display: flex; flex-direction: column; gap: 14px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; }
.info-row > div { flex: 1; min-width: 0; }

/* Сворачиваемый текст клуба */
.clamp { margin-top: 8px; font-size: 15px; line-height: 1.45; max-height: 2.9em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.clamp.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.clamp p, .text p { margin: 0 0 10px; }
.clamp p:last-child, .text p:last-child { margin-bottom: 0; }
.b { font-weight: 700; }
.more { display: inline-block; margin-top: -4px; }
.text { font-size: 15px; line-height: 1.5; }
.text .ic-lg { display: block; margin-bottom: 10px; }

/* Донат */
.donate-num {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: var(--pink-soft);
}
.num { font-size: 18px; font-weight: 700; letter-spacing: .3px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Ведущая */
.leader-top { display: flex; align-items: center; gap: 14px; }
.leader-top .label { margin-bottom: 2px; }
.leader-name { font-size: 17px; font-weight: 700; line-height: 1.25; }
.leader .hint { font-size: 14px; }
.quote { margin: 14px 0 0; padding-left: 12px; border-left: 3px solid var(--accent); font: italic 500 16px/1.45 var(--sans); }

/* Мини-карточка (форма записи, очередь) */
.mini { display: flex; align-items: center; gap: 12px; padding: 10px; }
.mini img { width: 64px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.mini > div { min-width: 0; }
.now .label { margin-bottom: 2px; }

/* Детали записи */
.ticket-head { display: flex; gap: 14px; align-items: center; padding: 12px; }
.ticket-head img { width: 84px; height: 104px; border-radius: 14px; object-fit: cover; flex: none; }
.ticket-head .pills { margin-top: 8px; }

/* Подтверждение */
.done { text-align: center; padding: 16px 0 4px; }
.done-circle {
  width: 92px; height: 92px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 30px rgba(255, 180, 0, .4);
  animation: popIn 480ms var(--ease) both;
}
.done-circle .ic { width: 46px; height: 46px; stroke-width: 2.6; stroke-dasharray: 30; animation: draw 420ms 260ms ease-out both; }
.done-circle.wait { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.done-circle.wait .ic { stroke-dasharray: none; animation: none; width: 40px; height: 40px; stroke-width: 1.8; }
.done .hint { margin: 4px 0 0; }

/* Клубы */
.club-card {
  display: block; width: 100%;
  padding: 0; border: 0; border-radius: 22px;
  background: var(--card); box-shadow: var(--shadow);
  overflow: hidden; text-align: left; font: inherit;
}
.club-img { height: 190px; background: var(--sk); }
.club-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.club-body { padding: 14px 16px 16px; }
.club-title { font: 700 21px/1.2 var(--serif); margin-bottom: 8px; }
.clamp2 { margin: 10px 0 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Галерея «Как это было» */
.gallery {
  display: flex; gap: 10px;
  margin: 0 -16px; padding: 2px 16px 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gal { flex: none; width: 132px; height: 176px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; scroll-snap-align: start; box-shadow: var(--shadow); background: var(--sk); }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* О нас */
.about-card { padding: 0; overflow: hidden; margin-top: 14px; }
.about-img { width: 100%; height: 210px; object-fit: cover; object-position: center 30%; display: block; }
.about-text { padding: 14px 16px 16px; }
.about-text p { margin: 0; font-size: 15px; }

.acc { padding: 0; }
.acc summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0 16px;
  list-style: none; cursor: pointer;
  font-size: 16px; font-weight: 700;
}
.acc summary::-webkit-details-marker { display: none; }
.acc-ic { color: var(--hint); transition: transform 220ms var(--ease); }
.acc[open] .acc-ic { transform: rotate(90deg); }
.acc[open] .acc-body { animation: fade 220ms ease-out both; }
.acc-body { padding: 0 16px 16px; font-size: 15px; }
.acc-body > p { margin: 0 0 10px; }
.qa + .qa { margin-top: 14px; }
.qa p { margin: 4px 0 0; }
.qa + .hint { margin-top: 14px; }

.rules { margin: 0; padding-left: 24px; font-size: 15px; }
.rules li { margin: 0 0 8px; line-height: 1.4; }
.rules li:last-child { margin-bottom: 0; }
.rules li::marker { color: var(--accent-ink); font-weight: 700; }

.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.contact {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 78px;
  border: 0; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow);
  font: 600 14px/1.1 var(--sans);
}
.foot { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; margin-top: 4px; }

/* ========== 6. АДМИНКА (js/admin.js) ========== */
#tabbar.has-admin { grid-template-columns: repeat(5, 1fr); }
#tabbar.has-admin .tab-ic { padding: 0 10px; }
#tabbar.has-admin .tab { font-size: 13px; }

.adm-new { margin-top: 12px; }
.adm-link { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; font: 600 16px/1.3 var(--sans); margin-top: 16px; min-height: 60px; }
.adm-link span { flex: 1; }
.adm-link .ic:last-child { color: var(--hint); }

.adm-covers { margin: 0 -16px; padding: 4px 16px; }
.gal.on { box-shadow: 0 0 0 3px var(--accent); }

.att-list { display: flex; flex-direction: column; margin-top: 8px; }
.att { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.att:first-child { border-top: 0; }
.att .avatar { width: 44px; height: 44px; font-size: 18px; }
.att-main { flex: 1; min-width: 0; }
.att-main .hint { font-size: 14px; }
.att-name { font-weight: 700; font-size: 16px; padding: 0; margin: 0; display: block; text-align: left; }
.att-note { margin-top: 4px; font-size: 14px; line-height: 1.35; font-style: italic; }
.att-flag {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  background: transparent; font: 600 14px/1 var(--sans);
}
.att-flag .ic { width: 16px; height: 16px; stroke-width: 2.6; opacity: .35; }
.att-flag.on { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.att-flag.on .ic { opacity: 1; }
.att-flag:disabled { opacity: .6; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat { text-align: center; padding: 14px 8px; }
.stat-n { font: 700 34px/1.1 var(--serif); }
.stat-list .mrow-club { margin-bottom: 2px; }
.stat-pills { margin-top: 10px; }

/* Узкий экран 320px: чуть плотнее */
@media (max-width: 350px) {
  .h1, .hello { font-size: 25px; }
  .mrow-img { width: 80px; height: 104px; }
  .tab-ic { padding: 0 12px; }
  #tabbar.has-admin .tab-ic { padding: 0 6px; }
  .btn-pair { grid-template-columns: 1fr; }
}

/* Админка: места вручную и фото клубов */
.step { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 12px 0 4px; }
.step-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(127, 127, 127, .16); color: inherit; font: 600 28px/1 var(--sans); }
.step-btn:disabled { opacity: .35; }
.step-n { min-width: 48px; text-align: center; font: 700 32px/1 var(--sans); }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.ph-item { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--sk); }
.ph-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-base { opacity: .75; }
.ph-del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font: 600 15px/1 var(--sans); }
.adm-ic { flex: none; font-size: 20px; width: 24px; text-align: center; }

/* ========== ОТЗЫВЫ ========== */
.stars { color: var(--accent-ink); font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.review-sum { margin: -4px 0 0; }
.review-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.review-text { margin: 10px 0 0; font-size: 15px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.review[hidden] { display: none; }
.review-hide { display: block; margin-top: 12px; font-size: 14px; color: var(--hint); }
.review-cta { display: block; width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.review-cta .hint { margin-top: 4px; }
.star-row { display: flex; gap: 6px; justify-content: space-between; }
.star {
  flex: 1; height: 52px; border: 0; border-radius: 14px;
  background: var(--pink-soft); color: var(--hint);
  font-size: 30px; line-height: 1; cursor: pointer;
}
.star.on { background: var(--accent-soft); color: var(--accent-ink); }

/* Предупреждение в списке записавшихся: напоминание этой участнице не дойдёт */
.warn-line { color: var(--accent); font-weight: 600; margin-top: 2px; }
