/* ============================
   Bucket List (LEFT PANEL)
   ============================ */
.bucket-list-panel {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-14);
  background: radial-gradient(
      circle at 0 0,
      var(--ui-overlay-shell-grad) 0,
      var(--ui-overlay-shell-bg) 55%
    ),
    var(--bg-panel);
  border: 1px solid var(--border-soft);
  box-shadow: 0 0 0 1px var(--ui-panel-shell-ring), 0 14px 26px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bucket-list-panel.bucket-list-panel--open {
  display: flex;
}

.bucket-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: var(--space-2);
}

.bucket-list-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bucket-list-selected-meta {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--font-sm);
  letter-spacing: 0.06em;
  color: var(--text-muted, rgba(255, 255, 255, 0.62));
}

.bucket-list-selected-meta #bucketListSelectedCount {
  color: var(--accent-olive);
  font-weight: 600;
  transition: color 0.18s ease, transform 0.18s ease;
}

.bucket-list-selected-meta #bucketListSelectedCount.is-count-pulse {
  color: #7dfc8a;
  animation: bucket-count-pulse 0.55s ease-out 1;
}

@keyframes bucket-count-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

.bucket-list-title {
  font-family: var(--font-main);
  font-size: var(--font-lg);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-olive);
}

@media (prefers-reduced-motion: reduce) {
  .bucket-list-selected-meta #bucketListSelectedCount.is-count-pulse {
    animation: none !important;
  }

  .left-panel .places-panel .node-log-rank-footer.nlr-flash-leader,
  .left-panel .places-panel .node-log-rank-footer.nlr-flash-rank {
    animation: none !important;
  }
}

.bucket-list-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

.bucket-list-content {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

.bucket-list-content::-webkit-scrollbar {
  width: 8px;
}

.bucket-list-row {
  display: grid;
  grid-template-columns: 22px 1fr 90px;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(120, 160, 130, 0.18);
}

.bucket-check {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  filter: drop-shadow(0 0 2px rgba(58, 166, 255, 0.6));
}
.bucket-list-row.is-checked {
  background: linear-gradient(90deg, rgba(58,166,255,.16), rgba(58,166,255,.05));
  border-bottom-color: rgba(58,166,255,.45);
}
.bucket-list-row.is-checked .bucket-country-name {
  color: #c7ebff;
  font-weight: 700;
}
.bucket-list-row.is-checked .bucket-check {
  transform: scale(1.08);
  filter: drop-shadow(0 0 6px rgba(58,166,255,.95));
}
.bucket-list-row.is-completed .bucket-country-name {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(147, 222, 255, 0.9);
  opacity: 0.88;
}
.bucket-year[data-done-year="1"] {
  border-color: rgba(58, 166, 255, 0.65);
  background: rgba(18, 43, 56, 0.85);
  color: #ccefff;
  font-weight: 700;
}

.bucket-country-name {
  font-size: var(--font-sm);
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bucket-year {
  width: 90px;
  background: rgba(3, 10, 8, 0.96);
  border: 1px solid rgba(58, 166, 255, 0.35);
  color: var(--text-main);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  outline: none;
  color-scheme: dark;
}

/* Number input spinners — синий неон, без светлой «капсулы» */
.bucket-year::-webkit-inner-spin-button,
.bucket-year::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button;
  opacity: 1;
  height: 22px;
  cursor: pointer;
  filter: brightness(0.75) saturate(2.2) hue-rotate(168deg)
    drop-shadow(0 0 4px rgba(58, 166, 255, 0.65));
}

.bucket-year:disabled {
  opacity: 0.45;
}

.bucket-year.is-year-open {
  color: rgba(175, 205, 190, 0.72);
  text-align: center;
}

.bucket-list-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--accent-line);
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: flex-end;
}

/* ——— MAP CHAT DOCK (VK-style, bottom-right on map) ——— */

.map-chat-dock {
  position: absolute;
  right: 12px;
  bottom: var(--map-floating-bottom, 40px);
  z-index: 25;
  width: min(300px, calc(100% - 24px));
  max-height: min(46vh, 360px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid var(--ui-glass-border);
  background: var(--map-chat-dock-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--map-chat-dock-shadow);
  pointer-events: auto;
}

/* Collapsed: keep NoDUS row visible (peek), hide other threads */
.map-chat-dock.map-chat-dock--collapsed .map-chat-dock-body {
  display: block;
}

.map-chat-dock.map-chat-dock--collapsed .map-chat-dock-list {
  max-height: 96px;
  overflow: hidden;
  padding-bottom: 2px;
}

.map-chat-dock.map-chat-dock--collapsed .map-chat-dock-row--nodus {
  min-height: 72px;
  padding-bottom: 8px;
  box-sizing: border-box;
}

.map-chat-dock.map-chat-dock--collapsed .map-chat-dock-snippet {
  -webkit-line-clamp: 1;
  line-height: 1.35;
  max-height: 1.4em;
}

.map-chat-dock.map-chat-dock--collapsed .map-chat-dock-row:not(.map-chat-dock-row--nodus) {
  display: none !important;
}

.map-chat-dock.map-chat-dock--collapsed .map-chat-dock-collapse i {
  transform: rotate(-90deg);
}

.map-chat-dock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: var(--map-chat-collapsed-height, 44px);
  box-sizing: border-box;
  border-bottom: 1px solid var(--ui-chat-sep);
  letter-spacing: 0.14em;
  font-size: var(--font-xs);
  text-transform: uppercase;
  color: var(--ui-map-chat-head-color);
  font-weight: 600;
}

.map-chat-dock-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.map-chat-dock-title i {
  opacity: 0.85;
}

.map-chat-dock-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(80, 200, 120, 0.95), rgba(60, 160, 100, 0.92));
  color: #06140c;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.35);
  animation: none;
}

.map-chat-dock-badge--alert {
  background: linear-gradient(135deg, #ff4060, #ff8060);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 64, 96, 0.55);
  animation: map-chat-unread-blink 0.95s ease-in-out infinite;
}

.map-chat-dock-badge--clear {
  background: linear-gradient(135deg, rgba(80, 200, 120, 0.95), rgba(60, 160, 100, 0.92));
  color: #06140c;
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.35);
  animation: none;
}

@keyframes map-chat-unread-blink {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 64, 96, 0.45);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.14);
    box-shadow: 0 0 18px rgba(255, 40, 64, 0.95);
    opacity: 1;
  }
}

.map-chat-dock-collapse {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--ui-map-chat-collapse-bg);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.map-chat-dock-collapse:hover {
  color: var(--text-main);
  background: var(--ui-map-chat-collapse-hover-bg);
}

.map-chat-dock-collapse i {
  transition: transform 0.2s ease;
  font-size: 11px;
}

.map-chat-dock-body {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.map-chat-dock-list {
  max-height: min(38vh, 300px);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-chat-dock-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--ui-map-chat-row-bg);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.12s ease;
}

.map-chat-dock-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-chat-dock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
}

.map-chat-dock-time {
  position: static;
  left: auto;
  bottom: auto;
  font-size: 8px;
  color: rgba(150, 175, 190, 0.75);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.map-chat-dock-pin {
  position: static;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  align-self: auto;
  margin-top: 0;
  margin-left: auto;
  width: 24px;
  height: 24px;
  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;
}

.map-chat-dock-row:hover {
  border-color: var(--ui-glass-border-strong);
  box-shadow: var(--ui-map-chat-row-hover-shadow);
  transform: translateY(-1px);
}

.map-chat-dock-row--unread {
  border-color: rgba(94, 176, 255, 0.32);
  background: rgba(58, 166, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(125, 252, 138, 0.12);
}

.map-chat-dock-av {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--ui-map-chat-av-bg);
  box-shadow: var(--ui-map-chat-av-shadow);
  overflow: hidden;
  padding: 0;
}

.map-chat-dock-av img,
.friend-row-avatar img,
.msg-dialog-avatar img,
.mp-newchat-av img,
.map-mini-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 50%;
}

.friend-av--clickable,
.map-chat-dock-av.friend-av--clickable {
  cursor: pointer;
  border-color: var(--ui-map-chat-av-ring);
}

.friend-av--clickable:hover {
  box-shadow: var(--ui-map-chat-av-shadow);
}

.map-chat-dock-row--nodus .map-chat-dock-name {
  color: var(--ui-map-chat-nodus-name);
}

.msg-chat-peer--nodus {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.msg-chat-peer-bio {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(170, 210, 195, 0.9);
  max-width: 52ch;
}

.msg-chat-peer-av-btn {
  padding: 0;
  border: 1px solid rgba(125, 252, 138, 0.4);
  background: transparent;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
}

.map-chat-dock-meta {
  flex: 1;
  min-width: 0;
}

.map-chat-dock-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.map-chat-dock-name {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-main);
  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;
  flex: 1;
  min-width: 0;
}

.map-chat-dock-unread {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #04140f;
  background: #7dfc8a;
  box-shadow: 0 0 0 1px rgba(7, 40, 28, 0.35);
}

.map-chat-dock-counts {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(150, 175, 190, 0.82);
}

.map-chat-dock-counts-total {
  color: rgba(150, 175, 190, 0.82);
}

.map-chat-dock-counts-sep {
  opacity: 0.55;
}

.map-chat-dock-counts-new {
  font-weight: 700;
  color: #ffe27a;
  text-shadow: 0 0 8px rgba(255, 200, 60, 0.35);
}

.map-chat-dock-snippet {
  font-size: var(--font-xs);
  color: var(--text-dim);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.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);
}

.map-chat-dock-pin:hover,
.map-chat-dock-pin:focus-visible {
  color: rgba(100, 190, 120, 0.92);
  background: rgba(72, 158, 95, 0.12);
}

.map-chat-dock-hint {
  padding: 8px 10px 4px;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(160, 190, 205, 0.78);
  text-align: center;
}

.map-chat-dock-see-all {
  width: calc(100% - 12px);
  margin: 6px 6px 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(94, 176, 255, 0.22);
  background: rgba(58, 166, 255, 0.06);
  color: rgba(200, 225, 245, 0.92);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.map-chat-dock-see-all:hover,
.map-chat-dock-see-all:focus-visible {
  border-color: rgba(125, 252, 138, 0.35);
  background: rgba(125, 252, 138, 0.08);
  color: rgba(236, 244, 240, 0.96);
}

/* Mini chat floating on map */

/* Мини-чат: верх = ниже логотипов (зазор), не прижимаем к верхней кромке карты; вниз — над доком чатов */
.map-mini-chat {
  position: absolute;
  top: var(--map-mini-chat-top);
  right: 12px;
  bottom: max(96px, calc(var(--map-floating-bottom, 40px) + min(34vh, 260px) + 12px));
  z-index: 35;
  width: min(400px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  height: auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--ui-glass-border-strong);
  background: rgba(6, 12, 14, 0.97);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--ui-mini-chat-shadow);
  pointer-events: auto;
  overflow: hidden;
}

.map-mini-chat .chat-rich-toolbar,
.map-mini-chat-compose,
.map-chat-photo-draft {
  flex-shrink: 0;
}

.map-chat-photo-draft {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-top: 1px solid var(--ui-mini-chat-photo-draft-border);
  background: var(--ui-mini-chat-photo-draft-bg);
}

.map-chat-photo-draft[hidden] {
  display: none !important;
}

.map-chat-photo-draft-preview {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(125, 252, 138, 0.25);
  background: rgba(0, 0, 0, 0.4);
}

.map-chat-photo-draft-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map-chat-photo-draft-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.map-chat-photo-draft-caption {
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-mini-chat-photo-caption-border);
  background: var(--ui-mini-chat-photo-caption-bg);
  color: var(--text-main);
  font-size: var(--font-sm);
  font-family: inherit;
  line-height: 1.35;
  resize: none;
}

.map-chat-photo-draft-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.map-mini-msg-caption {
  margin-top: 6px;
  font-size: var(--font-sm);
  line-height: 1.35;
  color: var(--ui-mini-chat-caption-color);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.map-mini-chat[hidden] {
  display: none !important;
}

.map-mini-chat-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--ui-chat-sep);
  flex-shrink: 0;
}

.map-mini-chat-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.map-mini-chat-peer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.map-mini-chat-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: var(--ui-mini-chat-avatar-text);
  background: var(--ui-mini-chat-avatar-bg);
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.55),
    0 0 14px rgba(125, 252, 138, 0.14);
  flex-shrink: 0;
  overflow: hidden;
}

.map-mini-chat .map-mini-chat-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1px solid rgba(125, 252, 138, 0.55);
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.08),
    0 0 14px rgba(125, 252, 138, 0.16);
  background: #020608;
  overflow: hidden;
}

.map-mini-chat--nodus .map-mini-chat-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-color: rgba(125, 252, 138, 0.7);
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.12),
    0 0 16px rgba(125, 252, 138, 0.22);
}

.map-mini-chat-peer-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.map-mini-chat-name {
  display: block;
  font-size: var(--font-sm);
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-mini-chat-status {
  display: block;
  font-size: 10px;
  color: var(--accent-olive);
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.map-mini-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}

.map-mini-chat-actions-maps {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: stretch;
  width: 100%;
}

.map-mini-chat--nodus .map-mini-chat-map-actions,
.map-mini-chat--nodus .map-mini-chat-actions-maps {
  display: none !important;
}

.map-mini-chat-arrow-btn {
  flex: 1 1 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 36px;
  padding: 3px 2px;
  border-radius: 8px;
  border: 1px solid var(--ui-glass-border-strong);
  background: rgba(58, 166, 255, 0.08);
  color: var(--blue);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.map-mini-chat-arrow-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(58, 166, 255, 0.35);
  border-color: rgba(125, 252, 138, 0.55);
}

.map-mini-chat-arrow-their {
  border-color: rgba(125, 252, 138, 0.45);
  color: var(--green);
  background: rgba(125, 252, 138, 0.08);
}

.map-mini-chat-arrow-mine {
  border-color: rgba(255, 217, 90, 0.45);
  color: var(--yellow);
  background: rgba(255, 217, 90, 0.06);
}

.map-mini-chat-arrow-glyph {
  font-size: 11px;
  line-height: 1;
  filter: none;
}

.map-mini-chat-close {
  cursor: pointer;
  flex-shrink: 0;
  z-index: 60;
  pointer-events: auto;
}

.map-mini-chat-msgs {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--font-sm);
}

.map-mini-msg {
  box-sizing: border-box;
  width: fit-content;
  max-width: min(92%, 38ch);
  min-width: min-content;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  line-height: 1.35;
}

.map-mini-msg-time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  opacity: 0.62;
  user-select: none;
}

.map-mini-msg--out .map-mini-msg-time {
  text-align: right;
}

.map-mini-chat--nodus #mapMiniChatReport,
.map-mini-chat--nodus .map-mini-chat-report {
  display: none !important;
}

.map-mini-msg-text,
.map-mini-msg-loc {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.map-mini-msg--in {
  align-self: flex-start;
  background: var(--ui-mini-chat-msg-in-bg);
  border: 1px solid var(--ui-mini-chat-msg-in-border);
  color: var(--text-main);
}

.map-mini-msg--out {
  align-self: flex-end;
  background: var(--ui-mini-chat-msg-out-bg);
  border: 1px solid var(--ui-mini-chat-msg-out-border);
  color: var(--ui-mini-chat-msg-out-color);
}

/* Исходящее + таймер редактирования: колонка, кнопка под баблом, не внутри текста */
.map-mini-msg-stack--out {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  gap: 4px;
  flex-shrink: 0;
  max-width: min(92%, 38ch);
  min-width: min-content;
}

/* Только мини-чат: кнопка редактирования под баблом, без position:absolute от .msg-edit-hud */
.map-mini-msg-edit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: var(--ui-msg-edit-hud-bg);
  box-shadow: 0 0 0 1px var(--ui-msg-edit-hud-border);
}

.map-mini-msg-edit-btn:hover {
  box-shadow: 0 0 0 1px var(--ui-msg-edit-hud-border-hover),
    0 0 10px rgba(255, 217, 90, 0.12);
}

.map-mini-msg-edit-btn svg {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.map-mini-msg-edit-btn .map-mini-msg-edit-ring-bg {
  fill: none;
  stroke: var(--ui-msg-edit-hud-ring);
  stroke-width: 2;
}

.map-mini-msg-edit-btn .map-mini-msg-edit-ring-prog {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 69.12;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.12s linear;
}

.map-mini-msg-edit-btn .map-mini-msg-edit-pencil {
  position: relative;
  z-index: 1;
  font-size: 7px;
  color: rgba(255, 230, 160, 0.95);
  pointer-events: none;
}

.map-mini-msg-stack--out.map-mini-msg-stack--editable {
  margin-bottom: 2px;
}

.map-mini-msg-stack--out > .map-mini-msg {
  max-width: 100%;
}

.map-mini-chat-msgs .msg-row {
  min-width: 0;
}

.map-mini-chat-msgs .msg-row > .map-mini-msg,
.map-mini-chat-msgs .msg-row > .map-mini-msg-stack--out {
  flex-shrink: 0;
}

.map-mini-chat-input-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--ui-mini-chat-input-row-border);
}

.map-mini-chat-compose {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--ui-mini-chat-compose-border);
  background: var(--ui-mini-chat-compose-bg);
  position: relative;
  z-index: 120;
  pointer-events: auto;
}

.map-mini-chat-compose-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  align-self: stretch;
  justify-content: center;
}

.map-mini-chat-compose-side .mnp-polish-icon-btn {
  width: 30px;
  height: 30px;
  margin-bottom: 0;
}

.map-mini-chat-compose .map-mini-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100px;
  border-radius: 18px;
  padding: 12px 14px;
  border-color: var(--ui-mini-chat-input-border);
  background: var(--ui-mini-chat-input-bg);
  pointer-events: auto;
  cursor: text;
  position: relative;
  z-index: 2;
}

.mnm-feature-soon {
  opacity: 0.55;
  cursor: help;
  pointer-events: auto;
}

.mnm-feature-soon:hover,
.mnm-feature-soon:focus-visible {
  opacity: 0.82;
}

.map-mini-chat-compose .map-mini-chat-send {
  flex: 0 0 46px;
  width: 46px;
  min-height: 100px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0;
}

.map-mini-chat--nodus .map-mini-chat-status {
  color: var(--ui-mini-chat-nodus-status-color);
}

.map-mini-msg-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 100%;
}

.map-mini-msg-line--out {
  align-items: flex-end;
}

.map-mini-msg-who {
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-mini-chat-msg-who-color);
  line-height: 1;
  padding: 0 4px;
}

.map-mini-msg-line--out .map-mini-msg-who {
  color: rgba(143, 211, 255, 0.75);
}

.map-mini-msg-line--in .map-mini-msg-who {
  color: rgba(125, 252, 138, 0.8);
}

/* Shared voice level meter (map chat, MY PAGE audio, floating strip) */
.mnm-voice-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mnm-voice-rec-lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 64, 96, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 64, 96, 0.4);
}

.mnm-voice-meter.is-recording .mnm-voice-rec-lamp {
  background: #ff3d5c;
  box-shadow:
    0 0 8px rgba(255, 64, 96, 0.85),
    0 0 16px rgba(255, 64, 96, 0.45);
  animation: mnm-voice-lamp-blink 1s ease-in-out infinite;
}

.mnm-voice-meter.is-recording.is-silent .mnm-voice-rec-lamp {
  opacity: 0.55;
  animation-duration: 1.4s;
}

@keyframes mnm-voice-lamp-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.88);
  }
}

.mnm-voice-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  flex: 1;
  min-width: 48px;
}

.mnm-voice-eq-bar {
  flex: 1;
  max-width: 5px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(125, 252, 138, 0.95), rgba(58, 166, 255, 0.75));
  transform: scaleY(0.14);
  transform-origin: center bottom;
  transition: transform 0.05s ease-out;
}

.mnm-voice-meter.is-recording .mnm-voice-eq-bar {
  background: linear-gradient(180deg, rgba(255, 140, 170, 0.95), rgba(255, 64, 96, 0.8));
}

.mnm-voice-meter-host {
  flex: 1;
  min-width: 0;
}

.mnm-voice-rec-strip {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 15040;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 64, 96, 0.45);
  background: rgba(8, 12, 16, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.mnm-voice-rec-strip[hidden] {
  display: none !important;
}

.mnm-voice-rec-strip-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.mnm-voice-rec-strip-timer {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 190, 205, 0.95);
  flex-shrink: 0;
}

.mnm-voice-rec-strip-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 120, 150, 0.9);
  flex-shrink: 0;
}

.mnm-voice-rec-strip--interactive,
.mnm-voice-rec-strip.mnm-voice-rec-strip--interactive {
  pointer-events: auto;
}

.mnm-voice-rec-strip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mnm-voice-rec-cancel,
.mnm-voice-rec-send {
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.mnm-voice-rec-cancel {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(220, 230, 240, 0.9);
}

.mnm-voice-rec-send {
  background: rgba(125, 252, 138, 0.18);
  border-color: rgba(125, 252, 138, 0.55);
  color: #b8ffc4;
}

.msg-chat-voice-rec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 10px 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 64, 96, 0.42);
  background: linear-gradient(
    135deg,
    rgba(255, 64, 96, 0.12),
    rgba(8, 12, 16, 0.55)
  );
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.msg-chat-voice-rec[hidden] {
  display: none !important;
}

.msg-chat-voice-rec-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.msg-chat-voice-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4060;
  box-shadow: 0 0 10px rgba(255, 64, 96, 0.8);
  animation: msg-voice-rec-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes msg-voice-rec-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

.msg-chat-voice-rec .mnm-voice-meter-host {
  flex: 1;
  min-width: 80px;
  max-width: 200px;
}

.msg-chat-voice-timer {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 190, 205, 0.95);
  flex-shrink: 0;
}

.msg-chat-voice-rec-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 140, 160, 0.9);
  flex-shrink: 0;
}

.msg-chat-voice-rec-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.msg-chat-voice-cancel-btn,
.msg-chat-voice-send-btn {
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.msg-chat-voice-cancel-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(225, 235, 245, 0.92);
}

.msg-chat-voice-send-btn {
  background: rgba(125, 252, 138, 0.2);
  border-color: rgba(125, 252, 138, 0.6);
  color: #c8ffd0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.msg-chat-voice-send-btn:hover,
.msg-chat-voice-cancel-btn:hover {
  filter: brightness(1.08);
}

.map-chat-voice-rec {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 64, 96, 0.25);
  background: rgba(255, 64, 96, 0.06);
}

.map-chat-voice-rec[hidden] {
  display: none !important;
}

.map-chat-voice-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  flex: 1;
  min-width: 0;
}

.map-voice-eq-bar {
  flex: 1;
  max-width: 6px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 120, 160, 0.95), rgba(255, 64, 96, 0.7));
  transform: scaleY(0.2);
  transform-origin: center bottom;
  transition: transform 0.06s ease-out;
}

.map-chat-voice-timer {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 180, 200, 0.95);
  flex-shrink: 0;
}

.map-chat-voice-hint {
  display: none;
}

.chat-rich-btn.is-recording {
  color: #ff6b8a;
  border-color: rgba(255, 64, 96, 0.55);
  box-shadow: 0 0 14px rgba(255, 64, 96, 0.35);
}

.map-mini-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(58, 166, 255, 0.1);
  border: 1px solid rgba(58, 166, 255, 0.28);
  min-width: min(220px, 88%);
}

.map-mini-msg--in .map-mini-voice {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(80, 120, 90, 0.45);
}

.map-mini-voice-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.12);
  color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.map-mini-voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 48px;
  height: 20px;
}

.map-mini-voice-bar {
  flex: 1;
  max-width: 4px;
  height: 40%;
  border-radius: 2px;
  background: rgba(125, 252, 138, 0.45);
}

.map-mini-voice.is-playing .map-mini-voice-bar {
  animation: map-voice-bar-pulse 0.55s ease-in-out infinite alternate;
}

.map-mini-voice.is-playing .map-mini-voice-bar:nth-child(odd) {
  animation-delay: 0.12s;
}

@keyframes map-voice-bar-pulse {
  from {
    transform: scaleY(0.35);
  }
  to {
    transform: scaleY(1);
  }
}

.map-mini-voice-dur {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(200, 230, 255, 0.9);
  flex-shrink: 0;
}

.map-mini-voice-speed {
  border: 1px solid rgba(255, 217, 90, 0.45);
  background: rgba(255, 217, 90, 0.08);
  color: var(--yellow);
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.map-mini-voice audio {
  display: none;
}

.mnp-polish-icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--ui-mnp-polish-border);
  background: var(--ui-mnp-polish-bg);
  color: var(--ui-mnp-polish-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 2px;
}

.mnp-polish-icon-btn:hover {
  border-color: var(--ui-mnp-polish-hover-border);
  background: var(--ui-mnp-polish-hover-bg);
}

.mnm-draft-quality-btn.is-draft-ok,
.mnp-polish-icon-btn.mnm-draft-quality-btn.is-draft-ok {
  color: #7dfc8a;
  border-color: rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.1);
}

.mnm-draft-quality-btn.is-draft-ok i,
.tf-polish-btn.mnm-draft-quality-btn.is-draft-ok i,
.mnp-polish-icon-btn.mnm-draft-quality-btn.is-draft-ok i {
  color: #7dfc8a !important;
}

.mnm-draft-quality-btn.is-draft-bad,
.mnp-polish-icon-btn.mnm-draft-quality-btn.is-draft-bad {
  color: #ff7a7a;
  border-color: rgba(255, 100, 100, 0.5);
  background: rgba(255, 70, 70, 0.12);
}

.mnm-draft-quality-btn.is-draft-bad i,
.tf-polish-btn.mnm-draft-quality-btn.is-draft-bad i,
.mnp-polish-icon-btn.mnm-draft-quality-btn.is-draft-bad i {
  color: #ff6b6b !important;
}

.mnm-draft-quality-btn.is-draft-empty,
.mnp-polish-icon-btn.mnm-draft-quality-btn.is-draft-empty {
  opacity: 0.45;
  cursor: default;
}

.msg-polish-btn.mnm-draft-quality-btn {
  min-width: 36px;
  padding-inline: 10px;
}

.msg-polish-btn.mnm-draft-quality-btn.is-draft-ok {
  color: #7dfc8a;
  border-color: rgba(125, 252, 138, 0.45);
}

.msg-polish-btn.mnm-draft-quality-btn.is-draft-bad {
  color: #ff7a7a;
  border-color: rgba(255, 100, 100, 0.5);
}

.map-mini-chat-input {
  flex: 1;
  min-width: 0;
  min-height: 72px;
  max-height: 200px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.5);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-size: var(--font-sm);
  font-family: inherit;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  outline: none;
}

.map-mini-chat-input:focus {
  border-color: rgba(58, 166, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(58, 166, 255, 0.2);
}

.map-mini-chat-send {
  width: 40px;
  border: 1px solid rgba(80, 180, 255, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(58, 166, 255, 0.15);
  color: var(--blue);
  cursor: pointer;
}

.map-mini-chat-send:hover {
  background: rgba(58, 166, 255, 0.28);
}

.open-map-mini-chat .map-chat-dock {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.open-map-mini-chat .map-mini-chat {
  bottom: max(72px, calc(var(--map-floating-bottom, 40px) + 16px));
  z-index: 10200;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.open-map-mini-chat .mnm-cscroll-overlay {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body.open-map-mini-chat .map-panel {
  z-index: 10180;
  isolation: isolate;
}

/* ——— AI TRIP PLANNER (map column overlay) ——— */

.ai-planner-overlay {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: none;
  pointer-events: none;
}

.ai-planner-overlay:not([hidden]) {
  display: block;
  pointer-events: auto;
}

.ai-planner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 4, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ai-planner-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 24px));
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(125, 252, 138, 0.4);
  background: linear-gradient(
      165deg,
      rgba(14, 28, 22, 0.97) 0%,
      rgba(4, 10, 8, 0.99) 55%,
      rgba(8, 18, 32, 0.96) 100%
    );
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(58, 166, 255, 0.2),
    0 0 48px rgba(58, 166, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.ai-planner-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  align-items: start;
  padding: 18px 38px 12px 18px;
  border-bottom: 1px solid rgba(80, 120, 90, 0.35);
  background: linear-gradient(180deg, rgba(125, 252, 138, 0.06), transparent);
}

.ai-planner-hero-av {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(125, 252, 138, 0.65);
  box-shadow:
    0 0 0 1px rgba(58, 166, 255, 0.4),
    0 0 28px rgba(125, 252, 138, 0.28);
  cursor: pointer;
  flex-shrink: 0;
  background: #020608;
}

.ai-planner-hero-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.ai-planner-hero-text {
  min-width: 0;
  padding-top: 4px;
}

.ai-planner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 4px;
}

.ai-planner-chip {
  border: 1px solid rgba(58, 166, 255, 0.35);
  background: rgba(58, 166, 255, 0.08);
  color: rgba(200, 230, 255, 0.95);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.ai-planner-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.18);
}

.ai-planner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(80, 120, 90, 0.35);
}

.ai-planner-title {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.95);
}

.ai-planner-sub {
  margin: 6px 0 0;
  font-size: var(--font-xs);
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 36em;
}

.ai-planner-vision {
  margin: 0;
  padding: 10px 16px 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(200, 220, 210, 0.88);
  border-bottom: 1px solid rgba(80, 120, 90, 0.22);
}

.ai-planner-vision p {
  margin: 0 0 8px;
}

.ai-planner-vision p:last-child {
  margin-bottom: 0;
}

.ai-planner-close {
  flex-shrink: 0;
  cursor: pointer;
}

.ai-planner-log {
  flex: 1;
  min-height: 100px;
  max-height: 36vh;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-planner-msg {
  max-width: 95%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-planner-msg--user {
  align-self: flex-end;
  background: rgba(58, 166, 255, 0.14);
  border: 1px solid rgba(58, 166, 255, 0.35);
  color: rgba(200, 230, 255, 0.95);
}

.ai-planner-msg--bot {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(80, 120, 90, 0.45);
  color: var(--text-main);
}

.ai-planner-compose {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(80, 120, 90, 0.3);
  align-items: flex-end;
}

.ai-planner-input {
  flex: 1;
  min-height: 88px;
  max-height: 160px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.5);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-sm);
  resize: none;
  outline: none;
}

.ai-planner-input:focus {
  border-color: rgba(58, 166, 255, 0.5);
}

.ai-planner-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(125, 252, 138, 0.1);
  color: rgba(125, 252, 138, 0.95);
  font-size: var(--font-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}

.ai-planner-send:hover {
  box-shadow: 0 0 16px rgba(125, 252, 138, 0.2);
}

.ai-planner-foot {
  margin: 0;
  padding: 0 16px 12px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.35;
}

/* ——— DEVELOPER HUB ——— */
.dev-hub-overlay {
  position: fixed;
  inset: 0;
  z-index: 4600;
  display: none;
  pointer-events: none;
}

.dev-hub-overlay:not([hidden]) {
  display: block;
  pointer-events: auto;
}

.dev-hub-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 8, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dev-hub-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 28px));
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: linear-gradient(165deg, rgba(14, 22, 30, 0.97), rgba(6, 10, 14, 0.99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.dev-hub-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 38px 10px 16px;
  border-bottom: 1px solid rgba(80, 120, 140, 0.35);
}

.dev-hub-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(143, 211, 255, 0.95);
}

.dev-hub-sub {
  margin: 6px 0 0;
  font-size: var(--font-xs);
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 40em;
}

.dev-hub-close {
  flex-shrink: 0;
  cursor: pointer;
}

.dev-hub-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dev-hub-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-hub-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--font-xs);
  color: var(--text-dim);
}

.dev-hub-input {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 140, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-sm);
}

.dev-hub-input:focus {
  outline: none;
  border-color: rgba(143, 211, 255, 0.55);
}

.dev-hub-btn {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(143, 211, 255, 0.45);
  background: rgba(58, 166, 255, 0.16);
  color: rgba(200, 230, 255, 0.95);
  font-size: var(--font-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}

.dev-hub-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(120, 160, 170, 0.35);
}

.dev-hub-code-display {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(158, 245, 180, 0.95);
  background: rgba(0, 40, 24, 0.45);
  border: 1px solid rgba(125, 252, 138, 0.28);
}

.dev-hub-creds-hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-dim);
  word-break: break-all;
}

.dev-hub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dev-hub-tab {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 140, 0.4);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.dev-hub-tab.is-active {
  border-color: rgba(143, 211, 255, 0.5);
  color: rgba(200, 230, 255, 0.95);
  background: rgba(58, 166, 255, 0.12);
}

.dev-hub-stats {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: var(--font-sm);
  line-height: 1.55;
  color: var(--text-main);
}

.dev-hub-note {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-dim);
}

.dev-hub-note--ip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(80, 120, 100, 0.22);
  font-size: 9px;
  color: rgba(180, 205, 190, 0.72);
}

.dev-hub-note--ads {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(95, 148, 255, 0.26);
  border-radius: 10px;
  background: rgba(20, 31, 53, 0.35);
}

.dev-hub-h3 {
  margin: 8px 0 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(143, 211, 255, 0.85);
}

.dev-hub-pass-change {
  padding-top: 8px;
  border-top: 1px solid rgba(80, 120, 140, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-hub-runbook {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* ——— OWNER CONSOLE (admin panel v72) ——— */
.owner-console-window {
  width: min(920px, calc(100% - 24px));
  max-height: min(90vh, 820px);
}

.owner-console-header {
  flex-wrap: wrap;
  gap: 12px;
}

.owner-console-product-switch {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.owner-console-product-btn {
  padding: 6px 10px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(80, 120, 140, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
}

.owner-console-product-btn.is-active {
  border-color: rgba(143, 211, 255, 0.5);
  color: rgba(200, 230, 255, 0.95);
  background: rgba(58, 166, 255, 0.14);
}

.owner-console-dash {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 12px;
  min-height: 360px;
}

.owner-console-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid rgba(80, 120, 140, 0.28);
  padding-right: 8px;
}

.owner-console-nav-btn {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
}

.owner-console-nav-btn.is-active {
  border-color: rgba(143, 211, 255, 0.35);
  background: rgba(58, 166, 255, 0.1);
  color: rgba(200, 230, 255, 0.95);
}

.owner-console-main {
  overflow-y: auto;
  max-height: min(68vh, 640px);
  padding-right: 4px;
}

.owner-console-section[hidden] {
  display: none !important;
}

.owner-console-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-xs);
  margin: 8px 0;
}

.owner-console-table th,
.owner-console-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(80, 120, 140, 0.22);
  text-align: left;
}

.owner-console-table thead th {
  position: sticky;
  top: 0;
  background: rgba(10, 16, 22, 0.95);
  z-index: 1;
}

.owner-console-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.owner-console-num {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
}

.owner-console-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}

.owner-console-bar span {
  display: block;
  height: 100%;
  background: rgba(58, 166, 255, 0.65);
  border-radius: 3px;
}

.owner-console-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.owner-console-kpi > div {
  padding: 8px;
  border: 1px solid rgba(80, 120, 140, 0.28);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 9px;
  color: var(--text-dim);
}

.owner-console-kpi-val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: rgba(200, 230, 255, 0.95);
  font-variant-numeric: tabular-nums;
}

.owner-console-note {
  font-size: 10px;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.owner-console-h4 {
  margin: 12px 0 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(143, 211, 255, 0.8);
}

.owner-console-input {
  width: 100%;
  box-sizing: border-box;
}

.owner-console-logout {
  margin-top: 12px;
  grid-column: 1 / -1;
}

.owner-console-audit {
  max-height: 200px;
  overflow-y: auto;
}

@media (max-width: 720px) {
  .owner-console-dash {
    grid-template-columns: 1fr;
  }
  .owner-console-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(80, 120, 140, 0.28);
    padding-bottom: 8px;
  }
}

/* ——— GLOBAL LEGAL MODAL ——— */

.legal-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  pointer-events: none;
}

.legal-info-overlay:not([hidden]) {
  display: block;
  pointer-events: auto;
}

.legal-info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.legal-info-window {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 28px));
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-window);
  border: var(--window-border-width) solid var(--window-border-color);
  background: var(--ui-legal-window-bg);
  box-shadow: var(--window-shadow-depth);
  overflow: hidden;
}

.legal-info-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 38px 14px 16px;
  border-bottom: 1px solid var(--ui-legal-header-border);
  flex-shrink: 0;
}

.legal-info-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.legal-info-close {
  cursor: pointer;
}

.legal-info-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ui-legal-tabs-border);
  flex-shrink: 0;
}

.legal-tab {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--ui-legal-tab-border);
  background: var(--ui-legal-tab-bg);
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.legal-tab.active {
  border-color: var(--ui-legal-tab-active-border);
  color: var(--ui-legal-tab-active-color);
  box-shadow: 0 0 12px rgba(58, 166, 255, 0.12);
}

.legal-info-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 18px 20px;
  font-size: var(--font-sm);
  line-height: 1.55;
  color: var(--ui-legal-body-color);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.legal-info-seal {
  flex-shrink: 0;
  align-self: center;
  pointer-events: none;
}

.legal-info-body h3 {
  margin: 0 0 10px;
  font-size: var(--font-md);
  color: var(--ui-legal-body-h3-color);
}

.legal-info-body p {
  margin: 0 0 12px;
}

.legal-info-body ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.legal-info-foot {
  margin: 0;
  padding: 12px 14px 14px 16px;
  font-size: 11px;
  color: var(--ui-legal-foot-color);
  border-top: 1px solid var(--ui-legal-foot-border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  line-height: 1.5;
  flex-shrink: 0;
}

.legal-info-foot-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.legal-info-foot-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ui-legal-foot-brand-color);
  font-size: 11px;
}

.legal-emblem-c--foot {
  flex-shrink: 0;
  width: auto;
  height: auto;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.legal-emblem-c--foot .legal-emblem-inner {
  font-size: 2em;
}

.legal-info-foot-warn {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ui-legal-foot-warn-color);
  max-width: 36em;
}

/* ——— Legal doc body (modal + standalone) ——— */

.legal-doc-header {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(58, 166, 255, 0.22);
  background: rgba(8, 24, 20, 0.55);
  font-size: 12px;
  line-height: 1.5;
}

.legal-doc-header p {
  margin: 0 0 6px;
}

.legal-doc-header p:last-child {
  margin-bottom: 0;
}

.legal-doc-kicker {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px !important;
}

.legal-doc-registry {
  margin-top: 8px !important;
  opacity: 0.92;
}

.legal-doc-meta {
  font-size: 11px;
  opacity: 0.75;
  margin-bottom: 14px !important;
}

.legal-doc-quote {
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 8px 8px 0;
}

.legal-inline-link,
.mnm-cookie-consent__link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--green);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.legal-doc-list-compact {
  font-size: 0.95em;
}

.legal-info-body h4 {
  margin: 16px 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-legal-body-h3-color);
}

.legal-info-body a {
  color: var(--green);
}

/* Standalone legal pages */

html.legal-standalone-root,
html:has(body.legal-standalone-page) {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
}

body.legal-standalone-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: #060a09;
  color: #d8f5e8;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  height: auto !important;
}

body.legal-standalone-page .legal-standalone-main.legal-info-body {
  flex: none !important;
  min-height: unset !important;
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
}

.legal-standalone-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(80, 120, 140, 0.25);
}

.legal-standalone-back {
  color: var(--green, #5fd4a0);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.legal-standalone-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.legal-standalone-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 20px 32px;
  border-top: 1px solid rgba(80, 120, 140, 0.25);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(200, 230, 210, 0.75);
}

.legal-standalone-registry {
  margin: 0 0 12px;
}

.site-legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.site-legal-footer-links a {
  color: var(--green, #5fd4a0);
}

.legal-standalone-copy {
  margin: 0;
  opacity: 0.8;
}

.profile-legal-registry,
.my-page-legal-registry {
  display: block;
  font-size: 10px;
  opacity: 0.72;
  margin-top: 4px;
}

/* Cookie consent banner */

.mnm-cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6000;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(4, 12, 10, 0.96);
  border-top: 1px solid rgba(58, 166, 255, 0.28);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.mnm-cookie-consent__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.mnm-cookie-consent__text {
  margin: 0;
  flex: 1 1 280px;
  font-size: 12px;
  line-height: 1.5;
  color: #c8e8d8;
}

.mnm-cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mnm-cookie-consent__btn {
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .mnm-cookie-consent__actions {
    width: 100%;
  }
  .mnm-cookie-consent__btn {
    flex: 1 1 auto;
  }
}

/* © in circle + shared TM line (MY PAGE, legal modal, feature map footer) */
.legal-emblem-c {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  vertical-align: middle;
}

.legal-emblem-c--sm {
  width: auto;
  height: auto;
  min-width: 0;
  border: none;
}

.legal-emblem-c--system {
  width: auto;
  height: auto;
  min-width: 0;
  border: none;
}

.legal-emblem-c--system .legal-emblem-inner {
  font-size: 1.2em;
  font-weight: 400;
}

.legal-emblem-inner {
  font-size: 1.1em;
  line-height: 1;
  font-weight: 400;
  color: var(--ui-legal-emblem-inner-color);
}

.legal-doc-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 0;
  margin-right: 6px;
  border: none;
  border-radius: 0;
  font-size: 1.1em;
  font-weight: 400;
  vertical-align: middle;
  background: transparent;
  color: var(--ui-legal-emblem-inner-color);
}

/* ——— TRAVEL FORUM (center column replaces map) ——— */

.travel-forum-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-height: 0;
  height: 100%;
  padding: var(--space-10);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ui-forum-border);
  background: var(--ui-forum-bg);
  box-shadow: var(--ui-forum-shadow);
  isolation: isolate;
}

.tf-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 18% 12%, rgba(58, 166, 255, 0.1) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 82% 88%, rgba(125, 252, 138, 0.07) 0%, transparent 52%),
    linear-gradient(168deg, rgba(8, 16, 20, 0.35) 0%, rgba(2, 6, 8, 0.12) 55%, transparent 100%);
  opacity: var(--ui-tf-aurora-opacity);
  animation: none;
  pointer-events: none;
  z-index: 0;
}

.tf-scanlines {
  display: none;
  pointer-events: none;
  z-index: 1;
  opacity: var(--ui-tf-scanlines-opacity);
  mix-blend-mode: normal;
}

.travel-forum-panel > .tf-header,
.travel-forum-panel > .tf-tabs,
.travel-forum-panel > .tf-toolbar,
.travel-forum-panel > .tf-toolbar-hint,
.travel-forum-panel > .tf-layout,
.travel-forum-panel > .tf-footer {
  position: relative;
  z-index: 72;
  pointer-events: auto;
}

.travel-forum-panel,
.travel-forum-panel .tf-card,
.travel-forum-panel .tf-card-title,
.travel-forum-panel .tf-card-meta,
.travel-forum-panel .tf-card-excerpt,
.travel-forum-panel .tf-thread-comment,
.travel-forum-panel .tf-thread-input,
.travel-forum-panel .tf-thread-send,
.travel-forum-panel .tf-media-btn,
.travel-forum-panel .tf-sort-select,
.travel-forum-panel .tf-search {
  font-family: var(--font-premium-ui);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Forum readability bump (without layout break) */
.travel-forum-panel {
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 13px;
  --font-lg: 15px;
  --tf-control-h: 36px;
  --tf-control-radius: var(--radius-sm);
  --tf-control-pad-x: 12px;
}

.travel-forum-panel .tf-card-meta,
.travel-forum-panel .tf-sort-label-text,
.travel-forum-panel .tf-thread-comment,
.travel-forum-panel .tf-thread-input::placeholder {
  letter-spacing: 0.03em;
}

/* My Page / Messages text smoothing and slight upsize */
.my-page-shell,
.my-page-shell .message-chat,
.my-page-shell .message-chat-log,
.my-page-shell .message-chat-input,
.my-page-shell .message-dialogs {
  font-family: var(--font-mypage);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.my-page-shell .msg-dialog-name,
.my-page-shell .msg-text,
.my-page-shell .message-chat-input textarea#msgInput,
.my-page-shell .tf-composer-textarea {
  font-size: 14px;
  line-height: 1.45;
}

.tf-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  padding-right: 34px;
}

.tf-header-main {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.tf-logo-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #1a2830 0, #050a0c 70%);
  border: 1px solid rgba(125, 252, 138, 0.45);
  box-shadow: 0 0 0 1px rgba(58, 166, 255, 0.25),
    0 0 24px rgba(58, 166, 255, 0.25), inset 0 0 20px rgba(125, 252, 138, 0.08);
  color: var(--green);
  font-size: 22px;
  animation: tf-pulse-ring 4.8s ease-in-out infinite;
}

@keyframes tf-pulse-ring {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(58, 166, 255, 0.25),
      0 0 24px rgba(58, 166, 255, 0.25), inset 0 0 20px rgba(125, 252, 138, 0.08);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.45),
      0 0 36px rgba(125, 252, 138, 0.2), inset 0 0 20px rgba(58, 166, 255, 0.12);
  }
}

.tf-title {
  font-size: 16px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow: 0 0 8px rgba(58, 166, 255, 0.35);
}

.tf-subtitle {
  margin-top: 4px;
  font-size: var(--font-xs);
  color: var(--accent-olive);
  letter-spacing: 0.06em;
  max-width: 42ch;
}

.tf-close-btn {
  cursor: pointer;
  flex-shrink: 0;
}

.tf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tf-tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ui-tf-tab-border);
  background: var(--ui-tf-tab-bg);
  color: var(--ui-tf-tab-color);
  font-size: var(--font-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.12s ease;
}

.tf-tab:hover {
  color: var(--text-main);
  border-color: var(--ui-tf-tab-hover-border);
  transform: translateY(-1px);
}

.tf-tab.active {
  color: var(--ui-tf-tab-active-color);
  border-color: var(--ui-tf-tab-active-border);
  box-shadow: var(--ui-tf-tab-active-shadow);
  background: var(--ui-tf-tab-active-bg);
}

.tf-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
  padding-right: 4px;
}

.tf-search {
  flex: 1 1 180px;
  min-width: 140px;
  height: var(--tf-control-h);
  box-sizing: border-box;
  padding: 0 var(--tf-control-pad-x);
  border-radius: var(--tf-control-radius);
  border: 1px solid var(--ui-tf-search-border);
  background: var(--ui-tf-search-bg);
  color: var(--text-main);
  font-size: var(--font-sm);
  outline: none;
}

.tf-search:focus {
  border-color: rgba(58, 166, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(58, 166, 255, 0.15);
}

.tf-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--tf-control-h);
  box-sizing: border-box;
  padding: 0 var(--tf-control-pad-x);
  border-radius: var(--tf-control-radius);
  border: 1px solid var(--ui-tf-action-btn-border);
  background: var(--ui-tf-action-btn-bg);
  color: var(--ui-tf-action-btn-color);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.tf-share-btn:hover {
  box-shadow: var(--ui-tf-top-btn-hover-shadow);
  transform: translateY(-1px);
}

.tf-sort-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--tf-control-h);
  box-sizing: border-box;
  padding: 0 8px 0 10px;
  border-radius: var(--tf-control-radius);
  border: 1px solid var(--ui-tf-sort-select-border);
  background: var(--ui-tf-sort-select-bg);
}

.tf-sort-label-text {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--accent-olive);
  white-space: nowrap;
}

.tf-sort-select {
  max-width: 108px;
  height: calc(var(--tf-control-h) - 10px);
  box-sizing: border-box;
  padding: 0 6px;
  border-radius: calc(var(--tf-control-radius) - 1px);
  border: 1px solid var(--ui-tf-sort-select-border);
  background: var(--ui-tf-sort-select-bg);
  color: var(--text-main);
  font-size: var(--font-xs);
  outline: none;
  cursor: pointer;
  color-scheme: var(--my-page-color-scheme, dark);
}
.tf-sort-select option {
  background: var(--my-page-select-option-bg);
  color: var(--my-page-select-option-color);
}

.tf-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--tf-control-h);
  box-sizing: border-box;
  padding: 0 var(--tf-control-pad-x);
  border-radius: var(--tf-control-radius);
  border: 1px solid var(--ui-tf-top-btn-border);
  background: var(--ui-tf-top-btn-bg);
  color: var(--ui-tf-top-btn-color);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.tf-top-btn:hover {
  box-shadow: var(--ui-tf-top-btn-hover-shadow);
}

/* When toolbar wraps / overflows, pin TOP as a floating corner control (do not drop it into a new row below). */
.tf-toolbar .tf-top-btn.tf-top-btn--float {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 5;
  margin: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.tf-thread-hdr-row {
  display: block;
  width: 100%;
  min-width: 0;
  padding-right: 44px;
  box-sizing: border-box;
}

.tf-thread-hdr-main {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.tf-thread-hdr-main > strong {
  display: block;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  min-width: 0;
}

.tf-thread-back-parent {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(143, 211, 255, 0.92);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-thread-back-parent:hover {
  color: var(--green);
}

.tf-thread-copy-btn {
  flex-shrink: 0;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(80, 180, 255, 0.4);
  background: rgba(3, 10, 18, 0.95);
  color: #8fd3ff;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}

.tf-thread-copy-btn:hover {
  border-color: rgba(125, 252, 138, 0.55);
  color: var(--green);
}

.tf-feed-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: var(--font-sm);
  line-height: 1.5;
}

.tf-layout {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: var(--space-10);
  flex: 1;
  min-height: 0;
}

@media (max-width: 900px) {
  .tf-layout {
    grid-template-columns: 1fr;
  }

  .tf-sidebar {
    order: 2;
  }
}

.tf-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--ui-tf-sidebar-border);
  background: var(--ui-tf-sidebar-bg);
  min-height: 0;
  overflow-y: auto;
}

.tf-side-label {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ui-tf-side-label-color);
  text-transform: uppercase;
}

.tf-hot-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tf-hot-item {
  font-size: var(--font-xs);
  color: var(--ui-tf-hot-item-color);
  padding: 6px 0;
  border-bottom: 1px solid var(--ui-tf-hot-item-border);
  cursor: pointer;
  transition: color 0.15s ease;
}

.tf-hot-item:hover {
  color: var(--blue);
}

.tf-hot-item--geo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tf-hot-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-hot-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tf-hot-heat {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(58, 166, 255, 0.25);
}

.tf-hot-count {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ui-tf-hot-count-color);
}

.tf-hot-item--low .tf-hot-heat {
  background: #5fb3ff;
}

.tf-hot-item--mid .tf-hot-heat {
  background: #ffd95a;
  box-shadow: 0 0 10px rgba(255, 217, 90, 0.35);
}

.tf-hot-item--high .tf-hot-heat {
  background: #ff6f5f;
  box-shadow: 0 0 10px rgba(255, 111, 95, 0.4);
}

.tf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tf-tag {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-tf-tag-border);
  background: var(--ui-tf-tag-bg);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ui-tf-tag-color);
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.tf-tag:hover {
  border-color: var(--ui-tf-tag-border);
  color: var(--ui-tf-tag-color);
  background: var(--ui-tf-tag-hover-bg);
  box-shadow: none;
}

.tf-feed {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, var(--space-8));
  padding-right: 4px;
}

.tf-card {
  position: relative;
  padding: clamp(10px, 1.6vh, var(--space-10));
  border-radius: var(--radius-md);
  border: 1px solid var(--ui-tf-card-border);
  background: var(--ui-tf-card-bg);
  box-shadow: var(--ui-tf-card-shadow);
  transition: transform 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, background 0.18s ease;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: min-content;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
}

.tf-card:hover {
  transform: translateY(-2px);
  border-color: var(--ui-tf-card-hover-border);
  box-shadow:
    var(--ui-tf-card-hover-shadow),
    inset 3px 0 0 rgba(125, 252, 160, 0.8);
  background: rgba(12, 32, 24, 0.42);
}

.tf-card--sponsored {
  cursor: default;
}

.tf-card--sponsored:hover {
  transform: none;
  box-shadow: var(--ui-tf-card-shadow);
  background: var(--ui-tf-card-sponsored-bg);
}

@media (prefers-reduced-motion: reduce) {
  .tf-card,
  .tf-card:hover,
  .tf-feed-load-more,
  .tf-thread-subtopic-btn,
  .tf-thread-add-subtopic {
    transition: none !important;
    transform: none !important;
  }
}

.tf-card--sponsored {
  border-color: rgba(143, 211, 255, 0.28);
  background: var(--ui-tf-card-sponsored-bg);
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  contain: layout paint;
}

.tf-card--sponsored .tf-card-title {
  color: var(--ui-tf-card-sponsored-title-color);
}

.tf-card--sponsored .mnm-ad-placeholder,
.tf-card--sponsored .mnm-ad-placeholder--forum,
.mnm-yandex-travel-card {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.tf-feed-load-more {
  display: block;
  width: 100%;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 200, 255, 0.28);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    180deg,
    rgba(12, 28, 38, 0.92),
    rgba(6, 16, 24, 0.96)
  );
  color: rgba(200, 240, 255, 0.95);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tf-feed-load-more:hover {
  color: #fff;
  border-color: rgba(120, 230, 255, 0.5);
  box-shadow: 0 0 18px rgba(60, 180, 220, 0.18);
}

.tf-feed-load-more:focus-visible {
  outline: 1px solid rgba(125, 252, 138, 0.55);
  outline-offset: 2px;
}

.tf-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: clamp(8px, 1.2vh, 10px);
  min-width: 0;
}

.tf-card-title {
  font-size: clamp(13px, 1.5vw, var(--font-lg));
  color: var(--text-main);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.tf-card-meta {
  font-size: var(--font-xs);
  color: var(--accent-olive);
  letter-spacing: 0.06em;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tf-card-excerpt {
  font-size: clamp(11px, 1.2vw, var(--font-sm));
  color: var(--text-dim);
  line-height: 1.5;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tf-card-footer {
  margin-top: clamp(10px, 1.4vh, var(--space-8));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: var(--font-xs);
  color: var(--accent-olive);
  min-width: 0;
}

.tf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(58, 166, 255, 0.35);
  color: var(--blue);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tf-pill--friends {
  border-color: rgba(255, 180, 90, 0.45);
  color: #ffc978;
}

.tf-thread-share-btn {
  border-color: rgba(80, 180, 255, 0.45);
  color: #8fd3ff;
  background: rgba(58, 166, 255, 0.08);
}

.tf-thread-share-btn:hover {
  border-color: rgba(125, 252, 138, 0.5);
  color: var(--green);
}

.tf-footer {
  padding-top: var(--space-4);
  border-top: 1px solid rgba(80, 140, 100, 0.25);
}

.tf-footer-hint {
  font-size: var(--font-xs);
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.tf-toolbar--wrap {
  flex-wrap: wrap;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ui-tf-toolbar-border);
  background: var(--ui-tf-toolbar-bg);
  box-shadow: var(--ui-tf-toolbar-shadow);
}

.tf-toolbar-hint {
  margin: 0 0 var(--space-8);
  font-size: var(--font-xs);
  line-height: 1.45;
  color: var(--accent-olive);
  letter-spacing: 0.04em;
  max-width: 720px;
}

.tf-geo-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--space-8);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-tf-geo-border);
  background: var(--ui-tf-geo-bg);
}

.tf-geo-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--blue);
}

.tf-geo-sep {
  font-size: 10px;
  color: var(--ui-tf-geo-sep-color);
}

.tf-geo-crumb,
.tf-geo-back {
  border: 1px solid var(--ui-tf-geo-crumb-border);
  border-radius: var(--radius-sm);
  background: var(--ui-tf-geo-crumb-bg);
  color: var(--ui-tf-geo-crumb-color);
  font-size: 10px;
  padding: 4px 8px;
  cursor: pointer;
}

.tf-geo-crumb:hover,
.tf-geo-back:hover {
  border-color: rgba(125, 252, 138, 0.55);
  color: var(--green);
}

.tf-geo-back {
  margin-left: auto;
}

.tf-new-topic-btn,
.tf-rules-btn,
.tf-toolbar .tf-share-btn,
.tf-toolbar .tf-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--tf-control-h);
  box-sizing: border-box;
  padding: 0 var(--tf-control-pad-x);
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-tf-action-btn-border);
  background: var(--ui-tf-action-btn-bg);
  color: var(--ui-tf-action-btn-color);
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.tf-new-topic-btn i,
.tf-rules-btn i {
  flex-shrink: 0;
  opacity: 0.95;
}

.tf-rules-btn {
  border-color: var(--ui-tf-rules-btn-border);
  background: var(--ui-tf-action-btn-bg);
  color: var(--ui-tf-rules-btn-color);
}

.tf-new-topic-btn:hover,
.tf-rules-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(58, 166, 255, 0.2);
}

.travel-forum-panel .tf-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
  overscroll-behavior: contain;
  pointer-events: none;
}

.travel-forum-panel #tfThreadOverlay.tf-modal-overlay {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.travel-forum-panel .tf-modal-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.travel-forum-panel .tf-modal-overlay:not([hidden]) {
  z-index: 260;
  pointer-events: auto;
}

.travel-forum-panel.is-thread-open > .tf-header,
.travel-forum-panel.is-thread-open > .tf-tabs,
.travel-forum-panel.is-thread-open > .tf-toolbar,
.travel-forum-panel.is-thread-open > .tf-toolbar-hint,
.travel-forum-panel.is-thread-open > .tf-geo-breadcrumb,
.travel-forum-panel.is-thread-open > .tf-layout,
.travel-forum-panel.is-thread-open > .tf-footer,
.travel-forum-panel.is-forum-modal-open > .tf-header,
.travel-forum-panel.is-forum-modal-open > .tf-tabs,
.travel-forum-panel.is-forum-modal-open > .tf-toolbar,
.travel-forum-panel.is-forum-modal-open > .tf-toolbar-hint,
.travel-forum-panel.is-forum-modal-open > .tf-geo-breadcrumb,
.travel-forum-panel.is-forum-modal-open > .tf-layout,
.travel-forum-panel.is-forum-modal-open > .tf-footer {
  pointer-events: none;
}

.travel-forum-panel.is-thread-open .tf-feed,
.travel-forum-panel.is-forum-modal-open .tf-feed {
  overflow: hidden;
}

.travel-forum-panel .tf-modal-overlay:not([hidden]) .tf-modal-backdrop {
  pointer-events: auto;
}

.travel-forum-panel .tf-modal-overlay:not([hidden]) .tf-modal-window {
  pointer-events: auto;
}

#tfThreadOverlay {
  overscroll-behavior: contain;
}

.travel-forum-panel #tfThreadOverlay.tf-modal-overlay:not([hidden]) .tf-modal-backdrop {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.travel-forum-panel #tfThreadOverlay.tf-modal-overlay:not([hidden]) .tf-modal-window--thread {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  border-radius: 0 !important;
  padding: 0 14px 10px !important;
  background: var(--ui-tf-modal-thread-bg) !important;
  border: none !important;
  box-shadow: none;
  overflow: hidden;
  isolation: isolate;
  background-clip: padding-box;
  flex: 1 1 auto;
}

.travel-forum-panel .tf-modal-overlay:not([hidden]) .tf-modal-backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.travel-forum-panel > .tf-header {
  z-index: 80;
}

.travel-forum-panel .tf-close-btn {
  position: absolute !important;
  top: var(--ui-chrome-corner-inset) !important;
  right: var(--ui-chrome-corner-inset) !important;
  left: auto !important;
  z-index: 90;
  pointer-events: auto;
  cursor: pointer;
}

html.tf-thread-open,
html.tf-modal-open,
body.tf-thread-open,
body.tf-modal-open {
  overflow: hidden !important;
  height: 100%;
}

.app-shell.is-forum-bg-locked {
  overflow: hidden !important;
  height: 100vh;
  height: 100dvh;
}

.app-shell.is-forum-bg-locked .left-panel,
.app-shell.is-forum-bg-locked .map-panel,
.app-shell.is-forum-bg-locked .center-panel,
.app-shell.is-forum-bg-locked .right-panel-wrapper {
  overflow: hidden !important;
}

.travel-forum-panel.is-forum-modal-open {
  overflow: hidden;
}

.tf-modal-overlay[hidden] {
  display: none !important;
}

.tf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.tf-modal-window {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(80vh, 520px);
  overflow-y: auto;
  padding: var(--space-14);
  border-radius: var(--radius-window);
  border: var(--window-border-width) solid var(--window-border-color);
  background: var(--ui-tf-modal-bg);
  box-shadow: var(--window-shadow-depth);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tf-modal-window--thread {
  width: 100%;
  min-width: 0;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 14px 10px;
  border-radius: 0 !important;
  background: var(--ui-tf-modal-thread-bg) !important;
  border: none !important;
  box-shadow: none;
  overflow-wrap: normal;
  word-break: normal;
}

.tf-modal-window--newtopic {
  width: min(520px, calc(100vw - 24px));
  height: auto;
  max-height: min(92vh, 860px);
  padding: 0 16px 16px;
  padding-top: 0;
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
  background-clip: padding-box;
  box-sizing: border-box;
}

.tf-modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-right: 34px;
}

.tf-modal-head--centered {
  justify-content: center;
  min-height: 44px;
  margin: 0 0 12px;
  padding: 12px calc(var(--ui-chrome-size, 20px) + 18px);
  border-bottom: 1px solid rgba(125, 252, 138, 0.2);
  box-sizing: border-box;
}

.tf-modal-head--centered .tf-modal-title {
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  letter-spacing: 0.06em;
  font-family: var(--font-main, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif);
  font-weight: 650;
  font-size: 0.82rem;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

.tf-modal-head--centered .tf-modal-close.ui-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 5;
  transform: none !important;
}

.tf-modal-window--rules {
  padding-top: 0 !important;
}

.tf-modal-window--rules .tf-rules-list {
  margin: 0 0 12px;
  padding: 0 4px 0 1.1em;
  font-family: var(--font-main, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(210, 230, 220, 0.88);
  -webkit-font-smoothing: antialiased;
}

.tf-modal-window--rules .tf-rules-list li {
  margin: 0 0 8px;
}

.tf-modal-window--rules .tf-rules-list li:last-child {
  margin-bottom: 0;
}

.tf-modal-window--rules .tf-rules-foot {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(125, 252, 138, 0.14);
  font-size: 11px;
  line-height: 1.45;
  color: rgba(125, 252, 138, 0.78);
}

.tf-modal-head--newtopic {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 0 10px;
  padding: 12px calc(var(--ui-chrome-size, 20px) + 18px);
  border-bottom: 1px solid rgba(125, 252, 138, 0.22);
  background: var(--ui-tf-modal-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
}

.tf-modal-head--newtopic .tf-modal-title {
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  letter-spacing: 0.06em;
  font-family: var(--font-main, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif);
  font-weight: 650;
  line-height: 1.2;
}

.tf-modal-head--newtopic .tf-modal-close.ui-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  z-index: 4;
  margin: 0 !important;
  transform: none !important;
}

#tfNewTopicBody {
  min-height: 100px;
  max-height: 220px;
  resize: vertical;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tf-modal-window--newtopic {
  overflow-x: hidden;
  max-height: min(92vh, 720px);
  overflow-y: auto;
  box-sizing: border-box;
}

.tf-modal-close {
  cursor: pointer;
}

.tf-modal-title {
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--space-10);
  padding-right: 40px;
}

.tf-rules-list {
  margin: 0 0 var(--space-8) 1em;
  padding: 0;
  font-size: var(--font-sm);
  color: var(--text-dim);
  line-height: 1.5;
}

.tf-rules-foot {
  font-size: var(--font-xs);
  color: var(--accent-olive);
  margin: 0;
}

.tf-form-label {
  display: block;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--accent-olive);
  margin: 8px 0 4px;
  text-transform: uppercase;
}

.tf-form-input,
.tf-form-textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.5);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-size: var(--font-sm);
}

.tf-geo-suggest {
  margin-top: 4px;
  border: 1px solid rgba(90, 180, 220, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(5, 11, 9, 0.98);
  max-height: 168px;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 5;
  position: relative;
}

.tf-geo-suggest-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(80, 120, 90, 0.25);
  background: transparent;
  color: var(--text-main);
  text-align: left;
  padding: 8px 9px;
  font-size: var(--font-sm);
  cursor: pointer;
}

.tf-geo-suggest-item:last-child {
  border-bottom: 0;
}

.tf-geo-suggest-item:hover,
.tf-geo-suggest-item:focus-visible {
  background: rgba(125, 252, 138, 0.08);
  outline: none;
}

.tf-geo-suggest-item.is-active {
  background: rgba(125, 252, 138, 0.14);
  color: #dfffe7;
}

.tf-form-submit {
  margin-top: var(--space-10);
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(125, 252, 138, 0.5);
  border-radius: var(--radius-sm);
  background: rgba(125, 252, 138, 0.12);
  color: var(--green);
  font-size: var(--font-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}

@media (max-height: 840px) {
  .tf-modal-window--newtopic {
    height: min(94vh, 820px);
    max-height: 94vh;
  }
}

@media (max-height: 760px) {
  #tfNewTopicOverlay {
    padding: 6px;
  }

  .tf-modal-window--newtopic {
    width: min(560px, calc(100vw - 20px));
    height: auto;
    max-height: 96vh;
    padding: 0 14px 14px;
  }

  .tf-modal-head--newtopic {
    padding: 8px 8px 7px;
    margin: 0 0 8px;
  }

  .tf-form-label {
    margin: 6px 0 3px;
  }

  .tf-form-input,
  .tf-form-textarea {
    padding: 7px 9px;
  }

  #tfNewTopicBody {
    min-height: 84px;
    max-height: 140px;
  }

  .tf-compose-tools {
    gap: 6px;
    margin-top: 8px;
  }

  .tf-form-submit {
    margin-top: 8px;
    padding: 9px;
  }
}

.tf-thread-hdr-main .tf-card-excerpt {
  display: none; /* full body rendered in comments as .tf-thread-op-post */
}

.tf-thread-op-post {
  padding: 14px 14px 12px !important;
  border-color: rgba(90, 180, 220, 0.35) !important;
  background: rgba(10, 28, 40, 0.55) !important;
  font-size: clamp(12px, 1.28vw, 13.5px) !important;
  line-height: 1.55 !important;
  color: rgba(235, 245, 250, 0.96) !important;
  margin-bottom: 4px;
}

.tf-thread-op-post .tf-thread-op-label {
  display: block;
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(140, 210, 240, 0.85);
}

.tf-thread-op-post .tf-thread-op-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.55;
  min-width: 0;
  max-width: 100%;
}

/* Feed list cards keep short preview */
.tf-card > .tf-card-excerpt,
.mnm-forum-card .tf-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  max-height: none;
}

.tf-thread-sticky-top {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -14px 4px;
  padding: 6px 40px 6px 10px;
  border-bottom: 1px solid var(--ui-tf-modal-thread-border, rgba(125, 252, 138, 0.22));
  background: var(--ui-tf-modal-thread-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  flex: 0 0 auto;
  max-height: min(38vh, 280px);
  overflow-x: hidden;
  overflow-y: auto;
}

.tf-thread-header {
  font-size: var(--font-md);
  color: var(--text-main);
  margin-bottom: 2px;
  padding-right: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tf-thread-back-parent {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 5px 8px;
  border: none;
  background: rgba(8, 22, 32, 0.65);
  color: rgba(143, 211, 255, 0.92);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px;
}

.tf-thread-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.tf-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  min-height: 24px;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 64, 96, 0.4);
  background: rgba(255, 64, 96, 0.06);
  color: #ff8a9e;
  cursor: pointer;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.tf-like-btn.is-liked {
  border-color: rgba(255, 217, 90, 0.6);
  color: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 217, 90, 0.25);
}

.tf-thread-delete-btn {
  border-color: rgba(255, 100, 110, 0.55) !important;
  color: #ffb0b6 !important;
  background: rgba(80, 16, 22, 0.55) !important;
}

.tf-thread-comments {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
  padding-right: 2px;
}

.tf-thread-compose-shell {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 6px -14px -10px;
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(80, 120, 90, 0.28);
  background: linear-gradient(
    180deg,
    rgba(6, 12, 10, 0.86) 0%,
    rgba(6, 12, 10, 0.95) 22%,
    rgba(6, 12, 10, 0.98) 100%
  );
  backdrop-filter: blur(5px);
  flex: 0 0 auto;
}

.tf-thread-comment {
  padding: 12px 12px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.35);
  background: rgba(0, 0, 0, 0.25);
  font-size: clamp(12px, 1.25vw, 13.5px);
  line-height: 1.55;
  color: rgba(232, 240, 236, 0.96);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.tf-thread-comment strong {
  color: var(--blue);
  font-weight: 600;
}

.tf-thread-comment-line {
  margin: 0 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.55;
  min-width: 0;
  max-width: 100%;
  color: rgba(232, 240, 236, 0.96);
}

.tf-thread-comment-line .tf-author-nick {
  display: inline;
  max-width: 100%;
  margin: 0 2px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(143, 211, 255, 0.96);
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: baseline;
}

.tf-thread-comment-line .tf-author-nick:hover {
  color: #b7e4ff;
  text-decoration: underline;
}

.tf-thread-comment-line .tf-edited-tag {
  opacity: 0.65;
  font-size: 0.88em;
}

.tf-thread-comment-actions {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.tf-comment-react-btn,
.tf-comment-like-btn,
.tf-comment-tomato-btn,
.tf-comment-meh-btn,
.tf-comment-reply-btn,
.tf-comment-report-btn,
.tf-comment-edit-btn,
.tf-comment-delete-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 26px;
  border-radius: 6px;
  font-family: var(--font-main, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  padding: 4px 9px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: none;
  -webkit-font-smoothing: antialiased;
  opacity: 0.92;
  flex: 0 1 auto;
  max-width: 100%;
  white-space: nowrap;
}

.tf-comment-like-btn {
  border: 1px solid rgba(255, 64, 96, 0.35);
  background: rgba(255, 64, 96, 0.06);
  color: #ff9eb5;
}

.tf-comment-like-btn.is-liked,
.tf-comment-like-btn.is-active {
  color: var(--yellow);
  border-color: rgba(255, 217, 90, 0.55);
}

.tf-comment-tomato-btn {
  border: 1px solid rgba(255, 120, 80, 0.4);
  background: rgba(255, 90, 50, 0.08);
  color: #ffb08a;
  text-transform: none;
  letter-spacing: 0;
}

.tf-comment-tomato-btn.is-active {
  color: #ff6b3d;
  border-color: rgba(255, 100, 60, 0.65);
  background: rgba(255, 80, 40, 0.16);
}

.tf-comment-meh-btn {
  border: 1px solid rgba(160, 170, 180, 0.35);
  background: rgba(120, 130, 140, 0.08);
  color: rgba(200, 210, 220, 0.88);
  text-transform: none;
  letter-spacing: 0;
}

.tf-comment-meh-btn.is-active {
  color: #e8eef4;
  border-color: rgba(200, 210, 220, 0.55);
  background: rgba(160, 170, 180, 0.18);
}

.tf-comment-reply-btn,
.tf-comment-edit-btn {
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: rgba(8, 18, 14, 0.92);
  color: rgba(210, 245, 220, 0.92);
}

.tf-comment-reply-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  max-width: min(100%, 220px);
}

.tf-comment-reply-btn:hover,
.tf-comment-edit-btn:hover {
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(14, 32, 22, 0.95);
  color: #eafff0;
}

.tf-comment-report-btn {
  border: 1px solid rgba(255, 140, 120, 0.32);
  background: rgba(28, 12, 12, 0.88);
  color: rgba(255, 190, 175, 0.92);
}

.tf-comment-report-btn:hover {
  border-color: rgba(255, 160, 140, 0.5);
  color: #ffd8ce;
}

.tf-comment-delete-btn {
  border: 1px solid rgba(255, 120, 130, 0.38);
  background: rgba(28, 12, 14, 0.92);
  color: rgba(255, 190, 195, 0.92);
}

.tf-comment-delete-btn:hover {
  border-color: rgba(255, 140, 150, 0.55);
  background: rgba(40, 14, 16, 0.96);
  color: #ffe0e4;
}

.tf-thread-compose {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 200, 90, 0.42);
  border-radius: 12px;
  padding: 6px;
  background: rgba(8, 14, 12, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 190, 70, 0.08);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.tf-thread-compose.is-typing-gold,
.tf-thread-input.is-typing-gold {
  border-color: rgba(255, 220, 120, 0.95) !important;
  box-shadow:
    0 0 0 1px rgba(255, 210, 100, 0.55),
    0 0 14px rgba(255, 190, 70, 0.35) !important;
  animation: tf-thread-gold-pulse 0.22s ease-out;
}

@keyframes tf-thread-gold-pulse {
  0% {
    box-shadow:
      0 0 0 1px rgba(255, 230, 140, 0.9),
      0 0 18px rgba(255, 200, 80, 0.55);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 210, 100, 0.45),
      0 0 10px rgba(255, 190, 70, 0.22);
  }
}

.tf-compose-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
  flex-shrink: 0;
}

#tfThreadMediaPreview {
  flex-shrink: 0;
}

.tf-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tf-emoji-btn {
  border: 1px solid rgba(80, 120, 90, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  padding: 3px 8px;
  cursor: pointer;
}

.tf-media-btn.is-on {
  border-color: rgba(125, 252, 138, 0.55);
  color: var(--green);
}

.tf-emoji-picker {
  display: none !important;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 6px;
  max-height: 170px;
  overflow: auto;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: min(320px, calc(100vw - 56px));
  border: 1px solid rgba(125, 252, 138, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(8, 14, 12, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.tf-emoji-picker[hidden] {
  display: none !important;
}

.tf-emoji-picker button {
  border: 1px solid rgba(80, 120, 90, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  cursor: pointer;
  min-height: 34px;
  font-size: 20px;
}

.tf-media-btn {
  border: 1px solid rgba(58, 166, 255, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(58, 166, 255, 0.1);
  color: var(--blue);
  padding: 5px 10px;
  font-size: var(--font-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tf-forum-polish-btn,
.tf-forum-translate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tf-forum-az {
  font-weight: 700;
  font-size: 0.78em;
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.95;
}

.tf-media-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tf-media-preview-item {
  position: relative;
  width: 112px;
  height: 84px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.35);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.tf-media-preview-item img,
.tf-media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tf-media-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  border: 1px solid rgba(255, 64, 96, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #ff9eb5;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.tf-inline-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.tf-inline-media--feed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
  border-radius: calc(var(--radius-sm) + 2px);
  border: 1px solid rgba(80, 120, 90, 0.2);
  background: linear-gradient(
    180deg,
    rgba(6, 12, 10, 0.72) 0%,
    rgba(4, 8, 7, 0.78) 100%
  );
  min-height: clamp(140px, 24vh, 260px);
  align-items: center;
}

.tf-inline-media--feed.tf-inline-media--single {
  grid-template-columns: 1fr;
}

.tf-inline-media--feed.tf-inline-media--multi {
  grid-auto-rows: minmax(120px, 1fr);
}

.tf-inline-image,
.tf-inline-video {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.35);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
}

.tf-inline-media--feed .tf-inline-image,
.tf-inline-media--feed .tf-inline-video {
  display: block;
  height: 100%;
  max-height: min(44vh, 360px);
  object-fit: contain;
  cursor: zoom-in;
}

.tf-inline-media--feed-cover .tf-inline-image,
.tf-inline-media--feed-cover .tf-inline-video {
  height: 100%;
  max-height: min(42vh, 320px);
  object-fit: cover;
}

.tf-inline-media--thread .tf-inline-image,
.tf-inline-media--thread .tf-inline-video,
.tf-inline-media--comment .tf-inline-image,
.tf-inline-media--comment .tf-inline-video {
  cursor: zoom-in;
}

.tf-media-viewer-window {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  padding: 18px 18px 40px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(58, 166, 255, 0.35);
  background: rgba(5, 10, 8, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tf-media-viewer-body {
  width: 100%;
  height: min(78vh, 680px);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.tf-media-viewer-media {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.4);
  background: rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
  transform-origin: center center;
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.tf-media-viewer-media.is-zoomable {
  cursor: zoom-in;
}

.tf-media-viewer-media.is-zoomed {
  cursor: grab;
}

.tf-media-viewer-media.is-dragging {
  cursor: grabbing;
}

.tf-media-viewer-media.is-fade-in {
  animation: tfMediaFadeIn 0.2s ease;
}

.tf-media-viewer-media.is-slide-left {
  animation: tfMediaSlideLeft 0.24s ease;
}

.tf-media-viewer-media.is-slide-right {
  animation: tfMediaSlideRight 0.24s ease;
}

@keyframes tfMediaFadeIn {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}

@keyframes tfMediaSlideLeft {
  from {
    opacity: 0.35;
    transform: translateX(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes tfMediaSlideRight {
  from {
    opacity: 0.35;
    transform: translateX(-18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.tf-media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  z-index: 3;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.tf-media-nav:disabled {
  opacity: 0.38;
  cursor: default;
}

.tf-media-nav--prev {
  left: 12px;
}

.tf-media-nav--next {
  right: 12px;
}

.tf-media-nav:hover:not(:disabled) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.tf-media-viewer-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent-olive);
}

.tf-media-viewer-thumbs {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 30px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tf-media-viewer-thumb {
  position: relative;
  width: 56px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(80, 120, 90, 0.45);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 auto;
}

.tf-media-viewer-thumb.is-active {
  border-color: rgba(125, 252, 138, 0.7);
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.28);
}

.tf-media-viewer-thumb img,
.tf-media-viewer-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tf-media-viewer-thumb-badge {
  position: absolute;
  left: 4px;
  bottom: 3px;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #cde8ff;
  background: rgba(3, 10, 18, 0.8);
  border: 1px solid rgba(58, 166, 255, 0.4);
  border-radius: 999px;
  padding: 1px 5px;
}

body.tf-media-viewer-open {
  overflow: hidden !important;
}

@media (max-width: 1366px), (max-height: 768px) {
  .tf-toolbar {
    gap: 6px;
  }

  .tf-card {
    padding: 10px;
  }

  .tf-card-footer {
    gap: 6px;
  }

  .tf-inline-media--feed {
    min-height: clamp(128px, 22vh, 220px);
    padding: 5px;
  }

  .tf-media-viewer-body {
    height: min(72vh, 560px);
  }

  .tf-media-viewer-thumbs {
    left: 10px;
    right: 10px;
    gap: 6px;
  }

  .tf-media-viewer-thumb {
    width: 50px;
    height: 36px;
  }
}

.tf-inline-media--thread .tf-inline-image,
.tf-inline-media--thread .tf-inline-video {
  max-height: min(20vh, 150px);
  height: min(20vh, 150px);
  object-fit: cover;
}

.tf-inline-media--thread {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.tf-inline-media--comment .tf-inline-image,
.tf-inline-media--comment .tf-inline-video {
  max-height: min(28vh, 240px);
}

.tf-thread-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 120, 90, 0.5);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-size: var(--font-sm);
}

.tf-thread-send {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(58, 166, 255, 0.45);
  background: rgba(58, 166, 255, 0.15);
  color: var(--blue);
  cursor: pointer;
  font-size: var(--font-xs);
  letter-spacing: 0.1em;
}

.tf-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-6);
}

.tf-post-react-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tf-card-like-inline--react {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 72px;
  min-height: 44px;
  padding: 8px 14px;
  font-size: var(--font-sm);
  border-color: var(--ui-tf-card-react-border);
  background: var(--ui-tf-card-react-bg);
  color: var(--ui-tf-card-react-color);
}

.tf-card-like-inline--react .tf-react-emoji {
  font-size: 22px;
  line-height: 1;
}

.tf-card-like-inline--react .tf-react-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(220, 235, 225, 0.92);
}

.tf-card-like-inline--react.is-liked {
  border-color: rgba(255, 217, 90, 0.55);
  background: rgba(255, 217, 90, 0.1);
  box-shadow: 0 0 12px rgba(255, 217, 90, 0.18);
}

.tf-card-like-inline--react.is-liked .tf-react-count {
  color: var(--yellow);
}

.tf-card-share-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 6px 12px;
  border-color: rgba(255, 217, 90, 0.45);
  background: rgba(255, 217, 90, 0.08);
  color: #ffe9a3;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.tf-card-share-inline i {
  font-size: 11px;
  opacity: 0.95;
}

.tf-card-share-inline:hover {
  border-color: rgba(255, 217, 90, 0.65);
  box-shadow: 0 0 12px rgba(255, 217, 90, 0.2);
}

.tf-card-open-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(58, 166, 255, 0.4);
  background: transparent;
  color: var(--blue);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
}

.tf-card-like-inline {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-tf-card-react-border);
  background: var(--ui-tf-card-react-bg);
  color: var(--ui-tf-card-react-color);
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* Rich chat toolbar (map + My Page) */
.chat-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 0;
  border-top: 1px solid var(--ui-chat-rich-toolbar-border);
}

.chat-rich-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-chat-rich-btn-border);
  background: var(--ui-chat-rich-btn-bg);
  color: var(--ui-chat-rich-btn-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-rich-btn:hover {
  color: var(--ui-chat-rich-btn-hover-color);
  border-color: var(--ui-chat-rich-btn-hover-border);
}

.chat-rich-btn.is-recording {
  color: #ff4060;
  border-color: rgba(255, 64, 96, 0.6);
  animation: chat-rec-pulse 0.8s ease-in-out infinite;
}

@keyframes chat-rec-pulse {
  50% {
    box-shadow: 0 0 12px rgba(255, 64, 96, 0.45);
  }
}

.chat-emoji-popover {
  position: absolute;
  z-index: 10050;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 200px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-chat-emoji-popover-border);
  background: var(--ui-chat-emoji-popover-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.chat-emoji-popover--forum {
  max-width: min(240px, calc(100vw - 16px));
  gap: 6px;
}

.chat-emoji-popover button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.map-mini-msg-media {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  display: block;
  cursor: zoom-in;
}

.chat-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.chat-image-lightbox[hidden] {
  display: none !important;
}

.chat-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

/* Premium unified close: bare cross, glow on hover (Tomato Battle excluded) */
.ui-close {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ui-chrome-size);
  height: var(--ui-chrome-size);
  min-width: var(--ui-chrome-size);
  min-height: var(--ui-chrome-size);
  padding: 0;
  margin: 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  flex-shrink: 0;
  overflow: visible;
  transition: opacity 0.18s ease;
}

.ui-close::before,
.ui-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--ui-close-bar);
  box-shadow: var(--ui-close-bar-glow);
  z-index: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(45deg);
}

.ui-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ui-close:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.ui-close:hover::before,
.ui-close:hover::after {
  background: var(--ui-close-bar-hover);
  box-shadow: var(--ui-close-bar-hover-glow);
}

.ui-close:active {
  transform: translateY(0);
}

.ui-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(128, 226, 160, 0.28),
    0 0 24px rgba(125, 252, 138, 0.32);
}

.fa,
.fas,
.far,
.fab,
[class^="fa-"],
[class*=" fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  font-style: normal;
}

.tf-modal-close.ui-close {
  position: absolute;
  z-index: 4;
}

.chat-image-lightbox-close.ui-close {
  position: absolute;
  z-index: 2;
}

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

.achievement-help-close.ui-close {
  position: absolute;
  z-index: 2;
}

.friend-loc-request-close.ui-close {
  position: absolute;
}

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

.chat-image-lightbox-img {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: min(88vh, 900px);
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid rgba(58, 166, 255, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75), 0 0 40px rgba(125, 252, 138, 0.12);
}

#msgChatLog img,
#mpGroupChatLog img {
  cursor: zoom-in;
}

.map-mini-msg-loc {
  font-size: var(--font-xs);
  color: var(--blue);
  margin-top: 4px;
}

.map-mini-msg-audio {
  width: 100%;
  margin-top: 6px;
}

.message-chat-input .chat-rich-toolbar {
  border-top: none;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* MY PAGE чат: «+» и вертикальное меню вложений */
.msg-chat-plus-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
}

.chat-plus-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chat-plus-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.chat-plus-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 200;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(6, 12, 10, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-plus-menu--premium {
  left: 0;
  right: auto;
  transform: none;
  box-sizing: border-box;
  min-width: 0;
  width: 220px;
  max-width: min(220px, calc(100vw - 16px));
  max-height: none;
  overflow: visible;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(52px, auto);
  gap: 4px;
  border-radius: 12px;
  border-color: rgba(143, 211, 255, 0.34);
  background: linear-gradient(
      165deg,
      rgba(12, 22, 18, 0.97),
      rgba(4, 10, 8, 0.95)
    ),
    radial-gradient(circle at 0 0, rgba(58, 166, 255, 0.1), transparent 55%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(125, 252, 138, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.chat-plus-menu--premium .chat-plus-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  height: 100%;
  padding: 5px 3px;
  border-radius: 9px;
  border: 1px solid rgba(80, 120, 90, 0.25);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(225, 242, 255, 0.92);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  width: 100%;
  box-sizing: border-box;
}

.chat-plus-menu--premium .chat-plus-menu-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(58, 166, 255, 0.12);
  border: 1px solid rgba(58, 166, 255, 0.28);
  font-size: 11px;
  color: rgba(180, 220, 255, 0.95);
}

.chat-plus-menu--premium .chat-plus-menu-label {
  display: block;
  width: 100%;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 1px;
}

.chat-plus-menu--premium .chat-plus-menu-item:hover {
  border-color: rgba(125, 252, 138, 0.45);
  background: rgba(58, 166, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.chat-plus-menu--premium .chat-plus-menu-item.is-recording {
  border-color: rgba(255, 64, 96, 0.55);
  color: #ffb8c8;
}

.chat-plus-menu--premium .chat-plus-menu-item.is-recording .chat-plus-menu-icon {
  color: #ff6080;
  border-color: rgba(255, 64, 96, 0.5);
  animation: chat-rec-pulse 0.8s ease-in-out infinite;
}

.message-chat-input .chat-plus-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  margin: 0;
  font-size: 16px;
  border-color: rgba(125, 252, 138, 0.42);
  color: rgba(125, 252, 138, 0.95);
  box-shadow: 0 0 0 1px rgba(58, 166, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.message-chat-input .chat-plus-btn.is-open {
  border-color: rgba(58, 166, 255, 0.65);
  background: rgba(58, 166, 255, 0.18);
  color: #fff;
  transform: rotate(45deg);
}

.chat-plus-menu[hidden] {
  display: none !important;
}

.chat-plus-menu:not(.chat-plus-menu--premium) button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(220, 240, 230, 0.92);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-plus-menu:not(.chat-plus-menu--premium) button i {
  width: 18px;
  text-align: center;
  color: rgba(143, 211, 255, 0.9);
}

.chat-plus-menu:not(.chat-plus-menu--premium) button:hover {
  background: rgba(58, 166, 255, 0.12);
  color: #fff;
}

.chat-plus-menu:not(.chat-plus-menu--premium) button.is-recording {
  color: #ff8a9a;
}

.chat-plus-menu:not(.chat-plus-menu--premium) button.is-recording i {
  color: #ff4060;
}

/* ===== Premium global UI polish ===== */
.btn-main,
.btn-ghost,
button,
[role="button"]{
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, filter .14s ease, background-color .14s ease;
}
.btn-main:hover,
.btn-ghost:hover,
.btn-square:hover {
  transform: translateY(-1px);
}
.btn-main:hover {
  box-shadow: var(--ui-primary-shadow), var(--ui-glow-primary);
}
.btn-ghost:hover {
  box-shadow: var(--ui-glow-secondary);
  border-color: rgba(123, 184, 245, 0.62);
}
.ui-close:hover,
.photo-album-nav:hover,
.photo-album-fs:hover,
.map-birthhome-pin-wrap:hover .map-birthhome-pin,
.photo-album-nav:active,
.photo-album-fs:active {
  transform: none !important;
}
.ui-close,
.photo-album-fs,
.photo-album-nav,
.map-birthhome-pin-wrap .map-birthhome-pin {
  filter: saturate(1.06) contrast(1.02);
}
.map-birthhome-pin-wrap:hover .map-birthhome-pin--birth {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(255, 150, 70, 0.48),
    0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 220, 180, 0.22);
}
.map-birthhome-pin-wrap:hover .map-birthhome-pin--home {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(68, 214, 168, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(180, 255, 220, 0.2);
}
.btn-main:focus-visible,
.btn-ghost:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline: none;
  box-shadow: var(--ui-focus-ring);
}
body:not(.tomato-mode) .app-data-panel,
body:not(.tomato-mode) .legal-info-window,
body:not(.tomato-mode) .photo-album-frame,
body:not(.tomato-mode) .map-settings-panel {
  box-shadow: var(--window-shadow-depth);
}
body:not(.tomato-mode) .app-data-panel,
body:not(.tomato-mode) .legal-info-window {
  border-color: var(--window-border-color);
}

.terminal-window {
  border-color: var(--window-border-color) !important;
  box-shadow: var(--window-shadow-depth) !important;
}

/* Typography lock for left/right main menus (without logo/intro/Tomato Battle). */
.left-panel,
.right-panel,
.left-panel :not(.logo-main):not(.logo-main *):not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab),
.right-panel :not(.logo-main):not(.logo-main *):not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab) {
  font-family: var(--font-main);
}

.left-panel .panel-title,
.right-panel .panel-title,
.left-panel .panel-subtitle,
.right-panel .panel-subtitle,
.profile-nav-title,
.profile-caption,
.panel-header,
.panel-header-main,
.panel-header-sub {
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.right-panel,
.right-panel .profile-nav-item,
.right-panel .profile-nav-item span,
.right-panel .profile-list li,
.right-panel .profile-sub {
  font-size: 10px;
  line-height: 1.22;
}

/* Unified top-right close placement for panel headers/modals. */
.app-data-header .ui-close,
.friend-rank-header .ui-close,
.travel-routes-header .ui-close,
.friends-online-header .ui-close,
.legal-info-header .ui-close {
  position: absolute;
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
}

.notifications-header .notifications-close.ui-close {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.tf-modal-close.ui-close,
.chat-image-lightbox-close.ui-close,
.match-close.ui-close,
.achievement-help-close.ui-close,
.friend-loc-request-close.ui-close,
.map-settings-close-btn.ui-close,
.map-mini-chat-close.ui-close,
.ai-planner-close.ui-close,
.country-hub-panel-close.ui-close,
.hub-map-viewer-close.ui-close,
.nodus-profile-close.ui-close,
.dev-hub-close.ui-close,
.map-users-close.ui-close,
.tf-close-btn.ui-close,
.notebook-head-btn--close.ui-close,
.mp-newchat-close.ui-close,
.legal-info-close.ui-close,
.mnm-report-close.ui-close,
.mnm-story-close.ui-close,
.terminal-close.ui-close,
.app-data-close.ui-close,
.friend-rank-close.ui-close,
.travel-routes-close.ui-close,
.friends-online-close.ui-close,
.app-data-shell-close.ui-close {
  position: absolute !important;
  left: auto !important;
  bottom: auto !important;
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
  margin: 0 !important;
  z-index: 4;
}

.app-data-shell-close.ui-close,
.app-data-close.ui-close,
.friend-rank-close.ui-close,
.travel-routes-close.ui-close,
.notifications-close.ui-close,
.friends-online-close.ui-close,
.map-users-close.ui-close,
.map-mini-chat-close.ui-close,
.ai-planner-close.ui-close,
.dev-hub-close.ui-close,
.photo-album-close.ui-close,
.notebook-head-btn--close.ui-close,
.tf-close-btn.ui-close {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.app-data-header:not(.app-data-header--centered) {
  padding-right: 120px;
}

.friends-online-header,
.friend-rank-header,
.travel-routes-header,
.legal-info-header {
  padding-right: calc(var(--ui-chrome-size) + var(--ui-chrome-inset) + 8px);
}

.travel-routes-list,
.friend-rank-list,
.left-panel .app-data-panel--split-shell,
.left-panel .app-data-panel--split-shell .app-data-split-main,
.legal-info-body {
  scrollbar-gutter: stable;
}

.travel-routes-list::-webkit-scrollbar-track,
.friend-rank-list::-webkit-scrollbar-track,
.achievements-panel-scroll::-webkit-scrollbar-track,
.left-panel .app-data-panel--split-shell::-webkit-scrollbar-track,
.left-panel .app-data-panel--split-shell .app-data-split-main::-webkit-scrollbar-track,
.left-panel .app-data-settings-rail::-webkit-scrollbar-track,
.left-panel .app-data-detail-body::-webkit-scrollbar-track,
.left-panel .app-data-home-view::-webkit-scrollbar-track,
.legal-info-body::-webkit-scrollbar-track {
  margin-block: var(--mnm-scroll-rail-inset-rounded, 26px);
  background: transparent;
  border-radius: 99px;
}
.map-hover-tip .mapboxgl-popup-content{
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.left-panel,
.right-panel,
.map-panel,
.tf-modal-window,
.chat-plus-menu,
.notifications-panel,
.travel-routes-panel,
.app-data-panel{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Thread modal: global rule above must not crush titles to one char per line */
.travel-forum-panel .tf-modal-window--thread,
.tf-modal-window.tf-modal-window--thread {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.travel-forum-panel .tf-modal-window--thread .tf-thread-header,
.travel-forum-panel .tf-modal-window--thread .tf-thread-hdr-main,
.travel-forum-panel .tf-modal-window--thread .tf-thread-hdr-row,
.travel-forum-panel .tf-modal-window--thread .tf-card-title,
.travel-forum-panel .tf-modal-window--thread .tf-card-meta,
.travel-forum-panel .tf-modal-window--thread .tf-card-excerpt {
  width: 100%;
  max-width: 100%;
  overflow-wrap: normal !important;
  word-break: normal !important;
  white-space: normal;
}

/* ============================ */
/* Shared expenses overlay UX  */
/* ============================ */
#splitExpensesOverlay .app-data-panel {
  width: min(1020px, 96vw) !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 14px auto 22px !important;
  padding: 14px 14px 18px !important;
  border-radius: var(--radius-window);
  border: var(--window-border-width) solid var(--window-border-color);
  background: #0f1826;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

#splitExpensesOverlay {
  position: fixed;
  inset: 0;
  z-index: 10080;
  overflow-y: auto;
  align-items: flex-start;
  padding: 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: 32px;
  background: #0b1220;
}

#splitExpensesOverlay .app-data-backdrop {
  display: none !important;
}

#splitExpensesOverlay .split-panel {
  display: block;
  font-family: var(--font-main);
  width: min(1020px, 96vw) !important;
  margin: 14px auto 22px !important;
  padding-bottom: 0 !important;
  background: transparent;
  border: none;
  border-left: none;
  border-right: none;
  box-shadow: none;
  position: static;
  z-index: auto;
}

#splitExpensesOverlay .split-section--expenses {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(143, 211, 255, 0.14);
  clear: both;
}

#splitExpensesOverlay .split-section--expenses .feature-map-section-title {
  margin: 0 !important;
  padding: 0 2px;
}

#splitExpensesOverlay #splitExpensesSearch {
  display: block;
  width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

#splitExpensesOverlay #splitExpensesSearch:focus {
  transform: none !important;
  box-shadow: 0 0 0 1px rgba(143, 211, 255, 0.34), 0 0 14px rgba(58, 166, 255, 0.22);
}

#splitExpensesOverlay #splitExpensesList {
  margin: 0 !important;
  min-height: 52px;
  max-height: 220px !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(184, 219, 255, 0.12);
  border-radius: 10px;
  background: #111b2b;
}

#splitExpensesOverlay .split-tools {
  margin-top: 16px;
  margin-bottom: 0;
  display: block;
}

#splitExpensesOverlay .split-section--share {
  margin-top: 14px;
  padding-bottom: 8px;
}

#splitExpensesOverlay .share-social-grid {
  margin: 12px 2px 4px;
}

#splitExpensesOverlay .split-panel-scroll-end {
  height: calc(16px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  pointer-events: none;
}

#splitExpensesOverlay .app-data-header {
  margin-bottom: 4px;
  position: relative;
  justify-content: center;
  text-align: center;
  padding-right: 26px;
}

#splitExpensesOverlay #splitExpensesTitle {
  font-size: 17px;
  letter-spacing: 0.09em;
}

#splitExpensesOverlay #splitExpensesClose {
  position: absolute;
  top: var(--ui-chrome-inset);
  right: var(--ui-chrome-inset);
  transform: none;
  z-index: 4;
}

#splitExpensesOverlay .app-data-lead {
  margin: 2px 2px 10px;
  opacity: 0.88;
  font-size: 13px;
  padding: 0 2px;
  text-align: center;
}

#splitExpensesOverlay .feature-map-section-title {
  margin-top: 9px !important;
  margin-bottom: 6px !important;
  padding: 0 2px;
}

#splitExpensesOverlay .friends-online-list {
  border-radius: 10px;
  border: 1px solid rgba(184, 219, 255, 0.12);
  background: #111b2b;
  padding: 0;
}

#splitExpensesOverlay .friend-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
}

#splitExpensesOverlay .friend-row + .friend-row {
  border-top: 1px dashed rgba(143, 211, 255, 0.14);
}

#splitExpensesOverlay .friend-row .btn-ghost {
  min-width: 76px;
  padding: 4px 8px !important;
}

#splitExpensesOverlay .split-expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
  grid-template-areas:
    "main amount"
    "actions actions";
  align-items: center;
  row-gap: 8px;
  column-gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px dashed rgba(184, 219, 255, 0.14);
}

#splitExpensesOverlay .split-expense-main {
  grid-area: main;
  min-width: 0;
}

#splitExpensesOverlay .split-expense-title {
  font-size: 16px;
  line-height: 1.24;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-right: 2px;
}

#splitExpensesOverlay .split-expense-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

#splitExpensesOverlay .split-expense-amount {
  grid-area: amount;
  justify-self: end;
  flex-shrink: 0;
  min-width: 92px;
  text-align: right;
}

#splitExpensesOverlay .split-expense-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  width: 100%;
}

#splitExpensesOverlay .split-expense-actions .btn-ghost {
  flex: 1 1 0;
  min-width: 0;
  min-height: 32px;
  border-color: rgba(184, 219, 255, 0.16);
  background: rgba(255, 255, 255, 0.01);
}

#splitExpensesOverlay .split-expense-action-btn {
  padding: 4px 10px !important;
  margin: 0 !important;
}

#splitExpensesOverlay .split-expense-row:last-child {
  border-bottom: none;
}

#splitExpensesOverlay #splitFriendPick,
#splitExpensesOverlay #splitAddFriendBtn {
  min-height: 38px;
}

#splitExpensesOverlay .split-row-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 2px;
}

#splitExpensesOverlay .share-social-grid {
  margin: 12px 2px 0;
  width: calc(100% - 4px);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

#splitExpensesOverlay #splitShareBtn {
  margin-bottom: 10px;
}

#splitExpensesOverlay .share-social-btn {
  border-color: rgba(184, 219, 255, 0.26);
  color: rgba(205, 230, 255, 0.92);
  background: rgba(20, 30, 42, 0.5);
}

#splitExpensesOverlay .share-social-btn:hover {
  border-color: rgba(205, 230, 255, 0.56);
  color: rgba(236, 246, 255, 0.98);
  background: rgba(26, 38, 54, 0.72);
}

#splitExpensesOverlay .split-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 2px;
}

#splitExpensesOverlay .friend-row-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.24;
  font-size: 15px;
  letter-spacing: 0.01em;
}

#splitExpensesOverlay #splitMembersList {
  max-height: none !important;
  overflow: visible !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  border: none;
  background: transparent;
  padding: 0;
}

#splitExpensesOverlay #splitMembersList .friend-row + .friend-row {
  border-top: none;
}

#splitExpensesOverlay .split-member-row {
  border: 1px solid rgba(184, 219, 255, 0.2);
  background: rgba(14, 22, 30, 0.56);
  align-items: center;
  min-height: 74px;
}

#splitExpensesOverlay .split-member-main {
  flex: 1;
  min-width: 0;
}

#splitExpensesOverlay .split-member-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

#splitExpensesOverlay .split-member-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

#splitExpensesOverlay .split-pill {
  border: 1px solid rgba(143, 211, 255, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(9, 16, 14, 0.45);
  font-weight: 600;
}

#splitExpensesOverlay .split-pill--neutral {
  color: var(--text-dim);
  border-color: rgba(143, 211, 255, 0.24);
  background: rgba(9, 16, 14, 0.45);
}

#splitExpensesOverlay .split-pill--plus {
  color: #9ed4ff;
  border-color: rgba(143, 211, 255, 0.52);
  background: rgba(12, 24, 36, 0.68);
  text-shadow: 0 0 10px rgba(143, 211, 255, 0.2);
}

#splitExpensesOverlay .split-pill--minus {
  color: #ff9baa;
  border-color: rgba(255, 122, 140, 0.5);
  background: rgba(41, 14, 22, 0.62);
  text-shadow: 0 0 10px rgba(255, 122, 140, 0.18);
}

#splitExpensesOverlay #splitMembersList .friend-row .btn-ghost {
  border-color: rgba(255, 122, 140, 0.45);
  color: rgba(255, 185, 194, 0.95);
}

#splitExpensesOverlay .split-member-remove {
  min-width: auto !important;
  width: auto !important;
  flex: 0 0 auto !important;
  padding: 4px 10px !important;
  min-height: 30px;
}

#splitExpensesOverlay #splitMembersList .friend-row .btn-ghost:hover {
  border-color: rgba(255, 122, 140, 0.8);
  box-shadow: 0 0 10px rgba(255, 122, 140, 0.2);
}

#splitExpensesOverlay #splitExpenseValidation {
  font-size: 11px !important;
  line-height: 1.3;
}

#splitExpensesOverlay #splitExpenseEditBox {
  border: 1px solid rgba(58, 166, 255, 0.25);
  border-radius: 10px;
  background: rgba(8, 14, 12, 0.56);
  padding: 8px;
}

#splitExpensesOverlay .split-tools {
  margin-top: 8px;
  border: 1px solid rgba(143, 211, 255, 0.2);
  border-radius: 10px;
  background: rgba(6, 12, 10, 0.28);
  padding: 6px 8px 8px;
}

#splitExpensesOverlay .split-tools summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--text-dim);
  user-select: none;
}

#splitExpensesOverlay .split-big-value {
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.25;
}

#splitExpensesOverlay .split-summary-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

#splitExpensesOverlay .split-summary-grid--top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#splitExpensesOverlay .split-summary-grid--bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#splitExpensesOverlay .split-summary-card {
  padding: 10px 12px;
  border: 1px solid rgba(184, 219, 255, 0.12);
  background: #111b2b;
}

#splitExpensesOverlay .auth-input {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(184, 219, 255, 0.34);
  background: linear-gradient(180deg, rgba(20, 30, 42, 0.88), rgba(15, 23, 34, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 10px rgba(0, 0, 0, 0.22);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  font-size: 14px;
  padding-left: 11px;
  padding-right: 11px;
}

#splitExpensesOverlay .auth-input:focus {
  border-color: rgba(143, 211, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(143, 211, 255, 0.34), 0 0 14px rgba(58, 166, 255, 0.22);
  transform: none !important;
}

#splitExpensesOverlay .split-settle-row {
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#splitExpensesOverlay .split-settle-name {
  flex: 1;
  min-width: 0;
  color: var(--text-main);
  font-size: 13px;
}

#splitExpensesOverlay .split-settle-amount {
  font-size: 13px;
  padding: 4px 10px;
  margin-left: 8px;
  flex-shrink: 0;
}

#splitExpensesOverlay #splitSettlement .friends-online-list {
  padding: 2px 0;
}

#splitExpensesOverlay #splitSettlement .friends-online-list .friend-row + .friend-row {
  border-top: 1px dashed rgba(184, 219, 255, 0.14);
}

#splitExpensesOverlay .feature-map-backlog-note .feature-map-section-title {
  font-size: 12px;
}

#splitExpensesOverlay .split-summary-card .info-label {
  padding-left: 1px;
  padding-right: 1px;
}

#splitExpensesOverlay .split-summary-card .info-value {
  padding-left: 1px;
  padding-right: 1px;
}

@media (max-width: 760px) {
  #splitExpensesOverlay #splitMembersList {
    grid-template-columns: 1fr;
  }

  #splitExpensesOverlay .split-summary-grid--top {
    grid-template-columns: 1fr !important;
  }

  #splitExpensesOverlay .split-summary-grid--bottom {
    grid-template-columns: 1fr !important;
  }
}

#splitExpensesOverlay #splitUndoDeleteBtn {
  border-color: rgba(255, 122, 140, 0.45);
  color: rgba(255, 185, 194, 0.95);
}

#splitExpensesOverlay #splitShareBtn {
  margin: 0 2px;
  min-height: 38px;
  border-color: rgba(184, 219, 255, 0.2);
  color: rgba(205, 230, 255, 0.95);
  background: #162338;
  width: calc(100% - 4px);
  justify-content: center;
}

@media (max-width: 760px) {
  #splitExpensesOverlay {
    padding: 0 !important;
    scroll-padding-bottom: 48px;
  }

  #splitExpensesOverlay .split-panel {
    width: 100vw !important;
    margin: 0 !important;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  #splitExpensesOverlay .app-data-panel {
    width: 100vw !important;
    margin: 0 !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

@media (max-width: 760px) {
  #splitExpensesOverlay .app-data-panel {
    width: min(96vw, 540px) !important;
    max-height: none !important;
    padding: 10px !important;
  }

  #splitExpensesOverlay .split-form-grid {
    grid-template-columns: 1fr;
  }

  #splitExpensesOverlay .split-row-inline .btn-ghost,
  #splitExpensesOverlay .split-row-inline .btn-main {
    flex: 1 1 auto;
    min-height: 36px;
  }

  #splitExpensesOverlay .share-social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #splitExpensesOverlay .split-expense-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "amount"
      "actions";
  }

  #splitExpensesOverlay .split-expense-amount {
    justify-self: start;
  }
}
.app-shell select,
.app-shell input[type="text"],
.app-shell input[type="number"],
.app-shell input[type="email"],
.app-shell input[type="password"],
.app-shell textarea{
  background-color: rgba(6,12,10,.86);
  color: var(--text-main);
}
.app-shell select option{
  background: rgba(6,12,10,.98);
  color: var(--text-main);
}

/* Non-blocking global toast (replaces alert popups) */
.global-toast-root{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 100010;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  pointer-events: none;
}
.global-toast{
  border: 1.5px solid rgba(125, 252, 180, 0.78);
  border-radius: 10px;
  background: rgba(4, 14, 12, 0.28);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow:
    0 12px 32px rgba(0,0,0,.48),
    0 0 0 1px rgba(125, 252, 138, 0.22),
    0 0 20px rgba(80, 220, 160, 0.18),
    inset 0 1px 0 rgba(255,255,255,.1);
  color: #f6fff9;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
  line-height: 1.32;
  padding: 8px 11px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .26s ease, transform .26s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
}
.global-toast.is-in{
  opacity: 1;
  transform: translateY(0);
}
.global-toast.is-out{
  opacity: 0;
  transform: translateY(4px);
}
.global-toast--success{
  border-color: rgba(125,252,138,.78);
  box-shadow:
    0 12px 32px rgba(0,0,0,.48),
    0 0 0 1px rgba(125, 252, 138, 0.22),
    0 0 18px rgba(90,230,140,.2),
    inset 0 1px 0 rgba(255,255,255,.1);
}
.global-toast--warning{
  border-color: rgba(255,213,122,.78);
  box-shadow:
    0 12px 32px rgba(0,0,0,.48),
    0 0 0 1px rgba(255, 200, 100, 0.22),
    0 0 18px rgba(255,200,80,.18),
    inset 0 1px 0 rgba(255,255,255,.1);
}
.global-toast--error{
  border-color: rgba(255,122,140,.78);
  box-shadow:
    0 12px 32px rgba(0,0,0,.48),
    0 0 0 1px rgba(255, 120, 140, 0.22),
    0 0 18px rgba(255,100,120,.2),
    inset 0 1px 0 rgba(255,255,255,.1);
}

/* Редактирование исходящего сообщения (30 с) */
.msg-bubble-out.msg-bubble--editable {
  padding-bottom: 8px;
  padding-right: 40px;
}

.msg-bubble-out.msg-bubble--editable .msg-text {
  padding-right: 2px;
  word-break: break-word;
}

.msg-bubble-out.msg-bubble--editable .msg-meta,
.msg-bubble-out.msg-bubble--editable .msg-text,
.msg-bubble-out.msg-bubble--editable .msg-text-edit,
.msg-bubble-out.msg-bubble--editable .msg-edit-actions {
  width: 100%;
}

.msg-edit-hud {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 28px;
  height: 28px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--ui-msg-edit-hud-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px var(--ui-msg-edit-hud-border);
  transition: box-shadow .14s ease;
}

.msg-edit-hud:hover {
  box-shadow: 0 0 0 1px var(--ui-msg-edit-hud-border-hover),
    0 0 12px rgba(255, 217, 90, 0.16);
}

.msg-edit-hud svg {
  position: absolute;
  inset: 0;
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.msg-edit-hud .msg-edit-ring-bg {
  fill: none;
  stroke: var(--ui-msg-edit-hud-ring);
  stroke-width: 2;
}

.msg-edit-hud .msg-edit-ring-prog {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 69.12;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.15s linear;
}

.msg-edit-hud .msg-edit-pencil {
  position: relative;
  z-index: 1;
  font-size: 10px;
  color: var(--ui-msg-edit-hud-pencil);
  pointer-events: none;
}

.msg-text-edit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--ui-msg-edit-textarea-border);
  background: var(--ui-msg-edit-textarea-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-sm);
  resize: vertical;
}

.msg-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
}

.msg-edit-actions button {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.35);
  background: rgba(8, 14, 12, 0.6);
  color: var(--text-dim);
  cursor: pointer;
}

.msg-edit-actions button.msg-edit-save {
  border-color: rgba(125, 252, 138, 0.55);
  color: var(--green);
}

.avatar-upload-trigger {
  cursor: pointer;
}

/* Celebration overlay */
.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.celebration-overlay[hidden] {
  display: none !important;
}

.celebration-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(255, 217, 90, 0.15) 0,
    rgba(0, 0, 0, 0.65) 55%,
    rgba(0, 0, 0, 0.85) 100%
  );
  pointer-events: auto;
}

.celebration-card {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 40px;
  max-width: min(90vw, 520px);
  border-radius: 16px;
  border: 1px solid rgba(255, 217, 90, 0.45);
  background: rgba(10, 16, 14, 0.88);
  box-shadow: 0 0 60px rgba(255, 217, 90, 0.25),
    0 0 120px rgba(58, 166, 255, 0.12);
  pointer-events: auto;
  animation: celebration-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes celebration-pop {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.celebration-aurora {
  position: absolute;
  inset: -45%;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.celebration-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.85;
  mix-blend-mode: screen;
  animation: celebration-aurora-drift 3.6s ease-in-out infinite;
}

.celebration-aurora-blob--gold {
  width: 62%;
  height: 62%;
  left: 8%;
  top: 10%;
  background: radial-gradient(circle, rgba(255, 217, 90, 0.55) 0%, rgba(255, 140, 80, 0.18) 55%, transparent 72%);
  animation-delay: 0s;
}

.celebration-aurora-blob--cyan {
  width: 58%;
  height: 58%;
  right: 4%;
  top: 18%;
  background: radial-gradient(circle, rgba(58, 166, 255, 0.5) 0%, rgba(90, 120, 255, 0.16) 55%, transparent 72%);
  animation-delay: -1.1s;
}

.celebration-aurora-blob--green {
  width: 54%;
  height: 54%;
  left: 22%;
  bottom: 6%;
  background: radial-gradient(circle, rgba(125, 252, 138, 0.48) 0%, rgba(40, 200, 120, 0.14) 55%, transparent 72%);
  animation-delay: -2.2s;
}

.celebration-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 18px rgba(255, 217, 90, 0.65);
  animation: celebration-spark-pop 1.8s ease-in-out infinite;
}

.celebration-spark--a {
  left: 18%;
  top: 22%;
  animation-delay: 0.2s;
}

.celebration-spark--b {
  right: 20%;
  top: 30%;
  animation-delay: 0.9s;
}

.celebration-spark--c {
  left: 44%;
  bottom: 24%;
  animation-delay: 1.4s;
}

@keyframes celebration-aurora-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.72;
  }
  50% {
    transform: translate3d(6%, -4%, 0) scale(1.12);
    opacity: 1;
  }
}

@keyframes celebration-spark-pop {
  0%,
  100% {
    transform: scale(0.6);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

/* legacy alias — keep for older markup references */
.celebration-burst {
  display: none;
}

.celebration-title {
  position: relative;
  font-size: clamp(22px, 5vw, 38px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 0 20px rgba(255, 217, 90, 0.8), 0 0 40px rgba(255, 64, 96, 0.35);
  margin: 0 0 12px;
  animation: celebration-title-glow 1.2s ease-in-out infinite;
}

@keyframes celebration-title-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

.celebration-sub {
  position: relative;
  margin: 0;
  font-size: var(--font-md);
  color: var(--text-main);
  line-height: 1.45;
  letter-spacing: 0.04em;
}

/* My Page top search: strip focus ring (must load after global input:focus-visible ~13693) */
#myPageSearch:focus,
#myPageSearch:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Terminal datepicker — theme tokens (Snow overrides via liquid-aurora) */
.flatpickr-calendar,
.flatpickr-calendar.open,
.flatpickr-calendar.inline {
  background: var(--ui-flatpickr-bg) !important;
  border: 1px solid var(--ui-flatpickr-border) !important;
  box-shadow: var(--ui-flatpickr-shadow) !important;
  color: var(--ui-flatpickr-text) !important;
  width: 232px !important;
  max-width: 232px !important;
  font-size: 11px !important;
}

.flatpickr-months,
.flatpickr-weekdays {
  background: transparent !important;
}

.flatpickr-current-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.flatpickr-monthDropdown-month,
.flatpickr-weekday {
  color: var(--ui-flatpickr-weekday) !important;
  fill: var(--ui-flatpickr-weekday) !important;
  background: transparent !important;
}

.flatpickr-monthDropdown-months option {
  background: var(--ui-flatpickr-option-bg) !important;
  color: var(--ui-flatpickr-option-color) !important;
}

.flatpickr-prev-month,
.flatpickr-next-month,
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  color: var(--ui-flatpickr-nav-color) !important;
  fill: var(--ui-flatpickr-nav-color) !important;
}

.flatpickr-day {
  color: var(--ui-flatpickr-day) !important;
  border-color: transparent !important;
}

.flatpickr-day:hover {
  background: var(--ui-flatpickr-day-hover-bg) !important;
  border-color: var(--ui-flatpickr-day-hover-border) !important;
  color: var(--ui-flatpickr-day-hover-color) !important;
}

.flatpickr-day.today {
  border-color: var(--ui-flatpickr-day-today-border) !important;
  color: var(--ui-flatpickr-day-today-color) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--ui-flatpickr-day-selected-bg) !important;
  border-color: var(--ui-flatpickr-day-selected-border) !important;
  color: var(--ui-flatpickr-day-selected-color) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--ui-flatpickr-day-disabled) !important;
}

.flatpickr-days,
.dayContainer {
  width: 216px !important;
  min-width: 216px !important;
  max-width: 216px !important;
}

.flatpickr-day {
  max-width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
}

/* —— Roadmap P1–P7 polish (29.05.2026) —— */

.left-panel .panel-header {
  margin-top: 2px;
  margin-bottom: 4px;
}

.left-panel .controls-row {
  margin-top: 4px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  column-gap: 5px;
}

.left-panel .controls-row #clearPlacesBtn,
.left-panel .controls-row #soundToggleBtn,
.left-panel .controls-row #addPlaceBtn {
  flex: none;
}

/* Компактный логотип — больше места под список нодов */
.left-panel .logo-block {
  margin-top: 0;
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.left-panel .logo-block::after {
  margin-top: 5px;
}

.left-panel .logo-ascii {
  gap: 3px;
}

.left-panel .logo-main.logo-mymap-simple {
  gap: 5px;
  line-height: 1.06;
  margin-top: 2px;
}

.left-panel .logo-mymap-simple .logo-sub-line {
  margin-top: 1px;
  line-height: 1;
}

.left-panel .logo-sub {
  margin-top: 1px;
  line-height: 1.15;
}

.left-panel .info-row-paired-top {
  margin-top: 1px;
}

.left-panel .places-panel {
  margin-top: 10px;
  max-height: none;
  min-height: 0;
}

.left-panel .controls-row {
  margin-bottom: 0;
}

.left-panel .info-row {
  margin-top: 4px;
}

.right-panel.story-mode-on #rightStoryPanel {
  display: none !important;
}

.right-story-panel {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(8, 16, 14, 0.72);
  border: 1px solid rgba(125, 252, 138, 0.18);
}

.right-story-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.right-story-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(125, 252, 138, 0.9);
}

.right-story-sub {
  font-size: 10px;
  color: var(--text-dim);
}

.right-story-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.right-story-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.2);
}

.right-story-about {
  font-size: 10px;
  line-height: 1.45;
  color: rgba(210, 228, 238, 0.88);
  margin: 0;
}

#btnShowMyPage.btn-auth--premium {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: var(--font-md);
  min-height: 30px;
  border-color: rgba(125, 252, 138, 0.42);
  box-shadow: var(--ui-primary-shadow), 0 0 12px rgba(125, 252, 138, 0.12);
}

.profile-auth-actions .btn-auth--premium {
  border-radius: var(--radius-sm);
}

.status-friend-rank {
  display: none !important;
}

/* Compact NODE LOG head: title + tools + friend rank strip */
.left-panel .places-panel .node-log-head {
  flex-shrink: 0;
  border-bottom: 1px solid var(--node-log-head-border);
  background: var(--node-log-head-bg);
}

.left-panel .places-panel .node-log-head-row--title.panel-header {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 8px 4px;
  margin: 0;
  border-bottom: 1px solid rgba(80, 120, 95, 0.35);
  text-align: center;
}

.left-panel .places-panel .node-log-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--node-log-title-color);
  width: 100%;
  text-align: center;
}

.left-panel .places-panel .node-log-head-row--title .panel-count {
  display: block;
  width: 100%;
  font-size: 9px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.left-panel .places-panel .node-log-head-row--title .panel-count-countries,
.left-panel .places-panel .node-log-head-row--title .panel-count-nodes,
.left-panel .places-panel .node-log-head-row--title .panel-count-sep {
  display: inline;
}

.left-panel .places-panel .node-log-head-row--tools.node-log-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 4px 6px 5px;
  border-bottom: none;
  background: transparent;
}

.left-panel .places-panel .node-log-search,
.left-panel .places-panel .node-log-type-filter,
.left-panel .places-panel .node-log-story-btn {
  height: 24px;
  min-height: 24px;
  font-size: 9px;
  padding: 0 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.left-panel .places-panel .node-log-type-filter {
  padding-right: 18px;
  background-position: calc(100% - 8px) 9px, calc(100% - 4px) 9px, 0 0;
  background-size: 4px 4px, 4px 4px, 100% 100%;
}

.left-panel .places-panel .node-log-rank-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px 10px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 7px 10px 8px;
  border: none;
  border-top: 1px solid var(--ui-node-rank-footer-border);
  border-radius: 0;
  background: var(--ui-node-rank-footer-bg);
  cursor: pointer;
  color: inherit;
  overflow: hidden;
  text-align: left;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.left-panel .places-panel .node-log-rank-footer.nlr-flash-leader {
  animation: nlr-flash-leader 2.4s ease-in-out 1;
}

.left-panel .places-panel .node-log-rank-footer.nlr-flash-rank {
  animation: nlr-flash-rank 2s ease-in-out 1;
}

@keyframes nlr-flash-leader {
  0%,
  100% {
    background: var(--ui-node-rank-footer-bg);
    box-shadow: none;
  }
  12%,
  36%,
  60% {
    background: rgba(255, 196, 48, 0.22);
    box-shadow:
      0 0 28px rgba(255, 196, 48, 0.55),
      inset 0 0 0 2px rgba(255, 220, 90, 0.95);
  }
  24%,
  48% {
    background: rgba(255, 160, 32, 0.12);
    box-shadow: 0 0 12px rgba(255, 196, 48, 0.28);
  }
}

@keyframes nlr-flash-rank {
  0%,
  100% {
    background: var(--ui-node-rank-footer-bg);
    box-shadow: none;
  }
  20%,
  55% {
    background: rgba(58, 166, 255, 0.18);
    box-shadow:
      0 0 22px rgba(58, 166, 255, 0.45),
      inset 0 0 0 2px rgba(125, 252, 138, 0.75);
  }
}

.left-panel .places-panel .node-log-rank-footer:hover,
.left-panel .places-panel .node-log-rank-footer:focus-visible {
  background: var(--ui-node-rank-footer-hover-bg);
  box-shadow: inset 0 0 0 1px var(--ui-node-rank-footer-hover-ring);
}

.left-panel .places-panel .nlr-chunk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 0;
}

.left-panel .places-panel .nlr-chunk--leader {
  flex: 1.15 1 0;
}

.left-panel .places-panel .nlr-chunk--you {
  flex: 1 1 0;
  justify-content: flex-end;
  margin-left: auto;
  max-width: 48%;
}

.left-panel .places-panel .nlr-sep {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--ui-node-rank-sep-color);
  padding: 0 2px;
}

.left-panel .places-panel .nlr-av {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 1px solid var(--ui-node-rank-av-border);
  background: var(--ui-node-rank-av-bg);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--ui-node-rank-av-color);
}

.left-panel .places-panel .nlr-av--gold {
  border-color: var(--ui-node-rank-av-gold-border);
  background: var(--ui-node-rank-av-gold-bg);
  color: var(--ui-node-rank-av-gold-color);
}

.left-panel .places-panel .nlr-av--you {
  border-color: var(--ui-node-rank-av-you-border);
  color: var(--ui-node-rank-av-you-color);
}

.left-panel .places-panel .nlr-line {
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ui-node-rank-line-color);
}

.left-panel .places-panel .node-log-rank-footer:hover .nlr-line,
.left-panel .places-panel .node-log-rank-footer:focus-visible .nlr-line {
  color: rgba(235, 255, 245, 1);
  text-shadow: 0 0 8px rgba(125, 252, 138, 0.35);
}

.left-panel .places-panel .node-log-rank-footer:hover .nlr-av,
.left-panel .places-panel .node-log-rank-footer:focus-visible .nlr-av {
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.4);
}

#travelRankRow.travel-rank-row {
  cursor: pointer;
  border-radius: 4px;
  margin-left: 0;
  margin-right: 0;
  padding: 3px 4px !important;
  box-sizing: border-box;
  transition:
    color 0.18s ease,
    text-shadow 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

#travelRankRow.travel-rank-row:hover,
#travelRankRow.travel-rank-row:focus-visible {
  color: rgba(235, 250, 255, 1);
  background: rgba(125, 252, 138, 0.07);
  text-shadow:
    0 0 8px rgba(88, 182, 255, 0.55),
    0 0 14px rgba(58, 166, 255, 0.28);
  box-shadow:
    inset 3px 0 0 rgba(125, 252, 138, 0.82),
    inset -3px 0 0 rgba(125, 252, 138, 0.82);
}

#travelRankRow.travel-rank-row:hover #statFriendsRank,
#travelRankRow.travel-rank-row:focus-visible #statFriendsRank {
  color: rgba(125, 252, 138, 1);
  text-shadow: 0 0 10px rgba(125, 252, 138, 0.85);
}

.travel-achievement-strip-row .travel-achievement-strip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: rgba(190, 230, 255, 0.92);
  text-shadow: 0 0 8px rgba(58, 166, 255, 0.35);
}

#travelAchievementRow.travel-achievement-row {
  cursor: pointer;
  border-radius: 4px;
  margin-left: 0;
  margin-right: 0;
  padding: 3px 4px !important;
  box-sizing: border-box;
  transition:
    color 0.18s ease,
    text-shadow 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

#travelAchievementRow.travel-achievement-row:hover,
#travelAchievementRow.travel-achievement-row:focus-visible {
  color: rgba(235, 250, 255, 1);
  background: rgba(125, 252, 138, 0.07);
  text-shadow:
    0 0 8px rgba(88, 182, 255, 0.55),
    0 0 14px rgba(58, 166, 255, 0.28);
  box-shadow:
    inset 3px 0 0 rgba(125, 252, 138, 0.82),
    inset -3px 0 0 rgba(125, 252, 138, 0.82);
}

#travelAchievementRow.travel-achievement-row:hover .travel-achievement-strip,
#travelAchievementRow.travel-achievement-row:focus-visible .travel-achievement-strip {
  color: rgba(125, 252, 138, 1);
  text-shadow: 0 0 10px rgba(125, 252, 138, 0.85);
}

.achievements-panel-scroll {
  padding: 10px 12px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.achievements-panel-badges {
  flex-shrink: 0;
  padding: 0 12px 8px;
  border-bottom: 1px solid rgba(125, 252, 138, 0.14);
  background: linear-gradient(180deg, rgba(6, 14, 10, 0.35), rgba(4, 10, 8, 0.12));
}

#achievementsPanelFooter.achievements-rank-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(125, 252, 138, 0.22);
  background: linear-gradient(180deg, rgba(4, 10, 8, 0.55), rgba(4, 10, 8, 0.98));
}

.achievements-arena-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.achievements-arena-heading-row .achievements-arena-heading {
  margin: 0;
}

.achievements-calc-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 182, 255, 0.45);
  background: rgba(8, 18, 28, 0.75);
  color: rgba(190, 230, 255, 0.95);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.achievements-calc-btn:hover {
  border-color: rgba(88, 182, 255, 0.75);
  color: #fff;
}

.achievements-rules-lead--flash {
  animation: achievements-rules-flash 1.2s ease;
}

@keyframes achievements-rules-flash {
  0%,
  100% {
    box-shadow: none;
  }
  35% {
    box-shadow: 0 0 0 2px rgba(88, 182, 255, 0.55);
  }
}

.achievement-help-subtitle {
  margin: 16px 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(160, 220, 255, 0.92);
}

.achievement-help-dom-lead {
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(180, 210, 200, 0.88);
}

/* Achievements: centered column like MY PAGE — not edge-to-edge */
.left-panel #achievementsOverlay.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  box-sizing: border-box;
  background: var(--my-page-screen-bg, radial-gradient(circle at 0 0, #1e2b23 0, #050706 55%, #000 100%));
}

.left-panel #achievementsOverlay .app-data-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 4, 0.42);
}

.left-panel #achievementsOverlay .achievements-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  inset: auto;
  width: min(var(--my-page-max-w, 1200px), 100%);
  max-width: var(--my-page-max-w, 1200px);
  height: auto;
  max-height: min(92dvh, 900px);
  min-height: min(72dvh, 560px);
  margin: 0;
  flex: 0 1 auto;
  z-index: 1;
  border-radius: 0;
  overflow: hidden;
  background: var(--my-page-shell-bg, var(--ui-glass-bg));
  border: none;
  box-shadow: none;
}

@media (max-width: 720px) {
  .left-panel #achievementsOverlay.visible {
    padding: 0;
    align-items: stretch;
  }

  .left-panel #achievementsOverlay .achievements-panel {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    min-height: 0;
    height: 100%;
  }
}

.achievements-hero {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(88, 182, 255, 0.35);
  background: linear-gradient(135deg, rgba(12, 28, 42, 0.9), rgba(8, 16, 24, 0.95));
}

.achievements-hero-rank {
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(210, 240, 255, 0.96);
}

.achievements-hero-next {
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(160, 210, 235, 0.88);
}

.achievements-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.achievements-stat-card {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(88, 182, 255, 0.22);
  background: rgba(6, 14, 20, 0.75);
}

.achievements-stat-card--wide {
  grid-column: 1 / -1;
}

.achievements-stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(150, 190, 220, 0.85);
}

.achievements-stat-value {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
  color: rgba(220, 245, 255, 0.96);
}

.achievements-ladder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.achievements-ladder-row {
  display: grid;
  grid-template-columns: 18px 72px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(88, 182, 255, 0.15);
  font-size: 0.76rem;
  color: rgba(170, 205, 230, 0.88);
}

.achievements-ladder-row--achieved {
  border-color: rgba(125, 252, 138, 0.35);
  color: rgba(200, 245, 215, 0.92);
}

.achievements-ladder-row--current {
  border-color: rgba(88, 182, 255, 0.55);
  box-shadow: 0 0 12px rgba(58, 166, 255, 0.2);
}

.achievements-ladder-mark {
  text-align: center;
}

.achievements-ladder-tier {
  letter-spacing: 0.04em;
}

.achievements-ladder-name {
  font-weight: 600;
}

.achievements-ladder-req {
  font-size: 0.68rem;
  opacity: 0.85;
  text-align: right;
}

.achievements-footnote {
  margin-top: 12px;
  font-size: 0.7rem;
  color: rgba(140, 175, 200, 0.8);
  line-height: 1.4;
}

.split-split-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 8px;
  font-size: 0.78rem;
}

.split-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.split-participant-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.split-participant-row {
  display: grid;
  grid-template-columns: 18px 1fr 72px;
  gap: 8px;
  align-items: center;
}

.split-participant-name {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-participant-weight {
  height: 32px;
  min-width: 0;
  padding: 4px 8px;
  font-size: 0.78rem;
}

.split-participant-hint {
  margin: 6px 0 0;
  font-size: 0.68rem;
  color: rgba(150, 190, 220, 0.8);
  line-height: 1.35;
}

.map-status-chip {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 12;
  pointer-events: none;
  display: var(--ui-map-status-chip-display);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ui-map-status-chip-border);
  background: var(--ui-map-status-chip-bg);
  color: var(--ui-map-status-chip-color);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

html.mnm-reduce-motion *,
html.mnm-reduce-motion *::before,
html.mnm-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.right-drawer-promo {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: rgba(2, 6, 8, 0.72);
  backdrop-filter: blur(8px);
}

.right-drawer-promo[hidden] {
  display: none !important;
}

.right-about-drawer-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--ui-about-drawer-border);
  border-radius: 0;
  background: var(--ui-about-drawer-bg);
  box-shadow: inset 0 0 0 1px rgba(143, 211, 255, 0.08);
}

.right-about-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--ui-about-drawer-head-border);
  flex-shrink: 0;
}

.right-about-drawer-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-about-drawer-title-color);
}

.right-about-drawer-close.ui-close {
  position: static;
  flex-shrink: 0;
}

.right-about-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 22px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--ui-about-drawer-body-color);
}

.right-about-drawer-body .mnm-story-brand {
  display: flex;
  justify-content: center;
  margin: 0 28px 12px 0;
}

.right-about-drawer-body .mnm-story-lead {
  font-size: 10.5px;
  color: var(--ui-about-drawer-lead-color);
}

.right-about-drawer-body .mnm-story-section-title {
  margin: 14px 0 6px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-about-drawer-section-color);
}

.right-about-drawer-body .mnm-story-nodus {
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid var(--ui-about-drawer-nodus-border);
  background: var(--ui-about-drawer-nodus-bg);
}

.right-about-drawer-body .mnm-story-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ui-about-drawer-kicker-color);
}

.right-about-drawer-body .mnm-story-subkicker {
  margin: 0 0 10px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-about-drawer-subkicker-color);
}

.right-about-drawer-body .mnm-story-list {
  margin: 6px 0 10px 16px;
  padding: 0;
}

.right-about-drawer-body .mnm-story-list li {
  margin-bottom: 4px;
}

.mnm-story-heritage {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--ui-about-drawer-heritage-border);
}

.mnm-story-heritage-lead {
  margin: 0 0 8px;
  font-size: 9px;
  color: var(--ui-about-drawer-heritage-lead-color);
}

.mnm-story-telegram {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 18px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.18);
  background: rgba(4, 12, 10, 0.45);
}

.mnm-story-telegram-links {
  flex: 1 1 180px;
  min-width: 0;
}

.mnm-story-telegram-links p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ui-mnm-story-body-color, rgba(220, 235, 228, 0.92));
}

.mnm-story-telegram-links p:last-child {
  margin-bottom: 0;
}

.mnm-story-telegram-links a {
  color: rgba(125, 252, 138, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mnm-story-telegram-qr {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
}

.mnm-story-telegram-qr a {
  display: block;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(143, 211, 255, 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.mnm-story-telegram-qr img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  background: #000;
}

.mnm-story-telegram-qr figcaption {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ui-mnm-story-figcaption-color, rgba(160, 190, 205, 0.85));
}

.right-about-drawer-body .mnm-story-telegram-qr img {
  width: 140px;
  height: 140px;
}

.help-center-contact {
  margin: 10px 0 6px;
  font-size: 12px;
  line-height: 1.45;
}

.help-center-contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 520px) {
  .mnm-story-telegram {
    flex-direction: column;
    align-items: stretch;
  }
  .mnm-story-telegram-qr {
    align-self: center;
  }
}

.mnm-story-heritage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mnm-story-heritage-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.mnm-story-heritage-btn img {
  width: 100%;
  height: auto;
  min-height: 88px;
  max-height: 168px;
  object-fit: contain;
  object-position: center top;
  background: rgba(4, 10, 8, 0.72);
  border-radius: 6px;
  border: 1px solid rgba(125, 252, 138, 0.22);
  opacity: 0.96;
  transition: opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.mnm-story-heritage-figure {
  margin: 0;
}

.mnm-story-heritage-figure figcaption {
  margin-top: 6px;
  font-size: 8.5px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: rgba(125, 252, 138, 0.78);
}

.mnm-story-heritage-placeholder {
  display: none;
  width: 100%;
  min-height: 72px;
  padding: 14px 10px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px dashed rgba(125, 252, 138, 0.35);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(160, 190, 205, 0.75);
  background: rgba(6, 14, 20, 0.6);
}

.mnm-story-heritage-btn--missing img {
  display: none;
}

.mnm-story-heritage-btn--missing .mnm-story-heritage-placeholder {
  display: block;
}

.mnm-story-heritage-btn:hover img,
.mnm-story-heritage-btn:focus-visible img {
  opacity: 1;
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.22);
}

.right-about-drawer-body .mnm-story-sign {
  margin-top: 12px;
  color: rgba(125, 252, 138, 0.82);
}

.right-about-drawer-body a[href^="mailto:"] {
  color: rgba(143, 211, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mnm-story-support {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.2);
  background: rgba(6, 14, 20, 0.85);
}

.mnm-story-support-title {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.88);
}

.mnm-story-support-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.mnm-story-support-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(8, 20, 28, 0.9);
  color: rgba(220, 235, 245, 0.95);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mnm-story-support-btn:hover,
.mnm-story-support-btn:focus-visible {
  border-color: rgba(125, 252, 138, 0.45);
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.12);
}

.mnm-story-support-btn.is-active {
  border-color: rgba(125, 252, 138, 0.65);
  background: rgba(12, 32, 28, 0.95);
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.18);
}

.mnm-story-support-btn--heart.is-active {
  border-color: rgba(255, 120, 140, 0.55);
}

.mnm-story-support-btn--tomato.is-active {
  border-color: rgba(255, 140, 60, 0.55);
}

.mnm-story-support-btn-emoji {
  font-size: 16px;
  line-height: 1;
}

.mnm-story-support-btn-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.mnm-story-support-bar-wrap {
  margin-bottom: 6px;
}

.mnm-story-support-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(143, 211, 255, 0.15);
}

.mnm-story-support-bar-heart {
  background: linear-gradient(90deg, rgba(255, 90, 120, 0.85), rgba(255, 130, 150, 0.7));
  min-width: 0;
  transition: width 0.35s ease;
}

.mnm-story-support-bar-tomato {
  background: linear-gradient(90deg, rgba(220, 80, 40, 0.75), rgba(255, 120, 50, 0.85));
  min-width: 0;
  transition: width 0.35s ease;
}

.mnm-story-support-meta {
  margin: 0;
  font-size: 8.5px;
  line-height: 1.45;
  color: rgba(160, 190, 205, 0.88);
}

.mnm-story-support-meta strong {
  color: rgba(220, 235, 245, 0.95);
  font-weight: 600;
}

.mnm-story-support-vote-hint {
  margin: 0 0 10px;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
  color: rgba(160, 190, 205, 0.88);
}

.mnm-story-mode-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
  padding: 0 0 8px;
  background: linear-gradient(180deg, rgba(6, 12, 10, 0.98) 70%, rgba(6, 12, 10, 0));
}

.mnm-story-mode-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 130, 165, 0.42);
  background: rgba(28, 10, 16, 0.88);
  color: rgba(255, 170, 195, 0.96);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mnm-story-mode-btn:hover,
.mnm-story-mode-btn:focus-visible {
  border-color: rgba(255, 130, 165, 0.72);
  background: rgba(42, 14, 22, 0.95);
  box-shadow: 0 0 14px rgba(255, 100, 140, 0.18);
}

.mnm-story-brief-lead {
  font-size: 11px !important;
  line-height: 1.6 !important;
}

.mnm-story-read-full-wrap {
  margin: 14px 0 0;
  text-align: center;
}

.mnm-story-read-full-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(8, 22, 18, 0.9);
  color: rgba(125, 252, 138, 0.95);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.mnm-story-read-full-btn:hover,
.mnm-story-read-full-btn:focus-visible {
  border-color: rgba(125, 252, 138, 0.75);
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.2);
}

.mnm-story-ps {
  margin-top: 10px !important;
  font-size: 11px;
  font-style: italic;
  color: rgba(160, 190, 205, 0.9);
}

.mnm-story-body a[href^="mailto:"] {
  color: rgba(143, 211, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mnm-story-support-btn-emoji {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.right-drawer-promo-ad {
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px dashed rgba(143, 211, 255, 0.25);
  font-size: 9px;
  color: rgba(160, 190, 205, 0.85);
}

.right-drawer-promo-ad-label {
  display: block;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: rgba(143, 211, 255, 0.7);
}

.right-drawer-promo-close {
  width: 100%;
}

.right-drawer-promo-close:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.right-drawer-promo-timer {
  margin: 6px 0 0;
  font-size: 9px;
  text-align: center;
  color: rgba(140, 175, 195, 0.8);
}

body.mnm-story-open {
  overflow: hidden;
}

.mnm-story-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mnm-story-overlay[hidden] {
  display: none !important;
}

.mnm-story-overlay.is-open {
  display: flex;
}

.mnm-story-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(8px);
}

.mnm-story-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 96vw);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--ui-mnm-story-panel-border);
  background: var(--ui-mnm-story-panel-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.mnm-story-header {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 44px 12px 14px;
  border-bottom: 1px solid var(--ui-mnm-story-header-border);
}

.mnm-story-header-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.mnm-story-header-brand .mnm-logo-mark-slot,
.mnm-logo-mark--story-hero {
  width: 96px;
  height: 96px;
  display: block;
}

.mnm-story-header-brand .mnm-logo-svg,
.mnm-story-header-brand .mnm-logo-img {
  width: 96px;
  height: 96px;
}

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

.mnm-story-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mnm-story-header .mnm-story-mode-btn {
  max-width: min(220px, 42vw);
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.mnm-story-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-mnm-story-title-color);
}

.mnm-story-close.ui-close {
  position: absolute;
  top: var(--ui-chrome-inset);
  right: var(--ui-chrome-inset);
}

.mnm-story-body {
  flex: 1;
  min-height: 0;
  padding: 16px 20px 22px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ui-mnm-story-body-color);
}

.mnm-story-brand {
  display: flex;
  justify-content: center;
  margin: 0 36px 14px 0;
}

.mnm-story-brand .mnm-logo-mark-slot,
.mnm-story-brand .mnm-logo-mark--story {
  width: 60px;
  height: 60px;
  display: block;
}

.mnm-story-brand .mnm-logo-svg,
.mnm-story-brand .mnm-logo-img {
  width: 60px;
  height: 60px;
}

.mnm-story-body p {
  margin: 0 0 10px;
}

.mnm-story-lead {
  font-size: 13px;
  color: var(--ui-mnm-story-lead-color);
}

.mnm-story-figure {
  margin: 12px 0;
}

.mnm-story-figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--ui-mnm-story-figure-border);
}

.mnm-story-figure figcaption {
  margin-top: 6px;
  font-size: 10px;
  color: var(--ui-mnm-story-figcaption-color);
}

.mnm-story-sign {
  margin-top: 14px !important;
  color: var(--ui-mnm-story-sign-color);
}

.msg-layout-btn,
.tf-layout-btn {
  margin-left: 0;
}

.my-page-right #myPageSideFriend.my-page-side-active {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.my-page-right #myPageSideFriend .my-page-friend-panel {
  margin-bottom: var(--my-page-col-gap, 12px);
}

.my-page-right .message-dialogs {
  width: 100%;
}

.my-page-friend-panel {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--my-page-rail-max);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  box-sizing: border-box;
  border: 1px solid rgba(125, 252, 138, 0.16);
  border-radius: 14px;
  background: rgba(8, 14, 12, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.my-page-friend-panel-inner {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.my-page-friend-panel .my-page-friend-avatar-wrap {
  width: 104px;
  height: 104px;
  min-width: 104px;
  min-height: 104px;
  border-radius: 50%;
  margin: 2px auto 0;
  border: 2px solid rgba(58, 166, 255, 0.45);
  box-shadow: 0 0 24px rgba(58, 166, 255, 0.18);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.my-page-friend-panel .my-page-friend-avatar-wrap .avatar-circle {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 50%;
}

.my-page-friend-panel .my-page-friend-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-olive);
  line-height: 1.2;
}

.my-page-friend-panel .my-page-friend-meta {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-dim);
  max-width: 24ch;
}

.my-page-friend-panel .my-page-stats-list {
  width: 100%;
  margin: 0;
  text-align: left;
  font-size: 10px;
}

.my-page-friend-panel .my-page-stats-list li {
  padding: 1px 0;
}

.my-page-friend-panel .mp-friend-quick {
  justify-content: stretch;
  width: 100%;
  margin-top: 6px;
  gap: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.my-page-friend-panel .mp-friend-feed-note {
  max-width: none;
  text-align: left;
  font-size: 9px;
  line-height: 1.35;
  margin-top: 4px;
}

.my-page-friend-panel .mp-friend-safety {
  margin-top: 2px;
}

.my-page-friend-panel .mp-mini-btn {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 7px 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 8px;
  border: 1px solid var(--my-page-btn-border);
  background: var(--my-page-btn-bg);
  color: var(--my-page-btn-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-page-friend-panel .mp-mini-btn--album {
  grid-column: 1 / -1;
}

.my-page-friend-panel .mp-mini-btn--chat {
  border-color: rgba(125, 252, 138, 0.32);
  background: rgba(125, 252, 138, 0.07);
  color: rgba(186, 255, 202, 0.96);
}

.my-page-friend-panel .mp-mini-btn--chat:hover {
  border-color: rgba(125, 252, 138, 0.48);
  background: rgba(125, 252, 138, 0.12);
  color: rgba(210, 255, 220, 1);
}

.my-page-friend-panel .mp-mini-btn--album {
  flex: 1 1 100%;
  min-width: 100%;
  border-color: rgba(255, 200, 90, 0.38);
  background: rgba(255, 190, 70, 0.08);
  color: rgba(255, 230, 170, 0.96);
}

.my-page-friend-panel .mp-mini-btn--album:hover {
  border-color: rgba(255, 210, 100, 0.55);
  background: rgba(255, 190, 70, 0.14);
  color: rgba(255, 240, 200, 1);
}

.my-page-friend-panel .mp-mini-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.split-help-block,
.split-help-card {
  margin: 8px 4px 18px;
  padding: 12px 14px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(8, 18, 12, 0.72);
  font-size: var(--font-xs);
  color: rgba(210, 235, 218, 0.95);
  box-shadow: inset 0 1px 0 rgba(125, 252, 138, 0.08);
}

#splitExpensesOverlay .split-help-card {
  margin-bottom: 20px;
}

#splitExpensesOverlay .split-help-card[open] {
  margin-bottom: 22px;
}

#splitExpensesOverlay .feature-map-section-title:first-of-type {
  margin-top: 4px !important;
}

.split-help-block .split-help-steps,
.split-help-card .split-help-steps,
.split-help-block ol,
.split-help-card ol {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.45;
}

.split-help-block summary,
.split-help-card summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#splitSettlement.split-settlement--pulse {
  animation: split-settle-pulse 1.2s ease-out;
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.35), 0 0 24px rgba(125, 252, 138, 0.12);
}

@keyframes split-settle-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(125, 252, 138, 0.45);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.2), 0 0 8px rgba(125, 252, 138, 0.08);
  }
}

.split-receipt-thumb {
  display: block;
  margin-top: 8px;
  max-width: 120px;
  max-height: 72px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(143, 211, 255, 0.35);
  background: rgba(0, 0, 0, 0.4);
}

.split-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.split-receipt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 6px 0 10px;
  font-size: 10px;
}

#splitReceiptHint,
#splitPlaceHint {
  flex: 1 1 100%;
  font-size: 9px;
  color: rgba(140, 175, 195, 0.85);
}

.tf-ask-nodus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--tf-control-h);
  box-sizing: border-box;
  padding: 0 var(--tf-control-pad-x);
  border-radius: var(--tf-control-radius);
  border: 1px solid rgba(143, 211, 255, 0.55);
  background: linear-gradient(
    180deg,
    rgba(58, 166, 255, 0.38) 0%,
    rgba(22, 58, 98, 0.72) 100%
  );
  color: #eef8ff;
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 10px rgba(58, 166, 255, 0.28);
}

.tf-ask-nodus-btn i {
  font-size: 12px;
  filter: drop-shadow(0 0 4px rgba(143, 211, 255, 0.45));
}

.tf-ask-nodus-btn:hover {
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 16px rgba(58, 166, 255, 0.35);
  transform: translateY(-1px);
}

.nodus-avatar-strip {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.nodus-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(143, 211, 255, 0.35);
  background: linear-gradient(135deg, rgba(58, 166, 255, 0.35), rgba(125, 252, 138, 0.25));
  animation: nodus-avatar-pulse 2.4s ease-in-out infinite;
}

.nodus-avatar--lead {
  width: 36px;
  height: 36px;
  box-shadow: 0 0 12px rgba(58, 166, 255, 0.35);
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  animation: none;
}

.nodus-avatar--photo:nth-child(3) {
  animation-delay: 0.3s;
}
.nodus-avatar--photo:nth-child(4) {
  animation-delay: 0.6s;
}
.nodus-avatar--photo:nth-child(5) {
  animation-delay: 0.9s;
}
.nodus-avatar--photo:nth-child(6) {
  animation-delay: 1.2s;
}

@keyframes nodus-avatar-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.celebration-overlay--splash .celebration-card--splash {
  padding: 28px 32px;
  transform: scale(1.04);
}

.celebration-overlay--splash .celebration-aurora-blob {
  opacity: 1;
  filter: blur(22px);
  animation-duration: 2.6s;
}

.celebration-overlay--splash .celebration-spark {
  animation-duration: 1.35s;
}

.celebration-overlay--splash .celebration-title {
  font-size: clamp(22px, 4vw, 32px);
}

body *:not(.tb-root):not(.tb-root *):not(.logo-main):not(.intro-logo):not(.intro-title) {
  font-family: inherit;
}

.logo-main,
.intro-logo,
.intro-title,
.intro-screen .intro-title {
  font-family: var(--font-display);
}

body.intro-active .intro-screen .intro-sub,
body.intro-active .intro-screen .intro-slogan,
body.intro-active .intro-screen .intro-loading,
body.intro-active .intro-screen .intro-loading-text {
  font-family: var(--font-mono) !important;
}

.my-page-screen .my-page-section {
  border-color: transparent;
}

.left-panel .app-data-panel--split-shell .app-data-split-outer {
  overflow: hidden;
}

#splitExpensesOverlay .app-data-header {
  position: relative;
  padding-right: 44px;
}

.map-settings-panel {
  overflow: hidden;
}

.app-data-panel .app-data-body-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

/* Force bare cross on all app ui-close (not Tomato) */
body:not(.tomato-mode) .ui-close,
body:not(.tomato-mode) button.ui-close,
body:not(.tomato-mode) .app-data-close.ui-close {
  width: var(--ui-chrome-size) !important;
  height: var(--ui-chrome-size) !important;
  min-width: var(--ui-chrome-size) !important;
  min-height: var(--ui-chrome-size) !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  transition:
    background-color 0.14s var(--ui-chrome-ease),
    box-shadow 0.14s var(--ui-chrome-ease),
    opacity 0.14s ease;
}

body:not(.tomato-mode) .ui-close::before,
body:not(.tomato-mode) .ui-close::after {
  width: 9px;
  height: 1.5px;
  transition: background-color 0.14s var(--ui-chrome-ease), box-shadow 0.14s var(--ui-chrome-ease);
}

/* Mac traffic light — solid disc, soft glow (no gradient artifacts) */
body:not(.tomato-mode) .ui-close:hover,
body:not(.tomato-mode) .ui-close:focus-visible {
  background-color: var(--ui-chrome-close-hover) !important;
  box-shadow: var(--ui-chrome-close-glow) !important;
  transform: none !important;
  opacity: 1 !important;
}

body:not(.tomato-mode) .ui-close:active {
  opacity: 0.82 !important;
}

body:not(.tomato-mode) .ui-close:hover::before,
body:not(.tomato-mode) .ui-close:hover::after,
body:not(.tomato-mode) .ui-close:focus-visible::before,
body:not(.tomato-mode) .ui-close:focus-visible::after {
  background: rgba(62, 0, 0, 0.9) !important;
  box-shadow: none !important;
  width: 9px;
}

/* Expand — same footprint as close, green on hover */
body:not(.tomato-mode) .photo-album-fs,
body:not(.tomato-mode) .ui-chrome-expand {
  border-radius: 50% !important;
  transition:
    background-color 0.14s var(--ui-chrome-ease),
    box-shadow 0.14s var(--ui-chrome-ease),
    color 0.14s var(--ui-chrome-ease),
    opacity 0.14s ease;
}

body:not(.tomato-mode) .photo-album-fs:hover,
body:not(.tomato-mode) .photo-album-fs:focus-visible,
body:not(.tomato-mode) .ui-chrome-expand:hover,
body:not(.tomato-mode) .ui-chrome-expand:focus-visible {
  background-color: var(--ui-chrome-expand-hover) !important;
  color: rgba(0, 48, 12, 0.95) !important;
  box-shadow: var(--ui-chrome-expand-glow) !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

body:not(.tomato-mode) .photo-album-fs:active,
body:not(.tomato-mode) .ui-chrome-expand:active {
  opacity: 0.82 !important;
}

body:not(.tomato-mode) .photo-album-fs:hover i,
body:not(.tomato-mode) .photo-album-fs:focus-visible i,
body:not(.tomato-mode) .ui-chrome-expand:hover i,
body:not(.tomato-mode) .ui-chrome-expand:focus-visible i {
  filter: none;
  text-shadow: none;
}

/* Five-dot hub — yellow on hover, no scale shift */
body:not(.tomato-mode) .ui-domino-trigger {
  border-radius: 50% !important;
  transition:
    background-color 0.14s var(--ui-chrome-ease),
    box-shadow 0.14s var(--ui-chrome-ease),
    color 0.14s var(--ui-chrome-ease),
    opacity 0.14s ease;
}

body:not(.tomato-mode) .ui-domino-trigger:hover,
body:not(.tomato-mode) .ui-domino-trigger:focus-visible {
  background-color: var(--ui-chrome-dots-hover) !important;
  color: rgba(48, 32, 0, 0.92) !important;
  box-shadow: var(--ui-chrome-dots-glow) !important;
  text-shadow: none !important;
  transform: none !important;
}

body:not(.tomato-mode) .ui-domino-trigger:active {
  opacity: 0.82 !important;
}

body:not(.tomato-mode) .ui-domino-trigger:hover .ui-domino-dots--five i,
body:not(.tomato-mode) .ui-domino-trigger:focus-visible .ui-domino-dots--five i {
  background: rgba(48, 32, 0, 0.88) !important;
  box-shadow: none !important;
}

body:not(.tomato-mode) .ui-domino-trigger.is-active {
  transform: none !important;
}

/* Chrome rows: expand + close aligned on one axis */
body:not(.tomato-mode) .photo-album-actions,
body:not(.tomato-mode) .ui-window-chrome {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: var(--ui-chrome-gap) !important;
  height: var(--ui-chrome-size) !important;
}

/* Terminal: domino + close on one axis (expand slot reserved when hub visible) */
body:not(.tomato-mode) .terminal-window .terminal-hub-btn {
  top: var(--ui-chrome-inset) !important;
  right: calc(var(--ui-chrome-inset) + var(--ui-chrome-size) + var(--ui-chrome-gap)) !important;
  width: var(--ui-chrome-size) !important;
  height: var(--ui-chrome-size) !important;
  min-width: var(--ui-chrome-size) !important;
  min-height: var(--ui-chrome-size) !important;
}

body:not(.tomato-mode) .terminal-window .terminal-close.ui-close:not(.ui-close--corner) {
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
  width: var(--ui-chrome-size) !important;
  height: var(--ui-chrome-size) !important;
  min-width: var(--ui-chrome-size) !important;
  min-height: var(--ui-chrome-size) !important;
}

/* Corner anchor: chrome pins to panel shell (photo-album distance), not padded header */
body:not(.tomato-mode) .travel-routes-header,
body:not(.tomato-mode) .app-data-header,
body:not(.tomato-mode) .friend-rank-header,
body:not(.tomato-mode) .friends-online-header,
body:not(.tomato-mode) .legal-info-header,
body:not(.tomato-mode) .notifications-header,
body:not(.tomato-mode) .achievements-panel .app-data-header {
  position: static !important;
}

body:not(.tomato-mode) .friends-online-panel .friends-online-header-actions,
body:not(.tomato-mode) .notifications-panel .notifications-header-actions {
  position: absolute !important;
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
  left: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: var(--ui-chrome-gap) !important;
  height: var(--ui-chrome-size) !important;
  z-index: 6;
  margin: 0 !important;
}

body:not(.tomato-mode) .friends-online-panel .friends-online-close.ui-close,
body:not(.tomato-mode) .notifications-panel .notifications-close.ui-close {
  position: relative !important;
  top: auto !important;
  right: auto !important;
}

body:not(.tomato-mode) .photo-album-actions .ui-close,
body:not(.tomato-mode) .photo-album-actions .photo-album-fs {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
}

/* Terminal flatpickr — premium month/year chrome */
.flatpickr-months {
  position: relative !important;
  height: 34px !important;
  padding: 0 30px !important;
  margin-bottom: 2px !important;
}

.flatpickr-months .flatpickr-month {
  height: 34px !important;
  overflow: visible !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0.78;
  transition: opacity 0.18s ease, background 0.18s ease, filter 0.18s ease;
}

.flatpickr-months .flatpickr-prev-month {
  left: 2px !important;
}

.flatpickr-months .flatpickr-next-month {
  right: 2px !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 11px !important;
  height: 11px !important;
  fill: rgba(186, 244, 205, 0.96) !important;
  display: block !important;
  margin: auto !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover,
.flatpickr-months .flatpickr-prev-month:focus-visible,
.flatpickr-months .flatpickr-next-month:focus-visible {
  opacity: 1 !important;
  background: rgba(125, 252, 138, 0.12) !important;
  border: none !important;
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.24) !important;
  filter: drop-shadow(0 0 6px rgba(125, 252, 138, 0.35));
}

.flatpickr-current-month {
  position: relative !important;
  left: 0 !important;
  width: 100% !important;
  height: 34px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-size: 11px !important;
  padding: 0 2px !important;
  margin: 0 !important;
  max-width: 48% !important;
  flex: 0 1 auto !important;
}

.flatpickr-current-month .numInputWrapper {
  width: 4.2em !important;
  min-width: 4.2em !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.flatpickr-current-month input.cur-year {
  font-size: 11px !important;
  width: 100% !important;
  min-width: 4.2em !important;
  padding: 2px 20px 2px 4px !important;
  margin: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown {
  opacity: 0.9 !important;
  border: none !important;
  right: 1px !important;
  width: 14px !important;
  left: auto !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp {
  top: 0 !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown {
  bottom: 0 !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
  border-bottom-color: rgba(186, 244, 205, 0.96) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
  border-top-color: rgba(186, 244, 205, 0.96) !important;
}

.flatpickr-current-month .numInputWrapper:hover span.arrowUp:after {
  border-bottom-color: rgba(232, 255, 239, 1) !important;
}

.flatpickr-current-month .numInputWrapper:hover span.arrowDown:after {
  border-top-color: rgba(232, 255, 239, 1) !important;
}

/* Photo album header: expand + close in one row (no absolute close overlap) */
.photo-album-header .photo-album-fs,
.photo-album-header .photo-album-close.ui-close {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  flex: 0 0 var(--ui-chrome-size);
}

.photo-album-header .photo-album-fs {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Unified window chrome row (close + neighbors) */
.ui-window-chrome,
.photo-album-actions,
.country-hub-head-right,
.friends-online-header-actions,
.notifications-header-actions {
  gap: var(--ui-chrome-gap);
}

.ui-window-chrome--corner,
.photo-album-actions {
  top: var(--ui-chrome-inset);
  right: var(--ui-chrome-inset);
}

.ui-domino-trigger,
.photo-album-fs,
.ui-glow-icon.ui-chrome-peer {
  width: var(--ui-chrome-size) !important;
  height: var(--ui-chrome-size) !important;
  min-width: var(--ui-chrome-size) !important;
  min-height: var(--ui-chrome-size) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.my-page-center .my-page-card,
.my-page-center .tf-composer-card,
.my-page-center .dating-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Corner close: symmetric inset from host top-right (top === right) */
body:not(.tomato-mode) #splitExpensesClose.ui-close {
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
  left: auto !important;
  bottom: auto !important;
}

/* === Remaining tasks wave (2026-05-29) === */

body:not(.tomato-mode) .tf-modal-window,
body:not(.tomato-mode) .photo-album-frame:not(:fullscreen),
body:not(.tomato-mode) .app-data-panel.card-base,
body:not(.tomato-mode) .terminal-window,
body:not(.tomato-mode) .achievement-help-window,
body:not(.tomato-mode) .visit-choice-window,
body:not(.tomato-mode) .legal-info-window,
body:not(.tomato-mode) .map-settings-panel,
body:not(.tomato-mode) .traveler-card-window {
  border-radius: var(--radius-window) !important;
  overflow: hidden;
  position: relative;
  border: var(--window-border-width) solid var(--window-border-color) !important;
  box-shadow: var(--window-shadow-depth) !important;
  outline: none !important;
}

/* Friend rank / achievements docked in left panel: single outer edge only */
body:not(.tomato-mode) .left-panel .friend-rank-panel,
body:not(.tomato-mode) .left-panel .achievements-panel {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* The map settings panel must stay absolutely anchored to the map (it sets
   top/left/z-index); the shared rule above wrongly forced position:relative,
   which dropped it into normal flow and got clipped by the map's overflow. */
body:not(.tomato-mode) .map-settings-panel {
  position: absolute !important;
}

.tf-modal-window,
#splitExpensesOverlay .app-data-panel,
.photo-album-frame,
.friend-rank-panel,
.app-data-panel.card-base {
  border-radius: var(--radius-window) !important;
}

.travel-forum-panel .tf-modal-window--thread,
.tf-modal-window.tf-modal-window--thread {
  border-radius: 0 !important;
  background: var(--ui-tf-modal-thread-bg) !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.tf-emoji-glyph,
.tf-react-emoji,
.nodus-emoji,
.emoji-premium {
  font-size: calc(1em * var(--emoji-premium-scale));
  line-height: 1.1;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.my-page-screen .photo-album-nav {
  border: none;
  background: transparent;
  box-shadow: none;
  color: rgba(220, 244, 235, 0.85);
}

.my-page-screen .photo-album-nav::before {
  border-right-color: rgba(220, 244, 235, 0.95);
  border-bottom-color: rgba(220, 244, 235, 0.95);
}

.map-settings-item--hint {
  flex-direction: row;
  align-items: flex-start;
}

.map-settings-hint {
  font-size: 9px;
  line-height: 1.35;
  color: var(--ui-map-settings-hint-color);
  letter-spacing: 0.02em;
  text-transform: none;
  padding-left: 0;
}

.map-settings-soon-row {
  cursor: default;
  opacity: 0.72;
}

.map-settings-soon-row:hover .map-settings-hint {
  color: var(--map-settings-text-dim);
}

.map-node-reviews-on .custom-marker:not(.custom-marker--rated) {
  opacity: 0.28;
  filter: grayscale(0.35);
}

.map-node-reviews-on .custom-marker--rated {
  box-shadow: 0 0 14px rgba(255, 217, 90, 0.45);
}

.mp-friends-list-label {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.75);
}

/* Friends view — compact header (no decorative empty avatar) */
#myPageViewFriends .my-page-section-sub {
  margin: 0 0 6px;
  font-size: 10px;
  line-height: 1.35;
  max-width: 52ch;
}
#myPageViewFriends .my-page-card--friends {
  margin-top: 6px;
  padding: 12px 14px 14px;
}
#myPageViewFriends .my-page-card-header--compact {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(125, 252, 138, 0.14);
}
#myPageViewFriends .my-page-card-header--compact .my-page-card-header-text {
  width: 100%;
  gap: 3px;
}
#myPageViewFriends .my-page-card-header--compact .my-page-card-title {
  font-family: var(--font-mypage, var(--font-main));
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 255, 230, 0.96);
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
}
#myPageViewFriends .my-page-card-header--compact .my-page-card-meta {
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-dim);
}
#myPageViewFriends .mp-friends-filters {
  margin: 0 0 8px;
  gap: 6px;
}
#myPageViewFriends .mp-friends-filter {
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  font-size: 10px;
}
#myPageViewFriends .mp-friends-search-row--premium {
  margin-bottom: 8px;
}
#myPageViewFriends .mp-friend-invite-bar {
  margin: 6px 0 8px;
  padding: 8px 10px;
  gap: 6px;
}
#myPageViewFriends .mp-friends-list-label {
  margin: 4px 0 6px;
}

.mp-friends-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.mp-friends-search-row .mp-field-input {
  flex: 1;
  min-width: 0;
}

.mp-friend-discover-results {
  margin-bottom: 10px;
  border: 1px solid rgba(236, 202, 116, 0.2);
  border-radius: 12px;
  background: rgba(6, 12, 10, 0.55);
  padding: 8px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  position: relative;
  z-index: 2;
}

.mp-friend-discover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
}

.mp-friend-discover-row:hover {
  background: rgba(125, 252, 138, 0.08);
}

.mp-friend-share-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  cursor: pointer;
}

.my-page-friend-panel {
  max-width: 100%;
}

.friend-map-mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 11050;
  pointer-events: none;
}

.friend-map-mode-overlay:not([hidden]) {
  pointer-events: auto;
}

.friend-map-mode-panel {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 10px 14px;
  border-radius: var(--radius-premium);
  border: 1px solid rgba(125, 252, 138, 0.45);
  background: rgba(6, 14, 11, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  max-width: min(520px, 92vw);
}

.friend-map-mode-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(220, 244, 232, 0.95);
}

.split-help-block,
.split-help-card {
  margin: 12px 8px 18px;
  padding: 14px 16px 16px;
}

#splitExpensesOverlay .split-panel {
  margin-bottom: 22px !important;
  padding-bottom: 0 !important;
}

.auth-panel:not(.auth-panel--login) .profile-body {
  padding-bottom: 16px;
  scroll-padding-bottom: 16px;
}

.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown {
  opacity: 1 !important;
  width: 16px !important;
}

.my-page-feed-demo-note {
  font-size: 10px;
  color: rgba(156, 198, 170, 0.85);
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

