/* ============================================================
   Connections — Paper Design 1G-0 ("Connector's Field Archive")
   Analog, Tactile, Living Ecology Workbench Aesthetics
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Paper Design 1OX-0 Tokens */
  --canvas-bg: #FFF9EC;
  --text-primary: #0F172A;
  --text-quote: #334155;
  --text-meta: #64748B;
  --text-sub: #94A3B8;
  --border-light: #E2E8F0;
  --border-card: #CBD5E1;
  --corridor-badge-bg: #1E293B;
  --corridor-badge-text: #F8FAFC;
  --artboard-w: 1512px;
  --artboard-h: 982px;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--canvas-bg);
  font-family: "Fraunces", Georgia, "Roboto", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Outer Viewport: infinite background */
.viewport-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--canvas-bg);
  cursor: grab;
}

/* 1512x982 Canvas Stage - Infinite Canvas Layer */
.artboard-canvas {
  width: 1512px;
  height: 982px;
  min-width: 1512px;
  min-height: 982px;
  background-color: transparent !important;
  position: relative;
  overflow: visible;
  box-shadow: none !important;
  border: none !important;
  transform-origin: center center;
  will-change: transform;
  cursor: grab;
}

.workbench-canvas {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

body.is-screen-panning,
body.is-screen-panning * {
  cursor: grabbing !important;
  user-select: none !important;
}

body.space-pan-active,
body.space-pan-active * {
  cursor: grab !important;
}

body.space-pan-active.is-screen-panning,
body.space-pan-active.is-screen-panning * {
  cursor: grabbing !important;
}

/* ============================================================
   1. Canvas Ground & Atmosphere (1OX-0 & 1PA-0)
   ============================================================ */

.canvas-atmosphere {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* 1PA-0 Colored dot artwork overlay - feathered so it softly dissolves into infinite background */
.canvas-dot-artwork {
  position: absolute;
  width: 1102px;
  height: 1827px;
  left: 1657px;
  top: -73px;
  transform-origin: 0% 0%;
  transform: rotate(90deg);
  background-image: url('assets/dot-artwork.png');
  background-size: cover;
  background-position: 50%;
  mix-blend-mode: darken;
  opacity: 0.07;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 30%, rgba(0,0,0,0.8) 55%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 30%, rgba(0,0,0,0.8) 55%, transparent 75%);
}

/* ============================================================
   2. Network Wireframe Paths & Circle Guides (1OY-0)
   ============================================================ */

.connections-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 1512px;
  height: 982px;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.network-circle-group {
  pointer-events: none;
}

.circle-dash {
  stroke: #CBD5E1;
  stroke-width: 2px;
  stroke-dasharray: 6 4;
}

.circle-solid {
  stroke: #94A3B8;
  stroke-width: 1px;
}

.ellipse-hit-area {
  pointer-events: stroke;
  cursor: pointer;
}

/* Static Anchor Points (1P4-0 to 1P8-0) */
.anchor-circle {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

/* Dynamic Connection Lines created on Drag & Drop */
#dynamic-connections path {
  stroke: #0F172A !important;
  stroke-width: 2px !important;
  stroke-linecap: round !important;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.15)) !important;
}

/* Dynamic Anchor Points created on connect */
.dynamic-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0F172A;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 25;
}

/* Dynamic Badges formed from Drag & Drop typing */
.dynamic-badge {
  position: absolute;
  background-color: #0F172A;
  color: #FFFFFF;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  z-index: 35;
  pointer-events: auto;
  cursor: default;
  animation: fadeInPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dynamic-badge .badge-prefix {
  color: #94A3B8;
  font-size: 10px;
}

/* Transit Corridor Badges (1PB-0, 1PD-0) */
.corridor-badge {
  position: absolute;
  display: flex;
  align-items: center;
  background-color: #1E293B;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 5px 12px;
  z-index: 10;
  pointer-events: auto;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.corridor-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.corridor-badge.badge-west4 {
  transform: translate(-50%, -50%);
}

.corridor-badge.badge-west4:hover {
  transform: translate(-50%, calc(-50% - 1px));
}

.corridor-badge .badge-text {
  color: #F8FAFC;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 12px;
  text-transform: uppercase;
}

/* ============================================================
   3. Sensory Artifact Scraps (Cards)
   Deckled silhouettes, multi-layer diffuse paper shadows, washi tape
   ============================================================ */

.cards-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
}

/* ============================================================
   3. Cards Layer & Card Styling (Matches Paper Design 1OX-0)
   ============================================================ */

.cards-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
}

.network-card {
  position: absolute;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 16px;
  gap: 10px;
  padding: 14px;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: anywhere;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  will-change: transform, left, top;
}

.network-card:active {
  cursor: grabbing;
}

/* Card 1: Jackie (Warm Amber Radial Gradient 1SW-0) */
.network-card.card-jackie {
  background-color: #FFF3E6;
  background-image: radial-gradient(ellipse 60% 85% at 50% 50%, #FFFAEE 0%, #FFD2B2 65%, #FFCCA7 100%);
  background-image: radial-gradient(ellipse 56.065% 82.05% at 50% 50% in oklab, #FFFAEE 0%, 65.86%, #FFCCA7 100%);
  background-origin: border-box;
  border-radius: 8px;
  box-shadow: #F2650033 0px 2px 3px inset, 0 2px 6px rgba(0, 0, 0, 0.04);
  border: none;
}

.network-card.card-jackie.is-selected {
  box-shadow: #F2650033 0px 2px 3px inset, 0 4px 12px rgba(0, 0, 0, 0.06);
  border: none;
  z-index: 50;
}

/* Card 2: Maya (Soft Blue Radial Gradient 1T9-0) */
.network-card.card-maya {
  background-color: #EDF5FF;
  background-image: radial-gradient(ellipse 65% 180% at 50% 18%, #FFFFFF 0%, #D4E6FF 100%);
  background-image: radial-gradient(ellipse 60.28% 186.405% at 50% 18.85% in oklab, #FFFFFF 0%, #D4E6FF 100%);
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 3: Julian (Clean White 1R4-0) */
.network-card.card-julian {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 4: Claire L. (Warm Orange Radial Gradient) */
.network-card.card-claire {
  background-color: #FFF3E6;
  background-image: radial-gradient(ellipse 60% 85% at 50% 50%, #FFFAEE 0%, #FFD2B2 65%, #FFCCA7 100%);
  background-image: radial-gradient(ellipse 56.065% 82.05% at 50% 50% in oklab, #FFFAEE 0%, 65.86%, #FFCCA7 100%);
  background-origin: border-box;
  border-radius: 8px;
  box-shadow: #F2650033 0px 2px 3px inset, 0 2px 6px rgba(0, 0, 0, 0.04);
  border: none;
}

/* Card 5: Devon (Soft Lavender / Pink Radial Gradient 1S1-0) */
.network-card.card-devon {
  background-color: #FDF1FC;
  background-image: radial-gradient(ellipse 110% 55% at 50% 34%, #FFFFFF 0%, #FFEBFB 100%);
  background-image: radial-gradient(ellipse 108.725% 53.97% at 50% 34.03% in oklab, #FFFFFF 0%, #FFEBFB 100%);
  border-radius: 8px;
  box-shadow: #D772E033 0px 2px 3px inset, #0000000A 0px 2px 8px;
}

/* Card 6: Sora (Warm Peach Radial Gradient 1RF-0) */
.network-card.card-sora {
  background-color: #FFF2E8;
  background-image: radial-gradient(ellipse 150% 100% at 50% 0%, #FFFFFF 0%, #FFDDC1 100%);
  background-image: radial-gradient(ellipse 150.925% 100.145% at 50% -3.69% in oklab, #FFFFFF 0%, #FFDDC1 100%);
  border-radius: 8px;
  box-shadow: #00000033 0px 2px 3px inset, #0000000A 0px 2px 8px;
}

/* Card 7: Elena (Pink Accent Radial Gradient 1QA-0) */
.network-card.card-elena-pink {
  background-color: #FFF2FC;
  background-image: radial-gradient(ellipse 40% 50% at 50% 50%, #FFFFFF 0%, #FFEFFC 100%);
  background-image: radial-gradient(ellipse 37.105% 50% at 50% 50% in oklab, #FFFFFF 0%, #FFEFFC 100%);
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
  padding: 12px;
  gap: 8px;
}

/* Card 8: Marcus (Clean White 1SL-0) */
.network-card.card-marcus {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
  padding: 12px;
  gap: 8px;
}

/* Card 9: Harris (Clean White 1RQ-0) */
.network-card.card-harris {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 10: Elena (Clean White 1PZ-0) */
.network-card.card-elena-white {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
  padding: 12px;
  gap: 8px;
}

/* Card 11: Nina (Soft Periwinkle / Lavender - Top Left Edge) */
.network-card.card-nina {
  background-color: #F5F3FF;
  background-image: radial-gradient(ellipse 80% 120% at 50% 20% in oklab, #FFFFFF 0%, #EDE9FE 100%);
  border: 1px solid #DDD6FE;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 12: Mateo (Warm Apricot - Top Right Edge) */
.network-card.card-mateo {
  background-color: #FFF7ED;
  background-image: radial-gradient(ellipse 110% 80% at 50% 15% in oklab, #FFFFFF 0%, #FFEDD5 100%);
  border: 1px solid #FED7AA;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 13: Chloe (Clean Crisp White - Far Right Edge) */
.network-card.card-chloe {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 14: Tariq (Clean White - Far Right Bottom Edge) */
.network-card.card-tariq {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 15: Zoe (Warm Butter Honey - Bottom Left Edge) */
.network-card.card-zoe {
  background-color: #FEFCE8;
  background-image: radial-gradient(ellipse 90% 80% at 50% 20% in oklab, #FFFFFF 0%, #FEF08A 100%);
  border: 1px solid #FDE047;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Card 16: Lucas (Clean Crisp White - Bottom Center Edge) */
.network-card.card-lucas {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: #0000000A 0px 2px 8px;
}

/* Hover, Dragging & Target States */
.network-card:hover:not(.is-dragging) {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  z-index: 40;
}

.network-card.is-selected:hover:not(.is-dragging) {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.network-card.is-dragging {
  cursor: grabbing !important;
  z-index: 120 !important;
  transform: translateY(-6px) scale(1.03) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16) !important;
}

.network-card.is-target {
  outline: 2px solid #3B82F6;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Card Internal Components */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-author-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.card-author {
  color: #0F172A;
  font-size: 13px;
  line-height: 16px;
  margin: 0;
}

.card-quote {
  color: #334155;
  font-size: 11px;
  line-height: 16px;
  margin: 0;
}

/* Font Classes */
.font-supermercado {
  font-family: "Supermercado One", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.font-maya-name {
  font-family: "Plus Jakarta Sans", "SukhumvitSet-Text", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.font-irish-grover {
  font-family: "Irish Grover", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.font-inter-bold {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.font-instrument-sans {
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 12px;
}

.font-instrument-serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 11px;
  line-height: 16px;
}

.font-indie-flower {
  font-family: "Indie Flower", cursive, sans-serif;
  font-size: 11px;
  line-height: 16px;
}

.font-inter-italic {
  font-family: "Inter", system-ui, sans-serif;
  font-style: italic;
  font-size: 11px;
  line-height: 16px;
}

.card-elena-pink .card-quote,
.card-marcus .card-quote,
.card-elena-white .card-quote {
  font-size: 10.5px;
  line-height: 15px;
}

/* Audio Waveform Box (1S5-0 in Devon) */
.card-waveform-box {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
}

.waveform-bar {
  width: 3px;
  border-radius: 1px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.network-card:hover .waveform-bar {
  animation: soundwave-pulse 1.2s ease-in-out infinite alternate;
}

.waveform-bar:nth-child(2) { animation-delay: 0.15s; }
.waveform-bar:nth-child(3) { animation-delay: 0.3s; }
.waveform-bar:nth-child(4) { animation-delay: 0.08s; }
.waveform-bar:nth-child(5) { animation-delay: 0.25s; }
.waveform-bar:nth-child(6) { animation-delay: 0.4s; }
.waveform-bar:nth-child(7) { animation-delay: 0.18s; }
.waveform-bar:nth-child(8) { animation-delay: 0.32s; }

@keyframes soundwave-pulse {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  100% { transform: scaleY(1.1); opacity: 1; }
}

/* Card Footer Metadata (1T2-0, etc.) */
.card-footer-meta {
  border-top: 1px solid #E2E8F0;
  padding-top: 8px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-elena-pink .card-footer-meta,
.card-marcus .card-footer-meta,
.card-elena-white .card-footer-meta {
  padding-top: 6px;
  gap: 3px;
}

.card-devon .card-footer-meta {
  padding-top: 4px;
}

.card-location-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.location-pin-icon {
  flex-shrink: 0;
}

.location-text {
  color: #64748B;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 12px;
  text-transform: uppercase;
}

.card-elena-pink .location-text,
.card-marcus .location-text,
.card-elena-white .location-text {
  font-size: 9px;
}

.card-social-context {
  padding-left: 15px;
  color: #94A3B8;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 9px;
  line-height: 12px;
}

.card-elena-pink .card-social-context,
.card-marcus .card-social-context,
.card-elena-white .card-social-context {
  font-size: 8.5px;
  padding-left: 14px;
}

/* ============================================================
   4. Connection Dialog (Modern Clean Design - Retains Typing)
   ============================================================ */

.modern-connection-dialog {
  position: absolute;
  width: 330px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 16px 18px;
  z-index: 140;
  animation: fadeInPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes fadeInPop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modern-connection-dialog .dialog-prompt {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 8px;
}

.modern-connection-dialog .dialog-reason-input {
  width: 100%;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12.5px;
  line-height: 18px;
  color: #0F172A;
  background-color: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
  resize: vertical;
  min-height: 52px;
  outline: none;
  transition: all 0.15s ease;
}

.modern-connection-dialog .dialog-reason-input:focus {
  background-color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.modern-connection-dialog .dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.modern-connection-dialog .dialog-btn-connect {
  background-color: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transition: all 0.15s ease;
}

.modern-connection-dialog .dialog-btn-connect:hover {
  background-color: #1E293B;
  transform: translateY(-1px);
}

.modern-connection-dialog .dialog-btn-connect:active {
  transform: translateY(0);
}

/* Instruction Text & Inline Connection Dock - Floating HUD */
.canvas-instruction-container {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 90;
  pointer-events: none;
}

.canvas-instruction {
  color: #0F172A;
  font-family: "Supermercado One", system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 22px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 1px 2px rgba(255, 249, 236, 0.9), 0 0 8px rgba(255, 249, 236, 0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.canvas-instruction.is-hidden {
  opacity: 0 !important;
  transform: translateY(6px) !important;
  pointer-events: none !important;
  display: none !important;
}

/* Inline Connection Display (Replaces Drag Hint in that exact location) */
.inline-connection-display {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(255, 254, 252, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  padding: 8px 34px 9px 24px;
  min-width: 240px;
  max-width: 380px;
  box-sizing: border-box;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.inline-connection-display.active {
  display: flex !important;
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Animation Stage in Inline Dock */
.inline-anim-stage {
  position: relative;
  width: 170px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

/* Gooey Container */
.inline-goo-container {
  position: absolute;
  inset: 0;
  filter: url(#inline-liquid-blend);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.inline-droplet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.inline-droplet.droplet-a {
  width: 24px;
  height: 24px;
  background-color: #F26500;
  opacity: 0.88;
  animation: inlineFloatBlendA 2.6s ease-in-out infinite alternate;
}

.inline-droplet.droplet-b {
  width: 24px;
  height: 24px;
  background-color: #3B82F6;
  opacity: 0.88;
  animation: inlineFloatBlendB 2.6s ease-in-out infinite alternate;
}

.inline-droplet.droplet-core {
  width: 20px;
  height: 20px;
  background: linear-gradient(90deg, #F26500, #3B82F6);
  opacity: 0.92;
  animation: inlineCoreBlendWobble 2.6s ease-in-out infinite alternate;
}

@keyframes inlineFloatBlendA {
  0% { transform: translate(-28px, 0) scale(0.95); }
  50% { transform: translate(12px, -1px) scale(1.08, 0.92); }
  100% { transform: translate(6px, 1px) scale(1.02); }
}

@keyframes inlineFloatBlendB {
  0% { transform: translate(28px, 0) scale(0.95); }
  50% { transform: translate(-12px, 1px) scale(1.08, 0.92); }
  100% { transform: translate(-6px, -1px) scale(1.02); }
}

@keyframes inlineCoreBlendWobble {
  0% { transform: scale(0.3) rotate(0deg); opacity: 0.3; }
  50% { transform: scale(1.18) rotate(10deg); opacity: 0.95; }
  100% { transform: scale(1.02) rotate(-6deg); opacity: 0.88; }
}

/* SVG Line & Dots */
.inline-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.inline-orbital-ring {
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 1px;
  stroke-dasharray: 3 2;
  fill: none;
}

.inline-connect-line {
  stroke: #0F172A;
  stroke-width: 1.8px;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawInlineLine 0.6s 0.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawInlineLine {
  to {
    stroke-dashoffset: 0;
  }
}

.inline-center-pulse {
  stroke: #38BDF8;
  stroke-width: 1.2px;
  fill: none;
  transform-origin: 90px 22px;
  animation: inlinePulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes inlinePulse {
  0% { transform: scale(0.4); opacity: 0.9; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.inline-center-dot {
  fill: #0F172A;
}

/* Inline Names Meta */
.inline-connection-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  user-select: none;
}

.inline-connection-names {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.inline-names-separator {
  color: #94A3B8;
  font-weight: 400;
  font-size: 12px;
}

.inline-connection-reason {
  font-size: 11.5px;
  font-style: italic;
  color: #64748B;
  max-width: 280px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline Dismiss Button */
.inline-dismiss-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.inline-dismiss-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0F172A;
}

/* ============================================================
   5. Main Control Bar (1QM-0)
   ============================================================ */

.bottom-dock-bar {
  position: fixed;
  bottom: 24px;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 16px 10px 20px;
  box-sizing: border-box;
  z-index: 95;
  pointer-events: auto;
  width: auto;
  height: auto;
}

.dock-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dock-title {
  color: #0F172A;
  font-family: "Supermercado One", "ADLaM Display", "Fraunces", system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 22px;
  font-weight: 700;
  margin: 0;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-btn {
  border-radius: 6px;
  padding: 8px 16px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  height: auto;
  outline: none;
  border: none;
}

.dock-btn.dock-btn-connect {
  background-color: #0F172A;
  color: #FFFFFF;
}

.dock-btn.dock-btn-connect:hover {
  background-color: #1E293B;
}

.dock-btn.dock-btn-share {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
}

.dock-btn.dock-btn-share:hover {
  background-color: #F8FAFC;
  border-color: #94A3B8;
}

/* Canvas Scale / Reset Controls */
.canvas-controls {
  position: fixed;
  bottom: 24px;
  right: 28px;
  display: flex;
  gap: 8px;
  z-index: 95;
  pointer-events: auto;
}

.control-btn {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #333333;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  user-select: none;
}

.control-btn:hover {
  background-color: #FFFFFF;
  color: #000000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.control-btn:active {
  transform: scale(0.95);
}

/* Toast Message */
.toast {
  position: absolute;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #1E150E;
  color: #F8EFE4;
  border: 1px solid #9C7D40;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: "Space Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ============================================================
   Global Tab Header & Switcher (Disabled - Canvas original mode always)
   ============================================================ */

.app-header,
.top-nav-switcher,
.nav-tab-btn {
  display: none !important;
}

.nav-tab-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 1000px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #555555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab-btn:hover {
  color: #111111;
  background-color: rgba(0, 0, 0, 0.04);
}

.nav-tab-btn.active {
  background-color: #1A1A1A;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.tab-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #888888;
  transition: background-color 0.2s ease;
}

.nav-tab-btn.active .tab-indicator-dot {
  background-color: #4299E1;
}

/* Tab Panels */
.tab-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.tab-panel.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tab-btn.active .tab-indicator-dot.share-dot {
  background-color: #6750A4;
}

/* ============================================================
   Share Screen Mode (Paper Artboards: OH-0, NX-0, K5-0)
   ============================================================ */

.share-screen-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #FAF6FB;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(232, 222, 248, 0.6) 0%, transparent 65%),
    radial-gradient(rgba(103, 80, 164, 0.08) 1.2px, transparent 1.2px);
  background-size: 100% 100%, 24px 24px;
  overflow: hidden;
  box-sizing: border-box;
}

.share-screen-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.share-paper-grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#6d5843 0.25px, transparent 0.25px);
  background-size: 12px 12px;
  opacity: 0.2;
}

.share-soft-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 222, 248, 0.5) 0%, rgba(254, 247, 255, 0) 70%);
  filter: blur(40px);
}

.share-mode-header {
  position: absolute;
  top: 20px;
  left: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  pointer-events: auto;
}

.btn-return-canvas {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1000px;
  padding: 8px 18px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #49454F;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-return-canvas:hover {
  background: #FFFFFF;
  color: #1D1B20;
  border-color: rgba(103, 80, 164, 0.4);
  transform: translateX(-2px);
  box-shadow: 0 4px 12px rgba(103, 80, 164, 0.12);
}

.share-mode-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-pill {
  font-family: "Roboto", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #E8DEF8;
  color: #21005D;
  padding: 4px 12px;
  border-radius: 100px;
}

.share-mode-headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  color: #49454F;
  margin: 0;
}

.share-header-spacer {
  width: 140px;
}

.share-flow-stage {
  width: 100%;
  max-width: 660px;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 70px;
}

.paper-share-screen {
  display: none;
  width: 100%;
  justify-content: center;
}

.paper-share-screen.active {
  display: flex;
  animation: popCardIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.paper-modal-card {
  position: relative;
  width: 588px;
  max-width: 92vw;
  min-height: 380px;
  background-color: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(73, 69, 79, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(103, 80, 164, 0.15);
  padding: 38px 44px 30px 44px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.paper-modal-card.paper-k5-card {
  width: 640px;
  max-width: 94vw;
}

.paper-modal-title {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 28px;
  color: #000000;
  margin: 0;
}

.paper-modal-subtitle {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  color: #1D1B20;
  margin: 14px 0 12px 0;
}

.paper-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.paper-step-indicator .step-pill {
  font-family: "Roboto", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: #F4EFF4;
  color: #79747E;
}

.paper-step-indicator .step-pill.active {
  background: #E8DEF8;
  color: #21005D;
  font-weight: 600;
}

.paper-step-indicator .step-pill.completed {
  background: #D4EDDA;
  color: #155724;
  font-weight: 600;
}

.paper-snippet-field-wrapper {
  margin-top: 6px;
  margin-bottom: 24px;
}

.paper-snippet-input {
  width: 100%;
  height: 88px;
  background-color: #FEF7FF;
  border-radius: 6px;
  border: 1px solid rgba(103, 80, 164, 0.2);
  box-shadow: 0 4px 8px rgba(143, 191, 213, 0.45);
  padding: 12px 16px;
  box-sizing: border-box;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 15px;
  line-height: 22px;
  color: #1D1B20;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.paper-snippet-input:focus {
  border-color: #6750A4;
  box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.2), 0 4px 12px rgba(103, 80, 164, 0.25);
}

.transit-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px 0;
}

.transit-chip {
  background: #F3EDF7;
  border: 1px solid #CAC4D0;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #49454F;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.transit-chip:hover {
  background: #E8DEF8;
  color: #1D192B;
  border-color: #6750A4;
}

.transit-chip.active {
  background: #6750A4;
  color: #FFFFFF;
  border-color: #6750A4;
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.35);
}

.paper-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
}

.paper-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid #CAC4D0;
  background-color: transparent;
  color: #49454F;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.paper-btn-outline:hover {
  background-color: #F4EFF4;
  color: #1D1B20;
  border-color: #79747E;
}

.paper-btn-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  background-color: #6750A4;
  color: #FFFFFF;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.25);
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.paper-btn-purple:hover {
  background-color: #553E90;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(103, 80, 164, 0.35);
}

.paper-btn-purple:active {
  transform: translateY(1px);
}

.k5-status-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.k5-check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #D4EDDA;
  color: #155724;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 12px;
}

.k5-wait-text {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  color: #6750A4;
  font-weight: 500;
  margin: 6px 0 0 0;
}

.k5-timeline-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.k5-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.k5-section-label {
  width: 60px;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #000000;
  letter-spacing: 0.5px;
}

.k5-section-label.invisible {
  visibility: hidden;
}

.k5-date-pill {
  border: 1px solid #CAC4D0;
  border-radius: 12px;
  padding: 6px 14px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #49454F;
  background: #FFFFFF;
  white-space: nowrap;
}

.k5-line-divider {
  flex: 1;
  height: 1px;
  background: #CDCBD7;
}

.k5-transit-name {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1D1B20;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.k5-snippet-pill {
  border: 1px solid #CAC4D0;
  border-radius: 12px;
  padding: 8px 16px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #49454F;
  background: #FFFFFF;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-btn.active {
  background-color: #1A1A1A;
  color: #FFFFFF;
  outline-color: #1A1A1A;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.dock-btn#btn-share.active {
  background-color: #6750A4;
  color: #FFFFFF;
  outline-color: #6750A4;
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.35);
}





