/* ===== Base & phone shell (современный смартфон ~430×932) ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --phone-w: min(430px, calc(100vw - 24px));
  --phone-h: min(932px, calc(100vh - 24px));
  --bg: #0f1117;
  --bg-elevated: #1a1d27;
  --bg-card: #222633;
  --text: #e8eaef;
  --text-muted: #8b92a5;
  --accent: #4f8cff;
  --accent-hover: #3a7aef;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --status-h: 48px;
  --nav-h: 64px;
  /* Системная панель (3 кнопки / home indicator) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* Android WebView: реальные inset'ы с Activity (env() часто 0) */
  --android-safe-top: 0px;
  --android-safe-bottom: 0px;
  --android-safe-top-css: 0px;
  --android-safe-bottom-css: 0px;
  --android-nav-pad: 0px;
  --sys-nav-h: 48px;
  --font: 'Inter', system-ui, sans-serif;
  --ui-scale: 1;
}

/* п. 6: атрибут hidden всегда прячет (раньше display:flex у .badge и др. перебивал его) */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: #0a0c10;
  color: var(--text);
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 12px;
}

/* Phone frame */
.app-shell {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  max-width: 100%;
  max-height: 100%;
  background: var(--bg);
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 3px #2a2d3a, 0 20px 60px rgba(0,0,0,0.6);
  zoom: var(--ui-scale, 1);
}
@supports not (zoom: 1) {
  .app-shell {
    transform: scale(var(--ui-scale, 1));
    transform-origin: center center;
  }
}

@media (max-width: 480px) {
  body { padding: 0; }
  .app-shell {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
  }

  /* Нативный Android: WebView уже вписан в safe-area через padding контейнера Activity */
  html.android-native,
  html.android-native body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
    background: var(--bg, #0f1117);
    color: var(--text, #e8eaef);
  }
  html.android-native .app-shell,
  .app-shell--android-native {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    /* запасной CSS-отступ, если Activity не сжала WebView (обычно 0) */
    padding-top: var(--android-safe-top-css, 0px);
    padding-bottom: var(--android-safe-bottom-css, 0px);
  }
}

.app-shell__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

/* ===== Status bar ===== */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--status-h) + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 60;
  position: relative;
}

.status-bar__left,
.status-bar__right {
  display: flex;
  align-items: center;
  min-width: 40px;
  z-index: 2;
}

.status-bar__center {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 16px;
}

.status-bar__time { font-size: 14px; color: var(--text-muted); }

.profile-nav-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.profile-nav-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.profile-nav-btn:active { transform: scale(0.96); }

.profile-nav-btn__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-nav-btn--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn:hover { background: rgba(255,255,255,0.08); }

#btn-notifications {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #DC2626;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Screens ===== */
.screens {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* no transform here — it breaks Leaflet tile positioning */
  transition: opacity 0.28s ease, visibility 0.28s;
  z-index: 1;
}

.screen--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  flex-shrink: 0;
}

.screen-header h1 { font-size: 20px; font-weight: 700; }

.screen-header--back { gap: 8px; }
.screen-header--back h1 { flex: 1; }

/* ===== Map screen (Yandex Navigator style) ===== */
#screen-map {
  /* keep .screen { position: absolute; inset: 0 } — relative collapses height to 0 */
  isolation: isolate;
}

.map-container--full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  flex: none;
  min-height: 0;
  z-index: 1;
  background: var(--bg);
}

#map-3d {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  background: #e7e2d8;
}

#screen-map.map-volume #map-3d { display: block; }

#screen-map.map-volume #map .leaflet-pane,
#screen-map.map-volume #map .leaflet-control-container {
  opacity: 0;
  pointer-events: none;
}

#map-3d .maplibregl-ctrl-bottom-left,
#map-3d .maplibregl-ctrl-bottom-right { bottom: 70px; }

.nr-volume-marker { cursor: pointer; }

.nr-roof-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.nr-roof-num {
  position: absolute;
  left: 0;
  top: 0;
  font: 600 13px sans-serif;
  color: #2a2622;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
  white-space: nowrap;
}

.nr-roof-layer--night .nr-roof-num {
  color: #f4f7fb;
  text-shadow: 0 0 3px #141821, 0 0 3px #141821;
}

.map-tile-status {
  position: absolute;
  left: 50%;
  top: calc(var(--status-h, 48px) + 10px);
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.leaflet-control-attribution {
  font-size: 10px !important;
  background: color-mix(in srgb, var(--bg-elevated) 85%, transparent) !important;
  color: var(--text-muted) !important;
  max-width: 55%;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px 0;
}

.map-overlay > * {
  pointer-events: auto;
}

.map-fab-top {
  position: absolute;
  top: calc(var(--status-h) + 8px);
  right: 12px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-fab-top--left {
  right: auto;
  left: 10px;
  /* Такой же отступ сверху, как слева (safe-area уже в padding Activity) */
  top: 10px;
}

#btn-profile-nav-map {
  padding: 0;
  overflow: hidden;
}

#btn-profile-nav-map .profile-nav-btn__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 14px;
  background: var(--accent);
  color: #fff;
}

#btn-profile-nav-map .profile-nav-btn__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#btn-profile-nav-map.profile-nav-btn--active {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

.map-toolbar {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.map-toolbar--float {
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 6px 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.map-controls__sections {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.map-controls__sections:hover {
  border-color: var(--accent);
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.search-bar svg { color: var(--text-muted); flex-shrink: 0; }

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search-bar input::placeholder { color: var(--text-muted); }

.map-provider-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.filter-bar {
  padding: 0 12px 8px;
  flex-shrink: 0;
}

.picker-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}

.picker-trigger:hover,
.picker-trigger:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.picker-trigger--settings {
  margin-top: 4px;
}

.picker-trigger__icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.picker-trigger__body {
  flex: 1;
  min-width: 0;
}

.picker-trigger__label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.picker-trigger__value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-trigger__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
}

.filter-scroll {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar { display: none; }

.cat-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-filter__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color, var(--accent));
  opacity: 0.4;
}

.cat-filter--active {
  color: var(--text);
  border-color: var(--cat-color, var(--accent));
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 15%, transparent);
}

.cat-filter--active .cat-filter__dot { opacity: 1; }

.distance-filters {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 1;
  min-width: 0;
}

.distance-filters::-webkit-scrollbar { display: none; }

.chip {
  padding: 6px 10px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.chip:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.chip--active {
  background: var(--accent);
  color: white;
}

.map-container {
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.map-fab-group {
  position: absolute;
  right: 12px;
  bottom: calc(58px + 12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 600;
  transition: bottom 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

#screen-map:has(.nearby-panel--expanded) .map-fab-group {
  bottom: calc(45vh + 12px);
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* Стекло карты — как у кнопки «На районе» */
:root {
  --map-glass-bg: rgba(0, 0, 0, 0.45);
  --map-glass-border: rgba(255, 255, 255, 0.35);
}

#screen-map .map-fab-top .fab,
#screen-map .map-fab-group .fab,
#screen-map .map-return-fab,
#screen-map .radio-fab-flyout,
#screen-map .radio-mini,
.app-shell:has(#screen-map.screen--active) > .status-bar #btn-notifications,
.app-shell:has(#screen-map.screen--active) > .status-bar .brand-pill {
  background: var(--map-glass-bg) !important;
  border: 1px solid var(--map-glass-border) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Бренд «На районе» на карте скрыт — виден в остальных разделах */
.app-shell:has(#screen-map.screen--active) > .status-bar .brand-pill {
  display: none !important;
}
.app-shell:has(#screen-map.screen--active) > .status-bar .brand-pill .brand-logo-img {
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
}
.app-shell:has(#screen-map.screen--active) > .status-bar .brand-pill .app-title {
  color: #fff;
  text-shadow: none;
}

#screen-map .radio-mini {
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
#screen-map .radio-mini__station,
#screen-map .radio-mini__track {
  color: var(--text);
}
#screen-map .radio-mini__track {
  opacity: 0.8;
}
#screen-map .radio-mini__play {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
#screen-map .radio-fab-flyout {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  color: var(--text);
}
#screen-map .radio-fab-stations {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--text);
}

/* Значки на кнопках карты крупнее на 20% (колокольчик — без scale, размер как до Grok) */
#screen-map .map-fab-group .map-fab-obj-wrap,
#screen-map .map-fab-top .map-fab-obj-wrap,
#screen-map .map-fab-group .radio-fab-glyph,
#screen-map .map-fab-group .ya-locate-ico,
#screen-map .map-fab-group .ya-compass,
#screen-map .map-return-fab .ui-ico,
.app-shell:has(#screen-map.screen--active) > .status-bar .brand-logo-img {
  transform: scale(1.2);
  transform-origin: center;
}

.fab--object {
  background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
  color: inherit;
}
.fab--object .map-fab-obj,
.map-fab-obj-wrap .map-fab-obj {
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18));
}
.fab--compass .map-compass-needle {
  display: inline-flex;
  line-height: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 0.08s linear;
}
.fab--compass[hidden] {
  display: none !important;
}

/* —— Яндекс Навигатор: геолокация + компас —— */
.fab--ya {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  color: #1A73E8;
  padding: 0;
  overflow: visible;
}
.fab--ya:active {
  transform: scale(0.96);
}
.fab--ya-compass[hidden] {
  display: none !important;
}
.fab--ya-compass[data-compass="armed"] {
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.45);
}
.fab--ya-compass[data-compass="follow"] {
  box-shadow: 0 0 0 2px #1A73E8;
}

.ya-locate-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}
.ya-locate-ico > svg {
  grid-area: 1 / 1;
  display: block;
}
.fab--ya-locate[data-locate-mode="idle"] .ya-locate-ico__follow,
.fab--ya-locate[data-locate-mode="idle"] .ya-locate-ico__course,
.fab--ya-locate[data-locate-mode="follow"] .ya-locate-ico__find,
.fab--ya-locate[data-locate-mode="follow"] .ya-locate-ico__course,
.fab--ya-locate[data-locate-mode="course"] .ya-locate-ico__find,
.fab--ya-locate[data-locate-mode="course"] .ya-locate-ico__follow {
  display: none !important;
}
.fab--ya-locate[data-locate-mode="follow"] .ya-locate-ico__follow,
.fab--ya-locate[data-locate-mode="course"] .ya-locate-ico__course {
  display: block !important;
}

.ya-compass {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.ya-compass__needle {
  width: 18px;
  height: 26px;
  position: relative;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 0.08s linear;
}
.ya-compass__n,
.ya-compass__s {
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  transform: translateX(-50%);
}
.ya-compass__n {
  top: 0;
  border-bottom: 12px solid #E53935;
}
.ya-compass__s {
  bottom: 0;
  border-top: 12px solid #B0BEC5;
}
.ya-compass__needle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #37474F;
  box-shadow: 0 0 0 1.5px #fff;
}

.user-location-marker {
  background: transparent !important;
  border: none !important;
}
.ya-user-dot {
  position: relative;
  width: 22px;
  height: 22px;
}
.ya-user-dot__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.28);
  animation: ya-user-pulse 2.2s ease-out infinite;
}
.ya-user-dot__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #1A73E8;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}
.ya-user-dot--course .ya-user-dot__core {
  display: none;
}
.ya-user-dot__arrow {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: -11px 0 0 -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 18px solid #1A73E8;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.ya-user-dot--course .ya-user-dot__arrow {
  display: block;
}
.ya-user-dot--course .ya-user-dot__pulse {
  inset: -4px;
}
@keyframes ya-user-pulse {
  0% { transform: scale(0.55); opacity: 0.7; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

#btn-notifications .map-fab-obj {
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.fab--primary {
  background: var(--accent);
  color: white;
}

.fab--primary.fab--object {
  background: var(--accent);
}
.fab--primary.fab--object .map-fab-obj {
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.22));
}

.fab--secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Nearby panel — bottom sheet */
.nearby-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-radius: 20px 20px 0 0;
  z-index: 550;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 58px;
  overflow: hidden;
}

.nearby-panel--peek {
  height: 58px;
  max-height: 58px;
}

.nearby-panel--peek .nearby-panel__handle-wrap {
  padding: 8px 0 0;
  min-height: 0;
}

.nearby-panel--peek .nearby-panel__handle {
  height: 4px;
  width: 36px;
}

.nearby-panel--peek .nearby-panel__header {
  padding: 2px 16px 8px;
  align-items: center;
}

.nearby-panel--peek .nearby-panel__title {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
}

.nearby-panel--peek .nearby-panel__hint {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 0;
}

.nearby-panel--expanded {
  max-height: 45vh;
}

.nearby-panel__handle-wrap {
  width: 100%;
  padding: 10px 0 4px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nearby-panel__handle {
  width: 36px;
  height: 4px;
  background: var(--text-muted);
  opacity: 0.4;
  border-radius: 2px;
  margin: 0 auto;
}

.nearby-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.nearby-panel__title {
  font-size: 15px;
  font-weight: 600;
}

.nearby-panel__title span { color: var(--accent); }

.nearby-panel__hint {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 8px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}

.nearby-panel__hint:active {
  opacity: 0.75;
}

.nearby-search {
  padding: 0 12px 10px;
  flex-shrink: 0;
}

.nearby-panel--peek .nearby-search {
  display: none;
}

.nearby-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.nearby-search input:focus {
  border-color: var(--accent);
}

.nearby-search input::placeholder {
  color: var(--text-muted);
}

.nearby-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.nearby-panel--peek .nearby-list {
  display: none;
}

.nearby-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px;
  border-left: 3px solid var(--cat-color, var(--accent));
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.nearby-card:hover,
.nearby-card--focus {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 14%, var(--bg-card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cat-color, var(--accent)) 35%, transparent);
}

.nearby-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.nearby-card__cat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--cat-color);
  font-weight: 600;
  min-width: 0;
  margin-bottom: 0;
}
.nearby-card__map-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 4px 8px 4px 6px;
}
.nearby-card__text { font-size: 13px; line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nearby-card__meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.music-air {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #d946ef 12%, var(--bg));
  border: 1px solid color-mix(in srgb, #d946ef 35%, var(--border));
}

.music-air--sheet {
  margin: 12px 0;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.music-air__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.music-air__channel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #d946ef;
}

.music-air__label {
  font-size: 11px;
  font-weight: 700;
  color: #d946ef;
}

.music-air__track {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-air__track--lg {
  font-size: 15px;
  white-space: normal;
}

.music-air__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.music-air--sheet .music-air__controls {
  width: 100%;
}

.music-play-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: #d946ef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.2s;
  flex-shrink: 0;
}

.music-play-btn--lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.music-play-btn--on {
  background: color-mix(in srgb, #d946ef 65%, #111);
}

.music-play-btn:active { transform: scale(0.96); }

.music-restore-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.15s, opacity 0.2s;
}

.music-air--sheet .music-restore-btn {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.music-restore-btn:hover { border-color: var(--accent); }
.music-restore-btn:active { transform: scale(0.96); }
.music-restore-btn--hidden {
  opacity: 0.35;
  pointer-events: none;
}

.music-stop-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.15s, opacity 0.2s, background 0.2s;
}

.music-air--sheet .music-stop-btn {
  width: 48px;
  height: 48px;
  font-size: 14px;
}

.music-stop-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}
.music-stop-btn:active { transform: scale(0.96); }
.music-stop-btn--hidden {
  opacity: 0.35;
  pointer-events: none;
}

.nearby-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
  line-height: 1.5;
}

/* ===== Map markers ===== */
.custom-marker-wrapper { background: none !important; border: none !important; overflow: visible !important; }

.custom-marker {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 3px 11px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border: 2px solid #fff;
  background: color-mix(in srgb, var(--cat-color, #5B9FE6) 82%, #fff);
  opacity: 1;
  filter: none;
}

.custom-marker span,
.custom-marker__ico {
  transform: rotate(45deg);
  font-size: 13px;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.custom-marker__ico .cat-ico__svg,
.custom-marker__ico .cat-ico__obj {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.2));
}

.custom-marker--focus {
  transform: rotate(-45deg) scale(1.32);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 7px color-mix(in srgb, var(--cat-color, #4f8cff) 85%, #fff),
    0 8px 20px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.custom-marker--urgent {
  animation: pulse-urgent 1.5s infinite;
}

@keyframes pulse-urgent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

/* ===== Chats ===== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px 8px;
  overflow-x: auto;
  flex-shrink: 0;
}

.tab {
  padding: 6px 14px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.tab--active {
  background: var(--accent);
  color: white;
}

/* Чаты: верхняя шторка (складывается вверх) */
.chats-top {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 3;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 320px;
}
.chats-top--peek {
  max-height: 44px;
}
.chats-top--peek .chats-top__body {
  display: none;
}
.chats-top--expanded {
  max-height: 320px;
}
.chats-top__body {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chats-top__handle-wrap {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}
.chats-top--peek .chats-top__handle-wrap {
  flex-direction: row;
  gap: 10px;
  padding: 6px 16px;
  min-height: 44px;
}
.chats-top__handle {
  width: 36px;
  height: 4px;
  background: var(--text-muted);
  opacity: 0.4;
  border-radius: 2px;
  flex-shrink: 0;
}
.chats-top--peek .chats-top__handle {
  width: 32px;
  height: 3px;
}
.chats-top__peek-label {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.chats-top--peek .chats-top__peek-label {
  display: inline;
}
.chats-top__peek-label span:empty {
  display: none;
}
.chats-top__peek-label span:not(:empty)::before {
  content: '· ';
  color: var(--accent);
  font-weight: 700;
}
.chats-top__peek-label span:not(:empty) {
  color: var(--accent);
}

.chat-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 8px;
  flex-shrink: 0;
}
.chat-toolbar__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.chat-toolbar__hint {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-toolbar .chat-tool-btn {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}
.chat-toolbar .chat-tool-btn:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
}
.chat-tool-btn__arrows {
  display: flex;
  line-height: 0;
}
.chat-tool-btn__dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-card);
}
.chat-filters-sheet {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
}
.chat-filters-sheet__block {
  padding: 10px 4px 6px;
}
.chat-filters-sheet__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.chat-filters-sheet__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-filter-chip {
  padding: 7px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.chat-filter-chip--on {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}
.chat-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chat-filters::-webkit-scrollbar { display: none; }
.chat-chip {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chat-chip--active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}
.chat-chip--sort {
  width: 100%;
  justify-content: space-between;
  color: var(--text);
}
.chat-chip__label {
  color: var(--text-muted);
  font-weight: 500;
}
.chat-chip__value {
  margin-left: auto;
  margin-right: 4px;
  color: var(--accent);
  font-weight: 700;
}
.chat-chip__chevron {
  color: var(--text-muted);
  font-size: 11px;
}
.chat-filters__badge {
  margin-left: 2px;
  min-width: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  display: inline-block;
}

.msg__footer,
.post-msg__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.msg-votes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.msg-votes__btn {
  border: none;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  cursor: pointer;
  font-size: 14px;
  opacity: 1;
  padding: 4px 6px;
  border-radius: 8px;
  line-height: 1;
}
.msg-votes__btn:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.msg-votes__btn--on {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.msg-votes__btn--down.msg-votes__btn--on {
  background: color-mix(in srgb, #ef4444 22%, transparent);
}
.msg-votes__count {
  font-size: 11px;
  font-weight: 700;
  min-width: 0.8em;
  color: var(--text-muted);
}
.msg-votes__count--up { color: var(--accent); }
.msg-votes__count--down { color: #ef4444; }
.msg--self .msg-votes__count--up,
.msg--self .msg-votes__count--down { color: rgba(255,255,255,0.95); }
.msg-votes--compact .msg-votes__btn { font-size: 13px; }
.msg-votes--readonly {
  pointer-events: none;
  opacity: 0.9;
  gap: 4px;
}
.msg-votes__ro {
  font-size: 13px;
  line-height: 1;
}
.msg--self .msg-votes__btn {
  background: rgba(255,255,255,0.16);
}
.msg--self .msg-votes__btn--on {
  background: rgba(255,255,255,0.28);
}
.post-detail__votes {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.msg-votes--post .msg-votes__btn {
  font-size: 16px;
  padding: 6px 8px;
}

.nav-item__badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.modal--notifications .modal__content {
  max-height: 60vh;
  overflow: auto;
}
.notif-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-list__empty {
  padding: 20px 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}
.notif-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notif-item--unread {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
}
.notif-item__title {
  font-size: 13px;
  font-weight: 700;
}
.notif-item__body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}
.notif-item__time {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-search {
  padding: 0 12px 8px;
  flex-shrink: 0;
}
.chat-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.chat-search input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.chat-list__empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.chat-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px;
  border-left: 3px solid var(--cat-color, var(--accent));
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  position: relative;
}
.chat-card:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--bg-card) 80%, var(--accent));
}
.chat-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-card__top-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  flex: 1;
}
.chat-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--cat-color, var(--accent));
  font-weight: 600;
}
.chat-card__cat .cat-ico--badge {
  flex-shrink: 0;
}
.chat-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.chat-card__when {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.chat-card__text {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-card__music {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 12%, transparent);
  font-size: 12px;
}
.chat-card__music-ch {
  font-weight: 700;
  color: var(--cat-color, var(--accent));
  font-size: 11px;
}
.chat-card__last,
.nearby-card__last {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-card__last strong,
.nearby-card__last strong { color: var(--text); font-weight: 600; }
.chat-card__meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.chat-card__meta .post-loc-btn {
  font-size: 11px;
  padding: 4px 8px 4px 6px;
}
.chat-card__map-btn {
  font-size: 11px;
  padding: 4px 8px 4px 6px;
}
.post-loc-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: inherit;
  line-height: 1.2;
}
.post-loc-type__ico {
  display: inline-flex;
  color: var(--accent);
  line-height: 0;
  opacity: 0.9;
}
.chat-card__unread {
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 700;
  font-size: 10px;
}
.chat-card__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-card__avatar--img {
  background: var(--bg-card);
  padding: 0;
}
.chat-card__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-card__avatar--icon { font-size: 20px; }
.chat-card__main { flex: 1; min-width: 0; }
.chat-card__kind-line {
  font-size: 11px;
  font-weight: 600;
  color: var(--cat-color, var(--accent));
  margin-bottom: 4px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.chat-item:hover { background: rgba(255,255,255,0.03); }

.chat-item__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  position: relative;
}

.chat-item__avatar--point { font-size: 20px; }

.chat-item__badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.chat-item__body { flex: 1; min-width: 0; }
.chat-item__top { display: flex; justify-content: space-between; margin-bottom: 2px; }
.chat-item__name { font-weight: 600; font-size: 14px; }
.chat-item__time { font-size: 11px; color: var(--text-muted); }
.chat-item__preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item__kind { color: var(--accent); font-weight: 600; }

.chat-item__unread {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Profile ===== */
#screen-profile {
  overflow: hidden;
}

.auth-card {
  margin: 12px 16px 0;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
}
.auth-card[hidden] { display: none !important; }
.auth-card--collapsed {
  margin: 0 16px 8px;
  padding: 0;
  border: none;
  background: transparent;
}
.auth-card--open {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
  border-radius: 14px;
}
.auth-card__toggle {
  flex: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card, var(--surface));
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.auth-card__toggle:hover { border-color: var(--accent); }
.auth-card__toggle-ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
}
.auth-card__toggle-ico svg { display: block; width: 100%; height: 100%; }
.auth-card__panel {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.auth-card__panel[hidden] { display: none !important; }

.auth-card__lead {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary, var(--muted));
}

.auth-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, var(--muted));
}

.auth-card__meta {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}

.auth-card__privacy {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}
.auth-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.auth-card__sub {
  margin-left: auto;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  cursor: pointer;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-card__sub:hover { color: #15803d; }
.auth-card__sub[hidden] { display: none !important; }

.auth-tabs {
  display: none;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--border) 55%, transparent);
}
.auth-tabs[hidden] { display: none !important; }

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, var(--muted));
  cursor: pointer;
}

.auth-tab--on {
  background: var(--surface, #fff);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-panel .form-group {
  margin-bottom: 12px;
}

.auth-vk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.profile-header {
  display: flex;
  gap: 16px;
  padding: 20px 12px 20px 16px;
  align-items: flex-start;
  position: relative;
}
.profile-info {
  flex: 1;
  min-width: 0;
}
.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.profile-info .profile-name-row h1 { margin-bottom: 0; min-width: 0; }
.profile-auth-toggle {
  position: static;
  margin: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}
#btn-auth-panel-toggle[hidden] { display: none !important; }

.profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.profile-selftest-btn {
  font-size: 12px;
  padding: 2px 4px;
  color: var(--accent);
}

.selftest-howto {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.selftest-howto__step {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.selftest-howto__step:last-child { margin-bottom: 0; }

.selftest-summary {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 600;
}
.selftest-summary--ok { color: #16a34a; border-color: #16a34a55; }
.selftest-summary--fail { color: #dc2626; border-color: #dc262655; }

.selftest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0 0 16px;
}
.selftest-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
}
.selftest-item__mark { font-weight: 700; }
.selftest-item--ok .selftest-item__mark { color: #16a34a; }
.selftest-item--fail .selftest-item__mark { color: #dc2626; }
.selftest-item--skip .selftest-item__mark { color: var(--text-muted); }
.selftest-item__title { font-weight: 600; margin-bottom: 2px; }
.selftest-item__detail { color: var(--text-muted); font-size: 12px; line-height: 1.35; }

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.15s, box-shadow 0.2s;
}

.profile-avatar:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.profile-avatar:active { transform: scale(0.97); }

.profile-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.profile-avatar__img[hidden] {
  display: none;
}

.profile-avatar__initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
}

.profile-avatar__initials[hidden] {
  display: none;
}

.profile-nav-btn__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.profile-nav-btn__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal--avatar {
  max-height: 78vh;
}

.avatar-photo-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.avatar-photo-btn:active { transform: scale(0.99); }

.avatar-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 12px 0 8px;
}

.avatar-sheet-toolbar__hint {
  margin: 0;
}

.avatar-sheet-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.avatar-sheet-nav .btn-action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;
}

.avatar-sheet-nav__btn {
  min-width: 44px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.avatar-sheet-nav__btn.is-on {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding-bottom: 8px;
}

.avatar-grid__item {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.avatar-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-grid__item:hover { border-color: var(--accent); }
.avatar-grid__item--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.avatar-grid__item:active { transform: scale(0.96); }

.profile-info h1 { font-size: 20px; margin-bottom: 4px; }
.profile-public-hint {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.profile-location { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

.profile-name-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  min-height: 36px;
}
.profile-edit-name-btn {
  display: inline-block;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--accent);
}
.profile-edit-card {
  margin: 0 16px 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.profile-edit-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -4px -6px 4px 0;
}
.profile-edit-card__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.profile-edit-card__head .profile-edit-card__label { margin-bottom: 0; }
.profile-edit-card__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.profile-edit-card__row .form-input {
  flex: 1;
  min-width: 0;
}
.profile-edit-card__row .btn-action {
  flex-shrink: 0;
  width: auto;
  padding: 0 14px;
  white-space: nowrap;
}

.trust-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge-trust {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-trust--verified { color: #34d399; border-color: #34d39940; }

.rating-card {
  margin: 0 16px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.rating-main {
  text-align: center;
  margin-bottom: 12px;
}

.rating-value { font-size: 36px; font-weight: 700; color: var(--accent); }
.rating-stars { color: #fbbf24; font-size: 18px; margin: 4px 0; }
.rating-stars--dim,
.profile-rating-card--empty .rating-stars {
  color: color-mix(in srgb, var(--text-muted) 70%, transparent);
  opacity: 0.55;
}
.profile-rating-card--empty #profile-rating-value {
  color: var(--text-muted);
}
.rating-count { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }
.rating-votes {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.rating-howto {
  display: none;
  margin: 0;
}

#profile-rating-card {
  cursor: pointer;
}
#profile-rating-card:active {
  opacity: 0.92;
}

.rating-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  font-size: 12px;
  color: var(--text);
}
.rating-chip__score {
  font-weight: 700;
  color: var(--accent);
}
.rating-chip--muted {
  color: var(--text-muted);
  font-style: normal;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
}
.stat-card {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  color: inherit;
  font: inherit;
  cursor: default;
}
button.stat-card {
  cursor: pointer;
}
button.stat-card:hover {
  border-color: var(--accent);
}
.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.menu-list {
  margin: 0 16px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.menu-item[hidden] {
  display: none !important;
}
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.menu-item__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.menu-item__main strong {
  font-size: 15px;
  font-weight: 600;
}
.menu-item__main small {
  font-size: 12px;
  color: var(--text-muted);
}
.menu-item svg { flex-shrink: 0; color: var(--text-muted); }

.reviews-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
button.review-card {
  width: 100%;
  display: block;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.admin-people, .admin-journal { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.admin-person {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.admin-person__top { display: flex; gap: 10px; align-items: center; }
.admin-person__name { font-weight: 600; }
.admin-person__phone { font-size: 12px; color: var(--text-muted); }
.admin-person__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-person__actions .btn-action { flex: 0 0 auto; padding: 6px 10px; font-size: 13px; }
.admin-journal__item { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.review-card__who {
  font-size: 14px;
  font-weight: 600;
}
.review-card__stars {
  color: #fbbf24;
  font-size: 13px;
  letter-spacing: 1px;
}
.review-card__text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}
.review-card__meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.reviews-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.my-post-card {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.my-post-card:active {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}
.my-post-card__status {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ===== Contacts ===== */
.contacts-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 24px;
  -webkit-overflow-scrolling: touch;
}

.contacts-search {
  margin: 4px 0 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(to bottom, var(--bg-elevated) 70%, transparent);
  padding-bottom: 4px;
}

.contacts-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.contacts-search input:focus {
  border-color: var(--accent);
}

.contacts-search input::placeholder {
  color: var(--text-muted);
}

.contacts-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 4px 16px;
  margin: 0;
}

.invite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.invite-grid--apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.invite-grid--apps .invite-chip {
  padding: 10px 4px 8px;
  font-size: 10px;
}
.invite-grid--apps .invite-chip__logo svg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.invite-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}

.invite-chip:hover { border-color: var(--accent); }
.invite-chip:active { transform: scale(0.97); }

.invite-chip__logo {
  display: flex;
  line-height: 0;
}
.invite-chip__logo svg {
  display: block;
  border-radius: 8px;
}

.contacts-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin: 12px 0 10px;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.contact-row:hover,
.contact-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
}

.contact-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.contact-row__avatar--img {
  background: var(--bg-card);
  padding: 0;
}
.contact-row__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-row__body {
  flex: 1;
  min-width: 0;
}

.contact-row__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-row__status {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.contact-row__phone {
  display: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
}
.contact-row__phone--hidden {
  color: var(--text-muted);
  font-weight: 500;
  font-style: italic;
}
.contact-row:hover .contact-row__phone,
.contact-row:focus-within .contact-row__phone {
  display: block;
}

.contact-row__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  align-items: stretch;
  flex-wrap: wrap;
}

.contact-row__btn {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.contact-row__btn--dm {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.contact-row__btn--invite {
  background: color-mix(in srgb, #34d399 18%, transparent);
  color: #34d399;
}
.contact-row__btn:active { transform: scale(0.97); }

/* на тач-устройствах без hover — всегда показывать действия */
@media (hover: none) {
  .contact-row__phone,
  .contact-row__actions {
    display: flex;
  }
  .contact-row__phone {
    display: block;
  }
}

.app-download {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
}
.app-download__link {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 8px;
}
.app-download__link:hover { text-decoration: underline; }
.app-download__hint {
  margin: 0 0 12px;
}
.app-download__qr {
  display: block;
  margin: 0 auto;
  width: 160px;
  height: 160px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

.menu-item__value {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}

/* ===== Settings (phone-like) ===== */
#screen-settings {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.settings-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 24px;
  -webkit-overflow-scrolling: touch;
}

.settings-group {
  padding: 8px 16px 4px;
}

.settings-group h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin: 8px 4px 8px;
  font-weight: 600;
}

.settings-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.settings-card > .settings-row:last-child {
  border-bottom: none;
}

.settings-row--static {
  cursor: default;
  align-items: flex-start;
}

.settings-row--toggle {
  cursor: pointer;
}

.settings-row--stack {
  align-items: flex-start;
}

.settings-api-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 4px;
  align-items: center;
}

.settings-api-edit .form-input {
  flex: 1 1 160px;
  min-width: 0;
  margin: 0;
}

.settings-api-edit .btn-action {
  flex: 0 0 auto;
  padding: 10px 14px;
}

.settings-row--toggle input {
  display: none;
}

.settings-row__icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-row__body--slider {
  gap: 8px;
}

.settings-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.settings-row--scale {
  cursor: default;
  align-items: flex-start;
}

.settings-row--scale .settings-row__icon {
  margin-top: 2px;
}

.settings-row--scale input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin: 0;
}

.settings-row__scale-hints {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

.settings-row__title {
  font-size: 15px;
  font-weight: 500;
}

.settings-row__value {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-row__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
}

.settings-row--field {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 1px solid var(--border);
  margin-top: 0;
}

.settings-row--field:hover {
  border-color: var(--accent);
}

.sheet-toggles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sheet-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  color: var(--text);
}

.sheet-toggle--map-rotate {
  margin-bottom: 12px;
  background: color-mix(in srgb, var(--bg-card) 90%, var(--accent) 10%);
}

.sheet-toggle input { display: none; }

.sheet-toggle__icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.sheet-toggle__body { flex: 1; min-width: 0; }
.sheet-toggle__name { display: block; font-size: 14px; font-weight: 600; }
.sheet-toggle__desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.sheet-toggle input:checked + .toggle-slider { background: var(--accent); }
.sheet-toggle input:checked + .toggle-slider::after { transform: translateX(20px); }

.sheet-toggle--disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.sheet-time-row--disabled {
  opacity: 0.48;
  pointer-events: none;
}

.sheet-section-label {
  margin: 14px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sheet-notif-delivery {
  margin: 0 2px 4px;
}

.sheet-notif-hint {
  margin: 0 4px 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

.sheet-time-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 4px 2px 8px;
}

.sheet-time-row label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.sheet-time-row input[type="time"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}

.sheet-sound {
  padding: 8px 4px 16px;
}

.sheet-sound__hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.sheet-sound__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-sound__row input {
  flex: 1;
  accent-color: var(--accent);
}

.help-disclaimer {
  padding-bottom: 8px;
}

.help-disclaimer__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ef4444;
  background: rgba(239,68,68,0.15);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.help-disclaimer__lead {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.help-disclaimer__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
}

.help-disclaimer__list {
  margin: 16px 0 8px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.help-disclaimer__list li { margin-bottom: 6px; }

.help-call-112 {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(239,68,68,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.help-call-112:active {
  transform: scale(0.98);
}

.help-call-112__num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.help-call-112__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.help-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
}

.help-banner__text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.help-banner .help-call-112 {
  padding: 10px 14px;
}

.help-banner .help-call-112__num {
  font-size: 22px;
}

.settings-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.style-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
}

.setting-toggle input { display: none; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: var(--bg);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.setting-toggle input:checked + .toggle-slider { background: var(--accent); }
.setting-toggle input:checked + .toggle-slider::after { transform: translateX(20px); }

.settings-row--toggle input:checked + .toggle-slider { background: var(--accent); }
.settings-row--toggle input:checked + .toggle-slider::after { transform: translateX(20px); }

.volume-slider { width: 100%; max-width: 160px; accent-color: var(--accent); }

/* ===== Bottom nav ===== */
.bottom-nav {
  display: flex;
  height: var(--nav-h);
  box-sizing: border-box;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 60;
  position: relative;
}

html.android-native .bottom-nav,
.app-shell--android-native .bottom-nav {
  /* место под системную панель уже в padding app-shell / WebView */
  padding-bottom: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
  padding: 6px 2px;
  position: relative;
  min-height: 48px;
}

.nav-item--active { color: var(--accent); }

/* Симуляция Android: ◁ ● □ */
.sys-nav {
  flex-shrink: 0;
  height: calc(var(--sys-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: none;
  align-items: center;
  justify-content: space-evenly;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 70;
  position: relative;
  user-select: none;
  pointer-events: none;
}

.app-shell--sys-nav .sys-nav {
  display: flex;
}

.sys-nav[hidden] {
  display: none !important;
}

.sys-nav__btn {
  display: block;
  flex-shrink: 0;
  opacity: 0.92;
}

.sys-nav__btn--back {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 14px 9px 0;
  border-color: transparent #e8eaef transparent transparent;
}

.sys-nav__btn--home {
  width: 18px;
  height: 18px;
  border: 2px solid #e8eaef;
  border-radius: 50%;
  box-sizing: border-box;
}

.sys-nav__btn--recents {
  width: 15px;
  height: 15px;
  border: 2px solid #e8eaef;
  border-radius: 2px;
  box-sizing: border-box;
}

/* ===== Modals — smooth sheet transitions ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0);
  visibility: hidden;
  pointer-events: none;
  transition: background 0.35s ease, visibility 0.35s;
}

.modal-overlay--active {
  visibility: visible;
  pointer-events: auto;
  background: rgba(15,23,42,.45);
}

.modal-overlay--closing {
  visibility: visible;
  pointer-events: none;
  background: rgba(0,0,0,0);
}

.modal {
  background: var(--bg-elevated);
  width: var(--phone-w);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(110%);
  opacity: 0.96;
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
  will-change: transform;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.45);
}

.modal-overlay--active .modal {
  transform: translateY(0);
  opacity: 1;
}

.modal-overlay--closing .modal {
  transform: translateY(110%);
  opacity: 0.9;
}

.modal--sheet {
  border-radius: 20px 20px 0 0;
  max-height: 78vh;
}

.modal--post {
  max-height: 78vh;
  height: min(78vh, 640px);
}

.modal--full {
  height: 100%;
  max-height: var(--phone-h);
  border-radius: 20px 20px 0 0;
}

.modal--create {
  max-height: min(72vh, 560px);
  height: auto;
}
.modal--create .modal__content {
  padding-bottom: calc(16px + var(--safe-bottom, 0px));
}
.modal--create .create-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal--radio {
  max-height: 82vh;
}

.modal--radio-list {
  height: 75vh;
  max-height: 75vh;
}

.modal--radio-list .modal__handle {
  margin: 6px auto 2px;
}

.modal--radio-list .modal-header--sheet {
  padding: 2px 14px 8px;
}

.modal--radio-list .modal__content {
  padding: 6px 10px 10px;
  min-height: 0;
}

.modal__handle {
  width: 40px;
  height: 5px;
  background: #CBD5E1;
  border-radius: 3px;
  /* зона ручки 24 px */
  margin: 10px auto 9px;
  flex-shrink: 0;
}
:root:not([data-theme="day"]) .modal__handle { background: #4A5163; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 { font-size: 17px; font-weight: 600; }

/* п. 7.3: единая шапка шторки — [48] заголовок по центру [действие] [крестик 48] */
.modal-header--sheet {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 48px;
  align-items: center;
  column-gap: 4px;
  min-height: 56px;
  padding: 0 4px;
}
.modal-header--sheet > h2 {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}
.modal-header--sheet > :not(h2):not(.sheet-close) { grid-column: 3; grid-row: 1; justify-self: end; }
.modal-header--sheet > .sheet-close { grid-column: 4; grid-row: 1; }
.modal--radio-list .modal-header--sheet { padding: 0 4px; }

.sheet-header-btn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.sheet-header-btn:hover,
.sheet-header-btn:focus-visible { background: color-mix(in srgb, var(--text) 8%, transparent); }
.sheet-header-btn:active { background: color-mix(in srgb, var(--text) 14%, transparent); }
.sheet-header-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sheet-close {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.sheet-close:hover,
.sheet-close:focus-visible { background: color-mix(in srgb, var(--text) 8%, transparent); }
.sheet-close:active { background: color-mix(in srgb, var(--text) 14%, transparent); }
.sheet-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Шторки без шапки (пост, вложение, точка): крестик в строке ручки */
.sheet-close--float {
  position: absolute;
  top: 0;
  right: 4px;
  z-index: 5;
}
.modal:has(> .sheet-close--float) > .modal__handle { margin: 22px auto 21px; }

.picker-list {
  padding: 8px 12px 24px !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Ночь для провайдеров без тёмных тайлов (Google, 2ГИС, OSM…) */
#map.map--night-filter .leaflet-tile-pane {
  filter: invert(0.92) hue-rotate(180deg) brightness(0.95) contrast(0.92);
}

.cat-wheel-mode-block {
  margin: 0 0 12px;
  padding: 0 2px 4px;
}
.cat-wheel-mode-block .map-view-seg {
  grid-template-columns: 1fr 1fr;
}
.cat-wheel-mode-hint {
  margin: 8px 4px 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.map-view-seg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.map-view-seg--4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
.map-view-seg + .map-view-seg {
  margin-top: -2px;
}
.map-view-seg__btn {
  min-height: 40px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
.map-view-seg--4 .map-view-seg__btn {
  font-size: 11px;
  padding: 8px 2px;
}
.map-view-seg__btn--on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-card));
  color: var(--accent);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.picker-item:hover {
  border-color: color-mix(in srgb, var(--cat-color, var(--accent)) 50%, var(--border));
}

.picker-item--active {
  border-color: var(--cat-color, var(--accent));
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 10%, var(--bg-card));
}

.picker-item--action {
  border-style: dashed;
  margin-bottom: 4px;
}

.picker-item__icon {
  font-size: 24px;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.picker-item__icon--cat {
  width: 36px;
  color: inherit;
}

/* ===== Category icons (WeChat / Alipay style) ===== */
.cat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
}
.cat-ico--badge {
  width: var(--cat-size, 28px);
  height: var(--cat-size, 28px);
  border-radius: calc(var(--cat-size, 28px) * 0.28);
  background: var(--cat-color, var(--accent));
  color: #fff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--cat-color, var(--accent)) 35%, transparent);
}
.cat-ico--pastel {
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, #fff);
  color: inherit;
  box-shadow:
    0 2px 8px color-mix(in srgb, var(--cat-color, var(--accent)) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 35%, transparent);
}
.cat-ico__obj {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}
.cat-ico__svg {
  display: block;
  flex-shrink: 0;
}
.cat-ico__svg--object {
  overflow: visible;
}
.cat-ico__emoji {
  font-size: 1em;
  line-height: 1;
}

.ui-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}
.ui-ico--badge {
  width: var(--ui-size, 28px);
  height: var(--ui-size, 28px);
  border-radius: calc(var(--ui-size, 28px) * 0.28);
  background: var(--ui-color, var(--accent));
  color: #fff;
}
.ui-ico__svg {
  display: block;
  flex-shrink: 0;
}

.settings-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  width: 32px;
  height: 32px;
}
.settings-row__icon .brand-logo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 7px;
  overflow: hidden;
}
.brand-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.picker-item__body {
  flex: 1;
  min-width: 0;
}

.picker-item__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.picker-item__desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.picker-item__check {
  font-size: 18px;
  color: var(--cat-color, var(--accent));
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.picker-check {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 2.5px solid color-mix(in srgb, var(--text-muted) 55%, transparent);
  background: transparent;
  box-sizing: border-box;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.picker-check--on {
  border-color: var(--cat-color, var(--accent));
  background: var(--cat-color, var(--accent));
}
.picker-check--on::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.modal__content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn-text:disabled { opacity: 0.4; cursor: not-allowed; }

/* Post detail sheet — пост + общий чат одной лентой */
.post-sheet {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.post-sheet__feed {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.post-sheet__info {
  flex-shrink: 0;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}

.post-sheet__respond {
  width: 100%;
  margin-top: 4px;
}

/* Radio FAB + flyout volume */
.radio-fab-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.radio-fab-wrap[hidden],
.radio-fab-wrap.radio-fab-wrap--off {
  display: none !important;
}

.radio-fab-flyout {
  position: absolute;
  bottom: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.22s;
}

/* Громкость только после первого тапа (primed) или когда радио играет */
.radio-fab-wrap--primed:hover .radio-fab-flyout,
.radio-fab-wrap--primed:focus-within .radio-fab-flyout,
.radio-fab-wrap--open .radio-fab-flyout,
.radio-fab-wrap--on:hover .radio-fab-flyout,
.radio-fab-wrap--on:focus-within .radio-fab-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.radio-fab-stations {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-fab-volume {
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: slider-vertical;
  width: 28px;
  height: 100px;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.raione-fm-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35);
}
.raione-fm-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.radio-header__art .raione-fm-logo {
  border-radius: 14px;
}

.radio-fab-volume-icon,
.radio-fab-miniplayer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  font-size: 0;
}

.fab--radio {
  /* фон как у locate / settings / + — через fab--secondary fab--object */
  color: inherit;
}
.fab--radio .ui-ico--badge {
  box-shadow: none;
}
.fab--radio .radio-fab-obj,
.fab--radio .radio-obj {
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18));
}

.fab--radio-on {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow);
}

.post-sheet__chat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--bg) 55%, var(--bg-elevated));
}

.post-sheet__chat-title {
  flex-shrink: 0;
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.post-sheet__messages {
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Компактная шторка поста при малом числе сообщений */
.modal--post.modal--post-compact {
  height: auto;
  max-height: 72vh;
}
.modal--post.modal--post-compact .post-sheet__feed {
  flex: 0 1 auto;
  overflow-y: auto;
  max-height: min(58vh, 520px);
}

.post-sheet__empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 12px;
}

.post-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
}

.post-msg--self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.post-msg__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.post-msg__avatar--img {
  background: var(--bg-card);
  padding: 0;
}
.post-msg__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-msg__bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px;
  min-width: 0;
}

.post-msg--self .post-msg__bubble {
  background: color-mix(in srgb, var(--accent) 22%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 14px 14px 4px 14px;
}

.post-msg__author {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--accent);
}

.post-msg__text {
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.post-msg__time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.post-sheet__reply-wrap {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.post-sheet__reply {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 14px;
  border-top: none;
  background: transparent;
}

.compose-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.compose-field input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 10px 40px 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.compose-field input:focus {
  border-color: var(--accent);
}

.compose-field input.compose-ai--ok,
.compose-field input.compose-ai--ok:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.28);
}

.compose-field input.compose-ai--bad,
.compose-field input.compose-ai--bad:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
}

.compose-field__attach {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.compose-field__attach:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.compose-field__attach svg {
  display: block;
}

.post-reply-chip {
  flex-shrink: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.post-reply-chip:active {
  transform: scale(0.96);
}

.post-reply-chip--dm {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.chat-dm-block {
  font-size: 12px;
  color: #ef4444;
  white-space: nowrap;
  padding: 4px 6px;
}

.chat-dm-banner {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated));
  font-size: 13px;
  color: var(--text);
}

.chat-dm-banner p { margin: 0 0 8px; }
.chat-dm-banner__hint {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  font-size: 11px;
  color: var(--text-muted);
}

.chat-dm-banner__actions {
  display: flex;
  gap: 8px;
}

.chat-dm-banner__actions .btn-action {
  padding: 10px 12px;
  font-size: 13px;
}

.chat-input-bar--locked {
  opacity: 0.55;
}

.msg--system {
  align-self: center;
  max-width: 90%;
  text-align: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 10px;
}

.msg--dm-request {
  align-self: stretch;
  max-width: 100%;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 14px;
  padding: 12px;
}

.msg__dm-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.msg__dm-text {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.msg__dm-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text-muted) 18%, transparent);
  color: var(--text-muted);
}

.msg__dm-status--pending { color: #f59e0b; background: rgba(245, 158, 11, 0.15); }
.msg__dm-status--allowed { color: #34d399; background: rgba(52, 211, 153, 0.15); }
.msg__dm-status--denied,
.msg__dm-status--blocked { color: #ef4444; background: rgba(239, 68, 68, 0.15); }

.post-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-detail__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}
.post-detail__avatar--img {
  padding: 0;
  background: var(--bg-card);
}
.post-detail__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-detail__author { flex: 1; }
.post-detail__author strong { display: block; font-size: 15px; }
.post-detail__author small { color: var(--text-muted); font-size: 12px; }
.post-detail__rating { color: #fbbf24; font-weight: 600; }

.post-detail__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.post-detail__cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: color-mix(in srgb, var(--cat-color) 15%, transparent);
  color: var(--cat-color);
  margin-bottom: 0;
}
.post-detail__map-btn {
  flex-shrink: 0;
}
.post-detail__map-fab {
  flex-shrink: 0;
  margin-left: auto;
}
.post-detail__top .post-status {
  margin-bottom: 0;
}

.post-map-fab {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s, background 0.15s;
}
.post-map-fab:active {
  transform: scale(0.96);
}
.post-map-fab__ico {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.post-map-fab__ico .map-fab-obj-wrap,
.post-map-fab__ico .map-fab-obj {
  width: 20px !important;
  height: 20px !important;
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18));
}
.chat-card__map-fab {
  width: 32px;
  height: 32px;
  align-self: flex-start;
}

.post-detail__text { font-size: 15px; line-height: 1.5; margin-bottom: 12px; }

.post-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  align-items: center;
}

.post-loc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card, #fff));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.post-loc-btn:active {
  transform: scale(0.96);
}
.post-loc-btn__ico {
  display: inline-flex;
  color: var(--accent);
  line-height: 0;
}

.map-return-fab {
  position: absolute;
  left: 12px;
  bottom: calc(58px + 12px);
  z-index: 620;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: bottom 0.35s cubic-bezier(0.32, 0.72, 0, 1), transform 0.15s, opacity 0.2s;
}
.map-return-fab[hidden] {
  display: none !important;
}
.map-return-fab:active {
  transform: scale(0.94);
}
#screen-map:has(.nearby-panel--expanded) .map-return-fab {
  bottom: calc(45vh + 12px);
}

.post-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 4px;
}

.post-sheet__actions .btn-action {
  width: 100%;
  flex: none;
  padding: 14px 16px;
  font-size: 15px;
  border-radius: 14px;
}

.btn-action {
  flex: 1;
  min-height: 48px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-action--primary { background: var(--accent); color: white; }
.btn-action--secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }

.comments-section h4 { font-size: 14px; margin-bottom: 12px; color: var(--text-muted); }

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.comment__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.comment__author { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.comment__text { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

/* Create post form */
.create-minimap-wrap {
  margin-top: 10px;
}

.create-minimap__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.create-minimap {
  height: 180px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
  z-index: 1;
}

.post-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.post-status--active {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.post-status--done {
  background: rgba(79, 140, 255, 0.15);
  color: #4f8cff;
}

.post-status--closed,
.post-status--archived {
  background: rgba(139, 146, 165, 0.2);
  color: var(--text-muted);
}

.post-status--expired {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.post-status-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 8px 0 12px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.post-status-actions::-webkit-scrollbar { display: none; }

.post-status-actions__spacer {
  flex: 1 1 8px;
  min-width: 8px;
}

.msg__ticks {
  font-size: 11px;
  letter-spacing: -1px;
  color: var(--text-muted);
  margin-left: 2px;
  user-select: none;
}
.msg__ticks--read {
  color: #4f8cff;
}

.chat-peer-bar {
  flex-shrink: 0;
  padding: 4px 12px 6px;
  border-top: none;
  background: transparent;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.chat-peer-bar[hidden] { display: none !important; }
.chat-peer-star-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: #fbbf24;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.chat-peer-star-btn:active { transform: scale(0.96); }
.chat-peer-star-btn--rated .chat-peer-star-btn__ico { color: #f59e0b; }
.chat-peer-star-btn__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-elevated);
}
.chat-peer-star-btn__dot[hidden] { display: none !important; }
.chat-peer-bar__tag,
.contact-row__tag {
  font-size: 12px;
  color: var(--accent);
}
.dm-peer-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}
.dm-peer-sheet__lead {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.dm-peer-sheet__stars {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.dm-peer-sheet__star {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.dm-peer-sheet__star--on { color: #fbbf24; }
.dm-peer-sheet__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.dm-peer-sheet__review {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  box-sizing: border-box;
}
.dm-peer-sheet__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.dm-peer-sheet__friends {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-peer-sheet__friends-title {
  font-size: 13px;
  font-weight: 600;
}
.dm-peer-sheet__friends-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.dm-peer-sheet__friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time-hours-sheet {
  margin: 8px 4px 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.time-hours-sheet--active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.time-hours-sheet__label {
  font-size: 13px;
  margin-bottom: 8px;
}
.time-hours-sheet input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  display: block;
}
.time-hours-sheet__hints {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.msg__delete,
.msg__edit {
  display: none; /* legacy — используем .msg-action */
}
.msg__actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.msg-action {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.msg-action--icon {
  width: auto;
  min-width: 28px;
  height: auto;
  padding: 4px 6px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
}
.msg-action--edit {
  color: var(--text-muted);
  border: none;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
}
.msg-action--delete {
  color: var(--text-muted);
  border: none;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
}
.msg-action:hover,
.msg-action:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.msg-action--delete:hover,
.msg-action--delete:focus-visible {
  background: color-mix(in srgb, #ef4444 16%, transparent);
  color: #ef4444;
}
.msg--self .msg-action--edit,
.post-msg--self .msg-action--edit,
.msg--self .msg-action--delete,
.post-msg--self .msg-action--delete {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.14);
  border: none;
}
.msg--self .msg-action--edit:hover,
.post-msg--self .msg-action--edit:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}
.msg--self .msg-action--delete:hover,
.post-msg--self .msg-action--delete:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.28);
}
.post-status-actions .msg-action--icon {
  flex: 0 0 32px;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: inline-grid;
  place-items: center;
  font-size: 14px;
}
.msg__edited {
  opacity: 0.75;
  font-weight: 500;
}
.compose-edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-elevated));
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.compose-edit-banner[hidden] {
  display: none !important;
}
.compose-edit-banner--reply {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated));
}

button.post-msg__avatar,
button.msg__avatar,
button.post-detail__avatar {
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.peer-card-pop {
  position: fixed;
  z-index: 11000;
  width: min(240px, calc(100vw - 24px));
  padding: 10px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  color: var(--text);
}
.peer-card-pop[hidden] { display: none !important; }
.peer-card-pop__name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.peer-card-pop__rate {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.peer-card-pop__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}
.peer-card-pop__stat {
  text-align: center;
  padding: 6px 2px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.peer-card-pop__n {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
.peer-card-pop__l {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}
.peer-card-pop__actions {
  display: flex;
  gap: 6px;
}
.peer-card-pop__actions .btn-action {
  flex: 1;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 13px;
}

.contact-row__btn--friend {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

#nav-chats-badge { display: none !important; }

.post-status-btn {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-status-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.post-status-btn--danger {
  border-color: color-mix(in srgb, #ef4444 45%, var(--border));
  color: #ef4444;
}

.post-status-btn--danger:active {
  background: color-mix(in srgb, #ef4444 12%, transparent);
}

.custom-marker--dim {
  opacity: 0.45;
  filter: grayscale(0.4);
}

/* Радиус поиска — прозрачный, карта читается */
.leaflet-overlay-pane path.search-radius-bubble {
  filter: none;
}

.radius-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 4px 8px;
}
.radius-sheet__slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin: 0;
}
.radius-sheet__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 2px;
}
.radius-sheet__map-wrap {
  position: relative;
  width: min(100%, 280px);
  max-width: 100%;
  margin-inline: auto;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  container-type: size;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
/* Гарантия квадрата, если aspect-ratio глючит */
.radius-sheet__map-wrap::before {
  content: '';
  display: block;
  padding-top: 100%;
}
.radius-minimap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.radius-minimap__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Равный диаметр от меньшей стороны → всегда круг */
  width: 84cqmin;
  height: 84cqmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.72);
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}
@supports not (width: 1cqmin) {
  .radius-minimap__ring {
    width: 84%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 84%;
  }
}
.radius-sheet__apply {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.radius-sheet__field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.radius-sheet__field-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.radius-sheet__input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 0 12px;
}
.radius-sheet__input:focus {
  outline: none;
  border-color: var(--accent);
}
.radius-sheet__btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.radius-sheet__btn:active {
  filter: brightness(0.95);
}

.create-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.create-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.create-cat--active {
  border-color: var(--cat-color);
  color: var(--cat-color);
  background: color-mix(in srgb, var(--cat-color) 12%, transparent);
}

.create-cat__icon { font-size: 16px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

.create-text-wrap {
  position: relative;
}
.create-text-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;
  padding-bottom: 40px;
}
.create-text-attach {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
}
.compose-attach-preview__audio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text);
}
.compose-attach-preview__audio .compose-attach-preview__rm {
  position: static;
  width: 22px;
  height: 22px;
}
.msg-audio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.msg-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  border: 1px solid var(--border);
  max-width: min(100%, 320px);
  width: 100%;
  box-sizing: border-box;
}
.msg-audio__play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.msg-audio__play--on {
  background: color-mix(in srgb, var(--accent) 80%, #000);
}
.msg-audio__dl {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 90%, transparent);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.msg-audio__dl:hover,
.msg-audio__dl:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.msg-audio__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg-audio__name {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-audio__seek-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg-audio__t {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
}
.msg-audio__t:last-child {
  text-align: right;
}
.msg-audio__seek,
.audio-mini__seek {
  flex: 1;
  min-width: 0;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.msg--self .msg-audio,
.post-msg--self .msg-audio {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  max-width: 100%;
}
.msg--self .msg-audio__name,
.msg--self .msg-audio__t,
.post-msg--self .msg-audio__name,
.post-msg--self .msg-audio__t {
  color: rgba(255, 255, 255, 0.88);
}
.msg--self .msg-audio__play,
.post-msg--self .msg-audio__play {
  background: #fff;
  color: var(--accent);
}
.msg--self .msg-audio__dl,
.post-msg--self .msg-audio__dl {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
}
.chat-card__media-hint {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Мини-плеер аудио — на месте радио-строки */
.audio-mini {
  position: absolute;
  left: 12px;
  right: 72px;
  bottom: calc(58px + 12px);
  z-index: 610;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 8px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.3s, bottom 0.3s ease;
}
.audio-mini--on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.audio-mini[hidden] {
  display: none !important;
}
#screen-map:has(.nearby-panel--expanded) .audio-mini {
  bottom: calc(45vh + 12px);
}
.audio-mini__play {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.audio-mini__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.audio-mini__name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-mini__seek-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.audio-mini__t {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
}
.audio-mini__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.create-media__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.create-media__add {
  width: 100%;
}
.create-media__previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.create-media__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.create-media__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.create-media__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.create-media__video-preview {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0f14;
  aspect-ratio: 16 / 9;
}
.create-media__video-preview iframe,
.create-media__video-preview video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.create-media__video-preview a {
  display: block;
  padding: 12px;
  color: var(--accent);
  font-size: 13px;
}
#post-video-url {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
}

.post-media {
  margin: 10px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-media__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.post-media__gallery--one {
  grid-template-columns: 1fr;
}
.post-media__gallery--compact {
  max-height: 140px;
}
.post-media__thumb {
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  cursor: zoom-in;
  display: block;
  min-height: 88px;
}
.post-media__thumb img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}
.post-media__gallery--compact .post-media__thumb img {
  max-height: 120px;
}
.post-media__video {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0f14;
  aspect-ratio: 16 / 9;
  position: relative;
}
.post-media__video iframe,
.post-media__video video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.post-media__video--embed iframe {
  position: absolute;
  inset: 0;
}
.post-media__video-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-card));
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  width: fit-content;
}

.form-group textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.form-group textarea:focus { border-color: var(--accent); }

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.form-input:focus { border-color: var(--accent); }

.char-count { text-align: right; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.ai-check, .ai-warning, .ai-success {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
}

.ai-check {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.ai-check[hidden],
.ai-warning[hidden],
.ai-success[hidden] {
  display: none !important;
}

.ai-check__img { width: 40px; height: 40px; object-fit: contain; display: block; }
.ai-check__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.ai-check__icon .map-fab-obj,
.ai-check__icon .ai-robot-obj {
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18));
}

.ai-warning {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
}

.ai-warning__header { font-weight: 600; color: #ef4444; margin-bottom: 8px; }

.ai-highlight {
  background: rgba(239,68,68,0.15);
  padding: 8px;
  border-radius: 6px;
  margin: 8px 0;
  font-size: 12px;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}

.ai-success {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: #34d399;
}

.location-picker { display: flex; flex-direction: column; gap: 8px; }

.location-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.location-option--active { border-color: var(--accent); }
.location-option span:first-child { font-size: 24px; }
.location-option strong { display: block; font-size: 14px; }
.location-option small { color: var(--text-muted); font-size: 12px; }

.urgency-picker { display: flex; gap: 8px; }

.urgency-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.urgency-btn--active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Chat modal */
.chat-header-info {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: none;
  color: inherit;
  padding: 0 8px;
  cursor: default;
}
.chat-header-info--action {
  cursor: pointer;
  border-radius: 10px;
}
.chat-header-info--action:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.chat-header-info h2 { font-size: 16px; margin: 0; }
.chat-header-info small { color: var(--text-muted); font-size: 12px; }

.msg__author {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.group-create-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 12px;
}
.group-create-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.group-create-field input,
.group-create-field textarea {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  resize: vertical;
}
.group-create-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.group-info-sheet {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
}
.group-info-hero {
  text-align: center;
  padding: 8px 8px 16px;
}
.group-info-hero__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.group-info-hero__name {
  margin: 0 0 4px;
  font-size: 18px;
}
.group-info-hero__meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.group-info-hero__desc {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.group-members {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.group-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
}
.group-member__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.group-member__body { min-width: 0; }
.group-member__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.group-member__role {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.group-member__kick {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  color: #ef4444;
}
.picker-item--danger .picker-item__name { color: #ef4444; }

.notif-item__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.notif-item__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.notif-item__actions .btn-action {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
}
.notif-item__status {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.group-invite-people {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 12px;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.msg--other {
  align-self: flex-start;
  background: var(--bg-card);
  border-bottom-left-radius: 4px;
}

.msg-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
  align-self: flex-start;
}
.msg-line .msg { max-width: none; }
.msg-line:not(.msg-line--peer) { max-width: 75%; align-self: flex-end; }
.msg__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}
.msg__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msg--self {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg__time {
  display: block;
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.chat-compose {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.compose-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 0;
}

.compose-attach-preview[hidden] {
  display: none !important;
}

.compose-attach-preview__item {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.compose-attach-preview__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compose-attach-preview__video {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text);
}

.compose-attach-preview__rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.compose-attach-preview__video .compose-attach-preview__rm {
  position: static;
  width: 22px;
  height: 22px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: none;
  flex-shrink: 0;
}

.chat-input-bar .compose-field {
  flex: 1;
}

.chat-send:disabled,
#btn-post-reply:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.msg--radio .msg__time {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

/* Toast — на всю ширину экрана (с боковыми отступами) */
.toast {
  position: fixed;
  bottom: 88px;
  left: 12px;
  right: 12px;
  width: auto;
  max-width: none;
  transform: translateY(20px);
  background: var(--bg-card);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--shadow);
  z-index: 20000;
  border: 1px solid var(--border);
  white-space: normal;
  word-break: break-word;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s;
  box-sizing: border-box;
}

.toast--show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Radio ===== */
.radio-mini {
  position: absolute;
  left: 12px;
  right: 72px;
  /* отступ от шторки = отступ кружков от края экрана (12px) */
  bottom: calc(58px + 12px);
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 6px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.3s, bottom 0.3s ease;
}

.radio-mini--on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.radio-mini[hidden] {
  display: none !important;
}

#screen-map:has(.nearby-panel--expanded) .radio-mini {
  bottom: calc(45vh + 12px);
}

.radio-mini__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.radio-mini__eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  width: 18px;
  flex-shrink: 0;
}

.radio-mini__eq span {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eq-bar 0.8s ease-in-out infinite;
}

.radio-mini__eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.radio-mini__eq span:nth-child(2) { height: 80%; animation-delay: 0.15s; }
.radio-mini__eq span:nth-child(3) { height: 55%; animation-delay: 0.3s; }

@keyframes eq-bar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.radio-mini__body { flex: 1; min-width: 0; }
.radio-mini__station {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.radio-mini__track {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-mini__play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-mini__live {
  font-size: 10px;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239,68,68,0.15);
  padding: 3px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* фон радио — как у остальных FAB (не переопределять) */

.radio-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 16px;
}

.radio-header__art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed, #4f8cff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(79,140,255,0.35);
  position: relative;
  overflow: hidden;
}

.radio-header__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 55%);
}

.radio-header__info { flex: 1; min-width: 0; }
.radio-header__title {
  font-size: 18px;
  font-weight: 700;
  margin: 2px 0;
}
.radio-header__now {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-power {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.radio-power--on {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}

.radio-power:active { transform: scale(0.94); }

.radio-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 2px;
}

.radio-volume input {
  flex: 1;
  accent-color: var(--accent);
}

.radio-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.radio-section-head {
  margin: 0 0 10px;
}
.radio-filter-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 3px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  border: 1px solid var(--border);
}
.radio-filter-seg__btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.radio-filter-seg__btn--on {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-elevated));
  color: var(--accent);
}
.radio-stations-empty {
  margin: 8px 2px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.radio-recent {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.radio-recent::-webkit-scrollbar { display: none; }
.radio-recent__btn {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.radio-recent__btn img,
.radio-recent__btn .radio-station__img,
.radio-recent__btn svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.radio-recent__btn--on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

.radio-stations-wrap {
  margin: 0 -4px 6px;
}

.radio-belt {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  padding: 2px 0 4px;
}

.radio-belt:active {
  cursor: grabbing;
}

.radio-belt::-webkit-scrollbar {
  display: none;
}

.radio-belt__track {
  display: flex;
  flex-direction: row;
  gap: 6px;
  width: max-content;
  padding: 0 10%;
}

.radio-belt__col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  width: min(148px, 38vw);
}

.radio-station {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex: 0 0 auto;
  max-width: none;
  padding: 6px 8px;
  padding-top: 14px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s, transform 0.2s, background 0.2s;
}

.radio-station:hover { border-color: var(--accent); }
.radio-station--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
}
.radio-station:active { transform: scale(0.98); }

.radio-station__icon { font-size: 16px; width: 28px; text-align: center; flex-shrink: 0; }
.radio-station__img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.radio-station__body { flex: 1; min-width: 0; }
.radio-station__name {
  display: block;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-station__desc {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-station__badge {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding: 1px 5px;
  border-radius: 999px;
  max-width: calc(100% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.radio-header__art--img {
  padding: 0;
  background: #111;
}
.radio-header__art--img::after {
  display: none;
}
.radio-header__art--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nr-cluster {
  background: transparent !important;
}
.nr-cluster div {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 85%, #111);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 11px rgba(0, 0, 0, 0.35);
}
.marker-cluster-small.nr-cluster div { width: 29px; height: 29px; font-size: 12px; }
.marker-cluster-medium.nr-cluster div { width: 34px; height: 34px; font-size: 13px; }
.marker-cluster-large.nr-cluster div { width: 38px; height: 38px; font-size: 14px; }

.music-recognize-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.music-recognize-btn:hover { border-color: var(--accent); }
.music-recognize-btn:active { transform: scale(0.99); }
.music-recognize-btn--busy {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
}
.music-recognize-btn__ico {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.music-recognize-btn__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.music-recognize-btn__text strong {
  font-size: 14px;
  font-weight: 600;
}
.music-recognize-btn__text small {
  font-size: 11px;
  color: var(--text-muted);
}
.music-recognize-status {
  margin: -4px 0 12px;
  font-size: 12px;
  color: var(--accent);
  line-height: 1.35;
}
.music-recognize-status--err { color: #f87171; }

.music-service-seg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.music-service-seg__btn {
  min-height: 40px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.15;
  text-align: center;
}
.music-service-seg__btn--on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-card));
  color: var(--accent);
}

.music-service-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}
.music-service-link:hover { border-color: var(--accent); }

.radio-cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.radio-list-cta {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.radio-request-cta {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.radio-list-cta:hover,
.radio-request-cta:hover { border-color: var(--accent); }

.radio-list-cta:active,
.radio-request-cta:active { transform: scale(0.98); }

.modal__content--scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.radio-list__site {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(79, 140, 255, 0.08);
}
.radio-list__site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 4px;
}
.radio-list__site-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.radio-list__site-meta b {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radio-list__site-meta small {
  font-size: 12px;
  opacity: 0.65;
}
.radio-list__site-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.radio-list__row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.radio-list__row--active .radio-list__item {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
}

.radio-list__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.radio-list__item:hover { border-color: var(--accent); }
.radio-list__item--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
}
.radio-list__item:active { transform: scale(0.99); }

.radio-list__fav {
  flex: 0 0 40px;
  width: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.radio-list__fav--on {
  color: #f59e0b;
  border-color: color-mix(in srgb, #f59e0b 45%, var(--border));
  background: color-mix(in srgb, #f59e0b 14%, var(--bg-card));
}
.radio-list__ico {
  flex: 0 0 40px;
  width: 40px;
  min-height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.radio-list__ico:disabled { opacity: 0.45; cursor: wait; }
.radio-list__ico--del {
  /* как «обновить» и «избранное»: рамка и фон карточки */
  font-size: 16px;
}

.radio-list__img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.radio-list__icon {
  font-size: 18px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.radio-list__body { flex: 1; min-width: 0; }
.radio-list__name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}
.radio-list__desc {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-list__badge {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding: 1px 5px;
  border-radius: 999px;
  pointer-events: none;
}

.radio-onair {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(79,140,255,0.15));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.radio-onair__label {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 4px;
}

.radio-onair__song { font-size: 14px; font-weight: 600; }
.radio-onair__meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Radio request message bubble */
.msg--radio {
  align-self: stretch;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(79,140,255,0.18));
  border: 1px solid color-mix(in srgb, #7c3aed 40%, transparent);
  border-radius: 16px;
  padding: 12px;
  margin: 4px 0;
}

.msg--radio .msg__radio-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #a78bfa;
  margin-bottom: 6px;
}

.msg--radio .msg__radio-song {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.msg--radio .msg__radio-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.msg--radio .msg__radio-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}

.msg--radio .msg__radio-status--live {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

.chat-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.chat-tool-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.chat-tool-btn:hover { color: var(--accent); background: rgba(255,255,255,0.06); }

.chat-tool-btn--attach svg {
  display: block;
}

.modal--compose-attach {
  height: auto;
  max-height: 42vh;
}

.compose-attach-sheet {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px 20px;
}

.compose-attach-sheet__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.compose-attach-sheet__btn:active {
  transform: scale(0.99);
}

.compose-attach-sheet__ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-elevated));
  font-size: 18px;
  flex-shrink: 0;
}

.compose-attach-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.compose-attach-sheet__body strong {
  font-size: 15px;
}

.compose-attach-sheet__body small {
  font-size: 12px;
  color: var(--text-muted);
}

.modal--compose-video {
  height: auto;
  max-height: 55vh;
}

.compose-video-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compose-video-form input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
}

.compose-video-form .btn-secondary {
  width: 100%;
}

.msg .post-media,
.post-msg__bubble .post-media {
  margin-top: 6px;
  max-width: 100%;
}

.msg .post-media__gallery,
.post-msg__bubble .post-media__gallery {
  max-width: 220px;
}

.msg .post-media__video,
.post-msg__bubble .post-media__video {
  max-width: 260px;
}

.nav-item svg { transition: transform 0.25s ease; }
.nav-item--active svg { transform: scale(1.08); }

/* Leaflet overrides */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}


/* ===== UX pack: brand bar on map ===== */
.app-shell:has(#screen-map.screen--active) > .status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  pointer-events: none;
  z-index: 650;
}
.app-shell:has(#screen-map.screen--active) > .status-bar .profile-nav-btn {
  visibility: hidden;
  pointer-events: none;
}
.app-shell:has(#screen-map.screen--active) > .status-bar .icon-btn,
.app-shell:has(#screen-map.screen--active) > .status-bar .brand-pill {
  pointer-events: auto;
}

.app-shell:has(#screen-map.screen--active) > .status-bar #btn-notifications {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
}

#btn-app-info.brand-pill,
.brand-pill {
  position: absolute !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 3px 12px 3px 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  z-index: 1;
  overflow: hidden;
}
.brand-pill--logo {
  width: auto;
  height: auto;
}
.brand-logo-img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 9px;
  flex-shrink: 0;
}
.brand-mark {
  display: none;
}
.app-title {
  display: inline;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: color 0.3s, text-shadow 0.3s, font-family 0.3s, letter-spacing 0.3s;
}
.app-shell:has(#screen-map.screen--active) > .status-bar .app-title {
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}

/* Settings back wider + centered title */
.btn-back-wide {
  min-width: 72px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 12px;
}
.btn-back-wide:hover { background: rgba(255,255,255,0.08); }
.screen-header__spacer {
  display: block;
  min-width: 72px;
  height: 40px;
  flex-shrink: 0;
}
.screen-header--back {
  position: relative;
}
.screen-header--back h1 {
  flex: 1;
  text-align: center;
  margin: 0;
}

/* Profile: назад + шестерёнка в шапке */
.profile-settings-fab {
  position: static;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  box-shadow: none;
}

.profile-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

/* Hide Leaflet zoom entirely */
.leaflet-control-zoom { display: none !important; }

/* Category wheel — иконки; края плавно в прозрачность (без видимой «капсулы») */
.cat-wheel {
  width: 48px;
  height: 168px;
  border-radius: 24px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
  overflow: hidden;
  touch-action: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 18%,
    #000 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 18%,
    #000 82%,
    transparent 100%
  );
}
.cat-wheel__fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 2;
  pointer-events: none;
}
.cat-wheel__fade--top {
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02), transparent);
  opacity: 0;
}
.cat-wheel__fade--bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.02), transparent);
  opacity: 0;
}
.cat-wheel__track {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 22px 0;
  scroll-behavior: auto;
}
.cat-wheel__track::-webkit-scrollbar { display: none; }
.cat-wheel__item {
  width: 42px;
  height: 42px;
  margin: 4px auto;
  border: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 28%, var(--bg-card));
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.25s, background 0.2s;
  flex-shrink: 0;
}
.cat-wheel__item .cat-ico__svg,
.cat-wheel__item .cat-ico__obj {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}
.cat-wheel__item--on {
  opacity: 1;
  transform: scale(1);
  color: inherit;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 48%, #fff);
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--cat-color, var(--accent)) 36%, transparent),
    0 0 0 2px color-mix(in srgb, var(--cat-color, var(--accent)) 42%, transparent);
}
.cat-wheel__item:active { transform: scale(0.92); }

/* Горизонтальное колесо разделов в шапке Чатов (между «Чаты» и +) */
.screen-header--chats {
  gap: 8px;
  position: relative;
  z-index: 2;
}
.screen-header--chats h1 {
  flex-shrink: 0;
  position: relative;
  z-index: 0;
}
.screen-header--chats .icon-btn {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.chat-cat-wheel-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
  padding: 0 2px;
  position: relative;
  z-index: 1;
  gap: 2px;
}
.cat-wheel--h {
  width: 100%;
  max-width: 168px;
  height: 48px;
  border-radius: 24px;
  overflow: hidden;
  touch-action: pan-x;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 14%,
    #000 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 14%,
    #000 86%,
    transparent 100%
  );
}
.cat-wheel--h .cat-wheel__fade {
  top: 0;
  bottom: 0;
  width: 20px;
  height: auto;
  left: auto;
  right: auto;
  z-index: 2;
  pointer-events: none !important;
  opacity: 0;
}
.cat-wheel--h .cat-wheel__fade--left {
  left: 0;
}
.cat-wheel__fade--right {
  right: 0;
}
.cat-wheel__track--h {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 14px;
  box-sizing: border-box;
}
.cat-wheel__track--h .cat-wheel__item {
  width: 42px;
  height: 42px;
  margin: 0 3px;
  font-size: 18px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  transform: scale(0.9);
}
.cat-wheel__track--h .cat-wheel__item--on {
  transform: scale(1);
}
.chat-cat-wheel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-height: 13px;
  pointer-events: none;
}

/* Map FABs / radio-mini: 12px от шторки, как кружки от края */
.map-fab-group { bottom: calc(58px + 12px); }
.radio-mini {
  bottom: calc(58px + 12px);
  left: 12px;
  right: 72px;
}

/* Radio FAB morph + miniplayer in flyout */
.radio-fab-flyout {
  width: auto;
  min-width: 48px;
  gap: 10px;
  padding: 10px;
}
.radio-fab-volume-icon {
  font-size: 18px;
  line-height: 1;
}
.radio-fab-miniplayer {
  display: none !important;
  align-items: center;
  gap: 8px;
  width: 168px;
  padding: 6px 8px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s cubic-bezier(0.32, 0.72, 0, 1), transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.radio-fab-wrap--primed .radio-fab-miniplayer,
.radio-fab-wrap--open .radio-fab-miniplayer {
  display: none !important;
}
.radio-fab-wrap:hover .radio-fab-miniplayer,
.radio-fab-wrap:focus-within .radio-fab-miniplayer,
.radio-fab-wrap--open .radio-fab-miniplayer,
.radio-fab-wrap--primed.radio-fab-wrap--open .radio-fab-miniplayer {
  opacity: 1;
  transform: translateY(0);
}
.radio-fab-miniplayer__icon {
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.radio-fab-wrap--morphing .radio-fab-miniplayer__icon {
  animation: radio-crawl 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes radio-crawl {
  0% { transform: translateY(28px) scale(0.6); opacity: 0.2; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.radio-fab-miniplayer__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.radio-fab-miniplayer__text span {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-fab-miniplayer__text small {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-fab-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s;
  font-size: 16px;
  line-height: 0;
}
.radio-fab-wrap--morphing .radio-fab-glyph {
  animation: radio-glyph-out 0.35s ease forwards;
}
@keyframes radio-glyph-out {
  to { transform: translateY(-18px) scale(0.5); opacity: 0; }
}

/* Heat markers */
.custom-marker--heat-mild {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35), 0 0 14px rgba(251, 191, 36, 0.45);
}
.custom-marker--heat-warm {
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.4), 0 0 18px rgba(249, 115, 22, 0.55);
  animation: heat-pulse 1.8s ease-in-out infinite;
}
.custom-marker--heat-hot {
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.45), 0 0 22px rgba(239, 68, 68, 0.7);
  animation: heat-pulse 1.1s ease-in-out infinite;
}
/* Важно: сохраняем rotate(-45deg), иначе «капелька» маркера крутится/ломается */
@keyframes heat-pulse {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.08); }
}

/* Map point sheet: карта кликабельна/двигается, шторка снизу поверх */
.modal-overlay--map-point.modal-overlay--active {
  background: transparent;
  pointer-events: none;
  align-items: flex-end;
}
.modal-overlay--map-point .modal--map-point {
  pointer-events: auto;
  width: 100%;
  max-width: var(--phone-w);
}
.map-point-sheet {
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-point-sheet__meta {
  padding: 2px 4px 10px;
}
.map-point-sheet__title {
  font-size: 17px;
  font-weight: 700;
}
.map-point-sheet__coords {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.map-point-sheet__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.map-point-sheet__btn:active {
  transform: scale(0.99);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
}
.map-point-sheet__ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.map-point-sheet__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.map-point-sheet__label strong {
  font-size: 15px;
  font-weight: 600;
}
.map-point-sheet__label small {
  font-size: 12px;
  color: var(--text-muted);
}

.map-point-crosshair {
  position: absolute;
  left: 50%;
  /* Совпадает с getMapPointPickLatLng: центр − 18% высоты */
  top: calc(50% - 18%);
  transform: translate(-50%, -100%);
  z-index: 680;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.map-point-crosshair[hidden] {
  display: none !important;
}
.map-point-crosshair .map-point-pin {
  width: 26px;
  height: 26px;
}

.map-point-pin-wrap {
  background: none !important;
  border: none !important;
}
.map-point-pin {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #EF4444;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-point-pin__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  transform: rotate(45deg);
}

.route-apps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.route-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.route-app-btn:hover { border-color: var(--accent); }
.route-app-btn span { font-size: 22px; }
.route-app-btn__logo {
  display: inline-flex;
  line-height: 0;
}
.route-app-btn__logo .brand-logo {
  border-radius: 6px;
}
.route-meta {
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.route-meta__dist {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.route-meta__label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.route-delete-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(239,68,68,0.45);
  border-radius: 12px;
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
}

.route-end-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.route-end-marker--a { background: #10b981; }
.route-end-marker--b { background: #ef4444; }
.route-mode-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.route-mode-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.route-mode-btn--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-card));
}

.post-report-btn {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, #ef4444 40%, var(--border));
  background: transparent;
  color: #fca5a5;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}
.post-report-btn:hover {
  background: color-mix(in srgb, #ef4444 10%, transparent);
}

/* ===== Photo lightbox ===== */
html.lightbox-open,
html.lightbox-open body {
  overflow: hidden;
}
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.photo-lightbox[hidden] { display: none !important; }
.photo-lightbox__close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.photo-lightbox__viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}
.photo-lightbox__viewport--drag .photo-lightbox__track {
  transition: none;
}
.photo-lightbox__track {
  display: flex;
  height: 100%;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.photo-lightbox__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 52px 12px 40px;
  box-sizing: border-box;
  overflow: hidden;
}
.photo-lightbox__img,
.photo-lightbox__slide img {
  max-width: 100%;
  max-height: calc(100dvh - 100px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  will-change: transform;
}
.photo-lightbox__viewport--drag .photo-lightbox__img,
.photo-lightbox__img--zoomed {
  transition: none;
}
.photo-lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* Android: шторки на всю ширину экрана */
html.android-native .modal,
html.android-native .modal--sheet,
html.android-native .modal--full,
html.android-native .modal--post,
html.android-native .modal--create,
html.android-native .modal--chat,
html.android-native .modal-overlay--map-point .modal--map-point {
  width: 100% !important;
  max-width: 100% !important;
}

/* Контраст текста во всех световых схемах */
[data-theme="day"] body,
[data-theme="day"] .app-shell,
[data-theme="day"] .modal,
[data-theme="day"] .screen {
  color: var(--text);
}
[data-theme="day"] .settings-hint,
[data-theme="day"] .form-group label,
[data-theme="day"] .profile-public-hint,
[data-theme="day"] .char-count,
[data-theme="day"] .auth-card__privacy {
  color: var(--text-muted);
}
[data-theme="day"] .form-input,
[data-theme="day"] .form-group textarea,
[data-theme="day"] .compose-field input,
[data-theme="day"] #post-reply-input,
[data-theme="day"] #chat-input {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="day"] .form-input::placeholder,
[data-theme="day"] .compose-field input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 85%, transparent);
}
[data-theme="night"] .form-input,
[data-theme="night"] .form-group textarea {
  color: var(--text);
  background: var(--bg-card);
}
html.android-native[data-theme="day"],
html.android-native[data-theme="day"] body {
  background: var(--bg);
  color: var(--text);
}

/* Android: шторки на всю ширину экрана */
html.android-native .modal,
html.android-native .modal--sheet,
html.android-native .modal--full,
html.android-native .modal--post,
html.android-native .modal--create,
html.android-native .modal--chat,
html.android-native .modal-overlay--map-point .modal--map-point {
  width: 100% !important;
  max-width: 100% !important;
}

/* Контраст текста во всех световых схемах */
[data-theme="day"] body,
[data-theme="day"] .app-shell,
[data-theme="day"] .modal,
[data-theme="day"] .screen {
  color: var(--text);
}
[data-theme="day"] .settings-hint,
[data-theme="day"] .form-group label,
[data-theme="day"] .profile-public-hint,
[data-theme="day"] .char-count,
[data-theme="day"] .auth-card__privacy {
  color: var(--text-muted);
}
[data-theme="day"] .form-input,
[data-theme="day"] .form-group textarea,
[data-theme="day"] .compose-field input,
[data-theme="day"] #post-reply-input,
[data-theme="day"] #chat-input {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="day"] .form-input::placeholder,
[data-theme="day"] .compose-field input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 85%, transparent);
}
[data-theme="night"] .form-input,
[data-theme="night"] .form-group textarea {
  color: var(--text);
  background: var(--bg-card);
}
html.android-native[data-theme="day"],
html.android-native[data-theme="day"] body {
  background: var(--bg);
  color: var(--text);
}

/* Пока едет клавиатура (Android ставит html.kb-anim): дешевле layout/paint на каждый кадр */
html.kb-anim .screen:not(.screen--active) {
  content-visibility: hidden;
}
html.kb-anim *,
html.kb-anim *::before,
html.kb-anim *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Клавиатура: окно и шторки занимают видимую область над IME */
html {
  --keyboard-inset: 0px;
  --vv-height: 100%;
  --vv-offset: 0px;
}
html.android-native.keyboard-open .app-shell,
html.keyboard-open .app-shell {
  height: var(--vv-height, 100%);
  max-height: var(--vv-height, 100%);
}
html.android-native.keyboard-open .modal-overlay,
html.keyboard-open .modal-overlay {
  top: var(--vv-offset, 0px);
  bottom: auto;
  height: var(--vv-height, 100%);
  max-height: var(--vv-height, 100%);
}

/* Шторка «Выбранные разделы в радиусе» */
.notif-area-sheet .radius-sheet__slider { padding: 0 4px 6px; }
.area-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; }
.area-cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  border: 1.5px solid var(--border, rgba(0,0,0,.12));
  background: var(--surface, #fff); color: inherit;
  font: inherit; font-size: 14px; cursor: pointer;
}
.area-cat__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat-color, #888); opacity: .45; }
.area-cat--on { border-color: var(--cat-color, #4f8cff); background: color-mix(in srgb, var(--cat-color, #4f8cff) 16%, transparent); font-weight: 600; }
.area-cat--on .area-cat__dot { opacity: 1; }

/* Уведомления: выбранные разделы в радиусе */
.sheet-area-btn { width: 100%; margin-top: 4px; }
.sheet-area-btn:disabled { opacity: 0.5; }
.notif-area-sheet .radius-sheet__slider { margin: 4px 0 8px; }
.area-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }
.area-cat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--border, rgba(0,0,0,0.12));
  background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer;
}
.area-cat__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat-color, #888); opacity: 0.45; }
.area-cat--on { border-color: var(--cat-color, #888); background: color-mix(in srgb, var(--cat-color, #888) 16%, transparent); font-weight: 600; }
.area-cat--on .area-cat__dot { opacity: 1; }

/* ЛС: сообщение с геопозицией и мини-карта */
.compose-attach-sheet__btn[hidden] { display: none !important; }
.msg--loc { padding: 6px; }
.msg-loc {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 12px;
  background: rgba(127,127,127,0.14); color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.msg-loc__ico { font-size: 26px; line-height: 1; }
.msg-loc__body { display: flex; flex-direction: column; gap: 2px; }
.msg-loc__body small { opacity: 0.7; font-size: 12px; }
.loc-view-map { width: 100%; height: min(52vh, 360px); border-radius: 14px; overflow: hidden; }
.loc-view-dist { margin: 8px 2px 0; font-size: 14px; opacity: 0.75; }
.radius-minimap.map--night-filter .leaflet-tile-pane,
#create-minimap.map--night-filter .leaflet-tile-pane,
.loc-view-map.map--night-filter .leaflet-tile-pane {
  filter: invert(0.92) hue-rotate(180deg) brightness(0.95) contrast(0.92);
}
.modal--compose-attach { max-height: 54vh; }

/* Быстрая работа: вид / длительность / оплата — как поле текста, одна строка, растёт при переносе */
.form-group textarea.work-line {
  display: block;
  box-sizing: border-box;
  min-height: 44px;
  padding: 11px 12px;
  line-height: 1.35;
  resize: none;
  overflow: hidden;
}

/* Шторки со скроллом выше: свободное место над шторкой вдвое меньше (22vh → 11vh и т.п.) */
.modal--sheet { max-height: 89vh; }
.modal--post { max-height: 89vh; height: min(89vh, 760px); }
.modal--post.modal--post-compact { max-height: 86vh; }
.modal--post.modal--post-compact .post-sheet__feed { max-height: min(72vh, 640px); }
.modal--create { max-height: min(86vh, 700px); }
.modal--radio { max-height: 91vh; }
.modal--radio-list { height: 87vh; max-height: 87vh; }
.modal--avatar { max-height: 89vh; }
.modal--notifications .modal__content { max-height: 74vh; }
.nearby-panel--expanded { max-height: 72vh; }
#screen-map:has(.nearby-panel--expanded) .map-fab-group {
  bottom: calc(72vh + 12px);
}
/* Колесо разделов не лежит на поднятой шторке «Рядом с вами».
   Между шестерёнкой и шторкой места под иконки нет — прячем колесо, клики идут в список. */
#screen-map:has(.nearby-panel--expanded) .map-fab-top:not(.map-fab-top--left) {
  pointer-events: none;
}
#screen-map:has(.nearby-panel--expanded) .map-fab-top:not(.map-fab-top--left) > .fab {
  pointer-events: auto;
}
#screen-map:has(.nearby-panel--expanded) #cat-wheel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#screen-map:has(.nearby-panel--expanded) .map-return-fab,
#screen-map:has(.nearby-panel--expanded) .audio-mini,
#screen-map:has(.nearby-panel--expanded) .radio-mini {
  bottom: calc(72vh + 12px);
}


/* ===== Модерация: подсветка фраз и очередь модератора ===== */
.ai-mark {
  background: rgba(239, 68, 68, 0.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
  box-shadow: inset 0 -2px 0 rgba(239, 68, 68, 0.7);
}
.ai-highlight { white-space: pre-wrap; word-break: break-word; }
.mod-queue-list { display: flex; flex-direction: column; gap: 12px; }
.mod-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mod-item__meta { font-size: 12px; color: var(--text-muted); }
.mod-item__text { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.mod-item__img { max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; align-self: flex-start; }
.mod-item__reason { font-size: 13px; color: #ef4444; }
.mod-item__actions { display: flex; gap: 8px; }
.mod-item__actions .btn-action { flex: 1; }

/* Квадратное поле точки: группа, скрепка, карта в сообщении */
.sq-point {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #d5d5d5;
}
.sq-point__map { position: absolute; inset: 0; }
.sq-point--locked .leaflet-tile-pane { filter: grayscale(1) contrast(0.95); }
.sq-point__me,
.sq-point__save {
  position: absolute;
  z-index: 500;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  line-height: 44px;
  text-align: center;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}
.sq-point__me { left: 10px; top: 10px; }
.sq-point__save { right: 10px; bottom: 10px; }

#modal-chat > .modal { position: relative; }
.chat-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--chat-layer-top, 56px);
  bottom: var(--chat-layer-bottom, 64px);
  z-index: 6;
  background: var(--bg);
  display: flex;
}
.chat-layer[hidden] { display: none !important; }
.chat-layer__map { flex: 1; min-height: 0; }
.chat-layer__pop .msg { cursor: pointer; width: 100%; text-align: left; border: none; background: transparent; padding: 0; }
.chat-layer__pop {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 600;
}
.chat-layer__jump {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.chat-layer__pop[hidden] { display: none !important; }
.cat-wheel--layer {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 600;
  background: color-mix(in srgb, var(--bg-card, #fff) 88%, transparent);
  border-radius: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.cat-wheel--layer[hidden] { display: none !important; }
.chat-layer-cat {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat-color, #ef4444) 28%, var(--bg-card, #fff));
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.78;
  --cat-color: #ef4444;
}
.chat-layer-cat--on {
  opacity: 1;
  background: color-mix(in srgb, var(--cat-color, #ef4444) 48%, #fff);
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--cat-color, #ef4444) 36%, transparent),
    0 0 0 2px color-mix(in srgb, var(--cat-color, #ef4444) 55%, #fff);
}
.chat-layer-cat__pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.mappoint-kind { margin: 0 0 12px; }
.mappoint-kind[hidden] { display: none !important; }
.mappoint-kind__row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}
.mappoint-kind__row::-webkit-scrollbar { display: none; }
.sq-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.sq-pin--on {
  width: 22px;
  height: 22px;
  margin: -3px;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.55);
}
@keyframes nr-own-shimmer {
  0% { border-color: #67e8f9; box-shadow: 0 0 0 3px #67e8f9, 0 0 14px #22d3ee, 0 3px 11px rgba(0, 0, 0, 0.4); }
  33% { border-color: #ddd6fe; box-shadow: 0 0 0 3px #c4b5fd, 0 0 14px #a78bfa, 0 3px 11px rgba(0, 0, 0, 0.4); }
  66% { border-color: #fde68a; box-shadow: 0 0 0 3px #fbbf24, 0 0 14px #f59e0b, 0 3px 11px rgba(0, 0, 0, 0.4); }
  100% { border-color: #67e8f9; box-shadow: 0 0 0 3px #67e8f9, 0 0 14px #22d3ee, 0 3px 11px rgba(0, 0, 0, 0.4); }
}
.custom-marker--mine {
  border-width: 4px;
  animation: nr-own-shimmer 1.5s linear infinite;
}
.sq-pin--mine {
  border-width: 4px;
  animation: nr-own-shimmer 1.5s linear infinite;
}
.sq-point .leaflet-control-container,
.chat-layer .leaflet-control-rotate,
.msg-inline-map .leaflet-control-container {
  display: none !important;
}
.msg--flash .msg__bubble,
.post-msg--flash {
  outline: 2px solid var(--accent);
}
.msg-point { margin-top: 6px; }
.msg-point__coords {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.75;
}
.msg-inline-map {
  width: min(100%, 220px);
  min-width: 200px;
  aspect-ratio: 1;
  min-height: 200px;
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.msg-inline-map[hidden] { display: none !important; }

/* ---------- «Пожаловаться» ---------- */
.modal--report .modal__content { padding-bottom: 16px; }
.report-hint { margin: 0 0 8px; }
.report-counter { display: block; text-align: right; opacity: .6; font-size: 12px; margin-top: 4px; }
.report-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.report-send {
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: #ef4444;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.report-send:disabled { opacity: .6; cursor: default; }
.report-done { text-align: center; padding: 12px 4px 8px; }
.report-done__ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, .15);
  color: #22c55e;
  font-size: 28px;
}
.report-done__title { font-weight: 700; font-size: 17px; margin: 0 0 6px; }
/* ===== Согласия (018) и ссылки на радиостанции ===== */
.auth-consents { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: rgba(127, 127, 127, 0.08); }
.consent-check { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 14px; line-height: 1.35; cursor: pointer; }
.consent-check input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: #4f8cff; }
.consent-check a, .consent-hint a { color: #4f8cff; }
.consent-hint { font-size: 12px; line-height: 1.35; opacity: 0.75; margin: -2px 0 6px 30px; }
.consent-dist { margin-top: 6px; }
.consent-dist summary { cursor: pointer; font-size: 14px; padding: 6px 0; }
.consent-actions { margin-top: 14px; }
.consent-settings-hint { padding: 6px 14px 10px; }
.radio-links-list { display: flex; flex-direction: column; gap: 6px; }
.radio-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; background: rgba(127, 127, 127, 0.08); }
.radio-link img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: #fff; }
.radio-link__body { display: flex; flex-direction: column; min-width: 0; }
.radio-link__body small { opacity: 0.65; }
html.radio-streams-off #radio-fab-wrap,
html.radio-streams-off #radio-mini,
html.radio-streams-off #btn-radio-request,
html.radio-streams-off #settings-radio-row { display: none !important; }
/* «Радиостанции» (мои станции по ссылке) всегда в Настройках — и при выкл. плеере, и при вкл. */

/* 09 v2: «Что видят другие» — позиции, запреты, иные условия */
.dist-settings__lead { margin: 4px 0 8px; }
.dist-sub { display: flex; flex-direction: column; gap: 6px; padding: 2px 14px 10px 52px; }
.dist-sub.is-off { opacity: .45; }
.dist-restrict { display: flex; flex-direction: column; gap: 8px; padding: 6px 14px 10px; }
.dist-other { width: 100%; box-sizing: border-box; min-height: 56px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border, #d6d9e0); background: var(--surface, #fff); color: inherit; font: inherit; resize: vertical; }
.dist-conditions-link { font-size: 13px; }

/* ===== Личные радиостанции (по ссылке на сайт) ===== */
.radio-personal { margin-bottom: 16px; padding: 12px; border-radius: 14px; background: rgba(79, 140, 255, 0.08); }
.radio-personal__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.radio-personal__head small, .radio-personal__site-head small, .radio-personal__name small { opacity: 0.65; font-size: 12px; }
.radio-personal__add { display: flex; gap: 8px; }
.radio-personal__add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(127, 127, 127, 0.35); background: transparent; color: inherit; font: inherit; }
.radio-personal__notice { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255, 196, 0, 0.14); font-size: 14px; }
.radio-personal__notice-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.radio-personal__gate { margin: 8px 0 12px; padding: 12px; border-radius: 12px; background: rgba(127, 127, 127, 0.12); }
.radio-personal__gate p { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.radio-personal__gate .btn { min-height: 48px; width: 100%; }
.radio-personal__status { min-height: 18px; margin: 8px 0 4px; font-size: 13px; opacity: 0.8; }
.radio-personal__site { margin-top: 10px; }
.radio-personal__site-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.radio-personal__site-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.radio-personal__site-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-personal__site-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.radio-personal__ico {
  flex: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  border: 1px solid rgba(127, 127, 127, 0.28);
  background: rgba(127, 127, 127, 0.12);
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.radio-personal__ico:disabled { opacity: 0.45; cursor: wait; }
.radio-personal__ico--del { background: transparent; border-color: transparent; font-size: 15px; opacity: 0.75; }
.radio-personal__list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.radio-personal__st { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(127, 127, 127, 0.15); }
.radio-personal__st img, .radio-personal__nologo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: rgba(127, 127, 127, 0.15); }
.radio-personal__name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; text-overflow: ellipsis; }
.radio-personal__play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(127, 127, 127, 0.18); color: inherit; font-size: 14px; cursor: pointer; }
.radio-personal__st.is-playing .radio-personal__play { background: #4f8cff; color: #fff; }
.radio-personal__st .radio-personal__ico--del { width: 34px; height: 34px; min-width: 34px; border-radius: 50%; }
.radio-links-title { margin: 4px 0 8px; font-size: 15px; }
.route-attrib { margin: 2px 0 10px; font-size: 11px; opacity: 0.6; }

/* Своя карта недоступна (внешние подложки выключены) */
.map-unavailable { position: absolute; left: 16px; right: 16px; top: 40%; z-index: 450; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: rgba(20, 24, 33, 0.86); color: #fff; text-align: center; font-size: 13px; pointer-events: none; }
.map-unavailable b { font-size: 15px; }
.radio-personal__complaint { margin: 4px 0 8px; font-size: 12px; opacity: .8; line-height: 1.35; }
.radio-personal__complaint a { text-decoration: underline; }

/* ===== ТТ-10…14: подписка, поддержка, лимит постов, доход и чеки ===== */
.bill-content { display: flex; flex-direction: column; gap: 10px; padding-bottom: 18px; }
.bill-price { display: flex; align-items: baseline; gap: 8px; }
.bill-price__sum { font-size: 28px; font-weight: 700; }
.bill-price__term { color: var(--text-muted); }
.bill-features { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.bill-lead { margin: 0; }
.bill-note { margin: 0; font-size: 13px; color: var(--text-muted); }
.bill-note--quote { font-style: italic; }
.bill-note a, .bill-content a { color: var(--accent); }
.bill-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.bill-check input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }
.bill-btn { padding: 12px 16px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.bill-btn:disabled { opacity: .6; cursor: default; }
.bill-btn--ghost { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.bill-btn--danger { background: #ef4444; }
.bill-btn--sm { padding: 8px 12px; font-size: 13px; }
.bill-state { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.bill-refund { font-size: 14px; }
.bill-amount { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.bill-amount input { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font: inherit; font-size: 16px; }
.bill-h { margin: 8px 0 2px; font-size: 14px; }
.bill-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.bill-link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 0; }
.bill-pick { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font: inherit; cursor: pointer; }
.bill-pick small { color: var(--text-muted); flex: 0 0 auto; }
.radius-sheet__tier { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); text-align: center; }
.admin-billing { display: flex; flex-direction: column; gap: 8px; }
.bill-income { padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); display: flex; flex-direction: column; gap: 6px; }
.bill-income--warn { border-color: #f59e0b; }
.bill-income__sum { font-size: 24px; font-weight: 700; }
.bill-income__label { font-size: 12px; color: var(--text-muted); }
.bill-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.bill-bar span { display: block; height: 100%; background: var(--accent); }
.bill-income--warn .bill-bar span { background: #f59e0b; }
.bill-alert { font-size: 13px; font-weight: 600; color: #f59e0b; }
.bill-task { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); display: flex; flex-direction: column; gap: 6px; }
.bill-task--overdue { border-color: #ef4444; background: color-mix(in srgb, #ef4444 10%, var(--bg-card)); }
.bill-task__title { font-weight: 600; font-size: 14px; }
.bill-task__meta { font-size: 12px; color: var(--text-muted); }
.bill-field { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; }
.bill-field__label { color: var(--text-muted); }
.bill-field__value { font-weight: 600; word-break: break-all; text-align: right; }
.bill-copy { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.bill-task__done { display: flex; gap: 8px; align-items: center; }
.bill-task__done input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; }

/* ТТ-9: удаление аккаунта; 01 v9 п. 5.6: баннер о предстоящем списании */
.btn-text--danger { color: #e5484d; margin-top: 10px; padding: 6px 0; font-size: 14px; }
.bill-btn--ghost { background: transparent; color: inherit; border: 1px solid rgba(127,127,127,.35); margin-top: 8px; }
.bill-banner { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 9000;
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px;
  background: #fff4d6; color: #4a3500; box-shadow: 0 4px 16px rgba(0,0,0,.18); font-size: 14px; line-height: 1.35; cursor: pointer; }
.bill-banner[hidden] { display: none; }
.bill-banner__text { flex: 1; }
.bill-banner__x { background: none; border: 0; font-size: 20px; line-height: 1; color: inherit; padding: 0 4px; cursor: pointer; }
.bill-state--warn { background: #fff4d6; color: #4a3500; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }

/* ===================================================================
 * Дизайн, этап 1 (25.10.2026): п. 1, 6, 7 и код п. 2 — «План изменений дизайна.md»
 * =================================================================== */

/* --- п. 7.1: зона нажатия чипов 48 px при видимой высоте 36 --- */
.chat-chip::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -6px;
  bottom: -6px;
}

/* При раскрытой шторке «Рядом» справа остаётся только «Новый пост» */
#screen-map:has(.nearby-panel--expanded) .map-fab-group > :not(#btn-create-post) {
  display: none !important;
}

/* --- п. 7.8: тост над шторкой --- */
.toast { z-index: 20050; }
body:has(.modal-overlay--active) .toast,
body:has(.nearby-panel--expanded) .toast {
  bottom: auto;
  top: calc(var(--safe-top) + 12px);
  transform: translateY(-20px);
}
body:has(.modal-overlay--active) .toast.toast--show,
body:has(.nearby-panel--expanded) .toast.toast--show {
  transform: translateY(0);
}

/* --- п. 6.3: пустое состояние рейтинга --- */
.rating-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.rating-empty__ico {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #EEF2F7;
  color: #475569;
}
.rating-empty__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rating-empty__title { font-size: 16px; line-height: 22px; font-weight: 700; color: var(--text); }
.rating-empty__text { font-size: 14px; line-height: 20px; color: #475569; }
:root:not([data-theme="day"]) .rating-empty__ico { background: #222633; color: #A3AAB9; }
:root:not([data-theme="day"]) .rating-empty__text { color: #A3AAB9; }
.profile-rating-card--empty .rating-main,
.profile-rating-card--empty .rating-chips { display: none; }

/* --- гость: логотип «На районе» --- */
.profile-avatar--guest {
  background: #fff !important;
  border: 1px solid #E2E8F0 !important;
  cursor: default;
}
.profile-avatar--guest .profile-avatar__img { object-fit: cover; }
.profile-nav-btn__avatar--logo,
#btn-profile-nav-map .profile-nav-btn__avatar--logo { background: #fff; }

/* --- п. 6.5: недоступная оплата --- */
.bill-btn:disabled,
.bill-btn[aria-disabled="true"] {
  background: #E2E8F0;
  color: #64748B;
  opacity: 1;
  cursor: not-allowed;
}

/* --- п. 7.4 (вход): «или» и вторичная кнопка VK ID --- */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: #64748B;
  font-size: 13px;
  line-height: 18px;
}
.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E2E8F0;
}
.auth-vk-secondary {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: #0F172A;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.auth-vk-secondary:disabled { opacity: .6; cursor: default; }
:root:not([data-theme="day"]) .auth-vk-secondary {
  background: #1A1D27;
  border-color: #2E3445;
  color: #E8EAEF;
}

/* «О приложении»: строка версии — кнопка (7 нажатий = режим разработчика) */
.app-info-version {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

/* п. 1: строка «Исходный текст: ….docx» в юр. документах — только режим разработчика */
html:not(.nr-dev) .legal-src { display: none; }

/* Экран «Лицензии» (в листе документов) */
.lic-lead { font-size: 14px; line-height: 1.45; color: var(--text-muted, #64748B); margin: 0 0 12px; }
.lic-list { display: flex; flex-direction: column; gap: 8px; }
.lic-item { border: 1px solid var(--border, rgba(100,116,139,.25)); border-radius: 12px; background: var(--bg-card, transparent); }
.lic-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer; list-style: none; }
.lic-item > summary::-webkit-details-marker { display: none; }
.lic-item__name { font-size: 15px; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.lic-item__tag { flex: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(37,99,235,.1); color: #2563EB; max-width: 45%; text-align: right; }
.lic-item__meta { margin: 0; padding: 0 14px 8px; font-size: 13px; line-height: 1.4; color: var(--text-muted, #64748B); }
.lic-item__url { overflow-wrap: anywhere; }
.lic-text { margin: 0 14px 14px; padding: 10px 12px; max-height: 50vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; background: rgba(100,116,139,.08); border-radius: 8px; }
.lic-own { font-size: 13px; color: var(--text-muted, #64748B); margin: 14px 0 4px; }


/* ===== c39: правки дизайнера, приёмка этапа 1 ===== */
/* п.1: при раскрытой шторке «+» остаётся видимым (прочие кнопки скрыты правилом ниже по файлу) */
#screen-map:has(.nearby-panel--expanded) .map-fab-group { opacity: 1; pointer-events: auto; }
#screen-map:has(.nearby-panel--expanded) #btn-create-post { width: 48px; height: 48px; min-width: 48px; }
/* п.6: «‹ Назад» в чате, «Запретить ЛС» — в меню */
#modal-chat .chat-back-btn { width: 48px; height: 48px; min-width: 48px; order: -1; }
#btn-chat-dm-block { display: none !important; }
#modal-chat .modal-header { position: relative; }
.chat-info-menu { position: absolute; top: calc(100% + 4px); left: 56px; z-index: 50; min-width: 200px; background: var(--surface, #fff); color: inherit; border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.22); padding: 6px; display: flex; flex-direction: column; }
.chat-info-menu__title { padding: 10px 12px; font-weight: 600; opacity: .75; }
.chat-info-menu__item { min-height: 48px; text-align: left; padding: 0 12px; border: 0; background: none; font: inherit; border-radius: 10px; cursor: pointer; color: inherit; }
.chat-info-menu__item--danger { color: #D93C3C; }
.chat-info-menu__item:hover, .chat-info-menu__item:focus-visible { background: rgba(127,127,127,.12); }
/* п.7: зона касания 48 px (бренд #btn-app-info — absolute по центру, без position:relative) */
#btn-profile-nav, #btn-profile-settings, #btn-chat-sort, #btn-chat-filters, .cat-wheel__item,
#btn-import-contacts, #btn-notif-mark-read, #btn-notif-open-settings, .app-download__link, #nearby-hint { position: relative; }
#btn-profile-nav::after, #btn-profile-settings::after, #btn-app-info::after, #btn-chat-sort::after, #btn-chat-filters::after, .cat-wheel__item::after,
#btn-import-contacts::after, #btn-notif-mark-read::after, #btn-notif-open-settings::after, .app-download__link::after, #nearby-hint::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 48px); height: max(100%, 48px); transform: translate(-50%, -50%);
}
#btn-back-profile, #btn-back-settings { min-height: 48px; min-width: 48px; }
.nearby-card__map-btn { min-width: 44px; min-height: 44px; }
#btn-import-contacts, #btn-notif-mark-read, #btn-notif-open-settings { min-height: 44px; padding-left: 12px; padding-right: 12px; }
/* «3 км ▾» — чип */
.nearby-panel__hint { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; min-height: 28px; border-radius: 999px; border: 1px solid rgba(127,127,127,.35); background: rgba(127,127,127,.10); font-weight: 600; cursor: pointer; }
.nearby-panel--peek .nearby-panel__hint::after { display: none; }
/* ручки шторок 24–32 px, вся шапка шторки нажимается */
.nearby-panel__handle, .chats-top__handle, .modal__handle { width: 32px !important; min-width: 32px; height: 5px; }
.nearby-panel__handle-wrap, .chats-top__handle-wrap { min-height: 24px; width: 100%; }
.nearby-panel__header { cursor: pointer; }
/* чекбоксы: подпись на всю строку */
label.consent-check, label.bill-check, label:has(> #sub-autorenew), label:has(> #sub-autorenew-on) { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; cursor: pointer; box-sizing: border-box; }
/* поля поиска и телефона 44–48 px */
input[type="search"], #auth-phone { min-height: 44px; box-sizing: border-box; }
/* подсказка «вернуть север» */
#btn-compass { position: relative; overflow: visible; }
.compass-north-hint { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; background: rgba(20,24,32,.82); color: #fff; pointer-events: none; }
.compass-north-hint[hidden] { display: none; }
