/* =========================================================
   Свой сектор · ui-system.css · v1 · 31.10.2026
   Слой поверх styles.css и community.css.
   Подключать ПОСЛЕДНИМ, вместо ui-consistency.css:
   <link rel="stylesheet" href="/ui-system.css?v=20261031-1">
   Селекторы взяты из текущих styles.css / ui-consistency.css.
   Перед релизом проверить на экранах из README, раздел 6.
   ========================================================= */

:root{
  /* ---- цвет ---- */
  --ink:#0A0B0D;          /* текст, выбранное, вторая кнопка */
  --text:#3E423E;         /* основной текст */
  --muted:#6B6E6A;        /* подписи, неактивное */
  --line:#ECECEA;         /* разделители, рамки карточек */
  --line-strong:#D9D9D9;  /* рамки кнопок, чипов, полей */
  --surface:#F4F4F2;      /* мягкие подложки, сегменты */
  --white:#FFFFFF;
  --accent:#8DFF00;       /* цвет события: главная кнопка, «идут» */
  --accent-ink:#0A0B0D;   /* текст на акценте */
  --danger:#A92C27;
  --volt:var(--accent);   /* совместимость со старым токеном */
  --concrete:var(--muted);

  /* ---- выбранное состояние: одно на всё приложение ---- */
  --ui-selected-bg:var(--ink);
  --ui-selected-fg:#FFFFFF;
  --ui-selected-border:var(--ink);

  /* ---- радиусы ---- */
  --r-s:10px;   /* кнопки, поля */
  --r-m:16px;   /* карточки */
  --r-l:22px;   /* листы, фото, крупные блоки */
  --r-pill:999px;

  /* ---- отступы (шаг 4) ---- */
  --s-1:4px;--s-2:8px;--s-3:12px;--s-4:16px;--s-5:20px;--s-6:24px;--s-8:32px;
  --screen-x:18px;

  /* ---- шрифт ---- */
  --f-display:"Oswald","Arial Narrow",Arial,sans-serif;
  --f-text:"Golos Text",Arial,sans-serif;
  --t-h1:32px;  --t-h1-lh:30px;   /* Oswald 700, uppercase */
  --t-h2:22px;  --t-h2-lh:22px;   /* Oswald 700, uppercase */
  --t-ev:18px;  --t-ev-lh:19px;   /* название события в ленте, Oswald 700 */
  --t-title:15px;                 /* Golos 600, строки списков */
  --t-body:14px; --t-body-lh:20px;
  --t-small:12px; --t-small-lh:17px;
  --t-eyebrow:11px;               /* Golos 600, uppercase, .06em */

  /* ---- чипы (совместимость с ui-consistency.css) ---- */
  --ui-chip-height:34px;
  --ui-chip-radius:var(--r-pill);
  --ui-chip-font:12px;
}

/* ---------- база ---------- */
body,.app-shell{background:var(--white);color:var(--text);font-family:var(--f-text)}
.screen{padding-left:var(--screen-x);padding-right:var(--screen-x)}

/* ---------- типографика ---------- */
.h1,.display-title{font-family:var(--f-display);font-weight:700;text-transform:uppercase;font-size:var(--t-h1);line-height:var(--t-h1-lh);letter-spacing:0;color:var(--ink)}
.h2{font-family:var(--f-display);font-weight:700;text-transform:uppercase;font-size:var(--t-h2);line-height:var(--t-h2-lh);color:var(--ink)}
.lead{font-size:var(--t-body);line-height:var(--t-body-lh);color:var(--text)}
.eyebrow{font-size:var(--t-eyebrow);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.muted{font-size:var(--t-small);line-height:var(--t-small-lh);color:var(--muted)}
label,.field-label{font-size:var(--t-small);font-weight:600;color:var(--ink)}
/* юридический текст: не меньше 12px и с переносом */
.launch-consents,.launch-consents *,.consent-block,.consent-block *{font-size:12px!important;line-height:17px;white-space:normal!important}

/* ---------- кнопки ---------- */
.btn{min-height:48px;border-radius:var(--r-s);border:1px solid var(--line-strong);background:var(--white);color:var(--ink);font-size:15px;font-weight:600}
.btn.accent{background:var(--accent);border-color:transparent;color:var(--accent-ink)}
.btn.primary{background:var(--ink);border-color:var(--ink);color:#fff}
.btn.secondary{background:var(--white);border-color:var(--line-strong);color:var(--ink)}
.btn:disabled,.btn[disabled]{background:var(--surface);border-color:transparent;color:var(--muted)}
.btn:focus-visible,.chip:focus-visible,.pill:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
/* правило: на экране одна .btn.accent */

/* ---------- чипы, сегменты, вкладки ---------- */
.chip,.pill,.event-detail-tabs span,.event-detail-tabs button,.media-filter-strip span,.media-filter-strip button,.chat-filter-tabs button,.community-tabs button{
  min-height:var(--ui-chip-height);border-radius:var(--ui-chip-radius);border:1px solid var(--line-strong);background:var(--white);color:var(--ink);font-size:var(--ui-chip-font);font-weight:600}
.chip.active,.chip.selected,.pill.active,.event-detail-tabs .active,.media-filter-strip .active,.chat-filter-tabs .active,.community-tabs .active,
[aria-pressed="true"].chip,[aria-selected="true"]{
  background:var(--ui-selected-bg)!important;border-color:var(--ui-selected-border)!important;color:var(--ui-selected-fg)!important}
/* убрать цветные рамки фильтров чатов */
.chat-filter-tabs button{--filter-color:var(--line-strong)}
/* сегментированный контроль: вместо #45556B */
.segmented,.period-switch,.date-mode{background:var(--surface);border-radius:12px;padding:3px}
.segmented .active,.period-switch .active,.date-mode .active{background:var(--white);color:var(--ink);box-shadow:0 1px 3px rgba(10,11,13,.12)}
/* тег-статус (не кликается) */
.tag{height:22px;border-radius:var(--r-pill);padding:0 9px;font-size:11px;font-weight:600;background:var(--surface);color:var(--text)}
.tag.ok,.status-accepted{background:var(--accent);color:var(--accent-ink)}

/* ---------- поля ---------- */
input,select,textarea{border-radius:var(--r-s);border:1px solid var(--line-strong);font-size:14px;color:var(--ink);background:var(--white)}
input:focus,select:focus,textarea:focus{border-color:var(--ink);outline:none}
input[type=checkbox]{accent-color:var(--ink)}
.field-error,.consent-error{font-size:12px;color:var(--danger)}
.form-status{border-radius:var(--r-m);background:#FBF1F0;color:var(--danger);font-size:13px}

/* ---------- карточки ---------- */
.card,.event-card,.info-card,.profile-card,.news-card,.participation-card{border-radius:var(--r-m)!important;border:1px solid var(--line);background:var(--white);box-shadow:none}
.card.selected{border:1px solid var(--ink);box-shadow:none}
.event-card{border-top-width:1px}
.card.soft,.event-safety-card{background:var(--surface);border-color:transparent}

/* ---------- лента событий ---------- */
.event-list-date{border:1px solid var(--line-strong);border-radius:12px;text-align:center}
.event-list-date b{font-family:var(--f-display);font-weight:700;font-size:22px;line-height:1;color:var(--ink)}
.event-list-title{font-family:var(--f-display);font-weight:700;text-transform:uppercase;font-size:var(--t-ev);line-height:var(--t-ev-lh);color:var(--ink)}
.going-count{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--ink)}
.going-count:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px rgba(141,255,0,.25)}

/* ---------- фото события: полоса CUT ---------- */
.event-hero{position:relative;overflow:hidden}

/* ---------- верхняя панель ---------- */
.topbar{height:52px;min-height:52px;border-bottom:1px solid var(--line);background:var(--white)}
.topbar .brand-logo{height:30px;width:auto}
.topbar .notify-dot{background:var(--accent)}

/* ---------- нижнее меню ---------- */
.bottomnav{height:64px;border-top:1px solid var(--line);background:var(--white)}
.bottomnav a,.bottomnav button{font-size:10px;font-weight:600;color:var(--muted);background:none!important;border:0!important}
.bottomnav .active{color:var(--ink);font-weight:600}
.bottomnav .active:after{content:"";position:absolute;top:0;left:50%;width:28px;height:3px;margin-left:-14px;border-radius:0 0 3px 3px;background:var(--ink)}
.bottomnav .nav-badge{background:var(--accent);color:var(--accent-ink);font-size:9px;font-weight:700}

/* ---------- чат ---------- */
.bubble{background:var(--surface);color:var(--ink);border-radius:16px 16px 16px 4px;font-size:14px}
.bubble.me{background:var(--ink);color:#fff;border-radius:16px 16px 4px 16px}
.composer input{border-radius:20px;height:40px}
.composer button{width:40px;height:40px;border-radius:50%;background:var(--accent)}
.chat-pin{background:var(--white);border-bottom:1px solid var(--line)}
.pair-proposal{border:1px solid var(--ink);border-radius:var(--r-m);background:var(--white)}

/* ---------- листы и подсказки ---------- */
.event-filter-sheet,.phone-prompt{border-radius:24px 24px 0 0}
.phone-prompt-backdrop{background:rgba(10,11,13,.45)}
#toast{background:var(--ink);color:#fff;border-radius:var(--r-pill);font-size:13px}
/* подсказки в потоке, не поверх шапки */
.scenario-hint,.onboarding-hint{position:static!important;margin:var(--s-3) 0;background:var(--surface);border:0;border-radius:var(--r-m)}

/* ---------- состояния ---------- */
.empty,.compact-empty,.chat-empty,.my-events-empty{text-align:center;padding:40px 24px}
.empty .icon{width:64px;height:64px;border-radius:50%;background:var(--surface)}
.skeleton-list>*{background:linear-gradient(90deg,var(--surface),#FAFAF9,var(--surface));background-size:200% 100%;animation:sk 1.2s linear infinite;border-radius:8px}
@keyframes sk{to{background-position:-200% 0}}
.load-error{display:flex;gap:12px;align-items:center;border:1px solid var(--ink);border-radius:var(--r-m);padding:14px}

/* ---------- вне палитры: выровнять ---------- */
.temperament-screen{background:var(--white)!important}
.temperament-screen .band{background:var(--surface)!important}
.continue-block,.event-next-block{background:var(--surface)!important;color:var(--ink)!important}

.event-hero:after{content:"";position:absolute;left:0;right:0;bottom:0;height:34%;background:linear-gradient(180deg,transparent,#fff);transform:none;pointer-events:none}
