/* ═══════════════════════════════════════════════════════════════
   VOID CANVAS — standalone stylesheet for void.iked33.com
   Base reset + the full .nc-* / .ncfm-* block lifted from Mission
   Control 2026-04-19. Page itself is a full-bleed dark canvas; the
   Neon Canvas overlay IS the page.
   ═══════════════════════════════════════════════════════════════ */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  color: #e0e6ff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  overflow: hidden;
  /* NOTE (per feedback_css_filter_on_body): do NOT add `filter`, `transform`,
     `backdrop-filter`, or `perspective` on <body>. They break every
     `position: fixed` element in the canvas toolbar. */
}

* { box-sizing: border-box; }

/* Pre-boot splash (visible for ~100ms before openNeonCanvas() runs) */
.void-boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: rgba(168, 85, 247, 0.9);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   NEON INFINITE CANVAS — Drawing Board
   ═══════════════════════════════════════════════════════════ */
#neonCanvasOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  flex-direction: column;
  background: #08090f;
  /* Prevents the browser from hijacking our touches (pinch-zoom,
     pull-to-refresh, double-tap zoom) which can otherwise leave the page
     slightly zoomed and cause touch coords to drift from finger position. */
  touch-action: none;
  overscroll-behavior: contain;
  /* Stop iOS Safari from intercepting long-press with its native text/image
     callout (copy, lookup, share…). Without this our own long-press-to-open-
     context-menu gesture never fires. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#neonDrawCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Void Lumens sprite overlay — ambient glowing critters drift here.
   Sits just above the strokes canvas but below all UI chrome. Pointer
   events are disabled so drawing / toolbar clicks pass through to the
   layers that want them. */
.nc-sprite-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  /* Subtle mix-blend so the lumens feel painted onto the void rather
     than stuck as an opaque overlay. screen keeps whites white and
     blends the neon halos softly with whatever's behind them. */
  mix-blend-mode: screen;
}
/* Toolbar */
.nc-toolbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(12, 14, 30, 0.92);
  border: 1px solid rgba(100, 110, 200, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  z-index: 100000;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 40px rgba(168,85,247,0.08);
  max-width: calc(100vw - 24px);
}
.nc-tool-group { display: flex; align-items: center; gap: 5px; }
.nc-tool-group + .nc-tool-group {
  border-left: 1px solid rgba(100, 110, 200, 0.15);
  padding-left: 12px;
}
.nc-color-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  /* Kill iOS's 300ms click delay + double-tap-to-zoom swallowing the
     first tap — without this, iPad needs 3 taps to register a double-tap
     instead of 2. Applies to every touchable control. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nc-color-btn:hover { transform: scale(1.2); }
.nc-color-btn.active {
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 12px currentColor;
}
.nc-tool-btn, .nc-action-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(100, 110, 200, 0.2);
  color: #a0a8d0;
  font-size: 14px;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nc-tool-btn:hover, .nc-action-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nc-tool-btn.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #c084fc;
  box-shadow: 0 0 8px rgba(168,85,247,0.3);
}
.nc-close-btn {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  font-size: 16px;
  font-weight: 700;
}
.nc-close-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  box-shadow: 0 0 12px rgba(239,68,68,0.3) !important;
}
.nc-fill-btn.active {
  background: rgba(168, 85, 247, 0.25) !important;
  border-color: rgba(168, 85, 247, 0.7) !important;
  color: #e0b0ff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35) !important;
}

.nc-size-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #606890;
}
.nc-size-slider {
  width: 70px;
  accent-color: #a855f7;
  cursor: pointer;
  touch-action: manipulation;
}
.nc-size-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #a0a8d0;
  min-width: 18px;
  text-align: center;
}

.nc-zoom-badge {
  position: fixed;
  bottom: 16px;
  right: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(160, 168, 208, 0.5);
  z-index: 100000;
  pointer-events: none;
}
.nc-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(160, 168, 208, 0.4);
  z-index: 100000;
  pointer-events: none;
  transition: opacity 1s;
}
.nc-mode-badge {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(160, 168, 208, 0.7);
  background: rgba(12, 14, 30, 0.8);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(100, 110, 200, 0.15);
  z-index: 100000;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.5s;
}
.nc-mode-btn { font-size: 16px !important; }

/* Shape pivot + flyout — one button in the toolbar expands to a
   horizontal row of 4 shapes when tapped. Keeps the mobile toolbar
   compact (was 4 buttons side-by-side, now 1 + popover). */
.nc-shape-wrap {
  position: relative;
  display: inline-flex;
}
/* Dropdown indicator — tiny glowing chevron in the bottom-right corner
   of any pivot button so it reads as "this opens a menu" instead of
   looking like a plain tool button. The ::before on the button itself
   keeps the existing sticky-pin indicator (::after) untouched. */
.nc-shape-pivot::before,
.nc-action-pivot::before {
  content: '▾';
  position: absolute;
  bottom: -1px;
  right: 2px;
  font-size: 8px;
  line-height: 1;
  color: rgba(168, 85, 247, 0.95);
  text-shadow: 0 0 4px rgba(168, 85, 247, 0.9), 0 0 6px rgba(168, 85, 247, 0.5);
  pointer-events: none;
  transition: transform 0.15s ease, color 0.15s ease;
}
.nc-action-pivot::before {
  color: rgba(0, 212, 255, 0.95);
  text-shadow: 0 0 4px rgba(0, 212, 255, 0.9), 0 0 6px rgba(0, 212, 255, 0.45);
}
/* When flyout is open, flip the chevron up so it reads as "tap to close" */
.nc-shape-wrap:has(.nc-shape-flyout-open) .nc-shape-pivot::before,
.nc-action-wrap:has(.nc-action-flyout-open) .nc-action-pivot::before {
  transform: rotate(180deg);
}
.nc-shape-flyout {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.88);
  display: flex;
  flex-direction: row;
  gap: 6px;
  padding: 7px;
  background: rgba(10, 12, 22, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 24px rgba(168, 85, 247, 0.22);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100005;
  white-space: nowrap;
}
.nc-shape-flyout.nc-shape-flyout-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}
/* Little notch pointing up to the pivot button */
.nc-shape-flyout::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(10, 12, 22, 0.96);
  border-top: 1px solid rgba(168, 85, 247, 0.4);
  border-left: 1px solid rgba(168, 85, 247, 0.4);
}

/* Actions pivot + flyout — same popover pattern as shapes, sits on the
   right side of the toolbar (save, open, menu, recenter, clear). */
.nc-action-wrap {
  position: relative;
  display: inline-flex;
}
.nc-action-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  transform: translateX(0) scale(0.88);
  transform-origin: top right;
  display: flex;
  flex-direction: row;
  gap: 6px;
  padding: 7px;
  background: rgba(10, 12, 22, 0.96);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 212, 255, 0.18);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100005;
  white-space: nowrap;
}
.nc-action-flyout.nc-action-flyout-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}
/* Notch aligned with the pivot button's center (pivot is on the right) */
.nc-action-flyout::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 12px;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(10, 12, 22, 0.96);
  border-top: 1px solid rgba(0, 212, 255, 0.4);
  border-left: 1px solid rgba(0, 212, 255, 0.4);
}
/* Keep the flyout inside the viewport on narrow screens — if the flyout
   would run off the right edge of the page we let the toolbar itself
   scroll horizontally. Pragmatic fallback since the toolbar wraps on phone. */
@media (max-width: 700px) {
  .nc-action-flyout { right: auto; left: 50%; transform: translateX(-50%) scale(0.88); transform-origin: top center; }
  .nc-action-flyout.nc-action-flyout-open { transform: translateX(-50%) scale(1); }
  .nc-action-flyout::before { right: auto; left: 50%; transform: translateX(-50%) rotate(45deg); }
}

/* Sticky-tool indicator: tiny glowing pin dot on the top-right of any
   tool button that stays armed after placing a stroke (pen/eraser/line
   by default; double-click any tool to flip). */
.nc-tool-btn.nc-tool-sticky {
  position: relative;
}
.nc-tool-btn.nc-tool-sticky::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff1493;
  box-shadow: 0 0 6px #ff1493, 0 0 10px rgba(255, 20, 147, 0.55);
  pointer-events: none;
  animation: nc-sticky-pulse 1.6s ease-in-out infinite;
}
@keyframes nc-sticky-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* First-run coach — a lightweight 3-step overlay shown once per browser
   to teach new users the basics (draw / pinch / publish). Dismissible. */
.nc-coach {
  position: fixed;
  inset: 0;
  z-index: 100040;
  background: radial-gradient(ellipse at center, rgba(8, 9, 15, 0.92) 0%, rgba(0, 0, 0, 0.96) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(2px);
}
.nc-coach.nc-coach-show { opacity: 1; }
.nc-coach-card {
  max-width: 420px;
  width: 100%;
  background: rgba(12, 14, 30, 0.88);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 14px;
  padding: 28px 26px 22px;
  box-shadow: 0 0 42px rgba(168, 85, 247, 0.25), 0 0 80px rgba(0, 212, 255, 0.1);
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}
.nc-coach-eyebrow {
  font-size: 10px;
  letter-spacing: 5px;
  color: rgba(168, 85, 247, 0.85);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.nc-coach-title {
  font-size: 22px;
  letter-spacing: 2px;
  color: #e0e6ff;
  margin: 0 0 8px;
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.55);
}
.nc-coach-body {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(220, 228, 255, 0.82);
  margin-bottom: 18px;
}
.nc-coach-steps {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}
.nc-coach-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(168, 85, 247, 0.25);
  transition: background 0.2s, transform 0.2s;
}
.nc-coach-dot.nc-coach-dot-active {
  background: #ff1493;
  box-shadow: 0 0 10px #ff1493;
  transform: scale(1.3);
}
.nc-coach-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.nc-coach-btn {
  appearance: none;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: #e0e6ff;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2.5px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.nc-coach-btn:hover {
  background: rgba(168, 85, 247, 0.28);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}
.nc-coach-btn:active { transform: scale(0.97); }
.nc-coach-btn.nc-coach-skip {
  background: transparent;
  border-color: rgba(160, 168, 208, 0.3);
  color: rgba(200, 208, 248, 0.7);
}
.nc-coach-btn.nc-coach-primary {
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.3), rgba(168, 85, 247, 0.3));
  border-color: rgba(255, 20, 147, 0.7);
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 20, 147, 0.6);
}

/* Progress HUD — small ring in the bottom-right showing stroke progress
   toward the next unlock. Non-interactive, fades out when the canvas
   is empty. */
.nc-progress-hud {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.nc-progress-hud.nc-progress-show { opacity: 0.75; }
.nc-progress-hud svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}
.nc-progress-track {
  fill: none;
  stroke: rgba(100, 110, 200, 0.2);
  stroke-width: 3;
}
.nc-progress-bar {
  fill: none;
  stroke: #00d4ff;
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.6));
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s;
}
.nc-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #e0e6ff;
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
  letter-spacing: 0.5px;
}
@media (max-width: 700px) {
  .nc-progress-hud { width: 38px; height: 38px; bottom: 10px; right: 10px; }
  .nc-progress-label { font-size: 9px; }
}

@media (min-width: 701px) and (max-width: 1100px) and (pointer: coarse) {
  .nc-toolbar { top: 12px; gap: 10px; padding: 10px 18px; }
  .nc-color-btn { width: 28px; height: 28px; }
  .nc-tool-btn, .nc-action-btn { width: 40px; height: 40px; font-size: 17px; border-radius: 10px; }
  /* Keep hint visible on tablets — it's small and helpful */
  .nc-hint { font-size: 11px; }
}
@media (max-width: 700px) {
  .nc-toolbar {
    top: 10px; gap: 6px; padding: 6px 10px;
    max-width: 96vw; flex-wrap: wrap; justify-content: center;
  }
  .nc-color-btn { width: 24px; height: 24px; }
  .nc-tool-btn, .nc-action-btn { width: 38px; height: 38px; font-size: 16px; }
  .nc-size { display: flex; align-items: center; gap: 4px; }
  .nc-size-label { display: none; }
  .nc-size-slider { width: 64px; }
  .nc-size-val { font-size: 10px; min-width: 14px; }
  /* Mobile: keep hint visible + legible; it fades via JS after a few seconds */
  .nc-hint {
    font-size: 11px;
    bottom: 10px;
    color: rgba(200, 208, 248, 0.85);
    background: rgba(12, 14, 30, 0.72);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(100, 110, 200, 0.2);
    max-width: 90vw;
    text-align: center;
  }
  /* Bump mode badge up so it doesn't collide with the new hint chip */
  .nc-mode-badge { bottom: 44px; }
}

.nc-file-indicator {
  position: fixed;
  bottom: 16px; left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: rgba(200, 208, 248, 0.9);
  background: rgba(12, 14, 30, 0.82);
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(100, 110, 200, 0.22);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.08);
  z-index: 100000;
  pointer-events: none;
  display: none;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .nc-file-indicator { max-width: 180px; font-size: 11px; padding: 6px 10px; }
}

.nc-text-editor {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  background: rgba(8, 10, 22, 0.88);
  border: 2px solid rgba(0, 212, 255, 0.55);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 320px;
  max-width: min(80vw, 720px);
  min-height: 120px;
  max-height: 70vh;
  line-height: 1.35;
  resize: both;
  outline: none;
  z-index: 100002;
  overflow: auto;
  transform: translate(0, 0);
  caret-color: currentColor;
}
.nc-text-editor::placeholder {
  color: rgba(160, 168, 208, 0.38);
  font-size: 11px;
  font-weight: 400;
}
@media (max-width: 700px) {
  .nc-text-editor {
    min-width: 240px; max-width: 90vw; min-height: 100px; padding: 8px 12px;
  }
}

/* ── "Fill the Void" landing screen ── */
.nc-landing {
  position: absolute;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000 !important;
  background-image: none !important;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: auto;
}
.nc-landing.nc-landing-show { opacity: 1; }
.nc-landing.nc-landing-hide { opacity: 0; }
.nc-landing-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
  background: #000000;
}
.nc-landing-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: calc(100% - 48px);
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #e0e6ff;
  padding: 24px;
}
.nc-landing-eyebrow {
  font-size: 11px;
  letter-spacing: 6px;
  color: #a855f7;
  margin-bottom: 18px;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
  text-transform: uppercase;
}
.nc-landing-title {
  margin: 0 0 18px 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.7),
    0 0 24px rgba(0, 212, 255, 0.6),
    0 0 48px rgba(0, 212, 255, 0.35);
}
.nc-landing-title .nc-landing-void {
  color: #00d4ff;
  text-shadow:
    0 0 10px rgba(0, 212, 255, 0.95),
    0 0 28px rgba(0, 212, 255, 0.7),
    0 0 56px rgba(168, 85, 247, 0.45);
}
.nc-landing-flavor {
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.7;
  color: #c8cce8;
  margin: 0 auto 32px auto;
  max-width: 520px;
  letter-spacing: 0.3px;
}
.nc-landing-accent {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}
.nc-landing-btn {
  position: relative;
  background: linear-gradient(135deg,
    rgba(255, 20, 147, 0.12) 0%,
    rgba(168, 85, 247, 0.12) 55%,
    rgba(0, 212, 255, 0.12) 100%);
  border: 1px solid rgba(255, 20, 147, 0.55);
  color: #ff79d1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 5px;
  padding: 16px 44px;
  border-radius: 14px;
  cursor: pointer;
  text-shadow:
    0 0 8px rgba(255, 20, 147, 0.85),
    0 0 22px rgba(168, 85, 247, 0.45);
  box-shadow:
    inset 0 0 18px rgba(255, 20, 147, 0.12),
    0 0 0 0 rgba(255, 20, 147, 0.5),
    0 0 32px rgba(168, 85, 247, 0.22),
    0 0 64px rgba(255, 20, 147, 0.12);
  transition: transform 0.22s ease, box-shadow 0.4s ease, color 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
  animation: nc-landing-btn-pulse 2.6s ease-in-out infinite;
}
.nc-landing-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 70%);
  transform: translateX(-100%);
  animation: nc-landing-btn-sheen 3.6s ease-in-out infinite;
}
@keyframes nc-landing-btn-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 18px rgba(255, 20, 147, 0.12),
      0 0 0 0 rgba(255, 20, 147, 0.0),
      0 0 32px rgba(168, 85, 247, 0.22),
      0 0 64px rgba(255, 20, 147, 0.12);
  }
  50% {
    box-shadow:
      inset 0 0 22px rgba(255, 20, 147, 0.25),
      0 0 0 3px rgba(255, 20, 147, 0.12),
      0 0 48px rgba(168, 85, 247, 0.38),
      0 0 96px rgba(255, 20, 147, 0.22);
  }
}
@keyframes nc-landing-btn-sheen {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(110%); }
  100% { transform: translateX(110%); }
}
.nc-landing-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 20, 147, 0.95);
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    inset 0 0 26px rgba(255, 20, 147, 0.32),
    0 0 0 4px rgba(255, 20, 147, 0.22),
    0 0 72px rgba(168, 85, 247, 0.55),
    0 0 120px rgba(255, 20, 147, 0.32);
  animation-play-state: paused;
}
.nc-landing-btn:active { transform: translateY(0) scale(0.99); }
.nc-landing-recent { margin-top: 36px; }
.nc-landing-recent-label {
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(160, 168, 208, 0.6);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.nc-landing-recent-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.nc-landing-recent-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c8cce8;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.18s ease;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nc-landing-recent-chip:hover {
  background: rgba(168, 85, 247, 0.18);
  color: #ffffff;
  border-color: rgba(168, 85, 247, 0.8);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
}
.nc-landing-recent-muted {
  font-size: 11px;
  color: rgba(160, 168, 208, 0.5);
  font-style: italic;
}

/* Landing — Void Lumens counter. A small pill showing how many lumens
   the visitor has freed by drawing through them. Empty state shows a
   gentle hint instead, teaching the mechanic without a tutorial. */
.nc-landing-lumens {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 20, 147, 0.06);
  border: 1px solid rgba(255, 20, 147, 0.28);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #d8dcff;
  letter-spacing: 0.5px;
  box-shadow: 0 0 14px rgba(255, 20, 147, 0.12);
}
.nc-landing-lumens b {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 20, 147, 0.8);
}
.nc-landing-lumens-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff1493;
  box-shadow: 0 0 10px #ff1493, 0 0 20px rgba(255, 20, 147, 0.7);
  animation: nc-lumen-pulse 2.2s ease-in-out infinite;
}
@keyframes nc-lumen-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50%      { opacity: 1.0; transform: scale(1.15); }
}
@media (max-width: 700px) {
  .nc-landing-lumens { font-size: 10px; padding: 5px 11px; margin-top: 16px; }
}

.nc-landing-hint {
  margin-top: 28px;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(160, 168, 208, 0.45);
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .nc-landing-content { padding: 16px; }
  .nc-landing-eyebrow { letter-spacing: 4px; margin-bottom: 12px; }
  .nc-landing-title { letter-spacing: 2px; margin-bottom: 14px; }
  .nc-landing-flavor { margin-bottom: 24px; }
  .nc-landing-btn { padding: 12px 24px; letter-spacing: 3px; }
  .nc-landing-recent { margin-top: 24px; }
}

/* ── Big Canvas top banner (collapsible) ──
   Sits in the top-left corner on desktop / iPad so it never overlaps the
   right-side toolbar actions (save, undo, close). Tap to collapse to a
   single pulse dot; tap again to expand. Collapsed state persists. */
.nc-big-banner {
  position: fixed;
  top: 14px; left: 16px;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.55);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: #00d4ff;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.14);
  cursor: pointer;
  transition: padding 0.2s ease, gap 0.2s ease;
  animation: nc-big-banner-fadein 0.4s ease;
}
@keyframes nc-big-banner-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nc-big-banner-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.9);
  animation: nc-big-banner-pulse 1.8s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes nc-big-banner-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}
.nc-big-banner-label { font-weight: 700; }
.nc-big-banner-meta {
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(200, 204, 232, 0.7);
  text-shadow: none;
}
.nc-big-banner-chevron {
  font-size: 14px;
  line-height: 1;
  opacity: 0.5;
  margin-left: 4px;
  transition: opacity 0.15s;
}
.nc-big-banner:hover .nc-big-banner-chevron { opacity: 0.95; }

/* Collapsed: only the pulse dot remains visible. Tiny padding so the
   tap target stays finger-friendly. Visible position is still top-left
   but takes almost no space. */
.nc-big-banner.nc-big-banner-collapsed {
  gap: 0;
  padding: 8px;
}
.nc-big-banner.nc-big-banner-collapsed .nc-big-banner-label,
.nc-big-banner.nc-big-banner-collapsed .nc-big-banner-meta,
.nc-big-banner.nc-big-banner-collapsed .nc-big-banner-chevron {
  display: none;
}

/* Tablet / iPad-ish — keep the banner in the top-left, and default it
   to a more compact width. Still collapsible. */
@media (min-width: 701px) and (max-width: 1100px) and (pointer: coarse) {
  .nc-big-banner {
    top: 10px; left: 10px;
    padding: 6px 12px;
    font-size: 10px;
    letter-spacing: 1.5px;
  }
  .nc-big-banner-meta { display: none; }
}

@media (max-width: 700px) {
  .nc-big-banner {
    left: 8px; top: auto; bottom: 8px; right: auto;
    padding: 6px 12px;
    font-size: 10px;
    letter-spacing: 1.5px;
  }
  .nc-big-banner-meta { display: none; }
}

/* ── Save-before-exit modal ── */
.nc-save-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100005;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.nc-save-prompt {
  width: 100%;
  max-width: 480px;
  background: rgba(10, 12, 22, 0.98);
  border: 1px solid rgba(0, 212, 255, 0.45);
  border-radius: 14px;
  padding: 28px 28px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6),
              0 0 80px rgba(0, 212, 255, 0.18);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #e0e6ff;
}
.nc-save-prompt-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.55);
  margin-bottom: 10px;
}
.nc-save-prompt-sub {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(200, 204, 232, 0.75);
  margin-bottom: 18px;
}
.nc-save-prompt-name {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 20px;
}
.nc-save-prompt-name:focus {
  border-color: rgba(0, 212, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18);
}
.nc-save-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.nc-save-prompt-actions button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(100, 110, 200, 0.25);
  color: #c8cce8;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}
.nc-save-prompt-actions button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.nc-save-btn-discard {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
.nc-save-btn-discard:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ffffff !important;
  border-color: rgba(239, 68, 68, 0.8) !important;
}
.nc-save-btn-save {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(168, 85, 247, 0.12)) !important;
  border-color: rgba(0, 212, 255, 0.7) !important;
  color: #00d4ff !important;
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.15);
}
.nc-save-btn-save:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.28), rgba(168, 85, 247, 0.2)) !important;
  color: #ffffff !important;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.35);
}
.nc-save-btn-save:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ── Context menu ── */
.nc-ctx-menu {
  position: fixed;
  z-index: 100004;
  min-width: 200px;
  /* Keep menu inside the viewport even on narrow phones / small keyboards up.
     Used in concert with the JS clamp — CSS caps the size, JS picks the pos. */
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  background: rgba(10, 12, 22, 0.96);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 10px;
  padding: 6px;
  backdrop-filter: blur(14px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(0, 212, 255, 0.12);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #c8cce8;
  user-select: none;
}
.nc-ctx-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
/* Touch devices — beef up tap targets to Apple's 44pt minimum */
@media (pointer: coarse), (max-width: 700px) {
  .nc-ctx-menu { min-width: 240px; padding: 8px; }
  .nc-ctx-item {
    padding: 12px 12px;
    font-size: 14px;
    min-height: 44px;
    grid-template-columns: 26px 1fr auto;
  }
  .nc-ctx-icon { font-size: 16px !important; }
  .nc-ctx-kbd { display: none; }  /* no shortcuts on touch anyway */
}
.nc-ctx-item:hover {
  background: rgba(0, 212, 255, 0.12);
  color: #ffffff;
}
.nc-ctx-item.disabled {
  color: rgba(160, 168, 208, 0.3);
  cursor: not-allowed;
}
.nc-ctx-item.disabled:hover { background: transparent; color: rgba(160, 168, 208, 0.3); }
.nc-ctx-icon { font-size: 14px; text-align: center; color: #00d4ff; }
.nc-ctx-item.disabled .nc-ctx-icon { color: rgba(0, 212, 255, 0.3); }
.nc-ctx-kbd {
  font-size: 10px;
  color: rgba(160, 168, 208, 0.55);
  letter-spacing: 0.5px;
}
.nc-ctx-sep {
  height: 1px;
  background: rgba(100, 110, 200, 0.15);
  margin: 4px 8px;
}

/* ── Toast ── */
/* Anchored to the bottom on every platform. Previously desktop had it
   at top:56px, directly on top of the shape/actions flyout — when you
   pinned a tool the "Pinned · ..." hint would sit on the very buttons
   you were trying to see. Bottom-center is clear of every toolbar
   element (toolbar is at top) and easier to ignore while working. */
.nc-toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #e0e6ff;
  background: rgba(8, 10, 22, 0.92);
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.25);
  z-index: 100005;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 88vw;
  text-align: center;
}
.nc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Touch devices have the hint + mode badge at the bottom, so bump the
   toast up a bit to sit above them without overlap. */
@media (pointer: coarse) {
  .nc-toast {
    bottom: 84px;
    font-size: 12px;
    padding: 9px 16px;
  }
}
@media (max-width: 700px) {
  .nc-toast {
    bottom: 78px;
    font-size: 11px;
    padding: 8px 14px;
  }
}

/* ═══════════════════════════════════════════════════════════
   NEON CANVAS — File Manager Modal
   ═══════════════════════════════════════════════════════════ */
#ncFileManager {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100010;
  padding: 24px;
  box-sizing: border-box;
}
.ncfm-panel {
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  background: linear-gradient(180deg, #0c1022 0%, #080a16 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.12), 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e0e6ff;
  font-family: 'Inter', system-ui, sans-serif;
}
.ncfm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(100, 110, 200, 0.18);
}
.ncfm-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}
.ncfm-close {
  background: transparent;
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff8080;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.ncfm-close:hover {
  background: rgba(255, 80, 80, 0.15);
  border-color: rgba(255, 100, 100, 0.6);
  color: #ffa0a0;
}
.ncfm-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ncfm-dev-btn, .ncfm-help-btn {
  background: transparent;
  border: 1px solid rgba(100, 110, 200, 0.22);
  color: rgba(160, 168, 208, 0.5);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.ncfm-dev-btn:hover, .ncfm-help-btn:hover {
  background: rgba(100, 110, 200, 0.12);
  border-color: rgba(100, 110, 200, 0.5);
  color: #a0a8d0;
}
.ncfm-help-btn {
  /* Warmer cyan glow so kids notice it */
  border-color: rgba(0, 212, 255, 0.3);
  color: rgba(0, 212, 255, 0.75);
}
.ncfm-help-btn:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.6);
  color: #00d4ff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
}

/* How to Play panel — kid-friendly, scrollable */
.ncfm-howto {
  padding: 20px 24px 32px;
  overflow-y: auto;
  color: #c8cce8;
  font-family: 'Inter', system-ui, sans-serif;
}
.ncfm-howto-hero {
  text-align: center;
  padding: 8px 0 20px;
  border-bottom: 1px solid rgba(100, 110, 200, 0.15);
  margin-bottom: 16px;
}
.ncfm-howto-hero-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.6),
    0 0 22px rgba(0, 212, 255, 0.55),
    0 0 44px rgba(168, 85, 247, 0.35);
  margin-bottom: 8px;
}
.ncfm-howto-hero-sub {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 5px;
  color: rgba(168, 85, 247, 0.9);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}
.ncfm-howto h3 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 17px;
  font-weight: 700;
  color: #00d4ff;
  margin: 22px 0 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
}
.ncfm-howto h3:first-of-type { margin-top: 4px; }
.ncfm-howto p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 10px;
}
.ncfm-howto b { color: #e0e6ff; }
.ncfm-howto-tool {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(100, 110, 200, 0.08);
}
.ncfm-howto-tool:last-of-type { border-bottom: 0; }
.ncfm-howto-icon {
  font-size: 28px;
  text-align: center;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.3));
}
.ncfm-howto-label {
  font-size: 15px;
  font-weight: 700;
  color: #e8ecff;
  margin-bottom: 2px;
}
.ncfm-howto-desc {
  font-size: 13px;
  color: rgba(200, 208, 232, 0.8);
  line-height: 1.5;
}
.ncfm-howto-cta {
  margin-top: 28px;
  text-align: center;
}
.ncfm-howto-cta .ncfm-btn {
  flex: none;
  font-size: 14px;
  padding: 14px 24px;
  letter-spacing: 1px;
}
@media (max-width: 700px) {
  .ncfm-howto { padding: 16px 18px 28px; }
  .ncfm-howto h3 { font-size: 16px; margin: 20px 0 8px; }
  .ncfm-howto p { font-size: 14px; }
  .ncfm-howto-tool { grid-template-columns: 44px 1fr; gap: 12px; padding: 10px 0; }
  .ncfm-howto-icon { font-size: 24px; }
  .ncfm-howto-label { font-size: 14px; }
  .ncfm-howto-desc { font-size: 12px; }
}

/* PIN gate */
.ncfm-pin-wrap {
  padding: 48px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ncfm-pin-hint {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(160, 168, 208, 0.7);
  text-transform: uppercase;
}
.ncfm-pin-input {
  width: 180px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 28px;
  text-align: center;
  letter-spacing: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 10px;
  color: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ncfm-pin-input:focus {
  border-color: rgba(0, 212, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18);
}
.ncfm-pin-submit {
  min-width: 120px;
}
.ncfm-pin-err {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #ef4444;
  letter-spacing: 1px;
  min-height: 16px;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Dev settings panel */
.ncfm-devsettings {
  padding: 20px 24px 32px;
}
.ncfm-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(20, 26, 46, 0.4);
  border: 1px solid rgba(100, 110, 200, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ncfm-toggle-row:hover {
  border-color: rgba(0, 212, 255, 0.3);
}
.ncfm-toggle-text { flex: 1; min-width: 0; }
.ncfm-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: #e8ecff;
  margin-bottom: 6px;
}
.ncfm-toggle-sub {
  font-size: 11px;
  color: rgba(160, 168, 208, 0.65);
  line-height: 1.55;
}
.ncfm-toggle-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: #00d4ff;
  cursor: pointer;
}
.ncfm-actions-row {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(100, 110, 200, 0.12);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ncfm-btn {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c580ff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}
.ncfm-btn:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.7);
  color: #e0b0ff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}
.ncfm-collective-btn { flex: 1 1 260px; }
.ncfm-new-btn {
  flex: 0 0 auto;
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.45);
  color: #00d4ff;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.ncfm-new-btn:hover {
  background: rgba(0, 212, 255, 0.22);
  border-color: rgba(0, 212, 255, 0.8);
  color: #e0f8ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}
.ncfm-manage-btn {
  flex: 0 0 auto;
  background: rgba(100, 110, 200, 0.12);
  border-color: rgba(100, 110, 200, 0.4);
  color: #a0a8d0;
}
.ncfm-manage-btn:hover {
  background: rgba(100, 110, 200, 0.22);
  border-color: rgba(100, 110, 200, 0.7);
  color: #d0d8ff;
  box-shadow: 0 0 16px rgba(100, 110, 200, 0.22);
}
.ncfm-danger-btn {
  width: 100%;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ff8080;
}
.ncfm-danger-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffa0a0;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}
.ncfm-back {
  background: transparent;
  border: 1px solid rgba(100, 110, 200, 0.3);
  color: rgba(200, 208, 248, 0.7);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.12s;
  margin-right: 10px;
}
.ncfm-back:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.5);
  color: #00d4ff;
}
.ncfm-meta-header {
  padding: 8px 14px;
  color: rgba(160, 168, 208, 0.65);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ncfm-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
}
.ncfm-list::-webkit-scrollbar { width: 8px; }
.ncfm-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.ncfm-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.2);
  border-radius: 4px;
}
.ncfm-list::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }
.ncfm-empty {
  color: rgba(160, 168, 208, 0.6);
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  font-style: italic;
}
.ncfm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 0;
  background: rgba(20, 26, 46, 0.4);
  border: 1px solid rgba(100, 110, 200, 0.12);
  border-radius: 10px;
  transition: all 0.12s;
}
.ncfm-row:hover {
  background: rgba(28, 36, 64, 0.6);
  border-color: rgba(0, 212, 255, 0.25);
}
.ncfm-row.active {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.15) inset;
}
.ncfm-row-main {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}
.ncfm-row-name {
  font-size: 14px;
  font-weight: 500;
  color: #e8ecff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ncfm-row.active .ncfm-row-name { color: #00d4ff; }
.ncfm-row-meta {
  font-size: 11px;
  color: rgba(160, 168, 208, 0.55);
  margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.ncfm-dot { margin: 0 6px; opacity: 0.5; }
.ncfm-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ncfm-row-btn {
  background: transparent;
  border: 1px solid rgba(100, 110, 200, 0.25);
  color: rgba(200, 208, 248, 0.75);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ncfm-row-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.5);
  color: #00d4ff;
}
.ncfm-row-btn.ncfm-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ff6060;
}
@media (max-width: 700px) {
  .ncfm-panel { max-height: 92vh; }
  .ncfm-row { flex-wrap: wrap; }
  .ncfm-row-actions { width: 100%; justify-content: flex-end; }
}

/* ─────────────────────────────────────────────────────────────────
   "Your art joined the void" — Big Canvas publish celebration
   and easter-egg unlock celebrations. Both use z-index above
   everything (100020). Tap anywhere to dismiss.
   ───────────────────────────────────────────────────────────────── */
.nc-celebrate,
.nc-unlock {
  position: fixed;
  inset: 0;
  z-index: 100020;
  overflow: hidden;
  cursor: pointer;
  animation: ncCelebrateFadeIn 240ms ease-out;
}
.nc-celebrate-canvas,
.nc-unlock-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.nc-celebrate-text,
.nc-unlock-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 22px));
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease-out, transform 520ms cubic-bezier(.2,.7,.2,1);
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  padding: 0 24px;
  max-width: 92vw;
}
.nc-celebrate-title {
  font-size: clamp(28px, 6vw, 62px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ff1493;
  text-shadow:
    0 0 12px #ff1493,
    0 0 32px #ff1493,
    0 0 64px rgba(255, 20, 147, 0.55);
  margin-bottom: 16px;
  line-height: 1.05;
}
.nc-celebrate-sub {
  font-size: clamp(14px, 2.2vw, 22px);
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.nc-celebrate-hint,
.nc-unlock-hint {
  font-size: 11px;
  color: rgba(224, 230, 255, 0.45);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Unlock celebration tone is more assertive ("UNLOCKED") */
.nc-unlock-kicker {
  font-size: clamp(12px, 1.6vw, 16px);
  letter-spacing: 0.32em;
  color: rgba(224, 230, 255, 0.7);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.nc-unlock-title {
  font-size: clamp(32px, 7.2vw, 78px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 14px;
}
.nc-unlock-sub {
  font-size: clamp(13px, 2vw, 20px);
  color: #e0e6ff;
  opacity: 0.85;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

@keyframes ncCelebrateFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────
   Full Spectrum reward — rainbow color swatch in the palette.
   Hidden by default via inline style:none; applyUnlocks() flips it
   on when _progress.unlocks.spectrum is true.
   ───────────────────────────────────────────────────────────────── */
.nc-color-rainbow {
  background: conic-gradient(from 0deg,
    #ff1493, #f59e0b, #e0e0ff, #22c55e,
    #00d4ff, #a855f7, #c850c0, #ff1493);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.45),
    0 0 18px rgba(168, 85, 247, 0.35);
  animation: ncRainbowSpin 6s linear infinite;
}
.nc-color-rainbow.active {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@keyframes ncRainbowSpin {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────────
   Void Legend reward — animated shimmering gradient on the landing
   title. Applied via showLanding() adding .nc-legend-title to the
   <h1> when _progress.unlocks.legend is true.
   ───────────────────────────────────────────────────────────────── */
.nc-legend-title {
  background: linear-gradient(90deg,
    #ff1493, #a855f7, #00d4ff, #22c55e, #f59e0b, #ff1493);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  animation: ncLegendShimmer 7s linear infinite;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.55));
}
/* The .nc-landing-void span inside the <h1> has its own color rule
   normally; override so the gradient flows through it too. */
.nc-legend-title .nc-landing-void {
  color: inherit;
  -webkit-text-fill-color: inherit;
}
@keyframes ncLegendShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
