/* === styles/base.css === */
/* Modern CSS Reset & Base Styles */


* {
  margin: 0;
  padding: 0;
}


/* Form elements reset */


/* Utilities */

/* === styles/variables.css === */
/* CSS Variables - Colors, spacing, z-index, animations */


/* Dark mode variables */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --fg: #ddd;
  }
}
/* === styles/components/modal.css === */
/* Modal Component - Dialog boxes for forms */


/* Success Modal */


@keyframes modalFadeBackdrop {
  

  to {
    opacity: 1;
  }
}

@keyframes modalScaleContent {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* === styles/components/profile.css === */
/* Profile Component - User profile card styling */


/* Avatar styles for user menu */

.hidden {
  display: none !important;
}

@keyframes navMenuIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


@keyframes notiEnter {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* --- Icons via CSS (Pseudo-elements) --- */


/* Success */


/* Error */


/* Info */


/* --- Close Button --- */


/* === components/notification-bell/index.css === */
/* Notification Bell Component */

/* Bell button */


/* Dropdown container */


@keyframes nbell-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */


/* Notification list */


/* Individual notification item */


/* Icon column */


/* Content column */


/* Inline vote buttons for pending publish requests */


/* Allow nbell-actions to wrap onto a new line under the content */
.nbell-item {
  flex-wrap: wrap;
}

/* Time + unread dot */


/* Footer */


/* ── Mobile Responsive ── */
.mt-empty-state {
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 24px 20px 8px;
  margin: 0;
}

.mt-filter-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
}

.mt-filter-options.hidden {
  display: none;
}

.mt-filter-option {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  color: #222;
  border-bottom: 1px solid #f0f0f0;
}

.mt-filter-option:last-child {
  border-bottom: none;
}

.mt-filter-option:hover {
  background: #f8f9fa;
}

.mt-filter-option input[type="checkbox"] {
  display: none;
}
/* === modules/map/map.css === */
/* ═══════════════════════════════════════════════════════════
   map-bundle.css — all map-page-only styles in one file
   Generated: 2026-05-14
   ═══════════════════════════════════════════════════════════ */

/* ── app-canvas.css ── */
/* App Container - Canvas and graph rendering */

#graph-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  display: block;
  width: 100%;
  height: 100%;
}

#graph3d-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  display: block;
  width: 100%;
  height: 100%;
}

/* ForceGraph 2D and 3D containers */
#graph2d-fg,
#graph3d-fg {
  position: absolute;
  inset: 0;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

/* ── fab.css ── */
/* ═══════════════════════════════════════════════════════════════════
   FAB menu — mobile-first.
   Breakpoint (only one): @media (min-width: 768px) = desktop+
   Mobile base shows the pill toggle + sets a smaller panel pinned to
   the bottom-right corner; desktop hides the pill and gives the panel
   its expanded resting size.
   ═══════════════════════════════════════════════════════════════════ */

/* FAB Menu Panel — base = mobile placement */
.fab-menu-wrapper {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
}

#fab-pill-mob {
  position: fixed;
  bottom: 40px;
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  border: 1px solid var(--accent);
  text-align: center;
  right: 20px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: visible;                /* mobile shows the pill */
}

.visible { visibility: visible; }

/* Panel — mobile compact; desktop expands. */
.fab-menu-panel {
  position: absolute;
  width: 160px;
  right: 0;
  bottom: 4.5rem;
  background: rgba(30, 41, 59, 0.95);
  border: 2px solid #7297F045;
  border-radius: 10px;
  padding: 10px;
  display: none;                      /* mobile: hidden until .visible */
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  color: white;
  transition: all 0.3s ease;
}
.fab-menu-panel.visible { display: block; }

/* Header - Smaller font */
.fab-menu-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  padding-bottom: 8px;
  color: #f8fafc;
}

/* Divider Line */
.fab-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

/* Section Container */
.fab-menu-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Section Title - Smaller font */
.fab-menu-section-title {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 2px 0 4px 0;
  text-transform: capitalize;
}

/* Individual Option Button */
.fab-item {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 6px;
  width: 100%;
  text-align: left;
  transition: background 0.2s;
}

.fab-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Square Icon Wrapper — mobile base size. Desktop bumps via media query. */
.fab-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fab-icon svg {
  width: 14px;
  height: 14px;
}

/* Design-specific Inner Ring */
.fab-icon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

/* Colored States */
.item-green {
  background: #66bb6a;
}
.item-cyan {
  background: #26c6da;
}
.item-yellow {
  background: #ffca28;
}
.item-grey {
  background: #ef4444;
}

/* Label Text — mobile = compact; desktop bumps up. */
.fab-label {
  font-size: 0.8rem;
  color: #f1f5f9;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP+ (≥768px) — hide the pill toggle, expand the panel and
   the per-item icons.
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .fab-menu-wrapper { right: 1.5rem; bottom: 1.5rem; }
  #fab-pill-mob     { visibility: hidden; }
  .fab-menu-panel {
    position: static;
    width: 180px;
    padding: 14px;
    right: auto;
    bottom: auto;
    display: flex;
  }
  .fab-label { font-size: 0.9rem; }
  .fab-icon  { width: 36px; height: 36px; }
  .fab-icon svg { width: 18px; height: 18px; }
}

/* ── node-tooltip.css ── */
/* Node Tooltip - Rich tooltip when hovering over graph nodes */

.node-tooltip {
  position: fixed;
  background: white;
  border-radius: 8px;
  /* Removed main border */
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  z-index: 10;
  min-width: 160px;
  max-width: min(90vw, 280px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease-in-out, visibility 0s linear 0.5s;
  /* Allow arrow to protrude */
  overflow: visible;
}

.node-tooltip.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease-in-out, visibility 0s linear 0.35s;
}

/* Arrow Element (Rotated Square) */
.node-tooltip::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  transform: rotate(45deg);
  z-index: -1; /* Behind the tooltip content */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Match tooltip shadow roughly */
}

/* Type Badge Header */
.node-tooltip-type {
  display: flex; /* Block level flex to span width */
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  /* Padding layout for header */
  padding: 12px 16px;
  margin: 0;
  background: #fff; /* Opaque bg needed for header */
  border-radius: 8px 8px 0 0; /* Match container radius */

  /* Full width bottom border */
  border-bottom: 1px solid #e0e0e0;
}

.node-tooltip-type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Content Elements */
.node-tooltip-label {
  color: #222;
  line-height: 1.3;
  background: #fff; /* Opaque bg needed so arrow doesn't show thru */
}

.node-tooltip-id {
  font-size: 11px;
  color: #888;
  padding: 0 16px 4px 16px;
  background: #fff;
}

.node-tooltip-connections {
  font-size: 12px;
  color: #666;
  padding: 0 16px 16px 16px;
  background: #fff;
  border-radius: 0 0 8px 8px; /* Match container bottom radius */
}

/* ── Edge Action Popup (tooltip style) ── */
.edge-action-popup {
  position: fixed;
  z-index: 1001;
  background: #fff;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: visible;
  pointer-events: auto;
  display: flex;
  gap: 5px;
  padding: 12px 8px;
}

.edge-action-popup.hidden {
  display: none;
}

/* Arrow pointing down */
.edge-action-popup::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  margin-left: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
  z-index: -1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.edge-action-label {
  font-size: 1rem;
  color: #666;
  white-space: nowrap;
  border-bottom: 1px solid #f0f0f0;
}

.edge-delete-btn {
  border: none;
  color: #FF3B30;
  cursor: pointer;
  transition: background 0.2s;
}

.edge-delete-btn:hover {
  filter: drop-shadow(0 0 0.75rem crimson);;
}

.edge-delete-btn svg {
  flex-shrink: 0;
}

/* ── Mobile Responsive ── */

/* ── node-context-menu.css ── */
/* Node Context Menu - Rectangular right-click style menu */

.node-context-menu {
  position: absolute; /* JS overrides to fixed; positioned via left/top */
  min-width: 220px;
  /* Cap to viewport so a long item list in a short window can't
     extend past the bottom edge — the inner list scrolls instead. */
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  background: rgba(22, 24, 35, 0.96);
  border: 1px solid rgba(100, 130, 240, 0.45);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1001;
  transform: scale(0.96);
  transform-origin: top left;
  opacity: 0;
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), opacity 0.12s ease;
}

.node-context-menu:not(.hidden) {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.node-context-menu.hidden {
  display: none;
}

/* Vertical list container */
.context-ring {
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: auto;
}

/* No-op elements retained from radial version */
.context-ring::after { display: none; }
.context-center { display: none; }

/* Each action is a full-width row */
.context-btn-wrap {
  display: block;
  width: 100%;
}

.context-btn {
  width: 100%;
  min-height: 32px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #e0e6ff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.12s, color 0.12s;
  pointer-events: auto;
}

.context-btn:hover {
  background: rgba(100, 130, 240, 0.22);
  color: #ffffff;
}
.context-btn:active { opacity: 0.8; }

.context-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}

.context-btn-label {
  flex: 1;
  white-space: nowrap;
  pointer-events: none;
}

/* Delete danger style */
.context-btn.danger { color: #f87171; }
.context-btn.danger:hover { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }

/* Privacy — always show both buttons */
.privacy-lock,
.privacy-globe { display: flex; }

/* Tooltips */
/* tooltip.js uses standard tooltip CSS, we ensure they appear correctly inside absolute wraps */


/* Inline Confirm Popup */
/* Inline Confirm Popover */
.nm-confirm-popover {
  position: absolute;
  z-index: 1010;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 1.5px solid #ef4444; /* Specific to delete by default, but we can override */
  pointer-events: all;
  
  animation: nm-popup-in 0.18s cubic-bezier(.34,1.3,.64,1) both;
}

/* Delete confirm — appears to the right of the rectangular menu */
.nm-popover-delete {
  top: 0;
  left: calc(100% + 8px);
  transform-origin: top left;
}

/* Rename confirm — appears above the rectangular menu */
.nm-popover-rename {
  bottom: calc(100% + 8px);
  left: 0;
  transform-origin: bottom left;
  border-color: #5d78ff; /* Blue for rename */
}

.nm-popover-content {
  padding: 18px 22px;
  min-width: 200px;
}

/* Arrows */
.nm-popover-arrow {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  z-index: -1;
}

/* Arrow for Delete (points left back to the menu row) */
.nm-popover-delete .nm-popover-arrow {
  top: 14px;
  left: -7px;
  transform: rotate(45deg);
  border-left: 1.5px solid #ef4444;
  border-bottom: 1.5px solid #ef4444;
}

/* Arrow for Rename (points down to the menu) */
.nm-popover-rename .nm-popover-arrow {
  bottom: -7px;
  left: 20px;
  transform: rotate(45deg);
  border-right: 1.5px solid #5d78ff;
  border-bottom: 1.5px solid #5d78ff;
}

@keyframes nm-popup-in {
  from { transform: scale(0.8) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0);   opacity: 1; }
}


.nm-confirm-popover h4 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  text-align: center;
}
.nm-confirm-popover .nm-confirm-btns {
  display: flex;
  gap: 10px;
}
.nm-confirm-popover .nm-btn-cancel,
.nm-confirm-popover .nm-btn-confirm {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.nm-confirm-popover .nm-btn-cancel { background: #f3f4f6; color: #4b5563; }
.nm-confirm-popover .nm-btn-cancel:hover { background: #e5e7eb; }

.nm-popover-delete .nm-btn-confirm { background: #ef4444; color: #fff; }
.nm-popover-delete .nm-btn-confirm:hover { background: #dc2626; }

.nm-popover-rename .nm-btn-confirm { background: #5d78ff; color: #fff; }
.nm-popover-rename .nm-btn-confirm:hover { background: #4866ff; }

/* Copy ID Popup */
.nm-copy-popup {
  position: absolute;
  /* Appear to the right of the rectangular menu */
  top: 0;
  left: calc(100% + 8px);
  z-index: 1010;

  background: #fff;
  border: 1.5px solid #5d78ff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  
  transform-origin: center left;
  animation: nm-popup-in-right 0.18s cubic-bezier(.34,1.3,.64,1) both;
}

@keyframes nm-popup-in-right {
  from { transform: scale(0.8) translateX(-10px); opacity: 0; }
  to   { transform: scale(1) translateX(0);   opacity: 1; }
}

.nm-copy-popup::after {
  content: '';
  position: absolute;
  top: 14px;
  left: -6px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1.5px solid #5d78ff;
  border-bottom: 1.5px solid #5d78ff;
  transform: rotate(45deg);
}

.nm-copy-val {
  font-family: 'Outfit', sans-serif;
  font-size: 14px; /* Smaller font */
  color: #666;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis; /* Handle long UUIDs */
  white-space: nowrap;
  flex: 1;
}

.nm-copy-val strong {
  color: #111;
  margin-right: 4px;
}

.nm-btn-copy-exec {
  background: #f0f2ff;
  border: none;
  color: #5d78ff;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.nm-btn-copy-exec:hover {
  background: #5d78ff;
  color: #fff;
}

.nm-btn-copy-exec svg {
  width: 16px;
  height: 16px;
}

/* ── Node Rename Overlay ── */
.node-rename-overlay {
  position: absolute;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  pointer-events: auto;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 12px;
  min-width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.node-rename-overlay.hidden {
  display: none;
}

.node-rename-lang {
  background: #0f172a;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  font-family: Inter, -apple-system, sans-serif;
  padding: 8px 28px 8px 12px;
  border: 1px solid #475569;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.node-rename-lang:hover {
  border-color: #6d7ff5;
}

.node-rename-lang:focus {
  border-color: #6d7ff5;
  box-shadow: 0 0 0 2px rgba(74, 95, 193, 0.3);
}

.node-rename-input {
  background: #0f172a;
  color: #fff;
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: Inter, -apple-system, sans-serif;
  font-weight: 500;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.node-rename-input:focus {
  border-color: #6d7ff5;
  box-shadow: 0 0 0 3px rgba(74, 95, 193, 0.3), 0 4px 16px rgba(0, 0, 0, 0.35);
}

.node-rename-input::placeholder {
  color: #94a3b8;
}

.node-rename-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.rename-btn-cancel,
.rename-btn-confirm {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.rename-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.rename-btn-cancel:active { background: rgba(255, 255, 255, 0.15); }

.rename-btn-confirm {
  background: #6d7ff5;
  color: #fff;
}

.rename-btn-confirm:active { background: #5a6de0; }

/* ── Context menu tooltip ── */
.ctx-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 220px;
  padding: 6px 10px;
  background: rgba(30, 41, 59, 0.96);
  color: #e0e6ff;
  border: 1px solid rgba(100, 130, 240, 0.4);
  border-radius: 6px;
  font-size: 12px;
  font-family: Inter, -apple-system, sans-serif;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ctx-tooltip.hidden {
  display: none;
}

/* ── Disabled context button ── */
.context-btn.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: auto;
}
.context-btn.disabled:hover {
  background: transparent;
  color: #e0e6ff;
}
/* ── node-edit-info.css ── */
/* Node Edit Input - Floating input for renaming nodes */

.node-edit-input {
  position: fixed;
  z-index: 1002;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
}

.node-edit-input.hidden {
  display: none;
  opacity: 0;
}

.node-edit-input input {
  width: min(90vw, 400px);
  padding: 12px 16px;
  font-size: 14px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: white;
  color: #222;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.node-edit-input input::placeholder {
  color: #999;
}

.node-edit-input input:focus {
  border-color: #3d4fa3;
  box-shadow: 0 4px 16px rgba(74, 95, 193, 0.3);
}

/* Node Info Popup - Shows ID with copy button */

.node-info-popup {
  position: fixed;
  z-index: 1002;
  transform: translateX(-50%);
  max-width: min(90vw, 400px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 2px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease;
}

.node-info-popup.hidden {
  display: none;
  opacity: 0;
}

.node-info-id {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  user-select: all;
}

.node-info-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.node-info-copy:hover {
  background: #f5f5f5;
  border-color: var(--accent);
  color: var(--accent);
}

.node-info-copy:active {
  transform: scale(0.95);
}

/* ── Mobile Responsive ── */

/* ── node-highlight.css ── */
/* Node Highlight Overlay */
.node-highlight {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.node-highlight.hidden {
  opacity: 0;
  pointer-events: none;
}

.highlight-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.highlight-ring-outer {
  width: 60px;
  height: 60px;
  animation: pulse-outer 1s ease-in-out infinite;
}

.highlight-ring-inner {
  width: 40px;
  height: 40px;
  border-width: 3px;
  animation: pulse-inner 1s ease-in-out infinite;
  animation-delay: 0.15s;
}

@keyframes pulse-outer {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.3;
  }
}

@keyframes pulse-inner {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.2;
  }
}

/* Compact controls within linear view */
#linear-view .lv-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

#linear-view .lv-big-btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  transition: filter var(--transition-fast);
}

#linear-view .lv-big-btn:hover {
  filter: brightness(0.95);
}

#linear-view select {
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  background: #0f0f0f;
  color: var(--fg);
  outline: none;
  transition: border-color var(--transition-fast);
}

#linear-view select:focus {
  border-color: #888;
}

#linear-view .lv-weight-input {
  width: 4.25rem;
  min-width: 3.75rem;
  padding: 0.3rem 0.4rem;
  margin-top: 0.25rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: #0f0f0f;
  color: var(--fg);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#linear-view .lv-weight-input:focus {
  border-color: #888;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* Mini delete button */
.lv-mini-del {
  color: #f04c4c;
  font-size: 0.65rem;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: filter var(--transition-fast);
}

.lv-mini-del:hover {
  filter: brightness(1.05);
}

/* ── map-controls.css ── */
/* ═══════════════════════════════════════════════════════════════════
   Map controls bar — mobile-first.

   Mobile (base):
     - Bar sits low-left as a compact pill; only the filter button is
       visible inline, the rest of the controls hide.
     - Search lives in the header as a dedicated round button that
       reveals a slide-down input bar.
     - The filter dropdown is a full-width bottom sheet.

   Desktop (≥768px):
     - Bar sits low-left with labels visible, dividers between groups,
       and an inline search input popping above its button.
     - The header search button + slide-down bar are hidden.
     - The filter dropdown is an absolutely-positioned popover above
       its trigger button.

   Breakpoint: only one — @media (min-width: 768px).
   ═══════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────
   Controls bar (mobile base values)
   ──────────────────────────────────────────────────────────── */
.map-controls-bar {
  position: fixed;
  bottom: 40px;
  left: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 8px;
  padding: 8px;
  background: #1e293bf2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid #7297F045;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.control-group {
  display: flex;
  align-items: center;
}

/* Each control = button column with a label underneath. Label is
   hidden on mobile (icon-only), shown on desktop. */
.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 32px;
  position: relative;
}

/* Hidden on mobile (icon-only bar); shown on desktop. */
.control-label {
  display: none;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  white-space: nowrap;
  align-items: center;
  gap: 3px;
}
.control-label svg {
  width: 8px;
  height: 8px;
  opacity: 0.6;
}

/* Map Control Buttons */
.map-control-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 0;
}
.map-control-btn:hover { background: rgba(255, 255, 255, 0.1); }
.map-control-btn svg   { width: 18px; height: 18px; stroke-width: 2; }

/* The in-bar search group lives only on desktop; mobile relocates
   search to the header (.header-search-btn / .header-search-container). */
.map-controls-bar > .search-group { display: none; }

/* ────────────────────────────────────────────────────────────
   Filter dropdown — base = mobile bottom sheet.
   Desktop swaps to an absolutely-positioned popover.
   ──────────────────────────────────────────────────────────── */
.dropdown-parent { position: relative; }

.map-filter-dropdown {
  position: fixed;
  bottom: -45px;
  left: -15px;
  right: 0;
  top: auto;
  width: 102vw;
  padding: 0;
  border: none;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  z-index: 1100;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  display: block !important;
  pointer-events: none;
}
.map-filter-dropdown:not(.hidden) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
/* .map-filter-dropdown.hidden {  still opacity 0 + pointer-events none above } */

.map-filter-dropdown::after { display: none; }

.filter-dropdown-content {
  padding: 14px 0;
}

.filter-panel-section {
  padding: 0 14px;
  margin-bottom: 16px;
}

.filter-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

/* IMPORTANT — scoped under .map-filter-dropdown.
   An older component (line ~2334) declares the same `.mt-filter-options`
   and `.mt-filter-option` selectors with `position: absolute`, white
   background, max-height, border-bottom, etc. Without this scoping,
   the cascade leaks those positioning rules into the map's filter
   dropdown — each panel section's options list detaches and overlaps
   the next section header + the Clear Filters button. */
.map-filter-dropdown .mt-filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* explicit resets to undo the rules from the other component */
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 0;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.map-filter-dropdown .mt-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  /* reset the other component's padding + bottom-border */
  padding: 0;
  border-bottom: none;
  transition: none;
}
.map-filter-dropdown .mt-filter-option:last-child { border-bottom: none; }
.map-filter-dropdown .mt-filter-option:hover { color: #2563eb; background: transparent; }
.map-filter-dropdown .mt-filter-option input[type="checkbox"] { display: none; }

.fb-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 3px;
  position: relative;
  background: #fff;
}
.map-filter-dropdown .mt-filter-option input[type="checkbox"]:checked + .fb-checkbox {
  background: #2563eb;
  border-color: #2563eb;
}
.map-filter-dropdown .mt-filter-option input[type="checkbox"]:checked + .fb-checkbox::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.filter-dropdown-footer {
  padding: 10px 14px 0;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
}

.clear-filters-btn {
  width: 100%;
  padding: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.clear-filters-btn:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

/* ────────────────────────────────────────────────────────────
   Search input popup (desktop-only — relevant when the in-bar
   search group is visible). On mobile, this container is unused
   because search is in the header instead.
   ──────────────────────────────────────────────────────────── */
.search-input-container {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  right: auto;
  width: 260px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 8px;
  z-index: 1001;
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  opacity: 0;
  visibility: hidden;
}
.search-input-container.active {
  opacity: 1;
  visibility: visible;
}

.search-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  width: 100%;
  outline: none;
}

.search-result-count {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  text-align: right;
}
.search-result-count:empty { display: none; }

.map-control-btn.active {
  color: #60a5fa;
}

/* ────────────────────────────────────────────────────────────
   Header search (mobile-only — desktop hides both pieces)
   ──────────────────────────────────────────────────────────── */
.header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}
.header-search-btn:hover { background: rgba(255, 255, 255, 0.12); }
.header-search-btn svg    { width: 20px; height: 20px; }

/* Container is fixed below the header, hidden until JS adds .active. */
.header-search-container {
  position: fixed;
  top: calc(var(--header-height, 60px) + 4px);
  left: 8px;
  right: 8px;
  z-index: 1050;
  display: none;
}
.header-search-container.active { display: flex; }

.header-search-container .search-input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.header-search-container .search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.header-search-container .search-result-count {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP+ (≥768px)
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  /* Controls bar restored to its desktop resting size and position. */
  .map-controls-bar {
    bottom: 24px;
    left: 24px;
    padding: 6px 10px;
    border-radius: 10px;
    justify-content: flex-start;
  }

  /* Labels return underneath each control button. */
  .control-label { display: flex; }

  /* Larger tap targets on desktop = larger min-width. */
  .control-item { min-width: 44px; }

  /* In-bar search returns. */
  .map-controls-bar > .search-group { display: flex; }

  /* Filter dropdown switches from bottom sheet to popover above the
     filter button — see comments on left:0 in the original file. */
  .map-filter-dropdown {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 0;
    right: auto;
    top: auto;
    width: 240px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: none;
    opacity: 1;
    transition: none;
    pointer-events: auto;
    display: block !important;
  }
  .map-filter-dropdown.hidden { display: none !important; }
  .map-filter-dropdown::after {
    content: "";
    display: block;
    position: absolute;
    top: 100%;
    left: 14px;
    border-width: 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
  }

  /* Header search is mobile-only — both pieces hidden on desktop.   */
  .header-search-btn       { display: none; }
  .header-search-container { display: none; }
}
/* === styles/layouts/editor-header.css === */
/* Editor Header - Based on Organizer Header but fixed for Map View */


/* Shared avatar img/fallback inside the header avatar button.
   Apply on every page (.header-avatar-btn) — JS toggles the .hidden class
   on 


.header-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}


/* User Menu Panel Adjustment for this header */
/* No overrides needed, using shared 


/* ── Mobile Responsive ── */
/* (mobile .editor-header/.editor-badge tweaks live in bundle.css — no dup here) */
/* === styles/components/popup-menu.css === */
/* Popup Menu Component */


.menu-popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 24, 60, 0.12);
  min-width: 220px;
  z-index: 1000;
  border: 1px solid #e4e4e7;
  box-sizing: border-box;
  overflow: hidden;
}


.menu-popup.hidden {
  display: none !important;
}
/* === styles/components/confirm-dialog.css === */
/* Confirm Dialog Component - Reusable confirmation dialog */


@keyframes confirmDialogSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* Variants for different types */


/* === styles/components/tooltip.css === */
/* Hover Tooltip Component - Reusable tooltip for buttons and icons */


.tooltip-content {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10000;

  /* Shadow for depth */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Show tooltip on hover */


/* Position variants */


/* Arrow indicators (optional small triangles) */


/* ── Generate PDF dialog ─────────────────────────────────────────── */
.gpdf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 17, 0.66);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gpdf-card {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--panel, #111);
  color: var(--fg, #fff);
  border: 1px solid var(--greys-1, #3d3d40);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.gpdf-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.gpdf-count {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted, #9aa);
}

.gpdf-section {
  margin-bottom: 16px;
}

.gpdf-section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #9aa);
  margin-bottom: 8px;
}

.gpdf-radio,
.gpdf-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.35;
  cursor: pointer;
}

.gpdf-radio:hover,
.gpdf-check:hover {
  background: var(--greys-0, #1a1a1d);
}

.gpdf-radio input,
.gpdf-check input {
  margin-top: 2px;
  accent-color: var(--brand, #2a9df4);
  flex: 0 0 auto;
}

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

.gpdf-btn {
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid var(--greys-1, #3d3d40);
  background: transparent;
  color: var(--fg, #fff);
  font-size: 14px;
  cursor: pointer;
}

.gpdf-btn:hover {
  background: var(--greys-0, #1a1a1d);
}

.gpdf-confirm {
  background: var(--brand, #2a9df4);
  border-color: var(--brand, #2a9df4);
  font-weight: 600;
}

.gpdf-confirm:hover {
  filter: brightness(1.08);
}

/* Controls that don't apply to the current selection (layout/solutions when
   no quiz is selected) are greyed out and non-interactive. */
.gpdf-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.gpdf-note {
  margin: 8px 0 0;
  font-size: 12px;
  font-style: italic;
  color: var(--muted, #9aa);
}

/* ═══════════════════════════════════════════════════════════════════
   MAP SIDEBAR — left panel with node tree, search, filter tabs.
   Mobile: off-screen drawer (translateX). Desktop: inline column.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Layout ── */
.mp-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  margin-top: var(--header-height, 60px);
}

/* ── Sidebar variables ── */
:root {
  --mp-sidebar-bg:      #11151f;
  --mp-sidebar-border:  #222840;
  --mp-tree-hover:      #1a2035;
  --mp-tree-selected:   #1e2a50;
  --mp-tree-active:     #3850b0;
  --mp-text-primary:    #e5e7eb;
  --mp-text-secondary:  #9ba1b0;
  --mp-text-muted:      #5c6270;
  --mp-accent:          var(--accent);
  --mp-accent-light:    #1e2850;
  --mp-input-bg:        #0d111a;
}

/* ── Sidebar (mobile: off-screen drawer) ── */
.mp-sidebar {
  position: fixed;
  top: var(--header-height, 56px);
  left: 0;
  bottom: 0;
  width: min(86vw, 340px);
  max-width: 86vw;
  z-index: 80;
  background: var(--mp-sidebar-bg);
  border-right: 1px solid var(--mp-sidebar-border);
  display: flex;
  flex-direction: column;
  overflow: visible;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}
.mp-sidebar.is-open { transform: translateX(0); }

/* ── Drawer toggle (paper-marker chevron on right edge) ── */
.mp-drawer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: -34px;
  top: 18px;
  width: 34px;
  height: 58px;
  border: 1px solid var(--mp-sidebar-border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: var(--mp-sidebar-bg);
  color: var(--mp-text-secondary);
  cursor: pointer;
  box-shadow: 4px 2px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, box-shadow 0.15s;
  z-index: 1;
}
.mp-drawer-toggle:hover { background: var(--mp-tree-hover); color: var(--mp-text-primary); }
.mp-drawer-toggle:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 2px; }
.mp-drawer-toggle svg {
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}
.mp-sidebar.is-open .mp-drawer-toggle svg { transform: rotate(180deg); }

/* ── Sidebar head (search + filter tabs, sticky) ── */
.mp-sidebar-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--mp-sidebar-bg);
  flex-shrink: 0;
}

/* ── Sidebar search ── */
.mp-sidebar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--mp-sidebar-border);
}
.mp-sidebar-search-icon { color: var(--mp-text-muted); flex-shrink: 0; }
.mp-sidebar-search-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--mp-sidebar-border);
  border-radius: 5px;
  background: var(--mp-input-bg);
  color: var(--mp-text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.mp-sidebar-search-input:focus { border-color: var(--mp-accent); }
.mp-sidebar-search-input::-webkit-search-cancel-button { cursor: pointer; }

/* ── Tree filter tabs ── */
.mp-tree-filter {
  display: flex;
  gap: 2px;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--mp-sidebar-border);
  flex-shrink: 0;
}
.mp-filter-tab {
  flex: 1;
  padding: 3px 6px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mp-text-muted);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mp-filter-tab:hover {
  background: var(--mp-tree-hover);
  color: var(--mp-text-secondary);
}
.mp-filter-tab.active {
  background: var(--mp-accent);
  color: #fff;
  border-color: var(--mp-accent);
}

/* ── Search highlight mark ── */
.mp-tree-name mark.mp-search-hit {
  background: #fff3a8;
  color: #111;
  padding: 0 1px;
  border-radius: 2px;
}

/* ── Items hidden by search filter ── */
.mp-tree-item.mp-search-hide,
.mp-tree-children.mp-search-hide,
.mp-folder-files.mp-search-hide { display: none !important; }

/* ── Mobile chrome controls ── */
.mp-layout .mob-only { display: inline-flex; }

/* ── Backdrop for mobile drawer ── */
.mp-mob-backdrop {
  position: fixed;
  top: var(--header-height, 56px);
  left: 0; right: 0; bottom: 0;
  background: rgba(5, 8, 16, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 75;
}
.mp-mob-backdrop:not([hidden]) { opacity: 1; pointer-events: auto; }

/* ── Tree ── */
.mp-tree { padding: 4px 0; overflow-y: auto; flex: 1 1 auto; }
.mp-tree-loading {
  padding: 24px;
  text-align: center;
  color: var(--mp-text-muted);
  font-size: 13px;
}

.mp-tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 8px 9px calc(8px + var(--tree-depth, 0) * 16px);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mp-text-secondary);
  border: 1px solid transparent;
  border-radius: 4px;
  margin: 2px 4px;
  min-height: 36px;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.mp-tree-item:hover { background: var(--mp-tree-hover); }
.mp-tree-item:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: -2px; }
.mp-tree-item.selected {
  background: var(--mp-tree-selected);
  border-color: var(--mp-accent);
  color: var(--mp-text-primary);
  font-weight: 500;
}
.mp-tree-item.selected .mp-tree-name { color: #93b4f5; }

.mp-tree-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mp-text-muted);
  transition: transform 0.15s;
  visibility: hidden;
}
.mp-tree-item.is-folder > .mp-tree-chevron { visibility: visible; }
.mp-tree-item.is-folder.open > .mp-tree-chevron { transform: rotate(90deg); }
/* ── Tree icons row (type, owner, visibility) ── */
.mp-tree-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.mp-tree-type-icon,
.mp-tree-owner-icon,
.mp-tree-vis-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1;
}
.mp-tree-type-icon {
  color: #fff;
  font-weight: 700;
}
.mp-tree-type-icon.icon-theory  { background: #22c55e; font-size: 11px; }
.mp-tree-type-icon.icon-quiz    { background: #14b8a6; font-size: 11px; }
.mp-tree-type-icon.icon-pitfall { background: #f59e0b; font-size: 11px; }
.mp-tree-type-icon.icon-group   { background: #ef4444; }
.mp-tree-owner-icon {
  background: #1e2a40;
  font-size: 11px;
}
.mp-tree-vis-icon {
  font-size: 10px;
}
.mp-tree-vis-icon.vis-public  { color: #6ee7b7; }
.mp-tree-vis-icon.vis-private { color: #fca5a5; }
.mp-tree-type-icon.folder-icon { color: #dcb64a; }

.mp-tree-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Folder tabs ── */
.mp-folder-files { padding: 2px 0; }
/* ── Dependency items ── */
.mp-tree-item.is-dep { opacity: 0.85; }
.mp-tree-item.is-dep .mp-tree-name { font-style: italic; }
.mp-tree-empty {
  padding: 16px 8px 16px calc(8px + var(--tree-depth-offset, 1) * 16px);
  color: var(--mp-text-muted);
  font-size: 12px;
  font-style: italic;
}

/* ── Review badge (right side of tree item) ── */
.mp-tree-review {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #78350f;
  color: #fcd34d;
}
.mp-tree-review:empty { display: none; }

/* ── Canvas wrap ── */
#canvas-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: auto;
  position: relative;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   TABLET+ (≥768px) — sidebar inline, hide mobile chrome
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .mp-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .mp-sidebar {
    position: static;
    top: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    z-index: auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: none;
    transition: none;
    box-shadow: none;
    border-right: 1px solid var(--mp-sidebar-border);
  }

  /* Tighter tree rows for desktop */
  .mp-tree-item {
    padding: 5px 8px 5px calc(8px + var(--tree-depth, 0) * 16px);
    font-size: 13px;
    margin: 1px 4px;
    min-height: 0;
  }

  /* Hide mobile-only chrome */
  .mp-layout .mob-only,
  .mp-drawer-toggle { display: none; }
  .mp-mob-backdrop  { display: none !important; }
}

