/* app.css
/* ===============================
   1. БАЗОВЫЕ ПАРАМЕТРЫ / ЦВЕТА
   =============================== */

:root {
  --ink:#0F0F10;
  --text:#FFFFFF;
  --line:rgba(255,255,255,.14);

  --pink:#F164B3;    /* активные элементы */
  --sand:#F6EFAE;    /* фон таббара и неактивные элементы */
  --violet:#EAA9FF;
  
  --muted:rgba(255,255,255,.65);
  --bg-elev:rgba(255,255,255,.06);
  --black:#000000;
  --shadow:0 6px 24px rgba(0,0,0,.28);
  --radius:16px;
  --ring-empty:#3A3A3D;
  --modal-backdrop:rgba(0,0,0,.84);
  --calendar-backdrop:rgba(0,0,0,.9);

  --shadow-soft:0 6px 18px rgba(0,0,0,.3);
  --radius-xl:18px;
  --radius-m:14px;
  --radius-s:10px;

  --font-main:"Manrope",system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  --font-accent:"Unbounded",system-ui,sans-serif;
}

*,
*::before,
*::after {
  box-sizing:border-box;
}

html,
body {
  height:100%;
}

body {
  margin:0;
  padding:0;
  background:var(--ink);
  color:var(--text);
  font-family:var(--font-main);
}

/* ===============================
   2. ОБЩИЕ ЭЛЕМЕНТЫ
   =============================== */

.page {
  max-width:520px;
  margin:0 auto;
  padding:12px 16px 72px; /* было 16px, стало 12px сверху */
  min-height:100vh;
  box-sizing:border-box;
}

p {
  margin:0 0 10px;
  font-size:14px;
  line-height:1.5;
}

.msg {
  margin-top:16px;
  font-size:13px;
  color:#aaaaaa;
}

/* Кнопки */

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 16px;
  border-radius:var(--radius-m);
  border:0;
  font-family:var(--font-accent);
  font-weight:800;
  font-size:13px;
  text-decoration:none;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
  transition:transform .08s ease, box-shadow .16s ease, opacity .16s ease, background .16s ease, color .16s ease;
  white-space:nowrap;
}

.btn:active {
  transform:translateY(1px) scale(.98);
  box-shadow:none;
}

.btn-pink {
  background:var(--pink);
  color:#000;
  border-radius: 9999px;
}

.btn-sand {
  background:var(--sand);
  color:#000;
  border-radius: 9999px;
}

.btn-violet {
  background:var(--violet);
  color:#000;
}



/* =========================
   Типографика заголовков
   ========================= */

.h1 {
  margin: 0 0 8px;          /* больше воздуха, как в премиум-приложениях */
  font-family: var(--font-accent, 'Unbounded', system-ui);
  font-weight: 800;          /* женская «сила», но без агрессии */
  font-size: 28px;           /* идеальный размер для Telegram WebApp */
  line-height: 1.25;         /* плотный, но не давящий */
  letter-spacing: .01em;     /* почти без растяжки — более аккуратно */
}

.h2 {
  margin: 24px 0 16px;
  font-family: var(--font-accent, 'Unbounded', system-ui);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.28;
  letter-spacing: .005em;   /* лёгкая аккуратность */
}

.h3 {
  margin: 0 0 12px;
  font-family: var(--font-accent, 'Unbounded', system-ui);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.28;
  letter-spacing: 0;
}

.k-h3 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  margin: 24px 0 12px;
}

/* === H4 — системные маленькие подзаголовки === */
.k-h4 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.25;
  margin: 16px 0 8px;
}

/* === Абзацы / параграфы === */

.k-p {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  margin: 12px 0;
  color: var(--text);
}

.k-mt-s { margin-top: 8px; }
.k-mt-m { margin-top: 16px; }
.k-mt-l { margin-top: 24px; }

.k-mb-s { margin-bottom: 8px; }
.k-mb-m { margin-bottom: 16px; }
.k-mb-l { margin-bottom: 24px; }

/* =========================
   Цветовые модификаторы
   ========================= */

.t-ink    { color: var(--ink); }
.t-text   { color: var(--text); }
.t-pink   { color: var(--pink); }
.t-sand   { color: var(--sand); }
.t-violet { color: var(--violet); }

/* ОТСТУПЫ */
/* СНИЗУ */
.mb-xs { margin-bottom: 4px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 12px; }
.mb-lg { margin-bottom: 16px; }
.mb-xl { margin-bottom: 24px; }

/* СЛЕВА */
.ml-xs { margin-left: 4px; }
.ml-sm { margin-left: 8px; }
.ml-md { margin-left: 12px; }
.ml-lg { margin-left: 16px; }
.ml-xl { margin-left: 24px; }

/* СВЕРХУ */
.mt-0  { margin-top: 0; }
.mt-xs { margin-top: 4px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 12px; }
.mt-lg { margin-top: 16px; }
.mt-xl { margin-top: 24px; }


/* Единая шапка для экранов с заголовком и правым слотом (аватарка/иконка) */

.global-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  min-height: 72px; /* фиксируем высоту под h1 + правый столбец */
}

.global-header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.global-header-side {
  flex: 0 0 auto;
  min-width: 64px;           /* фиксированный слот под аватарку */
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Внутри шапки заголовок тянется, но не даёт себя схлопнуть */
.global-header-main .page-title {
  margin: 0;                 /* убираем локальные отступы, ими управляет .global-header */
}

/* === ГЛОБАЛЬНАЯ МОДАЛКА ДЛЯ ВСЕХ ЭКРАНОВ === */

/* Бэкдроп */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 9999;
}

.overlay.active {
  display: flex;
}

/* Карточка модалки */
.modalCard {
  width: 100%;
  max-width: 480px;
  max-height: 76vh;
  min-height: 52vh;

  background: var(--sand);

  color: #000;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .80);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;

  border: 1px solid rgba(0, 0, 0, .16);
}

/* Хедер модалки */
.modalHeader {
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modalTitle {
  font-family: var(--font-accent);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* Крестик */
.modalClose {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  border: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  opacity: .75;
  transition: background .15s ease, opacity .15s ease, transform .08s ease;
}

.modalClose:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.10);
}

.modalClose:active {
  transform: translateY(1px) scale(0.97);
}

/* Тело модалки */
.modalBody {
  padding: 16px 20px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.modalBody p {
  margin: 0 0 10px;
}

.modalBody p:last-child {
  margin-bottom: 0;
}

/* Футер с кнопками */
.modalFooter {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(0, 0, 0, .06);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Цена — чип */
.modalPrice {
  flex: 0 0 auto;
  align-self: flex-start;
  background: var(--violet);
  color: #000;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, .10);
  white-space: nowrap;
}

/* Кнопки внизу — две мягкие пилюли */
.wantBtn,
.cancelBtn {
  flex: 1 1 0;
  min-width: 120px;
  border-radius: 999px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-align: center;
  transition: transform .08s ease, opacity .12s ease;
}

/* Основная (розовая) */
.wantBtn {
  background: var(--pink);
  color: #000;
}

.wantBtn:active {
  transform: translateY(1px);
}

/* Вторичная (тёмная) */
.cancelBtn {
  background: #000;
  color: #fff;
  opacity: .92;
}

.cancelBtn:hover {
  opacity: 1;
}

.cancelBtn:active {
  transform: translateY(1px);
}

/* Блокировка прокрутки при активной модалке */
body.no-scroll {
  overflow: hidden;
}

/* Чуть подправим поведение на очень узких экранах */
@media (max-width: 360px) {
  .modalCard {
    max-height: 82vh;
    min-height: 56vh;
  }

  .modalFooter {
    flex-direction: column;
    align-items: stretch;
  }

  .modalPrice {
    margin-bottom: 4px;
  }
}

/* Блокировка прокрутки при активной модалке */
body.no-scroll {
  overflow: hidden;
}

/* Чуть подправим поведение на очень узких экранах */
@media (max-width: 360px) {
  .modalCard {
    max-height: 82vh;
    min-height: 56vh;
  }

  .modalFooter {
    flex-direction: column;
    align-items: stretch;
  }

  .modalPrice {
    margin-bottom: 4px;
  }
}

/* ===============================
   Универсальная диалоговая модалка
   (блокировка действий / подсказки)
   =============================== */

/* Оверлей остаётся тем же: затемнение и центрирование */
.overlay-lock {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
}

/* Класс, которым показываем модалку из JS */
.overlay-lock.is-visible {
  display: flex;
}

/* Карточка-диалог:
   формат ближе к "Благодарю" — компактная, по центру, без явной шапки/футера */
.k-dialog {
  width: 100%;
  max-width: 360px;
  background: #121215;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, .10);

  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Аккуратный крестик в правом верхнем углу карточки */
.k-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 26px;
  height: 26px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;

  transition: background .15s ease, color .15s ease, transform .08s ease, opacity .12s ease;
}

.k-dialog-close:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.k-dialog-close:active {
  transform: translateY(1px) scale(.97);
  opacity: .9;
}

/* Текстовая часть диалога */
.k-dialog-text {
  padding-right: 32px; /* чтобы текст не прилегал к крестику */
}

/* Заголовок диалога */
.k-dialog-title {
  font-family: var(--font-accent);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

/* Основной текст */
.k-dialog-body {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .86);
}

.k-dialog-body p {
  margin: 0 0 8px;
}

.k-dialog-body p:last-child {
  margin-bottom: 0;
}

/* Блок с кнопкой внизу —
   как в модалке "Благодарю": одна аккуратная кнопка по центру */
.k-dialog-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

/* Универсальная маленькая кнопка диалога */
.k-dialog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 36px;
  padding: 8px 22px;

  border-radius: 999px;
  border: none;
  cursor: pointer;

  font-family: var(--font-accent);
  font-size: 13px;
  font-weight: 700;

  background: var(--pink);
  color: #000;

  box-shadow: var(--shadow-soft);
  transition: transform .08s ease, box-shadow .08s ease, opacity .12s ease, background .12s ease;
}

.k-dialog-btn:active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
  opacity: .9;
}

/* На очень узких экранах слегка жмём карточку */
@media (max-width: 360px) {
  .k-dialog {
    max-width: 320px;
    border-radius: 16px;
    padding: 16px 14px 14px;
  }

  .k-dialog-text {
    padding-right: 28px;
  }
}

/* ===== Приветственная модалка "Любовь" ===== */

.overlay-love {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop); /* такой же тёмный фон, как у других модалок */
  display: none;                     /* включим JS */
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.love-modal {
  width: 100%;
  max-width: 340px;

  /* делаем карточку как мягкую тёмную k-dialog */
  background: #121215;
  color: var(--text);

  border-radius: 18px;
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.10);

  animation: fadeInLove .25s ease;
}

@keyframes fadeInLove {
  from { opacity:0; transform: scale(.96); }
  to   { opacity:1; transform: scale(1); }
}

.love-title {
  font-family: var(--font-accent);  /* как заголовки по всему приложению */
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
  color: var(--text);
}

.love-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,.80);
  margin-bottom: 18px;
}

.love-check-text {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,.90);
}

.love-checklist {
  text-align: left;
  margin-bottom: 22px;
}

.love-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  padding: 6px 0;
  cursor: pointer;
}

.love-link {
  color: var(--pink);
  text-decoration: underline;
}

.love-actions {
  margin-top: 10px;
}

.love-cta {
  width: 100%;
  margin-bottom: 6px;
}

/* Состояние "псевдо-неактивной" кнопки:
   прозрачный фон, розовый контур, розовый текст */
.love-cta.love-cta-inactive {
  background: transparent;
  color: var(--pink);
  border: 1px solid var(--pink);
  box-shadow: none;
}

/* Можно чуть приглушить "нажатие", чтобы не выглядело как активная */
.love-cta.love-cta-inactive:active {
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.love-hint {
  font-size: 13px;
  color: #F8B0C8; /* мягкий розовый, хорошо виден на тёмном фоне */
  line-height: 1.4;
  text-align: center;
}


/* =========================================
   С И М В О Л И К А   П Р И Л О Ж Е Н И Я
   (универсальные сердечки)
========================================= */

.chk {
  width: 26px;
  height: 26px;
  display: inline-block;
  cursor: pointer;
  transition: transform .15s ease;
  vertical-align: middle;
}

.chk:hover {
  transform: scale(1.06);
}

.chk.disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: saturate(.7);
}

.chk::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: no-repeat center / contain;
}


/* Сердечки-чекбоксы внутри модалки "Любовь"
   — все одного размера, как у второй строки */
.overlay-love .love-check-row .chk {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;     /* фиксируем ширину в флекс-строке */
}

/* ----- РОЗОВОЕ сердечко ----- */
.chk[data-color="pink"]::before {
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21 C12 21 5 16 5 10.5 C5 8.015 6.99 6 9.5 6 11 6 12.5 6.8 13 8 13.5 6.8 15 6 16.5 6 19.01 6 21 8.015 21 10.5 21 16 12 21 12 21 Z" fill="none" stroke="%23F164B3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

.chk[data-color="pink"].checked::before {
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21 C12 21 5 16 5 10.5 C5 8.015 6.99 6 9.5 6 11 6 12.5 6.8 13 8 13.5 6.8 15 6 16.5 6 19.01 6 21 8.015 21 10.5 21 16 12 21 12 21 Z" fill="%23F164B3" stroke="%23F164B3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

.btn-solid-pink {
  background: var(--pink);
  color: #000;
}

/* Большой символ сердца на приветственной модалке
   — стартует как обычный чекбокс и увеличивается классами love-scale-N */
.app-symbol-heart-big .chk {
  width: 26px;   /* как обычное сердечко-чекбокс */
  height: 26px;
  margin: 0 auto 12px;
  transform-origin: center;
  transition: transform .2s ease;
}

/* Ступени масштабирования */
.app-symbol-heart-big .chk.love-scale-0 {
  transform: scale(1);
}
.app-symbol-heart-big .chk.love-scale-1 {
  transform: scale(1.5);
}
.app-symbol-heart-big .chk.love-scale-2 {
  transform: scale(2);
}
.app-symbol-heart-big .chk.love-scale-3 {
  transform: scale(2.5);
}

/* =========================================
   Глобальный стек в правой части шапки
   (аватар + кружок-подсказка)
========================================= */

.global-header-side-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 64px; /* слот под: аватар + подпись + кружок-подсказку */
}

/* Кнопка с кружком-подсказкой */

.screen-help-trigger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  font: inherit;
  color: inherit;
}

.screen-help-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--sand);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);

  background: #141417;
  color: var(--sand);

  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;

  transition: all .18s ease;
}

.screen-help-symbol {
  display: block;
}

.screen-help-label {
  font-size: 10px;
  color: #bbbbbb;
  max-width: 80px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .18s ease, max-height .18s ease;
}

/* Тихий режим: точка вместо вопроса, подпись прячем */

.screen-help-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand);
  display: block;
}

.screen-help-trigger.is-quiet .screen-help-circle {
  background: transparent;
  box-shadow: none;
  border-color: var(--sand);
  opacity: .85;
}

.screen-help-trigger.is-quiet .screen-help-label {
  opacity: 0;
  max-height: 0;
}

/* Дополнительно: лёгкий hover-эффект */

.screen-help-trigger:hover .screen-help-circle {
  transform: translateY(-1px);
}

.screen-help-trigger:active .screen-help-circle {
  transform: translateY(1px) scale(.96);
  box-shadow: none;
}

/* Для overlay-help можно переиспользовать overlay-korta,
   поэтому отдельные стили не обязательны, но оставляем задел */

.overlay-help.is-visible {
  display: flex;
}

/* =========================================
   Модалка "О Корте"
========================================= */

.overlay-korta {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .7);
}

.overlay-korta.is-visible {
  display: flex;
}

.korta-modal {
  width: 100%;
  max-width: 380px;
  background: #121215;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  
  max-height: 80vh;
  overflow-y: auto;
}

.korta-modal-inner {
  padding: 20px 18px 18px;
}

.korta-modal-title {
  margin: 0 0 10px;
  font-family: var(--font-accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.korta-modal-text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.88);
}

.korta-modal-text p {
  margin: 0 0 10px;
}

.korta-modal-text p:last-child {
  margin-bottom: 0;
}

.korta-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.korta-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;

  font-family: var(--font-accent);
  font-size: 13px;
  font-weight: 700;

  background: var(--pink);
  color: #000;

  box-shadow: var(--shadow-soft);
  transition: transform .08s ease, box-shadow .08s ease, opacity .12s ease;
}

.korta-modal-btn:active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
  opacity: .9;
}

/* ===== Блок "Кто создал это приложение?" внутри info-modal ===== */

.info-creators {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.info-person {
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.16);
}

.info-person:first-child {
  border-top: none;
}

.info-person-role {
  font-size: 12px;
  line-height: 1.3;
  opacity: .7;
  margin-bottom: 2px;
}

.info-person-name {
  font-family: var(--font-accent, 'Unbounded', system-ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.info-person-desc {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,.85);
  margin-bottom: 12px;
}

.info-person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.info-person-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;

  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-main, system-ui);
  text-decoration: none;
  white-space: nowrap;

  background: var(--sand);
  color: #000;
}

.info-person-btn:hover {
  filter: brightness(1.05);
}

/* =========================================
   Аватарка Корты (2 режима: обычный / тихий)
========================================= */

.korta-avatar-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  background: none;
  border: none;
  padding: 0;
  cursor: pointer;

  font: inherit;
  color: inherit;
}

.korta-avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  background: #222;
  color: #fff;

  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 18px;

  border: 2px solid #ffffff33;
  box-shadow: var(--shadow-soft);

  transform-origin: center;
  transition: all .18s ease;
}

.korta-avatar-name {
  font-size: 11px;
  color: #bbbbbb;
  max-width: 80px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  transition: opacity .18s ease;
}

/* "Тихий" режим: визуально меньше, но слот остаётся 48x48 — верстка не дёргается */
.korta-avatar-trigger.is-quiet .korta-avatar-circle {
  background: transparent;
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: none;
  opacity: .7;
  transform: scale(0.6);  /* уменьшаем к центру окружности */
}

.korta-avatar-trigger.is-quiet .korta-avatar-name {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

/* Общий хедер с аватаркой Корты (Магия, Магазин и др.) */
.korta-screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px; /* чтобы оторвать от контента ниже */
}

/* Левая часть (заголовок) растягивается, аватарка прижимается вправо */
.korta-screen-header > .page-title {
  flex: 1 1 auto;
  min-width: 0;
}

/* Обёртка страницы профиля – те же отступы, что у Магии/Магазина */
.page-profile {
  padding: 24px 16px 120px; /* возьми здесь те же значения, что у .page-magic или .shop-wrap */
}

/* Заголовок в профиле, без лишнего отступа снизу */
#screen-profile .page-title-profile {
  margin: 0;
  color: var(--sand);
}

/* === NEWS PILL UNDER HEADER – НОВОСТИ === */

.header-news-wrap {
  margin-top: 4px;
  width: 100%;
  display: flex;
  min-height: 24px; /* одна строка под плашку, чтобы высота не прыгала */
}

.header-news-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 3px 10px;
  border-radius: 999px;
  
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);

  font-size: 11px;
  line-height: 1.2;
  color: var(--text);

  cursor: default;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header-news-tag {
  font-weight: 600;
  opacity: 0.92;
}

.header-news-text {
  opacity: 0.75;
}

/* ===============================
   3. TABBAR (НИЖНЕЕ МЕНЮ)
   =============================== */

.tabbar {
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  margin:0;
  padding:8px 10px;
  background:rgba(15,15,16,0.98);
  box-shadow:0 -4px 18px rgba(0,0,0,.55);
  display:flex;
  justify-content:center;
  z-index:50;
}

.tabbar-inner {
  width:100%;
  max-width:520px;
  margin:0 auto;
  background:rgba(246,239,174,0.12); /* лёгкий песочный фон */
  border-radius:999px;
  padding:4px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:4px;
  border:1px solid rgba(246,239,174,0.28);
}

.tab-btn {
  border:0;
  margin:0;
  padding:6px 4px 7px;
  border-radius:999px;
  background:transparent;
  color:var(--sand);
  font-family:var(--font-main);
  font-size:10px;
  font-weight:600;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  cursor:pointer;
  transition:all .14s ease;
}

.tab-btn span.icon {
  font-size:14px;
  line-height:1;
}

.tab-btn span.label {
  line-height:1.2;
}

.tab-btn.active {
  background:var(--pink);
  color:#000;
  box-shadow:var(--shadow-soft);
}

/* SVG-иконки в таббаре */
.tab-btn .icon {
  display:flex;
  align-items:center;
  justify-content:center;
}

.tab-btn .tab-icon {
  width: 20px;
  height: 20px;
  display:block;
}

/* Цвет берём из .tab-btn: var(--sand) или #000 для active */
.tab-btn .tab-icon path,
.tab-btn .tab-icon circle,
.tab-btn .tab-icon line {
  stroke: currentColor;
}

/* ===============================
   4. ЭКРАНЫ (ОБЩАЯ ЛОГИКА)
   =============================== */

.screen {
  display:none;
}

.screen.active {
  display:block;
}

.test-font-flag {
  font-family: 'Unbounded', monospace !important;
  font-size: 32px;
}




