/* =========================================
   STYLE.THOUGHTS.CSS
   Pure, GSAP-Ready Orbital Styles & Aether Dock
   DEBUG LOG TRACE:
   - OPTIMIZED: Adjusted `contain` down to `layout style` to prevent `paint` from clipping external sublabels.
   - OPTIMIZED: Appended `will-change: transform` to the `.is-dragging` state.
   - REFINED: Task orbs explicitly narrowed (max-width: 120px) and padding slimmed for better pin-board real estate.
   ✨ CIRCADIAN REACTIVE BASELINE: Thoughts map securely to the active circadian atmosphere.
   ✨ TRIGONOMETRIC EDGE HIGHLIGHTS: CSS sin/cos maps the edge highlight dynamically to the sun's orbit.
   ✨ REFINED: Crisp Square Task Profiles perfectly synchronized with atmospheric lighting.
   ✨ LITE-MODE REPAVED: Ultimate visual reduction. Pure solid circadian bases, sharp unshadowed borders, zero overlays.
   ✨ WORK MODE ACTIVE: Applied thick circadian outliners to orb boundaries for workspace focus.
========================================= */

/* --- Base Core Mechanics --- */
.thought-orb {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 100;
  contain: layout style; /* GPU ISOLATION: 'paint' removed to prevent clipping of external badges */
  
  min-width: 100px;
  max-width: 220px;
  padding: 8px 16px; 
  display: flex;
  align-items: center; 
  justify-content: center;
  
  /* Maps to the current atmospheric mid-tone, anchoring it in the time of day */
  background: color-mix(in srgb, var(--bgMid, #05070a) 85%, rgb(var(--circadian-dark, 5,5,8)));
  
  border: 1px solid color-mix(in srgb, rgb(var(--circadian-accent, 85,221,255)) 30%, rgba(255,255,255,0.1));
  
  /* ✨ TRIGONOMETRIC HIGHLIGHT: Calculates X and Y shadow offsets based on the sun's active angle */
  box-shadow: inset calc(sin(var(--bgAngle, 180deg)) * 1.5px) calc(cos(var(--bgAngle, 180deg)) * -1.5px) 0 color-mix(in srgb, rgb(var(--circadian-accent, 85,221,255)) 40%, rgba(255,255,255,0.15)),
              inset calc(sin(var(--bgAngle, 180deg)) * 15px) calc(cos(var(--bgAngle, 180deg)) * -15px) 30px -15px color-mix(in srgb, rgb(var(--circadian-bright, 255,255,255)) 15%, transparent) !important;
              
  border-radius: 999px; 
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  
  cursor: grab;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.thought-orb:hover {
  border-color: rgb(var(--circadian-accent, 85,221,255));
  background: var(--bgMid, #05070a);
}

.thought-orb:active { 
  cursor: grabbing; 
}

.thought-orb.is-dragging { 
  cursor: grabbing; 
  z-index: 300;
  border-width: 2px;
  border-color: rgb(var(--circadian-accent, 85,221,255));
  box-shadow: none !important;
  will-change: transform; /* HARDWARE ACCELERATION */
}

/* --- Solid States for Standard Pinned Thoughts & Previews --- */
body .thought-orb.is-pinned-top {
  background: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  border-color: #000 !important;
  box-shadow: none !important;
}
body .thought-orb.is-pinned-top .th-text {
  color: #000 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body .thought-orb.is-pinning-preview {
  background: #88ffaa !important;
  border-color: #000 !important;
  box-shadow: none !important;
  transform: translate(-50%, -50%) scale(0.9) !important;
}
body .thought-orb.is-pinning-preview .th-text {
  color: #000 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body .thought-orb.is-unpinning-preview {
  background: #ffaa55 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  transform: translate(-50%, -50%) scale(1.1) !important;
}
body .thought-orb.is-unpinning-preview .th-text {
  color: #000 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

/* --- The Text Layer --- */
.thought-orb .th-text {
  color: #ffffff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  user-select: none;
  pointer-events: none; 
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important; 
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.thought-orb:hover .th-text {
  color: #ffffff;
  text-shadow: 0 1px 5px rgba(0,0,0,0.7) !important;
}

/* --- The Inner Controls --- */
.thought-orb .th-control-left,
.thought-orb .th-control-right {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 6px; 
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.thought-orb .th-control-left {
  left: 6px;
  transform: translateY(-50%) translateX(-6px);
}

.thought-orb .th-control-right {
  right: 6px;
  transform: translateY(-50%) translateX(6px);
}

.thought-orb:hover .th-control-left,
.thought-orb:hover .th-control-right {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* --- Solid Circular Text Buttons --- */
.thought-orb .expand-btn,
.thought-orb .acc-btn,
.thought-orb .snz-btn,
.thought-orb .pop-btn {
  cursor: pointer;
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  padding: 0; 
  transition: transform 0.2s, background-color 0.2s, color 0.2s;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; 
  z-index: 2;
  box-sizing: border-box;
  box-shadow: none !important;
  backdrop-filter: none;
}

.thought-orb .expand-btn { color: rgb(var(--circadian-accent, 85,221,255)); background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 80%, #000); border: 1px solid rgb(var(--circadian-accent, 85,221,255)); }
.thought-orb .acc-btn { color: #88ffaa; background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 80%, #000); border: 1px solid #88ffaa; }
.thought-orb .snz-btn { color: #aa88ff; background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 80%, #000); border: 1px solid #aa88ff; font-size: 9px; }
.thought-orb .pop-btn { color: #ff5555; background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 80%, #000); border: 1px solid #ff5555; }

.thought-orb .expand-btn:hover { background: rgb(var(--circadian-accent, 85,221,255)); color: #000; transform: scale(1.15); }
.thought-orb .acc-btn:hover { background: #88ffaa; color: #000; transform: scale(1.15); }
.thought-orb .snz-btn:hover { background: #aa88ff; color: #000; transform: scale(1.15); }
.thought-orb .pop-btn:hover { background: #ff5555; color: #000; transform: scale(1.15); }

/* --- Input Wrappers & Ambient Particles --- */
.thought-input-wrap { 
  position: absolute; 
  left: 0; 
  top: 0; 
  transform: translate(calc(var(--x) - 50%), calc(var(--y) - 50%)); 
  z-index: 9999; 
}

.thought-input {
  background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 90%, #000);
  border: 1.5px solid rgb(var(--circadian-accent, 85,221,255));
  border-radius: 999px; 
  padding: 10px 20px;
  color: #fff; 
  font-family: 'Noto Sans JP', sans-serif; 
  font-size: 11.5px;
  outline: none;
  box-shadow: none !important;
  width: 180px;
  backdrop-filter: none;
}

.thought-particle { 
  position: absolute; 
  width: 4px; 
  height: 4px; 
  border-radius: 50%; 
  background: rgb(var(--circadian-accent, 255,255,255)); 
  box-shadow: none !important; 
  pointer-events: none; 
  z-index: 1000; 
}

/* --- Pinning Zone Ambience --- */

#pinnedSection {
  position: absolute;
  top: 0; 
  left: 0;
  width: 350px; 
  height: 600px; 
  pointer-events: inherit;
  z-index: 10;
}

#pinnedSection::before {
  content: "";
  position: absolute;
  inset: 30px;
  border: 2px dashed transparent;
  border-radius: 40px;
  background: none;
  box-shadow: none !important;
  pointer-events: inherit;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  z-index: 0;
}

body.is-dragging-thought #pinnedSection::before {
  border-color: color-mix(in srgb, rgb(var(--circadian-accent, 85,221,255)) 40%, transparent);
}

body.is-dragging-thought.is-hovering-pin-zone #pinnedSection::before {
  border-color: rgb(var(--circadian-accent, 85,221,255));
  background: color-mix(in srgb, rgb(var(--circadian-accent, 85,221,255)) 10%, transparent);
  transform: none;
}

/* --- Maximized & Lens Mode Overrides --- */
body.is-maximized-mode[data-lens] #pinnedSection::before,
body.is-maximized-mode[data-lens] #thought-pin-glow,
body.is-maximized-mode[data-lens] .thought-orb.is-pinned-top,
body.is-maximized-mode[data-lens] .thought-orb.is-docked {
  opacity: 0 !important;
  pointer-events: none !important;
  filter: none !important;
  transition: opacity 0.2s ease !important;
}

body.is-maximized-mode[data-lens] .thought-orb.is-pinned-top *,
body.is-maximized-mode[data-lens] .thought-orb.is-docked * {
  pointer-events: none !important;
}

/* --- Tomorrow & Next Zone Ambience --- */
#tomorrowSection, #nextSection {
  position: absolute;
  right: 0;
  width: 120px;
  pointer-events: none; 
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#tomorrowSection { top: 0; bottom: 50%; }
#nextSection { top: 50%; bottom: 0; }

body.is-dragging-thought #tomorrowSection,
body.is-dragging-thought #nextSection {
  opacity: 1;
}

#tomorrowSection::before, #nextSection::before {
  content: "";
  position: absolute;
  border: 2px dashed transparent;
  border-radius: 40px;
  background: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

#tomorrowSection::before { inset: 30px 15px 15px 15px; }
#nextSection::before { inset: 15px 15px 30px 15px; }

#tomorrowSection::after, #nextSection::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 8px;
  color: transparent;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

#tomorrowSection::after { content: "TOMORROW"; }
#nextSection::after { content: attr(data-label); }

/* --- Base Dragging State --- */
body.is-dragging-thought #tomorrowSection::before { border-color: color-mix(in srgb, #aa88ff 40%, transparent); }
body.is-dragging-thought #tomorrowSection::after { color: color-mix(in srgb, #aa88ff 40%, transparent); }

body.is-dragging-thought #nextSection::before { border-color: color-mix(in srgb, #55ddff 40%, transparent); }
body.is-dragging-thought #nextSection::after { color: color-mix(in srgb, #55ddff 40%, transparent); }

/* --- Active Hover Drop State --- */
body.is-dragging-thought.is-hovering-tomorrow-zone #tomorrowSection::before {
  border-color: #aa88ff;
  background: color-mix(in srgb, #aa88ff 10%, transparent);
  transform: scaleX(1.05);
}
body.is-dragging-thought.is-hovering-tomorrow-zone #tomorrowSection::after {
  color: #aa88ff;
  text-shadow: 0 0 12px color-mix(in srgb, #aa88ff 60%, transparent);
}

body.is-dragging-thought.is-hovering-next-zone #nextSection::before {
  border-color: #55ddff;
  background: color-mix(in srgb, #55ddff 10%, transparent);
  transform: scaleX(1.05);
}
body.is-dragging-thought.is-hovering-next-zone #nextSection::after {
  color: #55ddff;
  text-shadow: 0 0 12px color-mix(in srgb, #55ddff 60%, transparent);
}

/* Maximized/Focus Mode Overrides */
body.is-maximized-mode[data-lens] #tomorrowSection,
body.is-maximized-mode[data-lens] #nextSection {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
}

/* =========================================================
   ✨ LITE MODE: ULTIMATE PARED-BACK MONOCHROMATIC OVERRIDES
   ========================================================= */

body.lite-mode .thought-orb {
  /* Restores explicit deterministic variables inside lite-mode context */
  --lite-pin: color-mix(in srgb, var(--pin-color) 85%, #fff);
  
  background: var(--lite-shell-bg) !important;
  border: 1.5px solid color-mix(in srgb, var(--lite-pin) 40%, transparent) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.lite-mode .thought-orb .th-text {
  color: color-mix(in srgb, var(--lite-text) 50%, var(--lite-pin)) !important;
  text-shadow: none !important;
}

body.lite-mode .thought-orb:hover {
  background: color-mix(in srgb, var(--lite-pin) 10%, var(--lite-shell-bg)) !important;
  border-color: var(--lite-pin) !important;
}

body.lite-mode .thought-orb:hover .th-text {
  color: var(--lite-text) !important;
}

body.lite-mode .thought-orb.is-dragging {
  border-width: 2.5px !important;
  border-color: var(--lite-pin) !important;
  box-shadow: none !important;
}

/* Floating Action Controls (Dimmed for Lite Mode) */
body.lite-mode .thought-orb .expand-btn,
body.lite-mode .thought-orb .acc-btn,
body.lite-mode .thought-orb .snz-btn,
body.lite-mode .thought-orb .pop-btn {
    background: transparent !important;
    border: 1px solid color-mix(in srgb, var(--lite-pin) 30%, transparent) !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--lite-text) 50%, var(--lite-pin)) !important;
}

body.lite-mode .thought-orb .expand-btn:hover,
body.lite-mode .thought-orb .acc-btn:hover,
body.lite-mode .thought-orb .snz-btn:hover,
body.lite-mode .thought-orb .pop-btn:hover {
    background: var(--lite-text) !important;
    color: var(--lite-shell-bg) !important;
    border-color: var(--lite-text) !important;
}

body.lite-mode.is-dragging-thought.is-hovering-pin-zone #pinnedSection::before {
  background: color-mix(in srgb, var(--lite-pin) 10%, transparent) !important;
  border-color: var(--lite-pin) !important;
  box-shadow: none !important;
}

body.lite-mode.is-dragging-thought #tomorrowSection::before { border-color: color-mix(in srgb, #aa88ff 60%, #000) !important; }
body.lite-mode.is-dragging-thought.is-hovering-tomorrow-zone #tomorrowSection::before {
  background: color-mix(in srgb, #aa88ff 10%, transparent) !important;
  border-color: #aa88ff !important;
  box-shadow: none !important;
}

body.lite-mode.is-dragging-thought #nextSection::before { border-color: color-mix(in srgb, #55ddff 60%, #000) !important; }
body.lite-mode.is-dragging-thought.is-hovering-next-zone #nextSection::before {
  background: color-mix(in srgb, #55ddff 10%, transparent) !important;
  border-color: #55ddff !important;
  box-shadow: none !important;
}

/* =========================================================
   ✨ THE ZEPHYR: QUICK THOUGHTS (PURE WIREFRAME)
   ========================================================= */

/* Unpinned: Completely transparent background, thicker dashed outline, no box shadows */
body:not(.lite-mode) div.thought-orb.is-quick-orb {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1.5px dashed color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 60%, rgba(255,255,255,0.3)) !important;
  box-shadow: none !important;
}

/* Text gets a deep drop shadow to pop against any underlying elements */
body:not(.lite-mode) div.thought-orb.is-quick-orb .th-text {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.8) !important;
}

/* Hover slightly solidifies the line so you know you've grabbed it */
body:not(.lite-mode) div.thought-orb.is-quick-orb:hover {
  border: 1.5px solid var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

body:not(.lite-mode) div.thought-orb.is-quick-orb:hover .th-text {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 2px 10px rgba(0,0,0,0.9) !important;
}

/* Pinned Quick Thought: Still transparent, but bolder 2px dashed lines */
body:not(.lite-mode) div.thought-orb.is-pinned-top.is-quick-orb {
  background: transparent !important;
  border: 2px dashed var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  box-shadow: none !important;
}

body:not(.lite-mode) div.thought-orb.is-pinned-top.is-quick-orb .th-text {
  color: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.8) !important;
  font-weight: 800 !important;
}

/* =========================================================
   ✨ LITE MODE: QUICK THOUGHTS (PURE WIREFRAME)
   ========================================================= */

/* Unpinned: Transparent bg, thicker dark dashed lines */
body.lite-mode div.thought-orb.is-quick-orb {
  background: transparent !important;
  border: 1.5px dashed color-mix(in srgb, var(--lite-pin) 60%, #000) !important;
  box-shadow: none !important;
}

body.lite-mode div.thought-orb.is-quick-orb .th-text {
  color: var(--lite-text) !important;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.9) !important;
  font-weight: 600 !important;
}

body.lite-mode div.thought-orb.is-quick-orb:hover {
  border: 1.5px solid var(--lite-pin) !important;
}

/* Pinned: Transparent bg, bolder dark dashed lines */
body.lite-mode div.thought-orb.is-pinned-top.is-quick-orb {
  background: transparent !important;
  border: 2px dashed var(--lite-pin) !important;
  box-shadow: none !important;
}

body.lite-mode div.thought-orb.is-pinned-top.is-quick-orb .th-text {
  color: var(--lite-pin) !important;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.9) !important;
  font-weight: 800 !important;
}

/* =========================================
   ✨ THE ANCHOR: TASK-LINKED ORBS & GROUNDING
   Placed strictly at the file base with absolute parent-chain specificity
========================================= */

/* High-Fidelity Aesthetic Grounding (Crisp Square Profile mapped to continuous strings) */
body:not(.lite-mode) div.thought-orb.is-task-orb {
  background: color-mix(in srgb, var(--bgMid, #05070a) 85%, rgb(var(--circadian-dark, 5,5,8))) !important;
  border: 1px solid color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 40%, rgba(255,255,255,0.1)) !important;
  
  /* ✨ TRIGONOMETRIC HIGHLIGHT FOR TASKS */
  box-shadow: inset calc(sin(var(--bgAngle, 180deg)) * 2px) calc(cos(var(--bgAngle, 180deg)) * -2px) 0 color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 60%, rgba(255,255,255,0.2)),
              inset calc(sin(var(--bgAngle, 180deg)) * 15px) calc(cos(var(--bgAngle, 180deg)) * -15px) 30px -15px color-mix(in srgb, rgb(var(--circadian-bright, 255,255,255)) 15%, transparent) !important;
              
  border-radius: 0 !important; 
  padding: 6px 14px !important; 
  max-width: 120px !important;
  max-height: 40px;
}

body:not(.lite-mode) div.thought-orb.is-task-orb:hover {
  border-color: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  background: var(--bgMid, #05070a) !important;
}

body:not(.lite-mode) div.thought-orb.is-task-orb .th-text {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* Ensure Pinned Top Tasks go solid to match regular pinned thoughts */
body:not(.lite-mode) div.thought-orb.is-task-orb.is-pinned-top {
  background: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  border-color: #000 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3) !important;
}

body:not(.lite-mode) div.thought-orb.is-task-orb.is-pinned-top .th-text {
  color: #000 !important;
  text-shadow: none !important;
  font-weight: 900 !important;
}

/* Source Project Badge */
body:not(.lite-mode) div.thought-orb .th-project-label {
  position: absolute;
  bottom: -22px; 
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 9px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 0; 
  border: 1px solid color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 40%, rgba(255,255,255,0.1));
  color: color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 80%, #fff);
  white-space: nowrap;
  pointer-events: none;
  z-index: -1; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  
  /* ✨ TRIGONOMETRIC HIGHLIGHT FOR BADGES */
  box-shadow: inset calc(sin(var(--bgAngle, 180deg)) * 1px) calc(cos(var(--bgAngle, 180deg)) * -1px) 0 color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 30%, transparent) !important;
  
  background: color-mix(in srgb, var(--bgMid, #05070a) 90%, rgb(var(--circadian-dark, 5,5,8)));
  backdrop-filter: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body:not(.lite-mode) div.thought-orb:hover .th-project-label {
  transform: translateX(-50%) translateY(-2px);
  border-color: var(--pin-color, #fff);
  color: #fff;
}

body:not(.lite-mode) div.thought-orb.is-pinned-top .th-project-label {
  background: #000 !important;
  border-color: #000 !important;
  color: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
  box-shadow: none !important;
}

/* =========================================================
   ✨ LITE MODE TASK ANCHORS
   ========================================================= */

body.lite-mode div.thought-orb.is-task-orb {
    background: var(--lite-shell-bg) !important;
    border: 1.5px dashed color-mix(in srgb, var(--lite-pin) 40%, transparent) !important;
    border-radius: 0 !important;
    padding: 6px 14px !important; 
    max-width: 120px !important;
    box-shadow: none !important;
}

body.lite-mode div.thought-orb.is-task-orb .th-text {
    color: color-mix(in srgb, var(--lite-text) 50%, var(--lite-pin)) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}

body.lite-mode div.thought-orb.is-task-orb:hover {
    background: color-mix(in srgb, var(--lite-pin) 10%, var(--lite-shell-bg)) !important;
    border-color: var(--lite-pin) !important;
}

body.lite-mode div.thought-orb.is-task-orb:hover .th-text {
    color: var(--lite-text) !important;
}

body.lite-mode div.thought-orb.is-pinned-top.is-task-orb {
    background: var(--lite-pin) !important;
    border: 1.5px solid var(--lite-pin) !important; 
    border-radius: 0 !important;
}

body.lite-mode div.thought-orb.is-pinned-top.is-task-orb .th-text {
    color: #000 !important; 
    font-weight: 900 !important;
    text-shadow: none !important;
}

body.lite-mode div.thought-orb .th-project-label {
    background: var(--lite-shell-bg) !important;
    border: 1px solid color-mix(in srgb, var(--lite-pin) 40%, transparent) !important;
    color: var(--lite-pin) !important;
    box-shadow: none !important;
}

body.lite-mode div.thought-orb.is-pinned-top .th-project-label {
    background: #000 !important;
    color: var(--lite-pin) !important;
    border: 1px solid #000 !important;
}


/* =========================================================
   ✨ THE ARTIFACT: WELL-LINKED ORBS & MEDIA SHAPES
   Placed beneath tasks for base absolute parent-chain specificity
========================================================= */

/* 1. Global Shape Silhouettes (Geometry Only - No Colors) */
body div.thought-orb.is-well-orb { border-radius: 12px 4px 12px 4px !important; } /* Fallback */

body div.thought-orb.is-well-orb[data-art-type="book"] { 
    border-radius: 4px 18px 18px 4px !important; border-left-width: 6px !important; 
}
body div.thought-orb.is-well-orb[data-art-type="film"] { 
    border-radius: 6px !important; border-top-width: 4px !important; border-top-style: dashed !important; border-bottom-width: 4px !important; border-bottom-style: dashed !important; 
}
body div.thought-orb.is-well-orb[data-art-type="game"] { 
    border-radius: 24px 6px 24px 6px !important; 
}
body div.thought-orb.is-well-orb[data-art-type="audio"] { 
    border-radius: 24px !important; border-width: 4px !important; border-style: double !important; 
}
body div.thought-orb.is-well-orb[data-art-type="playbook"] { 
    border-radius: 4px 12px 12px 4px !important; border-left-width: 6px !important; border-left-style: double !important; 
}
body div.thought-orb.is-well-orb[data-art-type="poetry"] { 
    border-radius: 2px 16px 2px 16px !important; 
}
body div.thought-orb.is-well-orb[data-art-type="sculpture"] { 
    border-radius: 12px 0 12px 0 !important; border-right-width: 5px !important; border-bottom-width: 5px !important; 
}


/* 2. Normal Mode: Unpinned (Floating Art) */
body:not(.lite-mode) div.thought-orb.is-well-orb {
    /* Slight tint of the artifact hue infused into the dark background */
    background: color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 12%, color-mix(in srgb, var(--bgMid, #05070a) 85%, rgb(var(--circadian-dark, 5,5,8)))) !important;
    border: 2px solid color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 60%, rgba(255,255,255,0.2)) !important;
    
    /* ✨ TRIGONOMETRIC HIGHLIGHT */
    box-shadow: inset calc(sin(var(--bgAngle, 180deg)) * 2px) calc(cos(var(--bgAngle, 180deg)) * -2px) 0 color-mix(in srgb, var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) 50%, rgba(255,255,255,0.2)),
                inset calc(sin(var(--bgAngle, 180deg)) * 15px) calc(cos(var(--bgAngle, 180deg)) * -15px) 30px -15px color-mix(in srgb, rgb(var(--circadian-bright, 255,255,255)) 10%, transparent) !important;
                
    padding: 6px 14px !important; 
    max-width: 130px !important;
    max-height: 40px;
}

body:not(.lite-mode) div.thought-orb.is-well-orb:hover {
    border-color: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
    background: color-mix(in srgb, var(--pin-color) 25%, var(--bgMid, #05070a)) !important;
}

body:not(.lite-mode) div.thought-orb.is-well-orb .th-text {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* 3. Normal Mode: Pinned Top (Solid Artifact) */
body:not(.lite-mode) div.thought-orb.is-well-orb.is-pinned-top {
    background: var(--pin-color, rgb(var(--circadian-accent, 85,221,255))) !important;
    border-color: #000 !important; /* Cascades across all geometry border modifiers safely */
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3) !important;
}

body:not(.lite-mode) div.thought-orb.is-well-orb.is-pinned-top .th-text {
    color: #000 !important;
    text-shadow: none !important;
    font-weight: 900 !important;
}


/* =========================================================
   ✨ LITE MODE ARTIFACT ANCHORS
   ========================================================= */

/* 4. Lite Mode: Unpinned (Airy Wash) */
body.lite-mode div.thought-orb.is-well-orb {
    background: color-mix(in srgb, var(--lite-pin) 8%, var(--lite-shell-bg)) !important;
    border: 2px solid color-mix(in srgb, var(--lite-pin) 80%, transparent) !important;
    padding: 6px 14px !important; 
    max-width: 130px !important;
    box-shadow: none !important;
}

body.lite-mode div.thought-orb.is-well-orb .th-text {
    color: color-mix(in srgb, var(--lite-text) 30%, var(--lite-pin)) !important;
    text-shadow: none !important;
    font-weight: 800 !important;
}

body.lite-mode div.thought-orb.is-well-orb:hover {
    background: color-mix(in srgb, var(--lite-pin) 15%, var(--lite-shell-bg)) !important;
    border-color: var(--lite-pin) !important;
}

body.lite-mode div.thought-orb.is-well-orb:hover .th-text {
    color: var(--lite-text) !important;
}

/* 5. Lite Mode: Pinned Top (Solid Anchor) */
body.lite-mode div.thought-orb.is-pinned-top.is-well-orb {
    background: var(--lite-pin) !important;
    border-color: var(--lite-pin) !important; 
}

body.lite-mode div.thought-orb.is-pinned-top.is-well-orb .th-text {
    color: #000 !important; 
    font-weight: 900 !important;
    text-shadow: none !important;
}

/* =========================================================
   ✨ RESONANCE PING: FADE-IN FOR RETURNING THOUGHTS
   ========================================================= */
@keyframes thoughtPingFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); filter: brightness(2) contrast(1.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); filter: brightness(1.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
}

.thought-orb.is-pinging {
    animation: thoughtPingFade 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    pointer-events: none; /* Prevent interference during materialization */
}


/* =========================================================
   ✨ RESONANCE ORBS: CIRCADIAN DASH CYCLING
   ========================================================= */

.thought-orb.is-recurring-orb {
    border-color: transparent !important; /* Hide solid border to reveal the aether dash */
}

/* Base State: Thicker, bolder, mapped to the pure accent color */
.thought-orb.is-recurring-orb::before {
    content: "";
    position: absolute;
    inset: -2px; /* Pushed out to accommodate the thicker stroke */
    border-radius: inherit;
    padding: 2px; /* Border thickness doubled */
    background: repeating-linear-gradient(
        -45deg,
        rgb(var(--circadian-accent, 85,221,255)),
        rgb(var(--circadian-accent, 85,221,255)) 10px, /* Dashes lengthened slightly for balance */
        transparent 10px,
        transparent 20px
    );
    /* Mask out the center to only show the padding stroke */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 200% 200%;
    animation: recurDashCycle 20s linear infinite; /* Slightly faster idle drift */
    pointer-events: none;
    z-index: 10;
    opacity: 0.85; /* Boosted base visibility */
    transition: opacity 0.3s ease, background 0.3s ease, filter 0.3s ease;
}

/* Hover State: Accelerated, blindingly bright, glowing */
.thought-orb.is-recurring-orb:hover::before {
    opacity: 1;
    background: repeating-linear-gradient(
        -45deg,
        #fff, 
        #fff 10px,
        transparent 10px,
        transparent 20px
    );
    animation: recurDashCycle 10s linear infinite;
    /* Added a subtle glow that bleeds outside the mask */
    filter: drop-shadow(0 0 6px color-mix(in srgb, rgb(var(--circadian-accent, 85,221,255)) 80%, transparent));
}

@keyframes recurDashCycle {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

/* Lite Mode Overrides: Flattened, zero-glow, explicit pin colors */
body.lite-mode .thought-orb.is-recurring-orb::before {
    background: repeating-linear-gradient(
        -45deg,
        var(--lite-pin),
        var(--lite-pin) 8px,
        transparent 8px,
        transparent 16px
    ) !important;
    opacity: 0.9;
    animation-duration: 15s;
    filter: none !important;
}

body.lite-mode .thought-orb.is-recurring-orb:hover::before {
    opacity: 1;
    animation-duration: 8s;
}

/* =========================================================
   ✨ WORK MODE TASK ANCHORS & THOUGHTS (HIGH CONTRAST OUTLINES)
   ========================================================= */

body.is-work-mode .thought-orb {
    background: color-mix(in srgb, rgb(var(--circadian-dark, 5,5,8)) 95%, var(--pin-color, var(--capsuleAccent, #88ccff))) !important;
    border: 3px solid var(--pin-color, var(--capsuleAccent, #88ccff)) !important;
    box-shadow: none !important;
    transition: background 1.2s ease, border-color 0.5s ease !important;
}

body.is-work-mode .thought-orb .th-text {
    color: var(--lite-text, #fff) !important;
    font-weight: 800 !important;
    text-shadow: none !important;
}

body.is-work-mode .thought-orb:hover {
    background: color-mix(in srgb, var(--pin-color, var(--capsuleAccent, #88ccff)) 15%, rgb(var(--circadian-dark, 5,5,8))) !important;
}

body.is-work-mode div.thought-orb.is-task-orb {
    border: 3px solid var(--pin-color, var(--capsuleAccent, #88ccff)) !important;
    background: rgb(var(--circadian-dark, 5,5,8)) !important;
}

body.is-work-mode div.thought-orb.is-task-orb:hover {
    background: color-mix(in srgb, var(--pin-color, var(--capsuleAccent, #88ccff)) 15%, rgb(var(--circadian-dark, 5,5,8))) !important;
}

body.is-work-mode div.thought-orb.is-pinned-top {
    background: var(--pin-color, var(--capsuleAccent, #88ccff)) !important;
}
body.is-work-mode div.thought-orb.is-pinned-top .th-text {
    color: #000 !important;
}