/* Приложение: контент и панели на всю ширину экрана (мобильный браузер + Telegram WebApp / Mini App) */
:root {
  --app-shell-max: 100%;
  --app-header-h: 56px;
  --neo-cyan: #22d3ee;
  --neo-cyan-soft: rgba(34, 211, 238, 0.42);
  /* Высота перекрытия снизу виртуальной клавиатурой (iOS Safari и др.); задаётся из base.html по visualViewport */
  --keyboard-inset: 0px;
}

body.app-mobile-layout {
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
}

body.app-mobile-layout main {
  max-width: var(--app-shell-max);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
  min-height: 0;
}

body.app-mobile-layout:not(.app-has-mobile-header) main {
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(10px, env(safe-area-inset-right, 0px));
}

/* Главная (гость): отступ под маркетинговый navbar */
body.app-mobile-layout.index-landing-guest:not(.app-has-mobile-header) main {
  padding-top: calc(4rem + env(safe-area-inset-top, 0px));
}

body.app-has-mobile-header main {
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(10px, env(safe-area-inset-right, 0px));
  padding-top: calc(var(--app-header-h) + env(safe-area-inset-top, 0px) + 8px);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Фиксированная шапка приложения: одна колонка по центру */
.app-mobile-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  pointer-events: none;
  box-sizing: border-box;
}

.neo-app-header.app-mobile-header-inner,
.app-mobile-header-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  min-height: var(--app-header-h);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  box-sizing: border-box;
  background: #000000;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow:
    0 0 28px rgba(34, 211, 238, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.65),
    inset 0 -1px 0 rgba(34, 211, 238, 0.12);
}

/* Три колонки: бургер | NEUROFUNGI AI по центру | сообщения · лайки · профиль */
.app-mobile-header-inner.app-head-row-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  justify-content: stretch;
}

.app-head-left--burger-only {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex: initial;
}

.app-head-center-col {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}
.app-head-brand--center {
  text-align: center;
  min-width: 0;
  max-width: 100%;
}
.app-head-role-stamp {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.2;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
}
.app-head-role-stamp--admin {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.2);
}
.app-head-role-stamp--uch {
  color: #7dd3fc;
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}

.app-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.app-head-btn {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--neo-cyan-soft);
  background: linear-gradient(165deg, rgba(22, 24, 32, 0.95), rgba(10, 11, 15, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neo-cyan);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 0 16px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 20px rgba(34, 211, 238, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.12s ease,
    color 0.2s ease,
    background 0.2s ease;
  padding: 0;
  font: inherit;
}

.app-head-btn .stroke-ico {
  color: inherit;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.35));
}

.app-head-btn:hover {
  border-color: rgba(34, 211, 238, 0.75);
  color: #67e8f9;
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.28),
    0 0 40px rgba(139, 92, 246, 0.08),
    inset 0 0 24px rgba(34, 211, 238, 0.08);
  transform: translateY(-1px);
}

.app-head-btn:active {
  transform: scale(0.96);
}

.app-head-btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.55);
  outline-offset: 2px;
}

.app-head-btn-menu {
  color: #5ee9f5;
}

.app-head-bell .stroke-ico,
.app-head-likes .stroke-ico {
  color: #b8f0ff;
  filter: drop-shadow(0 0 8px rgba(61, 212, 224, 0.45));
}

.app-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: 0;
}

@media (max-width: 360px) {
  .app-head-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .app-head-actions {
    gap: 4px;
  }
}

.app-head-brand {
  font-family: Syne, Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(0.78rem, 2.8vw, 1.05rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  background: linear-gradient(90deg, #d4e157 0%, #e879f9 48%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.15));
  transition: filter 0.2s ease;
}

a.app-head-brand:hover {
  filter: drop-shadow(0 0 16px rgba(232, 121, 249, 0.35));
}

.app-notif-badge {
  position: absolute;
  top: 5px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff66d0, #3dd4e0);
  color: #070708;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 12px rgba(255, 102, 208, 0.5);
}

.app-notif-badge.on {
  display: flex;
}

/* Акцент вкладки личных чатов (/chats) — бирюза */
.app-msg-tab-badge {
  background: #3dd4e0 !important;
  color: #070708 !important;
  box-shadow: 0 2px 12px rgba(61, 212, 224, 0.45);
}

#appActivityPanel {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--app-header-h) + env(safe-area-inset-top, 0px));
  bottom: 0;
  z-index: 990;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(8px);
}

#appActivityPanel .app-act-sheet {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  max-height: min(72vh, 520px);
  overflow: auto;
  margin: 0 auto;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(12, 14, 22, 0.98), rgba(6, 8, 14, 0.99));
  border-bottom: 1px solid rgba(61, 212, 224, 0.2);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 12px 14px 18px;
}

.app-act-row {
  display: flex;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.app-act-row:hover {
  background: rgba(61, 212, 224, 0.08);
  border-color: rgba(61, 212, 224, 0.15);
}

.app-act-title {
  font-size: 14px;
  font-weight: 600;
  color: #e8eaef;
  margin-bottom: 4px;
}

.app-act-meta {
  font-size: 12px;
  color: #8b93a8;
  line-height: 1.35;
}

/* Нижний таббар / FAB — на всю ширину экрана */
body.app-mobile-layout .ig-tabbar,
body.app-mobile-layout .cp-tabbar {
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

body.app-mobile-layout .ig-create-fab,
body.app-mobile-layout .cp-create-fab {
  left: 50%;
  transform: translateX(-50%);
}

/* Глобальное боковое меню (как в dashboard) */
.ig-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.ig-drawer-backdrop.on {
  opacity: 1;
  pointer-events: auto;
}
.ig-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(200px, 46vw);
  max-width: 200px;
  min-width: 130px;
  overflow-x: hidden;
  box-sizing: border-box;
  background: rgba(8, 10, 20, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 1px solid rgba(61, 212, 224, 0.12);
  z-index: 1050;
  transform: translateX(-102%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 8px 0 48px rgba(0, 0, 0, 0.55), 0 0 60px rgba(61, 212, 224, 0.06);
}
.ig-drawer.open {
  transform: translateX(0);
}
.ig-drawer-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ig-drawer-head .nm {
  font-weight: 700;
  color: #e8e8e8;
  font-size: 14px;
}
.ig-drawer-head .em {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  word-break: break-all;
}
.ig-drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 0 20px;
}
.ig-drawer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #ddd;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.ig-drawer-item:hover,
.ig-drawer-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.ig-drawer-item .e {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}
.ig-drawer-item .lbl {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ig-drawer-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 8px 10px;
}
.ig-drawer-details .ig-drawer-summary {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.ig-drawer-details[open] .ig-drawer-chev {
  transform: rotate(-180deg);
}
.ig-drawer-sub {
  display: block;
  padding: 10px 8px;
  color: #bbb;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
}
.ig-drawer-sub:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #3dd4e0;
}
details.ig-drawer-details > summary::-webkit-details-marker {
  display: none;
}
details.ig-drawer-details > summary {
  list-style: none;
}
.ig-drawer-item .stroke-ico {
  width: 20px;
  height: 20px;
  color: #4fdbe7;
  filter: drop-shadow(0 0 8px rgba(61, 212, 224, 0.32));
  transition: color 0.18s ease, filter 0.18s ease;
}

.ig-drawer-item:hover .stroke-ico,
.ig-drawer-item:focus-visible .stroke-ico {
  color: #7ee8f0;
  filter: drop-shadow(0 0 10px rgba(61, 212, 224, 0.42));
}

.ig-drawer-item--danger .stroke-ico {
  color: #f87171;
  filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.35));
}

/* Telegram — канал/чаты: выделенный блок в бургере */
.ig-drawer-tg-menu {
  border-radius: 14px;
  margin: 8px 8px 4px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.16), rgba(10, 14, 24, 0.92));
  border: 1px solid rgba(34, 158, 217, 0.35);
  box-shadow: 0 4px 22px rgba(34, 158, 217, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ig-drawer-tg-summary:hover,
.ig-drawer-tg-summary:focus-visible {
  background: rgba(34, 158, 217, 0.1) !important;
}
.ig-drawer-tg-ico-wrap {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(160deg, #4dc4ff 0%, #229ed9 45%, #1a8cc7 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 14px rgba(34, 158, 217, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.ig-drawer-tg-svg {
  width: 17px !important;
  height: 17px !important;
  color: #fff !important;
  stroke: #fff !important;
  filter: none !important;
}
.ig-drawer-tg-lbl {
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.02em;
  color: #dff8ff !important;
  line-height: 1.25;
}
.ig-drawer-tg-chev {
  opacity: 0.75;
  color: #9fe5ff;
}
.ig-drawer-tg-menu[open] .ig-drawer-tg-chev {
  color: #c8f2ff;
}

/* MAX — каналы/чат: та же геометрия и «неон», что у .ig-drawer-tg-menu, палитра — розовая */
@keyframes ig-drawer-max-glow {
  0%,
  100% {
    box-shadow:
      0 4px 22px rgba(244, 114, 182, 0.14),
      0 0 26px rgba(251, 113, 133, 0.12);
  }
  50% {
    box-shadow:
      0 4px 26px rgba(244, 114, 182, 0.22),
      0 0 36px rgba(255, 102, 208, 0.18);
  }
}
.ig-drawer-max-menu {
  border-radius: 14px;
  margin: 8px 8px 4px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16), rgba(10, 14, 24, 0.92));
  border: 1px solid rgba(244, 114, 182, 0.35);
  box-shadow:
    0 4px 22px rgba(244, 114, 182, 0.12),
    0 0 28px rgba(251, 113, 133, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: ig-drawer-max-glow 3.2s ease-in-out infinite;
}
.ig-drawer-max-summary:hover,
.ig-drawer-max-summary:focus-visible {
  background: rgba(236, 72, 153, 0.1) !important;
}
.ig-drawer-max-ico-wrap {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(160deg, #fda4cf 0%, #f472b6 40%, #db2777 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 2px 14px rgba(236, 72, 153, 0.55),
    0 0 20px rgba(255, 102, 208, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  filter: drop-shadow(0 0 10px rgba(251, 113, 133, 0.4));
}
.ig-drawer-max-ico {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}
.ig-drawer-max-lbl {
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.02em;
  color: #ffe4f3 !important;
  line-height: 1.25;
  text-shadow:
    0 0 14px rgba(251, 113, 133, 0.5),
    0 0 28px rgba(244, 114, 182, 0.28);
}
.ig-drawer-max-chev {
  opacity: 0.75;
  color: #fbcfe8;
  text-shadow: 0 0 10px rgba(251, 113, 133, 0.35);
}
.ig-drawer-max-menu[open] .ig-drawer-max-chev {
  color: #fce7f3;
}

/* Обратный отсчёт пробного «Старт» внизу бургера */
.ig-drawer-trial-banner {
  margin: 14px 10px 18px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(61, 212, 224, 0.28);
  background: linear-gradient(145deg, rgba(61, 212, 224, 0.12) 0%, rgba(255, 102, 208, 0.08) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ig-drawer-trial-banner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ig-drawer-trial-banner__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bfeff3;
}
.ig-drawer-trial-banner__sub {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.4;
  color: #8fb5bb;
}
.ig-drawer-trial-banner__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.ig-drawer-trial-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(8, 10, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ig-drawer-trial-chip__val {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #e8f7f9;
  line-height: 1.1;
}
.ig-drawer-trial-chip__unit {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a9aa3;
}
.ig-drawer-trial-banner__cta {
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #0a0c12;
  text-decoration: none;
  background: linear-gradient(120deg, #3dd4e0 0%, #7ee8f0 50%, #c8f4f8 100%);
  box-shadow: 0 4px 16px rgba(61, 212, 224, 0.35);
}
.ig-drawer-trial-banner__cta:hover,
.ig-drawer-trial-banner__cta:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.ig-drawer-sub-countdown--hidden {
  display: none !important;
}

/* Тумблер «Свет» токенов (DEL / SHEVELEV) в бургере */
.drawer-token-lamp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d0d5df;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.drawer-token-lamp-toggle input {
  appearance: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #20242f;
  border: 1px solid rgba(255, 255, 255, 0.22);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.drawer-token-lamp-toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8a90a0;
  transition: all 0.2s ease;
}
.drawer-token-lamp-toggle input:checked {
  background: rgba(61, 212, 224, 0.35);
  border-color: rgba(61, 212, 224, 0.62);
}
.drawer-token-lamp-toggle input:checked::after {
  left: 16px;
  background: #d8fbff;
}

/* Единая нижняя панель (Лента · Поиск · Магазин) */
.app-uni-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(6, 8, 16, 0.58);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(61, 212, 224, 0.14);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 6px;
  z-index: 970;
  box-sizing: border-box;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
  margin-left: 0;
  margin-right: 0;
}
.app-uni-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 4px 4px 0;
  border: none;
  background: transparent;
  color: #777;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  max-width: 96px;
  min-width: 0;
  font-family: inherit;
  cursor: pointer;
  /* Иначе .app-notif-badge позиционируется от всего tabbar и оказывается над «+ пост» */
  position: relative;
  z-index: 1;
}
.app-uni-tab .ic {
  font-size: 24px;
  line-height: 1;
  opacity: 0.85;
}
.app-uni-tab .ic .stroke-ico {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  color: #777;
}
.app-uni-tab--on,
.app-uni-tab--on .ic,
.app-uni-tab--on .ic .stroke-ico {
  color: #e8e8e8;
  opacity: 1;
}
.app-uni-tab--on .ic .stroke-ico {
  filter: drop-shadow(0 0 10px rgba(61, 212, 224, 0.35));
}
body.app-has-mobile-footer main {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
.app-uni-tabbar--six .app-uni-tab {
  max-width: 58px;
  padding: 3px 2px 0;
  font-size: 9px;
}
.app-uni-tabbar--six .app-uni-tab .ic .stroke-ico {
  width: 22px;
  height: 22px;
}
.app-uni-tabbar--seven .app-uni-tab {
  max-width: 50px;
  padding: 3px 1px 0;
  font-size: 8px;
}
.app-uni-tabbar--seven .app-uni-tab .ic .stroke-ico {
  width: 20px;
  height: 20px;
}
.app-uni-tab--btn {
  width: 100%;
}
@media (min-width: 769px) {
  .app-uni-tabbar {
    display: none;
  }
  body.app-has-mobile-footer main {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* ===== Mobile-only: force single-column for desktop multi-column layouts ===== */
body.app-mobile-layout main .cl {
  grid-template-columns: 1fr !important;
  max-width: 100% !important;
}
body.app-mobile-layout main .lbar,
body.app-mobile-layout main .rbar {
  display: none !important;
}
body.app-mobile-layout main .cp-wrap {
  max-width: 100% !important;
}
body.app-mobile-layout main .grid {
  grid-template-columns: 1fr !important;
}
body.app-mobile-layout main .grid.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* Лента /community: двухколоночная сетка постов — на телефоне одна колонка */
@media (max-width: 768px) {
  body.app-mobile-layout main #commFeedMain {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
  }
  body.app-mobile-layout main .comm-feed-shell {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Screen Glow controls in burger drawer ===== */
.glow-sw {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.glow-sw input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.glow-sw-track {
  display: block;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  transition: background .25s, border-color .25s;
  position: relative;
}
.glow-sw-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #888;
  transition: transform .25s, background .25s, box-shadow .25s;
}
.glow-sw input:checked + .glow-sw-track {
  background: rgba(61,212,224,.25);
  border-color: rgba(61,212,224,.5);
}
.glow-sw input:checked + .glow-sw-track::after {
  transform: translateX(16px);
  background: #3dd4e0;
  box-shadow: 0 0 8px rgba(61,212,224,.7);
}
.glow-color-dot {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3dd4e0, #b85fa3, #3dd4e0);
  border: 2px solid rgba(255,255,255,.18);
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow .25s, border-color .25s, transform .15s;
  text-decoration: none;
}
.glow-color-dot:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,.35);
}

/* Полная ширина: Tailwind max-w-* и сетка сообщества (.cl) */
@media (max-width: 1024px) {
  body.app-mobile-layout main .max-w-sm,
  body.app-mobile-layout main .max-w-md,
  body.app-mobile-layout main .max-w-lg,
  body.app-mobile-layout main .max-w-xl,
  body.app-mobile-layout main .max-w-2xl,
  body.app-mobile-layout main .max-w-3xl,
  body.app-mobile-layout main .max-w-4xl,
  body.app-mobile-layout main .max-w-5xl,
  body.app-mobile-layout main .max-w-6xl,
  body.app-mobile-layout main .max-w-7xl {
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  body.app-mobile-layout main .cl {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }
}
