/* ===== MY PAGE (FULLSCREEN PROFILE) ===== */

/* Экран профиля */

.my-page-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--my-page-screen-bg);
  color: var(--text-main);
  color-scheme: var(--my-page-color-scheme, dark);
  font-family: var(--font-mypage);
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}

.my-page-ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.88;
}

.my-page-screen > .my-page-shell {
  z-index: 1;
}

/* Centered column (VK / OK / classic FB width), not edge-to-edge */
.my-page-shell {
  font-family: var(--font-mypage);
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --my-page-max-w: 1200px;
  width: min(var(--my-page-max-w), 100%);
  max-width: var(--my-page-max-w);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  flex: 0 1 auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
  position: relative;
  isolation: isolate;
  background: var(--my-page-shell-bg, rgba(5, 9, 7, 0.78));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  --my-page-center-x: 10px;
  --my-page-rail-max: 216px;
  --my-page-col-gap: 8px;
  --my-page-radius-rail: 14px;
  --my-page-radius-card: 14px;
  --my-page-radius-chip: 12px;
  --my-page-card-bg: var(--theme-my-page-card-bg);
  --my-page-card-border: var(--theme-my-page-card-border);
  --my-page-card-shadow: var(--theme-my-page-card-shadow);
}

/* MY PAGE design system — darker cards, unified radius, calmer surfaces */
.my-page-shell .my-page-card,
.my-page-shell .tf-composer-premium.my-page-card {
  background: var(--my-page-card-bg) !important;
  border-color: var(--my-page-card-border) !important;
  box-shadow: var(--my-page-card-shadow) !important;
  border-radius: var(--my-page-radius-card) !important;
}

.my-page-shell .tf-composer-premium {
  border-radius: var(--my-page-radius-card) !important;
  background: var(--my-page-card-bg) !important;
  border-color: var(--my-page-card-border) !important;
  box-shadow: var(--my-page-card-shadow) !important;
}

.my-page-shell .my-page-left .my-page-nav,
.my-page-shell .my-page-right .my-page-side.my-page-side-active,
.my-page-shell .my-page-friend-panel {
  border-radius: var(--my-page-radius-rail);
}

.my-page-shell .my-page-nav-item {
  border-radius: var(--my-page-radius-chip);
  border: 1px solid transparent;
}

.my-page-shell .my-page-nav-item.is-active {
  border-color: var(--my-page-nav-active-border) !important;
  background: var(--my-page-nav-active-bg) !important;
  color: var(--my-page-nav-active-color) !important;
  box-shadow: var(--my-page-nav-active-shadow) !important;
}

.my-page-shell .message-dialog-item,
.my-page-shell .friend-row.card-base,
.my-page-shell .mp-timeline-item,
.my-page-shell .mp-audio-history-item,
.my-page-shell .mp-groups-list li,
.my-page-shell .mp-media-country,
.my-page-shell .mp-node-folder-btn {
  border-radius: var(--my-page-radius-chip);
}

.my-page-shell .my-page-section-sub,
.my-page-shell .mp-side-sub {
  color: var(--my-page-muted-text);
}

.my-page-shell .friends-online-empty {
  color: var(--my-page-empty-text);
  font-size: 10px;
  padding: 10px 8px;
  text-align: center;
}

.mp-quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mp-quick-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px;
  border-radius: var(--my-page-radius-chip, 12px);
  border: 1px solid var(--my-page-stat-border);
  background: var(--my-page-stat-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mp-quick-stat-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--my-page-stat-label);
}

.mp-quick-stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--my-page-stat-value);
  text-shadow: var(--my-page-stat-value-glow);
}

.my-page-shell .tf-travel-features-brand {
  border-radius: var(--my-page-radius-chip);
  border: 1px solid var(--my-page-brand-chip-border);
  background: var(--my-page-brand-chip-bg);
}

.my-page-shell .tf-post {
  border-radius: var(--my-page-radius-card);
}

.my-page-shell .dating-card {
  border-radius: var(--my-page-radius-card);
  background: transparent;
  border-color: rgba(143, 211, 255, 0.12);
  box-shadow: none;
}

.my-page-shell .mp-mini-btn,
.my-page-shell .message-new-btn,
.my-page-shell .message-archived-btn,
.my-page-shell .friend-action-btn,
.my-page-shell .mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--my-page-btn-border);
  background: var(--my-page-btn-bg);
  color: var(--my-page-btn-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  -webkit-font-smoothing: antialiased;
}

.my-page-shell .message-archived-btn,
.my-page-shell .message-new-btn {
  min-width: 32px;
  width: 32px;
  padding: 0;
  box-sizing: border-box;
}

.my-page-shell .message-archived-btn i,
.my-page-shell .message-new-btn i {
  font-size: 13px;
  line-height: 1;
  margin: 0;
}

.my-page-shell .mp-mini-btn-primary,
.my-page-shell .message-new-btn,
.my-page-shell .mp-btn--primary {
  border-color: var(--my-page-btn-primary-border);
  background: var(--my-page-btn-primary-bg);
  color: var(--my-page-btn-primary-text);
}

.my-page-shell .mp-btn--secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
}

.my-page-shell .mp-btn--icon {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 14px;
}

.my-page-shell .mp-mini-btn:hover,
.my-page-shell .message-new-btn:hover,
.my-page-shell .friend-action-btn:hover,
.my-page-shell .mp-btn:hover {
  border-color: var(--my-page-btn-hover-border);
  background: var(--my-page-btn-hover-bg);
}

.my-page-shell .mp-btn--primary:hover,
.my-page-shell .mp-mini-btn-primary:hover {
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.18);
}

.my-page-shell .mp-btn--secondary:hover {
  border-color: rgba(236, 202, 116, 0.42);
  background: rgba(236, 202, 116, 0.08);
  color: rgba(255, 248, 232, 0.96);
}

.my-page-shell .message-dialogs-search {
  border-radius: var(--my-page-radius-chip);
  border-color: var(--my-page-search-border);
  background: var(--my-page-search-bg);
}

.my-page-shell .message-dialog-item.active {
  border-color: var(--my-page-dialog-active-border);
  background: var(--my-page-dialog-active-bg);
  box-shadow: var(--my-page-dialog-item-active-shadow);
}

.my-page-shell .message-dialog-item {
  border-color: var(--my-page-dialog-item-border);
  background: var(--my-page-dialog-item-bg);
  box-shadow: var(--my-page-dialog-item-shadow);
}

.my-page-shell .mp-filter-form .mp-field-input,
.my-page-shell .mp-field-input {
  border-radius: 8px;
  border-color: var(--my-page-input-border);
  background: var(--my-page-input-bg);
}

.my-page-shell .mp-search-flash {
  animation: mp-search-flash 1.1s ease-out 1;
  outline: 1px solid var(--my-page-flash-outline);
}

/* Outer frame: single uniform stroke on top of all MY PAGE content */
.my-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  border: 1px solid var(--my-page-shell-outline);
  box-sizing: border-box;
  border-radius: 0;
}

.my-page-shell::after {
  display: none;
}

.my-page-shell > * {
  position: relative;
  z-index: 1;
}

/* My Page: one premium UI family (aligned with global app typography) */
.my-page-shell .my-page-col-title,
.my-page-shell .my-page-section-sub,
.my-page-shell .my-page-card-title,
.my-page-shell .my-page-name,
.my-page-shell .tf-composer-head-label,
.my-page-shell .message-chat .msg-text {
  font-family: var(--font-mypage);
}

.my-page-shell .my-page-meta-item,
.my-page-shell .mp-side-sub {
  font-family: var(--font-mypage);
  letter-spacing: 0.04em;
}

/* Global fixed bar (эскиз: поиск + кнопки сверху) */
.my-page-global-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 158px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  background: var(--my-page-topbar-bg);
  border-bottom: 1px solid var(--my-page-topbar-border);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--my-page-topbar-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.my-page-global-logo {
  font-family: var(--font-mypage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-olive);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.my-page-global-logo-text {
  line-height: 1;
}

.my-page-global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--my-page-global-search-border);
  background: var(--my-page-global-search-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.my-page-global-search i {
  color: var(--text-dim);
  font-size: 12px;
}

.my-page-global-search input {
  width: 100%;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
}

.my-page-global-search input::placeholder {
  color: var(--my-page-global-search-placeholder);
}

/* Search: keep same chrome when focused — no inner blue ring */
.my-page-shell .my-page-global-search:focus-within {
  border-color: var(--my-page-global-search-border);
  background: var(--my-page-global-search-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.my-page-shell .my-page-global-search input:focus,
.my-page-shell .my-page-global-search input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.my-page-global-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.my-page-global-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--my-page-global-btn-border);
  background: var(--my-page-global-btn-bg);
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease,
    border-color 0.15s ease;
}

.my-page-global-btn:hover {
  background: var(--my-page-global-btn-hover-bg);
  color: var(--text-main);
  border-color: var(--my-page-global-btn-hover-border);
  transform: translateY(-1px);
}

.my-page-global-btn i {
  font-size: 12px;
  color: var(--my-page-global-btn-icon);
}

/* Legal footer: линия на всю ширину окна, затем «воздух» и блок текста (колонки выше доходят до края визуально) */
.my-page-legal-bar {
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: 0;
  z-index: 8;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.my-page-legal-bar--compact .my-page-legal-edge {
  display: none;
}

.my-page-legal-inner--compact {
  margin: 0 4px;
  padding: 0 8px 1px;
  gap: 0;
  align-items: stretch;
  border-radius: 0;
  background: transparent;
}

.my-page-legal-micro {
  margin: 0;
  font-size: 7.5px;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--my-page-legal-text);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.my-page-legal-line {
  display: block;
  max-width: 42rem;
}

.my-page-legal-line + .my-page-legal-line {
  margin-top: 0;
  font-size: 8px;
  color: var(--my-page-legal-text-dim);
  line-height: 1.28;
}

.my-page-legal-link--inline {
  display: inline;
  font-size: inherit !important;
  letter-spacing: inherit !important;
  text-transform: none !important;
  font-weight: 600 !important;
  vertical-align: baseline;
  margin: 0 1px;
  border-bottom: 1px dashed var(--my-page-legal-link-border);
}

.my-page-legal-edge {
  height: 1px;
  margin: 0 12px 0;
  background: var(--my-page-legal-edge);
  box-shadow: var(--my-page-legal-edge-glow);
}

.my-page-legal-inner {
  margin: 0 8px;
  padding: 20px 14px 24px;
  border-radius: 0 0 12px 12px;
  background: var(--my-page-legal-inner-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.my-page-legal-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--my-page-legal-copy);
  line-height: 1.5;
  max-width: 28rem;
}

.my-page-legal-brand {
  font-family: var(--font-mypage);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--my-page-legal-brand);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.my-page-legal-sub {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--my-page-legal-sub);
}

.my-page-legal-rights {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--my-page-legal-rights);
  margin-top: 2px;
}

.my-page-legal-ip {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--my-page-legal-ip);
  line-height: 1.45;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--my-page-legal-ip-border);
}

.my-page-legal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

.my-page-legal-link {
  color: var(--my-page-legal-link);
  text-decoration: none;
  border: none;
  border-bottom: 1px dashed var(--my-page-legal-link-border);
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.my-page-legal-link:hover {
  color: var(--my-page-legal-link-hover);
  border-bottom-color: var(--my-page-legal-link-hover-border);
}

button.my-page-legal-link {
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  background: none;
  outline: none;
}

button.my-page-legal-link:focus-visible {
  border-bottom-color: var(--my-page-legal-link-hover-border);
  color: var(--my-page-legal-link-hover);
}

.footer-legal-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--ui-footer-legal-btn-color);
  font-size: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal-btn:focus-visible {
  outline: none;
  color: var(--ui-footer-legal-btn-hover);
}

.footer-legal-btn:hover {
  color: var(--ui-footer-legal-btn-hover);
}

.footer-legal-sep {
  margin: 0 4px;
  color: rgba(120, 160, 130, 0.45);
}

/* Top glass bar */

.my-page-top-bar {
  position: absolute;
  top: 34px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    rgba(8, 18, 14, 0.96),
    rgba(3, 8, 6, 0.94)
  );
  border: 1px solid rgba(180, 255, 220, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7), 0 10px 24px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(2, 6, 4, 0.9);
}

.my-page-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.my-page-top-btn i {
  font-size: 11px;
}

.my-page-top-btn:hover {
  background: rgba(58, 166, 255, 0.16);
  color: var(--text-main);
  transform: translateY(-1px);
}

.my-page-top-btn-accent {
  background: rgba(58, 166, 255, 0.22);
  color: var(--blue);
}

.my-page-top-btn-accent:hover {
  background: rgba(58, 166, 255, 0.3);
}

/* Header */

.my-page-header {
  position: sticky;
  top: 38px;
  z-index: 6;
  height: 148px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Единая сетка: левое меню / центр / правые блоки */
.my-page-layout {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 6px 14px 2px;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr) 228px;
  column-gap: 14px;
  align-items: stretch;
}

.my-page-left {
  position: relative;
  padding-right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  gap: 0;
}

.my-page-center {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
  align-items: stretch;
  box-shadow: none;
}

.my-page-right {
  position: relative;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* Rail dividers are owned only by styles-mypage-shell-v2.css. */
.my-page-layout {
  --my-page-layout-gap: 14px;
}

.my-page-left::after,
.my-page-center::after,
.my-page-layout::after {
  content: none;
  display: none;
}

.my-page-center .my-page-section {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* Column headers: no dark band — title + full-width shimmer line */
.my-page-col-header {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-shrink: 0;
  width: 100%;
  padding: 4px var(--my-page-center-x, 10px) 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
}

.my-page-col-header::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 6px;
  margin-bottom: var(--my-page-col-gap, 8px);
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    rgba(58, 166, 255, 0.05),
    rgba(58, 166, 255, 0.55),
    rgba(125, 252, 138, 0.75),
    rgba(58, 166, 255, 0.55),
    rgba(58, 166, 255, 0.05)
  );
  background-size: 220% 100%;
  animation: mp-col-line-flow 5.5s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(58, 166, 255, 0.22), 0 0 18px rgba(125, 252, 138, 0.14);
}

@keyframes mp-col-line-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.my-page-col-title {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mypage);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--my-page-col-title-color);
  text-shadow: var(--my-page-col-title-shadow);
  position: relative;
  margin: 0;
  width: 100%;
}

.my-page-side-title {
  font-family: var(--font-mypage);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--my-page-side-title-color);
  margin: 0 0 6px;
  line-height: 1.25;
}

.my-page-col-title::after {
  display: none;
}

/* Контент в колонках начинается одинаково под линией */
.my-page-nav,
.my-page-section,
.my-page-side-section {
  padding-top: 6px;
}

/* Скролл внутри колонок (а не всей страницы) */
.my-page-left .my-page-col-header {
  width: 100%;
  max-width: var(--my-page-rail-max);
  padding-left: 0;
  padding-right: 0;
}

.my-page-left .my-page-nav {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--my-page-rail-max);
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  overflow: hidden !important;
  padding: 0 !important;
  margin-bottom: var(--my-page-col-gap, 12px);
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

.my-page-left .my-page-nav-list.mnm-scroll-rail {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 12px 10px;
  box-sizing: border-box;
}

.my-page-center .my-page-view {
  display: none;
}
.my-page-center .my-page-col-header {
  padding-left: var(--my-page-center-x, 10px);
  padding-right: var(--my-page-center-x, 10px);
}

.my-page-center .my-page-view.my-page-view-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-left: var(--my-page-center-x, 10px);
  padding-right: var(--my-page-center-x, 10px);
  padding-bottom: var(--my-page-col-gap, 12px);
  margin-top: 0;
  scrollbar-gutter: stable both-edges;
  align-items: stretch;
  box-sizing: border-box;
}

.my-page-screen[data-mode="messages"] .my-page-center .my-page-view.my-page-view-active {
  overflow: hidden; /* в messages скролл только в логе */
}

.my-page-screen[data-mode="groups"] .my-page-center .my-page-view.my-page-view-active {
  overflow: hidden;
}

.my-page-screen[data-mode="groups"] #myPageViewGroups {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.my-page-screen[data-mode="groups"] .mp-group-hero {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
  overflow: hidden;
}

.my-page-screen[data-mode="groups"] .my-page-center .my-page-view.my-page-view-active {
  padding-bottom: 4px;
}

.my-page-screen[data-mode="groups"] #myPageViewGroups > .my-page-section-sub {
  display: none;
}

.my-page-screen[data-mode="messages"] .my-page-legal-bar {
  display: none;
}

.my-page-screen[data-mode="messages"] .my-page-layout {
  padding-bottom: 6px;
}

.my-page-right .my-page-side {
  display: none;
}
.my-page-right .my-page-col-header {
  width: 100%;
  max-width: var(--my-page-rail-max);
  padding-left: 0;
  padding-right: 0;
}

.my-page-right .my-page-side.my-page-side-active,
.my-page-shell .my-page-side.mnm-rounded-scroll-host {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: var(--my-page-rail-max);
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  overflow: hidden !important;
  padding: 0 !important;
  margin-bottom: var(--my-page-col-gap, 12px);
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

.my-page-shell .my-page-side-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

.my-page-screen[data-mode="messages"] .my-page-right .my-page-side.my-page-side-active .my-page-side-scroll,
.my-page-screen[data-mode="messages"] .my-page-right .my-page-side.mnm-rounded-scroll-host .my-page-side-scroll {
  padding: 10px 8px;
}

.my-page-screen[data-mode="messages"] .message-dialogs {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.my-page-screen[data-mode="messages"] .message-dialogs-list {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.my-page-screen[data-mode="messages"] .message-dialogs-header {
  flex-wrap: wrap;
  min-width: 0;
}

.my-page-screen[data-mode="messages"] .message-dialogs-header-actions {
  flex-wrap: wrap;
  max-width: 100%;
}

.my-page-screen[data-mode="messages"] .message-archived-btn span,
.my-page-screen[data-mode="messages"] .message-new-btn span {
  display: none;
}

.my-page-screen[data-mode="messages"] #myPageViewMessages .msg-input-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.my-page-left .my-page-nav-list {
  width: 100%;
  margin: 0;
}


/* Сообщения: чат тянется по высоте и выглядит ровно */
.message-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  flex: 1;
}

.message-chat-log {
  max-height: none;
  padding: 14px 10px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: min(360px, 48vh);
  background: transparent;
  border: none;
  font-size: var(--font-sm);
}

.message-chat-header {
  padding: 12px 14px;
  border-bottom: 2px solid rgba(125, 252, 138, 0.32);
  background: var(--ui-chat-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: visible;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(125, 252, 138, 0.1);
  position: relative;
  z-index: 3;
}

.message-chat-input {
  padding: 10px 12px 12px;
  margin-top: 0;
  flex: 0 0 auto;
  background: var(--ui-chat-input-bg);
  border-top: 1px solid var(--ui-chat-sep);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Сообщения: фиксируем высоту секции, скролл только внутри лога */
#myPageViewMessages.my-page-view-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#myPageViewMessages .message-center-card {
  flex: 1;
  min-height: 0;
}

#myPageViewMessages .message-center-body {
  height: 100%;
  min-height: 0;
}

/* Убираем "квадрат-карточку" вокруг чата: оставляем только пузыри */
#myPageViewMessages .message-center-card {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#myPageViewMessages .message-center-body {
  padding: 0 !important;
}
#myPageViewMessages .message-chat {
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(125, 252, 138, 0.28);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#myPageViewMessages .message-chat-header {
  /* Sketch header chrome lives in styles-chat-premium.css */
  border-bottom: none;
}
#myPageViewMessages .message-chat-input {
  margin-top: auto;
  flex-shrink: 0;
  padding: 12px 12px 16px;
  box-sizing: border-box;
  background: var(--my-page-msg-input-area-bg);
  border-top: 1px solid var(--my-page-msg-input-area-border);
  box-shadow: var(--my-page-msg-input-area-shadow);
}

#myPageViewMessages .msg-input-row {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

#myPageViewMessages .msg-chat-plus-slot {
  align-self: center;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
}

#myPageViewMessages .msg-input-send {
  align-self: center;
}

#myPageViewMessages .msg-input-btn {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

#myPageViewMessages .msg-input-cloud {
  border-radius: 16px;
  border-color: var(--my-page-msg-input-cloud-border-view);
  background: var(--my-page-msg-input-cloud-bg-view);
  padding: 8px 10px 6px;
  min-height: 54px;
}

#myPageViewMessages .msg-cloud-actions {
  display: none;
}

#myPageViewMessages .msg-input-hint {
  margin-top: 6px;
  padding-left: 54px;
  font-size: 9px;
  opacity: 0.75;
}

/* Scrollbars (MY PAGE) — те же токены, что и в остальном приложении */
.my-page-shell * {
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

.my-page-shell *::-webkit-scrollbar {
  width: var(--mnm-scroll-rail-width, 7px);
  height: var(--mnm-scroll-rail-width, 7px);
  background: transparent !important;
}

.my-page-shell *::-webkit-scrollbar-track {
  margin-block: var(--mnm-scroll-rail-inset-rounded, 30px);
  background: transparent !important;
  border-radius: 99px;
}

.my-page-shell *::-webkit-scrollbar-button,
.my-page-shell *::-webkit-scrollbar-button:single-button,
.my-page-shell *::-webkit-scrollbar-button:vertical:start:decrement,
.my-page-shell *::-webkit-scrollbar-button:vertical:end:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  max-width: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.my-page-shell *::-webkit-scrollbar-thumb {
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* MY PAGE: premium focus — inset glow only (no double “tube” ring) */
.my-page-shell input:not([type="hidden"]):not([type="file"]):focus,
.my-page-shell textarea:focus,
.my-page-shell select:focus {
  outline: none;
}
.my-page-shell select {
  color-scheme: var(--my-page-color-scheme, dark);
}
.my-page-shell select option,
.my-page-shell select optgroup {
  background: var(--my-page-select-option-bg) !important;
  color: var(--my-page-select-option-color) !important;
}
.my-page-shell select option:checked {
  background: var(--my-page-select-option-checked-bg) !important;
  color: var(--my-page-select-option-checked-color) !important;
}
.my-page-shell input:not([type="hidden"]):not([type="file"]):focus-visible,
.my-page-shell textarea:focus-visible,
.my-page-shell select:focus-visible {
  border-color: var(--my-page-input-focus-border) !important;
  box-shadow: var(--my-page-input-focus-shadow) !important;
}
.my-page-shell .my-page-global-search input:focus-visible {
  border-color: transparent !important;
  box-shadow: none !important;
}
.my-page-shell button:focus,
.my-page-shell .msg-input-btn:focus,
.my-page-shell .msg-cloud-btn:focus,
.my-page-shell .tf-attach-btn:focus,
.my-page-shell .tf-quick-react:focus,
.my-page-shell .tf-react-more-btn:focus,
.my-page-shell .tf-picker-emoji:focus {
  outline: none;
}
.my-page-shell button:focus-visible,
.my-page-shell .msg-input-btn:focus-visible,
.my-page-shell .msg-cloud-btn:focus-visible,
.my-page-shell .tf-attach-btn:focus-visible,
.my-page-shell .tf-quick-react:focus-visible,
.my-page-shell .tf-react-more-btn:focus-visible,
.my-page-shell .tf-picker-emoji:focus-visible {
  box-shadow: 0 0 0 1px rgba(143, 211, 255, 0.32), 0 0 0 3px rgba(125, 252, 138, 0.1),
    0 4px 18px rgba(0, 0, 0, 0.28) !important;
}

@keyframes mp-search-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(125, 252, 138, 0.45);
  }
  35% {
    box-shadow: 0 0 0 3px rgba(58, 166, 255, 0.25), 0 0 28px rgba(125, 252, 138, 0.12);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.my-page-shell .mp-search-flash {
  animation: mp-search-flash 1s ease-out 1;
  border-radius: inherit;
}

/* COUNTRY QUIZ map + checklist */
.cq-map{
  height: 340px;
  border-radius: 14px;
  border: 1px solid rgba(143, 211, 255, 0.18);
  background: radial-gradient(circle at 50% 30%, rgba(15,24,20,.95), rgba(2,3,3,.98));
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.cq-checklist{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cq-check{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(80, 120, 90, 0.35);
  background: rgba(0,0,0,.12);
  color: rgba(236,250,244,.92);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cq-check span{
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cq-check b{
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: rgba(143, 211, 255, 0.95);
}
.cq-check.is-ok{
  border-color: rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.08);
}
.cq-check.is-ok b{ color: rgba(125,252,138,.95); }
.cq-check.is-bad{
  border-color: rgba(255, 122, 140, 0.45);
  background: rgba(255, 64, 96, 0.07);
}
.cq-check.is-bad b{ color: rgba(255,122,140,.95); }

/* Quiz mode fallback: dim map details (including baked labels) */
#map.quiz-dim-mode .mapboxgl-canvas {
  filter: saturate(0.82) brightness(0.74) contrast(0.94);
}

/* ===================================================================== */
/* COUNTRY QUIZ — contour globe edition                                  */
/* ===================================================================== */
.left-panel .app-data-overlay.cq2.visible .cq2-stage,
.cq2 .cq2-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(16, 40, 32, 0.55), rgba(2, 6, 5, 0) 60%),
    radial-gradient(140% 120% at 50% 120%, rgba(58, 166, 255, 0.12), rgba(2, 6, 5, 0) 55%),
    #040706;
}
/* faint starfield */
.cq2 .cq2-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 12% 80%, rgba(255, 255, 255, 0.28), transparent),
    radial-gradient(1px 1px at 60% 85%, rgba(255, 255, 255, 0.33), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.cq2-globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  z-index: 1;
}
.cq2-globe:active { cursor: grabbing; }

/* ---- HUD bars ---- */
.cq2-hud {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.cq2-hud-top { top: 0; }
.cq2-hud-bottom {
  bottom: 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cq2-hud .cq2-close,
.cq2-hud .cq2-sound-btn,
.cq2-hud .cq2-chip,
.cq2-hud-bottom .cq2-dots,
.cq2-hud-bottom .cq2-hint { pointer-events: auto; }

.mnm-game-sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(6, 16, 12, 0.72);
  color: var(--green);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.mnm-game-sound-btn i {
  font-size: 14px;
  pointer-events: none;
}

.mnm-game-sound-btn:hover {
  border-color: rgba(125, 252, 138, 0.65);
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.22);
}

.mnm-game-sound-btn.is-muted {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.22);
}

.mnm-game-sound-btn.is-muted:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

/* Match Tomato Battle intro/header: sound circle → close square, close rightmost */
.cq2-hud-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  pointer-events: auto;
}

.cq2-hud-actions .cq2-sound-btn,
.cq2-hud-actions .cq2-close {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  inset: auto !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  transform: none !important;
  flex: 0 0 36px;
  align-self: center;
  box-sizing: border-box;
}

.cq2-hud-actions .cq2-sound-btn {
  order: 1;
  border-radius: 999px !important;
}

.cq2-hud-actions .cq2-close {
  order: 2;
  border-radius: 12px !important;
  border: 1px solid rgba(125, 252, 138, 0.34) !important;
  background: rgba(0, 0, 0, 0.3) !important;
  color: rgba(220, 255, 230, 0.96) !important;
  font-size: 17px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.12) inset;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cq2-hud-actions .cq2-close::before,
.cq2-hud-actions .cq2-close::after {
  content: none !important;
  display: none !important;
}

.cq2-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cq2-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.26);
  background: rgba(6, 16, 12, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cq2-chip b {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
  color: #eafff0;
  font-variant-numeric: tabular-nums;
}
.cq2-chip--ok { border-color: rgba(125, 252, 138, 0.5); }
.cq2-chip--ok b { color: var(--green); }

/* Combo streak chip */
.cq2-chip--streak {
  border-color: rgba(255, 170, 70, 0.5);
  color: #ffd9a8;
  transition: transform 0.2s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}
.cq2-chip--streak b { color: #ffb347; }
.cq2-chip--streak.is-dim { opacity: 0.45; }
.cq2-chip--streak.is-hot {
  border-color: rgba(255, 130, 50, 0.95);
  background: rgba(40, 18, 6, 0.7);
  box-shadow: 0 0 22px rgba(255, 140, 50, 0.5);
  animation: cqHotPulse 0.7s ease-in-out infinite;
}
.cq2-chip--streak.is-hot b { color: #ffd27a; }
@keyframes cqHotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

/* Floating +points feedback */
.cq2-gain-host { position: relative; width: 0; height: 0; align-self: center; pointer-events: none; }
.cq2-gain {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: #aaffc4;
  text-shadow: 0 0 16px rgba(125, 252, 138, 0.8);
  animation: cqGainFloat 1s ease-out forwards;
}
.cq2-gain i { font-style: normal; color: #ffb347; font-size: 16px; }
@keyframes cqGainFloat {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); }
  25% { opacity: 1; transform: translate(-50%, -2px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -38px) scale(1); }
}

/* Radar hint button */
.cq2-radar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, 0.5);
  background: rgba(6, 18, 26, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #cdeeff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.cq2-radar:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(110, 200, 255, 0.45);
}
.cq2-radar:active:not(:disabled) { transform: translateY(0) scale(0.96); }
.cq2-radar-ico { font-size: 15px; line-height: 1; }
.cq2-radar-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(110, 200, 255, 0.2);
  border: 1px solid rgba(120, 220, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 12px;
}
.cq2-radar:disabled { opacity: 0.4; cursor: not-allowed; }
.cq2-radar.is-spent { border-color: rgba(255, 120, 120, 0.4); color: #ffb3b3; }

/* ---- Live leaderboard ---- */
.cq2-board {
  position: absolute;
  right: 16px;
  top: 50%;
  z-index: 4;
  width: 212px;
  pointer-events: none;
  padding: 12px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(125, 252, 138, 0.22);
  background: linear-gradient(180deg, rgba(8, 20, 15, 0.8), rgba(4, 10, 8, 0.7));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(24px, -50%);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cq2-board.is-on { opacity: 1; transform: translate(0, -50%); }

.cq2-bd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(125, 252, 138, 0.16);
}
.cq2-bd-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 800;
  color: #eafff0;
}
.cq2-bd-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #ff7a8a;
  font-weight: 700;
}
.cq2-bd-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5a6e;
  box-shadow: 0 0 8px rgba(255, 90, 110, 0.9);
  animation: cqLiveBlink 1.2s ease-in-out infinite;
}
@keyframes cqLiveBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.cq2-bd-list { display: flex; flex-direction: column; gap: 4px; }
.cq2-bd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.cq2-bd-rank {
  width: 20px;
  text-align: center;
  font-size: 14px;
  flex: 0 0 auto;
}
.cq2-bd-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.cq2-bd-av { font-size: 16px; flex: 0 0 auto; }
.cq2-bd-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #d8f5e2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cq2-bd-pts {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #aaffc4;
  font-variant-numeric: tabular-nums;
}
.cq2-bd-row.is-first {
  background: linear-gradient(90deg, rgba(255, 200, 80, 0.16), rgba(255, 200, 80, 0.03));
  border-color: rgba(255, 200, 80, 0.4);
}
.cq2-bd-row.is-you {
  background: linear-gradient(90deg, rgba(125, 252, 138, 0.2), rgba(125, 252, 138, 0.04));
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 18px rgba(125, 252, 138, 0.22);
  animation: cqYouPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cq2-bd-row.is-you .cq2-bd-name { color: #eafff0; font-weight: 800; }
.cq2-bd-row.is-you .cq2-bd-pts { color: #fff; }
.cq2-bd-row.is-you.is-first {
  background: linear-gradient(90deg, rgba(255, 215, 100, 0.28), rgba(125, 252, 138, 0.06));
  border-color: rgba(255, 215, 100, 0.7);
}
@keyframes cqYouPop {
  0% { transform: scale(0.96); }
  55% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (max-width: 880px) {
  .cq2-board { display: none; }
}

.cq2-close {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.34);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(220, 255, 230, 0.96);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
}

/* ---- Question block ---- */
.cq2-question {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  pointer-events: none;
  width: min(92vw, 640px);
}
.cq2-kicker {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.8);
  margin-bottom: 6px;
}
.cq2-name {
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 6vw, 60px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow:
    0 0 12px rgba(160, 255, 200, 0.85),
    0 0 28px rgba(125, 252, 138, 0.55),
    0 0 48px rgba(90, 230, 140, 0.35),
    0 2px 18px rgba(0, 0, 0, 0.65);
  animation: cq2-name-heartbeat 1.15s ease-in-out infinite;
}
@keyframes cq2-name-heartbeat {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  14% {
    transform: scale(1.035);
    filter: brightness(1.12);
  }
  28% {
    transform: scale(1);
    filter: brightness(1);
  }
  42% {
    transform: scale(1.022);
    filter: brightness(1.08);
  }
  56% {
    transform: scale(1);
    filter: brightness(1);
  }
}
.cq2-cap {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---- Hourglass timer ---- */
.cq2-timer {
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(5, 14, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 22px rgba(125, 252, 138, 0.12);
}
.cq2-hourglass { width: 30px; height: 46px; display: block; }
.cq2-glass {
  fill: rgba(125, 252, 138, 0.06);
  stroke: rgba(125, 252, 138, 0.6);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.cq2-glass-cap { fill: rgba(125, 252, 138, 0.7); }
.cq2-sand { fill: var(--green); transition: opacity 0.15s ease; }
.cq2-secs {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  min-width: 1.4em;
  text-align: center;
  text-shadow: 0 0 14px rgba(125, 252, 138, 0.4);
}
.cq2-timer.is-low {
  border-color: rgba(255, 90, 110, 0.6);
  box-shadow: 0 0 26px rgba(255, 90, 110, 0.28);
  animation: cq2-low-pulse 0.8s ease-in-out infinite;
}
.cq2-timer.is-low .cq2-glass { stroke: rgba(255, 110, 130, 0.85); }
.cq2-timer.is-low .cq2-glass-cap { fill: rgba(255, 110, 130, 0.9); }
.cq2-timer.is-low .cq2-sand { fill: #ff5a6e; }
.cq2-timer.is-low .cq2-secs { color: #ff7a8c; text-shadow: 0 0 16px rgba(255, 90, 110, 0.5); }
@keyframes cq2-low-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ---- Round dots + hint ---- */
.cq2-dots { display: flex; gap: 7px; }
.cq2-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(125, 252, 138, 0.16);
  border: 1px solid rgba(125, 252, 138, 0.28);
  transition: transform 0.15s ease, background 0.2s ease;
}
.cq2-dot.is-ok { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(125, 252, 138, 0.6); }
.cq2-dot.is-bad { background: #ff5a6e; border-color: #ff5a6e; }
.cq2-dot.is-cur { transform: scale(1.5); background: rgba(125, 252, 138, 0.5); }
.cq2-hint {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(5, 14, 11, 0.5);
  border: 1px solid rgba(125, 252, 138, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---- Intro / level select / result screen ---- */
.cq2-screen {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(120% 100% at 50% 40%, rgba(2, 6, 5, 0.7), rgba(2, 6, 5, 0.92));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cq2-screen.is-on { display: flex; }
.cq2-card {
  width: min(94vw, 460px);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: linear-gradient(180deg, rgba(10, 22, 17, 0.96), rgba(5, 12, 10, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 50px rgba(125, 252, 138, 0.1);
  padding: 26px 24px 24px;
  text-align: center;
}
.cq2-card-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.85);
  border: 1px solid rgba(125, 252, 138, 0.3);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.cq2-card-title {
  margin: 0 0 8px;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 38px);
  letter-spacing: 0.02em;
  color: #f3fff7;
  text-shadow: 0 0 24px rgba(125, 252, 138, 0.3);
}
.cq2-card-sub {
  margin: 0 auto 18px;
  max-width: 38ch;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(210, 235, 222, 0.78);
}
.cq2-card-sub b { color: var(--green); }

.cq2-howto {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  text-align: left;
}
.cq2-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.16);
  background: rgba(125, 252, 138, 0.04);
}
.cq2-step span {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(125, 252, 138, 0.16);
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}
.cq2-step p { margin: 0; font-size: 12.5px; color: rgba(220, 240, 228, 0.85); }

.cq2-levels { display: grid; gap: 8px; margin: 0 0 18px; }
.cq2-level {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(125, 252, 138, 0.24);
  background: rgba(8, 18, 14, 0.7);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}
.cq2-level:hover:not(.is-locked) {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.6);
  background: rgba(125, 252, 138, 0.08);
}
.cq2-level.is-locked { opacity: 0.45; cursor: not-allowed; }
.cq2-level-no {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(125, 252, 138, 0.14);
  color: var(--green);
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 18px;
}
.cq2-level-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cq2-level-meta b {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #eafff0;
}
.cq2-level-meta i {
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim);
}
.cq2-level-state {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(125, 252, 138, 0.8);
}

.cq2-play {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(125, 252, 138, 0.5);
  background: linear-gradient(180deg, rgba(125, 252, 138, 0.22), rgba(58, 143, 74, 0.28));
  color: #eafff0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(125, 252, 138, 0.18);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.cq2-play:hover { transform: translateY(-1px); box-shadow: 0 0 34px rgba(125, 252, 138, 0.3); }
.cq2-play--ghost {
  background: rgba(8, 18, 14, 0.7);
  border-color: rgba(125, 252, 138, 0.28);
  box-shadow: none;
}
.cq2-result-actions { display: grid; gap: 8px; }

/* Compact the mode-select (intro) card so it never needs an inner scroll. */
.cq2-card--intro { padding: 16px 20px 18px; }
.cq2-card--intro .cq2-card-badge { margin-bottom: 8px; padding: 4px 11px; }
.cq2-card--intro .cq2-card-title { font-size: clamp(22px, 4vw, 30px); margin-bottom: 4px; }
.cq2-card--intro .cq2-card-sub { margin-bottom: 10px; font-size: 12px; line-height: 1.4; }
.cq2-card--intro .cq2-howto { gap: 6px; margin-bottom: 10px; }
.cq2-card--intro .cq2-step { padding: 7px 10px; }
.cq2-card--intro .cq2-step span { width: 22px; height: 22px; font-size: 12px; }
.cq2-card--intro .cq2-step p { font-size: 11.5px; line-height: 1.3; }
.cq2-card--intro .cq2-toggle { padding: 8px 12px; margin-bottom: 10px; gap: 10px; }
.cq2-card--intro .cq2-toggle-knob { width: 38px; height: 22px; }
.cq2-card--intro .cq2-toggle-knob::after { width: 16px; height: 16px; }
.cq2-card--intro .cq2-toggle.is-on .cq2-toggle-knob::after { transform: translateX(16px); }
.cq2-card--intro .cq2-toggle-label b { font-size: 12px; }
.cq2-card--intro .cq2-toggle-label i { font-size: 10px; }
.cq2-card--intro .cq2-levels { gap: 6px; margin-bottom: 10px; }
.cq2-card--intro .cq2-level { padding: 7px 12px; gap: 10px; }
.cq2-card--intro .cq2-level-no { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
.cq2-card--intro .cq2-level-meta b { font-size: 12px; }
.cq2-card--intro .cq2-level-meta i { font-size: 10px; }
.cq2-card--intro .cq2-level-best .cq2-star { font-size: 11px; }
.cq2-card--intro .cq2-play { padding: 11px 16px; font-size: 14px; }

/* Country Quiz — game hub, flag & fact modes */
.cq2-globe.is-hidden { opacity: 0; pointer-events: none; }

/* Alt modes (flag / fact) — ring timer in HUD; play card below */
.cq2-hud-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: auto;
  flex-shrink: 0;
}
.cq2-ring-timer {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.cq2-ring-timer svg {
  display: block;
  width: 44px;
  height: 44px;
}
.cq2-ring-timer .cq2-ring-bg {
  stroke: rgba(125, 252, 138, 0.2);
  stroke-width: 3;
}
.cq2-ring-timer .cq2-ring-prog {
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}
.cq2-ring-timer.is-low .cq2-ring-prog {
  stroke: #ff7070;
}
.cq2-ring-secs {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: #f3fff7;
  line-height: 1;
}
.cq2-mode-alt .cq2-hud-top,
.cq2-mode-alt .cq2-hud-bottom,
.cq2-mode-alt .cq2-board {
  z-index: 7;
}
.cq2-mode-alt .cq2-screen.is-play {
  z-index: 4;
  inset: 58px 0 82px 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 8px 16px 12px;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
.cq2-mode-alt .cq2-close {
  pointer-events: auto;
}
.cq2-mode-alt .cq2-hud-bottom .cq2-dots {
  pointer-events: none;
}
.cq2-radar--elim {
  border-color: rgba(125, 252, 138, 0.48);
  color: #d8ffe0;
  background: rgba(8, 22, 14, 0.78);
}
.cq2-radar--elim:hover:not(:disabled) {
  box-shadow: 0 0 26px rgba(125, 252, 138, 0.38);
}
.cq2-radar--elim .cq2-radar-count {
  background: rgba(125, 252, 138, 0.16);
  border-color: rgba(125, 252, 138, 0.42);
}
.cq2-choice.is-eliminated {
  opacity: 0.22;
  text-decoration: line-through;
  pointer-events: none;
  filter: grayscale(0.75);
  border-color: rgba(120, 130, 125, 0.25) !important;
  background: rgba(0, 0, 0, 0.2) !important;
}
.cq2-choice.is-eliminated kbd {
  opacity: 0.35;
}
.cq2-play-mode {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(125, 252, 138, 0.8);
}
.cq2-gain-host--alt {
  position: relative;
  width: 0;
  height: 0;
  margin: 0 auto;
}
.cq2-play-timer-mount {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
  padding-top: 6px;
  min-height: 58px;
}
.cq2-mode-alt .cq2-play-card .cq2-ring-timer {
  width: 52px;
  height: 52px;
}
.cq2-mode-alt .cq2-play-card .cq2-ring-timer svg {
  width: 52px;
  height: 52px;
}
.cq2-mode-alt .cq2-play-card .cq2-ring-secs {
  font-size: 15px;
}
.cq2-timer-depot {
  display: none !important;
}
.cq2-scoreboard--mini {
  margin-top: -6px;
  margin-bottom: 10px;
}
.cq2-scoreboard--mini .cq2-score-cell b {
  font-size: 15px;
}
.cq2-unlock-note {
  color: var(--green) !important;
  margin-bottom: 6px !important;
}
.cq2-lock-note {
  color: rgba(255, 180, 120, 0.9) !important;
  margin-bottom: 6px !important;
}
.cq2-choice:disabled {
  opacity: 0.72;
  cursor: default;
  transform: none !important;
}
.cq2-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.cq2-game {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.22);
  background: rgba(125, 252, 138, 0.05);
  color: rgba(230, 245, 240, 0.95);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.cq2-game:hover {
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(125, 252, 138, 0.1);
  transform: translateY(-1px);
}
.cq2-game-ico { font-size: 22px; line-height: 1; }
.cq2-game b { font-size: 11px; letter-spacing: 0.06em; }
.cq2-game i { font-size: 10px; font-style: normal; color: rgba(200, 225, 210, 0.75); line-height: 1.3; }
.cq2-back {
  align-self: flex-start;
  margin: 0 0 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: rgba(125, 252, 138, 0.85);
  font-size: 12px;
  cursor: pointer;
}
.cq2-back:hover { color: var(--green); }
.cq2-play-card {
  width: min(420px, 92vw);
  padding: 16px 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(6, 14, 11, 0.94);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.cq2-flag-frame {
  width: min(320px, 80vw);
  aspect-ratio: 3 / 2;
  margin: 0 auto 14px;
  border-radius: 12px;
  border: 2px solid rgba(125, 252, 138, 0.35);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cq2-flag-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cq2-play-prompt,
.cq2-fact-q {
  margin: 0 0 14px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(230, 245, 240, 0.95);
}
.cq2-fact-q { font-size: 15px; font-weight: 600; }
.cq2-choices { display: grid; gap: 8px; }
.cq2-choice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(125, 252, 138, 0.06);
  color: rgba(230, 245, 240, 0.95);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
  text-align: left;
}
.cq2-choice kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(0, 0, 0, 0.35);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(200, 255, 210, 0.9);
  font-family: inherit;
}
.cq2-choice:hover:not(:disabled) {
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(125, 252, 138, 0.12);
  transform: translateY(-1px);
}
.cq2-choice.is-correct {
  border-color: rgba(125, 252, 138, 0.85);
  background: rgba(125, 252, 138, 0.22);
}
.cq2-choice.is-wrong {
  border-color: rgba(255, 120, 120, 0.65);
  background: rgba(255, 80, 80, 0.15);
  animation: cq2-shake 0.35s ease;
}
@keyframes cq2-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@media (max-width: 640px) {
  .cq2-games { grid-template-columns: 1fr; }
}

.cq2-result-stars { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.cq2-star {
  font-size: 30px;
  color: rgba(125, 252, 138, 0.18);
  transition: transform 0.2s ease;
}
.cq2-star.is-on {
  color: var(--green);
  text-shadow: 0 0 18px rgba(125, 252, 138, 0.6);
  transform: scale(1.12);
}

/* Best score on level cards */
.cq2-level-best {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}
.cq2-level-best b { display: inline-flex; gap: 1px; }
.cq2-level-best .cq2-star { font-size: 12px; }
.cq2-level-best em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(125, 252, 138, 0.8);
}

/* Hardcore toggle */
.cq2-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  margin: 0 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 90, 110, 0.3);
  background: rgba(22, 8, 10, 0.5);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cq2-toggle:hover { border-color: rgba(255, 90, 110, 0.55); }
.cq2-toggle.is-on {
  border-color: rgba(255, 90, 110, 0.85);
  background: rgba(40, 10, 14, 0.6);
  box-shadow: 0 0 24px rgba(255, 80, 100, 0.28);
}
.cq2-toggle-knob {
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(120, 120, 130, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  transition: background 0.2s ease;
}
.cq2-toggle-knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8e8ee;
  transition: transform 0.2s ease;
}
.cq2-toggle.is-on .cq2-toggle-knob { background: rgba(255, 80, 100, 0.65); }
.cq2-toggle.is-on .cq2-toggle-knob::after { transform: translateX(18px); }
.cq2-toggle-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cq2-toggle-label b { font-size: 13px; color: #ffd0d6; letter-spacing: 0.06em; }
.cq2-toggle-label i { font-style: normal; font-size: 11px; color: var(--text-dim); }

/* NEW BEST badge + scoreboard + hardcore result badge */
.cq2-newbest {
  display: inline-block;
  margin: 0 auto 10px;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd25a, #ffb347);
  color: #2a1500;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.14em;
  box-shadow: 0 0 26px rgba(255, 190, 80, 0.55);
  animation: cqNewBest 0.6s ease;
}
@keyframes cqNewBest {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
.cq2-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 14px;
}
.cq2-score-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.22);
  background: rgba(6, 16, 12, 0.5);
}
.cq2-score-cell span { font-size: 9px; letter-spacing: 0.14em; color: var(--text-dim); }
.cq2-score-cell b {
  font-family: var(--font-mono);
  font-size: 18px;
  color: #eafff0;
}
.cq2-hard-badge {
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 110, 0.5);
  background: rgba(40, 10, 14, 0.5);
  color: #ffb3bd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  display: inline-block;
}

@media (max-width: 600px) {
  .cq2-question { top: 56px; }
  .cq2-name { font-size: clamp(26px, 8vw, 40px); }
  .cq2-chip span { display: none; }
  .cq2-chip--streak span { display: inline; }
}

/* Адаптив: чтобы на узких экранах не ломалось */
@media (max-width: 980px) {
  .my-page-shell {
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .my-page-global-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .my-page-global-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .my-page-header {
    top: 0;
  }
  .my-page-layout {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding: 0 12px 18px;
  }
  .my-page-left,
  .my-page-right {
    display: none;
  }
}
.my-page-cover {
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.my-page-header-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr) 228px;
  column-gap: 14px;
  align-items: center;
  gap: 0;
  padding: 8px 14px 10px;
}

.my-page-header-pixel-canvas {
  position: absolute;
  left: 14px;
  top: 10px;
  border-radius: 14px;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
}

/* стеклянная "ванна" внутри контура */
.my-page-header-inner::before {
  content: "";
  position: absolute;
  inset: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(5, 10, 8, 0.14)
  );
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 2;
}
.my-page-header-inner::after {
  content: "";
  position: absolute;
  inset: 6px 10px;
  border-radius: 17px;
  padding: 2px;
  background: var(--my-page-header-contour);
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
  animation: var(--my-page-header-contour-animation);
}

@keyframes mp-header-contour-pulse {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(58, 166, 255, 0.2), 0 0 18px rgba(125, 252, 138, 0.12);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 22px rgba(58, 166, 255, 0.32), 0 0 28px rgba(125, 252, 138, 0.2),
      0 0 12px rgba(255, 255, 255, 0.06);
    filter: brightness(1.08);
  }
}

@keyframes mp-avatar-ring-pulse {
  0%,
  100% {
    border-color: rgba(230, 245, 240, 0.86);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75), 0 0 0 2px rgba(5, 10, 8, 0.8),
      0 0 14px rgba(58, 166, 255, 0.08), 0 0 12px rgba(255, 255, 255, 0.03);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75), 0 0 0 2px rgba(5, 10, 8, 0.8),
      0 0 26px rgba(58, 166, 255, 0.2), 0 0 18px rgba(255, 255, 255, 0.07);
  }
}

@keyframes mp-avatar-capsule-pulse {
  0%,
  100% {
    border-color: rgba(58, 166, 255, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 -14px 26px rgba(0, 0, 0, 0.6), 0 18px 44px rgba(0, 0, 0, 0.55),
      0 0 14px rgba(58, 166, 255, 0.16), 0 0 12px rgba(125, 252, 138, 0.1);
  }
  50% {
    border-color: rgba(125, 252, 138, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -14px 26px rgba(0, 0, 0, 0.6), 0 18px 44px rgba(0, 0, 0, 0.55),
      0 0 24px rgba(58, 166, 255, 0.28), 0 0 18px rgba(125, 252, 138, 0.18);
  }
}

.my-page-avatar-block,
.my-page-logo-block,
.my-page-main-info,
.my-page-top-bar {
  position: relative;
  z-index: 4;
}

/* Avatar + header logo ring (mirrored) */

.my-page-avatar-block,
.my-page-logo-block {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.my-page-logo-block {
  cursor: pointer;
}

.my-page-avatar-block::before,
.my-page-logo-block::before {
  content: "";
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.09),
      rgba(5, 10, 8, 0.5)
    ),
    radial-gradient(circle at 30% 20%, rgba(58, 166, 255, 0.22), transparent 60%),
    radial-gradient(circle at 70% 20%, rgba(125, 252, 138, 0.16), transparent 60%);
  border: 2px solid rgba(58, 166, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -14px 26px rgba(0, 0, 0, 0.6),
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(58, 166, 255, 0.18), 0 0 12px rgba(125, 252, 138, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(12px);
  z-index: 1;
  animation: mp-avatar-capsule-pulse 4.8s ease-in-out infinite;
}

.my-page-avatar-block::after,
.my-page-logo-block::after {
  content: "";
  position: absolute;
  bottom: 0px;
  width: 96px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.6), transparent 70%);
  filter: blur(2px);
  opacity: 0.85;
}

.my-page-avatar,
.my-page-logo-mark-wrap {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a0e12;
  border: 3px solid rgba(230, 245, 240, 0.92);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75), 0 0 0 2px rgba(5, 10, 8, 0.85);
  transform: translateY(12px);
  animation: mp-avatar-ring-pulse 4.8s ease-in-out infinite;
}

.my-page-avatar {
  background: #11151a;
}

.my-page-logo-mark-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 38%, rgba(18, 32, 28, 0.95), rgba(5, 8, 7, 0.98));
  padding: 0;
}

.my-page-logo-mark-wrap .mnm-logo-mark--header-hero {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  color: #eafff4;
  filter: drop-shadow(0 0 10px rgba(125, 252, 138, 0.35))
    drop-shadow(0 0 16px rgba(58, 166, 255, 0.28));
}

.my-page-logo-mark-wrap .mnm-logo-mark--header-hero .mnm-logo-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108%;
  height: 108%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: none;
}

.my-page-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Main info */

.my-page-main-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 18px;
}

/* glass strip behind text */

/* Убираем старую "полосу" (конфликтует с новой стеклянной ванной header-inner) */
.my-page-main-info::before {
  content: "";
  position: absolute;
  left: calc(-1 * (220px + 20px));
  right: calc(-1 * 260px - 20px);
  top: -12px;
  bottom: -14px;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(8, 30, 20, 0.6),
    rgba(5, 18, 14, 0.85),
    rgba(8, 30, 20, 0.6)
  );
  border-radius: 10px;
  border: 1px solid rgba(180, 255, 220, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(5, 12, 9, 0.85), 0 18px 38px rgba(0, 0, 0, 0.86);
  opacity: 0.88;
}

.my-page-main-info::before {
  content: none;
}

@media (prefers-reduced-motion: reduce) {
  .my-page-header-inner::before,
  .my-page-header-inner::after,
  .my-page-avatar-block::before,
  .my-page-logo-block::before,
  .my-page-avatar,
  .my-page-logo-mark-wrap {
    animation: none !important;
  }
}

.my-page-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.my-page-name {
  font-family: var(--font-mypage);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.15;
}

.my-page-status {
  font-family: var(--font-mypage);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.35;
  color: var(--text-dim);
  max-width: min(100%, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-page-username {
  font-family: var(--font-mypage);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.my-page-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mypage);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.35;
}

.my-page-meta-item::before {
  content: "";
  margin-right: 0;
}

/* (cleanup) Удалены дублирующие правила сетки MY PAGE ниже по файлу */

.my-page-center .my-page-card,
.my-page-center .message-center-card {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Заголовки колонок теперь фиксируются через .my-page-col-header/.my-page-col-title */

/* Left nav list */

.my-page-nav-list {
  list-style: none;
  margin-bottom: 14px;
}

.my-page-nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.my-page-nav-item span {
  font-family: var(--font-mypage);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--my-page-nav-item-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.my-page-nav-item.is-active span {
  font-weight: 600;
}

.tf-composer-card.is-hidden,
.tf-feed-home-only.is-hidden {
  display: none !important;
}

.my-page-nav-item i {
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: var(--my-page-nav-item-icon);
}

.my-page-nav-item:hover {
  background: var(--my-page-nav-item-hover-bg);
  color: var(--text-main);
  transform: translateX(1px);
}

/* .my-page-nav-item.is-active — unified under .my-page-shell */

/* Secondary text */

.my-page-section-sub {
  font-family: var(--font-mypage);
  font-size: 11px;
  font-weight: 450;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.4;
}

.my-page-feed-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.my-page-feed-toolbar .my-page-section-sub {
  flex: 1 1 auto;
  margin: 0;
}

.mp-feed-clear-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 120, 0.35);
  background: rgba(40, 12, 12, 0.55);
  color: rgba(255, 170, 170, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mp-feed-clear-btn:hover {
  opacity: 1;
  border-color: rgba(255, 140, 140, 0.7);
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.22);
}

/* Cards */

.my-page-card {
  margin-top: 12px;
  padding: 18px 18px;
  border-radius: 16px;
  border: 1px solid var(--ui-card-border);
  background: var(--ui-card-bg);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: var(--ui-card-shadow);
}

.my-page-card-header {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.my-page-card-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-page-card-title {
  font-size: 12px;
}

.my-page-card-meta {
  font-size: 10px;
  color: var(--text-dim);
}

.my-page-card-body {
  font-size: 11px;
  color: var(--text-main);
}

/* Right-side sections */

.my-page-side-section + .my-page-side-section {
  margin-top: 14px;
}

.my-page-stats-list {
  list-style: none;
  font-size: 11px;
  color: var(--text-dim);
}

.my-page-stats-list li {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

/* Like / dislike */

.my-page-card-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.my-page-like-btn,
.my-page-dislike-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ui-secondary-btn-border);
  background: var(--ui-secondary-btn-bg);
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.my-page-like-btn i,
.my-page-dislike-btn i {
  font-size: 11px;
}

.my-page-like-count,
.my-page-dislike-count {
  font-size: 10px;
  padding-left: 2px;
}

.my-page-like-btn.active {
  background: rgba(125, 252, 138, 0.18);
  color: var(--accent-olive);
}

.my-page-dislike-btn.active {
  background: rgba(255, 99, 132, 0.16);
  color: #ff7085;
}

/* Travel Features (TRAVEL FEED) */
.tf-feed-home-only {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tf-travel-features-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ui-tf-brand-border);
  background: var(--ui-tf-brand-bg);
}

.tf-tf-name {
  font-family: var(--font-main);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ui-tf-name-color);
}

.tf-tf-desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ui-tf-desc-color);
  max-width: none;
}

#myPageViewFeed.is-activity-only .tf-feed-home-only {
  display: none;
}

#myPageViewFeed.is-activity-only .my-page-feed-list {
  margin-top: 4px;
}

.my-page-feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  width: 100%;
}

.my-page-center .tf-composer-card,
.my-page-center .tf-feed-home-only,
.my-page-center .tf-travel-features-brand {
  width: 100%;
}

.tf-composer-card {
  margin-top: 0;
}

.tf-composer-premium {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid var(--ui-tf-composer-border);
  background: var(--ui-tf-composer-bg);
  box-shadow: var(--ui-tf-composer-card-shadow);
}

.tf-composer-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--ui-tf-composer-shine);
}

.tf-composer-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.tf-composer-head-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--ui-tf-composer-head-color);
}

.tf-composer-head-hint {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ui-tf-composer-head-hint);
}

.tf-composer-toolbar {
  display: flex;
  justify-content: flex-end;
}

.tf-polish-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--ui-tf-polish-btn-border);
  background: var(--ui-tf-polish-btn-bg);
  color: var(--ui-tf-polish-btn-color);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.tf-polish-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.08);
}

.tf-polish-btn i {
  color: rgba(255, 217, 120, 0.95);
}

.tf-composer-top {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.tf-composer-avatar {
  flex: 0 0 auto;
}

.tf-composer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tf-composer-textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--ui-input-border);
  background: var(--ui-tf-composer-textarea-bg);
  color: var(--text-main);
  outline: none;
  font-family: var(--font-mypage);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.tf-composer-textarea::placeholder {
  color: var(--ui-tf-composer-textarea-placeholder);
}

.my-page-shell .tf-composer-textarea:focus-visible {
  border-color: var(--ui-tf-composer-focus-border) !important;
  box-shadow: var(--ui-tf-composer-focus-shadow) !important;
}

.tf-composer-attach-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tf-attach-btn {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid var(--ui-input-border);
  background: var(--ui-tf-attach-bg);
  color: var(--ui-tf-attach-color);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.tf-attach-btn i {
  font-size: 13px;
}

.tf-attach-btn:hover {
  transform: translateY(-1px);
  background: rgba(3, 8, 6, 0.9);
}

.tf-attach-voice {
  color: rgba(255, 120, 160, 0.95);
  border-color: rgba(255, 120, 160, 0.28);
}

.tf-attach-voice:hover {
  background: rgba(255, 120, 160, 0.08);
}

.tf-attach-voice-stop {
  color: rgba(255, 200, 120, 0.95);
  border-color: rgba(255, 200, 120, 0.3);
}

.tf-attach-voice-stop:disabled {
  opacity: 0.35;
  transform: none;
}

.tf-attach-voice-clear {
  color: rgba(143, 211, 255, 0.75);
}

.tf-composer-voice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 2px 2px 0;
  font-family: var(--font-mypage);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(180, 210, 200, 0.55);
}

.tf-composer-voice-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tf-composer-voice-hint i {
  color: rgba(125, 252, 138, 0.45);
  font-size: 11px;
}

.tf-composer-voice-status {
  color: rgba(125, 252, 138, 0.85);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.tf-composer-preview {
  border-radius: 14px;
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.12);
  padding: 8px;
  overflow: hidden;
}

.tf-composer-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.tf-composer-preview video {
  width: 100%;
  max-height: 240px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.tf-post-media audio,
.tf-composer-preview .tf-post-media audio {
  width: 100%;
  margin-top: 6px;
  border-radius: 12px;
  height: 40px;
}

.tf-post-media-wrap .tf-post-media audio {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.tf-cam-live {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tf-cam-live video {
  width: 100%;
  max-height: 260px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.tf-cam-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tf-cam-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.42);
  background: rgba(125, 252, 138, 0.12);
  color: rgba(125, 252, 138, 0.95);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tf-cam-btn.tf-cam-btn-ghost {
  border-color: rgba(143, 211, 255, 0.18);
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-dim);
}

.tf-location-label {
  font-size: 12px;
  color: rgba(143, 211, 255, 0.92);
}

.tf-composer-tag-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tf-tag-title {
  font-size: 11px;
  color: var(--text-dim);
}

.tf-tag-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tf-tag-chip {
  border-radius: 999px;
  border: 1px solid var(--ui-pill-border);
  background: var(--ui-pill-bg);
  color: var(--text-dim);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tf-tag-chip.is-on {
  border-color: rgba(255, 217, 90, 0.55);
  background: rgba(255, 217, 90, 0.12);
  color: rgba(255, 217, 90, 0.95);
}

.tf-composer-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.tf-post-btn {
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--ui-tf-post-btn-border);
  background: var(--ui-tf-post-btn-bg);
  color: var(--ui-tf-post-btn-text);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tf-post {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--ui-tf-post-border);
  background: var(--ui-tf-post-bg);
  backdrop-filter: blur(16px) saturate(120%);
  padding: 14px 14px 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.tf-post--highlight {
  border-color: rgba(125, 252, 138, 0.75);
  box-shadow: 0 0 0 2px rgba(125, 252, 138, 0.35), 0 20px 50px rgba(0, 0, 0, 0.25);
}

.tf-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.tf-post-delete {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 217, 90, 0.75);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.tf-post-delete:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 99, 132, 0.95);
}

.tf-author-handle {
  color: rgba(143, 211, 255, 0.95);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-author-time {
  color: var(--text-dim);
  font-size: 11px;
}

.tf-post-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.tf-post-media-wrap {
  margin-top: 10px;
}

.tf-post-media img {
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  display: block;
  cursor: zoom-in;
}

@media (max-height: 900px) {
  .tf-post-media img {
    max-height: 72vh;
    object-fit: contain;
  }
}

@media (max-height: 760px) {
  .tf-post-media img {
    max-height: 66vh;
  }
}

.tf-post-media video {
  width: 100%;
  max-height: 320px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.tf-photo-tags {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 217, 90, 0.92);
}

.tf-post-actions {
  margin-top: 10px;
}

.tf-react-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tf-react-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
}

.tf-react-btn.is-on {
  border-color: rgba(255, 217, 90, 0.55);
  color: rgba(255, 217, 90, 0.95);
  box-shadow: 0 0 10px rgba(255, 217, 90, 0.12);
}

.tf-react-btn span {
  font-size: 12px;
}

.tf-emoji-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tf-emoji-btn {
  width: 42px;
  padding: 6px 0;
  border-radius: 12px;
  border: 1px solid rgba(143, 211, 255, 0.16);
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tf-emoji-btn.is-on {
  border-color: rgba(125, 252, 138, 0.45);
  color: rgba(125, 252, 138, 0.95);
}

.tf-emoji-glyph {
  font-size: 14px;
  line-height: 1;
}

.tf-emoji-count {
  font-size: 11px;
  color: var(--text-dim);
}

.tf-react-row-premium {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.tf-react-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tf-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.tf-quick-react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(226, 236, 230, 0.88);
  cursor: pointer;
  font-size: 11px;
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tf-quick-react:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.35);
}

.tf-quick-react.is-on {
  border-color: rgba(255, 217, 120, 0.55);
  color: rgba(255, 236, 200, 0.98);
  box-shadow: 0 0 14px rgba(255, 217, 120, 0.12);
  background: rgba(255, 217, 120, 0.07);
}

.tf-quick-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.tf-react-more-wrap {
  position: relative;
  flex: 0 0 auto;
}

.tf-react-more-btn {
  width: 40px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid var(--ui-input-border);
  background: rgba(58, 166, 255, 0.1);
  color: rgba(200, 230, 255, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.1s ease, background 0.15s ease;
}

.tf-react-more-btn:hover {
  transform: scale(1.04);
  background: rgba(125, 252, 138, 0.12);
}

.tf-react-picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  min-width: 240px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--ui-input-border);
  background: linear-gradient(165deg, rgba(12, 20, 22, 0.98), rgba(6, 10, 9, 0.98));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
}

.tf-react-picker-title {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(143, 211, 255, 0.65);
  margin-bottom: 8px;
}

.tf-react-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.tf-picker-emoji {
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  padding: 6px 0;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease;
}

.tf-picker-emoji:hover {
  background: rgba(125, 252, 138, 0.12);
  transform: scale(1.06);
}

.tf-picker-emoji.is-on {
  border-color: rgba(255, 217, 120, 0.55);
  background: rgba(255, 217, 120, 0.1);
}

.tf-emoji-aggregate {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tf-emoji-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 12px;
}

.tf-emoji-chip-g {
  font-size: 14px;
  line-height: 1;
}

.tf-emoji-chip-n {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: rgba(200, 210, 205, 0.75);
}

.tf-comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ui-pill-border);
}

.tf-comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tf-comment {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ui-pill-border);
  background: rgba(0, 0, 0, 0.1);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tf-comment-author {
  font-size: 11px;
  color: rgba(143, 211, 255, 0.95);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tf-comment-text {
  font-size: 13px;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.5;
  min-width: 0;
  max-width: 100%;
}

.tf-comment-compose {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.tf-comment-polish {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--ui-input-border);
  background: rgba(58, 166, 255, 0.08);
  color: rgba(255, 217, 120, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.tf-comment-polish:hover {
  border-color: rgba(125, 252, 138, 0.4);
  background: rgba(125, 252, 138, 0.1);
}

.tf-comment-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ui-input-border);
  background: var(--ui-input-bg);
  outline: none;
  color: var(--text-main);
  font-size: 13px;
}

.tf-comment-send {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.42);
  background: rgba(125, 252, 138, 0.12);
  color: rgba(125, 252, 138, 0.95);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* MY PAGE: MEDIA */
.my-page-screen[data-mode="media"] .my-page-center .my-page-view.my-page-view-active {
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

#myPageViewMedia.my-page-view-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.mp-media-toolbar {
  margin-bottom: 12px;
  flex-shrink: 0;
}

.my-page-media-list {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.mp-media-country {
  border-radius: 16px;
  border: 1px solid var(--ui-inset-surface-border);
  background: var(--ui-inset-surface);
  backdrop-filter: blur(16px) saturate(120%);
  padding: 12px;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  isolation: isolate;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  backface-visibility: hidden;
}

.mp-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.mp-media-head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.mp-album-lock {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(200, 230, 255, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mp-album-lock.is-locked {
  border-color: rgba(255, 170, 90, 0.45);
  color: rgba(255, 200, 120, 0.95);
}

.mp-album-lock:hover {
  border-color: rgba(125, 252, 138, 0.45);
}

.mp-media-country.is-album-locked .mp-album-lock {
  box-shadow: 0 0 0 1px rgba(255, 170, 90, 0.25);
}

.mp-media-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-mp-media-title-color);
}

.mp-media-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.mp-media-toolbar-sub {
  margin-bottom: 10px;
}

.mp-media-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.mp-media-quota {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.mp-media-add-overlay {
  position: fixed;
  inset: 0;
  z-index: 1450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mp-media-add-overlay[hidden] {
  display: none !important;
}

.mp-media-add-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 4, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mp-media-add-window {
  position: relative;
  z-index: 1;
  width: min(420px, 94vw);
  max-height: min(88vh, 520px);
  overflow: auto;
}

.mp-media-add-summary {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

.mp-media-add-hint {
  margin: 8px 0 12px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

.mp-media-add-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 11px;
  color: var(--text-main);
  cursor: pointer;
}

.mp-media-add-check input {
  margin-top: 2px;
}

.mp-media-add-window select.mp-field-input {
  width: 100%;
  cursor: pointer;
  color-scheme: var(--my-page-color-scheme, dark);
  background-color: var(--my-page-input-bg, #0a1210);
  border-color: var(--my-page-input-border, rgba(143, 211, 255, 0.22));
  color: var(--text-main, rgba(230, 245, 255, 0.95));
}

.mp-media-add-window select.mp-field-input:invalid {
  color: var(--text-dim);
}

.mp-media-add-window select.mp-field-input option,
.mp-media-add-window select.mp-field-input optgroup {
  background-color: var(--my-page-select-option-bg, #0f1826);
  color: var(--my-page-select-option-color, rgba(220, 236, 255, 0.95));
}

.mp-media-add-window select.mp-field-input option:checked,
.mp-media-add-window select.mp-field-input option:hover {
  background-color: var(--my-page-select-option-checked-bg, rgba(58, 166, 255, 0.35));
  color: var(--my-page-select-option-checked-color, #fff);
}

.mp-node-folder-label {
  margin: 10px 0 6px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.mp-media-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 920px) {
  .mp-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mp-media-thumb {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(143, 211, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.mp-media-thumb img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}

.mp-media-cap {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-country-anchor {
  scroll-margin-top: 72px;
}

.mp-side-sub {
  font-size: 10px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.mp-filter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mp-field-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-olive);
}

.mp-field-input,
.mp-field-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-input-border);
  background: var(--ui-input-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 11px;
  min-width: 0;
}

.mp-field-textarea {
  resize: vertical;
  min-height: 64px;
}

.mp-range {
  width: 100%;
  accent-color: var(--blue);
}

.mp-range-val {
  font-size: 10px;
  color: var(--text-dim);
}

.mp-filter-apply {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.12);
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.mp-node-folder-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mp-node-folder-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-inset-surface-border);
  background: var(--ui-inset-surface);
  color: var(--text-main);
  font-size: 10px;
  cursor: pointer;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mp-node-folder-btn:hover {
  border-color: rgba(58, 166, 255, 0.45);
}

.mp-node-folder-btn.is-country {
  font-weight: 600;
  color: rgba(125, 252, 138, 0.9);
}

.mp-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mp-timeline-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-inset-surface-border);
  background: var(--ui-inset-surface);
  font-size: 10px;
  cursor: pointer;
  min-width: 0;
}

.mp-timeline-item time {
  display: block;
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.mp-timeline-item p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.mp-audio-card {
  padding: 14px;
}

.mp-audio-visual {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--ui-mp-audio-visual-border);
  background: var(--ui-mp-audio-visual-bg);
  margin-bottom: 12px;
}

.mp-audio-visual .mnm-voice-meter {
  width: 100%;
}

.mp-audio-btn-record.is-recording {
  animation: mnm-voice-lamp-blink 1s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 64, 96, 0.45);
}

.mp-audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mp-audio-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--ui-input-border);
  background: var(--ui-mp-audio-btn-bg);
  color: var(--text-main);
  font-size: 10px;
  cursor: pointer;
}

.mp-audio-btn-record {
  border-color: var(--ui-mp-audio-btn-record-border);
  color: var(--ui-mp-audio-btn-record-color);
}

.mp-audio-btn-save {
  border-color: var(--ui-mp-audio-btn-save-border);
  color: var(--ui-mp-audio-btn-save-color);
}

.mp-audio-preview-wrap {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ui-mp-audio-preview-border);
  background: var(--ui-mp-audio-preview-bg);
}

.mp-audio-preview-wrap[hidden] {
  display: none !important;
}

.mp-audio-preview-el {
  width: 100%;
  margin-top: 6px;
  min-height: 36px;
}

.mp-audio-hint {
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-dim);
}

.mp-audio-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mp-audio-history-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-pill-border);
  background: var(--ui-mp-audio-history-bg);
  font-size: 10px;
  min-width: 0;
}

.mp-audio-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  min-width: 0;
}

.mp-audio-history-item h4 {
  margin: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}

.mp-audio-history-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.mp-audio-history-action {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mp-audio-history-share {
  border: 1px solid rgba(125, 200, 255, 0.28);
  background: rgba(10, 24, 36, 0.55);
  color: rgba(150, 210, 255, 0.92);
}

.mp-audio-history-share:hover {
  background: rgba(16, 36, 52, 0.8);
  border-color: rgba(125, 200, 255, 0.5);
}

.mp-audio-history-edit {
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(10, 28, 18, 0.55);
  color: rgba(170, 240, 190, 0.92);
}

.mp-audio-history-edit:hover {
  background: rgba(16, 40, 26, 0.8);
  border-color: rgba(125, 252, 138, 0.5);
}

.mp-audio-history-delete {
  border: 1px solid rgba(255, 120, 120, 0.28);
  background: rgba(40, 10, 10, 0.55);
  color: rgba(255, 150, 150, 0.9);
}

.mp-audio-history-delete:hover {
  background: rgba(80, 18, 18, 0.75);
  border-color: rgba(255, 120, 120, 0.5);
  color: #ffb0b0;
}

.mp-audio-history-item.is-editing .mp-audio-history-head {
  flex-direction: column;
  align-items: stretch;
}

.mp-audio-history-edit-title,
.mp-audio-history-edit-desc {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ui-input-border);
  border-radius: 8px;
  background: rgba(4, 10, 8, 0.85);
  color: var(--text-main);
  font-size: 10px;
  padding: 6px 8px;
}

.mp-audio-history-edit-desc {
  margin-top: 6px;
  resize: vertical;
  min-height: 44px;
}

.mp-audio-history-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.mp-audio-history-edit-save,
.mp-audio-history-edit-cancel {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--ui-input-border);
  background: rgba(5, 10, 14, 0.85);
  color: var(--text-main);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.mp-audio-history-edit-save {
  border-color: rgba(125, 252, 138, 0.45);
  color: var(--green);
}

.mp-audio-share-pop {
  position: fixed;
  z-index: 12050;
  width: min(240px, calc(100vw - 20px));
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(125, 200, 255, 0.28);
  background: rgba(6, 12, 16, 0.97);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.mp-audio-share-pop-title {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(150, 210, 255, 0.85);
  margin: 0 4px 8px;
}

.mp-audio-share-pop-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.mp-audio-share-pop-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 200, 255, 0.14);
  background: rgba(8, 16, 22, 0.88);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.mp-audio-share-pop-item:hover {
  border-color: rgba(125, 200, 255, 0.38);
  background: rgba(12, 24, 32, 0.95);
}

.mp-audio-share-pop-name {
  font-size: 10px;
  font-weight: 600;
}

.mp-audio-share-pop-sub {
  font-size: 9px;
  color: var(--text-dim);
}

.mp-audio-history-player {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  padding: 8px 10px;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.16);
  background: linear-gradient(180deg, rgba(6, 14, 11, 0.92), rgba(3, 8, 6, 0.82));
  box-shadow: inset 0 1px 0 rgba(125, 252, 138, 0.06);
  box-sizing: border-box;
}

.mp-audio-history-player-layout {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mp-audio-history-player-tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mp-audio-history-track {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mp-audio-history-track-label {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  min-height: 11px;
}

.mp-audio-history-time-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: rgba(190, 220, 205, 0.82);
}

.mp-audio-history-vol-label {
  color: rgba(170, 240, 190, 0.88);
  font-weight: 600;
}

.mp-audio-history-player-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(125, 252, 138, 0.18);
  border-radius: 50%;
  background: rgba(125, 252, 138, 0.1);
  color: var(--green);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.mp-audio-history-player-btn:hover {
  background: rgba(125, 252, 138, 0.2);
  border-color: rgba(125, 252, 138, 0.34);
}

.mp-audio-history-player-btn:active {
  transform: scale(0.96);
}

.mp-audio-history-time-total {
  color: #ff7b9c;
  font-weight: 600;
}

.mp-audio-history-player-bar {
  width: 100%;
  min-width: 0;
  margin: 0;
  height: 22px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.mp-audio-history-player-seek {
  --seek-pct: 0%;
}

.mp-audio-history-player-vol {
  --vol-pct: 100%;
}

.mp-audio-history-player-seek::-webkit-slider-runnable-track,
.mp-audio-history-player-vol::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
}

.mp-audio-history-player-seek::-webkit-slider-runnable-track {
  background: linear-gradient(
    90deg,
    #ff8fab 0%,
    #ff4d6d var(--seek-pct, 0%),
    rgba(38, 46, 42, 0.82) var(--seek-pct, 0%),
    rgba(38, 46, 42, 0.82) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 120, 150, 0.16);
}

.mp-audio-history-player-vol::-webkit-slider-runnable-track {
  background: linear-gradient(
    90deg,
    rgba(125, 252, 138, 0.75) 0%,
    rgba(125, 252, 138, 0.75) var(--vol-pct, 100%),
    rgba(38, 46, 42, 0.82) var(--vol-pct, 100%),
    rgba(38, 46, 42, 0.82) 100%
  );
}

.mp-audio-history-player-seek::-webkit-slider-thumb,
.mp-audio-history-player-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border-radius: 50%;
  border: 2px solid rgba(55, 12, 24, 0.95);
  background: linear-gradient(180deg, #ffb3c6 0%, #ff4d6d 100%);
  box-shadow: 0 0 0 1px rgba(255, 120, 150, 0.55), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.mp-audio-history-player-vol::-webkit-slider-thumb {
  border-color: rgba(12, 40, 22, 0.95);
  background: linear-gradient(180deg, #c8ffd8 0%, #7dfc8a 100%);
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.45), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.mp-audio-history-player-seek::-moz-range-track,
.mp-audio-history-player-vol::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(38, 46, 42, 0.82);
  border: none;
}

.mp-audio-history-player-seek::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8fab, #ff4d6d);
}

.mp-audio-history-player-vol::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(125, 252, 138, 0.75);
}

.mp-audio-history-player-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(55, 12, 24, 0.95);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffb3c6, #ff4d6d);
}

.mp-audio-history-player-vol::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(12, 40, 22, 0.95);
  border-radius: 50%;
  background: linear-gradient(180deg, #c8ffd8, #7dfc8a);
}

.mp-groups-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 10px;
  min-width: 0;
}

.mp-groups-tool-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 8px 4px 7px;
  border-radius: 10px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(5, 10, 14, 0.85);
  color: rgba(200, 255, 210, 0.95);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.mp-groups-tool-btn i {
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}

.mp-groups-tool-btn span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-groups-tool-btn:hover {
  border-color: rgba(125, 252, 138, 0.65);
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.12);
}

.mp-groups-global-wrap {
  margin: 0 0 12px;
  display: grid;
  gap: 6px;
}

.mp-groups-global-wrap .mp-field-label {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.mp-groups-global-results {
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
}

.mp-groups-global-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(143, 211, 255, 0.18);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.mp-groups-global-hit:hover {
  border-color: rgba(125, 252, 138, 0.4);
}

.mp-groups-search-wrap {
  margin: 0 0 10px;
  padding-top: 0;
}

.mp-groups-search-wrap[hidden] {
  display: none !important;
}

.mp-groups-search-wrap .mp-field-input {
  width: 100%;
  min-height: 36px;
  font-size: 12px;
}

.mp-mini-btn,
.mp-mini-btn-primary {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ui-input-border);
  background: rgba(5, 10, 14, 0.85);
  color: var(--text-main);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.mp-mini-btn-primary {
  border-color: rgba(125, 252, 138, 0.45);
  color: var(--green);
}

.mp-groups-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mp-groups-list-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--ui-inset-surface-border);
  background: var(--ui-inset-surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mp-groups-list-item.is-active {
  border-color: rgba(143, 211, 255, 0.14);
  background: rgba(125, 252, 138, 0.03);
  box-shadow: none;
}

.mp-groups-list-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, rgba(125, 252, 138, 0.95), rgba(58, 166, 255, 0.75));
  box-shadow: none;
}

.mp-groups-list li button.mp-groups-list-main,
.mp-groups-list li button {
  width: 100%;
  text-align: left;
  padding: 4px 2px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 10px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.mp-groups-list-desc {
  opacity: 0.75;
  font-size: 9px;
}

.mp-groups-list-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}

.mp-groups-qa {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  flex: none !important;
  min-width: 0;
  min-height: 26px;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  border: 1px solid var(--ui-input-border) !important;
  background: rgba(5, 10, 14, 0.75) !important;
  color: var(--text-main) !important;
  font-size: 7px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center !important;
  cursor: pointer;
  box-sizing: border-box;
  line-height: 1.2;
}

.mp-groups-qa--wide {
  grid-column: 1 / -1;
}

.mp-groups-qa--invite {
  border-color: rgba(125, 252, 138, 0.35) !important;
  color: rgba(125, 252, 138, 0.92) !important;
}

.mp-groups-qa:hover {
  border-color: rgba(143, 211, 255, 0.4) !important;
}

.mp-groups-qa--danger {
  border-color: rgba(255, 110, 110, 0.4) !important;
  color: rgba(255, 170, 170, 0.95) !important;
}

.mp-groups-list li button.is-active {
  border-color: transparent;
  box-shadow: none;
}

.mp-group-hero {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  --group-vibe-hue: 140;
  border: 1px solid rgba(143, 211, 255, 0.14);
  border-radius: 14px;
  background: rgba(6, 12, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Banner header — cover + title overlay */
.mp-group-banner {
  position: relative;
  width: 100%;
  min-height: 112px;
  max-height: 148px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(143, 211, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mp-group-banner-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mp-group-banner-media img,
.mp-group-banner-media .mp-group-cover-img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 0;
}

.mp-group-banner-media .mp-group-cover-empty {
  width: 100%;
  height: 100%;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(8, 24, 28, 0.95), rgba(4, 12, 16, 0.98));
  color: rgba(180, 210, 220, 0.65);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-group-banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}

.mp-group-banner-info {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
}

.mp-group-banner-text {
  min-width: 0;
  flex: 1 1 auto;
}

.mp-group-banner .mp-group-cover-badge {
  z-index: 3;
}

.mp-group-hero::before {
  content: "";
  position: absolute;
  inset: -30% -10%;
  background: radial-gradient(
    circle at 24% 12%,
    hsla(var(--group-vibe-hue), 72%, 48%, 0.14),
    transparent 58%
  );
  pointer-events: none;
  animation: mp-group-vibe-pulse 9s ease-in-out infinite;
  z-index: 0;
}

.mp-group-hero > * {
  position: relative;
  z-index: 1;
}

@keyframes mp-group-vibe-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.mp-group-hero-top {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.mp-group-hero-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 236px;
  min-width: 180px;
}

.mp-group-hero-photos img {
  width: 100%;
  height: 102px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(143, 211, 255, 0.2);
}

.privacy-settings-body {
  max-height: 72vh;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.privacy-sec {
  border: 1px solid rgba(143, 211, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 10, 12, 0.66);
  padding: 12px;
}

.privacy-sec h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.92);
}

.privacy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-main);
  padding: 6px 0;
  border-top: 1px solid rgba(143, 211, 255, 0.12);
}

.privacy-row:first-of-type {
  border-top: none;
}

.privacy-row .privacy-sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-dim);
}

.privacy-select {
  min-width: 164px;
  background: rgba(5, 12, 14, 0.92);
  border: 1px solid rgba(143, 211, 255, 0.24);
  border-radius: 10px;
  color: var(--text-main);
  padding: 5px 8px;
  font-size: 10px;
}

.mp-group-hero-title {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.mp-group-hero-desc {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-dim);
  overflow-wrap: anywhere;
  flex-shrink: 0;
  opacity: 0.82;
}

.mp-group-public-banner {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 200, 120, 0.95);
  background: rgba(255, 160, 40, 0.12);
  border: 1px solid rgba(255, 180, 60, 0.25);
  border-radius: 8px;
}

.mp-group-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  gap: 0;
  margin-top: 2px;
}

.mp-group-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 6px 8px 8px;
  border-radius: 10px;
  border: 1px solid rgba(143, 211, 255, 0.12);
  background: rgba(4, 12, 16, 0.34);
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.mp-group-panel--chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mp-group-panel--feed {
  position: absolute;
  inset: 0;
  z-index: 5;
  flex: none;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(4, 10, 14, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.5);
}

.mp-group-panel--feed[hidden] {
  display: none !important;
}

.mp-group-panel-head--row {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mp-group-panel-head--toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 0 5px;
  margin: 0 0 2px;
  border-bottom: 1px solid rgba(143, 211, 255, 0.1);
  flex-shrink: 0;
}

.mp-group-panel-head--toolbar .mp-group-panel-title {
  margin: 0;
  white-space: nowrap;
}

.mp-group-panel-head--toolbar .mp-group-panel-hint {
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-group-feed-toggle {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.18);
  background: rgba(0, 0, 0, 0.24);
  color: rgba(200, 230, 240, 0.88);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.2;
}

.mp-group-feed-toggle:hover,
.mp-group-feed-toggle.is-active {
  border-color: rgba(125, 252, 138, 0.4);
  color: rgba(220, 255, 230, 0.95);
}

.mp-group-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-shrink: 0;
}

.mp-group-panel-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.9);
  font-weight: 700;
}

.mp-group-panel--chat .mp-group-panel-title {
  font-size: 10px;
  letter-spacing: 0.1em;
}

.mp-group-panel--feed .mp-group-panel-title {
  font-size: 10px;
  color: rgba(180, 210, 220, 0.82);
}

.mp-group-panel-hint {
  margin: 0;
  font-size: 9px;
  line-height: 1.35;
  color: var(--text-dim);
  opacity: 0.62;
}

.mp-group-panel--chat .mp-group-panel-hint {
  font-size: 9px;
  opacity: 0.52;
  line-height: 1.2;
}

.mp-group-panel--feed .mp-group-panel-hint {
  display: none;
}

.mp-group-chat-log {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(143, 211, 255, 0.08);
  font-size: 12px;
  line-height: 1.35;
  scrollbar-gutter: stable;
}

.mp-group-hero-cover-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-bottom: 10px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(58, 166, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.mp-group-hero-photos--clickable {
  cursor: pointer;
}

.mp-group-hero-photos--clickable:focus-visible {
  outline: 2px solid rgba(125, 252, 138, 0.65);
  outline-offset: 2px;
}

.mp-group-cover-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(4, 12, 16, 0.82);
  color: rgba(125, 252, 138, 0.95);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.mp-group-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 6px;
}

.mp-group-hero-title-block {
  min-width: 0;
  flex: 1 1 auto;
}

.mp-group-hero-icon {
  position: static;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(145deg, rgba(8, 24, 28, 0.88), rgba(4, 12, 16, 0.92));
  color: rgba(125, 252, 138, 0.95);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mp-group-hero-icon:empty {
  display: none;
}

.mp-group-hero-meta {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 240, 250, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.mp-group-hero-album {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(143, 211, 255, 0.08);
}

.mp-group-album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mp-group-album-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mp-group-album-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(200, 230, 240, 0.88);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.1;
}

.mp-group-album-action i {
  font-size: 10px;
  opacity: 0.9;
}

.mp-group-album-action:hover {
  border-color: rgba(125, 252, 138, 0.35);
  color: rgba(220, 255, 230, 0.95);
}

.mp-group-album-action--add {
  border-color: rgba(125, 252, 138, 0.22);
}

.mp-group-album-title {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 210, 220, 0.72);
}

.mp-group-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
  min-width: 0;
}

.mp-group-album-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  min-width: 0;
}

.mp-group-album-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(143, 211, 255, 0.18);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mp-group-album-empty {
  font-size: 10px;
  color: var(--text-dim);
  padding: 8px 0;
}

.mp-group-feed {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
  scrollbar-gutter: stable;
}

.mp-group-feed-item {
  position: relative;
  padding: 10px 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 211, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.mp-group-feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mp-group-feed-meta {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 11px;
  opacity: 0.9;
}

.mp-group-feed-when {
  opacity: 0.7;
  font-weight: 400;
}

.mp-group-feed-text {
  display: block;
  margin-top: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-main);
  padding-right: 4px;
}

.mp-group-feed-actions {
  display: flex;
  gap: 4px;
  margin-top: 0;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
}

.mp-feed-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 28px;
  min-height: 26px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.22);
  background: rgba(5, 12, 16, 0.72);
  color: rgba(200, 230, 240, 0.9);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.mp-feed-ico i {
  font-size: 11px;
}

.mp-feed-ico:hover {
  border-color: rgba(143, 211, 255, 0.5);
  background: rgba(20, 40, 48, 0.9);
}

.mp-feed-ico--edit {
  color: rgba(180, 230, 255, 0.95);
}

.mp-feed-ico--del {
  color: rgba(255, 160, 160, 0.95);
  border-color: rgba(255, 120, 120, 0.28);
}

.mp-feed-ico--report {
  color: rgba(255, 210, 140, 0.95);
}

.mp-feed-edit-timer {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: 0.9;
  min-width: 2.2em;
}

.mp-group-compose {
  position: relative;
  bottom: auto;
  z-index: 1;
  margin-top: 8px;
  padding: 10px 0 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(143, 211, 255, 0.1);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mp-group-compose .mp-field-label {
  margin-bottom: 8px;
}

.mp-group-compose-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.mp-group-compose-row .mp-field-input {
  flex: 1;
  min-width: 0;
}

.mp-group-chat {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.mp-group-chat-compose {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  margin-top: 4px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.mp-group-chat-compose .mp-mini-btn,
.mp-group-chat-compose .mp-mini-btn-primary {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 10px;
}

.mp-group-chat-compose .mp-mini-btn i,
.mp-group-chat-compose .mp-mini-btn-primary i {
  font-size: 15px;
  line-height: 1;
}

.mp-group-chat-compose .mp-mini-btn-primary {
  width: auto;
  min-width: 72px;
  padding: 0 10px;
  font-size: 9px;
}

.mp-group-chat-compose .mp-field-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  overflow: hidden;
}

.mp-group-compose-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.mp-group-chat-msg {
  padding: 5px 0;
  border-bottom: 1px solid rgba(143, 211, 255, 0.06);
  font-size: 12px;
  line-height: 1.35;
}

.mp-group-chat-msg:last-child {
  border-bottom: none;
}

.mp-group-create-cover-placeholder img,
.mp-group-create-cover-placeholder .broken,
.mp-group-create-cover-zone::before {
  display: none !important;
}

.mp-group-create-cover-zone {
  overflow: hidden;
}

.mp-group-create-overlay .mp-newchat-window,
.mp-group-invite-overlay .mp-newchat-window,
.mp-group-settings-overlay .mp-newchat-window {
  overflow: visible;
  max-height: none;
}

.mp-group-create-overlay .mp-newchat-window.mp-group-create-window {
  overflow: visible;
  max-height: none;
  height: auto;
}

.mp-group-invite-group-wrap {
  margin: 10px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-group-invite-select {
  width: 100%;
  max-width: 100%;
}

.mp-group-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 120px;
  border-radius: 14px;
  border: 1px dashed rgba(143, 211, 255, 0.28);
  color: rgba(180, 210, 220, 0.7);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
}
.mp-group-chat-video {
  max-height: 240px;
  background: #000;
}

.mp-group-chat-msg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.mp-group-chat-img {
  max-width: min(100%, 300px);
  max-height: min(48vh, 340px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin-top: 6px;
}

.mp-group-chat-when {
  font-size: 9px;
  color: var(--text-dim);
}

.mp-group-chat-who {
  font-weight: 700;
  font-size: 11px;
  color: rgba(125, 252, 138, 0.88);
  margin-right: 6px;
}

.mp-group-chat-text {
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  color: var(--text-main);
}

.mp-chat-emoji {
  font-size: 1.35em;
  line-height: 1;
  vertical-align: -0.08em;
}

.chat-media-reaction-wrap {
  margin-top: 4px;
  max-width: 100%;
}

.chat-media-reaction-wrap > .chat-media-reactions {
  margin-top: 6px;
}

.chat-media-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.chat-media-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.2);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-main);
  font-size: 10px;
  cursor: pointer;
  line-height: 1;
}

.chat-media-reaction-btn:hover {
  border-color: rgba(125, 252, 138, 0.35);
}

.chat-media-reaction-btn.is-active {
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(125, 252, 138, 0.16);
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.22);
}

.chat-media-reaction-ico {
  font-size: 13px;
}

.chat-media-reaction-n {
  font-size: 10px;
  font-weight: 700;
  min-width: 10px;
  color: rgba(200, 230, 210, 0.92);
}

.msg-bubble .chat-media-reaction-wrap {
  margin-top: 6px;
}

.msg-bubble .chat-media-reaction-wrap img,
.msg-bubble .chat-media-reaction-wrap video {
  margin-top: 0;
}

.mp-group-settings-mute {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-dim);
  cursor: pointer;
}

.mp-group-settings-mute input {
  margin-top: 2px;
}

.mp-group-settings-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-group-delete-btn {
  border-color: rgba(255, 110, 110, 0.45) !important;
  color: rgba(255, 170, 170, 0.95) !important;
}

body.mp-group-modal-open {
  overflow: hidden !important;
}

body.mp-group-modal-open .mnm-cscroll-overlay {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.mp-group-modal-open .my-page-center .my-page-view.my-page-view-active,
body.mp-group-modal-open .my-page-right .my-page-side.my-page-side-active {
  overflow: hidden !important;
}

.mp-group-create-overlay .mp-group-create-window,
.mp-group-invite-overlay .mp-group-invite-window {
  width: min(480px, calc(100% - 28px));
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 14px 16px 12px;
  border: 1px solid rgba(143, 211, 255, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mp-group-create-overlay .mp-group-create-window {
  overflow: visible;
}

.mp-group-create-head {
  flex-shrink: 0;
  padding-right: calc(var(--ui-chrome-size) + 8px);
}

.mp-group-create-fields {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
}

.mp-group-create-cover-zone {
  min-height: 88px;
}

.mp-group-create-cover-zone.has-cover {
  min-height: 100px;
}

.mp-group-create-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 2px 0;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid rgba(143, 211, 255, 0.1);
}

.mp-group-create-actions .btn-main,
.mp-group-create-actions .mp-group-create-btn {
  width: 100%;
  max-width: 100%;
  margin: 0;
  justify-content: center;
  text-align: center;
  min-height: 40px;
}

.mp-group-create-actions .mp-group-action-link {
  align-self: center;
}

.mp-group-create-invite-panel {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mp-group-create-invite-panel[hidden] {
  display: none !important;
}

.mp-group-create-invite-panel .mp-group-pick-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(28vh, 220px);
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0;
}

.mp-group-create-overlay #mpGroupCreateInviteToggle.is-active {
  color: rgba(125, 252, 138, 0.95);
}

.mp-group-invite-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  padding: 2px 0;
  border: none;
  background: none;
  color: rgba(143, 211, 255, 0.9);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  align-self: flex-start;
  flex-shrink: 0;
}

.mp-group-invite-link:hover,
.mp-group-invite-link.is-active {
  color: rgba(125, 252, 138, 0.95);
}

.mp-group-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: rgba(143, 211, 255, 0.82);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  min-height: auto;
}

.mp-group-action-link:hover {
  color: rgba(125, 252, 138, 0.92);
}

.mp-group-invite-overlay .mp-group-invite-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: calc(var(--ui-chrome-size) + 8px);
  margin-bottom: 10px;
}

.mp-group-invite-overlay .mp-group-invite-picker {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  scrollbar-gutter: stable;
}

.mp-group-invite-overlay .mp-group-invite-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(143, 211, 255, 0.1);
}

.mp-group-invite-overlay .mp-group-invite-actions .btn-main {
  width: 100%;
  min-height: 40px;
}

.mp-group-invite-overlay .mp-group-pick-scroll {
  margin-top: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.mp-group-pick-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(143, 211, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

.mp-group-pick-row {
  display: grid;
  grid-template-columns: 16px 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(120, 160, 130, 0.14);
  cursor: pointer;
  transition: background 0.12s ease;
}

.mp-group-pick-row:last-child {
  border-bottom: none;
}

.mp-group-pick-row:hover {
  background: rgba(58, 166, 255, 0.08);
}

.mp-group-pick-check {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--blue);
}

.mp-group-pick-av {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(143, 211, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
}

.mp-group-pick-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-group-pick-empty {
  padding: 10px 12px;
  font-size: 10px;
  color: var(--text-dim);
}

.mp-group-create-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 6px;
}

.mp-group-create-fields .mp-field-label {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-olive);
}

.mp-group-create-input,
.mp-group-create-window .mp-field-input,
.mp-group-create-window .mp-field-textarea,
.mp-group-create-panel .auth-input,
.mp-group-create-panel .mp-group-create-input {
  min-height: 42px;
  padding: 12px 14px;
  font-size: 13px;
  border-radius: 12px;
  margin: 0;
}

.mp-group-create-window .mp-field-textarea,
.mp-group-create-panel textarea.mp-group-create-input {
  min-height: 88px;
  resize: vertical;
}

.mp-group-create-cover-zone {
  position: relative;
  display: block;
  min-height: 88px;
  border-radius: 12px;
  border: 1px dashed rgba(143, 211, 255, 0.28);
  background: rgba(5, 12, 18, 0.55);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 2px;
}

.mp-group-create-cover-zone:hover,
.mp-group-create-cover-zone:focus-visible {
  border-color: rgba(125, 252, 138, 0.45);
  outline: none;
}

.mp-group-create-cover-zone.has-cover {
  border-style: solid;
  min-height: 100px;
}

.mp-group-create-cover-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-group-create-cover-preview[hidden] {
  display: none !important;
}

.mp-group-create-cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
  pointer-events: none;
}

.mp-group-create-cover-zone.has-cover .mp-group-create-cover-placeholder {
  display: none;
}

.mp-group-create-cover-fab {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(125, 252, 138, 0.5);
  background: rgba(4, 12, 16, 0.88);
  color: rgba(125, 252, 138, 0.95);
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.mp-group-create-window {
  display: flex;
  flex-direction: column;
  max-height: none;
}

.mp-group-create-fields {
  flex-shrink: 0;
  overflow: visible;
  padding-right: 0;
}

.mp-group-create-window .mp-field-textarea,
.mp-group-create-panel textarea.mp-group-create-input {
  min-height: 64px;
  resize: vertical;
}

.mp-group-create-cover-placeholder i {
  font-size: 22px;
  opacity: 0.85;
}

.mp-group-create-invite-label {
  margin-top: 12px !important;
  margin-bottom: 6px !important;
}

.mp-group-create-actions .btn-main,
.mp-group-create-btn {
  padding: 10px 16px;
  font-size: 12px;
}

.mp-group-create-app-overlay .mp-group-create-panel {
  max-width: min(560px, calc(100vw - 28px));
}

.mp-group-invite-card {
  padding: 12px;
  margin-top: 10px;
}

.mp-group-invite-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-olive);
}

.mp-group-invite-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.mp-group-invite-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.mp-friend-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mp-friend-feed-note {
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-dim);
  max-width: 46ch;
}

.mp-friend-feed-note strong {
  color: rgba(200, 230, 210, 0.9);
  font-weight: 600;
}

.friend-row {
  cursor: pointer;
}

.friend-row.is-selected,
.friend-row.friend-row--selected {
  border-color: rgba(160, 255, 185, 0.72) !important;
  background: linear-gradient(165deg, rgba(16, 36, 28, 0.98), rgba(7, 16, 14, 0.99)) !important;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 10px 22px rgba(0, 0, 0, 0.45),
    0 8px 18px rgba(125, 252, 138, 0.18),
    0 2px 0 rgba(190, 255, 210, 0.28) !important;
}

.friend-row.friend-row--new:not(.is-selected):not(.friend-row--selected) {
  border-color: rgba(125, 252, 138, 0.28) !important;
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.12),
    0 0 10px rgba(125, 252, 138, 0.08) !important;
  animation: none;
}

@keyframes mnm-friend-new-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(125, 252, 138, 0.55),
      0 0 18px rgba(125, 252, 138, 0.35),
      0 0 28px rgba(53, 200, 255, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(157, 255, 176, 0.9),
      0 0 26px rgba(125, 252, 138, 0.55),
      0 0 36px rgba(53, 200, 255, 0.28);
  }
}

/* ============================
   MY PAGE: DATING (demo)
   ============================ */
.dating-card {
  padding: 14px;
}

.dating-stage-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-height: 360px;
}

.dating-photo-nav {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 6px 4px;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(200, 240, 255, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transform: none !important;
  transition: color 0.18s ease, text-shadow 0.18s ease, filter 0.18s ease;
}

.dating-photo-nav i {
  font-size: 18px;
  pointer-events: none;
}

.dating-photo-nav:hover:not(:disabled),
.dating-photo-nav:focus-visible:not(:disabled) {
  color: rgba(255, 255, 255, 1);
  text-shadow:
    0 0 10px rgba(90, 220, 255, 0.95),
    0 0 18px rgba(54, 184, 255, 0.55);
  filter: drop-shadow(0 0 6px rgba(90, 220, 255, 0.45));
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.dating-photo-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dating-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 360px;
  border-radius: 18px;
  border: 1px solid rgba(143, 211, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.dating-profile {
  position: relative;
  height: min(420px, 52vh);
  min-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.dating-photo {
  flex: 1 1 auto;
  background: radial-gradient(1200px 500px at 30% 20%, rgba(125, 252, 138, 0.18), transparent 55%),
    radial-gradient(900px 420px at 80% 80%, rgba(58, 166, 255, 0.16), transparent 55%),
    rgba(0, 0, 0, 0.22);
}

.dating-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

.dating-photo img.is-placeholder {
  object-fit: contain;
  padding: 18px 12px 42px;
  filter: saturate(1.08) contrast(1.04);
  background: radial-gradient(900px 420px at 50% 35%, rgba(125, 252, 138, 0.08), transparent 60%),
    rgba(0, 0, 0, 0.28);
}

.dating-glass {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.dating-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 217, 90, 0.92);
  text-shadow: 0 0 18px rgba(255, 217, 90, 0.18);
  font-size: 14px;
}

.dating-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  color: rgba(213, 221, 213, 0.85);
}

.dating-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.18);
  background: rgba(0, 0, 0, 0.18);
}

.dating-chip--spark {
  border-color: rgba(255, 217, 90, 0.35);
  background: rgba(255, 217, 90, 0.08);
  color: rgba(255, 235, 170, 0.95);
  box-shadow: 0 0 14px rgba(255, 217, 90, 0.12);
}

.mp-dating-advanced {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(143, 211, 255, 0.12);
}

.mp-dating-advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: rgba(200, 240, 255, 0.88);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.mp-dating-advanced-toggle i {
  font-size: 10px;
  opacity: 0.75;
  transition: transform 0.18s ease;
}

.mp-dating-advanced.is-open .mp-dating-advanced-toggle i {
  transform: rotate(180deg);
}

.mp-dating-advanced-panel {
  display: none;
  padding: 4px 0 2px;
  gap: 8px;
}

.mp-dating-advanced.is-open .mp-dating-advanced-panel {
  display: flex;
  flex-direction: column;
}

.mp-dating-advanced-hint {
  margin: 0 0 4px;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(175, 205, 190, 0.68);
}

.dating-about {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(213, 221, 213, 0.72);
  line-height: 1.35;
  max-width: 92%;
}

.dating-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dating-btn {
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(143, 211, 255, 0.18);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(213, 221, 213, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.dating-btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(125, 252, 138, 0.26);
}

.dating-btn-pass {
  color: rgba(255, 255, 255, 0.85);
}

.dating-btn-pass i {
  color: rgba(255, 64, 96, 0.9);
}

.dating-btn-like i {
  color: rgba(125, 252, 138, 0.95);
}

.dating-hint {
  margin-top: 10px;
  font-size: 9px;
  color: rgba(213, 221, 213, 0.6);
}

#myPageViewDating.my-page-view-active {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 12px;
  box-sizing: border-box;
}

#myPageViewDating .my-page-section-sub {
  flex-shrink: 0;
}

#myPageViewDating .dating-card {
  width: 100%;
  max-width: min(460px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100% - 6px);
  overflow: hidden;
  box-sizing: border-box;
}

#myPageViewDating .dating-stage-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

#myPageViewDating .dating-stage {
  flex: 1 1 auto;
  min-height: 240px;
  height: 100%;
  max-height: 100%;
  width: 100%;
  aspect-ratio: auto;
}

#myPageViewDating .dating-profile {
  height: 100%;
  min-height: 0;
}

#myPageViewDating .dating-actions,
#myPageViewDating .dating-hint {
  flex-shrink: 0;
}

.dating-empty {
  padding: 14px 16px;
  color: rgba(213, 221, 213, 0.78);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.dating-swipe-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(125, 252, 138, 0.95);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-8deg) scale(0.98);
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
}

.dating-swipe-badge.is-pass {
  border-color: rgba(255, 64, 96, 0.28);
  color: rgba(255, 64, 96, 0.95);
  transform: rotate(10deg) scale(0.98);
  left: auto;
  right: 14px;
}

.dating-swipe-badge.is-on {
  opacity: 1;
  transform: rotate(-8deg) scale(1);
}

.dating-swipe-badge.is-pass.is-on {
  transform: rotate(10deg) scale(1);
}

/* Match overlay */
.match-overlay {
  position: absolute;
  inset: 0;
  z-index: 9999;
}

.match-overlay[hidden] {
  display: none;
}

.match-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 420px at 50% 40%, rgba(255, 217, 90, 0.10), transparent 55%),
    rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.match-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 28px));
  border-radius: 18px;
  border: 1px solid rgba(143, 211, 255, 0.2);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  padding: 16px 16px 14px;
  overflow: hidden;
}

.match-burst {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 90deg,
    rgba(255, 217, 90, 0.0),
    rgba(255, 217, 90, 0.18),
    rgba(125, 252, 138, 0.12),
    rgba(58, 166, 255, 0.12),
    rgba(255, 64, 96, 0.10),
    rgba(255, 217, 90, 0.0)
  );
  filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.7);
}

.match-burst.is-active {
  animation: matchBurstOnce 1.6s ease-out forwards;
}

@keyframes matchBurstOnce {
  0% {
    opacity: 0;
    transform: scale(0.65) rotate(0deg);
  }
  25% {
    opacity: 0.62;
    transform: scale(1) rotate(90deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.15) rotate(220deg);
  }
}

.match-close {
  position: absolute;
  z-index: 2;
  cursor: pointer;
}

.match-title {
  position: relative;
  z-index: 2;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 217, 90, 0.95);
  text-shadow: 0 0 22px rgba(255, 217, 90, 0.22);
  margin-top: 6px;
}

.match-sub {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  text-align: center;
  font-size: 10px;
  color: rgba(213, 221, 213, 0.78);
}

.match-avatars {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.match-hero {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  min-height: 210px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.72) 100%),
    radial-gradient(120% 80% at 50% 20%, rgba(255, 64, 96, 0.18), transparent 55%);
  border: 1px solid rgba(255, 64, 96, 0.18);
  box-shadow: inset 0 0 40px rgba(255, 64, 96, 0.08);
}

.match-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.match-hero-photos {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 16px 8px;
}

.match-heart-bridge {
  position: relative;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ff3d6e;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 100, 130, 0.35);
  box-shadow: 0 0 18px rgba(255, 64, 96, 0.35);
  font-size: 14px;
  margin: 0 -8px;
  animation: matchHeartPop 0.55s ease-out 0.15s both;
}

@keyframes matchHeartPop {
  0% { transform: scale(0.2); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.match-hero-actions {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 12px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.match-hero-btn {
  min-width: 132px;
  font-size: 10px;
}

.match-hero-btn:disabled,
.match-hero-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.match-actions--secondary {
  margin-top: 10px;
}

.match-actions--secondary .btn-ghost--sm {
  font-size: 9px;
  padding: 6px 10px;
}

.match-av {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(125, 252, 138, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.18);
}

.match-av-them {
  border-color: rgba(255, 64, 96, 0.22);
}

.match-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.match-actions {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================
   MY PAGE: NEW CHAT overlay
   ============================ */
.mp-newchat-overlay {
  position: absolute;
  inset: 0;
  z-index: 9999;
}

.mp-newchat-overlay--global {
  position: fixed;
  inset: 0;
  z-index: 12050;
}

.mp-newchat-overlay[hidden] {
  display: none;
}

.mp-newchat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
}

.mp-newchat-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 28px));
  max-height: min(70vh, 560px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(143, 211, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
  padding: 14px 10px 14px 14px;
}

.mp-newchat-close {
  position: absolute;
  z-index: 2;
  cursor: pointer;
}

.mp-newchat-title {
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 217, 90, 0.92);
  text-shadow: 0 0 22px rgba(255, 217, 90, 0.18);
}

.mp-newchat-sub {
  margin-top: 6px;
  font-size: 10px;
  color: rgba(213, 221, 213, 0.72);
}

.mp-newchat-list {
  margin-top: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 10px;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.mp-newchat-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(125, 252, 138, 0.18);
  background: rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.mp-newchat-item:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.20);
  border-color: rgba(125, 252, 138, 0.26);
}

.mp-newchat-av {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(143, 211, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(143, 211, 255, 0.9);
  font-weight: 900;
}

.mp-newchat-meta {
  display: grid;
  gap: 2px;
}

.mp-newchat-name {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.mp-newchat-subline {
  font-size: 10px;
  color: rgba(213, 221, 213, 0.7);
}

.mp-newchat-pill {
  font-size: 9px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.16);
  color: rgba(143, 211, 255, 0.85);
  background: rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

/* View switching (center) */

.my-page-view {
  display: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.my-page-view.my-page-view-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Right side switching */

.my-page-side {
  display: none;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.my-page-side.my-page-side-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Dialog list (right) */

.avatar-circle.avatar-circle-xs {
  width: 22px;
  height: 22px;
  overflow: hidden;
}

.msg-dialog-avatar--lg {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  min-height: 56px;
  font-size: 15px;
  overflow: hidden;
  flex-shrink: 0;
}

.msg-dialog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.msg-dialog-counts {
  font-size: 10px;
  color: rgba(150, 175, 190, 0.82);
  letter-spacing: 0.02em;
}
.msg-dialog-counts-total {
  color: rgba(150, 175, 190, 0.82);
}

.msg-dialog-archived-tag {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.msg-dialog-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.msg-dialog-country {
  font-size: var(--font-xs);
  color: var(--text-dim);
}

.message-dialogs,
.my-page-side-section,
.my-page-card,
.my-page-nav {
  font-size: 11px;
}

.message-dialogs .msg-dialog-name {
  font-size: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.25;
  max-height: 2.6em;
}

.message-dialogs .msg-dialog-country,
.message-dialogs .msg-dialog-meta,
.message-dialogs .msg-dialog-time {
  font-size: 10px;
}

/* Dialogs: стеклянный список (в стиле MY PAGE) */
.message-dialogs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--my-page-dialogs-header-border);
  background: var(--my-page-dialogs-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--my-page-dialogs-header-shadow);
}

.message-dialogs-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.message-archived-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(3, 8, 6, 0.7);
  color: rgba(160, 190, 205, 0.9);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.message-archived-btn.is-active,
.message-archived-btn:hover,
.message-archived-btn:focus-visible {
  border-color: rgba(143, 211, 255, 0.42);
  color: rgba(210, 230, 240, 0.95);
  background: rgba(8, 16, 20, 0.82);
}

.message-dialog-item.is-archived .msg-dialog-name {
  opacity: 0.82;
}

.msg-chat-load-older-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}

.msg-chat-load-older {
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(6, 14, 18, 0.82);
  color: rgba(190, 220, 235, 0.92);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.msg-chat-load-older:hover,
.msg-chat-load-older:focus-visible {
  border-color: rgba(125, 252, 138, 0.42);
  background: rgba(8, 18, 14, 0.92);
}

.message-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(3, 8, 6, 0.7);
  color: rgba(125, 252, 138, 0.85);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-sizing: border-box;
}

.message-dialogs-search {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--my-page-search-border);
  background: var(--my-page-search-bg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-dialogs-search i {
  color: var(--my-page-nav-item-icon);
}

.message-dialogs-search input {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 11px;
}

.message-dialogs {
  min-width: 0;
  max-width: 100%;
}

.message-dialogs-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 0;
}

.message-dialog-item {
  position: relative;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--my-page-dialog-item-border);
  background: var(--my-page-dialog-item-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--my-page-dialog-item-shadow);
  padding: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.msg-dialog-main {
  min-width: 0;
}

.msg-dialog-text {
  min-width: 0;
}

.msg-dialog-name,
.msg-dialog-country,
.msg-dialog-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-left: 66px;
  min-height: 22px;
}

.message-dialog-item .msg-dialog-time {
  position: static;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: rgba(150, 175, 190, 0.75);
}

.msg-dialog-pin {
  position: static;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  align-self: auto;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(160, 190, 205, 0.55);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.msg-dialog-pin.is-pinned,
.msg-dialog-pin:hover,
.msg-dialog-pin:focus-visible {
  color: rgba(100, 190, 120, 0.92);
  background: rgba(72, 158, 95, 0.14);
}

.msg-dialog-pin.is-pinned i,
.map-chat-dock-row--pinned .map-chat-dock-pin i,
.map-chat-dock-pin.is-pinned i {
  color: rgba(100, 200, 125, 0.95);
  filter: drop-shadow(0 0 4px rgba(72, 158, 95, 0.45));
  text-shadow: none;
}

.map-chat-dock-pin.is-pinned,
.map-chat-dock-row--pinned .map-chat-dock-pin {
  color: rgba(100, 190, 120, 0.92);
}

.msg-dialog-pin.is-pinned {
  box-shadow: 0 0 8px rgba(72, 158, 95, 0.2);
}

.friend-av--online.msg-dialog-avatar,
.friend-av--online.map-chat-dock-av,
.friend-av--online.friend-row-avatar {
  box-shadow:
    0 0 0 2px rgba(8, 14, 12, 0.92),
    0 0 0 3px rgba(72, 158, 95, 0.72) !important;
}

.friend-av--offline.msg-dialog-avatar,
.friend-av--offline.map-chat-dock-av,
.friend-av--offline.friend-row-avatar {
  box-shadow:
    0 0 0 2px rgba(8, 14, 12, 0.92),
    0 0 0 3px rgba(185, 58, 58, 0.78) !important;
}

.message-dialog-item.active {
  border-color: var(--my-page-dialog-active-border);
  background: var(--my-page-dialog-active-bg);
  box-shadow: var(--my-page-dialog-item-active-shadow);
}

/* Chat input: стеклянная капсула */

.message-chat-input {
  border-top: 1px solid rgba(80, 120, 90, 0.7);
  padding-top: 6px;
  margin-top: 4px;
}

.msg-input-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

.msg-input-row > * {
  min-width: 0;
}

/* Glass buttons */

.msg-input-btn {
  border-radius: 50%;
  border: 1px solid var(--my-page-msg-input-btn-border);
  background: var(--my-page-msg-input-btn-bg);
  color: var(--my-page-msg-input-btn-color);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  box-shadow: none;
}

.msg-input-send {
  border-color: var(--my-page-msg-input-btn-send-border);
  color: var(--my-page-msg-input-btn-send-color);
}

/* Message input cloud (textarea + icons inside) */

.msg-input-cloud {
  position: relative;
  width: 100%;
  min-height: 40px;
  max-height: none;
  border-radius: 18px;
  border: 1px solid var(--my-page-msg-input-cloud-border);
  background: var(--my-page-msg-input-cloud-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 6px 6px 4px;
  gap: 4px;
}

.msg-input-cloud:focus-within {
  border-color: var(--my-page-msg-input-cloud-focus-border);
  box-shadow: var(--my-page-msg-input-cloud-focus-shadow);
}

.my-page-shell .msg-input-cloud:focus-within {
  border-color: var(--my-page-msg-input-cloud-focus-border);
  box-shadow: var(--my-page-msg-input-cloud-focus-shadow);
}

.message-chat-input textarea#msgInput {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-sm);
  padding: 8px 72px 6px 10px;
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.42;
  font-size: 14px;
}

.msg-input-cloud-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 2px 2px;
  min-height: 0;
}

.msg-polish-btn {
  position: static;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(220, 235, 255, 0.92);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.msg-polish-btn i {
  color: rgba(255, 217, 120, 0.95);
  font-size: 11px;
}

.msg-polish-btn.is-soon,
.msg-cloud-btn.is-soon {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.msg-polish-btn.is-soon:hover,
.msg-cloud-btn.is-soon:hover {
  opacity: 0.55;
}

.mnm-polish-preview {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 8px);
  z-index: 40;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(8, 16, 14, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: rgba(230, 240, 255, 0.95);
  font-size: 12px;
  line-height: 1.35;
}

.msg-input-wrap,
.msg-input-cloud,
.mp-field-polish-host {
  position: relative;
}

.mnm-polish-preview__head {
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: rgba(180, 230, 255, 0.95);
}

.mnm-polish-preview__variants {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.mnm-polish-preview__var {
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(20, 36, 32, 0.9);
  color: rgba(210, 235, 255, 0.9);
  cursor: pointer;
  font-weight: 700;
}

.mnm-polish-preview__var.is-active {
  border-color: rgba(120, 220, 180, 0.7);
  background: rgba(40, 90, 70, 0.85);
}

.mp-group-chat-polish {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mp-group-chat-compose,
.mp-group-compose-row {
  position: relative;
}

.mnm-polish-preview__row + .mnm-polish-preview__row {
  margin-top: 8px;
}

.mnm-polish-preview__k {
  display: block;
  opacity: 0.65;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.mnm-polish-preview__v {
  max-height: 72px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.mnm-polish-preview__v--after {
  border: 1px solid rgba(120, 220, 160, 0.28);
  background: rgba(40, 90, 60, 0.18);
}

.mnm-polish-preview__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mnm-polish-preview__btn {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 11px;
  font-weight: 650;
  padding: 6px 10px;
  cursor: pointer;
}

.mnm-polish-preview__btn--apply {
  border-color: rgba(120, 220, 160, 0.4);
  background: rgba(40, 110, 70, 0.45);
}

.mp-field-polish-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ui-mp-field-polish-border);
  background: var(--ui-mp-field-polish-bg);
  color: var(--ui-mp-field-polish-color);
  font-size: 11px;
  cursor: pointer;
}

.mp-field-polish-btn:hover {
  border-color: var(--ui-mp-field-polish-hover-border);
}

/* Ring on .msg-input-cloud:focus-within only — avoids a second square ring on the textarea */
.message-chat-input textarea#msgInput:focus-visible {
  box-shadow: none !important;
}

.msg-input-cloud > textarea#msgInput {
  position: relative;
  z-index: 0;
}

.msg-cloud-actions {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  pointer-events: auto;
}

.msg-cloud-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(143, 211, 255, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-cloud-btn:hover {
  border-color: rgba(125, 252, 138, 0.45);
  color: rgba(125, 252, 138, 0.95);
}

.message-chat-input textarea::placeholder {
  color: var(--text-dim);
}

.msg-input-hint {
  font-size: 9px;
  color: var(--text-dim);
  opacity: 0.85;
  margin-top: 2px;
}

/* Chat center layout */

.message-center-card .my-page-card-body.message-center-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

/* Log: styles unified above (.message-chat-log) */

/* Rows */

.msg-row {
  display: flex;
  margin-bottom: 6px;
  min-width: 0;
  position: relative;
}

.msg-row-in {
  justify-content: flex-start;
}

.msg-row-out {
  justify-content: flex-end;
}

/* Glass bubbles (base) */

.msg-bubble {
  max-width: 82%;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(80, 120, 90, 0.7);
  position: relative;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: visible;
  min-width: 0;
}

.msg-bubble img,
.msg-bubble video,
.msg-bubble audio {
  max-width: 100%;
}

/* Incoming: cold glass */

.msg-bubble-in {
  background: var(--ui-msg-bubble-in-bg);
  border-color: var(--ui-msg-bubble-in-border);
  box-shadow: var(--ui-msg-bubble-in-shadow);
}

/* Outgoing: green glass */

.msg-bubble-out {
  background: var(--ui-msg-bubble-out-bg);
  border-color: var(--ui-msg-bubble-out-border);
  box-shadow: var(--ui-msg-bubble-out-shadow);
}

/* Хвосты пузырей — аккуратные треугольники */

.msg-bubble-in::before,
.msg-bubble-out::before {
  display: none;
}

.msg-bubble-in::after,
.msg-bubble-out::after {
  content: none;
  display: none;
}

.msg-meta {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.msg-text {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

/* Compact chat audio — low height, long seek bar */
.chat-audio-player {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(300px, 100%);
  min-width: 210px;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.msg-bubble .chat-audio-player {
  width: min(320px, calc(100vw - 120px));
}

.chat-audio-player-play {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 105, 180, 0.55);
  background: rgba(255, 105, 180, 0.15);
  color: #ff8fc0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 10px;
}

.chat-audio-player.is-broken .chat-audio-player-play {
  border-color: rgba(255, 120, 100, 0.7);
  color: #ffb0a0;
  opacity: 0.85;
}

.chat-friend-pick-sep {
  padding: 6px 10px 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  color: var(--text-dim, #9ab);
}

.chat-friend-pick-item--nodus {
  border: 1px solid rgba(120, 200, 255, 0.35);
  background: rgba(60, 120, 180, 0.18);
}

.chat-audio-player-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-audio-player-label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  line-height: 1;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.chat-audio-time-sep {
  opacity: 0.55;
}

.chat-audio-player-seek {
  width: 100%;
  height: 5px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  --seek-pct: 0%;
  background: linear-gradient(
    to right,
    #ff6b9d var(--seek-pct),
    rgba(255, 255, 255, 0.14) var(--seek-pct)
  );
}

.chat-audio-player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8fc0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 6px rgba(255, 105, 180, 0.55);
}

.chat-audio-player-seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8fc0;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.chat-audio-player-vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 1px;
}

.chat-audio-player-vol-label {
  flex: 0 0 30px;
  font-size: 8px;
  color: var(--text-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chat-audio-player-vol {
  flex: 1 1 auto;
  min-width: 0;
  height: 4px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  cursor: pointer;
  --vol-pct: 100%;
  background: linear-gradient(
    to right,
    #7ab8ff var(--vol-pct),
    rgba(255, 255, 255, 0.12) var(--vol-pct)
  );
}

.chat-audio-player-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9fd0ff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.chat-audio-player-vol::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9fd0ff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.map-mini-msg .chat-audio-player {
  min-width: 180px;
  width: min(260px, 100%);
}

/* Message multi-select + forward */
.msg-row.is-select-mode {
  padding-left: 30px;
}

.map-mini-msg-row.is-select-mode {
  padding-left: 28px;
}

.msg-select-check {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(140, 190, 255, 0.75);
  background: rgba(0, 0, 0, 0.35);
  padding: 0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.msg-row.is-select-mode .msg-select-check {
  display: inline-flex;
}

.msg-select-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease;
}

.msg-select-check[aria-checked="true"] {
  border-color: rgba(125, 252, 138, 0.95);
  background: rgba(80, 200, 130, 0.25);
}

.msg-select-check[aria-checked="true"] .msg-select-dot {
  background: #7dfc8a;
  box-shadow: 0 0 8px rgba(125, 252, 138, 0.65);
}

.msg-row.is-selected .msg-bubble,
.msg-row.is-selected .map-mini-msg {
  outline: 1px solid rgba(125, 252, 138, 0.75);
  outline-offset: 2px;
}

.chat-forward-pop {
  position: fixed;
  z-index: 15050;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(80, 120, 90, 0.65);
  background: rgba(12, 22, 18, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  min-width: 170px;
  pointer-events: auto;
}

.chat-forward-pop[hidden] {
  display: none !important;
}

.chat-forward-pop-btn {
  border: 1px solid rgba(80, 120, 90, 0.45);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-forward-pop-btn:hover {
  border-color: rgba(58, 166, 255, 0.55);
  color: var(--blue);
}

.chat-forward-pop-btn--ghost {
  opacity: 0.75;
}

.chat-forward-pop-btn--danger {
  border-color: rgba(255, 90, 110, 0.45);
  color: rgba(255, 170, 180, 0.95);
}

.chat-forward-pop-btn--danger:hover {
  border-color: rgba(255, 90, 110, 0.75);
  color: #ff8a9a;
  background: rgba(80, 16, 28, 0.35);
}

.chat-friend-pick-pop {
  position: fixed;
  z-index: 15060;
  width: min(260px, calc(100vw - 24px));
  max-height: min(360px, 70vh);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(80, 120, 90, 0.65);
  background: rgba(10, 18, 14, 0.98);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  padding: 8px;
  pointer-events: auto;
}

.chat-friend-pick-pop[hidden] {
  display: none !important;
}

.chat-friend-pick-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 4px 6px 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-friend-pick-item {
  width: 100%;
  border: 1px solid rgba(80, 120, 90, 0.35);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-friend-pick-item:hover {
  border-color: rgba(58, 166, 255, 0.5);
}

.chat-friend-pick-name {
  font-size: 12px;
  font-weight: 600;
}

.chat-friend-pick-sub {
  font-size: 10px;
  color: var(--text-dim);
}

.chat-friend-pick-item--timer .chat-friend-pick-name i {
  color: #ffb347;
  margin-right: 4px;
}

.chat-friend-pick-pop--timer {
  width: min(132px, calc(100vw - 16px));
  max-height: min(220px, 38vh);
  padding: 4px;
}

.chat-friend-pick-pop--timer .chat-friend-pick-title {
  font-size: 9px;
  padding: 2px 6px 4px;
}

.chat-friend-pick-item--compact {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 8px;
  margin-bottom: 2px;
  min-height: 0;
}

.chat-friend-pick-item--compact i {
  font-size: 10px;
  color: #ffb347;
  width: 12px;
  flex-shrink: 0;
}

.chat-friend-pick-item--compact span {
  font-size: 11px;
  font-weight: 600;
}

/* Chat guest pill — compact premium single-line bar */
.msg-chat-guest-bar,
.map-mini-chat-guest-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 26px;
  width: 100%;
}

.msg-chat-guest-bar--inline,
.map-chat-guest-strip .msg-chat-guest-bar {
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.msg-chat-peer-col .msg-chat-guest-bar {
  margin-top: 0;
  width: 100%;
}

.map-mini-chat-guest-bar {
  width: 100%;
  margin-top: 0;
}

.map-mini-chat-guests-row {
  display: none !important;
}

.map-mini-chat-head-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.map-mini-chat-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.map-mini-chat-call-row {
  display: none !important;
}

.map-mini-chat-call-ic {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.92;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease,
    filter 0.16s ease;
}

.map-mini-chat-call-ic--audio {
  color: #ff5c5c;
}

.map-mini-chat-call-ic--video {
  color: #7dfc8a;
}

.map-mini-chat-call-ic:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px currentColor);
}

.map-mini-chat--nodus .map-mini-chat-head-tools .map-mini-chat-call-ic {
  display: none;
}

.map-mini-chat-avatar {
  width: 108px;
  height: 108px;
  min-width: 108px;
  min-height: 108px;
}

.map-chat-guest-strip .msg-guest-bar-inline-list {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.chat-guest-strip.map-chat-guest-strip {
  display: block !important;
  padding: 5px 10px;
  background: linear-gradient(90deg, rgba(255, 120, 40, 0.32), rgba(255, 80, 30, 0.12));
  border-bottom: 1px solid rgba(255, 180, 80, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.15);
}

.chat-guest-strip.map-chat-guest-strip[hidden] {
  display: none !important;
}

.msg-guest-bar-label {
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-guest-bar-label-color);
  font-weight: 800;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.msg-guest-bar-inline-list {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  gap: 0;
}

.msg-guest-comma {
  color: rgba(255, 200, 140, 0.55);
  font-size: 10px;
  font-weight: 600;
  margin: 0 1px;
}

.msg-chat-guest-strip .msg-chat-guest-bar,
.map-chat-guest-strip .msg-chat-guest-bar {
  width: 100%;
  align-items: center;
}

.msg-chat-guest-strip {
  display: block;
  padding: 5px 10px;
  background: linear-gradient(90deg, rgba(255, 120, 40, 0.3), rgba(255, 80, 30, 0.12));
  border-bottom: 1px solid rgba(255, 180, 80, 0.42);
}

.msg-guest-bar-chips {
  display: none;
}

.msg-guest-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 140, 60, 0.1);
  border: 1px solid rgba(255, 180, 100, 0.35);
  color: var(--ui-guest-chip-color);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  max-width: none;
  vertical-align: middle;
}

.msg-guest-chip--compact,
.msg-guest-chip--inline {
  padding: 1px 12px 1px 7px;
  font-size: 9px;
  background: transparent;
  border-color: transparent;
}

.msg-guest-chip--timed.msg-guest-chip--inline {
  padding: 1px 14px 1px 8px;
}

.msg-guest-ring-svg {
  display: none !important;
}

.msg-guest-chip--timed {
  padding: 2px 9px;
  border-color: transparent;
  background: rgba(255, 140, 60, 0.08);
}

.msg-guest-chip-label,
.msg-guest-chip-countdown {
  position: relative;
  z-index: 1;
}

.msg-guest-count-badge {
  font-size: 8px;
  font-weight: 800;
  color: var(--ui-guest-chip-countdown-color);
  background: rgba(255, 140, 60, 0.16);
  border: 1px solid rgba(255, 180, 100, 0.38);
  border-radius: 999px;
  padding: 1px 6px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.chat-guest-strip {
  flex-shrink: 0;
  padding: 5px 10px;
  border-bottom: 1px solid var(--ui-guest-strip-border);
  background: var(--ui-guest-strip-bg);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.1);
  position: relative;
  z-index: 2;
}

.chat-guest-strip[hidden] {
  display: none !important;
}

.msg-text--emoji {
  line-height: 1.15;
  letter-spacing: 0.08em;
  padding: 2px 4px;
}

.msg-text--emoji-lg,
.map-mini-msg-text--emoji-lg {
  font-size: 52px;
}

.msg-text--emoji-md,
.map-mini-msg-text--emoji-md {
  font-size: 40px;
}

.msg-text--emoji-sm,
.map-mini-msg-text--emoji-sm {
  font-size: 30px;
}

.msg-text--emoji-inline,
.map-mini-msg-text--emoji-inline {
  font-size: 1.45em;
  line-height: 1.4;
}

.msg-input-compose-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.msg-input-compose-row textarea#msgInput {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 8px !important;
}

.msg-quick-emojis {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 2px;
  width: 118px;
  max-width: 38%;
  padding: 2px 0 0;
}

.msg-quick-emoji-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.12s ease,
    background 0.12s ease;
}

.msg-quick-emoji-btn:hover {
  transform: scale(1.18);
  background: rgba(125, 252, 138, 0.12);
}

.map-mini-msg-text--emoji {
  line-height: 1.15;
  letter-spacing: 0.08em;
  padding: 2px 4px;
}

.chat-system-notice,
.msg-system-notice,
.map-mini-msg-system {
  align-self: center;
  max-width: 92%;
  margin: 8px auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  text-align: center;
  color: var(--ui-guest-chip-color);
  background: rgba(255, 140, 60, 0.12);
  border: 1px solid rgba(255, 180, 100, 0.35);
  letter-spacing: 0.03em;
}

.msg-dialog-guests {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 3px 0 2px 34px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.msg-dialog-guests--inline {
  align-items: center;
}

.message-dialog-item {
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.message-dialog-item:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 200, 255, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.message-dialog-item:focus-visible {
  outline: 2px solid rgba(125, 252, 138, 0.55);
  outline-offset: 2px;
}

.message-dialog-item.has-guests:not(.active) {
  border-color: rgba(255, 180, 100, 0.42);
  border-style: dashed;
  box-shadow: none;
}

.message-dialog-item.active.has-guests {
  border-style: solid;
  border-color: rgba(255, 200, 120, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 180, 100, 0.25),
    var(--my-page-dialog-item-active-shadow);
}

.message-dialog-item.active:not(.has-guests) {
  border-style: solid;
}

.map-mini-chat-call-btn {
  flex: 1 1 0;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.55);
  background: linear-gradient(145deg, rgba(125, 252, 138, 0.24), rgba(58, 166, 255, 0.16));
  color: #e8fff0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(125, 252, 138, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-mini-chat-call-btn {
  line-height: 1;
}

.map-mini-chat-call-btn--video {
  border-color: rgba(255, 200, 100, 0.6);
  background: linear-gradient(145deg, rgba(255, 160, 80, 0.28), rgba(255, 100, 120, 0.15));
  color: #ffe8c8;
  box-shadow: 0 0 16px rgba(255, 160, 80, 0.28);
}

.map-mini-chat-call-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 22px rgba(125, 252, 138, 0.45);
}

.map-mini-chat--nodus .map-mini-chat-call-row {
  display: none !important;
}

html:not([data-ui-theme]) .message-dialog-item.active {
  border-color: rgba(125, 252, 138, 0.72) !important;
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.35),
    0 0 22px rgba(125, 252, 138, 0.18) !important;
}

html:not([data-ui-theme]) .message-dialog-item.active .msg-dialog-name {
  color: #eafff0;
}

html:not([data-ui-theme]) .message-dialog-item--nodus.active {
  border-color: rgba(143, 211, 255, 0.65) !important;
  box-shadow:
    0 0 0 1px rgba(143, 211, 255, 0.35),
    0 0 20px rgba(58, 166, 255, 0.2) !important;
}

.map-mini-msg-text--emoji {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0.08em;
  padding: 2px 4px;
}

.msg-chat-call-audio-btn,
.msg-chat-call-video-btn {
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 14px rgba(58, 166, 255, 0.2);
}

.msg-chat-call-audio-btn {
  border-color: rgba(125, 252, 138, 0.55) !important;
  background: linear-gradient(145deg, rgba(125, 252, 138, 0.2), rgba(0, 0, 0, 0.35)) !important;
  color: var(--green) !important;
}

.msg-chat-call-video-btn {
  border-color: rgba(255, 180, 100, 0.55) !important;
  background: linear-gradient(145deg, rgba(255, 140, 60, 0.22), rgba(0, 0, 0, 0.35)) !important;
  color: #ffc98a !important;
}

.friend-btn-call {
  min-width: 30px;
  padding: 4px 8px;
  border-color: rgba(125, 252, 138, 0.45);
  color: var(--green);
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.15);
}

.friend-btn-call-video {
  border-color: rgba(255, 180, 100, 0.45);
  color: var(--ui-guest-chip-countdown-color);
  box-shadow: 0 0 10px rgba(255, 160, 80, 0.15);
}

.mnm-call-peer-panel {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 2;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
  transition:
    padding 0.35s ease,
    background 0.35s ease,
    border-radius 0.35s ease;
  pointer-events: none;
  padding: 6px 8px 2px;
}

.mnm-call-incoming-actions,
.mnm-call-incoming-actions .mnm-call-ctl {
  pointer-events: auto !important;
  position: relative;
  z-index: 8;
}

.mnm-call--connected .mnm-call-peer-panel {
  top: auto;
  transform: none;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 14px;
  padding: 8px 12px 6px;
  border: 1px solid rgba(125, 200, 255, 0.2);
  backdrop-filter: blur(8px);
}

.mnm-call--connected.mnm-call--video .mnm-call-peer-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  padding: 8px 14px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.mnm-call--connected.mnm-call--video .mnm-call-peer-panel > * {
  margin: 0;
}

.mnm-call--connected.mnm-call--video .mnm-call-peer-av {
  width: 38px;
  height: 38px;
  min-width: 38px;
  margin: 0;
  flex-shrink: 0;
  font-size: 14px;
}

.mnm-call--connected.mnm-call--video .mnm-call-peer-name {
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mnm-call--connected.mnm-call--video .mnm-call-status {
  display: none;
}

.mnm-call--connected.mnm-call--video .mnm-call-timer {
  font-size: 15px;
  margin: 0;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.mnm-call--connected.mnm-call--video .mnm-call-wave {
  display: none !important;
}

.mnm-call--connected.mnm-call--video .mnm-call-stage {
  min-height: min(500px, calc(100vh - 200px));
}

.mnm-call--connected.mnm-call--video .mnm-call-local {
  top: auto;
  bottom: 88px;
}

.mnm-call--connected .mnm-call-peer-av {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
}

.mnm-call--connected .mnm-call-peer-name {
  font-size: 13px;
}

.mnm-call--connected .mnm-call-timer {
  font-size: 18px;
  margin-top: 2px;
}

.mnm-call-overlay.mnm-call--screen-full {
  padding: 0;
}

.mnm-call-overlay.mnm-call--screen-full .mnm-call-shell {
  width: 100vw;
  max-width: none;
  max-height: none;
  height: 100vh;
  height: 100dvh;
  gap: 0;
}

.mnm-call-overlay.mnm-call--screen-full .mnm-call-peer-panel {
  display: none;
}

.mnm-call-overlay.mnm-call--screen-full .mnm-call-stage {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  border: none;
}

.mnm-call--screen-full .mnm-call-stage {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  border: none;
}

.mnm-call--screen-full .mnm-call-remote.is-live {
  opacity: 1;
}

.mnm-call--screen-full .mnm-call-local {
  width: 140px;
  height: 88px;
  right: 18px;
  bottom: 110px;
  top: auto;
}

.mnm-call--screen-full .mnm-call-hud {
  min-height: auto;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.mnm-call--connected.mnm-call--video .mnm-call-peer-av,
.mnm-call--video .mnm-call-peer-av {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
}

.mnm-call--connected .mnm-call-wave {
  opacity: 1;
}

.mnm-call--video .mnm-call-peer-panel .mnm-call-wave {
  opacity: 0.35;
  height: 20px;
  margin-top: 6px;
}

.msg-guest-chip-ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(
    from -90deg,
    #ffb347 0deg,
    #ff8c3a calc(var(--ring-pct, 100) * 3.6deg),
    rgba(255, 180, 100, 0.14) calc(var(--ring-pct, 100) * 3.6deg)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  transition: background 0.85s linear;
}

.msg-guest-chip-label {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  display: inline;
}

.msg-guest-chip-countdown {
  position: relative;
  z-index: 1;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  opacity: 0.88;
  color: var(--ui-guest-chip-countdown-color);
  font-weight: 600;
}

.msg-guest-chip-remove,
.msg-chat-guest-remove,
.map-mini-guest-remove {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0 1px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ui-guest-chip-remove-color);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    color 0.16s ease,
    text-shadow 0.16s ease,
    filter 0.16s ease;
}

.msg-guest-chip-remove:hover,
.msg-chat-guest-remove:hover,
.map-mini-guest-remove:hover {
  color: var(--ui-guest-chip-remove-hover-color);
  border: none;
  background: transparent;
  text-shadow:
    0 0 6px rgba(255, 100, 100, 0.95),
    0 0 12px rgba(255, 70, 70, 0.65);
  filter: drop-shadow(0 0 4px rgba(255, 90, 90, 0.8));
}

.msg-guest-group-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.08);
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}

.msg-guest-group-btn:hover {
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.25);
}

/* Ephemeral P2P call overlay */
body.mnm-call-active {
  overflow: hidden;
}

/* п.21 — center left-panel logo only. Right profile header layout lives in
   styles-audit-wave.css (avatar | text+auth row). Do not override it here. */
.left-panel .logo-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.left-panel .logo-ascii {
  align-items: center;
  width: 100%;
  text-align: center;
}

/* п.25 — short-height: proportional panel scale without clipping */
.left-panel {
  --lp-s: 1;
}
@media (max-height: 900px) {
  .left-panel {
    --lp-s: 0.94;
  }
  .left-panel .logo-main {
    font-size: calc(clamp(18px, 3.8vw, 28px) * var(--lp-s));
  }
  .left-panel .info-card,
  .left-panel .controls-row {
    gap: calc(6px * var(--lp-s));
  }
  .mp-media-thumb img {
    height: clamp(72px, 12vh, 110px);
  }
  .tf-post-media img {
    max-height: min(78vh, 640px);
  }
  .my-page-media-viewer img,
  .mp-album-stage img {
    max-height: min(78dvh, 720px);
  }
}
@media (max-height: 760px) {
  .mp-media-thumb img {
    height: clamp(64px, 11vh, 96px);
  }
  .tf-post-media img {
    max-height: min(72vh, 560px);
  }
  #rightPanel.right-panel {
    --rp-s: 0.84;
  }
  .left-panel {
    --lp-s: 0.88;
  }
  .left-panel .info-label,
  .left-panel .btn-ghost,
  .left-panel .btn-main {
    font-size: calc(0.92em * var(--lp-s));
  }
}
@media (max-height: 640px) {
  #rightPanel.right-panel {
    --rp-s: 0.72;
  }
  .left-panel {
    --lp-s: 0.82;
  }
  .mp-media-thumb img {
    height: clamp(56px, 10vh, 84px);
  }
}

/* п.27 — call overlay uses dvh + safe-area so bottom controls aren't clipped */
.mnm-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  box-sizing: border-box;
  overflow: hidden;
}
.mnm-call-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(520px, calc(100vw - 88px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.mnm-call-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: min(560px, calc(100vh - 180px));
  min-height: min(560px, calc(100dvh - 180px - env(safe-area-inset-bottom, 0px)));
  border-radius: 24px;
  border: 1px solid rgba(125, 200, 255, 0.22);
  background: linear-gradient(165deg, rgba(12, 22, 30, 0.95), rgba(6, 10, 14, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(58, 166, 255, 0.08);
  overflow: hidden;
}
.mnm-call-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 20px max(22px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78) 45%);
}

.mnm-call-overlay.is-minimized,
.mnm-call-overlay.mnm-call--minimized {
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
  background: transparent;
  padding: max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px));
}

.mnm-call-overlay.is-minimized .mnm-call-backdrop,
.mnm-call-overlay.mnm-call--minimized .mnm-call-backdrop,
.mnm-call-overlay.is-minimized .mnm-call-shell,
.mnm-call-overlay.mnm-call--minimized .mnm-call-shell {
  display: none !important;
}

.mnm-call-mini-pill {
  pointer-events: auto;
  z-index: 20001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(125, 200, 255, 0.4);
  background: rgba(8, 16, 24, 0.92);
  color: #e8f6ff;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.mnm-call-mini-pill[hidden] {
  display: none !important;
}

.mnm-call-side-rail {
  position: absolute;
  right: -64px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .mnm-call-shell {
    width: min(520px, calc(100vw - 24px));
  }
  .mnm-call-side-rail {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 4px;
    padding-right: 2px;
  }
}

.mnm-call-ctl--circle {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  padding: 0;
}

.mnm-call-side-rail .mnm-call-ctl--accept,
.mnm-call-side-rail .mnm-call-ctl--decline {
  min-width: 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 0;
}

.mnm-call-side-rail .mnm-call-ctl--accept[hidden] {
  display: none !important;
}

.mnm-call-controls--extra {
  justify-content: center;
  gap: 10px;
  opacity: 0.85;
}

.mnm-call-overlay.is-incoming .mnm-call-controls--extra {
  display: none;
}

.mnm-call-overlay[hidden] {
  display: none !important;
}

.mnm-call-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(20, 40, 55, 0.92), rgba(4, 8, 12, 0.97));
  backdrop-filter: blur(18px);
}

.mnm-call-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: min(560px, calc(100vh - 180px));
  border-radius: 24px;
  border: 1px solid rgba(125, 200, 255, 0.22);
  background: linear-gradient(165deg, rgba(12, 22, 30, 0.95), rgba(6, 10, 14, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(58, 166, 255, 0.08);
  overflow: hidden;
}

.mnm-call-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(circle at 50% 40%, rgba(58, 166, 255, 0.12), transparent 60%);
}

.mnm-call-remote.is-live {
  opacity: 1;
}

.mnm-call-local {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 108px;
  height: 148px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(125, 252, 138, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

.mnm-call-local.is-live {
  opacity: 1;
  transform: scale(1);
}

.mnm-call-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 20px 22px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78) 45%);
  pointer-events: none;
}

.mnm-call-hud > * {
  pointer-events: auto;
}

.mnm-call-peer-av {
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: var(--text-main);
  background: rgba(58, 166, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(58, 166, 255, 0.25), 0 0 40px rgba(58, 166, 255, 0.2);
  animation: mnm-call-pulse 2.4s ease-in-out infinite;
}

@keyframes mnm-call-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(58, 166, 255, 0.25), 0 0 30px rgba(58, 166, 255, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(125, 252, 138, 0.2), 0 0 50px rgba(125, 252, 138, 0.25); }
}

.mnm-call-peer-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.mnm-call-status {
  font-size: 11px;
  color: var(--accent-olive);
  margin-top: 4px;
}

.mnm-call-timer {
  font-size: 28px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 8px;
  letter-spacing: 0.08em;
}

.mnm-call-encrypt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #7dfca8;
  background: rgba(125, 252, 168, 0.12);
  border: 1px solid rgba(125, 252, 168, 0.35);
  box-shadow: 0 0 18px rgba(125, 252, 168, 0.15);
}

.mnm-call-encrypt-badge[data-state="pending"] {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.mnm-call-encrypt-badge[data-state="warn"] {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.12);
  border-color: rgba(255, 179, 71, 0.4);
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.15);
}

.mnm-call-encrypt-badge .fa-lock {
  font-size: 10px;
}

.mnm-call-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 32px;
  margin-bottom: 18px;
}

.mnm-call-wave span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7dfca8, #3aa6ff);
  animation: mnm-call-wave 1.1s ease-in-out infinite;
}

.mnm-call-wave span:nth-child(2) { animation-delay: 0.12s; }
.mnm-call-wave span:nth-child(3) { animation-delay: 0.24s; }
.mnm-call-wave span:nth-child(4) { animation-delay: 0.36s; }
.mnm-call-wave span:nth-child(5) { animation-delay: 0.48s; }

@keyframes mnm-call-wave {
  0%, 100% { height: 8px; opacity: 0.5; }
  50% { height: 28px; opacity: 1; }
}

.mnm-call-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.mnm-call-ctl {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(125, 200, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.mnm-call-ctl:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.mnm-call-ctl.is-off {
  background: rgba(255, 80, 80, 0.2);
  border-color: rgba(255, 120, 120, 0.5);
  color: #ff9a9a;
}

.mnm-call-ctl.is-on {
  background: rgba(125, 252, 138, 0.15);
  border-color: rgba(125, 252, 138, 0.5);
  color: var(--green);
}

.mnm-call-ctl--end {
  background: rgba(220, 50, 50, 0.85);
  border-color: rgba(255, 100, 100, 0.6);
  width: 58px;
  height: 58px;
}

.mnm-call-incoming-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.mnm-call-incoming-actions[hidden] {
  display: none !important;
}

.mnm-call-ctl--accept {
  background: rgba(40, 160, 80, 0.9);
  border-color: rgba(120, 255, 160, 0.55);
  min-width: 110px;
  gap: 8px;
  padding: 0 14px;
  width: auto;
  height: 52px;
  border-radius: 999px;
}

.mnm-call-ctl--decline {
  background: rgba(220, 50, 50, 0.85);
  border-color: rgba(255, 100, 100, 0.55);
  min-width: 110px;
  gap: 8px;
  padding: 0 14px;
  width: auto;
  height: 52px;
  border-radius: 999px;
}

.mnm-call-overlay.is-incoming .mnm-call-controls {
  display: none;
}

.mnm-call-footnote {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(150, 200, 255, 0.55);
  margin: 0;
  text-align: center;
}

.mnm-call--video .mnm-call-peer-av {
  opacity: 0.35;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mnm-call--video .mnm-call-wave {
  opacity: 0.4;
}

.msg-chat-guest-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 100, 0.55);
  background: rgba(255, 140, 60, 0.12);
  color: var(--ui-guest-chip-color);
}

.msg-chat-guest-timer {
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

/* Terminal linked friend */
.terminal-field--linked-friend {
  margin-top: 4px;
  overflow: visible;
}

.terminal-linked-friend-wrap {
  position: relative;
  margin-top: 4px;
  overflow: visible;
}

.terminal-linked-friend-btn {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(80, 120, 90, 0.55);
  background: linear-gradient(
    180deg,
    rgba(8, 14, 12, 0.92),
    rgba(4, 8, 7, 0.96)
  );
  color: rgba(232, 248, 240, 0.95);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.terminal-linked-friend-btn::after {
  content: "▾";
  font-size: 10px;
  opacity: 0.65;
}

.terminal-linked-friend-btn:hover,
.terminal-linked-friend-btn:focus-visible {
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.12);
}

.terminal-linked-friend-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: min(240px, 40vh);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  border-radius: 8px;
  border: 1px solid rgba(236, 202, 116, 0.32);
  background: rgba(6, 12, 10, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  padding: 4px;
}

.terminal-linked-friend-menu--portal {
  position: fixed !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(236, 202, 116, 0.38);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: terminal-linked-friend-menu-in 0.16s ease;
  z-index: 12050;
}

@keyframes terminal-linked-friend-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal-linked-friend-menu[hidden] {
  display: none !important;
}

.terminal-linked-friend-option {
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(225, 242, 255, 0.92);
  text-align: left;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.terminal-linked-friend-option:hover,
.terminal-linked-friend-option.is-selected {
  background: rgba(236, 202, 116, 0.14);
  color: rgba(255, 248, 232, 0.98);
}

.terminal-linked-friend-select {
  display: none !important;
}

.terminal-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

.place-linked-friend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  border: 1px solid rgba(140, 190, 255, 0.45);
  background: rgba(58, 166, 255, 0.1);
  color: #9fd0ff;
  vertical-align: middle;
}

.place-linked-friend-chip i {
  font-size: 9px;
  opacity: 0.9;
}

/* Header of active dialog */

.message-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 10px 12px;
  overflow: visible;
}

.message-chat-header .msg-chat-peer-col {
  flex: 1 1 auto;
  min-width: 0;
}

.msg-chat-peer--with-av {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.msg-chat-peer-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(125, 252, 138, 0.5);
  box-shadow:
    0 0 0 1px rgba(58, 166, 255, 0.25),
    0 0 14px rgba(125, 252, 138, 0.12);
  background: #020608;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.msg-chat-peer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.msg-chat-peer-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.msg-chat-peer-invites {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.msg-chat-invite-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-guest-bar-label-color);
  font-weight: 800;
  margin-right: 2px;
  flex-shrink: 0;
}

.msg-chat-peer-invites .msg-guest-chip--inline {
  font-size: 9px;
  color: var(--ui-guest-chip-color);
  padding-right: 14px;
}

.msg-chat-peer-invites .msg-guest-chip-remove {
  right: 4px;
  font-size: 8px;
}

.message-chat-header .msg-chat-peer-name {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-chat-header-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
  overflow: visible;
}

.msg-chat-action-btn {
  border: 1px solid rgba(80, 120, 90, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-size: 11px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-chat-action-btn i {
  font-size: 12px;
  line-height: 1;
}

.msg-chat-action-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.msg-chat-action-btn[data-tip] {
  position: relative;
}

.msg-chat-action-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  font-size: 10px;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(4, 10, 8, 0.96);
  border: 1px solid rgba(143, 211, 255, 0.28);
  color: rgba(210, 230, 240, 0.95);
  transition: opacity 0.15s ease;
  z-index: 140;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.msg-chat-header-actions .msg-chat-action-btn[data-tip]:last-child::after,
.msg-chat-header-actions .msg-chat-action-btn[data-tip]:nth-last-child(2)::after {
  left: auto;
  right: 0;
  transform: none;
}

.msg-chat-action-btn[data-tip]:hover::after,
.msg-chat-action-btn[data-tip]:focus-visible::after {
  opacity: 1;
}

.msg-chat-block-btn:hover {
  border-color: #c44;
  color: #f88;
}

.msg-chat-clear-btn:hover {
  border-color: #c66;
  color: #faa;
}

.age-gated {
  opacity: 0.45;
  cursor: not-allowed !important;
}

.map-chat-voice-pause-btn {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.5);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-main);
  cursor: pointer;
}

.map-chat-voice-pause-btn.is-paused {
  border-color: var(--green);
  color: var(--green);
}

.mnm-report-overlay[hidden] {
  display: none !important;
}

.mnm-report-overlay:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1065;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mnm-report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 4, 0.4);
  backdrop-filter: blur(10px);
}

.mnm-modal-chrome {
  position: relative;
  padding-top: calc(var(--ui-chrome-inset) + var(--ui-chrome-size) + 8px);
}

.mnm-modal-head {
  text-align: center;
  margin: 0 0 12px;
  padding: 0 8px;
}

.mnm-modal-title {
  margin: 0;
  text-align: center;
  width: 100%;
}

.mnm-report-window {
  position: relative;
  z-index: 1;
  width: min(420px, 94vw);
  padding: 0 18px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(12, 20, 16, 0.96);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.55);
}

.mnm-report-title {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.mnm-report-lead,
.mnm-report-foot {
  font-size: var(--font-sm);
  color: var(--text-dim);
  line-height: 1.45;
}

.mnm-report-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-olive);
  margin: 10px 0 4px;
}

.mnm-report-select,
.mnm-report-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.5);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-main);
  font-size: var(--font-sm);
  color-scheme: dark;
}

.mnm-report-textarea {
  resize: vertical;
  overflow-x: hidden;
}

.mnm-report-select option {
  background: #0a1210;
  color: #e8f2ea;
}

.mnm-report-select:focus,
.mnm-report-textarea:focus {
  outline: none;
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 0 2px rgba(125, 252, 138, 0.12);
}

.mnm-report-close.ui-close {
  position: absolute !important;
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 4;
}

.message-chat-header .msg-chat-peer-route {
  font-size: 10px;
  color: var(--text-dim);
}

.msg-chat-encrypt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-olive);
  opacity: 0.92;
}

.msg-chat-encrypt-badge .fa-lock {
  font-size: 8px;
}

/* Demo: allow 2 bubbles (in + out) to look different */

#msgChatLog {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* (cleanup) Старые дубляжи сетки MY PAGE удалены: сетка задаётся выше одним блоком */

