/* ============ KILLS SCROLL BLEED FROM ZOOMED BODY WIDTH & PADDING =============== */

html {
  overflow-x: hidden;
}

:root {
  --afc-task-drc-blue: #00a2ff;
  --afc-task-drc-blue-soft: rgba(0, 162, 255, 0.7);
  --afc-task-drc-blue-faint: rgba(0, 162, 255, 0.08);
  --afc-task-creative-gold: #ffb450;
  --afc-task-creative-gold-soft: rgba(255, 180, 80, 0.7);
  --afc-task-creative-gold-faint: rgba(255, 180, 80, 0.10);
}

/* ============================================================
   1. BASE & ANIMATIONS
   ============================================================ */
    
    body {
      padding: 15px 30px 0px 30px;
      font-family: Arial, sans-serif;
      background: linear-gradient(135deg, #e8f0f7, #fdfdfd);
      position: relative;
      min-height: 100%;
    }
    
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background: url('/images/justDrumForChromeHomePage.png') no-repeat center 88%;
      background-size: 400px;
      opacity: 0.30;
      pointer-events: none;
      z-index: -1;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    
    .hidden { display: none !important; }
    .fade-out { opacity: 0; transition: opacity 0.2s ease-out; }
    .fade-in  { opacity: 1; transition: opacity 0.2s ease-in; }
    

/* ============================================================
   2. DASHBOARD HEADER
   ============================================================ */
    
    .header-normal {
      background: rgba(15, 15, 30, 0.92);
    }
    
    .header-normal::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      width: 110%;
      height: 100%;
      background-color: rgba(15, 15, 30, 0.92);
      background-image: url('/images/phoenixBook1.png');
      background-repeat: no-repeat;
      background-size: cover;
      background-position: 90% 82%;
      opacity: 0.25;
      pointer-events: none;
      z-index: 0;
    }
    
    .db-header {
      position: fixed;
      top: 10px;
      left: 15px;
      right: 15px;
      z-index: 1000;
      width: auto;
      display: flex;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: center;
      padding: 10px 16px;
      gap: 16px;
      border-radius: 14px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.8);
      margin-bottom: 20px;
      overflow: hidden;
    }
    
    .db-header-left {
      flex: 0 0 500px;
    
      display: flex !important;
      flex-direction: column;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      position: relative;
      left: 20px;
      padding-right: 30px;
    }
    
    .db-header-right {
      flex: 0 0 500px;
    
      display: flex !important;
      flex-direction: column;
      align-items: flex-end !important;
      justify-content: space-between;
      gap: 12px;
      position: relative;
      right: -20px;
      padding-left: 30px;
    }
    
    .db-header-center {
      flex: 0 0 auto;
      display: flex !important;
      flex-direction: column;
      align-items: center !important;
      justify-content: center !important;
      gap: 4px;
      position: relative;
      z-index: 10000;
    }
    
    .db-logo {
      height: 100px;
      max-height: 80px;
      width: auto;
      object-fit: contain;
      filter: drop-shadow(0 1px 2px rgba(255,255,255,0.2));
    }
    
    .db-title {
      font-size: 68px;
      font-weight: bold;
      color: #ffffff;
      margin: 0;
      letter-spacing: 20px;
      text-shadow: inset 0 2px 4px rgba(0,0,0,0.9);
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }
    
    .db-catchPhrase {
      font-size: .8rem;
      font-weight: bold;
      color: rgba(255,255,255,0.8);
      margin: 0;
      letter-spacing: 24.5px;
      text-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }


/* ============================================================
   3. DASHBOARD GRID & BLOCKS
   ============================================================ */

    .dashboard {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 12px;
      margin-bottom: 20px;
      margin-top: 210px;
    }
    
    body.compact-mode .dashboard {
      margin-top: 10px;
    }
    
    body.compact-mode .category-container {
      height: calc(var(--scaled-100vh, 100vh) - 220px);
    }
    
    .category-container {
      border-radius: 12px;
      padding: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.8);
      display: flex;
      flex-direction: column;
      flex: 1;
    }
    
    .category-header {
      position: relative;
      font-size: 18px;
      font-weight: 700;
      letter-spacing: 1.2px;
      margin: 0 0 20px 0;
      padding-bottom: 12px;
      border-bottom: 2px solid #ccc;
      color: #333;
      cursor: default;
    }
    
    .category-label {
      user-select: none;
      cursor: default;
    }
    
    .category-groups {
      display: flex;
      flex-direction: column;
      gap: 16px;
      flex: 1;
    }
    
    .category-groups .block {
      width: auto;
      min-height: auto;
      background: #e0e0e0;
      border-radius: 8px;
      padding: 12px;
      box-shadow: none;
      flex: none;
    }
    
    .block {
      width: 250px;
      min-height: 260px;
      border-radius: 14px;
      padding: 20px;
      background: rgba(180,180,180,0.45);
      box-shadow: 0 2px 4px rgba(0,0,0,0.8);
      display: flex;
      flex-direction: column;
      gap: 12px;
      animation: fadeIn 0.6s ease;
      flex: 1 1 250px;
      position: relative;
      overflow: visible;
    }
    
    .block h2 {
      margin: 0 0 6px 0;
      font-size: 1.1rem;
      color: #222;
      text-align: center;
      letter-spacing: 0.5px;
    }
    
    .category-edit-pencil {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      opacity: 0;
      font-size: 0.85em;
      color: #aaa;
      cursor: pointer;
      transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }
    
    .category-header:hover .category-edit-pencil { opacity: 1; }
    
    .category-edit-pencil:hover {
      color: #666;
      transform: translateY(-50%) scale(1.2);
    }
    
    .st-heading {
      font-size: 18px;
      font-weight: 700;
      letter-spacing: 1.2px;
      margin: 0 0 20px 0;
      padding-bottom: 12px;
      border-bottom: 2px solid #999;
      color: #333;
      cursor: default;
      text-transform: none;
    }
    
    #firestoreDrcContainer h2 {
      font-size: 18px;
      font-weight: 700;
      letter-spacing: 1.2px;
      margin: 0 0 20px 0;
      padding-bottom: 12px;
      border-bottom: 2px solid #999;
      color: #333;
      cursor: default;
    }
    
    .category-container {
      height: calc(var(--scaled-100vh, 100vh) - 320px);
      overflow-y: auto;
      overflow-x: visible;
      scrollbar-width: none;
    }
    
    .block.workflow,
    #firestoreDrcContainer {
      height: auto;
      max-height: none;
      overflow-y: visible;
      flex: 0 0 250px;
    }
    
    .category-container::-webkit-scrollbar,
    .block.workflow::-webkit-scrollbar,
    #firestoreDrcContainer::-webkit-scrollbar {
      display: none;
    }


/* ============================================================
   4. CONSOLE LINKS
   ============================================================ */

.links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.link {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  padding: 6px 10px;
  text-decoration: none;
  color: #222;
  font-size: 0.78rem;
  font-weight: bold;
  transition: transform 0.18s ease, background 0.25s ease;
}

.link:hover {
  transform: translateY(-1px);
  background: #fff;
}

.icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0f4ff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.20), 0 2px 4px rgba(0,0,0,0.12);
}

.icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ============================================================
   5. CONSOLE LINK ICONS
   ============================================================ */

.console-link-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.console-link-wrap > .link {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-right: 48px;
}

.console-edit-pencil,
.console-delete-btn {
  opacity: 0;
  font-size: 0.85em;
  color: #aaa;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.console-link-wrap:hover .console-edit-pencil,
.console-link-wrap:hover .console-delete-btn { opacity: 1; }

.console-edit-pencil {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
}

.console-edit-pencil:hover {
  color: #666;
  transform: translateY(-50%) scale(1.2);
}

.console-delete-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a05555;
}

.console-delete-btn:hover {
  color: #c00;
  transform: translateY(-50%) scale(1.2);
}


/* ============================================================
   6. COLLAPSIBLE HEADERS & GROUP ICONS
   ============================================================ */

.category-groups .collapsible-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.collapsible-header .arrow {
  font-size: 0.85rem;
  color: #999;
  opacity: 0.6;
  margin-right: 4px;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.collapsible-header:hover .arrow {
  opacity: 1;
  color: #333;
}

.header-edit-hint,
.collapsible-header .console-add-btn,
.collapsible-header .console-delete-btn {
  opacity: 0;
  font-size: 0.85em;
  color: #aaa;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.collapsible-header:hover .header-edit-hint,
.collapsible-header:hover .console-add-btn,
.collapsible-header:hover .console-delete-btn { opacity: 1; }

.header-edit-hint {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
}

.header-edit-hint:hover {
  color: #666;
  transform: translateY(-50%) scale(1.2);
}

.collapsible-header .console-add-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(74,144,226,0.1);
  border: 1px solid rgba(74,144,226,0.3);
  border-radius: 4px;
  color: #4a90e2;
  font-weight: bold;
  padding: 4px 6px;
}

.collapsible-header .console-add-btn:hover {
  background: rgba(74,144,226,0.2);
  border-color: #4a90e2;
  transform: translateY(-50%) scale(1.1);
}

.collapsible-header .console-delete-btn {
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  color: #a05555;
}

.collapsible-header .console-delete-btn:hover {
  color: #c00;
  transform: translateY(-50%) scale(1.2);
}


/* ============================================================
   7. FAB - ADD GROUP BUTTON
   ============================================================ */

.fab-add-group {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(102,126,234,0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.fab-add-group:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 24px rgba(102,126,234,0.6);
}

.fab-tooltip {
  position: absolute;
  right: 80px;
  background: #333;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.fab-add-group:hover .fab-tooltip { opacity: 1; }

#groupEditOverlay {
  position: fixed;
  z-index: 10000;
}

#groupEditOverlay .cec-row select {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23e0e0e0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

#groupEditOverlay .cec-row select option {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

#groupEditOverlay .cec-row select:focus {
  outline: none;
  border-color: #666;
}

#groupEditOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 40px;
  z-index: 10000;
}
#groupEditOverlay[hidden] { display: none; }


/* ============================================================
   8. CONSOLE EDIT OVERLAY
   ============================================================ */

#consoleEditOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 40px;
  z-index: 9999;
}

#consoleEditOverlay[hidden] { display: none; }

.console-edit-card {
  margin-top: auto;
  margin-bottom: 40px;
  width: 340px;
  background: #1a1a2e;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: #e0e0e0;
}

.cec-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.cec-row label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.5;
  margin-bottom: 5px;
  color: #aaa;
}

.cec-row input,
.cec-row select,
.cec-row textarea {
  font-size: 13px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #e0e0e0;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.cec-row input:focus,
.cec-row select:focus,
.cec-row textarea:focus {
  border-color: #00a2ff;
  background: rgba(0,162,255,0.08);
}

.cec-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cec-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.cec-actions button:first-child { background: #00a2ff; color: white; }
.cec-actions button:last-child  { background: #444; color: #ccc; }


/* ============================================================
   9. CONSOLE TOOLTIP
   ============================================================ */

#consoleTooltip {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
}

#consoleTooltip[hidden] { display: none; }

.console-tooltip-card {
  max-width: 260px;
  background: rgba(15,15,20,0.96);
  color: #e8e8e8;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  white-space: pre-wrap;
  backdrop-filter: blur(4px);
}


/* ============================================================
   10. SORTABLE DRAG STATES
   ============================================================ */

.sortable-ghost {
  opacity: 0.3;
  background: #c8ebfb;
  border-radius: 10px;
}

.sortable-chosen { box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.sortable-drag   { opacity: 0.9; }


/* ============================================================
   11. RITUAL TIMER (RT)
   ============================================================ */

.ritual-timer {
  background: transparent;
  color: #fff;
  border-radius: 14px;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  width: 260px;
  box-sizing: border-box;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.rt-label-row {
  position: relative;
  align-self: center;
  width: 260px;
  height: 100px;
}

.rt-top-label {
  position: absolute;
  width: 260px;
  text-align: center;
  left: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 35px;
  text-indent: 18px;
  color: rgba(180,180,180,0.6);
  z-index: 1;
}

.rt-bottom-label {
  position: absolute;
  width: 260px;
  text-align: center;
  left: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 35px;
  text-indent: 26px;
  color: rgba(180,180,180,0.6);
  z-index: 1;
}


.rt-top-label    { top: 6px; }
.rt-bottom-label { bottom: 6px; }

#ritual-counter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 2.4rem;
  font-weight: bold;
  background: rgba(255,255,255,0.9);
  color: #1a1a2e;
  padding: 10px 24px;
  border-radius: 10px;
  letter-spacing: 2px;
  width: 260px;
  height: 100px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
  border: 1px solid #444;
  transition: color 0.3s ease;
}

.timer-controls {
  width: 260px;
}

.cockpit-btn-group {
  display: flex;
  gap: 6px;
  justify-content: center;
  width: 260px;
}

#intervalButtons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  width: 280px;
  gap: 4px;
  position: relative;
  left: -8px;
}

.time-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  width: 360px;
}

.time-options button {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.90) 0%,
    rgba(200,200,210,0.70) 45%,
    rgba(180,180,195,0.80) 50%,
    rgba(220,220,230,0.90) 100%
  );
  border: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(150,150,160,0.5);
  border-radius: 50px;
  color: #333;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(0,0,0,0.08);
  transition: background 0.15s ease, transform 0.1s ease;
}

.time-options button:hover:not(.interval-locked):not(.active) {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,1.0) 0%,
    rgba(215,215,225,0.85) 45%,
    rgba(195,195,210,0.95) 50%,
    rgba(235,235,245,1.0) 100%
  );
}

.time-options button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 2px 4px rgba(0,0,0,0.15);
}

.time-options button.active {
  background: linear-gradient(
    180deg,
    rgba(100,160,255,1.0) 0%,
    rgba(60,120,220,0.95) 45%,
    rgba(40,100,200,1.0) 50%,
    rgba(80,140,240,1.0) 100%
  );
  border-color: rgba(40,100,200,0.9);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,80,0.4);
  box-shadow:
    0 2px 6px rgba(40,100,200,0.5),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.time-options button.interval-locked,
#intervalButtons button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* RT States */

.ritual-timer.running #ritual-counter { color: #1a4a2e; }
.ritual-timer.idle    #ritual-counter { color: #1a1a2e; }

.ritual-timer.paused #ritual-counter {
  color: #8a5a00;
}

.ritual-timer.timesup {
  box-shadow: 0 0 0 3px rgba(220,38,38,0.6), 0 4px 12px rgba(0,0,0,0.25);
}

.ritual-timer.timesup #ritual-counter {
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255,68,68,0.9), 0 0 20px rgba(255,68,68,0.5);
}


/* ============================================================
   12. SESSION TRACKER (ST)
   ============================================================ */

#sessionTracker {
  background: transparent;
  border-radius: 10px;
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

#sessionTracker .st-heading {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin: 0 0 12px 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

#sessionTracker .section-label {
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #555;
  margin: 16px 0 6px 0;
  text-transform: uppercase;
}

#sessionTracker .date-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #777;
  margin: 10px 0 4px 0;
}

#today-container,
#history-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  font-size: 0.9rem;
  color: #222;
  line-height: 1.3;
}

.session-entry .entry-left,
.entry-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  min-width: 0;
}

.session-entry .tick-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--afc-task-drc-blue);
  box-shadow: 0 0 0 1px #bbb;
  flex-shrink: 0;
}

.session-entry .tick-icon.tick-icon-drc {
  background: var(--afc-task-drc-blue);
  box-shadow: 0 0 0 1px rgba(0, 162, 255, 0.35);
}

.session-entry .tick-icon.tick-icon-creative {
  background: var(--afc-task-creative-gold);
  box-shadow: 0 0 0 1px rgba(255, 180, 80, 0.40);
}

.session-entry .entry-text {
  font-size: 0.8rem;
  color: #aea8a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-time,
.session-entry .entry-time {
  font-size: 0.75rem;
  color: #666;
  margin-left: 4px;
  white-space: nowrap;
  opacity: 0.8;
  min-width: 48px;
  text-align: right;
}

.session-entry .delete-btn,
.delete-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-entry .delete-icon,
.delete-icon {
  color: #c00;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1;
  pointer-events: none;
}

#sessionTracker .button-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

#sessionTracker .button-row .btn-group {
  display: flex;
  gap: 6px;
}

#sessionTracker .button-row .btn-group .cockpit-btn { flex: 1; }

#sessionTracker .button-row .btn-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin: 0;
}

#st-readouts-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.st-readout-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.st-readout-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: #333;
}

.st-readout-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

#pt-bar .st-progress-bar-fill {
  background: linear-gradient(90deg, #3d8b40 0%, #6fd46f 30%, #4caf50 70%, #3d8b40 100%);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#atrt-bar .st-progress-bar-fill {
  background: linear-gradient(90deg, #1976d2 0%, #72c4f5 30%, #42a5f5 70%, #1976d2 100%);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#dt-bar .st-progress-bar-fill {
  background: linear-gradient(90deg, #757575 0%, #bdbdbd 30%, #9e9e9e 70%, #757575 100%);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.st-progress-bar {
  grid-column: 1 / span 2;
  position: relative;
  width: 100%;
  height: 8px;
  background: #d9d9d9;
  border-radius: 6px;
  overflow: visible;
  margin-top: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.5);
}

.st-progress-bar-fill {
  height: 100%;
  transition: width 0.15s linear;
}

#sessionTimerBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.st-digital-small {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 550;
  letter-spacing: 1px;
  color: #00aa66;
  background: rgba(255,255,255,0.9);
  padding: 4px 10px;
  border-radius: 10px;
  border: 0px solid #444;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
  width: 85%;
  box-sizing: border-box;
  text-align: center;
  margin: 10px 0;
}

.st-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  justify-content: center;
}

.st-btn-row .cockpit-btn { flex: 1 0 auto; }

.st-timer-display-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.st-label {
  text-align: center;
  font-weight: bold;
}

.st-led {
  width: 6px;
  height: 6px;
  background-color: #ff2222;
  border-radius: 50%;
  box-shadow: 0 0 6px #ff2222;
}





/* ============================================================
   13. DAILY RITUAL CHECKLIST (DRC)
   ============================================================ */

.checklist-items,
#drcList {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.checklist-item,
.drc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  padding: 4px 6px 4px 10px;
  font-size: 0.7rem;
  color: #222;
  border-right: 9px solid var(--afc-task-drc-blue);
  transition: opacity 0.3s ease, background 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

.checklist-item input[type="checkbox"],
.drc-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.checklist-item.completed,
.drc-item.completed {
  opacity: 0.55;
  position: relative;
  border-right: 9px solid var(--afc-task-drc-blue);
  background: var(--afc-task-drc-blue-faint);
}

.checklist-item.completed::after,
.drc-item.completed::after {
  content: "✓";
  color: var(--afc-task-drc-blue);
  font-weight: bold;
  position: absolute;
  right: 10px;
  font-size: 1rem;
}

.task-label[contenteditable="true"] {
  border: 1px dashed rgba(0,162,255,0.6);
  border-radius: 4px;
  padding: 1px 5px;
  background: rgba(0,162,255,0.05);
  cursor: text;
  outline: none;
}

.task-label[contenteditable="true"]:focus {
  border-color: #00a2ff;
  background: rgba(0,162,255,0.1);
}

.drc-completed-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--afc-task-drc-blue);
  margin-top: 10px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border-top: 1px solid rgba(0,162,255,0.3);
  padding-top: 8px;
}

.src-controls-row {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 8px;
}

@keyframes taskComplete {
  0%   { transform: translateY(0);    opacity: 1; }
  15%  { transform: translateY(-8px); opacity: 1; }
  100% { transform: translateY(320px); opacity: 0; }
}

.checklist-item.just-completed {
  animation: taskComplete 1.0s ease-in forwards;
  pointer-events: none;
}

/* ============================================================
   13a. EQ OVERLAY
   ============================================================ */

    #wsOverlayBackdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.55);
      z-index: 9998;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: wsOverlayFadeIn 0.25s ease forwards;
    }
    
    #wsOverlayBackdrop.closing {
      animation: wsOverlayFadeOut 0.2s ease forwards;
    }
    
    @keyframes wsOverlayFadeIn {
      from { opacity:0; }
      to   { opacity:1; }
    }
    
    @keyframes wsOverlayFadeOut {
      from { opacity:1; }
      to   { opacity:0; }
    }
    
    #wsOverlayPanel {
      background: rgb(17,20,38);
      border: 1px solid rgba(255,180,80,0.25);
      border-radius: 16px;
      padding: 20px 24px;
      width: 960px;
      max-width: 90vw;
      min-height: 520px;
      scrollbar-width: none;
      box-shadow: 0 24px 64px rgba(0,0,0,0.9);
      display: flex;
      flex-direction: column;
      gap: 16px;
      animation: wsOverlaySlideIn 0.35s cubic-bezier(0.34,1.1,0.64,1) forwards;
    }
    
    #wsOverlayPanel::-webkit-scrollbar { display: none; }
    
    @keyframes wsOverlaySlideIn {
      from { opacity:0; transform:scale(0.96); }
      to   { opacity:1; transform:scale(1); }
    }
    
    .ws-ov-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .ws-ov-title {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 2px;
      color: rgba(255,180,80,0.6);
      text-transform: uppercase;
    }
    
    .ws-ov-close {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 6px;
      color: rgba(255,255,255,0.5);
      cursor: pointer;
      font-size: 12px;
      padding: 4px 10px;
      transition: all 0.2s;
    }
    
    .ws-ov-close:hover {
      background: rgba(255,255,255,0.12);
      color: #fff;
    }
    
    .ws-ov-coach {
      border-radius: 8px;
      padding: 10px 14px;
      background: rgba(0,0,0,0.3);
    }
    
    .ws-ov-coach-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 1px;
      margin-bottom: 3px;
      text-transform: uppercase;
    }
    
    .ws-ov-coach-text {
      font-size: 11px;
      color: rgba(255,255,255,0.55);
      line-height: 1.5;
      font-style: italic;
    }
    
    .ws-ov-cols {
      display: flex;
      gap: 32px;
      align-items: stretch;
      flex: 1;
    }
    
    .ws-ov-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 12px;
      justify-content: space-between;
    }
    
    .ws-ov-col-title {
      font-size: 8px;
      color: rgba(255,255,255,0.25);
      letter-spacing: 1.5px;
      text-transform: uppercase;
      border-bottom: 1px solid rgba(255,180,80,0.08);
      padding-bottom: 6px;
    }
    
    .ws-ov-bar-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .ws-ov-bar-track {
      flex: 1;
      height: 4px;
      background: rgba(255,255,255,0.06);
      border-radius: 2px;
    }
    
    .ws-ov-bar-fill {
      height: 100%;
      border-radius: 2px;
      background: #ffb450;
      box-shadow: 0 0 4px rgba(255,180,80,0.4);
    }
    
    .ws-ov-bar-fill.green {
      background: #00ff88;
      box-shadow: 0 0 4px rgba(0,255,136,0.4);
    }
    
    .ws-ov-bar-fill.muted {
      background: #444;
      box-shadow: none;
    }
    
    .ws-ov-tod-wrap {
      display: flex;
      align-items: flex-end;
      gap: 4px;
      height: 80px;
    }
    
    .ws-ov-tod-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }
    
    .ws-ov-tod-bar {
      width: 100%;
      border-radius: 3px 3px 0 0;
      transition: height 0.4s ease;
    }
    
    .ws-ov-tod-label {
      font-size: 6px;
      color: rgba(255,255,255,0.2);
      text-align: center;
    }
    
    .ws-ov-quote {
      font-size: 8px;
      color: rgba(255,180,80,0.2);
      font-style: italic;
      line-height: 1.7;
      text-align: center;
      padding: 8px 4px;
      border-top: 1px solid rgba(255,180,80,0.06);
      margin-top: auto;
    }
    
    .ws-ov-spark-label {
      font-size: 7px;
      font-weight: 700;
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 2px;
    }

/* ============================================================
   13b. DRC INFO BUTTON & CARD
   ============================================================ */

/* DRC tooltip anti-flicker hardening */

    .drc-info-wrap {
      position: relative;
      margin-left: auto;
      flex: 0 0 16px;
      width: 16px;
      height: 16px;
      flex-shrink: 0;
    }
    
    .drc-info-card {
      display: block;
      visibility: hidden;
      opacity: 0;
      position: absolute;
      right: 0;
      bottom: calc(100% + 6px);
      width: 220px;
      background: rgb(17, 20, 38);
      border: 1px solid rgba(0,162,255,0.25);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 11px;
      line-height: 1.6;
      color: rgba(255,255,255,0.65);
      box-shadow: 0 8px 24px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
      z-index: 500;
      pointer-events: none;
      transform: translateY(2px);
      transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;
    }
    
    .drc-info-wrap:hover .drc-info-card {
      visibility: visible;
      opacity: 1;
      transform: translateY(0);
      transition-delay: 0s;
    }

    
    .drc-info-btn {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1px solid rgba(0,162,255,0.4);
      background: rgba(0,162,255,0.08);
      color: rgba(0,162,255,0.7);
      font-size: 9px;
      font-weight: 700;
      font-style: italic;
      cursor: default;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      transition: all 0.2s;
      flex-shrink: 0;
    }
    
    .drc-info-btn:hover {
      background: rgba(0,162,255,0.18);
      border-color: rgba(0,162,255,0.8);
      color: #00a2ff;
    }
    

    
    body.dark-mode .drc-info-btn {
      border-color: rgba(0,255,136,0.3);
      background: rgba(0,255,136,0.06);
      color: rgba(0,255,136,0.6);
    }
    
    body.dark-mode .drc-info-btn:hover {
      background: rgba(0,255,136,0.14);
      border-color: rgba(0,255,136,0.7);
      color: #00ff88;
    }
    
    body.dark-mode .drc-info-card {
      border-color: rgba(0,255,136,0.2);
      box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,255,136,0.05);
    }


/* ============================================================
   14. SCRATCHPAD
   ============================================================ */

#scratchpad-container {
  background: transparent;
  color: #fff;
  border-radius: 14px;
  padding: 0;
  box-shadow: none;
  width: 360px;
  height: 131px;
  min-width: 360px;
  max-width: 360px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  resize: both;
  overflow: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

#scratchpad-container::-webkit-scrollbar { display: none; }

.scratchpad-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  gap: 8px;
  cursor: move;
  flex-shrink: 0;
  box-sizing: border-box;
  align-self: center;
}

.scratchpad-title {
  flex: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #f5f5f5;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin: 0;
}

#scratchpad {
  flex: 1 1 auto;
  height: 0;
  min-height: 80px;
  width: 260px;
  align-self: center;
  resize: none;
  padding: 6px 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  background: rgba(255,255,255,0.9);
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
  box-sizing: border-box;
  overflow-x: hidden;
  scrollbar-width: none;
}

#scratchpad::-webkit-scrollbar { display: none; }
#scratchpad { -ms-overflow-style: none; }

#scratchpad-container.floating {
  position: fixed;
  z-index: 1001;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.35);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  resize: both;
  overflow-y: auto;
  overflow-x: hidden !important;
  width: 420px;
  max-width: none;
  max-height: none;
  min-width: 340px;
  min-height: 340px;
  height: auto;
  padding: 10px 16px;
  cursor: default;
}

#scratchpad-container.floating .scratchpad-title {
  color: #1a1a2e;
  text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

#scratchpad-container.floating #scratchpad {
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
  background: rgba(255,255,255,0.97);
  resize: none;
}

#scratchpad-container {
  height: auto;
  min-height: 131px;
  resize: none;
}

#scratchpad {
  resize: vertical;
}


/* ============================================================
   15. GOOGLE SEARCH BAR
   ============================================================ */

#search-bar-container {
  width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#googleSearchInput {
  width: 260px;
  min-width: 120px;
  max-width: 260px;
  height: 28px;
  font-size: 0.8rem;
  text-align: center;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
  box-sizing: border-box;
}

#googleSearchBtn {
  height: 28px;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50px;
  background: linear-gradient(180deg, rgba(255,255,255,0.90) 0%, rgba(200,200,210,0.70) 45%, rgba(180,180,195,0.80) 50%, rgba(220,220,230,0.90) 100%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.95);
  cursor: pointer;
}


/* ============================================================
   16. COCKPIT BUTTONS
   ============================================================ */

.cockpit-btn {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.90) 0%,
    rgba(200,200,210,0.70) 45%,
    rgba(180,180,195,0.80) 50%,
    rgba(220,220,230,0.90) 100%
  );
  border: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(150,150,160,0.5);
  border-radius: 50px;
  color: #333;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 5px 14px;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(0,0,0,0.08);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  user-select: none;
  text-transform: uppercase;
  min-height: 28px;
}

.cockpit-btn:hover:not(:disabled) {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,1.0) 0%,
    rgba(215,215,225,0.85) 45%,
    rgba(195,195,210,0.95) 50%,
    rgba(235,235,245,1.0) 100%
  );
  box-shadow:
    0 3px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,0.06);
}

.cockpit-btn:active:not(:disabled) {
  background: linear-gradient(
    180deg,
    rgba(180,180,195,0.90) 0%,
    rgba(210,210,220,0.80) 50%,
    rgba(230,230,240,0.90) 100%
  );
  box-shadow:
    0 1px 2px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(0,0,0,0.1);
  transform: translateY(1px);
}

.cockpit-btn.btn-toggled {
  background: linear-gradient(
    180deg,
    rgba(180,195,220,0.95) 0%,
    rgba(140,165,200,0.85) 45%,
    rgba(120,148,190,0.90) 50%,
    rgba(160,185,215,0.95) 100%
  );
  border-color: rgba(100,140,200,0.6);
  color: #1a2a4a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(0,0,50,0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.cockpit-btn:disabled {
  background: linear-gradient(
    180deg,
    rgba(180,180,185,0.5) 0%,
    rgba(160,160,165,0.4) 50%,
    rgba(175,175,180,0.5) 100%
  );
  border-color: rgba(150,150,155,0.3);
  color: rgba(255,255,255,1);
  text-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.5);
}

.cockpit-btn.danger-btn {
  background: linear-gradient(
    180deg,
    rgba(255,220,220,0.95) 0%,
    rgba(220,160,160,0.80) 45%,
    rgba(200,140,140,0.85) 50%,
    rgba(230,180,180,0.95) 100%
  );
  border-color: rgba(200,100,100,0.5);
  color: #7a0000;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.cockpit-btn.danger-btn:hover:not(:disabled) {
  background: linear-gradient(
    180deg,
    rgba(255,200,200,1.0) 0%,
    rgba(230,150,150,0.90) 45%,
    rgba(210,130,130,0.95) 50%,
    rgba(240,170,170,1.0) 100%
  );
}

#sessionTracker .cockpit-btn,
#firestoreDrcContainer .cockpit-btn,
#srcContainer .cockpit-btn,
.ce-trigger-wrap .cockpit-btn {
  padding: 3px 10px;
  font-size: 0.68rem;
  min-height: 28px;
}


/* ============================================================
   17. COMPACT HEADER
   ============================================================ */

.header-compact {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(15, 15, 30, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(0,229,255,0.25);
  border-radius: 12px;
  height: auto;
  min-height: 80px;
  margin-bottom: 14px !important;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.4),
    0 1px 0 rgba(0,229,255,0.1) inset,
    0 -1px 0 rgba(0,229,255,0.15) inset;
  overflow: hidden;
}

.header-compact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/images/phoenixBook1.png');
  background-repeat: no-repeat;
  background-size: 120%;
  background-position: 20% 80%;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.header-compact > * { position: relative; z-index: 1; }

.rt-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
  width: 200px;
  justify-content: flex-end;
  margin-top: -5px;
}

.rt-time {
  font-size: 26px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0,229,255,0.5), 0 0 24px rgba(0,229,255,0.2);
  background: rgba(255,255,255,0.6);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(0,229,255,0.2);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
  min-width: 90px;
  width: 190px;
  text-align: center;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-icon-btns {
  display: flex;
  gap: 4px;
  width: 100%;
  justify-content: center;
}

.compact-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(255,255,255,0.12) 20%,
    rgba(255,255,255,0.12) 80%,
    transparent 100%
  );
  flex-shrink: 0;
}

.center-compact {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.title-compact {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 26px;
  text-indent: 25px;
  text-transform: uppercase;
  user-select: none;

  background: linear-gradient(
    90deg,
    rgba(255,180,120,0.35) 0%,
    rgba(255,140,60,0.40) 35%,
    rgba(255,200,150,0.60) 50%,
    rgba(255,140,60,0.40) 65%,
    rgba(255,180,120,0.25) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-compact {
  width: 100%;
  max-width: 444px;
  height: 26px;
  padding: 4px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 11px;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  text-align: center;
}

.search-compact::placeholder { color: rgba(255,255,255,0.2); }

.search-compact:focus {
  border-color: rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.5);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 0 0 2px rgba(0,229,255,0.08);
}

.search-btn-compact { display: none; }

.sp-compact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
  max-width: 500px;
  flex-shrink: 0;
}

.sp-text {
  width: 200px;
  height: 52px;
  min-height: 52px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-family: monospace;
  font-size: 10.5px;
  line-height: 1.5;
  padding: 4px 8px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
  overflow-y: scroll;
  scrollbar-width: none;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: auto;
  cursor: default;
  resize: vertical;
}

.sp-text::-webkit-scrollbar { display: none; }

#compactSPPopout {
  flex: none;
  width: 80px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

#compactSPPopout:hover {
  background: rgba(0,229,255,0.15);
  border-color: rgba(0,229,255,0.3);
  color: #00e5ff;
}

.icon-btn {
  flex: 1;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.icon-btn:hover {
  background: rgba(0,229,255,0.15);
  border-color: rgba(0,229,255,0.3);
  color: #00e5ff;
}

.toggle-compact-btn {
  position: absolute;
  right: 15px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.toggle-compact-btn:hover {
  background: rgba(0,229,255,0.1);
  color: #00e5ff;
  border-color: rgba(0,229,255,0.3);
}

body.sp-floating .sp-compact {
  display: none;
}

/* ============================================================
   17b. WORK SPINE
   ============================================================ */

    .work-spine {
      flex: 0 0 55px;
      transition: flex-basis 0.4s ease;
      cursor: pointer;
      height: calc(var(--scaled-100vh, 100vh) - 384px);
      background: #1e1e30;
      border: 1px solid #252836;
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 104px 0 0;
      position: relative;
      overflow: visible;
      box-shadow: 0 2px 4px rgba(0,0,0,0.8);
      z-index: 10;
    }

    .work-spine.expanded {
      flex-basis: 255px;
      height: calc(var(--scaled-100vh, 100vh) - 384px);
    }

    .ws-gauge-wrap {
      position: absolute;
      top: -20px;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 100px;
      z-index: 20;
      pointer-events: auto;
      cursor: grab;
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .ws-state-pill {
      position: absolute;
      top: 96px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(12, 14, 28, 0.96);
      border: 1px solid rgba(255,180,80,0.3);
      border-radius: 20px;
      padding: 5px 14px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 2px;
      color: rgba(255,180,80,0.8);
      text-transform: uppercase;
      white-space: nowrap;
      pointer-events: none;
      transition: all 0.3s ease;
      box-shadow:
        0 6px 24px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 12px rgba(255,180,80,0.12);
    }

    .ws-gauge-outer {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      background: #1e1e30;
      border: 1px solid rgba(255,255,255,0.1);
      box-shadow:
        0 6px 24px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 0 22px rgba(255,180,80,0.18);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    @keyframes wsGaugePulse {
      0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.18), 0 0 22px rgba(255,180,80,0.18); }
      50%       { box-shadow: 0 6px 24px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.18), 0 0 40px rgba(255,180,80,0.35); }
    }

    .ws-state-heart {
      display: none;
    }

    #wsGaugeEmoji {
      transform-box: fill-box;
      transform-origin: center;
    }

    @keyframes wsStateBreathe {
      0%, 100% { opacity: 0.55; transform: scale(1); }
      50%       { opacity: 1;    transform: scale(1.4); }
    }

    .ws-author-name {
      position: absolute;
      top: 14px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      z-index: 5;
      width: 100%;
    }

    .ws-author-name span {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: rgba(255,180,80,0.6);
      text-transform: uppercase;
      text-align: center;
      white-space: normal;
      word-break: break-word;
      max-width: 48px;
      display: block;
    }

    .ws-state-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 4px;
      color: rgba(255,180,80,0.8);
      text-transform: uppercase;
      writing-mode: vertical-rl;
      text-orientation: upright;
      z-index: 20;
      margin-top: 8px;
      margin-bottom: 8px;
      transition: opacity 0.3s ease;
    }

    .work-spine.expanded .ws-state-label {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  letter-spacing: 4px;
  font-size: 13px;
  font-weight: 800;
  opacity: 1;
}

    @keyframes wsLabelFadeIn {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    .ws-verts {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      width: 100%;
      flex: 1;
      justify-content: space-between;
      margin-top: 10px;
      margin-bottom: 10px;
      padding: 0 0 4px 0;
    }

    .work-spine.expanded .ws-verts {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      opacity: 0.3;
      pointer-events: none;
      margin: 0;
      padding: 0;
      flex: none;
      width: 100%;
      height: 520px;
      z-index: 0;
      display: flex;
      overflow: hidden;
    }

    .ws-vert {
      width: 30px;
      height: 3px;
      border-radius: 2px;
      background: linear-gradient(90deg, transparent, #6b5030, transparent);
    }

    .ws-vert.on {
      background: linear-gradient(90deg, transparent, #ffb450, transparent);
      box-shadow: 0 0 4px rgba(255,180,80,0.9);
    }

    .ws-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 4px;
      color: rgba(255,255,255,0.4);
      text-transform: uppercase;
      writing-mode: vertical-rl;
      text-orientation: upright;
      margin-top: 8px;
      margin-bottom: 4px;
    }

    .work-spine.expanded .ws-label {
      display: none;
    }

    .ws-collapsed-extras {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 0 16px 0;
    }

    .work-spine.expanded .ws-collapsed-extras {
      display: none;
    }

    .ws-streak {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }

    .ws-streak-value {
      font-size: 14px;
      font-weight: 800;
      color: #ffb450;
      line-height: 1;
    }

    .ws-streak-label {
      font-size: 7px;
      font-weight: 600;
      letter-spacing: 1.5px;
      color: rgba(255,255,255,0.2);
      text-transform: uppercase;
    }

    .ws-sparks {
      display: flex;
      flex-direction: column;
      gap: 5px;
      padding: 0 4px;
    }

    .ws-brain-svg {
      width: 110px;
      height: 110px;
      opacity: 0.15;
      filter: drop-shadow(0 0 5px rgba(120,160,255,0.6));
      position: absolute;
      transform: translateY(-14px);
    }

    .ws-gauge-arc {
      position: absolute;
      bottom: -1px;
      left: -1px;
      width: 102px;
      height: 102px;
      pointer-events: none;
    }

    /* ── EXPANDED CONTENT ── */

    .ws-expanded-content {
      display: none;
      flex-direction: column;
      align-items: stretch;
      width: 100%;
      padding: 0;
      box-sizing: border-box;
      gap: 0;
    }

    .work-spine.expanded .ws-expanded-content {
      display: flex;
      flex: 1;
      min-height: 0;
      position: relative;
      z-index: 1;
      overflow-y: auto;
      justify-content: space-between;
      scrollbar-width: none;
      padding: 0 10px 12px 10px;
      box-sizing: border-box;
    }

    .work-spine.expanded .ws-expanded-content::-webkit-scrollbar {
      display: none;
    }

    /* ── SECTION LABELS & DIVIDERS ── */

    .ws-section-label {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 2px;
      color: rgba(255,180,80,0.4);
      text-transform: uppercase;
      margin: 0px 0 0px 0;
      flex-shrink: 0;
    }

    .ws-divider {
      height: 2px;
      background: rgba(255,180,80,0.25);
      margin: 10px 0;
      flex-shrink: 0;
    }

    /* ── WRITER'S FIGHT TOOLS ── */

    .ws-tools-wrap {
      position: relative;
      min-height: 152px;
      max-height: 152px;
      overflow: visible;
      flex-shrink: 0;
    }

    .ws-tools-scroll {
      display: flex;
      flex-direction: column;
      gap: 4px;
      overflow-y: auto;
      height: 152px;
      max-height: 152px;
      scrollbar-width: none;
    }

    .ws-tools-scroll::-webkit-scrollbar { display: none; }

    .ws-tools-arrow {
      position: absolute;
      left: 0;
      right: 0;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      color: rgba(255,180,80,0.4);
      pointer-events: none;
      z-index: 10;
      transition: opacity 0.2s;
    }

    .ws-tools-arrow.top {
      top: 0;
      background: linear-gradient(rgba(17,20,38,0.95), transparent);
    }

    .ws-tools-arrow.bottom {
      bottom: 0;
      background: linear-gradient(transparent, rgba(17,20,38,0.95));
    }

    .ws-tool-btn {
      width: 100%;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,180,80,0.15);
      border-radius: 7px;
      color: rgba(255,255,255,0.6);
      font-size: 11px;
      font-weight: 600;
      padding: 7px 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
      transition: all 0.2s;
      text-align: left;
      position: relative;
      flex-shrink: 0;
    }

    .ws-tool-btn:hover {
      background: rgba(255,180,80,0.08);
      color: #fff;
      border-color: rgba(255,180,80,0.3);
    }

    .ws-tool-tooltip {
      display: none;
      position: fixed;
      left: 270px;
      transform: translateY(-50%);
      background: rgba(12,14,28,0.98);
      border: 1px solid rgba(255,180,80,0.2);
      border-radius: 6px;
      padding: 5px 10px;
      font-size: 9px;
      color: rgba(255,180,80,0.7);
      white-space: nowrap;
      pointer-events: none;
      z-index: 300;
      letter-spacing: 1px;
    }

    .ws-tool-btn:hover .ws-tool-tooltip {
      display: block;
    }

    /* ── EQ METRICS ── */

    .ws-eq-strip {
      background: rgba(0,0,0,0.25);
      border: 1px solid rgba(255,180,80,0.12);
      border-radius: 8px;
      padding: 10px;
      cursor: pointer;
      transition: border-color 0.2s, opacity 0.2s;
      opacity: 0.15;
      flex-shrink: 0;
    }

    .ws-eq-strip:hover {
      border-color: rgba(255,180,80,0.3);
      opacity: 1;
    }

    .ws-eq-strip-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .ws-eq-stat {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }

    .ws-eq-stat-value {
      font-size: 18px;
      font-weight: 900;
      color: #ffb450;
      line-height: 1;
    }

    .ws-eq-stat-label {
      font-size: 7px;
      color: rgba(255,255,255,0.2);
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    .ws-eq-tap {
      font-size: 8px;
      color: rgba(255,180,80,0.35);
    }

    /* ── WORKS ON THE GO ── */

    .ws-wotg-wrap {
      position: relative;
      min-height: 101px;
      max-height: 101px;
      overflow: hidden;
      flex-shrink: 0;
    }

    .ws-wotg-scroll {
      display: flex;
      flex-direction: column;
      gap: 4px;
      overflow-y: auto;
      height: 101px;
      max-height: 101px;
      scrollbar-width: none;
      padding-bottom: 4px;
    }

    .ws-wotg-scroll::-webkit-scrollbar { display: none; }

    .ws-wotg-arrow {
      position: absolute;
      left: 0;
      right: 0;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      color: rgba(255,180,80,0.4);
      pointer-events: none;
      z-index: 10;
      transition: opacity 0.2s;
    }

    .ws-wotg-arrow.top {
      top: 0;
      background: linear-gradient(rgba(17,20,38,0.95), transparent);
    }

    .ws-wotg-arrow.bottom {
      bottom: 0;
      background: linear-gradient(transparent, rgba(17,20,38,0.95));
    }

    .ws-wotg-btn {
      width: 100%;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(0,207,255,0.12);
      border-radius: 7px;
      color: rgba(255,255,255,0.5);
      font-size: 10px;
      padding: 7px 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
      text-align: left;
      box-sizing: border-box;
      flex-shrink: 0;
    }

    .ws-wotg-btn:hover {
      background: rgba(0,207,255,0.06);
      color: #fff;
    }

    .ws-wotg-btn-label {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 10px;
    }

    .ws-wotg-btn-sub {
      font-size: 7px;
      color: rgba(255,255,255,0.2);
      margin-top: 1px;
    }

    /* ── QUOTE ── */

    .ws-quote {
      font-size: 9px;
      color: rgba(255,180,80,0.55);
      font-style: italic;
      line-height: 1.7;
      text-align: center;
      padding: 0 4px 12px;
      flex-shrink: 0;
    }

    .ws-quote-attr {
      display: block;
      margin-top: 3px;
      color: rgba(255,180,80,0.55);
      font-style: normal;
      letter-spacing: 0.5px;
    }

/* ============================================================
   18. CATEGORY CONTAINER THEMES
   ============================================================ */

.category-container[data-category="write"]   { background-color: rgba(245,166,35,0.10); }
.category-container[data-category="design"]  { background-color: rgba(74,144,226,0.10); }
.category-container[data-category="publish"] { background-color: rgba(80,179,124,0.10); }
.category-container[data-category="publish"] .category-header { text-align: right; }
.category-container[data-category="promote"] { background-color: rgba(155,89,182,0.10); }
.category-container[data-category="promote"] .category-header { text-align: right; }


 /* ============================================================
     19. SIGN OUT & AVATAR SECTION (USER SETTINGS TO COME)
    ============================================================ */

  .db-logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
/* AUTH OVERLAY */

    #authOverlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .auth-overlay-box {
      background: #1e1e30;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 16px;
      padding: 36px;
      width: 320px;
      box-shadow: 0 24px 64px rgba(0,0,0,0.8);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    .auth-overlay-title {
      font-size: 18px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin: 0 0 8px 0;
    }
    .auth-tab-row {
      display: flex;
      gap: 8px;
      margin-bottom: 8px;
    }
    .auth-tab {
      background: transparent;
      border: 1px solid rgba(255,255,255,0.2);
      color: rgba(255,255,255,0.5);
      padding: 6px 18px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 12px;
      letter-spacing: 1px;
      transition: all 0.2s;
    }
    .auth-tab.active {
      background: rgba(255,255,255,0.1);
      color: #fff;
      border-color: rgba(255,255,255,0.4);
    }
    .auth-input {
      width: 100%;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px;
      padding: 10px 12px;
      color: #fff;
      font-size: 13px;
      box-sizing: border-box;
      outline: none;
    }
    .auth-input:focus {
      border-color: rgba(255,255,255,0.35);
    }
    .auth-submit-btn {
      width: 100%;
      background: linear-gradient(135deg, #667eea, #764ba2);
      border: none;
      border-radius: 8px;
      padding: 10px;
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 1px;
      cursor: pointer;
      margin-top: 4px;
      transition: opacity 0.2s;
    }
    .auth-submit-btn:hover { opacity: 0.85; }
    .auth-status {
      font-size: 11px;
      color: #ff6b6b;
      text-align: center;
      margin: 0;
      min-height: 16px;
    }
    
/* DASHBOARD BLUR — SIGNED OUT STATE */

    body.signed-out .db-header-left,
    body.signed-out .db-header-right,
    body.signed-out .dashboard,
    body.signed-out .fab-add-group {
      filter: blur(4px);
      pointer-events: none;
      user-select: none;
      transition: filter 0.4s ease;
    }
    
    body.signed-out .db-logo-wrap .account-avatar {
      display: none;
    }
    
    body.signed-out .db-logo-wrap {
      cursor: default;
    }
    
    /* FIGHTER TOOLTIP */

    .fighter-tooltip {
      position: absolute;
      top: calc(100% - 57px);
      left: -230px;
      transform: none;
      background: rgba(20,20,35,0.95);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      padding: 6px 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 9999;
    }
    .fighter-tooltip-label {
      font-size: 9px;
      color: rgba(255,255,255,0.4);
      letter-spacing: 1.5px;
      text-transform: uppercase;
    }
    .fighter-tooltip-name {
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0.5px;
    }
    body:not(.signed-out) .db-logo-wrap:hover .fighter-tooltip {
      opacity: 1 !important;
    }
  

  /* PP Logo */
  .db-logo {
    border-radius: 50%;
    position: relative;
    z-index: 2;
    display: block;
  } 

/* Avatar — hides behind logo at rest */

  .account-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border: 3px solid #1a0a00;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-10%, -50%);
    z-index: 1;
    opacity: 0.35;
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.5s ease;
    overflow: hidden;
    cursor: pointer;
  }
  .account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

/* Hover — avatar slides left and becomes opaque */
  
  body:not(.signed-out) .db-logo-wrap:hover .account-avatar {
    transform: translate(-85%, -50%);
    opacity: 1;
  }
  
/* FE Zone Orbit Rail — hidden behind logo until logo hover */

  .fe-zone-orbit-rail {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
  }

  .fe-zone-orb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.62);
    opacity: 0;
    pointer-events: none;

    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;

    background: radial-gradient(circle at 50% 45%, rgba(30,20,60,0.3) 0%, rgba(8,4,20,0.75) 85%);
    border: 1.5px solid rgba(180,160,220,0.10);
    box-shadow:
      0 0 22px rgba(0,0,0,0.55),
      inset 0 0 14px rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    cursor: pointer;
    transition:
      transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
      opacity 0.38s ease,
      border-color 0.25s ease,
      box-shadow 0.25s ease;
  }

  .fe-zone-orb:disabled {
    cursor: not-allowed;
  }

  .fe-zone-orb-label {
    font-size: 6.5px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(200,190,230,0.28);
    transition: color 0.25s ease, text-shadow 0.25s ease;
    pointer-events: none;
  }
  
  /* FE Zone Orbit Rail — AFC tooltip polish */

  .fe-zone-orb::after {
    content: attr(data-zone-tip);
    position: absolute;
    left: 50%;
    top: calc(100% + -74px);
    transform: translateX(-50%) translateY(2px);
    min-width: max-content;
    max-width: 180px;
    padding: 3px 8px;
    border-radius: 999px;

    background: rgba(12, 8, 28, 0.94);
    border: 1px solid rgba(201, 168, 76, 0.22);
    color: rgba(255, 255, 255, 0.72);

    font-size: 7.5px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;
    z-index: 10020;

    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.42),
      0 0 18px rgba(201, 168, 76, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      border-color 0.18s ease,
      color 0.18s ease;
  }

  .fe-zone-orb::before {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 4px);
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    rotate: 45deg;
    display: none;

    background: rgba(12, 8, 28, 0.94);
    border-left: 1px solid rgba(201, 168, 76, 0.18);
    border-top: 1px solid rgba(201, 168, 76, 0.18);

    opacity: 0;
    pointer-events: none;
    z-index: 10019;

    transition: opacity 0.18s ease;
  }

  .fe-zone-orb:hover::after,
  .fe-zone-orb:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .fe-zone-orb:hover::before,
  .fe-zone-orb:focus-visible::before {
    opacity: 1;
  }

  .fe-zone-orb.portal:hover::after,
  .fe-zone-orb.portal:focus-visible::after {
    border-color: rgba(232, 201, 122, 0.42);
    color: #e8c97a;
  }

  .fe-zone-orb.lounge:hover::after,
  .fe-zone-orb.lounge:focus-visible::after {
    border-color: rgba(240, 160, 100, 0.42);
    color: #f0b878;
  }

  .fe-zone-orb.library:hover::after,
  .fe-zone-orb.library:focus-visible::after {
    border-color: rgba(100, 160, 240, 0.42);
    color: #80b8f8;
  }

  .fe-zone-orb.classroom:hover::after,
  .fe-zone-orb.classroom:focus-visible::after {
    border-color: rgba(80, 200, 160, 0.36);
    color: #60d0a8;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orbit-rail {
    pointer-events: auto;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb {
    opacity: 1;
    pointer-events: auto;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal {
    transform: translate(54px, -50%) scale(1);
    transition-delay: 0.03s;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge {
    transform: translate(122px, -50%) scale(1);
    transition-delay: 0.07s;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library {
    transform: translate(190px, -50%) scale(1);
    transition-delay: 0.11s;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.classroom {
    transform: translate(258px, -50%) scale(1);
    transition-delay: 0.15s;
  }

  .fe-zone-orb:hover,
  .fe-zone-orb:focus-visible {
    outline: none;
    transform: translate(var(--fe-zone-x, 54px), -50%) scale(1.06);
    border-color: rgba(200,180,240,0.3);
    box-shadow:
      0 0 34px rgba(0,0,0,0.6),
      inset 0 0 18px rgba(255,255,255,0.03);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal:hover,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal:focus-visible {
    transform: translate(54px, -50%) scale(1.06);
    border-color: rgba(232,201,122,0.65);
    box-shadow:
      0 0 38px rgba(201,168,76,0.35),
      0 0 64px rgba(201,168,76,0.18),
      inset 0 0 22px rgba(201,168,76,0.12);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal:hover .fe-zone-orb-label,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal:focus-visible .fe-zone-orb-label {
    color: #e8c97a;
    text-shadow: 0 0 9px rgba(201,168,76,0.6), 0 0 20px rgba(201,168,76,0.3);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge:hover,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge:focus-visible {
    transform: translate(122px, -50%) scale(1.06);
    border-color: rgba(240,160,100,0.5);
    box-shadow:
      0 0 34px rgba(240,140,60,0.25),
      0 0 56px rgba(240,140,60,0.1),
      inset 0 0 20px rgba(240,140,60,0.08);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge:hover .fe-zone-orb-label,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge:focus-visible .fe-zone-orb-label {
    color: #f0b878;
    text-shadow: 0 0 8px rgba(240,160,100,0.4);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library:hover,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library:focus-visible {
    transform: translate(190px, -50%) scale(1.06);
    border-color: rgba(100,160,240,0.5);
    box-shadow:
      0 0 34px rgba(80,140,220,0.25),
      0 0 56px rgba(80,140,220,0.1),
      inset 0 0 20px rgba(80,140,220,0.08);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library:hover .fe-zone-orb-label,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library:focus-visible .fe-zone-orb-label {
    color: #80b8f8;
    text-shadow: 0 0 8px rgba(100,160,240,0.4);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.classroom {
    opacity: 0.55;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.classroom:hover {
    transform: translate(258px, -50%) scale(1.03);
    border-color: rgba(80,200,160,0.35);
    box-shadow:
      0 0 28px rgba(60,180,140,0.16),
      inset 0 0 18px rgba(60,180,140,0.05);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.classroom:hover .fe-zone-orb-label {
    color: #60d0a8;
    text-shadow: 0 0 7px rgba(80,200,160,0.3);
  }

  .fe-zone-orb:active {
    filter: brightness(1.12);
  }

  body.signed-out .fe-zone-orbit-rail {
    display: none;
  }
  
  /* FE Zone Orbit Rail — hover corridor + right-shift fix */

  .fe-zone-orbit-rail {
    width: 430px;
    height: 96px;
    transform: translate(-25%, -50%);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orbit-rail {
    pointer-events: auto;
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal {
    transform: translate(-1px, -50%) scale(1);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge {
    transform: translate(68px, -50%) scale(1);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library {
    transform: translate(135px, -50%) scale(1);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.classroom {
    transform: translate(203px, -50%) scale(1);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal:hover,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.portal:focus-visible {
    transform: translate(-1px, -50%) scale(1.06);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge:hover,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.lounge:focus-visible {
    transform: translate(68px, -50%) scale(1.06);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library:hover,
  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.library:focus-visible {
    transform: translate(135px, -50%) scale(1.06);
  }

  body:not(.signed-out) .db-logo-wrap:hover .fe-zone-orb.classroom:hover {
    transform: translate(203px, -50%) scale(1.03);
  }

  /* Brand text */
  .db-logo-brand {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    margin-top: 4px;
    text-align: center;
  }

  /* DROPDOWN */
    
    .account-dropdown {
      position: fixed;
      top: 220px;
      left: 50%;
      transform: translateX(-50%);
      background: #1e1e30;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.7);
      padding: 16px;
      width: 270px;        /* fixed — was min-width */
      max-width: 270px;    /* locks it */
      z-index: 10000;
      display: none;
      cursor: default;
      box-sizing: border-box;
    }
  
  .account-dropdown.open { display: block; }

  .account-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .account-avatar-large {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.15);
  }

  .account-avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
  .account-user-name { font-size: 14px; font-weight: 600; color: #fff; }
  .account-user-email { font-size: 11px; color: #666; margin-top: 3px; }

  .account-picker-label {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 8px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  height: 60px;
  overflow: hidden;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

    .account-avatar-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 8px;
      }
      
    .avatar-grid-wrap {
        position: relative;
        max-height: 152px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        margin-bottom: 8px;
      }
      
    .avatar-grid-wrap::-webkit-scrollbar { display: none; }
    
    .avatar-grid-wrap.fade-bottom::after {
        content: '▼';
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        height: 32px;
        background: linear-gradient(transparent, rgba(30,30,48,0.95));
        color: rgba(255,255,255,0.5);
        font-size: 10px;
        pointer-events: none;
      }
      
    .avatar-grid-wrap.fade-top::before {
        content: '▲';
        position: sticky;
        top: 0;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        height: 32px;
        background: linear-gradient(rgba(30,30,48,0.95), transparent);
        color: rgba(255,255,255,0.5);
        font-size: 10px;
        pointer-events: none;
      }
      
    .account-avatar-more {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        max-height: 116px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.2) transparent;
      }
      
    .avatar-upload-btn {
        background: rgba(255,255,255,0.07);
        border: 2px dashed rgba(255,255,255,0.25);
        color: rgba(255,255,255,0.5);
        font-size: 20px;
        font-weight: 300;
      }
      
    .avatar-upload-btn:hover {
        border-color: rgba(255,255,255,0.5);
        color: #fff;
      }
      
    .avatar-more-btn {
        background: rgba(255,255,255,0.07);
        border: 2px solid rgba(255,255,255,0.15);
        color: rgba(255,255,255,0.4);
        font-size: 16px;
        letter-spacing: 2px;
      }
      
    .avatar-more-btn:hover {
        border-color: rgba(255,255,255,0.35);
        color: #fff;
      }
      
    .avatar-placeholder {
        opacity: 0.4;
        cursor: default;
      }
      
    .avatar-placeholder:hover {
        transform: none;
      }

    .account-avatar-option {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: border-color 0.2s, transform 0.15s;
      overflow: hidden;
      background: #2a2a3e;
    }
    
    .account-avatar-option img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
    }
    
    .account-avatar-option:hover { transform: scale(1.1); }
    .account-avatar-option.selected { border-color: #00e5ff; }
    .account-avatar-option.initials {
      background: linear-gradient(135deg, #667eea, #764ba2);
      font-size: 13px;
      font-weight: 700;
      color: #fff;
    }

  .account-logout-btn {
    width: 100%;
    background: rgba(255,80,80,0.12);
    border: 1px solid rgba(255,80,80,0.25);
    color: #ff6b6b;
    padding: 9px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: background 0.2s;
  }

  .account-logout-btn:hover { background: rgba(255,80,80,0.22); }

  /* Demo labels */

  .demo-note {
    color: #555;
    font-size: 11px;
    text-align: center;
    margin-top: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  
  /* ============================================================
   20. DARK MODE
   Toggle: body.dark-mode
   Accent: #00ff88 (Matrix green)
   Base:   #1a1a2e (dark slate)

   PANEL HIERARCHY:
   ├─ ST + DRC blocks     → full cockpit / car-dash treatment
   ├─ Category containers → light dark touch, no neon
   └─ Inner group blocks  → near-invisible dark
   ============================================================ */


    /* ── BODY ─────────────────────────────────────────────────── */
    
    body.dark-mode {
      background: #12121f;
    }
    
    body.dark-mode::before {
      opacity: 0.06;
    }
    
    
    /* ── SESSION TRACKER + DRC BLOCKS (cockpit panels) ────────── */
    
    body.dark-mode .block.workflow,
    body.dark-mode #firestoreDrcContainer {
      background: rgba(6, 8, 20, 0.96);
      border: 1px solid rgba(0, 255, 136, 0.12);
      box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(0, 255, 136, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    }
    
    /* Headings */
    
    body.dark-mode .st-heading,
    body.dark-mode #firestoreDrcContainer h2 {
      color: #00ff88;
      border-bottom-color: rgba(0, 255, 136, 0.2);
      text-shadow: 0 0 10px rgba(0, 255, 136, 0.45);
    }
    
    
    /* ── ST METRIC ROWS (car-dash glow from behind the lip) ───── */
    
    body.dark-mode .st-readout-row {
  background: rgba(4, 7, 16, 0.97);
  border: 1px solid rgba(0, 255, 136, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 255, 136, .7);
}
    
    body.dark-mode .st-readout-label { color: rgba(0, 255, 136, 0.65); }  /* item 6 — lightened */
    body.dark-mode .st-readout-value { color: #c8fce4; }
    
    
    /* ── PROGRESS BARS (green glow bleeding from the lip) ───────── */
    
    body.dark-mode .st-progress-bar {
      background: rgba(0, 0, 0, 0.6);
      box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(0, 255, 136, 0.08),    /* lip ring */
        0 0 8px rgba(0, 255, 136, 0.12);      /* glow past the lip */
    }
    
    body.dark-mode #pt-bar .st-progress-bar-fill {
      background: linear-gradient(90deg, #00cc66 0%, #00ff88 50%, #00cc66 100%);
      box-shadow: 0 0 8px rgba(0, 255, 136, 0.6), 0 0 16px rgba(0, 255, 136, 0.3);
    }
    
    body.dark-mode #atrt-bar .st-progress-bar-fill {
      background: linear-gradient(90deg, #0066cc 0%, #00aaff 50%, #0066cc 100%);
      box-shadow: 0 0 8px rgba(0, 170, 255, 0.6), 0 0 16px rgba(0, 170, 255, 0.3);
    }
    
    body.dark-mode #dt-bar .st-progress-bar-fill {
      background: linear-gradient(90deg, #444 0%, #666 50%, #444 100%);
      box-shadow: 0 0 6px rgba(150, 150, 150, 0.3);
    }
    
    
    /* ── SESSION TIMER DIGITAL DISPLAY ────────────────────────── */
    
    body.dark-mode .st-digital-small {
      background: rgba(2, 5, 12, 0.99);
      color: #00ff88;
      border: 1px solid rgba(0, 255, 136, 0.25);
      box-shadow:
        inset 0 3px 12px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(0, 255, 136, 0.08),
        0 0 16px rgba(0, 255, 136, 0.15),
        0 0 32px rgba(0, 255, 136, 0.05);
      text-shadow:
        0 0 6px rgba(0, 255, 136, 0.9),
        0 0 18px rgba(0, 255, 136, 0.5);
    }
    
    body.dark-mode .st-label { color: rgba(0, 255, 136, 0.6); }
    
    /* item 4 — COMPLETED TODAY + 14 DAY HISTORY lightened */
    
    body.dark-mode #sessionTracker .section-label {
      color: rgba(0, 255, 136, 0.65);
    }
    
    body.dark-mode .session-entry .entry-text { color: #7a8a80; }
    body.dark-mode .entry-time               { color: #556058; }
    
    
    /* ── RITUAL TIMER COUNTER ─────────────────────────────────── */
    
    /* item 1 — base/idle lightened significantly */
    body.dark-mode #ritual-counter {
      background: rgba(4, 8, 18, 0.97);
      color: rgba(0, 255, 136, 0.75);
      border: 1px solid rgba(0, 255, 136, 0.25);
      box-shadow:
        inset 0 3px 12px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(0, 255, 136, 0.1),
        0 0 14px rgba(0, 255, 136, 0.15),
        0 0 28px rgba(0, 255, 136, 0.06);
      text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    }
    
    body.dark-mode .ritual-timer.running #ritual-counter {
      color: #00ff88;
      text-shadow:
        0 0 8px rgba(0, 255, 136, 0.9),
        0 0 20px rgba(0, 255, 136, 0.45);
      box-shadow:
        inset 0 3px 12px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(0, 255, 136, 0.15),
        0 0 18px rgba(0, 255, 136, 0.25),
        0 0 36px rgba(0, 255, 136, 0.1);
    }
    
    body.dark-mode .ritual-timer.idle #ritual-counter {
      color: rgba(0, 255, 136, 0.75);
      text-shadow: 0 0 6px rgba(0, 255, 136, 0.3);
    }
    
/* item 3 — pause flash restored in dark mode */

    body.dark-mode .ritual-timer.paused #ritual-counter {
      color: #ffaa00;
      text-shadow: 0 0 8px rgba(255, 170, 0, 0.7), 0 0 18px rgba(255, 170, 0, 0.3);
      box-shadow:
        inset 0 3px 12px rgba(0, 0, 0, 0.75),
        0 0 14px rgba(255, 170, 0, 0.15);
    }
    
    body.dark-mode .ritual-timer.timesup #ritual-counter {
      color: #ff4444;
      text-shadow: 0 0 10px rgba(255, 68, 68, 0.9), 0 0 24px rgba(255, 68, 68, 0.4);
      box-shadow:
        inset 0 3px 12px rgba(0, 0, 0, 0.75),
        0 0 18px rgba(255, 68, 68, 0.2);
    }
    
    body.dark-mode .rt-top-label,
    body.dark-mode .rt-bottom-label {
      color: rgba(0, 255, 136, 0.3);
    }
    
    /* item 7 — RT interval + sprint session buttons */
    body.dark-mode .time-options button {
      background: linear-gradient(
        180deg,
        rgba(50, 56, 80, 0.95) 0%,
        rgba(32, 36, 58, 0.92) 50%,
        rgba(44, 50, 72, 0.95) 100%
      );
      border: 1px solid rgba(0, 255, 136, 0.2);
      color: #a8d8bc;
      text-shadow: none;
      box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    
    body.dark-mode .time-options button:hover:not(.interval-locked):not(.active) {
      background: linear-gradient(
        180deg,
        rgba(0, 255, 136, 0.14) 0%,
        rgba(0, 180, 90, 0.10) 50%,
        rgba(0, 255, 136, 0.12) 100%
      );
      border-color: rgba(0, 255, 136, 0.4);
      color: #00ff88;
    }
    
    body.dark-mode .time-options button.active {
      background: linear-gradient(
        180deg,
        rgba(0,255,136,0.35) 0%,
        rgba(0,200,100,0.28) 50%,
        rgba(0,255,136,0.32) 100%
      );
      border-color: rgba(0,255,136,0.8);
      color: #00ff88;
      text-shadow: 0 0 8px rgba(0,255,136,0.8);
      box-shadow:
        0 0 12px rgba(0,255,136,0.3),
        inset 0 1px 0 rgba(255,255,255,0.06);
    }
    
    
    /* ── DRC CHECKLIST ITEMS (car-dash glow on each task) ──────── */
    
    body.dark-mode .checklist-item {
  background: rgba(4, 7, 16, 0.97);
  color: #c0d8c8;
  border-right: 9px solid var(--afc-task-drc-blue-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 2px 4px rgba(0, 162, 255, .7);
}
    
    body.dark-mode .checklist-item.completed {
      background: rgba(0, 162, 255, 0.03);
      border-right-color: rgba(0, 162, 255, 0.45);
      opacity: 0.45;
      box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.6),
        inset -4px 0 10px rgba(0, 162, 255, 0.08);
    }
    
    body.dark-mode .checklist-item.completed::after {
      color: var(--afc-task-drc-blue);
      text-shadow: 0 0 6px rgba(0, 162, 255, 0.7);
    }
    
    body.dark-mode .drc-completed-header {
      color: rgba(0, 162, 255, 0.55);
      border-top-color: rgba(0, 162, 255, 0.18);
    }
    
    body.dark-mode .task-label[contenteditable="true"] {
      border-color: rgba(0, 255, 136, 0.35);
      background: rgba(0, 255, 136, 0.05);
      color: #c8fce4;
    }
    
    body.dark-mode .task-label[contenteditable="true"]:focus {
      border-color: #00ff88;
      background: rgba(0, 255, 136, 0.09);
    }
    
    
    /* ── FOUR CONSOLE CONTAINERS (light dark touch, no neon) ───── */
    
    body.dark-mode .category-container {
      background: rgba(255, 255, 255, 0.025) !important;
      border: 1px solid rgba(255, 255, 255, 0.06);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
    
    body.dark-mode .category-header {
      color: rgba(255, 255, 255, 0.55);
      border-bottom-color: rgba(255, 255, 255, 0.08);
      text-shadow: none;
    }
    
    body.dark-mode .collapsible-header       { color: rgba(255, 255, 255, 0.4); }
    body.dark-mode .collapsible-header:hover { color: rgba(255, 255, 255, 0.7); }
    body.dark-mode .collapsible-header .arrow { color: rgba(255, 255, 255, 0.2); }
    
    
    /* ── INNER GROUP BLOCKS (near-invisible) ────────────────────── */
    
    body.dark-mode .category-groups .block {
      background: rgba(255, 255, 255, 0.03);
      box-shadow: none;
      border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    
    /* ── CONSOLE LINKS ──────────────────────────────────────────── */
    
    body.dark-mode .link {
      background: rgba(255, 255, 255, 0.05);
      color: #aaa;
      border: 1px solid rgba(255, 255, 255, 0.07);
    }
    
    body.dark-mode .link:hover {
      background: rgba(255, 255, 255, 0.09);
      color: #ddd;
      border-color: rgba(255, 255, 255, 0.15);
    }
    
    body.dark-mode .icon-circle {
      background: rgba(255, 255, 255, 0.07);
    }
    
    
    /* ── COCKPIT BUTTONS ────────────────────────────────────────── */
    
    /* item 8 — green hairline border on all cockpit buttons */
    body.dark-mode .cockpit-btn {
      background: linear-gradient(
        180deg,
        rgba(50, 56, 80, 0.95) 0%,
        rgba(32, 36, 58, 0.92) 50%,
        rgba(44, 50, 72, 0.95) 100%
      );
      border: 1px solid rgba(0, 255, 136, 0.25);
      color: #a8d8bc;
      text-shadow: none;
      box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
    }
    
    body.dark-mode .cockpit-btn:hover:not(:disabled) {
      background: linear-gradient(
        180deg,
        rgba(0, 255, 136, 0.14) 0%,
        rgba(0, 180, 90, 0.10) 50%,
        rgba(0, 255, 136, 0.12) 100%
      );
      border-color: rgba(0, 255, 136, 0.5);
      color: #00ff88;
      box-shadow:
        0 0 8px rgba(0, 255, 136, 0.18),
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }
    
    body.dark-mode .cockpit-btn:active:not(:disabled) {
      box-shadow:
        0 0 4px rgba(0, 255, 136, 0.12),
        inset 0 2px 5px rgba(0, 0, 0, 0.5);
      transform: translateY(1px);
    }
    
    body.dark-mode .cockpit-btn.btn-toggled {
      background: linear-gradient(
        180deg,
        rgba(0, 255, 136, 0.18) 0%,
        rgba(0, 180, 90, 0.14) 50%,
        rgba(0, 255, 136, 0.16) 100%
      );
      border-color: rgba(0, 255, 136, 0.5);
      color: #00ff88;
      text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
      box-shadow:
        0 0 10px rgba(0, 255, 136, 0.14),
        inset 0 2px 4px rgba(0, 0, 0, 0.35);
    }
    
    body.dark-mode .cockpit-btn:disabled {
      background: rgba(255, 255, 255, 0.03);
      border-color: rgba(255, 255, 255, 0.05);
      color: rgba(255, 255, 255, 0.18);
    }
    
    body.dark-mode .cockpit-btn.danger-btn {
      background: linear-gradient(
        180deg,
        rgba(255, 60, 60, 0.16) 0%,
        rgba(160, 28, 28, 0.12) 50%,
        rgba(200, 48, 48, 0.14) 100%
      );
      border-color: rgba(255, 80, 80, 0.35);
      color: #ff8888;
    }
    
    
    /* ── SCRATCHPAD ─────────────────────────────────────────────── */
    
    body.dark-mode #scratchpad {
      background: rgba(4, 7, 16, 0.97);
      color: #b0d8c0;
      border-color: rgba(0, 255, 136, 0.15);
      box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
    }
    
    body.dark-mode #googleSearchInput {
      background: rgba(4, 7, 16, 0.97);
      color: #b0d8c0;
      border-color: rgba(0, 255, 136, 0.15);
    }
    
    /* item 5 — floating scratchpad popout */
    body.dark-mode #scratchpad-container.floating {
      background: rgba(6, 8, 20, 0.97);
      border: 1px solid rgba(0, 255, 136, 0.15);
      box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.75),
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 255, 136, 0.08);
    }
    
    body.dark-mode #scratchpad-container.floating .scratchpad-title {
      color: #00ff88;
      text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    }
    
    body.dark-mode #scratchpad-container.floating #scratchpad {
      background: rgba(4, 7, 16, 0.99);
      color: #b0d8c0;
      border-color: rgba(0, 255, 136, 0.2);
    }
    
    
    /* ── FOOTER ─────────────────────────────────────────────────── */
    
    body.dark-mode > div[style*="text-align: center"] {
      margin-top: 25px;
      color: rgba(255, 255, 255, 0.15) !important;
    }
    
    
/* ============================================================
   21. USER SETTINGS MODAL
   ============================================================ */

    #userSettingsOverlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
    }
    
    #userSettingsOverlay[hidden] { display: none; }
    
    .settings-card {
      width: 240px;
      max-height: 85vh;
      overflow-y: auto;
      scrollbar-width: none;
      margin: 0;
    }
    
    .settings-card::-webkit-scrollbar { display: none; }
    
    .settings-title {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.4);
      text-align: center;
      margin-bottom: 16px;
    }
    
    .settings-divider {
      height: 1px;
      background: rgba(255, 255, 255, 0.08);
      margin: 12px 0;
    }
    
    .settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-toggle-label {
  font-size: 13px;
  color: #e0e0e0;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-toggle-label {
  font-size: 13px;
  color: #e0e0e0;
}

.settings-toggle-btn {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 0;
  background: rgba(255,255,255,0.15);
  transition: background 0.25s ease;
  flex-shrink: 0;
  font-size: 0;
}

.settings-toggle-btn::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s ease;
}

.settings-toggle-btn.on {
  background: #4a90e2;
}

.settings-toggle-btn.on::after {
  transform: translateX(20px);
}

.settings-toggle-btn:hover {
  opacity: 0.85;
}
    
    .settings-pw-row {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    
    .settings-pw-row input {
      flex: 1;
    }
    
    .settings-eye-btn {
      background: none;
      border: 0px solid rgba(255, 255, 255, 0.15);
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      padding: 4px 8px;
      opacity: 0.8;
      transition: opacity 0.2s, background 0.2s;
      flex-shrink: 0;
      color: #e0e0e0;
    }
    
    .settings-eye-btn:hover {
      opacity: 1;
      background: rgba(255, 255, 255, 0.14);
    }
    
    .settings-eye-btn:hover { opacity: 1; }
    
    .settings-status {
      font-size: 11px;
      text-align: center;
      min-height: 16px;
      margin: 4px 0;
      color: #00ff88;
    }
    
    .settings-status.error { color: #ff6b6b; }
    
    /* Gear icon in account dropdown */
    
    .account-user-info {
      position: relative;
    }
    
    .account-settings-gear {
      position: absolute;
      top: 0;
      right: 0;
      font-size: 15px;
      color: rgba(255, 255, 255, 0.3);
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
      transition: color 0.2s, background 0.2s;
    }
    
    .account-settings-gear:hover { color: #fff; }
    
    .account-settings-gear .gear-tooltip {
      position: absolute;
      right: 0;
      top: calc(100% + 4px);
      background: rgba(15, 15, 30, 0.96);
      color: #e0e0e0;
      font-size: 10px;
      letter-spacing: 1px;
      text-transform: uppercase;
      white-space: nowrap;
      padding: 4px 8px;
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s;
    }
    
    .account-settings-gear:hover .gear-tooltip { opacity: 1; }
    
    /* 3-button action row */
    
    .cec-actions {
      display: flex;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    
    .cec-actions button:nth-child(2) {
      background: rgba(255, 255, 255, 0.07);
      color: #ccc;
      border: 1px solid rgba(255,255,255,0.15);
    }
    
    .cec-actions button:nth-child(2):hover {
      background: rgba(0, 255, 136, 0.1);
      border-color: rgba(0, 255, 136, 0.3);
      color: #00ff88;
    }
    




/* ============================================================
   23. CREATIVE ENGINE (CE) + PROMPT ENGINE (PE) — SHARED
   Accent:     #ffb450
   Strip base: #12162a
   Navy panel: rgb(17, 20, 38)
   All engine UI shares these classes.
   PE uses pe- prefixed IDs, CE uses ce- prefixed IDs.
   ============================================================ */



/* ── TRIGGER WRAP ────────────────────────────────────────── */

    .ce-trigger-wrap,
    .pe-trigger-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 10px;
    }
    
    .ce-trigger-wrap .cockpit-btn,
    .pe-trigger-wrap .cockpit-btn {
      padding: 3px 10px;
      font-size: 0.68rem;
      min-height: 28px;
    }
    
    .ce-trigger-wrap .ce-count-badge,
    .pe-trigger-wrap .pe-count-badge {
      padding: 0 !important;                /* removes all padding */
      width: 30px !important;               /* keep at 30px wide */
      text-align: center;                   /* center the number horizontally */
      line-height: 1;                       /* ensure vertical centering (adjust if needed) */
    }
    
    /* ── ENGINE WRAP ─────────────────────────────────────────── */
    
    .ce-engine-wrap,
    .pe-engine-wrap {
      position: relative;
    }
    
    /* ── VENETIAN BLIND PANEL ────────────────────────────────── */
    
    .ce-panel,
    .pe-panel {
      position: absolute;
      width: calc(100% - 0px);
      z-index: 100;
      background: transparent;
      overflow: hidden;
      max-height: 0;
      opacity: 0;
      transform: scaleY(0.92);
      transform-origin: top center;
      transition:
      max-height 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
      opacity 0.35s ease,
      transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    .ce-panel.open,
    .pe-panel.open {
      max-height: 600px;
      opacity: 1;
      transform: scaleY(1);
      background: #12162a;
      border-radius: 14px;
      box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.25);
    }
    
    /* ── WRAP ─────────────────────────────────────────────────── */
    
    .ce-wrap,
    .pe-wrap {
      position: relative;
      display: flex;
      align-items: flex-start;
      margin-bottom: 12px;
      overflow: visible;
    }
    
    /* ── STRIP OUTER ─────────────────────────────────────────── */
    
    .ce-strip-outer,
    .pe-strip-outer {
      position: relative;
      width: 250px;
      z-index: 10;
      overflow: hidden;
      border-radius: 14px;
    }
    
    /* ── STRIP ───────────────────────────────────────────────── */
    
    .ce-strip,
    .pe-strip {
      width: 100%;
      height: 500px;
      border-radius: 20px;
      padding: 10px 8px;
      display: flex;
      flex-direction: row;
      gap: 5px;
      overflow: hidden;
      position: relative;
      background: #12162a;
      box-sizing: border-box;
      box-shadow:
        0 0 0 1px rgba(255,180,80,0.2),
        inset 0 1px 2px rgba(255,255,255,0.1);
    }
    
    .ce-strip.grouped,
    .pe-strip.grouped {
      overflow-y: auto ;
      scrollbar-width: none;
    }
    
    .ce-strip.grouped::-webkit-scrollbar,
    .pe-strip.grouped::-webkit-scrollbar {
      display: none;
    }
    
/* ── PE ONLY: strip layout ───────────────────────────────── */

    .pe-strip {
      flex-direction: row-reverse;
    }
    
    .ce-strip::before,
    .pe-strip::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 20px;
      background:
        radial-gradient(ellipse 90% 30% at 50% 0%,   rgba(255,255,255,0.13) 0%, transparent 70%),
        radial-gradient(ellipse 60% 35% at 50% 50%,  rgba(6,10,40,0.65)    0%, transparent 100%),
        radial-gradient(ellipse 90% 25% at 50% 100%, rgba(255,255,255,0.09) 0%, transparent 60%);
      pointer-events: none;
      z-index: 3;
    }
    
    .ce-strip::after,
    .pe-strip::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 20px;
      background: linear-gradient(90deg,
        rgba(0,0,0,0.65) 0%,  rgba(0,0,0,0.18) 15%,
        transparent 35%,      transparent 65%,
        rgba(0,0,0,0.18) 85%, rgba(0,0,0,0.65) 100%);
      pointer-events: none;
      z-index: 3;
    }
    
    .block.workflow {
      position: relative;
      overflow: visible;
    }
    
    /* ── LEFT COLUMN ─────────────────────────────────────────── */
    
    .ce-left-col,
    .pe-left-col {
      display: flex;
      flex-direction: column;
      gap: 5px;
      align-items: center;
      width: 28px;
      flex-shrink: 0;
      position: relative;
      z-index: 4;
    }
    
    .ce-add-btn,
    .pe-add-btn {
      width: 100%;
      background: linear-gradient(180deg, rgba(255,180,80,0.2) 0%, rgba(255,140,40,0.12) 100%);
      border: 1px solid rgba(255,180,80,0.5);
      border-radius: 7px;
      color: #ffb450;
      font-size: 13px;
      padding: 8px 0;
      cursor: pointer;
      transition: all 0.2s;
      box-shadow: 0 0 10px rgba(255,180,80,0.12);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .ce-add-btn:hover,
    .pe-add-btn:hover {
      background: linear-gradient(180deg, rgba(255,180,80,0.32) 0%, rgba(255,140,40,0.22) 100%);
      box-shadow: 0 0 18px rgba(255,180,80,0.25);
    }
    
    .ce-global-btn,
    .pe-global-btn {
      width: 100%;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 7px;
      color: rgba(255,255,255,0.22);
      font-size: 11px;
      padding: 7px 0;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .ce-global-btn:hover,
    .pe-global-btn:hover {
      color: rgba(255,180,80,0.8);
      border-color: rgba(255,180,80,0.25);
    }
    
    .ce-global-btn.active,
    .pe-global-btn.active {
      background: rgba(255,180,80,0.1);
      border-color: rgba(255,180,80,0.4);
      color: #ffb450;
    }
    
    .ce-spacer,
    .pe-spacer { flex: 1; }
    
    .ce-nav-btn,
    .pe-nav-btn {
      width: 100%;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 5px;
      color: rgba(255,255,255,0.2);
      padding: 5px 0;
      cursor: pointer;
      font-size: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }
    
    .ce-nav-btn:hover,
    .pe-nav-btn:hover {
      color: #ffb450;
      border-color: rgba(255,180,80,0.4);
    }
    
    /* ── CARDS VIEWPORT ──────────────────────────────────────── */
    
    .ce-cards-viewport,
    .pe-cards-viewport {
      flex: 1;
      overflow: hidden;
      position: relative;
      z-index: 4;
    }
    
    /* ── SCROLLING TRACK ─────────────────────────────────────── */
    
    .ce-track,
    .pe-track {
      display: flex;
      flex-direction: column;
      gap: 5px;
      transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
      will-change: auto;
    }
    
    /* ── CARD ────────────────────────────────────────────────── */
    
    .ce-card,
    .pe-card {
      width: 98%;
      height: 80px;
      background: rgba(255,255,255,0.25);
      border: 1px solid rgba(255,180,80,0.15);
      box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
      border-radius: 9px;
      display: flex;
      flex-direction: row;
      align-items: stretch;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      flex-shrink: 0;
      transition:
        height 0.4s cubic-bezier(0.34,1.1,0.64,1),
        border-color 0.25s,
        background 0.25s,
        opacity 0.25s;
    }
    
    .ce-card:hover,
    .pe-card:hover {
      border-color: rgba(255,180,80,0.3);
      background: rgba(255,180,80,0.04);
    }
    
    .ce-card.popped,
    .pe-card.popped {
      height: 36px;
      border-color: rgba(255,180,80,0.2);
      border-style: dashed;
      background: rgba(255,180,80,0.02);
      cursor: default;
    }
    
    .ce-card-origin {
      border-right: 2px solid rgba(255,180,80,0.8);
    }
    
    .pe-card-origin {
      border-left: 2px solid rgba(255,180,80,0.8);
    }
    
    .ce-card-origin .ce-label-text,
    .pe-card-origin .pe-label-text {
      color: rgba(255,255,255,0.75);
    }
    
    /* ── CARD CONTENT ────────────────────────────────────────── */
    
    .ce-card-content,
    .pe-card-content {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      width: 100%;
      transition: transform 0.38s cubic-bezier(0.34,1.1,0.64,1), opacity 0.3s ease;
    }
    
    .ce-card.popped .ce-card-content,
    .pe-card.popped .pe-card-content {
      transform: translateX(115%);
      opacity: 0;
    }
    
    /* ── CARD MAIN ───────────────────────────────────────────── */
    
    .ce-card-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 8px 40px 5px 8px;
      min-width: 0;
    }
    
    .pe-card-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 8px 8px 5px 40px;
      min-width: 0;
    }
    
    .ce-label-text {
      flex: 1;
      font-size: 12px;
      font-weight: 600;
      color: rgba(255,255,255,0.52);
      line-height: 1.35;
      text-align: left;
      word-break: break-word;
      transition: color 0.2s;
      display: flex;
      align-items: center;
      justify-content: flex-start;
    }
    
    .pe-label-text {
      flex: 1;
      font-size: 12px;
      font-weight: 600;
      color: rgba(255,255,255,0.52);
      line-height: 1.35;
      text-align: right;
      word-break: break-word;
      transition: color 0.2s;
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }
    
    
    
    .ce-card:not(.popped):hover .ce-label-text,
    .pe-card:not(.popped):hover .pe-label-text { color: rgba(255,255,255,0.88); }
    
    /* ── CARD FOOTER ─────────────────────────────────────────── */
    
    .ce-card-footer,
    .pe-card-footer {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 4px;
      height: 18px;
      margin-top: 3px;
    }
    
    .ce-card-dots,
    .pe-card-dots {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 3px;
      flex: 1;
      min-width: 0;
      overflow: hidden;
    }
    
    .ce-dot,
    .pe-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    
    .ce-dot-lightning,
    .pe-dot-lightning {
      font-size: 8px;
      flex-shrink: 0;
      line-height: 1;
    }
    
    .ce-card-icon {
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      width: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.35;
      background: rgba(255,180,80,0.04);
      border-left: 1px solid rgba(255,180,80,0.1);
      border-radius: 0 9px 9px 0;
      transition: opacity 0.2s;
    }
    
    .pe-card-icon {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.35;
      background: rgba(255,180,80,0.04);
      border-right: 1px solid rgba(255,180,80,0.1);
      border-radius: 9px 0 0 9px;
      transition: opacity 0.2s;
    }
    
    .ce-card:hover .ce-card-icon,
    .pe-card:hover .pe-card-icon {
      opacity: 0.9;
    }
    
    .ce-card:not(.popped):hover .ce-card-icon,
    .pe-card:not(.popped):hover .pe-card-icon { opacity: 0.78; }
    
    .ce-card-icons,
    .pe-card-icons {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 1px;
      flex-shrink: 0;
      opacity: 0;
      transition: opacity 0.2s;
    }
    
    .ce-card:not(.popped):hover .ce-card-icons,
    .pe-card:not(.popped):hover .pe-card-icons { opacity: 1; }
    
    .ce-ico,
    .pe-ico {
      background: none;
      border: none;
      color: rgba(255,255,255,0.28);
      font-size: 9px;
      cursor: pointer;
      padding: 2px;
      border-radius: 3px;
      line-height: 1;
      transition: color 0.15s, background 0.15s;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .ce-ico:hover,
    .pe-ico:hover     { color: #ffb450; background: rgba(255,180,80,0.12); }
    .ce-ico.del:hover,
    .pe-ico.del:hover { color: #ff6b6b; }
    
    /* ── CONNECTOR NUB ───────────────────────────────────────── */
    
    .ce-connector,
    .pe-connector {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 6px;
      height: 2px;
      background: rgba(255,180,80,0.6);
      opacity: 0;
      transition: opacity 0.35s;
      pointer-events: none;
    }
    
/* ── PE ONLY: connector nub ──────────────────────────────── */

    .ce-connector { right: -6px; }
    .pe-connector { left: -6px; }
    
    .ce-card.popped .ce-connector,
    .pe-card.popped .pe-connector { opacity: 1; }
    
/* ── PE ONLY: card footer ────────────────────────────────── */

    .pe-card .pe-card-dots { flex: 0 0 auto; }
    .pe-card .pe-card-icons { flex: 1; }
    
/* ── PE ONLY: group header ───────────────────────────────── */

    .pe-group-label { flex: 0 0 auto; }
    .pe-group-count { flex: 1; }
    
/* ── PE ONLY: category panel ────────────────────────────── */

    .pe-engine-wrap .pe-cat-panel {
      left: unset;
      right: calc(100% - 28px);
    }
    
    /* ── PE ONLY: forms ─────────────────────────────────────── */

    .pe-engine-wrap .pe-add-form {
      left: unset;
      right: 244px;
    }
    
/* ── GROUP HEADER ────────────────────────────────────────── */
    
    .ce-group-header,
    .pe-group-header {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 4px 3px;
      cursor: pointer;
      user-select: none;
      border-bottom: 1px solid rgba(255,180,80,0.08);
      margin-bottom: 2px;
      position: relative;
      z-index: 4;
      flex-shrink: 0;
    }
    
    .ce-group-chevron-btn,
    .pe-group-chevron-btn {
      background: none;
      border: none;
      color: rgba(255,255,255,0.3);
      font-size: 8px;
      cursor: pointer;
      padding: 2px;
      width: 12px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color 0.2s;
    }
    
    .ce-group-header:hover .ce-group-chevron-btn,
    .pe-group-header:hover .pe-group-chevron-btn { color: #ffb450; }
    
    .ce-group-dot,
    .pe-group-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    
    .ce-group-lightning-icon,
    .pe-group-lightning-icon {
      font-size: 9px;
      flex-shrink: 0;
      line-height: 1;
    }
    
    .ce-group-label,
    .pe-group-label {
      flex: 1;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: rgba(255,180,80,0.55);
      white-space: normal;
      overflow: visible;
      text-overflow: unset;
    }
    
    .ce-group-count,
    .pe-group-count {
      font-size: 8px;
      color: rgba(255,255,255,0.7);
      flex-shrink: 0;
    }
    
    .ce-group-sorts,
    .pe-group-sorts {
      display: flex;
      gap: 2px;
      flex-shrink: 0;
      opacity: 0;
      transition: opacity 0.2s;
    }
    
    .ce-group-header:hover .ce-group-sorts,
    .pe-group-header:hover .pe-group-sorts { opacity: 1; }
    
    .ce-gs-btn,
    .pe-gs-btn {
      background: none;
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 3px;
      color: rgba(255,255,255,0.2);
      font-size: 7px;
      padding: 2px 3px;
      cursor: pointer;
      transition: all 0.15s;
      display: flex;
      align-items: center;
      line-height: 1;
    }
    
    .ce-gs-btn:hover,
    .pe-gs-btn:hover {
      color: #ffb450;
      border-color: rgba(255,180,80,0.3);
    }
    
    .ce-gs-btn.active,
    .pe-gs-btn.active {
      color: #ffb450;
      border-color: rgba(255,180,80,0.4);
      background: rgba(255,180,80,0.08);
    }
    
    /* ── GROUP BODY ──────────────────────────────────────────── */
    
    .ce-group-body,
    .pe-group-body {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 6px;
    }
    
    .ce-group-body.collapsed,
    .pe-group-body.collapsed { display: none; }
    
    /* ── EJECTED PANEL ───────────────────────────────────────── */
    
    .ce-ejected,
    .pe-ejected {
      position: absolute;
      width: 0;
      opacity: 0;
      pointer-events: none;
      overflow: hidden;
      z-index: 200;
      transition:
        width 0.4s cubic-bezier(0.34,1.1,0.64,1),
        opacity 0.3s ease,
        top 0.4s cubic-bezier(0.34,1.1,0.64,1);
    }
    
    .ce-ejected { left: calc(100% - 28px); }
    .pe-ejected { right: calc(100% - 28px); }
    
    .ce-ejected.open,
    .pe-ejected.open {
      width: 290px;
      opacity: 1;
      pointer-events: all;
    }
    
    .ce-ejected-inner,
    .pe-ejected-inner {
      width: 252px;
      background: rgb(17, 20, 38);
      border: 1px solid rgba(255,180,80,0.3);
      border-top-left-radius: 14px;
      border-bottom-left-radius: 14px;
      border-top-right-radius: 14px;
      border-bottom-right-radius: 14px;
      padding: 18px;
      
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        inset 0 4px 16px rgba(0,0,0,0.3);
    }
    
    .ce-ej-title,
    .pe-ej-title {
      font-size: 12px;
      font-weight: 700;
      color: #ffb450;
      margin-bottom: 10px;
      line-height: 1.3;
      text-shadow: 0 0 12px rgba(255,180,80,0.3);
    }
    
    .ce-ej-body,
    .pe-ej-body {
      font-size: 11px;
      color: rgba(255,255,255,0.48);
      line-height: 1.65;
      max-height: 160px;
      overflow-y: auto;
      scrollbar-width: none;
      white-space: pre-wrap;
      word-break: break-word;
      margin-bottom: 12px;
    }
    
    .ce-ej-body::-webkit-scrollbar,
    .pe-ej-body::-webkit-scrollbar { display: none; }
    
    .ce-ej-actions,
    .pe-ej-actions {
      display: flex;
      gap: 5px;
    }
    
    .ce-ej-btn,
    .pe-ej-btn {
      flex: 1;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 7px;
      color: rgba(255,255,255,0.35);
      font-size: 11px;
      padding: 7px 4px;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .ce-ej-btn:hover,
    .pe-ej-btn:hover {
      background: rgba(255,255,255,0.08);
      color: #fff;
    }
    
    .ce-ej-copy,
    .pe-ej-copy {
      background: rgba(255,180,80,0.05);
      border-color: rgba(255,180,80,0.25);
      color: rgba(255,180,80,0.65);
    }
    
    .ce-ej-copy:hover,
    .pe-ej-copy:hover {
      background: rgba(255,180,80,0.14);
      color: #ffb450;
    }
    
    /* ── COPY FLASH ──────────────────────────────────────────── */
    
    .ce-flash,
    .pe-flash {
      position: fixed;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(10,12,20,0.96);
      border: 1px solid rgba(255,180,80,0.45);
      border-radius: 40px;
      padding: 7px 20px;
      color: #ffb450;
      font-size: 11px;
      font-weight: 700;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
      z-index: 9999;
    }
    
    .ce-flash.show,
    .pe-flash.show { opacity: 1; }
    
    /* ── ADD / EDIT FORMS ────────────────────────────────────── */
    
    .ce-add-form,
    .pe-add-form {
      display: none;
      position: absolute;
      top: 80px;
      left: 244px;
      width: 252px;
      background: rgb(17, 20, 38);
      border: 1px solid rgba(255,180,80,0.3);
      border-radius: 14px;
      padding: 14px;
      box-shadow: 0 16px 40px rgba(0,0,0,0.6);
      z-index: 1000;
    }
    
    .ce-cat-form-slim,
    .pe-cat-form-slim {
      top: 80px;
      padding: 10px 12px;
    }
    
    .ce-form-title,
    .pe-form-title {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 2px;
      color: rgba(255,180,80,0.5);
      margin-bottom: 10px;
      text-align: center;
    }
    
    .ce-field,
    .pe-field {
      width: 100%;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 7px;
      color: #e0e0e0;
      font-size: 12px;
      padding: 7px 10px;
      box-sizing: border-box;
      outline: none;
      font-family: inherit;
      margin-bottom: 8px;
      transition: border-color 0.2s;
    }
    
    .ce-field:focus,
    .pe-field:focus {
      border-color: rgba(255,180,80,0.5);
      background: rgba(255,180,80,0.04);
    }
    
    .ce-textarea,
    .pe-textarea {
      min-height: 80px;
      resize: vertical;
      overflow-y: auto;
      scrollbar-width: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M9 3 L3 9 M9 6 L6 9' stroke='rgba(255,180,80,0.4)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: bottom right;
    }
    
    .ce-textarea::-webkit-scrollbar,
    .pe-textarea::-webkit-scrollbar {
      display: none;
    }
    
    .ce-form-section-label,
    .pe-form-section-label {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: rgba(255,255,255,0.25);
      margin-bottom: 4px;
      margin-top: 2px;
    }
    
    /* ── CATEGORY DROPDOWN ───────────────────────────────────── */
    
    .ce-cat-dropdown-list,
    .pe-cat-dropdown-list {
      margin-bottom: 4px;
      background: rgba(14,16,26,0.98);
      border: 1px solid rgba(255,180,80,0.12);
      border-radius: 8px;
      overflow: hidden;
    }
    
    .ce-cat-dropdown-item,
    .pe-cat-dropdown-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      cursor: pointer;
      transition: background 0.15s;
    }
    
    .ce-cat-dropdown-item:hover,
    .pe-cat-dropdown-item:hover        { background: rgba(255,180,80,0.06); }
    .ce-cat-dropdown-item.selected,
    .pe-cat-dropdown-item.selected     { background: rgba(255,180,80,0.04); }
    .ce-cat-dropdown-item.reserved,
    .pe-cat-dropdown-item.reserved     { opacity: 0.5; cursor: default; }
    
    .ce-cat-dropdown-dot,
    .pe-cat-dropdown-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    
    .ce-cat-dropdown-label,
    .pe-cat-dropdown-label {
      flex: 1;
      font-size: 0.78rem;
      color: rgba(255,255,255,0.7);
    }
    
    .ce-cat-dropdown-check,
    .pe-cat-dropdown-check {
      font-size: 0.7rem;
      color: #ffb450;
      opacity: 0;
      transition: opacity 0.15s;
    }
    
    .ce-cat-dropdown-item.selected .ce-cat-dropdown-check,
    .pe-cat-dropdown-item.selected .pe-cat-dropdown-check { opacity: 1; }
    
    /* ── ICON PICKER ─────────────────────────────────────────── */
    
    .ce-icon-picker,
    .pe-icon-picker {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 12px;
      justify-content: center;
    }
    
    .ce-icon-cell,
    .pe-icon-cell {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.15s;
      opacity: 0.45;
    }
    
    .ce-icon-cell:hover,
    .pe-icon-cell:hover { opacity: 0.8; border-color: rgba(255,180,80,0.3); }
    .ce-icon-cell.selected,
    .pe-icon-cell.selected { opacity: 1; border-color: rgba(255,180,80,0.7); background: rgba(255,180,80,0.1); }
    
    /* ── FORM ACTIONS ────────────────────────────────────────── */
    
    .ce-form-actions,
    .pe-form-actions {
      display: flex;
      gap: 6px;
      justify-content: center;
    }
    
    /* ── CATEGORY MANAGEMENT PANEL ───────────────────────────── */
    
    .ce-cat-panel,
    .pe-cat-panel {
      position: absolute;
      left: calc(100% - 28px);
      top: 0;
      width: 252px;
      background: rgb(17, 20, 38);
      border: 1px solid rgba(255,180,80,0.3);
      border-radius: 14px;
      padding: 14px;
      box-shadow: 0 16px 40px rgba(0,0,0,0.6);
      z-index: 200;
      display: none;
    }
    
    .ce-cat-panel.open,
    .pe-cat-panel.open { display: block; }
    
    .ce-cat-panel-header,
    .pe-cat-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 2px;
      color: rgba(255,180,80,0.5);
      text-transform: uppercase;
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255,180,80,0.15);
    }
    
    .ce-cat-panel-close,
    .pe-cat-panel-close {
      background: none;
      border: none;
      color: rgba(255,255,255,0.3);
      cursor: pointer;
      font-size: 0.85rem;
      padding: 2px 4px;
      transition: color 0.2s;
    }
    
    .ce-cat-panel-close:hover,
    .pe-cat-panel-close:hover { color: #fff; }
    
    .ce-cat-list,
    .pe-cat-list {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 10px;
    }
    
    .ce-cat-row,
    .pe-cat-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 8px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
    }
    
    .ce-cat-row-dot,
    .pe-cat-row-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    
    .ce-cat-row-label,
    .pe-cat-row-label {
      flex: 1;
      font-size: 0.78rem;
      color: rgba(255,255,255,0.7);
    }
    
    .ce-cat-row-edit,
    .pe-cat-row-edit {
      background: none;
      border: none;
      color: rgba(255,255,255,0.3);
      cursor: pointer;
      font-size: 0.75rem;
      padding: 2px 4px;
      border-radius: 4px;
      transition: color 0.15s, background 0.15s;
    }
    
    .ce-cat-row-edit:hover,
    .pe-cat-row-edit:hover {
      color: #ffb450;
      background: rgba(255,180,80,0.1);
    }
    
    .ce-cat-row-delete,
    .pe-cat-row-delete {
      background: none;
      border: none;
      color: rgba(255,255,255,0.2);
      cursor: pointer;
      font-size: 0.75rem;
      padding: 2px 4px;
      border-radius: 4px;
      transition: color 0.15s, background 0.15s;
    }
    
    .ce-cat-row-delete:hover,
    .pe-cat-row-delete:hover {
      color: #ff6b6b;
      background: rgba(255,80,80,0.1);
    }
    
    .ce-cat-row.reserved .ce-cat-row-delete,
    .pe-cat-row.reserved .pe-cat-row-delete {
      opacity: 0;
      pointer-events: none;
    }
    
    /* ── COLOUR PICKER ───────────────────────────────────────── */
    
    .ce-colour-picker,
    .pe-colour-picker {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin: 6px 0 10px;
    }
    
    .ce-colour-swatch,
    .pe-colour-swatch {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: transform 0.15s, border-color 0.15s;
      flex-shrink: 0;
    }
    
    .ce-colour-swatch:hover,
    .pe-colour-swatch:hover        { transform: scale(1.15); }
    .ce-colour-swatch.selected,
    .pe-colour-swatch.selected     { border-color: #fff; transform: scale(1.15); }
    
    /* ── ADD NEW CATEGORY FORM ───────────────────────────────── */
    
    .ce-add-cat-form,
    .pe-add-cat-form {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 8px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,180,80,0.15);
      border-radius: 8px;
      margin-bottom: 8px;
    }
    
    .ce-add-cat-form[hidden],
    .pe-add-cat-form[hidden] { display: none; }
    
    /* ── CATEGORY PANEL FOOTER ───────────────────────────────── */
    
    .ce-cat-panel-footer,
    .pe-cat-panel-footer {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding-top: 8px;
      border-top: 1px solid rgba(255,180,80,0.1);
    }
    
    .ce-cat-count-label,
    .pe-cat-count-label {
      font-size: 0.68rem;
      color: rgba(255,255,255,0.25);
      text-align: center;
    }
    
    .ce-icon-picker-popup {
      position: absolute;
      right: -130px;
      top: 50%;
      transform: translateY(-50%);
      background: rgb(17, 20, 38);
      border: 1px solid rgba(255,180,80,0.3);
      border-radius: 10px;
      padding: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      width: 88px;
      justify-content: center;
      z-index: 500;
      box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    }
    
    .ce-add-form .cockpit-btn,
    .ce-cat-panel .cockpit-btn,
    .pe-add-form .cockpit-btn,
    .pe-cat-panel .cockpit-btn {
      background: transparent;
      border: 1px solid rgba(255,180,80,0.35);
      border-radius: 6px;
      color: rgba(255,180,80,0.7);
      text-shadow: none;
      box-shadow: none;
      font-size: 0.7rem;
      padding: 4px 12px;
      min-height: 24px;
    }
    
    .ce-add-form .cockpit-btn:hover,
    .ce-cat-panel .cockpit-btn:hover,
    .pe-add-form .cockpit-btn:hover,
    .pe-cat-panel .cockpit-btn:hover {
      background: rgba(255,180,80,0.08);
      border-color: rgba(255,180,80,0.6);
      color: #ffb450;
    }
    
    /* ── DARK MODE OVERRIDES ─────────────────────────────────── */
    
    body.dark-mode .ce-strip,
    body.dark-mode .pe-strip {
      box-shadow:
        inset 0 6px 18px rgba(255,255,255,0.05),
        inset 0 28px 50px rgba(0,0,0,0.80),
        inset 0 -6px 18px rgba(255,255,255,0.03),
        inset 0 -28px 50px rgba(0,0,0,0.70),
        inset 0 0 40px rgba(10,15,60,0.65),
        inset 8px 0 28px rgba(0,0,0,0.70),
        inset -8px 0 28px rgba(0,0,0,0.70),
        0 0 0 1px rgba(255,180,80,0.18),
        0 24px 60px rgba(0,0,0,0.85);
    }
    
    body.dark-mode .ce-card,
    body.dark-mode .pe-card {
      background: rgba(255,180,80,0.15);
      border-color: rgba(255,180,80,0.12);
      box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
    }
    
    body.dark-mode .ce-card:hover,
    body.dark-mode .pe-card:hover {
      border-color: rgba(255,180,80,0.22);
      background: rgba(255,180,80,0.05);
    }
    
    body.dark-mode .ce-label-text,
    body.dark-mode .pe-label-text { color: rgba(255,180,80,0.6); }
    
    body.dark-mode .ce-card:not(.popped):hover .ce-label-text,
    body.dark-mode .pe-card:not(.popped):hover .pe-label-text { color: rgba(255,180,80,0.95); }
    
    body.dark-mode .ce-ej-title,
    body.dark-mode .pe-ej-title {
      text-shadow: 0 0 16px rgba(255,180,80,0.45);
    }
    
    body.dark-mode .ce-add-form,
    body.dark-mode .pe-add-form,
    body.dark-mode .ce-ejected-inner,
    body.dark-mode .pe-ejected-inner,
    body.dark-mode .ce-cat-panel,
    body.dark-mode .pe-cat-panel {
      background: rgba(12,14,28,0.99);
      border-color: rgba(255,180,80,0.2);
    }
    
    body.dark-mode .ce-cat-dropdown-list,
    body.dark-mode .pe-cat-dropdown-list {
      background: rgba(8,10,20,0.99);
      border-color: rgba(255,180,80,0.1);
    }
    
    body.dark-mode .ce-group-header,
    body.dark-mode .pe-group-header {
      border-bottom-color: rgba(255,180,80,0.12);
    }
    
    body.dark-mode .ce-group-label,
    body.dark-mode .pe-group-label { color: rgba(255,180,80,0.65); }
    

/* -------------------------SUPPRESS SCROLLBAR ON PE & CE---------------------- */

    #ceViewport::-webkit-scrollbar,
    #peViewport::-webkit-scrollbar {
      display: none;
    }
    
    
    .ws-gauge-fa-icon {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, +40%);
      font-size: 22px;
      color: #ffb450; /* will be updated dynamically */
      pointer-events: none;
      z-index: 2;
    }
    
/* ============================================================
   DCT MODE STYLES
   ============================================================ */

/* Put the icon vertical strip and DCT Tasks on the same row */
    
    .dct-layout {
      display: flex;
      flex-direction: row;
      gap: 12px;
      margin-top: 10px;
    }

/* DCT project selector – discreet vertical strip */

    .dct-project-selector-vertical {
      display: flex;
      flex-direction: column;
      padding: 0;
      margin: 0;
      gap: 0;
      flex-shrink: 0;
      width: 32px; /* enough for 28px button + slight breathing */
      align-items: center;
    }
    
/* DCT project icons – match lightning button style */

    .dct-project-icon-btn {
      width: 28px;
      height: 28px;
      background: linear-gradient(
        180deg,
        rgba(255,255,255,0.90) 0%,
        rgba(200,200,210,0.70) 45%,
        rgba(180,180,195,0.80) 50%,
        rgba(220,220,230,0.90) 100%
      );
      border: 1px solid rgba(255,255,255,0.6);
      border-bottom: 1px solid rgba(150,150,160,0.5);
      border-radius: 50px;
      color: #333;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      text-shadow: 0 1px 0 rgba(255,255,255,0.8);
      box-shadow:
        0 1px 2px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.95),
        inset 0 -1px 0 rgba(0,0,0,0.08);
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      margin: 2px 0;
    }
    
    .dct-project-icon-btn:hover {
      background: linear-gradient(
        180deg,
        rgba(255,255,255,1.0) 0%,
        rgba(215,215,225,0.85) 45%,
        rgba(195,195,210,0.95) 50%,
        rgba(235,235,245,1.0) 100%
      );
      box-shadow:
        0 2px 4px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(0,0,0,0.06);
    }
    
    .dct-project-icon-btn.active {
      background: linear-gradient(
        180deg,
        rgba(180,195,220,0.95) 0%,
        rgba(140,165,200,0.85) 45%,
        rgba(120,148,190,0.90) 50%,
        rgba(160,185,215,0.95) 100%
      );
      border-color: rgba(100,140,200,0.6);
      color: #1a2a4a;
      text-shadow: 0 1px 0 rgba(255,255,255,0.5);
      box-shadow:
        0 1px 2px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(0,0,50,0.15),
        inset 0 1px 0 rgba(255,255,255,0.4);
    }
    
    /* Dark mode overrides */
    body.dark-mode .dct-project-icon-btn {
      background: linear-gradient(
        180deg,
        rgba(50,56,80,0.95) 0%,
        rgba(32,36,58,0.92) 50%,
        rgba(44,50,72,0.95) 100%
      );
      border: 1px solid rgba(0,255,136,0.25);
      color: #00ff88;
      text-shadow: none;
      box-shadow:
        0 1px 2px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.25);
    }
    
    body.dark-mode .dct-project-icon-btn:hover {
      background: linear-gradient(
        180deg,
        rgba(0,255,136,0.14) 0%,
        rgba(0,180,90,0.10) 50%,
        rgba(0,255,136,0.12) 100%
      );
      border-color: rgba(0,255,136,0.5);
      color: #00ff88;
      box-shadow:
        0 0 6px rgba(0,255,136,0.18),
        0 1px 2px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.04);
    }
    
    body.dark-mode .dct-project-icon-btn.active {
      background: linear-gradient(
        180deg,
        rgba(0,255,136,0.18) 0%,
        rgba(0,180,90,0.14) 50%,
        rgba(0,255,136,0.16) 100%
      );
      border-color: rgba(0,255,136,0.5);
      color: #00ff88; !important
      text-shadow: 0 0 6px rgba(0,255,136,0.5);
      box-shadow:
        0 0 8px rgba(0,255,136,0.14),
        inset 0 2px 4px rgba(0,0,0,0.35);
    }
    
/* DCT Task Styling */

    .dct-task-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    
    .dct-tasks-area {
      flex: 1;
      min-width: 0;
    }
    
    .dct-task-item {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,255,255,0.92);
      border-radius: 10px;
      padding: 6px 10px;
      font-size: 0.75rem;
      color: #222;
      border-right: 9px solid var(--afc-task-creative-gold);
      transition: all 0.2s ease;
      box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
    }
    
    .dark-mode .dct-task-item {
      background: rgba(4, 7, 16, 0.97);
      color: #c0d8c8;
      border-right-color: var(--afc-task-creative-gold-soft);
      box-shadow: inset 0 2px 4px rgba(255, 180, 80, .7);
    }
    
/* Task Label font consistency */

    .dct-task-label {
      flex: 1;
      font-size: 0.7rem;  /* same as DRC */
      white-space: normal;
      word-break: break-word;
    }
    
/* DCT Filters Button Count Watermark */

    .dct-project-count {
      position: relative;
      bottom: 1px;
      right: 3px;
      font-size: 10px;
      font-weight: 700;
      color: rgba(0,0,0,0.25);
      line-height: 1;
      pointer-events: none;
      z-index: 1;
    }
    
    body.dark-mode .dct-project-count {
      color: rgba(255,255,255,0.2);
    }
    
    .checklist-item.creative-block,
    .checklist-item.dct-completed,
    .checklist-item.creative {
      border-right: 9px solid var(--afc-task-creative-gold);
    }

    .checklist-item.creative-block.completed,
    .checklist-item.dct-completed.completed,
    .checklist-item.creative.completed {
      border-right-color: var(--afc-task-creative-gold);
      background: var(--afc-task-creative-gold-faint);
    }

    .checklist-item.creative-block.completed::after,
    .checklist-item.dct-completed.completed::after,
    .checklist-item.creative.completed::after {
      content: "🎨";
      color: var(--afc-task-creative-gold);
      text-shadow: none;
      font-size: 0.85rem;
    }

    body.dark-mode .checklist-item.creative-block,
    body.dark-mode .checklist-item.dct-completed,
    body.dark-mode .checklist-item.creative {
      border-right-color: var(--afc-task-creative-gold-soft);
      box-shadow: inset 0 2px 4px rgba(255, 180, 80, .7);
    }

    body.dark-mode .checklist-item.creative-block.completed::after,
    body.dark-mode .checklist-item.dct-completed.completed::after,
    body.dark-mode .checklist-item.creative.completed::after {
      content: "🎨";
    }

/* Archived CE Entries */
    
    .ce-group-body .ce-card[data-status="archived"] {
      opacity: 0.9;
      filter: grayscale(0.4);
    }
    

    /* ============================================================
       DEBUG — uncomment only when needed
       ============================================================ */
    
    /* .db-header-left,
    .db-header-center,
    .db-header-right,
    .ritual-timer {
      border: 1px solid rgba(255,0,0,0.4);
    } */
