/* ================== */
/* НОВЫЕ СТИЛИ */
/* ================== */

/* Quick Actions Grid — 2·2·2·3 via 6-col spans */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-4);
}
.quick-actions-grid > .quick-action-btn {
  grid-column: span 3;
}
.quick-actions-grid > .quick-action-btn:nth-child(n + 7) {
  grid-column: span 2;
}

.quick-action-btn {
  padding: var(--space-4);
  border: 1px solid var(--ui-surface-border);
  background: var(--ui-surface-fill);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: all var(--elevate-duration) var(--elevate-ease);
}

.quick-action-btn:hover {
  border-color: var(--ui-surface-hover-border);
  color: var(--green);
  transform: translateY(-1px);
  box-shadow: var(--ui-surface-hover-glow);
}

.quick-action-btn.active {
  border-color: var(--ui-surface-active-border);
  color: var(--green);
  transform: translateY(-1px);
  box-shadow: var(--ui-surface-active-glow);
  background: var(--ui-surface-active-fill);
}

.quick-action-btn i {
  font-size: 14px;
}

/* Zoom indicator */
.map-zoom-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-soft);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  color: var(--text-dim);
  z-index: 500;
  pointer-events: none;
  white-space: nowrap;
}

.country-label-text {
  /* font-family: var(--font-mono); ← удалить */
  font-size: 10px !important;
  color: var(--blue) !important;
  text-shadow: 0 0 4px rgba(58, 166, 255, 0.9), 0 0 10px rgba(58, 166, 255, 0.6) !important;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 4px;
  border-radius: 2px;
  white-space: nowrap;
}

/* Type badge */
.node-type-badge {
  display: inline-block;
  padding: 1px 4px;
  margin-left: 6px;
  border-radius: 2px;
  font-size: 8px;
  text-transform: uppercase;
  background: rgba(58, 166, 255, 0.2);
  color: var(--blue);
  vertical-align: middle;
}

.profile-countries-block {
  border-color: rgba(72, 178, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(72, 178, 255, 0.2) inset;
}

.profile-country-row .place-city-name,
.profile-country-row .place-city-meta,
.profile-country-row .node-type-badge {
  color: rgba(168, 218, 255, 0.98) !important;
}

/* Navigation active states */
.profile-nav-item {
  position: relative;
  transition: all 0.15s ease;
}

.profile-nav-item:hover {
  color: var(--green);
  padding-left: 8px;
}

.profile-nav-item.active {
  color: var(--green);
  border-left: 2px solid var(--green);
  padding-left: 10px;
  background: var(--ui-nav-active-bg);
}

.profile-nav-item.active:hover {
  padding-left: 10px;
}

/* Sound toggle button */
#soundToggleBtn.muted i {
  color: var(--text-dim);
}

#soundToggleBtn.muted:hover i {
  color: var(--text-main);
}

/* Smooth zoom transition */
.leaflet-zoom-animated {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Pulsing dot animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse-dot {
  animation: pulse 2s infinite;
}

/* Country highlight animation */
@keyframes country-highlight {
  0% {
    fill-opacity: 0.2;
  }
  50% {
    fill-opacity: 0.4;
  }
  100% {
    fill-opacity: 0.35;
  }
}

/* Media query for smaller screens */
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: clamp(248px, 24vw, 300px) minmax(0, 1fr) clamp(248px, 24vw, 300px);
  }

  .logo-main {
    font-size: 28px;
    letter-spacing: 0.25em;
  }

  .intro-title {
    font-size: 28px;
  }
}

@media (max-width: 1024px) {
  html:not(.mnm-mobile-swipe-panels) .app-shell {
    grid-template-columns: var(--side-panel-width-narrow) minmax(0, 1fr) 0;
  }

  .right-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(calc(var(--side-panel-width) - 20px), 92vw);
    height: 100dvh;
    max-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 100;
  }

  .right-panel.collapsed {
    transform: translateX(100%);
  }
}

/*
 * Laptop / scaled desktop (effective height ≤899px): compact padding, single middle scroll.
 */
@media (max-height: 899px) {
  .app-shell > .left-panel,
  #rightPanel.right-panel {
    --rp-qa-btn-min: 24px;
    padding: var(--space-8);
  }

  .left-panel .logo-main {
    font-size: clamp(20px, 4.2vw, 28px);
    letter-spacing: 0.18em;
  }

  .left-panel .places-panel {
    margin-top: var(--space-8);
  }

  #rightPanel > .profile-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
  }

  #rightPanel .avatar-circle {
    width: 64px;
    height: 64px;
  }

  #rightPanel .profile-header-main {
    gap: var(--space-6);
  }

  #rightPanel .profile-auth-actions {
    gap: 4px;
  }

  #rightPanel .btn-auth--premium {
    padding: 4px 6px;
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  /* One scroll zone (not two) — only if content still taller than viewport */
  #rightPanel > .profile-middle {
    flex: 1 1 0;
    min-height: 0;
    gap: var(--rp-section-gap);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
  }

  #rightPanel > .profile-middle > .profile-nav,
  #rightPanel > .profile-middle > .profile-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    max-height: none;
  }

  #rightPanel > .profile-middle > .profile-nav {
    gap: var(--rp-section-gap);
  }

  #rightPanel > .profile-middle > .profile-body {
    gap: var(--rp-section-gap);
  }

  #rightPanel .profile-nav-section {
    padding: var(--space-4) var(--space-6);
  }

  #rightPanel .profile-nav-title {
    margin-bottom: var(--space-2);
  }

  #rightPanel .profile-nav-section--social .profile-nav-list,
  #rightPanel .profile-nav-section--travel .profile-nav-list {
    gap: var(--rp-row-gap, 2px);
  }

  #rightPanel .profile-block {
    padding: var(--space-4) var(--space-6);
  }

  #rightPanel #quickActions .quick-actions-grid {
    gap: 4px;
    grid-auto-rows: minmax(var(--rp-qa-btn-min, 24px), 1fr);
  }

  #rightPanel #quickActions .quick-action-btn {
    min-height: var(--rp-qa-btn-min, 24px);
    padding: 3px 4px;
    font-size: 8px;
  }

  #rightPanel #quickActions .quick-action-btn i {
    font-size: 10px;
  }

  #rightPanel .travel-stats-block .profile-list li {
    padding-bottom: 1px;
    margin-bottom: 1px;
  }

  #rightPanel > .profile-nav-section--system {
    margin-top: 0;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  #rightPanel > .profile-legal-stack {
    margin-top: 0;
  }
}

/* 1366×768 — fit without scroll when possible */
@media (max-height: 768px) {
  #rightPanel.right-panel {
    --rp-section-gap: 6px;
    --rp-row-gap-min: 2px;
    --rp-row-gap: 2px;
    --rp-qa-btn-min: 22px;
    padding: var(--space-8);
  }

  #rightPanel .profile-block {
    padding: var(--space-3) var(--space-5);
  }

  #rightPanel .avatar-circle {
    width: 52px;
    height: 52px;
  }

  #rightPanel > .profile-header {
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
  }

  #rightPanel > .profile-middle {
    gap: var(--rp-section-gap);
  }

  #rightPanel > .profile-middle > .profile-nav,
  #rightPanel .profile-body {
    gap: var(--rp-section-gap);
  }

  #rightPanel .profile-nav-item {
    min-height: 18px;
  }

  #rightPanel .profile-nav-section--social .profile-nav-item,
  #rightPanel .profile-nav-section--travel .profile-nav-item {
    padding-top: 0;
    padding-bottom: 0;
  }

  #rightPanel #quickActions .quick-actions-grid {
    gap: 3px;
    grid-auto-rows: minmax(var(--rp-qa-btn-min, 22px), 1fr);
  }

  #rightPanel #quickActions .quick-action-btn {
    min-height: var(--rp-qa-btn-min, 22px);
    padding: 3px 4px;
    font-size: 7.5px;
    line-height: 1.08;
  }

  #rightPanel #quickActions .quick-action-btn span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #rightPanel .travel-stats-block .profile-list {
    margin-top: var(--space-2);
  }

  #rightPanel .travel-stats-block .profile-list li {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  #rightPanel > .profile-nav-section--system {
    margin-top: 0;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  #rightPanel > .profile-legal-stack {
    margin-top: 0;
  }

  #rightPanel .profile-nav-footer-credit--classic {
    padding: var(--space-4) 4px 2px;
  }
}

/* 1280×720 — still tight; one thin scroll only if OS/browser chrome eats height */
@media (max-height: 720px) {
  #rightPanel.right-panel {
    --rp-section-gap: 6px;
    padding: var(--space-8);
  }

  #rightPanel .profile-caption,
  #rightPanel .profile-nav-title {
    letter-spacing: 0.1em;
    font-size: 8px;
  }

  #rightPanel #quickActions .quick-actions-grid {
    grid-auto-rows: minmax(24px, auto);
  }

  #rightPanel #quickActions .quick-action-btn {
    min-height: 24px;
    gap: 1px;
  }

  #rightPanel #quickActions .quick-action-btn i {
    font-size: 11px;
  }
}

/* Short laptops: thin scrollbar on whole right panel */
@media (max-height: 899px) {
  #rightPanel.right-panel::-webkit-scrollbar {
    width: 6px;
  }

  #rightPanel.right-panel::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 4px;
  }
}

/* Desktop reference (≥900px height): left places panel stretch */
@media (min-height: 900px) {
  #rightPanel > .profile-middle {
    overflow: visible;
  }

  .left-panel .places-panel {
    flex: 1 1 auto;
  }
}

/* Narrow but tall: slightly tighter side padding, same behavior */
@media (max-width: 1400px) and (min-height: 900px) {
  #rightPanel.right-panel {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  .app-shell > .left-panel {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  #rightPanel > .profile-middle > .profile-nav {
    gap: var(--rp-section-gap);
  }
}

/* =============================================================================
   SIDE PANELS v46 — locked card rhythm + premium ambient surface
   ============================================================================= */

.left-panel,
#rightPanel.right-panel {
  background:
    radial-gradient(circle at 18% 9%, rgba(143, 211, 255, 0.09), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(125, 252, 138, 0.08), transparent 28%),
    linear-gradient(118deg, transparent 0 18%, rgba(143, 211, 255, 0.05) 18.2%, transparent 18.7% 44%, rgba(125, 252, 138, 0.045) 44.2%, transparent 44.7%),
    linear-gradient(38deg, transparent 0 31%, rgba(236, 202, 116, 0.035) 31.2%, transparent 31.7% 68%, rgba(143, 211, 255, 0.04) 68.2%, transparent 68.7%),
    radial-gradient(circle at 0 0, var(--ui-panel-grad-a) 0, var(--ui-panel-grad-b) 55%),
    var(--bg-panel);
  background-blend-mode: screen, screen, soft-light, soft-light, normal, normal;
}

.left-panel::before,
#rightPanel.right-panel::before {
  background-image:
    radial-gradient(circle at 22% 22%, rgba(143, 211, 255, 0.08) 0 1px, transparent 1.6px),
    radial-gradient(circle at 74% 42%, rgba(125, 252, 138, 0.075) 0 1px, transparent 1.6px),
    linear-gradient(115deg, transparent 0 24%, rgba(143, 211, 255, 0.06) 24.1%, transparent 24.55% 100%),
    linear-gradient(28deg, transparent 0 62%, rgba(125, 252, 138, 0.05) 62.1%, transparent 62.55% 100%),
    linear-gradient(72deg, transparent 0 41%, rgba(143, 211, 255, 0.035) 41.1%, transparent 41.45% 100%),
    var(--ui-panel-texture);
  background-size: 190px 230px, 220px 180px, 100% 100%, 100% 100%, 100% 100%, auto;
  opacity: 0.78;
  mix-blend-mode: soft-light;
}

#rightPanel.right-panel {
  --rp-section-gap: 10px;
  --rp-row-gap-min: 2px;
  --rp-row-gap: clamp(2px, 0.34vh, 7px);
  gap: var(--rp-section-gap);
  height: 100%;
  padding: var(--space-14);
  padding-bottom: max(var(--space-14), env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

#rightPanel > .profile-header,
#rightPanel > .profile-nav-section--system,
#rightPanel > .profile-legal-stack {
  flex: 0 0 auto;
}

#rightPanel > .profile-middle {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--rp-section-gap);
  overflow: hidden;
}

#rightPanel > .profile-middle > .profile-nav,
#rightPanel > .profile-middle > .profile-body {
  display: contents;
}

#rightPanel .profile-nav-section--social,
#rightPanel .profile-nav-section--travel,
#rightPanel #quickActions,
#rightPanel .travel-stats-block {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#rightPanel .profile-nav-section--social {
  flex: 1 1 0;
}

#rightPanel .profile-nav-section--travel {
  flex: 1 1 0;
}

#rightPanel #quickActions {
  flex: 1 1 0;
}

#rightPanel .travel-stats-block {
  flex: 1 1 0;
}

#rightPanel .profile-nav-section--social .profile-nav-list,
#rightPanel .profile-nav-section--travel .profile-nav-list {
  gap: 1px;
  justify-content: flex-start;
}

#rightPanel .profile-nav-section--social .profile-nav-item,
#rightPanel .profile-nav-section--travel .profile-nav-item {
  min-height: 0;
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.15;
}

#rightPanel > .profile-nav-section--system {
  margin-top: 0;
  margin-bottom: 0;
}

#rightPanel > .profile-legal-stack {
  margin-top: 0;
}

#rightPanel .profile-nav-section--social .profile-nav-list,
#rightPanel .profile-nav-section--travel .profile-nav-list,
#rightPanel .travel-stats-block .profile-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1px;
  overflow: visible;
  padding-right: 2px;
}

#rightPanel .quick-actions-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(var(--rp-qa-btn-min, 28px), 1fr));
  gap: 5px;
  align-content: stretch;
  overflow: hidden;
  padding-bottom: 0;
  margin-top: 2px;
}

#rightPanel .quick-action-btn {
  box-sizing: border-box;
  min-width: 0;
  min-height: var(--rp-qa-btn-min, 28px);
  max-height: 100%;
  height: auto;
  padding: 2px 3px;
  overflow: hidden;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#rightPanel .quick-action-btn i {
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}

#rightPanel .quick-action-btn span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.05;
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

#rightPanel .profile-nav-item,
#rightPanel .quick-action-btn,
.left-panel .info-card,
.left-panel .places-panel,
.left-panel .place-country,
.left-panel .place-city {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    filter 0.18s ease;
}

#rightPanel .profile-nav-item,
#rightPanel .quick-action-btn {
  border-radius: 3px;
}

#rightPanel .profile-nav-item:hover,
#rightPanel .profile-nav-item.active {
  color: rgba(214, 255, 232, 0.98);
  background: rgba(125, 252, 138, 0.08);
  box-shadow: inset 3px 0 0 rgba(125, 252, 138, 0.88);
  border-color: rgba(125, 252, 138, 0.38);
  filter: none;
  transform: none;
}

#rightPanel .quick-action-btn:hover,
#rightPanel .quick-action-btn.active {
  color: rgba(214, 255, 232, 0.98);
  background: rgba(125, 252, 138, 0.09);
  box-shadow:
    inset 3px 0 0 rgba(125, 252, 138, 0.9),
    inset -3px 0 0 rgba(125, 252, 138, 0.9);
  border-color: rgba(125, 252, 138, 0.45);
  filter: none;
  transform: none;
}

.left-panel .info-card:hover,
.left-panel .places-panel:hover,
.left-panel .place-country:hover,
.left-panel .place-city:hover,
#rightPanel .card-base:hover {
  border-color: rgba(143, 211, 255, 0.32);
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.07) inset,
    0 12px 24px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(58, 166, 255, 0.08);
}

@media (max-height: 899px) {
  #rightPanel.right-panel {
    --rp-section-gap: 8px;
    --rp-row-gap: 2px;
    padding: var(--space-8);
    overflow: hidden;
  }

  #rightPanel > .profile-middle {
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
  }

  #rightPanel .profile-nav-section--social {
    flex: 1 1 0;
  }

  #rightPanel .profile-nav-section--travel {
    flex: 1 1 0;
  }

  #rightPanel #quickActions {
    flex: 1 1 0;
  }

  #rightPanel .travel-stats-block {
    flex: 1 1 0;
  }

  #rightPanel .profile-nav-section--social .profile-nav-list,
  #rightPanel .profile-nav-section--travel .profile-nav-list,
  #rightPanel .travel-stats-block .profile-list {
    justify-content: flex-start;
    gap: var(--rp-row-gap);
  }

  #rightPanel .quick-actions-grid {
    grid-template-rows: repeat(4, minmax(var(--rp-qa-btn-min, 26px), 1fr));
    gap: 4px;
  }
}

@media (max-height: 768px) {
  #rightPanel.right-panel {
    --rp-section-gap: 6px;
  }

  #rightPanel .quick-actions-grid {
    grid-template-rows: repeat(4, minmax(var(--rp-qa-btn-min, 24px), 1fr));
  }
}

/* Print styles for export */
@media print {
  .neon-frame::before,
  .app-bg-texture,
  .panel-handle,
  .terminal-overlay,
  .intro-screen {
    display: none !important;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .left-panel,
  .right-panel,
  .map-panel {
    border: 1px solid #000;
    box-shadow: none;
  }

  body {
    background: white;
    color: black;
    overflow: auto;
  }
}
@keyframes neon-pulse {
  0% {
    opacity: 0.8;
    text-shadow: 0 0 6px rgba(58, 166, 255, 0.7),
      0 0 14px rgba(58, 166, 255, 0.4);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(58, 166, 255, 1),
      0 0 22px rgba(58, 166, 255, 0.8);
  }
  100% {
    opacity: 0.8;
    text-shadow: 0 0 6px rgba(58, 166, 255, 0.7),
      0 0 14px rgba(58, 166, 255, 0.4);
  }
}

.status-clock,
.status-users,
.status-indicator.online {
  animation: neon-pulse 2.4s ease-in-out infinite;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ui-close,
  .photo-album-fs,
  .photo-album-nav,
  .map-birthhome-pin-wrap .map-birthhome-pin,
  .btn-main,
  .btn-ghost,
  button,
  [role="button"] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
/* ===== MY NODE MAP BRAND ===== */

.mnm-logo-mark-slot {
  line-height: 0;
  color: #eafff4;
}

.mnm-logo-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mnm-logo-svg .mnm-logo-art,
.mnm-logo-svg path {
  fill: currentColor;
  stroke: none;
}

.mnm-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.mnm-logo-mark-slot.mnm-logo-mark--title {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.24em;
  height: 1.24em;
  margin: 0 0.04em 0 -0.06em;
  padding: 0;
  line-height: 0;
  letter-spacing: 0;
  vertical-align: -0.22em;
  overflow: visible;
  color: inherit;
  filter: drop-shadow(0 0 5px currentColor);
}

.mnm-logo-mark--title .mnm-logo-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-mymap-simple .logo-main,
.logo-mymap-simple .logo-block,
.intro-title-mymap-simple,
.intro-title-mymap-simple .intro-logo {
  overflow: visible;
}

.logo-mymap-simple .logo-main-line,
.intro-title-mymap-simple .intro-main-line {
  line-height: 1;
  display: block;
  text-align: center;
  overflow: visible;
}

.logo-mymap-simple .logo-main-line .mnm-logo-mark--title,
.intro-title-mymap-simple .intro-main-line .mnm-logo-mark--title {
  width: 1.24em;
  height: 1.24em;
  margin: 0 0.04em 0 -0.06em;
  letter-spacing: 0;
  vertical-align: -0.22em;
}

.mnm-logo-mark--shelf-hero,
.right-panel-brand-hero-img {
  display: block;
  flex-shrink: 0;
  width: min(88cqi, 248px);
  height: min(88cqi, 248px);
  margin: 0 auto;
  color: #eafff4;
  filter:
    drop-shadow(0 0 10px rgba(125, 252, 138, 0.55))
    drop-shadow(0 0 22px rgba(125, 252, 138, 0.28));
}
.right-panel-brand-shelf {
  container-type: inline-size;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(14px, 4cqi, 22px) clamp(10px, 2.5cqi, 14px) 12px;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 0 0, rgba(12, 22, 30, 0.82) 0, rgba(6, 10, 14, 0.98) 55%),
    var(--bg-panel);
  border: 1px solid var(--border-soft);
  box-shadow:
    0 0 0 1px rgba(20, 40, 30, 0.9),
    0 14px 26px rgba(0, 0, 0, 0.7),
    inset 1px 0 12px rgba(125, 252, 138, 0.08);
}

.right-panel-brand-shelf::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(
      circle at 0 100%,
      rgba(80, 140, 220, 0.08) 0,
      rgba(80, 140, 220, 0.08) 2px,
      transparent 2px,
      transparent 8px
    ),
    repeating-radial-gradient(
      circle at 0 0,
      rgba(80, 140, 220, 0.05) 0,
      rgba(80, 140, 220, 0.05) 4px,
      transparent 4px,
      transparent 14px
    );
  opacity: 0.55;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.right-panel-wrapper:has(#rightPanel.collapsed) .right-panel-brand-shelf {
  display: flex;
}

.right-panel-brand-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.mnm-logo-mark--shelf-hero .mnm-logo-svg {
  shape-rendering: geometricPrecision;
}

/* Collapsed right column — large logo mark + slogan */
.right-panel-brand-slogan {
  margin: clamp(14px, 5.5cqi, 28px) 0 0;
  padding: 0 clamp(4px, 1.5cqi, 8px);
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  color: #eafff4;
  text-shadow:
    0 0 8px rgba(125, 252, 138, 0.92),
    0 0 20px rgba(125, 252, 138, 0.48);
}

.right-panel-brand-slogan-line {
  display: block;
  font-size: clamp(24px, 15cqi, 44px);
  letter-spacing: 0.14em;
  line-height: 1.02;
  text-transform: uppercase;
  white-space: nowrap;
  color: inherit;
  text-shadow: inherit;
  animation: horror-lamp-flicker 2s infinite;
}

.right-panel-brand-slogan-line:nth-child(1) {
  animation-delay: 0s, 0.05s;
}

.right-panel-brand-slogan-line:nth-child(2) {
  animation-delay: 0s, 0.18s;
}

.right-panel-brand-slogan-line:nth-child(3) {
  animation-delay: 0s, 0.32s;
}

.right-panel-brand-slogan-line + .right-panel-brand-slogan-line {
  margin-top: clamp(2px, 1cqi, 6px);
}

.right-panel-brand-slogan-line.slogan-line-life {
  letter-spacing: 0.1em;
}

/* LIFE <-> LIVE morphing letter */
.slogan-morph {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  line-height: inherit;
}

.slogan-morph-rail {
  visibility: hidden;
  pointer-events: none;
}

.slogan-morph-f {
  position: absolute;
  left: 0;
  top: 0;
  line-height: inherit;
  animation: slogan-morph-f 3.4s steps(1, end) infinite;
}

.slogan-morph-v {
  position: absolute;
  left: -0.09em;
  top: 0;
  line-height: inherit;
  opacity: 0;
  animation: slogan-morph-v 3.4s steps(1, end) infinite;
}

@keyframes horror-lamp-flicker {
  0%, 100% {
    opacity: 1;
    filter: brightness(1);
  }
  3% {
    opacity: 0.3;
    filter: brightness(0.4);
  }
  4% {
    opacity: 0.95;
    filter: brightness(1.05);
  }
  5% {
    opacity: 0.2;
    filter: brightness(0.3);
  }
  6% {
    opacity: 1;
  }
  11% {
    opacity: 0.88;
  }
  12% {
    opacity: 0.35;
    filter: brightness(0.45);
  }
  13% {
    opacity: 1;
  }
  18% {
    opacity: 0.5;
    filter: brightness(0.55);
  }
  19% {
    opacity: 0.15;
    filter: brightness(0.25);
  }
  20% {
    opacity: 0.9;
  }
  21% {
    opacity: 1;
  }
  27% {
    opacity: 0.4;
    filter: brightness(0.5);
  }
  28% {
    opacity: 1;
  }
  33% {
    opacity: 0.25;
    filter: brightness(0.35);
  }
  34% {
    opacity: 0.85;
  }
  35% {
    opacity: 1;
  }
  42% {
    opacity: 0.55;
    filter: brightness(0.6);
  }
  43% {
    opacity: 0.12;
    filter: brightness(0.2);
  }
  44% {
    opacity: 0.7;
  }
  45% {
    opacity: 0.3;
  }
  46% {
    opacity: 1;
    filter: brightness(1.08);
  }
  52% {
    opacity: 0.45;
    filter: brightness(0.5);
  }
  53% {
    opacity: 1;
  }
  58% {
    opacity: 0.9;
  }
  59% {
    opacity: 0.22;
    filter: brightness(0.35);
  }
  60% {
    opacity: 1;
  }
  66% {
    opacity: 0.38;
    filter: brightness(0.48);
  }
  67% {
    opacity: 0.95;
  }
  68% {
    opacity: 1;
  }
  74% {
    opacity: 0.18;
    filter: brightness(0.28);
  }
  75% {
    opacity: 0.8;
  }
  76% {
    opacity: 0.35;
  }
  77% {
    opacity: 1;
  }
  83% {
    opacity: 0.5;
    filter: brightness(0.55);
  }
  84% {
    opacity: 0.1;
    filter: brightness(0.2);
  }
  85% {
    opacity: 0.92;
  }
  86% {
    opacity: 1;
  }
  92% {
    opacity: 0.42;
    filter: brightness(0.5);
  }
  93% {
    opacity: 1;
  }
}

@keyframes slogan-morph-f {
  0%, 44% { opacity: 1; }
  47% { opacity: 0.2; }
  50%, 94% { opacity: 0; }
  97% { opacity: 0.2; }
  100% { opacity: 1; }
}

@keyframes slogan-morph-v {
  0%, 44% { opacity: 0; }
  47% { opacity: 0.2; }
  50%, 94% { opacity: 1; }
  97% { opacity: 0.2; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .right-panel-brand-slogan-line {
    animation: logo-color-cycle 6s infinite;
  }

  .slogan-morph-f,
  .slogan-morph-v {
    animation: none;
  }
  .slogan-morph-v {
    opacity: 0;
  }
}

.mnm-logo-mark--page {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin: 0 10px 0 0;
  vertical-align: middle;
  color: #eafff4;
  filter: drop-shadow(0 0 7px rgba(234, 255, 244, 0.4));
}

.mnm-logo-mark--header-hero .mnm-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mnm-logo-mark--legal-hero {
  display: block;
  width: 96px;
  height: 96px;
  color: #eafff4;
  filter: drop-shadow(0 0 10px rgba(125, 252, 138, 0.32));
}

.mnm-logo-mark--about {
  display: block;
  width: 70px;
  height: 70px;
  margin: 0 auto 10px;
  color: #eafff4;
  filter: drop-shadow(0 0 12px rgba(234, 255, 244, 0.42));
}

/* Logo crowning the bottom line of left/right menus */
.panel-crown-anchor {
  position: relative;
  flex-shrink: 0;
  height: 0;
  margin: 0;
  overflow: visible;
  pointer-events: none;
}

.panel-crown-anchor--inline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
}

.panel-crown-sep {
  position: absolute;
  left: -4px;
  right: -4px;
  top: 0;
  height: 1px;
  border: none;
  transform: none;
  background: linear-gradient(
    90deg,
    rgba(58, 166, 255, 0),
    rgba(58, 166, 255, 0.35),
    rgba(125, 252, 138, 0.28),
    rgba(58, 166, 255, 0.35),
    rgba(58, 166, 255, 0)
  );
  box-shadow: 0 0 12px rgba(58, 166, 255, 0.12);
}

.panel-crown-anchor .mnm-logo-mark--crown {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: var(--panel-crown-logo);
  height: var(--panel-crown-logo);
  z-index: 2;
  pointer-events: none;
  color: #eafff4;
  filter: drop-shadow(0 0 8px rgba(234, 255, 244, 0.45));
}

#rightPanel > .profile-legal-stack .panel-crown-anchor {
  margin-bottom: var(--panel-crown-pad);
}

.nodus-profile-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.my-page-global-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.logo-mymap-simple .logo-main-line {
  display: block;
  font-family: var(--font-display);
  font-size: 45px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
}

.logo-mymap-simple .logo-sub-line {
  display: block;
  font-family: var(--font-display);
  font-size: 45px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 5px;
  text-align: center;
}

.intro-title-mymap-simple .intro-main-line,
.intro-title-mymap-simple .intro-sub-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 7.5vw, 45px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}

.intro-title-mymap-simple .intro-main-line .mnm-logo-mark--title {
  width: 1.24em;
  height: 1.24em;
  max-width: 1.24em;
  max-height: 1.24em;
  overflow: hidden;
}

.intro-title-mymap-simple .intro-main-line {
  white-space: nowrap;
}

.intro-title-mymap-simple .intro-sub-line {
  margin-top: 5px;
}
.auth-actions-row {
  display: flex;
  gap: var(--space-4);
  justify-content: flex-end;
  align-items: center;
}
.auth-actions-row[hidden] {
  display: none !important;
}
.auth-actions-row .btn-main,
.auth-actions-row .btn-ghost {
  font-size: var(--font-sm);
  padding: 8px 14px;
  height: 36px; /* фиксируем высоту */
  display: inline-flex;
  align-items: center; /* выравниваем текст по вертикали */
}
.auth-actions-row .btn-main[hidden],
.auth-actions-row .btn-ghost[hidden] {
  display: none !important;
}
/* ===== TOMATO BATTLE ICON ON MAP ===== */

.tomato-battle-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.tomato-battle-img {
  width: 148px;
  height: auto;
  max-height: 148px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 0 10px rgba(255, 80, 80, 0.55))
    drop-shadow(0 0 18px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 92%;
  animation: tomato-battle-sway 4.2s ease-in-out infinite;
}

@keyframes tomato-battle-sway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(1.1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tomato-battle-img {
    animation: none !important;
  }
}

/* ===== NoDUS peek (map corner companion) ===== */

.nodus-peek {
  position: absolute;
  right: 0;
  top: calc(14px + var(--tomato-battle-img-stack-h, 92px) + 8px);
  z-index: 1195;
  height: 80px;
  width: 120px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: width 0.3s ease, filter 0.2s ease;
  filter: drop-shadow(-4px 4px 12px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 14px rgba(58, 166, 255, 0.25));
}

.nodus-peek--collapsed {
  width: 60px;
}

.nodus-peek--expanded {
  width: 120px;
}

.nodus-peek-inner {
  display: block;
  width: 120px;
  height: 80px;
  flex-shrink: 0;
}

.nodus-peek-img {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: cover;
  object-position: 58% 12%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.nodus-peek {
  display: none !important;
}

.nodus-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 14050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

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

.nodus-profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 8, 0.72);
  backdrop-filter: blur(6px);
}

.nodus-profile-window {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 16px 16px 18px;
  border-radius: 2px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: linear-gradient(165deg, rgba(10, 22, 18, 0.98), rgba(4, 10, 8, 0.99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(58, 166, 255, 0.12);
}

.nodus-profile-close {
  position: absolute;
  z-index: 2;
}

.nodus-profile-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding-right: 28px;
}

.nodus-profile-hero {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(125, 252, 138, 0.4);
  border-radius: 0;
  flex-shrink: 0;
}

.nodus-profile-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(210, 255, 230, 0.98);
}

.nodus-profile-tag {
  margin: 4px 0 0;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(140, 190, 210, 0.88);
}

.nodus-profile-bio {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(210, 228, 220, 0.92);
}

.nodus-profile-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.nodus-profile-shot {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(102, 164, 124, 0.35);
  background: rgba(6, 14, 11, 0.85);
  text-align: center;
  overflow: hidden;
}

.nodus-profile-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}

.nodus-profile-shot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  font-size: 22px;
  color: rgba(125, 252, 138, 0.75);
  background: rgba(8, 16, 14, 0.9);
}

.nodus-profile-shot figcaption {
  padding: 4px 2px;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 200, 180, 0.85);
}

.nodus-profile-actions {
  display: flex;
  justify-content: center;
}

.nodus-profile-actions .btn-main {
  min-width: 160px;
}

@media (max-width: 720px) {
  .nodus-peek {
    height: 64px;
    width: 96px;
  }

  .nodus-peek--collapsed {
    width: 48px;
  }

  .nodus-peek--expanded {
    width: 96px;
  }

  .nodus-peek-inner,
  .nodus-peek-img {
    width: 96px;
    height: 64px;
  }
}

@media (max-width: 520px) {
  .nodus-peek {
    display: none;
  }
}

/* Tomato Battle — promo card (glass, next to logo; above map canvas & intro is gone) */
.tomato-promo-card {
  position: absolute;
  top: 14px;
  right: 158px;
  z-index: 1250;
  max-width: min(260px, calc(100vw - 200px));
  pointer-events: auto;
  animation: tomato-promo-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tomato-promo-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tomato-promo-inner {
  position: relative;
  padding: 12px 14px 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 90, 90, 0.45);
  background: linear-gradient(
    145deg,
    rgba(120, 20, 28, 0.42) 0%,
    rgba(40, 8, 12, 0.55) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 120, 120, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tomato-promo-chart {
  display: block;
  width: 100%;
  height: 44px;
  margin-bottom: 8px;
  padding: 0 2px;
  overflow: visible;
}

.tomato-promo-spark {
  display: block;
  width: 100%;
  height: 44px;
  overflow: visible;
}

.tomato-promo-spark-line {
  filter: drop-shadow(0 0 6px rgba(255, 120, 100, 0.45));
}

.tomato-promo-spark-area {
  opacity: 1;
}

.tomato-promo-kicker {
  margin: 0 0 4px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 200, 200, 0.75);
}

.tomato-promo-headline {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.tomato-promo-body {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 230, 230, 0.88);
}

.tomato-promo-cta {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 160, 0.55);
  background: rgba(255, 60, 60, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.tomato-promo-cta:hover {
  background: rgba(255, 80, 80, 0.5);
  box-shadow: 0 0 20px rgba(255, 80, 80, 0.35);
}

.tomato-promo-dismiss.ui-close {
  position: absolute;
  top: var(--ui-chrome-corner-inset);
  right: var(--ui-chrome-corner-inset);
  z-index: 2;
}

.tf-modal-window--thread > .tf-modal-close.ui-close {
  position: absolute !important;
  top: var(--ui-chrome-corner-inset) !important;
  right: var(--ui-chrome-corner-inset) !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 10;
}

@media (max-width: 720px) {
  .tomato-promo-card {
    right: 12px;
    top: 118px;
    max-width: calc(100vw - 24px);
  }
}

/* Mapbox controls: top-left — row1: +/- and 3D/settings; row2: world under +/- */
.mapboxgl-ctrl-top-left {
  top: 22px;
  left: 14px;
  right: auto;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  gap: 6px 8px;
  align-items: start;
}
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl) {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}
.mapboxgl-ctrl-top-left > .map-zoom-world-ctrl {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  margin: 0;
}
.mapboxgl-ctrl-top-left > .map-tilt-ctrl {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
}
.mapboxgl-ctrl-top-left .mapboxgl-ctrl {
  margin-bottom: 0;
}
.mapboxgl-ctrl-group {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}

/* Glass style for +/- map zoom control */
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl) {
  background: var(--ui-map-zoom-group-bg);
  border: 1px solid var(--ui-map-zoom-group-border);
  border-radius: var(--ui-map-zoom-group-radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--ui-map-zoom-group-shadow);
  transform: translateY(0);
}
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl)
  button.mapboxgl-ctrl-zoom-in,
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl)
  button.mapboxgl-ctrl-zoom-out {
  color: var(--ui-map-zoom-btn-color);
  background: transparent;
}
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl)
  .mapboxgl-ctrl-icon {
  filter: var(--ui-map-zoom-btn-icon-filter);
}
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl)
  button.mapboxgl-ctrl-zoom-in:hover,
.mapboxgl-ctrl-top-left > .mapboxgl-ctrl.mapboxgl-ctrl-group:not(.map-tilt-ctrl):not(.map-zoom-world-ctrl)
  button.mapboxgl-ctrl-zoom-out:hover {
  background: var(--ui-map-zoom-btn-hover-bg) !important;
  color: var(--ui-map-zoom-btn-color) !important;
}

body:not(.tomato-mode) .mapboxgl-ctrl-top-left .mapboxgl-ctrl-group button:not(:disabled):hover,
body:not(.tomato-mode) .mapboxgl-ctrl-top-left .map-toggle-btn:hover,
body:not(.tomato-mode) .mapboxgl-ctrl-top-left .map-settings-btn:hover {
  background: rgba(143, 211, 255, 0.14) !important;
  color: var(--ui-map-ctrl-btn-color, #e8f2ff) !important;
  border-color: var(--ui-map-ctrl-btn-hover-border, rgba(143, 211, 255, 0.55)) !important;
  box-shadow: var(
    --ui-map-ctrl-btn-hover-shadow,
    0 10px 18px rgba(58, 166, 255, 0.2),
    0 0 0 1px rgba(143, 211, 255, 0.12)
  ) !important;
  transform: translateY(-1px);
}

body:not(.tomato-mode) .mapboxgl-ctrl-top-left .mapboxgl-ctrl-group button:not(:disabled):active,
body:not(.tomato-mode) .mapboxgl-ctrl-top-left .map-toggle-btn:active,
body:not(.tomato-mode) .mapboxgl-ctrl-top-left .map-settings-btn:active {
  transform: translateY(0);
}

/* World overview (under +/-) — inward arrows, no glass circle */
.mapboxgl-ctrl.map-zoom-world-ctrl {
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transform: translateY(0);
  width: 100%;
  height: 38px;
  padding: 0;
  margin-top: 4px;
  overflow: visible;
  justify-self: stretch;
}
.map-zoom-world-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ui-map-zoom-btn-color);
  cursor: pointer;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.2s ease, filter 0.15s ease;
}
.map-zoom-world-btn:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 6px rgba(58, 166, 255, 0.55));
}
.map-zoom-world-btn.is-at-world {
  opacity: 0.5;
  cursor: default;
}
.map-zoom-world-btn.is-at-world:hover {
  transform: none;
  filter: none;
}
.map-zoom-world-icon {
  width: 32px;
  height: 32px;
  display: block;
  margin: 0 auto;
  flex-shrink: 0;
  filter: var(--ui-map-zoom-icon-filter);
}

/* Put the 2D/3D button inside Mapbox controls */
.mapboxgl-ctrl.map-tilt-ctrl {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}
.mapboxgl-ctrl.map-tilt-ctrl .map-toggle-btn {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
  width: var(--ui-map-ctrl-btn-size);
  height: var(--ui-map-ctrl-btn-size);
  padding: 0;
  text-align: center;
  line-height: var(--ui-map-ctrl-btn-size);
  background: var(--ui-map-ctrl-btn-bg);
  border: 1px solid var(--ui-map-ctrl-btn-border);
  border-radius: var(--ui-map-ctrl-btn-radius);
  color: var(--ui-map-ctrl-btn-color);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: var(--ui-map-ctrl-btn-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.mapboxgl-ctrl.map-tilt-ctrl .map-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ui-map-ctrl-btn-hover-border);
  box-shadow: var(--ui-map-ctrl-btn-hover-shadow);
}
.mapboxgl-ctrl.map-tilt-ctrl .map-settings-btn {
  font-size: 18px;
  letter-spacing: normal;
}
.mapboxgl-ctrl.map-tilt-ctrl .map-settings-btn.is-active,
.mapboxgl-ctrl.map-tilt-ctrl .map-toggle-btn.is-active {
  border-color: var(--ui-map-ctrl-btn-active-border);
  background: var(--ui-map-ctrl-btn-active-bg);
  box-shadow: var(--ui-map-ctrl-btn-active-shadow);
}
.map-settings-item--unavailable {
  opacity: 0.42;
  pointer-events: none;
  filter: grayscale(0.35);
}
.map-settings-item--unavailable .map-settings-hint {
  color: var(--ui-map-settings-unavail-hint-color);
}
.mapboxgl-ctrl.map-tilt-ctrl .map-settings-btn i {
  line-height: 1;
}
.map-settings-panel {
  position: absolute;
  top: 108px;
  left: 154px;
  z-index: 1300;
  width: min(268px, calc(100vw - 180px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-window);
  border: var(--window-border-width) solid var(--window-border-color);
  background: var(--map-settings-bg);
  color: var(--map-settings-text);
  box-shadow: var(--window-shadow-depth);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  filter: blur(1px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s ease, filter 0.22s ease,
    visibility 0.22s ease;
}
.map-settings-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  visibility: visible;
  pointer-events: auto;
}
/* Settings panel sits inside .map-panel which clips with overflow:hidden */
.map-panel:has(#mapSettingsPanel.is-open) {
  overflow: visible;
}

.map-settings-head {
  position: relative;
  flex-shrink: 0;
  padding: calc(var(--ui-chrome-inset) + var(--ui-chrome-size) + 14px) 12px 16px;
  border-bottom: 1px solid var(--map-settings-head-border);
  text-align: center;
}

.map-settings-save-row {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  padding-bottom: 4px;
}

.map-settings-head .map-settings-close-btn.ui-close {
  top: var(--ui-chrome-inset) !important;
  right: var(--ui-chrome-inset) !important;
}

.map-settings-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 12px 12px;
  scrollbar-gutter: stable;
}

.map-settings-body::-webkit-scrollbar-track {
  margin-block: var(--mnm-scroll-rail-inset, 14px);
  background: transparent;
  border-radius: 99px;
}

.map-settings-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--map-settings-text);
  margin: 6px 0 0;
  padding: 0;
  text-align: center;
  width: 100%;
}
.map-settings-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--map-settings-text);
  padding: 6px 0;
  border-bottom: 1px solid var(--map-settings-item-border);
  cursor: pointer;
}
.map-settings-body .map-settings-item--hint:last-of-type {
  border-bottom: none;
}
.map-settings-label {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  color: var(--map-settings-text);
}
.map-settings-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.map-settings-item--hint input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.map-settings-item--stack {
  align-items: stretch;
  flex-direction: column;
  gap: 5px;
}
.map-settings-select {
  width: 100%;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid var(--map-settings-input-border);
  background: var(--map-settings-input-bg);
  color: var(--map-settings-input-text);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px;
  outline: none;
  color-scheme: var(--ui-map-settings-color-scheme, dark);
}
.map-settings-select option {
  background: var(--map-settings-bg);
  color: var(--map-settings-input-text);
}
.map-settings-select:focus-visible {
  border-color: var(--ui-map-settings-select-focus-border);
  box-shadow: var(--ui-map-settings-select-focus-glow);
}
.map-settings-item input[type="checkbox"] {
  accent-color: var(--green, #7dfc8a);
  width: 14px;
  height: 14px;
}
.map-settings-section-title {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--map-settings-text-dim);
}

.map-settings-body > .map-settings-section-title:first-child {
  margin-top: 0;
}
.map-theme-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 8px;
}
.map-theme-seg-btn {
  min-width: 0;
  padding: 6px 4px;
  border-radius: 7px;
  border: 1px solid var(--map-settings-seg-border);
  background: var(--map-settings-seg-bg);
  color: var(--map-settings-seg-text);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.map-theme-seg-btn:hover {
  border-color: var(--ui-map-settings-seg-hover-border);
  background: var(--ui-map-settings-seg-hover-bg);
}
.map-theme-seg-btn.is-active {
  border-color: var(--map-settings-seg-active-border);
  background: var(--map-settings-seg-active-bg);
  color: var(--ui-map-settings-seg-active-text);
  box-shadow: 0 0 10px rgba(143, 211, 255, 0.22);
}
.map-settings-save-btn {
  min-width: 0;
  min-height: 26px;
  padding: 3px 12px;
  border-radius: 8px;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--map-settings-save-border);
  background: var(--map-settings-save-bg);
  color: var(--map-settings-save-text);
  box-sizing: border-box;
}
.map-settings-save-btn:hover {
  border-color: rgba(143, 211, 255, 0.8);
  box-shadow: 0 0 10px rgba(143, 211, 255, 0.28);
}
.map-settings-close-btn {
  cursor: pointer;
  z-index: 2;
}
.map-settings-reset-btn {
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: rgba(143, 211, 255, 0.14);
  color: #e8f2ff;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.map-settings-reset-btn:hover {
  background: rgba(143, 211, 255, 0.24);
  border-color: rgba(143, 211, 255, 0.52);
}

/* Temporarily muted on map (data/script still loads; re-enable by removing display:none). */
.yandex-iks-badge,
#yandexIksBadge {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.yandex-iks-badge-legacy {
  position: absolute;
  left: 14px;
  bottom: calc(var(--map-floating-bottom, 40px) + var(--map-chat-collapsed-height, 44px) + 6px);
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.yandex-iks-badge.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.yandex-iks-badge img {
  display: block;
  width: 88px;
  height: auto;
  border-radius: 8px;
  opacity: 0.9;
}

.map-time-machine {
  position: absolute;
  left: 12px;
  bottom: var(--map-floating-bottom, 40px);
  z-index: 12;
  width: min(268px, calc(100% - 24px));
  height: var(--map-chat-collapsed-height, 44px);
  box-sizing: border-box;
  padding: 0 8px 0 10px;
  display: flex;
  align-items: center;
  border: 1px solid var(--ui-time-machine-border);
  background: var(--ui-time-machine-bg);
  box-shadow: var(--ui-time-machine-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md, 12px);
  pointer-events: auto;
}

.map-time-machine-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.map-time-title {
  flex: 0 0 46px;
  margin: 0;
  text-align: center;
  font-size: 7px;
  line-height: 1.12;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-time-machine-title);
  word-break: break-word;
}

#timeSlider {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 18px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: auto !important;
  cursor: pointer;
  position: relative;
  z-index: 25;
}

/* TIME MACHINE — трек и бегунок в синем неоне (без светлой полосы) */
#timeSlider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--ui-time-slider-track);
  border: 1px solid var(--ui-time-slider-track-border);
  box-shadow: var(--ui-time-slider-track-shadow);
}

#timeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--ui-time-slider-thumb);
  border: 2px solid var(--ui-time-slider-thumb-border);
  box-shadow: var(--ui-time-slider-thumb-glow);
  cursor: grab;
}

#timeSlider:active::-webkit-slider-thumb {
  cursor: grabbing;
}

#timeSlider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--ui-time-slider-track);
  border: 1px solid var(--ui-time-slider-track-border);
}

#timeSlider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-time-slider-thumb-solid);
  border: 2px solid var(--ui-time-slider-thumb-border);
  box-shadow: var(--ui-time-slider-thumb-glow);
  cursor: grab;
}

/* Прочие range в проекте */
input[type="range"]:not(#timeSlider) {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 20px;
}

input[type="range"]:not(#timeSlider)::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(2, 12, 16, 0.92);
  border: 1px solid rgba(58, 166, 255, 0.28);
}

input[type="range"]:not(#timeSlider)::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #3aa6ff;
  border: 2px solid rgba(180, 230, 255, 0.9);
  box-shadow: 0 0 10px rgba(58, 166, 255, 0.65);
}

input[type="range"]:not(#timeSlider)::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(2, 12, 16, 0.92);
  border: 1px solid rgba(58, 166, 255, 0.28);
}

input[type="range"]:not(#timeSlider)::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3aa6ff;
  border: 2px solid rgba(180, 230, 255, 0.9);
}

.map-time-label {
  flex: 0 0 36px;
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ui-map-time-label);
  line-height: 1.1;
}

.map-time-all-btn {
  flex: 0 0 auto;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* Глобальная панель пользователей над TIME MACHINE */
.map-users-panel {
  position: absolute;
  left: 12px;
  bottom: calc(
    var(--map-floating-bottom, 40px) + var(--map-chat-collapsed-height, 44px) + 10px
  );
  width: min(280px, calc(100% - 24px));
  max-height: 220px;
  padding: 10px 12px 8px;
  border-radius: 14px;
  background: radial-gradient(circle at 0 0, rgba(40, 80, 60, 0.55), rgba(8, 16, 12, 0.9));
  border: 1px solid rgba(120, 200, 150, 0.7);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(230, 255, 240, 0.08),
    inset 0 -2px 6px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 13;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.25s ease-out,
    transform 0.25s ease-out;
}

.map-users-panel.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.map-users-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 32px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(230, 255, 245, 0.9);
}

.map-users-title {
  opacity: 0.85;
}

.map-users-close {
  cursor: pointer;
}

.map-users-body {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(120, 200, 150, 0.4);
  max-height: 160px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 11px;
}

.map-users-body::-webkit-scrollbar {
  width: 7px;
}

.map-users-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
}

.map-users-row span:first-child {
  color: rgba(230, 255, 245, 0.9);
}

.map-users-row span:last-child {
  color: rgba(170, 230, 190, 0.9);
}

/* BIRTHDAY OVERLAY */
.birthday-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 0, rgba(255, 215, 0, 0.35), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(0, 200, 255, 0.35), transparent 55%),
    rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

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

.birthday-content {
  text-align: center;
  color: #fefdfb;
  max-width: 640px;
  padding: 32px 40px;
  border-radius: 20px;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.09), transparent 55%),
    linear-gradient(145deg, rgba(20, 40, 40, 0.85), rgba(5, 12, 10, 0.95));
  border: 1px solid rgba(160, 220, 190, 0.9);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(250, 255, 255, 0.25),
    inset 0 -10px 30px rgba(0, 0, 0, 0.8);
}

.birthday-salute {
  font-size: 26px;
  letter-spacing: 0.4em;
  margin-bottom: 10px;
  color: rgba(255, 240, 180, 0.9);
  text-shadow:
    0 0 10px rgba(255, 230, 160, 0.9),
    0 0 30px rgba(255, 128, 64, 0.8);
}

.birthday-title {
  font-size: 26px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.birthday-text {
  font-size: 15px;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.place-title span,
.place-city-name {
  cursor: pointer;
}

/* Strong "this is clickable" hover for Node Log titles */
.place-city:hover .place-city-name,
.place-item.place-country:hover .place-title span {
  color: var(--ui-node-city-hover-title-color);
  text-shadow: var(--ui-node-city-hover-title-shadow);
}

.place-city:hover .place-city-name .place-rating-inline {
  filter: drop-shadow(0 0 8px rgba(58, 166, 255, 0.35));
}

.custom-marker--custom-named {
  /* legacy alias */
}

.custom-marker--custom-pin,
.map-custom-pin-marker {
  width: 30px;
  height: 39px;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
  cursor: pointer;
}

.custom-marker-pin-svg {
  display: block;
  width: 30px;
  height: 39px;
  pointer-events: none;
}

.custom-marker-pin-num {
  display: none;
}

.node-log-map-chip--pin {
  width: 15px;
  height: 19px;
  margin-left: 11px;
  margin-right: 8px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(145deg, #ff6b6b, #c62828);
  border: 1.5px solid rgba(30, 30, 30, 0.85);
  box-shadow: 0 2px 6px rgba(255, 60, 60, 0.45);
  color: #fff;
}

.node-log-map-chip--pin .node-log-map-chip-num {
  display: block;
  transform: rotate(45deg);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  margin-top: 1px;
}

.left-panel .place-city--custom-pin.place-city--active .place-city-name .node-log-map-chip--pin {
  margin-left: 12px;
}

.place-custom-pins-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 4px;
  margin-top: 6px;
  border-top: 1px dashed rgba(255, 100, 100, 0.35);
}

.place-custom-pins-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 150, 150, 0.95);
  font-weight: 700;
}

.place-custom-pins-meta {
  font-size: 9px;
  opacity: 0.65;
}

.place-city--custom-pin {
  border-left: 2px solid rgba(255, 90, 90, 0.55);
  background: rgba(40, 12, 12, 0.22);
}

.left-panel .place-city--custom-pin .place-city-main {
  padding-left: 12px;
}

.left-panel .place-city--custom-pin .node-log-map-chip--pin {
  margin-left: 2px;
}

.left-panel .place-city--custom-pin .node-log-photo-chip {
  height: 24px;
  min-height: 24px;
  padding: 0 4px;
  font-size: 6px;
}

.left-panel .place-city--custom-pin .node-log-photo-chip .fa-image {
  font-size: 11px;
  line-height: 1;
}

.left-panel .place-city--custom-pin .node-log-photo-chip .node-gallery-count {
  font-size: 9px;
}

.place-city-card--pin .place-city-pin-note {
  font-size: 11px;
  opacity: 0.85;
}

.place-city-card-photos--pin {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
  padding-left: 2px;
}

.place-city-pin-photo {
  padding: 0;
  border: 1px solid rgba(255, 120, 120, 0.35);
  border-radius: 8px;
  overflow: hidden;
  width: 52px;
  height: 40px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
}

.place-city-pin-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.node-type-badge--pin {
  background: rgba(255, 72, 72, 0.25);
  color: #ffb4b4;
  border-color: rgba(255, 120, 120, 0.45);
}

.country-hub-custom-pin-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.country-hub-custom-pin-photo {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  display: block;
}

.country-hub-custom-pin-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.country-hub-custom-pin-text h4 {
  margin: 0 0 8px;
}

.country-hub-about--pin {
  margin: 0 0 12px;
}

.country-hub-pin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.country-hub-pin-meta__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(110, 255, 200, 0.28);
  background: rgba(8, 18, 14, 0.72);
  color: rgba(220, 248, 238, 0.94);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.country-hub-pin-meta__chip--muted {
  border-color: rgba(143, 211, 255, 0.22);
  color: rgba(180, 210, 230, 0.82);
}

.country-hub-pin-meta__chip--slot {
  border-color: rgba(125, 252, 138, 0.34);
  color: rgba(170, 255, 200, 0.92);
}

.country-hub-custom-pin-detail {
  display: grid;
  gap: 12px;
}

.country-hub-pin-note {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(90, 150, 110, 0.28);
  background: linear-gradient(135deg, rgba(8, 16, 14, 0.88), rgba(12, 8, 14, 0.82));
  color: rgba(236, 250, 244, 0.92);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow: auto;
}

.country-hub-pin-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.country-hub-pin-rating-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 200, 220, 0.78);
}

.country-hub-pin-add-photos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: rgba(8, 20, 14, 0.72);
  color: rgba(200, 255, 220, 0.94);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.country-hub-pin-add-photos:hover,
.country-hub-pin-add-photos:focus-visible {
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 18px rgba(72, 220, 160, 0.14);
}

.mnm-guided-tour {
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
  --mnm-tour-line: rgba(125, 255, 200, 0.88);
  --mnm-tour-line-w: 2.25px;
  --mnm-tour-line-dash: 7 5;
  --mnm-tour-card-inner: rgba(125, 252, 138, 0.44);
  --mnm-tour-card-inner-w: 1px;
  --mnm-tour-card-frame-gap: 5px;
}

/* Root stays pointer-events:none — only panels + card capture clicks (hole passes through to map/iframe) */
.mnm-guided-tour:not([hidden]) {
  pointer-events: none;
}

.mnm-guided-tour__panels {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mnm-guided-tour__panel {
  position: fixed;
  background: var(--mnm-tour-panel-bg, rgba(2, 8, 6, 0.3));
  pointer-events: auto;
  /* Only fade dim panels — "all" made hole/highlight feel laggy mid-tour */
  transition:
    opacity 0.18s ease,
    background 0.18s ease;
}

.mnm-guided-tour__vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--mnm-tour-vignette-bg, rgba(2, 8, 6, 0.28));
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

.mnm-guided-tour__vignette.is-circle {
  background: var(--mnm-tour-vignette-bg, rgba(2, 8, 6, 0.32));
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    circle at var(--hole-cx) var(--hole-cy),
    transparent calc(var(--hole-r) - 1px),
    #000 calc(var(--hole-r) + 0.5px)
  );
  mask-image: radial-gradient(
    circle at var(--hole-cx) var(--hole-cy),
    transparent calc(var(--hole-r) - 1px),
    #000 calc(var(--hole-r) + 0.5px)
  );
}

.mnm-guided-tour__neon {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  box-sizing: border-box;
  border: none;
  background: transparent;
  overflow: hidden;
  border-radius: 8px;
  filter: drop-shadow(0 0 4px rgba(93, 255, 184, 0.16));
}

.mnm-guided-tour__neon--compact {
  filter: none;
}

.mnm-guided-tour__neon-dash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.mnm-guided-tour__neon-dash-rect {
  fill: none;
  stroke: var(--mnm-tour-line);
  stroke-width: var(--mnm-tour-line-w);
  stroke-dasharray: 8 6;
  stroke-linecap: round;
  animation: mnm-tour-target-dash-march 1.1s linear infinite;
}

.mnm-guided-tour__neon--compact .mnm-guided-tour__neon-dash-rect {
  stroke-width: 1.5px;
  stroke-dasharray: 5 4;
  stroke-linecap: butt;
  animation-duration: 0.95s;
}

.mnm-guided-tour__neon--sz-s .mnm-guided-tour__neon-dash-rect {
  stroke-width: 1.5px;
}

.mnm-guided-tour__neon--circle {
  border-radius: 50%;
}

.mnm-guided-tour__shield {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  background: rgba(2, 6, 5, 0.74);
}

.mnm-guided-tour__shield--frame {
  background: rgba(2, 6, 5, 0.55);
}

.mnm-guided-tour__hole-blocker {
  position: fixed;
  z-index: 1;
  pointer-events: auto;
  background: transparent;
}

@keyframes mnm-tour-rotor-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes mnm-tour-rotor-hue {
  0%,
  100% {
    filter: hue-rotate(0deg) saturate(1.04) brightness(1.04);
  }
  50% {
    filter: hue-rotate(12deg) saturate(1.14) brightness(1.1);
  }
}

@keyframes mnm-tour-bloom-breathe {
  0%,
  100% {
    opacity: 0.48;
  }
  50% {
    opacity: 0.72;
  }
}

.mnm-guided-tour-target {
  z-index: 20002 !important;
  isolation: isolate;
  outline: none !important;
  box-shadow: none !important;
  filter: brightness(1.06) saturate(1.04);
}

/* Tour highlight must not override map-corner absolute positioning */
.tomato-battle-icon.mnm-guided-tour-target,
.map-time-machine.mnm-guided-tour-target,
.map-status-chip.mnm-guided-tour-target {
  position: absolute !important;
}

/* Mapbox tilt cluster: keep flex layout — legacy .map-toggle-btn is position:absolute */
body.mnm-guided-tour-active .mapboxgl-ctrl.map-tilt-ctrl .map-toggle-btn.mnm-guided-tour-target,
body.mnm-guided-tour-active .mapboxgl-ctrl.map-tilt-ctrl .map-settings-btn.mnm-guided-tour-target,
body.mnm-guided-tour-active #toggle3d.mnm-guided-tour-target,
body.mnm-guided-tour-active #mapSettingsBtn.mnm-guided-tour-target {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}

.mnm-guided-tour__card {
  position: fixed;
  width: min(420px, calc(100vw - 32px));
  padding: 20px 20px 16px;
  border-radius: 18px;
  background:
    linear-gradient(168deg, rgba(12, 32, 24, 0.97) 0%, rgba(5, 14, 10, 0.99) 52%, rgba(3, 9, 7, 1) 100%);
  border: none;
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(125, 255, 200, 0.04);
  transition: opacity 0.12s ease;
  z-index: 4;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  overflow: visible;
  isolation: isolate;
}

.mnm-guided-tour__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 88% at 10% -8%, rgba(125, 255, 200, 0.11), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 28%);
  opacity: 0.95;
}

.mnm-guided-tour__card-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

.mnm-guided-tour__card-frame-inner {
  fill: none;
  stroke: var(--mnm-tour-card-inner);
  stroke-width: var(--mnm-tour-card-inner-w);
  vector-effect: non-scaling-stroke;
}

.mnm-guided-tour__card-frame-rect {
  fill: none;
  stroke: var(--mnm-tour-line);
  stroke-width: var(--mnm-tour-line-w);
  stroke-dasharray: var(--mnm-tour-line-dash);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(93, 255, 184, 0.22));
}

.mnm-guided-tour__card .mnm-guided-tour__progress,
.mnm-guided-tour__card .mnm-guided-tour__title,
.mnm-guided-tour__card .mnm-guided-tour__body,
.mnm-guided-tour__card .mnm-guided-tour__hint,
.mnm-guided-tour__card .mnm-guided-tour__actions {
  position: relative;
  z-index: 2;
}

body.mnm-guided-tour-active .mnm-guided-tour__card {
  transition: opacity 0.12s ease !important;
}

.mnm-guided-tour.is-scene-loading .mnm-guided-tour__vignette {
  opacity: 0.72;
  filter: brightness(0.88);
}

.mnm-guided-tour.is-scene-loading--soft .mnm-guided-tour__vignette {
  opacity: 0.28;
  filter: none;
}

/* Keep card readable while scenes settle — never a blank tip with only buttons */
.mnm-guided-tour__card--scene-loading,
.mnm-guided-tour__card--scene-loading-soft {
  opacity: 1;
  pointer-events: auto;
  animation: none !important;
  transform: none !important;
}

/* Hidden until positionCard runs — kills left→center jump between steps */
.mnm-guided-tour__card--layout-pending {
  visibility: hidden !important;
  pointer-events: none !important;
}

.mnm-guided-tour__card--enter {
  animation: mnm-tour-card-scene-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mnm-guided-tour__card--center.mnm-guided-tour__card--enter,
.mnm-guided-tour__card--float.mnm-guided-tour__card--enter,
.mnm-guided-tour__card--map-center.mnm-guided-tour__card--enter,
.mnm-guided-tour__card--globe-left.mnm-guided-tour__card--enter,
.mnm-guided-tour__card--tomato-dock.mnm-guided-tour__card--enter {
  animation: mnm-tour-card-fade-in 0.18s ease both;
}

@keyframes mnm-tour-card-scene-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mnm-guided-tour__neon--step-in {
  animation: none;
}

.mnm-guided-tour__link-path--draw {
  animation: none;
}

@keyframes mnm-tour-link-draw {
  from {
    stroke-dashoffset: 48;
    opacity: 0.2;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mnm-guided-tour__card--scene-loading,
  .mnm-guided-tour__card--enter,
  .mnm-guided-tour__neon--step-in,
  .mnm-guided-tour__neon-dash-rect,
  .mnm-guided-tour__link-path--draw {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.mnm-guided-tour__actions .btn-main,
.mnm-guided-tour__actions .btn-ghost {
  pointer-events: auto;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mnm-guided-tour__actions .btn-ghost {
  border: 1px dashed rgba(125, 255, 200, 0.42) !important;
  background: rgba(4, 12, 9, 0.78) !important;
  color: rgba(196, 228, 210, 0.82) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mnm-guided-tour__actions .btn-ghost:hover {
  border-color: rgba(125, 255, 200, 0.58) !important;
  color: rgba(224, 255, 238, 0.94) !important;
}

.mnm-guided-tour__actions .btn-main {
  border: 1px solid rgba(125, 255, 200, 0.72) !important;
  background: linear-gradient(180deg, rgba(18, 52, 38, 0.96), rgba(8, 28, 20, 0.98)) !important;
  color: rgba(198, 255, 224, 0.98) !important;
  box-shadow:
    0 0 14px rgba(93, 255, 184, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mnm-guided-tour__actions .btn-main:hover {
  border-color: rgba(145, 255, 210, 0.88) !important;
  box-shadow:
    0 0 18px rgba(93, 255, 184, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mnm-guided-tour__progress {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(125, 255, 200, 0.72);
  margin-bottom: 10px;
}

.mnm-guided-tour__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(236, 255, 246, 0.98);
  text-shadow: 0 0 18px rgba(93, 255, 184, 0.12);
}

.mnm-guided-tour__body {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.58;
  color: rgba(214, 242, 226, 0.9);
}

.mnm-guided-tour__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.mnm-guided-tour-active {
  overflow: hidden;
}

/* Hide static green panel seams while tour neon is active — avoids double contour */
body.mnm-guided-tour-active .left-panel::after,
body.mnm-guided-tour-active #rightPanel.right-panel::after,
body.mnm-guided-tour-active #countryHubPanel.country-hub-panel::after {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Rainbow neon is the single contour language — no second green seam */
.mnm-guided-tour-panel-scope {
  outline: none !important;
  box-shadow: none !important;
  animation: none !important;
}

body.mnm-guided-tour--panel-scope-step:not(.mnm-guided-tour--panel-neon)
  .mnm-guided-tour__neon:not(.mnm-guided-tour__neon--extra) {
  display: none !important;
}

/* Prefer rainbow rotor over static green outlines on map-settings / hub */
body.mnm-guided-tour-active #mapSettingsPanel.is-open.mnm-guided-tour-target,
body.mnm-guided-tour-active #mapSettingsPanel.is-open.mnm-guided-tour-panel-scope,
body.mnm-guided-tour-map-settings-open .map-settings-panel.is-open,
body.mnm-guided-tour-active #countryHubPanel.mnm-guided-tour-target,
body.mnm-guided-tour-active #countryHubPanel.mnm-guided-tour-panel-scope,
body.mnm-guided-tour-active .right-panel-wrapper.mnm-guided-tour-target,
body.mnm-guided-tour-active .right-panel-wrapper.mnm-guided-tour-panel-scope {
  outline: none !important;
}

/* Tour: hub must be fully on-screen — CSS slide/fade otherwise leaves a black hole */
body.mnm-guided-tour-active .right-panel-wrapper.country-hub-open #countryHubPanel {
  display: flex !important;
  transition: none !important;
  transform: translateX(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@keyframes mnm-tour-panel-scope-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(93, 255, 184, 0.18),
      0 0 20px rgba(93, 255, 184, 0.22);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(93, 255, 184, 0.32),
      0 0 34px rgba(93, 255, 184, 0.38);
  }
}

body.mnm-guided-tour-tb-wait-pick .mnm-guided-tour__panels,
body.mnm-guided-tour-tb-wait-pick .mnm-guided-tour__vignette,
body.mnm-guided-tour-tb-wait-pick .mnm-guided-tour__hole-blocker {
  pointer-events: none !important;
}

body.mnm-guided-tour-tb-wait-pick .mnm-tour-tomato-shell.is-open {
  z-index: 20010 !important;
  pointer-events: auto !important;
}

body.mnm-guided-tour-tb-wait-pick .mnm-tour-tomato-shell.is-open iframe {
  pointer-events: auto !important;
}

body.mnm-guided-tour-active #myPageScreen.mnm-guided-tour-target,
body.mnm-guided-tour-active #myPageScreen.mnm-guided-tour-panel-scope {
  pointer-events: none !important;
}

body.mnm-guided-tour-wait-click #myPageScreen.mnm-guided-tour-target {
  pointer-events: auto !important;
}

html.mnm-guided-tour-lock-app .app-shell,
html.mnm-guided-tour-lock-app .neon-frame,
html.mnm-guided-tour-lock-app .left-panel,
html.mnm-guided-tour-lock-app #rightPanel,
html.mnm-guided-tour-lock-app #countryHubPanel,
html.mnm-guided-tour-lock-app .right-panel-wrapper,
html.mnm-guided-tour-lock-app .map-panel,
html.mnm-guided-tour-lock-app .tomato-battle-icon,
html.mnm-guided-tour-lock-app .map-toggle-btn,
html.mnm-guided-tour-lock-app .map-settings-btn,
html.mnm-guided-tour-lock-app .map-time-machine,
html.mnm-guided-tour-lock-app .map-status-chip,
html.mnm-guided-tour-lock-app #quickActions,
html.mnm-guided-tour-lock-app #myPageScreen {
  pointer-events: none !important;
  user-select: none;
}

body.mnm-guided-tour-wait-click .mnm-guided-tour-target,
body.mnm-guided-tour-wait-click #countryHubPanel .mnm-guided-tour-target,
body.mnm-guided-tour-wait-click #countryHubPanel .mnm-guided-tour-target * {
  pointer-events: auto !important;
}

/* Tomato shell stays click-through during tour except wait-pick steps */
body.mnm-guided-tour-active .mnm-tour-tomato-shell.is-open {
  pointer-events: none !important;
}

body.mnm-guided-tour-tb-wait-pick .mnm-tour-tomato-shell.is-open,
body.mnm-guided-tour-tb-wait-pick .mnm-tour-tomato-shell.is-open iframe {
  pointer-events: auto !important;
}

body.mnm-guided-tour-active .mnm-guided-tour-target {
  position: relative;
  z-index: 20003;
  filter: brightness(1.1) saturate(1.05);
  outline: none !important;
  box-shadow: none !important;
}

body.mnm-guided-tour-active .map-tilt-ctrl.mnm-guided-tour-target,
body.mnm-guided-tour-active .map-tilt-ctrl .mnm-guided-tour-target,
body.mnm-guided-tour-active #toggle3d.mnm-guided-tour-target,
body.mnm-guided-tour-active #mapSettingsBtn.mnm-guided-tour-target {
  filter: brightness(1.14) saturate(1.08);
  z-index: 20004 !important;
  outline: none !important;
  box-shadow: none !important;
}

body.mnm-guided-tour-overlay-light .mnm-guided-tour__vignette {
  background: rgba(2, 8, 6, 0.16) !important;
}

body.mnm-guided-tour-overlay-light .mnm-guided-tour__panel {
  background: rgba(2, 8, 6, 0.14) !important;
}

.country-hub-panel-scroll.mnm-guided-tour-hub-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

body.mnm-guided-tour-active .mapboxgl-ctrl-top-left {
  z-index: 20002 !important;
}

body.mnm-guided-tour-active #countryHubPanel.mnm-guided-tour-target,
body.mnm-guided-tour-active #countryHubPanel.mnm-guided-tour-panel-scope {
  filter: brightness(1.08) saturate(1.06);
  z-index: 20004 !important;
  outline: none !important;
  box-shadow: none !important;
}

body.mnm-guided-tour-active .right-panel-wrapper.mnm-guided-tour-target,
body.mnm-guided-tour-active .right-panel-wrapper.mnm-guided-tour-panel-scope,
body.mnm-guided-tour-active #rightPanel.mnm-guided-tour-target,
body.mnm-guided-tour-active #rightPanel.mnm-guided-tour-panel-scope,
body.mnm-guided-tour-active #quickActions.mnm-guided-tour-target,
body.mnm-guided-tour-active #quickActions.mnm-guided-tour-panel-scope {
  filter: brightness(1.06) saturate(1.05);
  z-index: 20004 !important;
  position: relative;
  outline: none !important;
  box-shadow: none !important;
  animation: none !important;
}

body.mnm-guided-tour-map-settings-open .map-settings-panel.is-open {
  top: 150px;
  left: 164px;
  max-height: min(68vh, 520px);
}

body.mnm-guided-tour-map-settings-open .map-tilt-ctrl {
  z-index: 20010 !important;
}

body.mnm-guided-tour-map-settings-open .map-tilt-ctrl #toggle3d {
  opacity: 1 !important;
  visibility: visible !important;
}

body.mnm-guided-tour-active #mapSettingsPanel.is-open.mnm-guided-tour-target,
body.mnm-guided-tour-active #mapSettingsPanel.is-open.mnm-guided-tour-panel-scope,
body.mnm-guided-tour-map-settings-open .map-settings-panel.is-open {
  z-index: 20005 !important;
  filter: brightness(1.1) saturate(1.06);
  outline: none !important;
  box-shadow: none !important;
}

body.mnm-guided-tour-active #mapSettingsBtn.mnm-guided-tour-target {
  z-index: 20006 !important;
}

body.mnm-guided-tour-active #countryHubPanel .country-hub-link-btn.mnm-guided-tour-target {
  cursor: pointer;
  z-index: 20004 !important;
}

body.mnm-guided-tour-active .mnm-guided-tour__card,
body.mnm-guided-tour-active .mnm-guided-tour__card * {
  pointer-events: auto;
}

body.mnm-guided-tour-mypage-active .mnm-guided-tour {
  z-index: 25000 !important;
}

body.mnm-guided-tour-mypage-active #myPageScreen .mnm-guided-tour-target,
body.mnm-guided-tour-mypage-active #myPageScreen .my-page-nav.mnm-guided-tour-target,
body.mnm-guided-tour-mypage-active #myPageScreen #myPageViewFeed.mnm-guided-tour-target,
body.mnm-guided-tour-mypage-active #myPageScreen #myPageAvatarImg.mnm-guided-tour-target {
  position: relative;
  z-index: 25002 !important;
}

body.mnm-guided-tour-mypage-active .mnm-guided-tour__hint {
  color: rgba(93, 255, 184, 0.92);
  font-size: 11px;
  margin-top: 8px;
  line-height: 1.45;
}

body.mnm-guided-tour-map-pick .map-panel,
body.mnm-guided-tour-map-pick .map-panel .mapboxgl-canvas-container {
  pointer-events: auto !important;
}

body.mnm-guided-tour-terminal-step .terminal-overlay.visible {
  z-index: 19950;
  pointer-events: auto !important;
}

body.mnm-guided-tour-terminal-step:not(.mnm-guided-tour-wait-click) .terminal-overlay.visible,
body.mnm-guided-tour-terminal-step:not(.mnm-guided-tour-wait-click) .terminal-overlay.visible * {
  pointer-events: auto !important;
}

body.mnm-guided-tour-terminal-step.mnm-guided-tour-wait-click .terminal-overlay.visible * {
  pointer-events: none !important;
}

body.mnm-guided-tour-terminal-step.mnm-guided-tour-wait-click #terminalSaveBtn {
  pointer-events: auto !important;
  position: relative;
  z-index: 20006 !important;
}

body.mnm-guided-tour-terminal-step:not(.mnm-guided-tour-wait-click) #terminalCloseBtn {
  pointer-events: none !important;
  opacity: 0.35;
}

body.mnm-guided-tour-delete-step .places-panel {
  pointer-events: none !important;
}

body.mnm-guided-tour-delete-step .places-panel .place-delete.mnm-guided-tour-target,
body.mnm-guided-tour-delete-step .places-panel .place-delete.mnm-guided-tour-target * {
  pointer-events: auto !important;
}

body.mnm-guided-tour-finish-step .mnm-guided-tour__shield {
  background: rgba(0, 0, 0, 0.72);
}

.mnm-guided-tour--terminal .mnm-guided-tour__neon {
  z-index: 20004;
}

.mnm-guided-tour--terminal .mnm-guided-tour__card {
  z-index: 20005;
}

.mnm-guided-tour__neon--fit-target {
  overflow: hidden;
}

.mnm-guided-tour__neon--pulse-strong .mnm-guided-tour__neon-dash-rect {
  animation-duration: 0.75s;
  stroke: rgba(125, 255, 200, 1);
}

.mnm-guided-tour__neon--pulse-strong {
  filter: drop-shadow(0 0 8px rgba(93, 255, 184, 0.38));
}

.place-country.mnm-guided-tour-reveal-pulse,
.place-city.mnm-guided-tour-reveal-pulse,
.place-item.mnm-guided-tour-reveal-pulse {
  outline: 2px solid rgba(93, 255, 184, 0.95);
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(93, 255, 184, 0.2),
    0 0 24px rgba(93, 255, 184, 0.45);
  animation: mnm-tour-reveal-pulse 1.1s ease-in-out infinite;
}

@keyframes mnm-tour-reveal-pulse {
  0%,
  100% {
    outline-color: rgba(93, 255, 184, 0.75);
    box-shadow:
      0 0 0 4px rgba(93, 255, 184, 0.15),
      0 0 16px rgba(93, 255, 184, 0.35);
  }
  50% {
    outline-color: rgba(125, 255, 200, 1);
    box-shadow:
      0 0 0 6px rgba(93, 255, 184, 0.28),
      0 0 32px rgba(93, 255, 184, 0.55);
  }
}

.mnm-guided-tour__neon--square {
  border-radius: 0;
}

.mnm-guided-tour__neon--soft {
  border-radius: var(--radius-sm, 2px);
}

.mnm-guided-tour__neon--rounded {
  border-radius: 8px;
}

.mnm-guided-tour__neon--pill {
  border-radius: 999px;
}

.mnm-guided-tour__link {
  position: fixed;
  inset: 0;
  z-index: 20004;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.mnm-guided-tour__link-path {
  fill: none;
  stroke: var(--mnm-tour-line);
  stroke-width: var(--mnm-tour-line-w);
  stroke-dasharray: var(--mnm-tour-line-dash);
  stroke-linecap: round;
  opacity: 0.94;
  filter: drop-shadow(0 0 2px rgba(93, 255, 184, 0.16));
}

@keyframes mnm-tour-target-dash-march {
  to {
    stroke-dashoffset: -28;
  }
}

/* Hub tour: keep right column above dim overlay */
body.mnm-guided-tour-hub-step .right-panel-wrapper.country-hub-open {
  z-index: 20008 !important;
  position: relative;
}

body.mnm-guided-tour-hub-step #countryHubPanel {
  z-index: 20009 !important;
}

.mnm-guided-tour__card--terminal-dock {
  max-width: min(360px, calc(100vw - 40px));
  animation: mnm-tour-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 20006;
}

.mnm-guided-tour--terminal .mnm-guided-tour__link {
  z-index: 20005;
}

.mnm-guided-tour__card--float {
  animation: mnm-tour-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mnm-guided-tour--vote-fx .mnm-guided-tour__panel,
.mnm-guided-tour--vote-fx .mnm-guided-tour__vignette {
  background: rgba(2, 6, 5, 0.55);
}

.mnm-guided-tour--vote-fx .mnm-tour-tomato-shell.is-open {
  filter: brightness(1.06) saturate(1.08);
}

.mnm-guided-tour__card--map-center {
  max-width: min(400px, calc(100vw - 80px));
  animation: mnm-tour-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 20006;
}

.mnm-guided-tour__link-path--alt {
  stroke-opacity: 0.72;
}

.mnm-guided-tour__card--globe-left {
  max-width: min(400px, calc(100vw - 40px));
  /* Fade only — slide animation resets translate(-100%, -50%) and covers the globe */
  animation: mnm-tour-card-fade-in 0.18s ease both;
}

.mnm-guided-tour-target--blink {
  animation: mnm-tour-target-blink 0.55s ease-in-out infinite;
}

@keyframes mnm-tour-target-blink {
  0%,
  100% {
    filter: brightness(1.1) saturate(1.08);
  }
  50% {
    filter: brightness(1.35) saturate(1.2);
  }
}

.mnm-guided-tour__card--globe-side {
  animation: mnm-tour-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mnm-guided-tour__card--hub-side,
.mnm-guided-tour__card--panel-side,
.mnm-guided-tour__card--my-page-side {
  animation: mnm-tour-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 20007;
}

.mnm-guided-tour__card--my-page-side {
  width: min(340px, calc(100vw - 32px));
  max-width: 340px;
}

.mnm-guided-tour__card--tomato-panel-side {
  width: min(360px, calc(100vw - 32px));
  max-width: 360px;
}

.mnm-guided-tour__card--globe-left,
.mnm-guided-tour__card--globe-side {
  z-index: 20007;
}

.mnm-guided-tour.mnm-guided-tour--picker-open {
  pointer-events: auto !important;
  z-index: 20050 !important;
}

.mnm-guided-tour.mnm-guided-tour--picker-open > :not(.mnm-guided-tour__picker) {
  display: none !important;
  pointer-events: none !important;
}

.mnm-guided-tour__picker {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 8, 6, 0.88);
  backdrop-filter: blur(8px);
  pointer-events: auto !important;
}

.mnm-guided-tour__picker[hidden] {
  display: none !important;
}

.mnm-guided-tour__picker-card,
.mnm-guided-tour__picker-grid,
.mnm-guided-tour__picker-actions,
.mnm-guided-tour__picker-btn,
.mnm-guided-tour__picker-actions .btn-main,
.mnm-guided-tour__picker-actions .btn-ghost {
  pointer-events: auto !important;
}

.mnm-guided-tour.mnm-guided-tour--picker-open .mnm-guided-tour__picker {
  pointer-events: auto !important;
}

.mnm-guided-tour__picker-card {
  width: min(520px, calc(100vw - 32px));
  padding: 24px 22px 20px;
  border-radius: 20px;
  border: 1px solid rgba(125, 255, 200, 0.42);
  background: linear-gradient(165deg, rgba(10, 28, 22, 0.98) 0%, rgba(4, 12, 9, 0.99) 100%);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.75);
}

.mnm-guided-tour__picker-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(125, 255, 200, 0.72);
}

.mnm-guided-tour__picker-title {
  margin: 0 0 8px;
  font-size: 22px;
  color: #e8fff5;
}

.mnm-guided-tour__picker-lead {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(220, 245, 235, 0.82);
}

.mnm-guided-tour__picker-grid {
  display: grid;
  gap: 10px;
}

.mnm-guided-tour__picker-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(125, 255, 200, 0.28);
  background: rgba(8, 24, 18, 0.72);
  color: #e8fff5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.mnm-guided-tour__picker-btn:hover {
  border-color: rgba(125, 255, 200, 0.55);
  background: rgba(12, 34, 26, 0.9);
  transform: translateY(-1px);
}

.mnm-guided-tour__picker-btn--featured {
  border-color: rgba(125, 255, 200, 0.55);
  box-shadow: 0 0 0 1px rgba(93, 255, 184, 0.12);
}

.mnm-guided-tour__picker-btn--tomato {
  border-color: rgba(255, 120, 80, 0.45);
}

.mnm-guided-tour__picker-btn-title {
  font-size: 14px;
  font-weight: 700;
}

.mnm-guided-tour__picker-btn-desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(220, 245, 235, 0.75);
}

.mnm-guided-tour__picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

body.mnm-guided-tour-picker-open {
  overflow: hidden;
}

html.mnm-guided-tour-picker-open .app-shell,
html.mnm-guided-tour-picker-open .neon-frame,
html.mnm-guided-tour-picker-open .left-panel,
html.mnm-guided-tour-picker-open #rightPanel,
html.mnm-guided-tour-picker-open #countryHubPanel,
html.mnm-guided-tour-picker-open .right-panel-wrapper,
html.mnm-guided-tour-picker-open .map-panel,
html.mnm-guided-tour-picker-open .tomato-battle-icon,
html.mnm-guided-tour-picker-open .map-toggle-btn,
html.mnm-guided-tour-picker-open .map-settings-btn,
html.mnm-guided-tour-picker-open .map-time-machine,
html.mnm-guided-tour-picker-open .map-status-chip,
html.mnm-guided-tour-picker-open #quickActions {
  pointer-events: none !important;
  user-select: none;
}

@keyframes mnm-tour-link-dash {
  to {
    stroke-dashoffset: -26;
  }
}

.mnm-guided-tour__card--dock {
  animation: mnm-tour-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mnm-guided-tour__hint {
  margin: -8px 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #ffe8c8;
  background: rgba(255, 120, 60, 0.12);
  border: 1px solid rgba(255, 140, 80, 0.35);
  animation: mnm-tour-hint-pulse 1.4s ease-in-out infinite;
}

@keyframes mnm-tour-hint-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.78;
  }
}

.mnm-guided-tour__card--center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20007;
  max-width: min(420px, calc(100vw - 48px));
  /* Fade only — no vertical offset (that looked like a jump off-center → center) */
  animation: mnm-tour-card-fade-in 0.18s ease both;
}

.mnm-guided-tour__card--hub {
  max-width: min(400px, calc(100vw - 48px));
  z-index: 5;
  animation: mnm-tour-card-fade-in 0.18s ease both;
}

.mnm-guided-tour__card--globe-side {
  max-width: min(380px, calc(100vw - 48px));
  z-index: 5;
  animation: mnm-tour-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mnm-guided-tour__card--tomato-dock {
  z-index: 20007;
  animation: mnm-tour-card-fade-in 0.18s ease both;
}

@keyframes mnm-tour-card-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.mnm-guided-tour__card:not(.mnm-guided-tour__card--center):not(.mnm-guided-tour__card--hub):not(.mnm-guided-tour__card--globe-side):not(.mnm-guided-tour__card--globe-left):not(.mnm-guided-tour__card--map-center):not(.mnm-guided-tour__card--tomato-dock) {
  animation: mnm-tour-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mnm-tour-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mnm-tour-card-in-center {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.mnm-guided-tour__actions .btn-main:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mnm-guided-tour__cursor {
  position: fixed;
  z-index: 20060;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  pointer-events: none;
  display: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.72));
}

.mnm-guided-tour__cursor-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 12px rgba(93, 255, 184, 0.45);
  transition: transform 0.1s ease;
}

.mnm-guided-tour__cursor-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid rgba(93, 255, 184, 0.95);
  opacity: 0;
  transform: scale(0.35);
  box-shadow: 0 0 14px rgba(93, 255, 184, 0.45);
}

.mnm-guided-tour__cursor-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.88);
  opacity: 0;
  transform: scale(0.2);
}

.mnm-guided-tour__cursor.is-press .mnm-guided-tour__cursor-dot {
  transform: scale(0.82);
}

.mnm-guided-tour__cursor.is-click .mnm-guided-tour__cursor-halo {
  animation: mnm-tour-cursor-click 0.5s ease-out;
}

.mnm-guided-tour__cursor.is-click .mnm-guided-tour__cursor-ripple {
  animation: mnm-tour-cursor-ripple 0.55s ease-out;
}

body.mnm-guided-tour-cinematic .mnm-guided-tour__cursor {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8));
}

body.mnm-guided-tour-cinematic .mnm-guided-tour__cursor-dot {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
}

.mnm-guided-tour__cinematic-badge {
  display: none;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8ffe0;
  background: rgba(6, 18, 14, 0.92);
  border: 1px solid rgba(93, 255, 184, 0.45);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  animation: mnm-tour-badge-pulse 2.4s ease-in-out infinite;
}

.mnm-guided-tour--cinematic .mnm-guided-tour__cinematic-badge {
  display: block;
}

.mnm-guided-tour--cinematic .mnm-guided-tour__actions {
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  overflow: hidden;
}

@keyframes mnm-tour-cursor-ripple {
  0% {
    opacity: 0.9;
    transform: scale(0.25);
  }
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@keyframes mnm-tour-badge-pulse {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

@keyframes mnm-tour-cursor-click {
  0% {
    opacity: 0.95;
    transform: scale(0.35);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

.mnm-tour-tomato-shell {
  position: fixed;
  inset: 0;
  z-index: 19990;
  background: rgba(2, 4, 3, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mnm-tour-tomato-shell.is-open {
  opacity: 1;
  pointer-events: none;
}

.mnm-tour-tomato-shell iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

body.mnm-guided-tour-active .mnm-tour-tomato-shell.is-open {
  z-index: 19990;
}

.mnm-mobile-hint {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5500;
  max-width: min(440px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(8, 20, 16, 0.96);
  border: 1px solid rgba(93, 255, 184, 0.4);
  font-size: 12.5px;
  line-height: 1.5;
  color: #d4f5e4;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.mnm-mobile-hint button {
  margin-left: 8px;
}

@media (min-width: 720px) {
  .mnm-mobile-hint {
    display: none !important;
  }
}

.map-nav-ctx-menu {
  position: fixed;
  z-index: 12055;
  min-width: 210px;
  padding: 8px;
  border-radius: 12px;
  background: var(--ui-glass-bg, rgba(8, 18, 14, 0.94));
  border: 1px solid var(--ui-glass-border-strong, rgba(125, 252, 138, 0.35));
  box-shadow: var(--ui-glass-shadow, 0 12px 36px rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.map-nav-ctx-menu[hidden] {
  display: none !important;
}
.map-nav-ctx-menu__title {
  margin: 0 0 6px;
  padding: 2px 8px 4px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.75);
  font-weight: 700;
}
.map-nav-ctx-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(230, 245, 235, 0.96);
  font-size: 0.84rem;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}
.map-nav-ctx-menu__item:hover,
.map-nav-ctx-menu__item:focus-visible {
  background: rgba(125, 252, 138, 0.1);
  outline: none;
}
.map-nav-ctx-menu__title--section {
  margin-top: 2px;
}
.map-nav-ctx-menu__title--section:first-child {
  margin-top: 0;
}
.map-nav-ctx-menu__divider {
  height: 1px;
  margin: 6px 4px;
  background: rgba(125, 252, 138, 0.14);
}
.map-nav-ctx-menu__item--action {
  margin-top: 0;
  border-top: none;
  border-radius: 8px;
  padding-top: 9px;
}
.map-nav-ctx-menu__icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.map-nav-ctx-menu__icon svg {
  display: block;
}
.map-nav-ctx-menu__icon--custom {
  color: rgba(125, 252, 138, 0.9);
  font-size: 14px;
}
.map-nav-ctx-menu__label {
  flex: 1;
  line-height: 1.25;
}

.map-custom-settlement-menu {
  position: fixed;
  z-index: 12050;
  width: min(320px, calc(100vw - 24px));
  max-height: min(82vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(var(--ui-chrome-corner-inset) + var(--ui-chrome-size) + 8px) 14px 12px;
  border-radius: 16px;
  background: var(--ui-glass-bg);
  border: 1px solid var(--ui-glass-border-strong);
  box-shadow: var(--ui-glass-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.map-custom-settlement-menu > .map-custom-settlement-menu__close.ui-close {
  position: absolute !important;
  top: var(--ui-chrome-corner-inset) !important;
  right: var(--ui-chrome-corner-inset) !important;
  left: auto !important;
  z-index: 2;
}

.map-custom-settlement-menu__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.map-custom-settlement-menu__kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(93, 255, 184, 0.92);
  font-weight: 700;
}

.map-custom-settlement-menu__country {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #e8fff4;
}

.map-custom-settlement-menu__hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(232, 255, 244, 0.72);
}

.map-custom-settlement-menu__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: rgba(232, 255, 244, 0.65);
}

.map-custom-settlement-menu__field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 150, 0.45);
  background: rgba(4, 12, 10, 0.55);
  color: #e8fff4;
  font-size: 14px;
}

.map-custom-settlement-menu__field input:focus {
  outline: none;
  border-color: rgba(255, 92, 92, 0.65);
  box-shadow: 0 0 0 2px rgba(255, 72, 72, 0.18);
}

.map-custom-settlement-menu__field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 150, 0.45);
  background: rgba(4, 12, 10, 0.55);
  color: #e8fff4;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  min-height: 68px;
  max-height: 120px;
  font-family: inherit;
}

.map-custom-settlement-menu__field textarea:focus {
  outline: none;
  border-color: rgba(255, 92, 92, 0.65);
  box-shadow: 0 0 0 2px rgba(255, 72, 72, 0.18);
}

.map-custom-settlement-menu__near {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(143, 211, 255, 0.92);
}

.map-custom-settlement-menu__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.map-custom-settlement-menu__photos {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}

.map-custom-settlement-photo-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(93, 255, 184, 0.35);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(232, 255, 244, 0.92);
  cursor: pointer;
  font-size: 12px;
}

.map-custom-settlement-photo-add:hover {
  border-color: rgba(93, 255, 184, 0.65);
  background: rgba(93, 255, 184, 0.08);
}

.map-custom-settlement-photo-hint {
  font-size: 11px;
  opacity: 0.65;
}

.map-custom-settlement-photo-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  max-height: 44px;
  overflow: hidden;
}

.map-custom-settlement-photo-thumb {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.map-custom-settlement-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map-custom-settlement-photo-thumb__x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  padding: 0;
  cursor: pointer;
}

.map-custom-settlement-menu__close {
  flex-shrink: 0;
}

.custom-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(58, 166, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 10px rgba(58, 166, 255, 0.45);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out, border-color 0.07s ease-out;
  transform-origin: center center;
}

.map-custom-pin-marker {
  transition: transform 0.07s ease-out, filter 0.07s ease-out;
  transform-origin: center bottom;
  cursor: pointer;
}

.map-click-pulse {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(93, 255, 184, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 0 rgba(93, 255, 184, 0.7);
  animation: mapClickPulse 0.68s ease-out forwards;
  pointer-events: none;
}

@keyframes mapClickPulse {
  0% {
    transform: scale(0.35);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(93, 255, 184, 0.75);
  }
  70% {
    transform: scale(1.15);
    opacity: 0.85;
    box-shadow: 0 0 0 14px rgba(93, 255, 184, 0);
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
    box-shadow: 0 0 0 22px rgba(93, 255, 184, 0);
  }
}

#map {
  position: relative;
}

.map-click-detecting {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 16, 22, 0.82);
  border: 1px solid rgba(93, 255, 184, 0.45);
  color: #d8ffe8;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.map-click-detecting__spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(93, 255, 184, 0.25);
  border-top-color: #5dffb8;
  animation: mapDetectSpin 0.75s linear infinite;
}

@keyframes mapDetectSpin {
  to {
    transform: rotate(360deg);
  }
}

.global-toast--action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: min(92vw, 420px);
}

.global-toast__action {
  border: 1px solid rgba(93, 255, 184, 0.55);
  background: rgba(93, 255, 184, 0.12);
  color: #b8ffd8;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.global-toast__action:hover {
  background: rgba(93, 255, 184, 0.22);
}

.custom-marker--hover {
  transform: scale(1.16);
  box-shadow: 0 0 22px rgba(58, 166, 255, 0.72), 0 0 10px rgba(255, 64, 96, 0.32);
  border-color: rgba(58, 166, 255, 0.95);
  z-index: 6;
}

.map-custom-pin-marker.custom-marker--hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 10px rgba(214, 58, 58, 0.55));
}

.custom-marker--birth,
.custom-marker--home {
  font-size: 14px;
  background: rgba(11, 15, 16, 0.92);
  color: #eaf3ff;
  border: 1px solid rgba(58, 166, 255, 0.7);
  box-shadow: 0 0 14px rgba(58, 166, 255, 0.35);
  animation: none;
}

.footer-credit-nowrap {
  /* Footer should wrap by words, not by letters */
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

/* Right panel footer: keep legal/footer content inside panel */
.profile-nav-item.footer-meta-item {
  /* override .profile-nav-item (display:flex) so footer stacks vertically */
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}

/* Footer should not inherit right-menu "force left align" rules */
.profile-nav-item.footer-meta-item,
.profile-nav-item.footer-meta-item span {
  text-align: center !important;
}

.footer-credit-line {
  display: block;
  width: 100%;
  line-height: 1.4; /* keep same as footer meta item */
  font-size: 10px; /* slightly larger for readability */
}

.footer-credit-line .footer-credit-nowrap {
  display: inline;
}

.footer-credit-line,
.footer-legal-links {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.footer-credit-line,
.footer-legal-links {
  text-align: center;
}

.footer-legal-links {
  display: flex !important;
  flex-wrap: wrap; /* allow wrap to next line if ultra-narrow */
  gap: 6px; /* fit in one row */
  align-items: center;
  margin-top: 6px;
  line-height: 1.4;
  font-size: 8.5px; /* slightly smaller than 9px inline */
  justify-content: center;
}

.footer-legal-sep {
  opacity: 0.6;
}

.tomato-battle-icon .tomato-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 0%,
    #ff8a80 0%,
    #c62828 45%,
    #4a0000 100%
  );
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(255, 120, 120, 0.9));
}

.tomato-battle-icon .tomato-label {
  white-space: nowrap;
}

.tomato-battle-icon:hover {
  transform: translateY(-1px) scale(1.02);
  filter: saturate(1.2);
}

.tomato-battle-icon:active {
  transform: translateY(0) scale(0.98);
}

@keyframes tomato-battle-shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  15% {
    transform: translate(-2px, 0) rotate(-3deg);
  }
  35% {
    transform: translate(3px, -1px) rotate(3deg);
  }
  55% {
    transform: translate(-2px, 1px) rotate(-2deg);
  }
  75% {
    transform: translate(2px, 0) rotate(2deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.tomato-battle-icon--shake {
  animation: tomato-battle-shake 0.6s ease-in-out;
}

/* Правое меню: выравнивание текста и размер */

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 8px; /* расстояние между иконкой и текстом */
  padding: 6px 10px;
  font-size: 11px; /* немного крупнее текста */
  text-align: left; /* весь текст строго по левому краю */
}

.profile-nav-item i {
  min-width: 18px;
  text-align: center;
}

.profile-nav-item span {
  text-align: left;
}

/* подпись SOON / BETA выровнять и сделать компактнее */

.profile-nav-item .nav-badge {
  margin-left: auto;
  font-size: 9px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
/* Жёстко выравниваем весь текст в правом меню по левому краю */

.profile-nav-list {
  text-align: left;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
}

.profile-nav-item > * {
  text-align: left !important;
}

/* основной текст пункта (второй span) всегда слева */
.profile-nav-item span:nth-of-type(1) {
  text-align: left;
}

/* бейдж уходим вправо */
.profile-nav-item .nav-badge {
  margin-left: auto;
  text-align: center;
}
/* Левая панель: кнопки — выравнивание под карточки */
/* Левая панель: аккуратные кнопки */

.controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  column-gap: 5px;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

.controls-row #clearPlacesBtn {
  grid-column: 1;
  justify-self: stretch;
}

.controls-row #addPlaceBtn {
  grid-column: 2;
  justify-content: center;
  justify-self: center;
  font-size: 11px;
  padding: 7px 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.controls-row #soundToggleBtn {
  grid-column: 3;
  justify-self: stretch;
}

/* CLEAR и SOUND по краям */
.controls-row #clearPlacesBtn,
.controls-row #soundToggleBtn {
  justify-content: center;
  font-size: 8.5px;
  padding: 6px 4px;
  min-width: 0;
  overflow: hidden;
}
.controls-row #clearPlacesBtn i,
.controls-row #soundToggleBtn i {
  margin-right: 3px;
  font-size: 10px;
}

.controls-row .btn-ghost {
  min-height: 28px;
}
/* AUTH PANEL */

.auth-panel {
  padding: var(--space-12);
  background: var(--ui-auth-panel-bg);
  display: none;
  flex-direction: column;
}

.auth-panel .profile-block {
  margin-bottom: var(--space-8);
}

.auth-field {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-field label {
  font-size: var(--font-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-olive);
}

.auth-field input {
  background: var(--ui-auth-input-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-auth-input-border);
  padding: 5px 7px;
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-md);
}

.auth-field--error input,
.auth-field--error select,
.auth-field--error .auth-username-row input {
  border-color: #e05555 !important;
  box-shadow: 0 0 0 1px rgba(224, 85, 85, 0.35);
  background: rgba(80, 20, 20, 0.25);
}

.auth-field--error label,
.auth-field--error .auth-note {
  color: #ff8a8a !important;
}

.auth-field--error .auth-note {
  font-weight: 600;
}

.auth-field input[aria-invalid="true"] {
  border-color: #e05555;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.auth-mode-btn {
  border: 1px solid var(--ui-auth-mode-btn-border);
  background: var(--ui-auth-mode-btn-bg);
  color: var(--text-main);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-mode-btn.is-active {
  border-color: var(--ui-auth-mode-btn-active-border);
  color: var(--ui-auth-mode-btn-active-color);
  box-shadow: 0 0 0 1px var(--ui-auth-mode-btn-active-ring) inset;
}

.auth-field select {
  background: var(--ui-auth-input-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--ui-auth-input-border);
  padding: 5px 7px;
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-md);
}
.auth-field select option {
  background: var(--ui-auth-input-bg);
  color: var(--text-main);
}

.auth-forgot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 2px;
}

.auth-text-link {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-auth-link-color);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid var(--ui-auth-link-border);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-text-link:hover {
  color: var(--ui-auth-link-hover-color);
  border-bottom-color: var(--ui-auth-mode-btn-active-border);
  text-shadow: none;
}

.auth-text-link:focus-visible {
  outline: 1px solid rgba(58, 166, 255, 0.55);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Стрелки года рождения: видимые, в синем неоне (как bucket / time machine) */
.auth-field input[type="number"]::-webkit-inner-spin-button,
.auth-field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button;
  opacity: 1;
  height: 20px;
  cursor: pointer;
  filter: brightness(0.75) saturate(2.2) hue-rotate(168deg)
    drop-shadow(0 0 4px rgba(58, 166, 255, 0.65));
}
.auth-field input[type="number"] {
  color-scheme: var(--ui-auth-input-scheme);
}

.auth-birth-row .auth-birth-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 2fr;
  gap: var(--space-4);
}

.auth-birth-grid input,
.auth-birth-grid select {
  min-width: 0;
}


.auth-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.auth-social-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.auth-social-btn {
  flex: 1;
  min-width: 90px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--ui-auth-social-btn-border);
  background: var(--ui-auth-social-btn-bg);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--font-xs);
  cursor: pointer;
}

.auth-social-btn i {
  font-size: 13px;
}

.auth-social-btn--vk {
  border-color: rgba(76, 117, 163, 0.75);
  color: rgba(170, 205, 255, 0.95);
}

.auth-social-btn--yandex {
  border-color: rgba(255, 50, 50, 0.55);
  color: rgba(255, 200, 200, 0.95);
}

.auth-social-btn--placeholder {
  border-color: rgba(80, 120, 90, 0.25);
  background: transparent;
  opacity: 0.35;
  pointer-events: none;
  min-width: 2.6rem;
}

.auth-social-btn--x {
  border-color: rgba(180, 180, 190, 0.55);
  color: rgba(220, 220, 230, 0.95);
}

.auth-zone-badge {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid rgba(125, 252, 138, 0.22);
  background: rgba(125, 252, 138, 0.06);
  color: rgba(190, 235, 200, 0.92);
}

.auth-zone-badge[data-zone="rf"] {
  border-color: rgba(120, 180, 255, 0.28);
  background: rgba(80, 140, 255, 0.08);
  color: rgba(190, 215, 255, 0.95);
}

.auth-panel.auth-panel--login {
  padding: 10px 12px 12px;
  overflow: hidden;
  justify-content: flex-start;
}

.auth-panel.auth-panel--login .profile-body {
  gap: 8px;
  margin-top: 6px;
  flex: 0 1 auto;
  min-height: 0;
  overflow: visible;
}

.auth-panel:not(.auth-panel--login) {
  position: absolute;
  inset: 0;
  z-index: 40;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.auth-panel:not(.auth-panel--login) .profile-head {
  flex-shrink: 0;
}

.auth-panel:not(.auth-panel--login) .profile-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.auth-panel.auth-panel--login .auth-block--login .profile-block {
  margin-bottom: 0;
}

.auth-panel.auth-panel--login .auth-caption-tight {
  margin-top: 6px;
  display: block;
}

.auth-panel.auth-panel--login .auth-social-row--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.auth-panel.auth-panel--login .auth-social-btn {
  padding: 5px 6px;
  font-size: 9px;
}

.auth-panel.auth-panel--login .auth-social-btn span {
  display: none;
}

.auth-panel.auth-panel--login .auth-actions-row--tight {
  margin-top: 8px;
}

/* Registration: security check in a separate overlay (not inside scroll column) */
.auth-captcha-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
}
.auth-captcha-overlay[hidden] {
  display: none !important;
}
.auth-captcha-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 4, 0.76);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.auth-captcha-modal {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  max-height: min(88vh, 480px);
  overflow: auto;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: radial-gradient(circle at 0 0, #141d16 0, #050806 78%);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.72);
}
.auth-captcha-modal-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-olive);
  margin: 0 0 8px;
}
.auth-captcha-modal-sub {
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-dim);
}
.auth-captcha-q {
  display: block;
  font-size: var(--font-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-olive);
  margin-bottom: 6px;
}
.auth-captcha-input {
  width: 100%;
  box-sizing: border-box;
  background: #020304;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(60, 110, 80, 0.9);
  padding: 8px 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--font-md);
}
.auth-captcha-modal-toolbar {
  margin-top: 10px;
}
.auth-captcha-modal-footer {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.auth-photo-grid {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-height: 132px;
  overflow-y: auto;
  padding-right: 4px;
}

.auth-photo-grid .auth-photo-thumb {
  width: 100%;
  padding-top: 100%;
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(90, 150, 110, 0.9);
  overflow: hidden;
  background: #050806;
  cursor: pointer;
}

.auth-photo-grid .auth-photo-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-photo-grid .auth-photo-thumb.is-primary {
  border-color: rgba(125, 252, 138, 0.92);
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.5), 0 0 14px rgba(125, 252, 138, 0.35);
}

.auth-photo-grid .auth-photo-thumb.is-primary::after {
  content: "MAIN";
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 4px;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(233, 255, 240, 0.98);
  border: 1px solid rgba(125, 252, 138, 0.7);
  background: rgba(5, 16, 10, 0.82);
}

.auth-photo-remove {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 130, 150, 0.65);
  background: rgba(24, 4, 8, 0.82);
  color: rgba(255, 204, 214, 0.96);
  line-height: 14px;
  text-align: center;
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
}

.auth-note {
  font-size: var(--font-xs);
  color: var(--text-dim);
  margin-top: 4px;
}

.right-panel-wrapper {
  position: relative;
  height: 100%;
}
/* auth-панель поверх правого меню, того же размера */
.auth-panel {
  display: none;
  flex-direction: column;
}
.avatar-circle {
  position: relative;
  cursor: pointer;
}

.avatar-hint {
  position: absolute;
  inset-inline: 0;
  bottom: -14px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.avatar-circle:hover .avatar-hint {
  opacity: 1;
  transform: translateY(0);
}
.auth-legal {
  margin-top: var(--space-4);
  margin-bottom: var(--space-12);
  padding-top: var(--space-2);
  border-top: 1px solid var(--accent-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--font-xs);
  color: var(--text-dim);
  line-height: 1.4;
}

.auth-panel .auth-legal + .profile-block {
  margin-top: var(--space-4);
}

.auth-legal-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.auth-legal-item input[type="checkbox"] {
  margin-top: 2px;
}

.auth-legal-read-btn {
  display: inline;
  margin: 0 2px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--ui-auth-legal-link-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-legal-read-btn:hover {
  color: var(--ui-auth-legal-link-hover-color);
}

.auth-legal-read-link,
.footer-legal-link {
  display: inline;
  margin: 0 2px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--ui-auth-legal-link-color, var(--green));
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-legal-read-link:hover,
.footer-legal-link:hover {
  color: var(--ui-auth-legal-link-hover-color, #8ef0c8);
}

.legal-info-foot-warn .footer-legal-link {
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

/*Записаная книжка*/

.notebook-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(
    circle at top,
    #07131b 0%,
    #02070b 40%,
    #000 100%
  );
  border-radius: var(--radius-lg);
  border: 1px solid rgba(80, 180, 255, 0.4);
  padding: var(--space-6);
  box-shadow: 0 0 0 1px rgba(3, 255, 213, 0.1), 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* ИКОНКА NODE NOTEBOOK В ШАПКЕ */

.notebook-header-row {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  padding: 2px 0 var(--space-2);
  min-height: 0;
  box-sizing: border-box;
  gap: 6px;
  text-align: center;
}

.notebook-header-icon-slot {
  display: none;
}

.notebook-header-spacer {
  display: none;
}

.notebook-header-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
  width: 100%;
}

.notebook-header-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid rgba(143, 211, 255, 0.7);
  background: transparent;
  flex: 0 0 auto;
}

.notebook-header-icon i {
  font-size: 22px;
  color: #8fd3ff;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.notebook-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}

.notebook-panel > #notebookShareBtn {
  position: absolute;
  left: var(--ui-chrome-inset);
  top: var(--ui-chrome-inset);
  z-index: 5;
}

.notebook-head-actions {
  position: absolute;
  left: var(--ui-chrome-inset);
  top: var(--ui-chrome-inset);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 132px;
}

.notebook-head-actions .notebook-head-btn {
  width: 100%;
  flex: 0 0 auto;
}

.notebook-packing-head-btn,
.notebook-archive-head-btn,
.notebook-chrome-share {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  font-size: 10px;
  line-height: 1.15;
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
}

.notebook-packing-head-btn {
  align-items: center;
  white-space: normal;
  min-height: 40px;
  padding: 5px 8px;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.notebook-packing-head-btn span,
.notebook-archive-head-btn span,
.notebook-chrome-share span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notebook-packing-head-btn span {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  word-break: break-word;
  hyphens: auto;
}

.notebook-packing-head-btn i,
.notebook-archive-head-btn i,
.notebook-chrome-share i {
  font-size: 12px;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

.notebook-head-btn {
  width: 132px;
  flex: 0 0 132px;
  border: 1px solid rgba(143, 211, 255, 0.7);
  background: linear-gradient(
    160deg,
    rgba(10, 24, 34, 0.86),
    rgba(6, 16, 22, 0.75)
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(208, 238, 255, 0.96);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

.notebook-head-btn.notebook-chrome-share {
  border-width: 1px;
  border-color: rgba(143, 211, 255, 0.7);
}

.notebook-head-btn:hover {
  color: rgba(125, 252, 138, 0.9);
  border-color: rgba(125, 252, 138, 0.72);
}

.notebook-head-btn--close {
  font-weight: 700;
}

.notebook-head-btn--close.ui-close {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  flex: 0 0 28px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.notebook-close-x {
  font-size: 18px;
  line-height: 1;
  margin-left: 5px;
  transform: translateY(1px);
  display: inline-block;
}

/* Center title block — chrome buttons are absolute left/right */
.notebook-header .notebook-header-main {
  flex: 0 0 auto;
  width: auto;
  max-width: min(100%, 520px);
  justify-content: center;
  text-align: center;
  margin: 0;
}

.notebook-item--just-done {
  animation: nbJustDone 0.45s ease;
}

@keyframes nbJustDone {
  from {
    box-shadow: 0 0 0 0 rgba(125, 252, 138, 0.5);
  }
  to {
    box-shadow: 0 0 0 8px transparent;
  }
}

/* Share overlay: social buttons (placeholders) */
.share-social-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.share-social-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0;
}

.notebook-share-lead {
  margin-bottom: 6px;
}

.notebook-share-security-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(143, 211, 255, 0.72);
}

.notebook-share-dual-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}

.notebook-share-dual-btn {
  min-height: 42px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.25;
  padding: 8px 10px;
}

.notebook-share-dual-btn--copy {
  background: linear-gradient(165deg, rgba(18, 42, 58, 0.95), rgba(10, 24, 34, 0.9));
  border-color: rgba(143, 211, 255, 0.45);
}

.notebook-share-manage {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(4, 14, 10, 0.55);
}

.notebook-share-manage-text {
  margin: 0 0 8px;
  font-size: 11px;
  color: rgba(208, 238, 255, 0.88);
}

.notebook-share-secondary {
  margin-top: 4px;
}

.notebook-share-import-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
  min-height: 14px;
}

.notebook-share-import-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.notebook-share-primary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notebook-share-actions {
  margin-top: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.notebook-share-actions .btn-main,
.notebook-share-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.notebook-share-actions .btn-main i,
.notebook-share-actions .btn-ghost i {
  font-size: 12px;
}

.share-social-btn--inapp-inline {
  border-color: rgba(125, 252, 138, 0.42) !important;
  background: linear-gradient(180deg, rgba(18, 42, 28, 0.72), rgba(8, 16, 12, 0.55)) !important;
  color: rgba(190, 255, 210, 0.96) !important;
}

.notebook-share-more {
  margin: 8px 0 4px;
  border: 1px solid rgba(58, 166, 255, 0.22);
  border-radius: 10px;
  background: rgba(5, 12, 10, 0.28);
  padding: 0 10px 8px;
}

.notebook-share-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(143, 211, 255, 0.88);
  user-select: none;
}

.notebook-share-more > summary::-webkit-details-marker {
  display: none;
}

.notebook-share-more > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  opacity: 0.75;
}

.notebook-share-more[open] > summary::before {
  content: "▾";
}

.notebook-share-more .share-social-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.notebook-share-more .notebook-share-actions {
  margin-top: 4px;
}

.share-social-btn {
  border: 1px solid rgba(58, 166, 255, 0.25);
  background: rgba(5, 12, 10, 0.35);
  color: rgba(143, 211, 255, 0.85);
  border-radius: 10px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 56px;
}

.share-social-btn i {
  font-size: 18px;
}

.share-social-btn span {
  font-size: 8.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.95;
  line-height: 1.15;
  text-align: center;
}

.share-social-btn:hover {
  border-color: rgba(125, 252, 138, 0.35);
  color: rgba(125, 252, 138, 0.9);
  background: rgba(10, 20, 14, 0.45);
}

.share-social-btn--inapp {
  border-color: rgba(125, 252, 138, 0.42);
  background: linear-gradient(180deg, rgba(18, 42, 28, 0.72), rgba(8, 16, 12, 0.55));
  color: rgba(190, 255, 210, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(125, 252, 138, 0.12),
    0 0 14px rgba(58, 166, 255, 0.08);
}

.share-social-btn--inapp i {
  color: rgba(125, 252, 138, 0.95);
}

.share-social-btn--inapp:hover {
  border-color: rgba(125, 252, 138, 0.62);
  background: linear-gradient(180deg, rgba(22, 52, 34, 0.82), rgba(10, 20, 14, 0.62));
  box-shadow:
    inset 0 0 0 1px rgba(125, 252, 138, 0.2),
    0 0 18px rgba(125, 252, 138, 0.14);
}

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

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

  .notebook-header-icon {
    width: 42px;
    height: 42px;
  }

  .notebook-header-icon i {
    font-size: 20px;
  }
}

/* Folder picker for safe notebook sharing from chat */
.nb-share-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nb-share-picker-window {
  width: min(420px, calc(100% - 12px));
  border-radius: 10px;
  border: 1px solid rgba(143, 211, 255, 0.38);
  background: linear-gradient(
    165deg,
    rgba(14, 24, 20, 0.96) 0%,
    rgba(4, 10, 8, 0.98) 100%
  );
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  padding: 14px;
  color: var(--text-main);
}

.nb-share-picker-title {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.nb-share-picker-sub {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: var(--font-xs);
  line-height: 1.4;
}

.nb-share-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notebook-title {
  text-align: center;
  font-size: 14px; /* чуть крупнее, было 18 */
}

.notebook-subtitle {
  text-align: center;
  font-size: 9px; /* можно варьировать 11–12 */
}

.notebook-close-btn {
  /* legacy selector left for compatibility (button id stays the same) */
  position: static;
}

/* ПАПКИ В БЛОКНОТЕ */

.notebook-folders-row {
  display: flex;
  flex-direction: column; /* в колонку */
  align-items: center; /* центр по горизонтали */
  gap: 6px;
  margin-top: 10px; /* отступ вниз от NODE NOTEBOOK */
  margin-bottom: 10px;
}

.notebook-folders {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* сами папки по центру */
  gap: 6px;
}

.notebook-folder {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(80, 180, 255, 0.4);
  background: rgba(3, 10, 18, 0.85);
  color: rgba(230, 243, 255, 0.9);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.08s ease;
}
.notebook-folder:hover {
  transform: translateY(-0.5px);
  border-color: rgba(80, 180, 255, 0.9);
}

.notebook-folder.active {
  border-color: rgba(125, 252, 138, 0.85);
  background: rgba(125, 252, 138, 0.16);
  color: #e8fff0;
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.4), 0 0 16px rgba(125, 252, 138, 0.14);
}

.notebook-folder.is-shared-folder {
  border-color: rgba(255, 217, 90, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 217, 90, 0.25);
}

.notebook-folder-shared-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #ffe9a8;
  background: rgba(255, 217, 90, 0.14);
  border: 1px solid rgba(255, 217, 90, 0.35);
  vertical-align: middle;
}

.notebook-folder-ctx-btn--live i {
  color: #ffd95a;
}

.notebook-panel {
  position: relative;
}

.notebook-shared-members {
  position: absolute;
  top: auto;
  bottom: 12px;
  right: 12px;
  z-index: 4;
  max-width: min(46%, 220px);
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(4, 12, 10, 0.82);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.notebook-shared-members[hidden] {
  display: none !important;
}

.notebook-shared-members-label {
  display: block;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 217, 90, 0.85);
  margin-bottom: 4px;
}

.notebook-shared-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.notebook-shared-member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(220, 240, 230, 0.9);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notebook-shared-member-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(140, 160, 150, 0.65);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.notebook-shared-member-dot.is-online {
  background: #7dfc8a;
  box-shadow: 0 0 6px rgba(125, 252, 138, 0.75);
}

.notebook-shared-overlay {
  position: fixed;
  inset: 0;
  z-index: 14020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.notebook-shared-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
}

.notebook-shared-overlay__panel {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  width: min(420px, 94vw);
  padding: 18px 18px 16px;
  border-radius: 6px;
  border: 1px solid rgba(125, 252, 138, 0.42);
  background: rgba(6, 14, 12, 0.94);
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.55), 0 0 24px rgba(58, 166, 255, 0.08);
}

.notebook-shared-overlay__title {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7dfc8a;
}

.notebook-shared-overlay__text {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(210, 230, 220, 0.92);
}

.notebook-shared-overlay__friends {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(42vh, 280px);
  overflow: auto;
  margin: 0 0 12px;
  padding-right: 2px;
}

.notebook-shared-friend-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(80, 180, 255, 0.28);
  background: rgba(3, 10, 18, 0.72);
  cursor: pointer;
  text-align: left;
}

.notebook-shared-friend-pick.is-selected {
  border-color: rgba(125, 252, 138, 0.65);
  background: rgba(125, 252, 138, 0.1);
}

.notebook-shared-friend-pick input {
  accent-color: #7dfc8a;
}

.notebook-shared-friend-pick__name {
  font-size: 12px;
  color: #e8fff0;
}

.notebook-shared-friend-pick__sub {
  display: block;
  font-size: 10px;
  color: rgba(180, 210, 200, 0.75);
}

.notebook-shared-overlay__hint {
  margin: 0 0 10px;
  font-size: 10px;
  color: rgba(180, 210, 200, 0.7);
}

.notebook-shared-overlay__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.notebook-shared-overlay__btn {
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid rgba(80, 180, 255, 0.45);
  background: rgba(3, 10, 18, 0.9);
  color: #d5eee0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.notebook-shared-overlay__btn--primary {
  border-color: rgba(125, 252, 138, 0.65);
  color: #eafff0;
  background: rgba(125, 252, 138, 0.14);
}

/* плюс для добавления папки */

.notebook-folder-add-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(80, 180, 255, 0.7);
  background: rgba(3, 10, 18, 0.95);
  color: #8fd3ff;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notebook-packing-template-btn {
  font-size: 11px;
}

/* всплывающий ввод папки */

.notebook-folder-add {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notebook-folder-input {
  width: 120px;
  padding: 4px 6px;
  border-radius: 3px;
  border: 1px solid rgba(80, 180, 255, 0.4);
  background: rgba(3, 10, 18, 0.9);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
}

.notebook-folder-input::placeholder {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
}

.notebook-folder-ok-btn {
  border: 1px solid rgba(143, 211, 255, 0.35);
  background: rgba(58, 166, 255, 0.18);
  color: #e8f4ff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.notebook-folder-cancel-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(220, 235, 250, 0.85);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.notebook-folder-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.notebook-folder-modal[hidden] {
  display: none !important;
}

.notebook-folder-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}

.notebook-folder-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 22px 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(143, 211, 255, 0.28);
  background: linear-gradient(165deg, rgba(14, 28, 42, 0.98), rgba(8, 16, 26, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.notebook-folder-modal-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.notebook-folder-modal-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(200, 220, 240, 0.78);
}

.notebook-folder-modal-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(143, 211, 255, 0.32);
  background: rgba(6, 14, 22, 0.85);
  color: #eef6ff;
  font-size: 15px;
}

.notebook-folder-modal-err {
  margin: 8px 0 0;
  color: rgba(255, 140, 140, 0.95);
  font-size: 12px;
}

.notebook-folder-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.notebook-folder-modal-btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.notebook-folder-modal-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(230, 240, 255, 0.9);
}

.notebook-folder-modal-btn--primary {
  border: 1px solid rgba(143, 211, 255, 0.5);
  background: linear-gradient(135deg, rgba(58, 166, 255, 0.35), rgba(80, 200, 255, 0.22));
  color: #eef8ff;
}

.notebook-folder-modal-btn--danger {
  border: 1px solid rgba(255, 120, 100, 0.55);
  background: linear-gradient(135deg, rgba(120, 28, 24, 0.9), rgba(80, 16, 14, 0.88));
  color: #ffd4cc;
}

.notebook-folder-delete-label {
  display: block;
  margin: 0 0 6px;
  font-size: var(--font-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 210, 235, 0.85);
}

.notebook-folder-delete-select {
  margin-bottom: 12px;
}

.notebook-folder-delete-actions-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.notebook-save-status {
  margin: 4px 2px 0;
  min-height: 16px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(180, 210, 235, 0.75);
}

.notebook-save-status[data-status="saving"] {
  color: rgba(160, 210, 255, 0.9);
}

.notebook-save-status[data-status="saved"] {
  color: rgba(140, 230, 170, 0.95);
}

.notebook-save-status[data-status="error"] {
  color: rgba(255, 150, 140, 0.95);
}

.notebook-item-text {
  cursor: text;
}

.notebook-item-edit {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(143, 211, 255, 0.45);
  background: rgba(6, 14, 22, 0.9);
  color: #eef6ff;
  font: inherit;
}

.notebook-folder-ctx {
  position: fixed;
  z-index: 12050;
  min-width: 132px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: linear-gradient(165deg, rgba(10, 18, 16, 0.97), rgba(4, 8, 7, 0.98));
  box-shadow:
    0 0 0 1px rgba(58, 166, 255, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.65),
    0 0 24px rgba(58, 166, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: notebook-ctx-in 0.16s ease-out;
}

.notebook-folder-ctx[hidden] {
  display: none !important;
}

@keyframes notebook-ctx-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notebook-folder-ctx-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(225, 245, 235, 0.92);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.notebook-folder-ctx-btn i {
  width: 14px;
  text-align: center;
  font-size: 11px;
  color: rgba(143, 211, 255, 0.9);
}

.notebook-folder-ctx-btn--share i {
  color: rgba(100, 220, 255, 0.95);
}

.notebook-folder-ctx-btn--share:hover,
.notebook-folder-ctx-btn--share:focus-visible {
  border-color: rgba(80, 200, 255, 0.45);
  background: rgba(40, 120, 160, 0.18);
}

.notebook-folder-ctx-btn:hover,
.notebook-folder-ctx-btn:focus-visible {
  border-color: rgba(58, 166, 255, 0.35);
  background: rgba(58, 166, 255, 0.1);
}

.notebook-folder-ctx-btn--danger i {
  color: rgba(255, 140, 140, 0.95);
}

.notebook-folder-ctx-btn--danger:hover,
.notebook-folder-ctx-btn--danger:focus-visible {
  border-color: rgba(255, 100, 100, 0.4);
  background: rgba(80, 20, 20, 0.35);
  color: rgba(255, 210, 210, 0.98);
}

.notebook-folder.is-ctx-target {
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.55), 0 0 14px rgba(125, 252, 138, 0.2);
}

/* ИНПУТ + ФИЛЬТРЫ */

.notebook-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notebook-input {
  flex: 1 1 auto;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(80, 180, 255, 0.4);
  background: rgba(3, 10, 18, 0.9);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: 0.06em;
  /*text-transform: uppercase;*/
  caret-color: #48f6c4;
}

.notebook-input::placeholder {
  /*text-transform: uppercase;*/
  letter-spacing: 0.06em;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}

/* маленькая кнопка справа внутри строки */

.notebook-add-btn {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: var(--radius-sm); /* вместо 999px */
  border: 1px solid rgba(80, 180, 255, 0.4); /* как у input */
  background: rgba(3, 10, 18, 0.9); /* как у input */
  color: rgba(230, 243, 255, 0.9);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.08s ease, color 0.15s ease;
}

.notebook-add-btn:hover {
  background: rgba(20, 120, 255, 0.18);
  border-color: rgba(80, 180, 255, 0.9);
}

.notebook-add-btn:active {
  transform: translateY(0.5px);
}

/* фильтры под инпутом */

.notebook-filters {
  display: flex;
  justify-content: center; /* центрируем по ширине */
  gap: 18px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.notebook-filter {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 12px; /* было 11px */
  letter-spacing: 0.18em; /* чуть шире */
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  position: relative;
  font-weight: 600; /* пожирнее */
}

.notebook-filter.active {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(72, 246, 196, 0.7);
}

.notebook-filter.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #48f6c4, #4fa3ff);
}

/* СПИСОК ЗАДАЧ */

.notebook-list {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.notebook-empty {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.9;
}

/* строка задачи с разделителями */

.notebook-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  padding: 7px 4px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notebook-item-main {
  min-width: 0;
  overflow-wrap: break-word; /* перенос длинных слов/ссылок */
}

.notebook-item-main span {
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: block;
  max-width: 100%;
}

/* чекбокс */

.notebook-item input[type="checkbox"] {
  width: 10px;
  height: 10px;
  border-radius: 4px;
}

/* мета-текст под задачей (если есть) */

.notebook-item-meta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* экшены справа */

.notebook-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.notebook-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 8, 14, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.08s ease, color 0.15s ease;
}

.notebook-icon-btn i {
  font-size: 13px;
}

.notebook-icon-btn:hover {
  background: rgba(20, 120, 255, 0.18);
  border-color: rgba(80, 180, 255, 0.9);
  color: #ffffff;
  transform: translateY(-0.5px);
}

.notebook-icon-btn:active {
  transform: translateY(0);
}

/* состояния */

.notebook-item.done {
  border-color: rgba(122, 247, 193, 0.8);
}

.notebook-item.done .notebook-item-main span {
  color: rgba(180, 255, 200, 0.9);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* пропущенная задача (SKIPPED) — точечное перечёркивание */
.notebook-item.skipped .notebook-item-main span {
  color: #f6a76a;
  text-decoration: line-through;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  opacity: 0.9;
}

.notebook-item.skipped {
  border-color: rgba(246, 167, 106, 0.8);
}

.notebook-footer {
  margin-top: var(--space-3);
  font-size: var(--font-xs);
  color: var(--text-dim);
  opacity: 0.9;
}
/* (legacy block) — без синего градиента, только чёрный фон под canvas */
.intro-screen .intro-network-bg {
  background: #000000;
}

/* чтобы интро-блок не «расползался» */
.intro-screen .intro-inner {
  position: relative;
  z-index: 12;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.intro-screen .intro-stack {
  position: relative;
  z-index: 12;
}
.intro-screen .intro-below {
  width: min(420px, 92vw);
  margin: 0 auto;
}

/* During intro: hide bottom screen toasts/celebrations — keep intro box (slogan + bar) visible */
body.intro-active .global-toast-root,
body.intro-active #celebrationOverlay {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Слоган-терминал */
.intro-slogan {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-family: var(--font-mono);
  white-space: normal;
  overflow: hidden;
  max-width: 100%;
  min-height: 1.35em;
  line-height: 1.35;
  word-break: break-word;
  padding: 0 4px;
  box-sizing: border-box;
}

/* Blinking typewriter cursor — only while typing */
.intro-slogan.is-typing::after {
  content: "_";
  display: inline-block;
  margin-left: 2px;
  vertical-align: baseline;
  animation: intro-cursor-blink 0.8s steps(1) infinite;
}

@keyframes intro-cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Блок загрузки */
.intro-loading {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-loading-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.7);
  overflow: hidden;
  background: rgba(4, 8, 6, 0.9);
}

.intro-loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3aa6ff, #7dfc8a);
  box-shadow: 0 0 8px rgba(125, 252, 138, 0.7);
  transition: width 0.2s linear;
}

.intro-loading-text {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}

/* Плавное скрытие интро */
.intro-screen.hide {
  opacity: 0;
  visibility: hidden;
  display: none;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
