    #notes-view-sub-options .menu-item.notes-sub-option.selected svg,
    #notes-view-sub-options .menu-item.notes-sub-option.active-view svg {
      opacity: 1 !important;
      color: var(--primary-color, #0d9488) !important;
      stroke: var(--primary-color, #0d9488) !important;
    }
    body.dark-mode #notes-view-sub-options .menu-item.notes-sub-option.selected svg,
    body.dark-mode #notes-view-sub-options .menu-item.notes-sub-option.active-view svg,
    html.dark #notes-view-sub-options .menu-item.notes-sub-option.selected svg,
    html.dark #notes-view-sub-options .menu-item.notes-sub-option.active-view svg,
    [data-theme="dark"] #notes-view-sub-options .menu-item.notes-sub-option.selected svg,
    [data-theme="dark"] #notes-view-sub-options .menu-item.notes-sub-option.active-view svg {
      color: #2dd4bf !important;
      stroke: #2dd4bf !important;
    }
    #notes-view-sub-options .menu-item.notes-sub-option.selected::after,
    #notes-view-sub-options .menu-item.notes-sub-option.active-view::after {
      content: '✓';
      font-weight: bold;
      margin-left: auto !important;
    }
    #notes-view-trigger.view-trigger-active {
      background: rgba(13, 148, 136, 0.08) !important;
      border-radius: 12px !important;
    }
    body.dark-mode #notes-view-trigger.view-trigger-active,
    html.dark #notes-view-trigger.view-trigger-active,
    [data-theme="dark"] #notes-view-trigger.view-trigger-active {
      background: rgba(255, 255, 255, 0.05) !important;
    }

    /* ============================================================================
       UNIVERSAL ANIMATION CONTROLLER MATRIX — PILLAR 1: GLOBAL EXIT CHOREOGRAPHY (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Universal Smooth Exit Animation */
    @keyframes appSmoothExit {
      0% { opacity: 1; transform: scale(1) translateY(0); }
      100% { opacity: 0; transform: scale(0.96) translateY(6px); }
    }

    /* 🚀 Fix 2: The Closing State Utility Class */
    .is-closing {
      animation: appSmoothExit 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
      pointer-events: none !important; /* Prevents accidental double-clicks while fading */
    }

    /* ============================================================================
       STRICT SINGLE-ROW HEADER MATRIX — PILLAR 1: STRICT SINGLE-ROW LAYOUT (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Strict One-Row Header Container */
    .notes-header-row {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: space-between !important;
      flex-wrap: nowrap !important; /* Absolutely prevents 2-line wrapping */
      width: 100% !important;
      margin-bottom: 20px !important;
      gap: 8px !important;
    }
    .notes-header-row.is-hidden {
      display: none !important;
    }

    /* 🚀 Fix 2: SVG + Title Alignment */
    .notes-header-title {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
      font-size: 24px !important;
      font-weight: 700 !important;
      color: #18181b !important;
      white-space: nowrap !important;
      margin: 0 !important;
      letter-spacing: -0.5px !important;
    }
    body.dark-mode .notes-header-title { color: #f4f4f5 !important; }

    /* The SVG beside the Title */
    .notes-header-title svg {
      width: 24px !important;
      height: 24px !important;
      stroke: currentColor !important;
      opacity: 0.9 !important;
    }

    /* 🚀 Fix 3: Right-Side Actions Group (Pill, Count, 3-Dot) */
    .notes-header-actions {
      display: flex !important;
      align-items: center !important;
      gap: 12px !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important; /* Prevents squishing the buttons */
    }

    /* ============================================================================
       NEUTRAL TRIGGER OVERRIDE MATRIX — PILLAR 1: STRIP GREEN ACTIVE BACKGROUND (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Lock 3-Dot Button to Neutral Styling (Remove Green Active State) */
    .three-dot-btn.active-section,
    #notes-menu-btn.active-section,
    #notes-menu-btn-archived.active-section,
    #notes-menu-btn-bin.active-section {
      background: rgba(0, 0, 0, 0.04) !important;
      color: #18181b !important;
      border-color: rgba(0, 0, 0, 0.04) !important;
    }

    .three-dot-btn.active-section svg,
    #notes-menu-btn.active-section svg,
    #notes-menu-btn-archived.active-section svg,
    #notes-menu-btn-bin.active-section svg {
      stroke: currentColor !important;
    }

    /* 🚀 Fix 2: Dark Mode Support for Neutral Lock */
    body.dark-mode .three-dot-btn.active-section,
    body.dark-mode #notes-menu-btn.active-section,
    body.dark-mode #notes-menu-btn-archived.active-section,
    body.dark-mode #notes-menu-btn-bin.active-section {
      background: rgba(255, 255, 255, 0.06) !important;
      color: #f4f4f5 !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* ============================================================================
       HEADER HIERARCHY MATRIX — PILLAR 1: VERTICAL HIERARCHY STYLING (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Left Container for Title & Subtitle Stacking */
    .notes-header-left {
      display: flex !important;
      flex-direction: column !important;
      align-items: flex-start !important;
      justify-content: center !important;
      gap: 2px !important;
    }

    /* 🚀 Fix 2: Subtitle Typography & Perfect Alignment */
    .notes-count-subtitle {
      font-size: 13px !important;
      font-weight: 600 !important;
      color: var(--primary-color, #0d9488) !important;
      /* 24px SVG width + 10px gap = 34px. Aligns perfectly with the H2 text */
      margin-left: 34px !important; 
      letter-spacing: 0.2px !important;
    }

    body.dark-mode .notes-count-subtitle {
      color: var(--primary-color, #2dd4bf) !important;
    }

    /* Ensure the main row stays vertically centered */
    .notes-header-row {
      align-items: center !important;
    }

    .return-active-btn {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      min-height: 28px !important;
      padding: 4px 12px !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      border-radius: 999px !important;
      background: rgba(0, 0, 0, 0.04) !important;
      border: 1px solid rgba(0, 0, 0, 0.08) !important;
      color: var(--text-primary, #18181b) !important;
      cursor: pointer !important;
      transition: background 0.15s ease, transform 0.1s ease !important;
    }
    body.dark-mode .return-active-btn {
      background: rgba(255, 255, 255, 0.06) !important;
      border: 1px solid rgba(255, 255, 255, 0.1) !important;
      color: var(--text-primary, #f4f4f5) !important;
    }

    /* ============================================================================
       TRI-ACTION BULK CONTROLLER MATRIX — PILLAR 1: BULK ARCHIVE BUTTON STYLING (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Bulk Archive Button (Teal Tint) */
    .bulk-archive-btn {
      display: flex !important;
      align-items: center !important;
      gap: 6px !important;
      padding: 8px 12px !important;
      background: rgba(13, 148, 136, 0.1) !important;
      color: var(--primary-color, #0d9488) !important;
      border-radius: 8px !important;
      font-size: 14px !important;
      font-weight: 600 !important;
      border: none !important;
      cursor: pointer;
      transition: transform 0.1s ease, background 0.2s ease !important;
      white-space: nowrap !important;
    }

    body.dark-mode .bulk-archive-btn {
      background: rgba(45, 212, 191, 0.12) !important;
      color: var(--primary-color, #2dd4bf) !important;
    }

    .bulk-archive-btn:active {
      transform: scale(0.94) !important;
    }

    .bulk-archive-btn svg {
      width: 16px !important;
      height: 16px !important;
      stroke: currentColor !important;
      fill: none !important;
    }

    /* Ensure the parent floating bar can fit all 3 buttons gracefully */
    .bulk-action-bar, 
    #notes-bulk-action-bar {
      display: flex;
      flex-wrap: nowrap !important;
      gap: 8px !important;
      padding: 10px 14px !important;
      /* Adjust width if needed, or let flex handle it */
      width: auto !important;
      max-width: 95vw !important;
      overflow-x: auto !important; /* Prevents overflow on tiny screens */
    }

    .bulk-count {
      font-size: 13px !important;
      font-weight: 700 !important;
      color: var(--primary-color, #0d9488) !important;
      padding: 0 6px !important;
      white-space: nowrap !important;
    }
    body.dark-mode .bulk-count {
      color: var(--primary-color, #2dd4bf) !important;
    }

    .bulk-delete-btn {
      display: flex !important;
      align-items: center !important;
      gap: 6px !important;
      padding: 8px 12px !important;
      background: rgba(239, 68, 68, 0.1) !important;
      color: #ef4444 !important;
      border-radius: 8px !important;
      font-size: 14px !important;
      font-weight: 600 !important;
      border: none !important;
      cursor: pointer;
      transition: transform 0.1s ease, background 0.2s ease !important;
      white-space: nowrap !important;
    }
    .bulk-delete-btn:active {
      transform: scale(0.94) !important;
    }
    .bulk-delete-btn svg {
      width: 16px !important;
      height: 16px !important;
      stroke: currentColor !important;
      fill: none !important;
    }

    .bulk-cancel-btn {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 8px 12px !important;
      background: rgba(0, 0, 0, 0.04) !important;
      color: var(--text-secondary, #71717a) !important;
      border-radius: 8px !important;
      font-size: 14px !important;
      font-weight: 600 !important;
      border: none !important;
      cursor: pointer;
      transition: transform 0.1s ease, background 0.2s ease !important;
      white-space: nowrap !important;
    }
    body.dark-mode .bulk-cancel-btn {
      background: rgba(255, 255, 255, 0.06) !important;
      color: #a1a1aa !important;
    }
    .bulk-cancel-btn:active {
      transform: scale(0.94) !important;
    }

    /* ============================================================================
       SMART DYNAMIC DESCRIPTION MATRIX — PILLAR 1: SMART TEXTAREA & FULLSCREEN CSS
       ============================================================================ */
    /* 🚀 Fix 1: Description Wrapper & Dynamic Textarea */
    .desc-input-wrapper {
      position: relative;
      width: 100%;
      margin-top: 8px;
    }

    .desc-textarea {
      width: 100%;
      min-height: 65px !important; /* Forces 2 lines default */
      max-height: 110px !important; /* Caps at 4 lines */
      overflow-y: auto !important; /* Scrolls after 4 lines */
      resize: none !important;
      padding-right: 40px !important; /* Prevents text typing under the SVG button */
      box-sizing: border-box;
    }

    /* 🚀 Fix 2: Bottom-Right Expand Button */
    .expand-desc-btn {
      position: absolute;
      right: 8px;
      bottom: 8px;
      width: 26px;
      height: 26px;
      background: rgba(0, 0, 0, 0.05);
      border: none;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: #71717a;
      transition: 0.2s ease;
    }
    body.dark-mode .expand-desc-btn { background: rgba(255, 255, 255, 0.1); color: #a1a1aa; }
    .expand-desc-btn:hover { color: var(--primary-color, #0d9488); background: rgba(13, 148, 136, 0.1); }

    /* 🚀 Fix 3: Fullscreen Editor Modal */
    .fullscreen-desc-modal {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      background: #ffffff;
      z-index: 10000;
      display: none;
      flex-direction: column;
    }
    body.dark-mode .fullscreen-desc-modal { background: #18181b; }

    .fs-desc-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    body.dark-mode .fs-desc-header { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

    .fs-desc-textarea {
      flex-grow: 1;
      width: 100%;
      border: none;
      padding: 20px;
      font-size: 16px;
      resize: none;
      outline: none;
      background: transparent;
      color: inherit;
      line-height: 1.6;
    }

    /* ============================================================================
       METADATA INDICATOR MATRIX — PILLAR 1: METADATA ICON ALIGNMENT (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Collapsed Task Metadata Icons */
    .task-meta-icons-group {
      display: flex !important;
      align-items: center !important;
      gap: 6px !important;
      margin-left: 6px !important; /* Spacing from the time text */
    }
    .task-meta-icons-group:first-child {
      margin-left: 0 !important;
    }

    .task-meta-icon {
      width: 14px !important;
      height: 14px !important;
      stroke: #a1a1aa !important; /* Matches standard secondary text */
      fill: none !important;
      flex-shrink: 0 !important;
    }

    body.dark-mode .task-meta-icon {
      stroke: #71717a !important;
    }

    /* If the task is overdue or active, ensure icons match the active tint if needed */
    .task-card.active .task-meta-icon {
      stroke: var(--primary-color, #0d9488) !important;
    }

    /* ============================================================================
       DEEP LAYER TOUCH RESOLUTION MATRIX — PILLAR 1: CONTAINED EXPANSION & CLEAN Z-LAYERS
       ============================================================================ */
    /* Keeps expanded cards neatly contained inside their 26px border while letting height grow freely */
    .more-options-container,
    .task-options-list,
    .task-form-content,
    .modal-body-inner,
    div[class*="options-container"],
    .detailed-board-card.expanded,
    .exact-expanded-tray,
    .exact-more-panel,
    .subtasks-accordion,
    .inline-active-fields-slot,
    .inline-more-menu-slot,
    .task-options-row,
    .exact-action-row {
      overflow: visible !important;
      overflow-y: visible !important;
      overflow-x: visible !important;
      max-width: 100% !important;
      min-width: 0 !important;
      box-sizing: border-box !important;
    }
    .task-card.expanded {
      max-height: none !important;
      overflow: hidden !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
      box-sizing: border-box !important;
      border-radius: 26px !important;
    }
    .task-card.expanded .subtasks-accordion {
      max-height: none !important;
      margin-left: 0 !important;
      width: 100% !important;
    }
    .task-card.expanded .task-options-row,
    #todo-action-bar {
      flex-wrap: wrap !important;
    }

    /* Clean bottom sheet clearance & scrolling */
    .modal-content,
    .bottom-sheet-content,
    #task-modal,
    #sheet-task-composer .sheet-box {
      overflow-y: auto !important;
      overflow-x: hidden !important;
      padding-bottom: 350px !important;
    }

    /* Scoped interactive priority & energy triggers (no runaway wildcards) */
    .opt-prio, .opt-energy-cycle, .btn-pri-trigger, .btn-eng-trigger,
    #btn-composer-prio, #btn-composer-energy-cycle {
      position: relative;
      z-index: 20;
      pointer-events: auto !important;
    }

    /* Keep popovers neatly layered inside expanded cards / sheets */
    .dropdown-menu, .inline-sub-menu, [id*="-dropdown"],
    .prio-popup-menu, .energy-popup-menu, .exact-popover-wrapper,
    #composer-prio-popup, #composer-energy-popup, #task-loc-trigger-menu {
      z-index: 30 !important;
    }
    #notes-dropdown.three-dot-dropdown,
    #notes-view-sub-options.inline-sub-menu {
      z-index: 120 !important;
    }

    /* ============================================================================
       BIDIRECTIONAL MODAL MORPHING MATRIX — PILLAR 1: ANTI-HIGHLIGHT & TOUCH CSS
       ============================================================================ */
    /* 🚀 Fix 1: Prevent blue highlight on double-click/tap */
    .task-card, 
    .task-item,
    div[class*="task-card"],
    .detailed-board-card {
      -webkit-user-select: none !important;
      -moz-user-select: none !important;
      -ms-user-select: none !important;
      user-select: none !important;
      /* Optional: Ensure touch action doesn't block standard scrolling, but allows double-taps */
      touch-action: manipulation !important; 
    }
    .drag-grip,
    .drag-handle {
      touch-action: none !important;
    }

    /* Prevent blue highlight / word-selection hijack on double-click/tap (title text is editable inside the Edit modal) */
    .task-card .task-title,
    .task-card .task-title-text,
    .detailed-board-card .board-card-title {
      -webkit-user-select: none !important;
      user-select: none !important;
      -webkit-touch-callout: none !important;
    }

    /* ============================================================================
       DIALOG DE-COUPLING MATRIX — PILLAR 1: COMPACT DIALOG ISOLATION (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Compact Auto-Height Dialog */
    .discard-dialog-content,
    #discard-modal .modal-content {
      height: auto !important;
      min-height: 0 !important;
      padding: 24px !important; /* Resets the massive bottom clearance */
      margin: auto !important; 
      width: 90% !important;
      max-width: 320px !important;
      background: #ffffff !important;
      border-radius: 24px !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      gap: 16px !important;
      text-align: center !important;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    }
    body.dark-mode .discard-dialog-content,
    html.dark .discard-dialog-content,
    [data-theme="dark"] .discard-dialog-content,
    body.dark-mode #discard-modal .modal-content,
    html.dark #discard-modal .modal-content,
    [data-theme="dark"] #discard-modal .modal-content { 
      background: #18181b !important; 
      box-shadow: 0 16px 44px rgba(0, 0, 0, 0.52), inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    }

    /* 🚀 Fix 2: Typography Styling */
    .discard-dialog-content h3 {
      margin: 0 !important;
      font-size: 18px !important;
      font-weight: 700 !important;
      color: #18181b !important;
    }
    body.dark-mode .discard-dialog-content h3,
    html.dark .discard-dialog-content h3,
    [data-theme="dark"] .discard-dialog-content h3 { color: #f4f4f5 !important; }

    .discard-dialog-content p {
      margin: 0 0 8px 0 !important;
      font-size: 14px !important;
      color: #71717a !important;
      line-height: 1.5 !important;
    }
    body.dark-mode .discard-dialog-content p,
    html.dark .discard-dialog-content p,
    [data-theme="dark"] .discard-dialog-content p { color: #a1a1aa !important; }

    /* 🚀 Fix 3: Button Layout (Equal Widths) */
    .discard-dialog-actions {
      display: flex !important;
      flex-direction: row !important;
      width: 100% !important;
      gap: 12px !important;
      justify-content: space-between !important;
    }

    .discard-dialog-actions button {
      flex: 1 !important;
      padding: 12px 0 !important;
      border-radius: 12px !important;
      font-size: 14px !important;
      font-weight: 600 !important;
      border: none !important;
      cursor: pointer;
      transition: transform 0.1s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    }
    .discard-dialog-actions button:active { transform: scale(0.96) !important; }

    .discard-modal-btn-keep {
      background: rgba(0, 0, 0, 0.06);
      color: #3f3f46;
    }
    .discard-modal-btn-keep:hover {
      background: rgba(0, 0, 0, 0.1);
    }
    body.dark-mode .discard-modal-btn-keep,
    html.dark .discard-modal-btn-keep,
    [data-theme="dark"] .discard-modal-btn-keep {
      background: rgba(255, 255, 255, 0.1);
      color: #f4f4f5;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    body.dark-mode .discard-modal-btn-keep:hover,
    html.dark .discard-modal-btn-keep:hover,
    [data-theme="dark"] .discard-modal-btn-keep:hover {
      background: rgba(255, 255, 255, 0.16);
    }

    /* ============================================================================
       SEAMLESS STICKY BANNER MATRIX — PILLAR 1: INVISIBLE BORDERS (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Seamless Today Banner (Remove Borders) */
    /* Targets the common class/ID names used for the sticky date header */
    .todo-header,
    .date-header,
    .sticky-header,
    .date-section-header,
    .app-header,
    #todo-header-container,
    .main-header-row,
    body.light-mode .todo-header,
    body.light-mode .date-header,
    body.light-mode .sticky-header,
    body.light-mode .date-section-header,
    body.light-mode .app-header,
    body.light-mode #todo-header-container,
    body.light-mode .main-header-row,
    [data-theme="light"] .todo-header,
    [data-theme="light"] .date-header,
    [data-theme="light"] .sticky-header,
    [data-theme="light"] .date-section-header,
    [data-theme="light"] .app-header,
    [data-theme="light"] #todo-header-container,
    [data-theme="light"] .main-header-row {
      border-top: none !important;
      border-bottom: none !important;
      border: none !important;
      
      /* Occasionally borders are faked using box-shadows. This kills those too. */
      box-shadow: none !important; 
      
      /* CRITICAL: We ensure the background remains solid so it still hides 
         tasks when they scroll up underneath it. */
      background-color: #f5f7fa;
    }

    /* Optional: If you want to explicitly ensure Light Mode has no border 
       but want to protect any border you might have in Dark Mode, 
       we force it transparent in base, but leave dark mode alone unless specified. */
    :root {
      --header-border-color: transparent !important;
    }

    /* ============================================================================
       GRAVITY ANIMATION MASTER SYNTHESIS — PILLAR 1: SEAMLESS BANNER & GRAVITY PHYSICS (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Seamless Today Banner Background */
    .todo-header, .date-header, .sticky-header, #todo-header-container,
    body.light-mode .todo-header, body.light-mode .date-header, body.light-mode .sticky-header, body.light-mode #todo-header-container,
    [data-theme="light"] .todo-header, [data-theme="light"] .date-header, [data-theme="light"] .sticky-header, [data-theme="light"] #todo-header-container {
      background-color: transparent !important;
      background: transparent !important;
      /* Optional: If you want a slight blur so scrolling tasks fade out elegantly under it */
    }

    /* ============================================================================
       GHOST DROP & VACUUM ENGINE — PILLAR 1: LAYERING & REVERSE PHYSICS (CSS)
       ============================================================================ */
    /* 🚀 Fix 1: Z-Index Baseline (Required for Ghost Falling BEHIND) */
    .task-card-swipe-wrap {
      position: relative;
      z-index: 10;
    }
    .task-card {
      position: relative !important;
      z-index: 10 !important; 
      /* Solid background hides the ghost falling underneath it */
      background: #ffffff !important; 
    }
    body.dark-mode .task-card { background: #18181b !important; }
    body.dark-mode .overdue-risk,
    body.dark-mode .overdue-risk .task-card,
    html.dark .overdue-risk,
    html.dark .overdue-risk .task-card,
    [data-theme="dark"] .overdue-risk,
    [data-theme="dark"] .overdue-risk .task-card {
      background: linear-gradient(145deg, rgba(245, 130, 32, 0.20) 0%, rgba(239, 108, 0, 0.07) 54%, #18181b 100%), #18181b !important;
      border-left: 3px solid #ff9800 !important;
    }
    .task-card.sortable-fallback.dragging,
    .task-card.dragging {
      position: fixed !important;
      z-index: 100250 !important;
      pointer-events: none !important;
      border-radius: 26px !important;
      background: var(--bg-surface, #ffffff) !important;
    }
    body.dark-mode .task-card.sortable-fallback.dragging,
    body.dark-mode .task-card.dragging,
    html.dark .task-card.sortable-fallback.dragging,
    html.dark .task-card.dragging,
    [data-theme="dark"] .task-card.sortable-fallback.dragging,
    [data-theme="dark"] .task-card.dragging {
      background: #18181b !important;
    }

    /* Uniform Task Card Sizing, Reserved Metadata Space & Vertical Centering */
    .task-card:not(.expanded):not(.sliding-to-bottom) {
      height: 68px;
      min-height: 68px;
      max-height: 68px;
      padding: 10px 14px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      box-sizing: border-box;
    }
    .task-card.has-desc-preview:not(.expanded):not(.sliding-to-bottom) {
      height: auto;
      min-height: 68px;
      max-height: none;
    }
    .todo-list.kanban-board-view .task-card:not(.expanded):not(.sliding-to-bottom) {
      height: 96px;
      min-height: 96px;
      max-height: 96px;
    }
    .task-card.expanded {
      height: auto;
      min-height: 68px;
      display: block;
    }
    .task-card .task-main-row {
      width: 100%;
      min-height: 34px;
    }
    .task-card:not(.expanded) .task-main-row {
      height: 100%;
      align-items: center;
      min-height: 0;
    }
    .task-card:not(.expanded) .task-body-area {
      display: flex;
      flex-direction: column;
      justify-content: center;
      height: 100%;
      min-height: 0;
      padding: 0;
    }
    .task-card.expanded .task-body-area {
      display: block;
      height: auto;
      padding: 2px 0;
    }
    .task-title-row {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .task-card:not(.expanded) .task-title-row {
      flex-wrap: nowrap;
      height: 22px;
      line-height: 22px;
      overflow: hidden;
    }
    .task-card:not(.expanded) .task-title-text {
      display: block;
      flex: 0 1 auto;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 22px;
    }
    .task-card.expanded .task-title-text {
      display: inline;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
    }
    .task-desc-preview {
      display: block;
      margin-top: 2px;
      font-size: 12.5px;
      font-weight: 400;
      line-height: 17px;
      color: var(--text-muted, #64748b);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      max-width: 100%;
    }
    body.dark-mode .task-desc-preview,
    html.dark .task-desc-preview,
    [data-theme="dark"] .task-desc-preview {
      color: rgba(203, 213, 225, 0.72);
    }
    .task-card.completed .task-desc-preview {
      opacity: 0.7;
    }
    .task-card.expanded .task-desc-preview {
      display: none;
    }
    .task-cat-badge-slot {
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }
    .task-cat-badge-slot:empty {
      display: none;
    }
    .task-inbox-badge,
    .subtask-count-pill {
      flex-shrink: 0;
    }
    .task-card:not(.expanded) .task-cat-badge {
      height: 18px;
      padding: 0 7px;
      line-height: 1;
      box-sizing: border-box;
    }
    .task-card .search-task-meta-row {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
    }
    .task-card:not(.expanded) .search-task-meta-row {
      flex-wrap: nowrap !important;
      height: 16px;
      min-height: 16px;
      margin-top: 4px !important;
      overflow: hidden !important;
      white-space: nowrap;
    }
    .task-card .search-task-meta-row:empty {
      visibility: hidden !important;
      height: 0 !important;
      min-height: 0 !important;
      margin-top: 0 !important;
      overflow: hidden !important;
      pointer-events: none !important;
    }
    .task-item.deleting .task-card,
    .task-item.striking-complete .task-card,
    .task-item.task-collapsing .task-card {
      height: 0 !important;
      min-height: 0 !important;
      max-height: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      border-width: 0 !important;
    }

    /* 🚀 Fix 2: The Strike & Hold Phase */
    .task-holding .task-title,
    .task-holding .task-title-text,
    .task-holding .task-name {
      text-decoration: line-through !important;
      color: #a1a1aa !important;
      transition: all 0.45s ease !important;
    }
    body.dark-mode .task-holding .task-title,
    body.dark-mode .task-holding .task-title-text,
    body.dark-mode .task-holding .task-name { color: #71717a !important; }

    /* 🚀 Fix 1: Synchronous Initiation with CSS Delay (The "Wait" Effect) */
    .task-collapsing {
      /* 0.98s slide duration, 0.42s explicit delay before the slide starts */
      transition: all 0.98s cubic-bezier(0.4, 0, 0.2, 1) 0.42s !important;
      min-height: 0 !important;
      height: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      opacity: 0 !important;
      overflow: hidden !important;
      border: none !important;
      transform: scaleY(0) !important;
      transform-origin: top !important;
    }

    /* 🚀 Fix 4: The Reverse Resurrection (Unchecking) */
    @keyframes reverseRise {
      0% { transform: translateY(80px); opacity: 0; }
      100% { transform: translateY(0); opacity: 1; }
    }
    .task-rising {
      animation: reverseRise 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    }

    /* 🚀 Fix 1: Strip Extended Rectangle Background & Enforce Uniform Sticky Position Across Action, Focus & Mind */
    .focus-top-bar,
    #tab-todo .focus-top-bar,
    #tab-focus .focus-top-bar,
    #tab-mind .focus-top-bar,
    body.dark-mode .focus-top-bar,
    html.dark .focus-top-bar,
    [data-theme="dark"] .focus-top-bar,
    body.dark-mode #tab-todo .focus-top-bar,
    body.dark-mode #tab-focus .focus-top-bar,
    body.dark-mode #tab-mind .focus-top-bar,
    .top-header,
    .top-header-row,
    .toggle-wrapper-outer,
    .tab-container-row,
    .main-tab-wrapper,
    .header-toggle-container,
    div[class*="toggle-wrapper"],
    div[class*="tab-container"],
    div[class*="top-nav-tabs"] {
      background: transparent !important;
      background-color: transparent !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      box-shadow: none !important;
      border: none !important;
    }
    #tab-todo .focus-top-bar,
    #tab-focus .focus-top-bar,
    #tab-mind .focus-top-bar {
      position: sticky !important;
      top: 4px !important;
      z-index: 25 !important;
    }

    /* 🚀 Fix 2: Protect the Inner Pill */
    .tab-switch,
    .mode-toggle,
    .view-toggle,
    div[class*="toggle-pill"],
    body.dark-mode .mode-pill-group,
    html.dark .mode-pill-group,
    [data-theme="dark"] .mode-pill-group {
      background: #18181b;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* 🚀 Fix 2: GDrive Sync Layout Styling */
    .settings-list-container #backup-expansion.open {
      max-height: 1200px !important;
    }
    .backup-export-section {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
    body.dark-mode .backup-export-section,
    html.dark .backup-export-section,
    [data-theme="dark"] .backup-export-section {
      border-top-color: rgba(255, 255, 255, 0.08);
    }
    .section-title {
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: #a1a1aa;
      margin: 0 0 12px 0;
    }

    /* The Google Drive Card */
    .gdrive-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background: rgba(0, 0, 0, 0.02);
      border: 1px solid rgba(0, 0, 0, 0.06);
      padding: 14px;
      border-radius: 16px;
      transition: all 0.3s ease;
    }
    body.dark-mode .gdrive-card,
    html.dark .gdrive-card,
    [data-theme="dark"] .gdrive-card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.07);
    }

    .gdrive-info {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .gdrive-icon {
      width: 32px;
      height: 32px;
      flex-shrink: 0;
    }
    .gdrive-text-block {
      min-width: 0;
    }
    .gdrive-title {
      margin: 0;
      font-size: 15px;
      font-weight: 600;
      color: #18181b;
    }
    body.dark-mode .gdrive-title,
    html.dark .gdrive-title,
    [data-theme="dark"] .gdrive-title {
      color: #f4f4f5;
    }
    .gdrive-status {
      margin: 3px 0 0 0;
      font-size: 12.5px;
      color: #71717a;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* Connect/Change Button */
    .gdrive-btn {
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: 0.2s;
      flex-shrink: 0;
    }
    .gdrive-btn.primary {
      background: #0d9488;
      color: #ffffff;
    }
    .gdrive-btn.secondary {
      background: rgba(0, 0, 0, 0.06);
      color: #18181b;
    }
    body.dark-mode .gdrive-btn.secondary,
    html.dark .gdrive-btn.secondary,
    [data-theme="dark"] .gdrive-btn.secondary {
      background: rgba(255, 255, 255, 0.1);
      color: #f4f4f5;
    }

    /* The Active Settings Panel */
    .gdrive-active-panel {
      margin-top: 14px;
      animation: gdriveFadeIn 0.3s ease;
    }
    @keyframes gdriveFadeIn {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .backup-setting-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    body.dark-mode .backup-setting-row,
    html.dark .backup-setting-row,
    [data-theme="dark"] .backup-setting-row {
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .backup-setting-text label {
      display: block;
      font-weight: 600;
      font-size: 14.5px;
      margin-bottom: 2px;
    }
    .backup-setting-text span {
      font-size: 12px;
      color: #a1a1aa;
    }

    .backup-select {
      padding: 8px 12px;
      border-radius: 8px;
      border: 1px solid rgba(0, 0, 0, 0.12);
      background: transparent;
      font-size: 13.5px;
      font-weight: 500;
      cursor: pointer;
      color: inherit;
    }
    body.dark-mode .backup-select,
    html.dark .backup-select,
    [data-theme="dark"] .backup-select {
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: #18181b;
    }

    .backup-metadata {
      margin: 12px 0;
      font-size: 12.5px;
      color: #71717a;
      text-align: right;
    }
    .backup-metadata strong {
      color: #0d9488;
    }

    /* Action Buttons */
    .backup-actions {
      display: flex;
      gap: 12px;
      margin-top: 14px;
    }
    .action-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px;
      border-radius: 12px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      transition: 0.2s;
    }
    .action-btn svg {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
    }
    .backup-now-btn {
      background: #0d9488;
      color: #ffffff;
      border: none;
    }
    .backup-now-btn:active {
      transform: scale(0.97);
    }
    .restore-btn {
      background: transparent;
      border: 1px solid rgba(0, 0, 0, 0.12);
      color: #3f3f46;
    }
    body.dark-mode .restore-btn,
    html.dark .restore-btn,
    [data-theme="dark"] .restore-btn {
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #d4d4d8;
    }

    /* Syncing Animation */
    .syncing {
      opacity: 0.7;
      pointer-events: none;
    }
    .syncing svg {
      animation: spinBounce 1s infinite linear;
    }
    @keyframes spinBounce {
      0% { transform: translateY(0); }
      50% { transform: translateY(-3px); }
      100% { transform: translateY(0); }
    }

    /* 🚀 Fix 2: Progress Bar Styling */
    .progress-track {
      width: 100%;
      height: 6px;
      background: rgba(0, 0, 0, 0.05);
      border-radius: 4px;
      overflow: hidden;
    }
    body.dark-mode .progress-track,
    [data-theme="dark"] .progress-track {
      background: rgba(255, 255, 255, 0.1);
    }

    .progress-fill {
      width: 0%;
      height: 100%;
      background: #0d9488;
      border-radius: 4px;
      transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* 🚀 Fix 3: Global Toast Notification System */
    .toast-container {
      position: fixed;
      bottom: 40px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 9999999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
    }
    .toast-msg {
      background: #18181b;
      color: #ffffff;
      padding: 14px 24px;
      border-radius: 30px;
      font-size: 14px;
      font-weight: 600;
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
      display: flex;
      align-items: center;
      gap: 10px;
      animation: toastSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      pointer-events: auto;
    }
    body.dark-mode .toast-msg,
    [data-theme="dark"] .toast-msg {
      background: #ffffff;
      color: #18181b;
    }
    .toast-msg svg {
      width: 20px;
      height: 20px;
      color: #10b981;
      flex-shrink: 0;
    }
    .toast-msg.is-error svg {
      color: #ef4444;
    }

    @keyframes toastSlideUp {
      0% { opacity: 0; transform: translateY(40px) scale(0.9); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes toastFadeOut {
      100% { opacity: 0; transform: translateY(-10px) scale(0.95); }
    }

    /* 🚀 Fix 1: Global Glassmorphic Dropdowns (Light Mode) */
    select,
    .backup-select,
    .settings-select {
      -webkit-appearance: none !important;
      -moz-appearance: none !important;
      appearance: none !important;

      /* Frosted Glass Background & Custom Chevron */
      background: rgba(0, 0, 0, 0.03) 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="%233f3f46" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 12px center !important;

      border: 1px solid rgba(0, 0, 0, 0.08) !important;
      border-radius: 12px !important;
      padding: 10px 36px 10px 14px !important;

      font-family: inherit !important;
      font-size: 14px !important;
      font-weight: 500 !important;
      color: #18181b !important;
      cursor: pointer !important;
      outline: none !important;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
    }

    select:hover {
      background-color: rgba(0, 0, 0, 0.06) !important;
      border-color: rgba(0, 0, 0, 0.12) !important;
    }

    select:focus {
      border-color: #0d9488 !important;
      box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15) !important;
    }

    /* 🚀 Fix 2: Global Glassmorphic Dropdowns (Dark Mode) */
    body.dark-mode select,
    body.dark-mode .backup-select,
    body.dark-mode .settings-select,
    [data-theme="dark"] select,
    [data-theme="dark"] .backup-select,
    [data-theme="dark"] .settings-select {
      background: rgba(255, 255, 255, 0.04) 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="%23a1a1aa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 12px center !important;
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
      color: #f4f4f5 !important;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    }

    body.dark-mode select:hover,
    [data-theme="dark"] select:hover {
      background-color: rgba(255, 255, 255, 0.08) !important;
      border-color: rgba(255, 255, 255, 0.15) !important;
    }

    body.dark-mode select:focus,
    [data-theme="dark"] select:focus {
      border-color: #0d9488 !important;
      box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25) !important;
    }

    /* 🚀 Fix 3: Options Base Styling (For OSes that permit it) */
    select option {
      background-color: #ffffff;
      color: #18181b;
      font-weight: 500;
    }
    body.dark-mode select option,
    [data-theme="dark"] select option {
      background-color: #18181b;
      color: #f4f4f5;
    }

    /* 🚀 Fix 1: Compact Google Drive Card */
    .gdrive-card {
      padding: 12px 16px !important;
      border-radius: 14px !important;
      gap: 12px !important;
    }
    .gdrive-info {
      gap: 12px !important;
      flex: 1 !important;
      min-width: 0 !important;
    }
    .gdrive-icon {
      width: 24px !important;
      height: 24px !important;
    }
    .gdrive-text-block {
      flex: 1 !important;
      min-width: 0 !important;
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important;
    }
    .gdrive-title {
      font-size: 14px !important;
      margin-bottom: 2px !important;
      white-space: nowrap !important;
    }
    .gdrive-status {
      font-size: 12px !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      opacity: 0.8 !important;
    }
    .gdrive-btn {
      padding: 6px 14px !important;
      font-size: 12px !important;
      border-radius: 8px !important;
    }

    /* 🚀 Fix 2: Streamlined Settings Row */
    .backup-setting-row {
      padding: 16px 0 !important;
      align-items: center !important;
      gap: 16px !important;
    }
    .backup-setting-text {
      flex: 1 !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 4px !important;
    }
    .backup-setting-text label {
      font-size: 14px !important;
      white-space: nowrap !important;
    }
    .backup-setting-text span {
      font-size: 12px !important;
      line-height: 1.3 !important;
    }
    .backup-select {
      min-width: 110px !important;
      padding: 8px 32px 8px 12px !important;
      font-size: 13px !important;
    }

    /* 🚀 Fix 3: Refined Metadata & Sleek Buttons */
    .backup-metadata {
      text-align: center !important;
      font-size: 12px !important;
      margin: 8px 0 16px 0 !important;
      opacity: 0.8 !important;
    }
    .backup-actions {
      gap: 12px !important;
      margin-top: 8px !important;
    }
    .action-btn {
      height: 42px !important;
      padding: 0 16px !important;
      font-size: 13.5px !important;
      border-radius: 10px !important;
    }
    .action-btn svg {
      width: 16px !important;
      height: 16px !important;
    }

    /* 🚀 Fix 2: The Unified Sleek Card */
    .sleek-card {
      background: rgba(0, 0, 0, 0.02) !important;
      border: 1px solid rgba(0, 0, 0, 0.06) !important;
      border-radius: 12px !important;
      overflow: hidden !important;
    }
    body.dark-mode .sleek-card,
    [data-theme="dark"] .sleek-card {
      background: rgba(255, 255, 255, 0.02) !important;
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    /* 🚀 Fix 3: Minimalist List Rows & Dividers */
    .sleek-row {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      padding: 12px 14px !important;
      min-height: 52px !important;
    }
    .sleek-divider {
      height: 1px !important;
      background: rgba(0, 0, 0, 0.05) !important;
      margin: 0 14px !important;
    }
    body.dark-mode .sleek-divider,
    [data-theme="dark"] .sleek-divider {
      background: rgba(255, 255, 255, 0.06) !important;
    }

    /* 🚀 Fix 4: Compact Typography */
    .sleek-text-group {
      display: flex !important;
      flex-direction: column !important;
      gap: 3px !important;
    }
    .sleek-label {
      font-size: 13px !important;
      font-weight: 500 !important;
      color: #18181b !important;
    }
    body.dark-mode .sleek-label,
    [data-theme="dark"] .sleek-label {
      color: #f4f4f5 !important;
    }

    .sleek-sub {
      font-size: 11px !important;
      color: #71717a !important;
      white-space: nowrap !important;
    }
    body.dark-mode .sleek-sub,
    [data-theme="dark"] .sleek-sub {
      color: #a1a1aa !important;
    }

    /* 🚀 Fix 5: Elegant Low-Profile Buttons */
    .sleek-btn {
      font-family: inherit !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      padding: 6px 14px !important;
      border-radius: 6px !important;
      cursor: pointer !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      transition: all 0.2s ease !important;
    }
    .sleek-btn svg {
      width: 14px !important;
      height: 14px !important;
      margin-right: 4px !important;
    }
    .sleek-btn.primary {
      background: #0d9488 !important;
      color: #ffffff !important;
      border: none !important;
    }
    .sleek-btn.outline {
      background: transparent !important;
      color: #3f3f46 !important;
      border: 1px solid rgba(0, 0, 0, 0.15) !important;
    }
    body.dark-mode .sleek-btn.outline,
    [data-theme="dark"] .sleek-btn.outline {
      color: #d4d4d8 !important;
      border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    .sleek-btn:active {
      transform: scale(0.96) !important;
    }

    .sleek-action-group {
      display: flex !important;
      gap: 8px !important;
    }

    /* 🚀 Fix 6: Micro Progress Bar */
    .sleek-progress-wrapper {
      background: rgba(0, 0, 0, 0.03) !important;
      padding: 0 !important;
    }
    body.dark-mode .sleek-progress-wrapper,
    [data-theme="dark"] .sleek-progress-wrapper {
      background: rgba(255, 255, 255, 0.03) !important;
    }

    .sleek-progress-track {
      width: 100% !important;
      height: 3px !important;
      background: transparent !important;
    }
    .sleek-progress-fill {
      width: 0%;
      height: 100% !important;
      background: #0d9488 !important;
      transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* 🚀 Fix 1: Card & Row Box-Sizing (Modern Minimalist, Full Text Visibility, Zero Word Breaks) */
    .backup-export-section {
      margin-top: 2px !important;
      margin-bottom: 8px !important;
      padding-top: 0 !important;
      padding-bottom: 6px !important;
      border-top: none !important;
    }

    .backup-export-section .section-title {
      font-size: 11.5px !important;
      font-weight: 700 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.8px !important;
      color: #0d9488 !important;
      margin: 2px 0 8px 0 !important;
      white-space: nowrap !important;
      word-break: keep-all !important;
      display: flex !important;
      align-items: center !important;
      gap: 7px !important;
    }
    .backup-export-section .section-title svg {
      width: 15px !important;
      height: 15px !important;
      flex-shrink: 0 !important;
      display: block !important;
    }
    body.dark-mode .backup-export-section .section-title,
    [data-theme="dark"] .backup-export-section .section-title {
      color: #2dd4bf !important;
    }

    .sleek-card {
      width: 100% !important;
      box-sizing: border-box !important;
      border-radius: 14px !important;
    }

    .sleek-row {
      display: flex !important;
      flex-wrap: wrap !important;
      justify-content: space-between !important;
      align-items: center !important;
      gap: 10px 12px !important;
      padding: 12px 14px !important;
      width: 100% !important;
      box-sizing: border-box !important;
      min-height: 48px !important;
    }

    /* 🚀 Fix 2: Full Text Display (No Truncation, No Broken Words) */
    .sleek-text-group {
      flex: 1 1 auto !important;
      min-width: 0 !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 3px !important;
    }

    .sleek-label {
      font-size: 13.5px !important;
      font-weight: 600 !important;
      display: block !important;
      width: auto !important;
      white-space: nowrap !important;
      overflow: visible !important;
      text-overflow: clip !important;
      word-break: keep-all !important;
      overflow-wrap: normal !important;
      hyphens: none !important;
    }

    .sleek-sub {
      font-size: 12px !important;
      line-height: 1.35 !important;
      display: block !important;
      width: auto !important;
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: clip !important;
      word-break: keep-all !important;
      overflow-wrap: normal !important;
      hyphens: none !important;
    }

    /* 🚀 Fix 3: Button & Modern Minimalist Dropdown Protection */
    .sleek-action-group,
    .sleek-btn,
    .sleek-select,
    .sleek-dropdown-trigger {
      flex: 0 0 auto !important;
      flex-shrink: 0 !important;
      white-space: nowrap !important;
      word-break: keep-all !important;
    }

    .sleek-action-group {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      margin-left: auto !important;
    }

    /* Modern Minimalist Custom Dropdown Trigger & Menu */
    .sleek-dropdown-trigger {
      display: inline-flex !important;
      align-items: center !important;
      gap: 6px !important;
      padding: 5px 11px !important;
      border-radius: 8px !important;
      background: rgba(0, 0, 0, 0.035) !important;
      border: 1px solid rgba(0, 0, 0, 0.08) !important;
      color: #18181b !important;
      font-family: inherit !important;
      font-size: 12.5px !important;
      font-weight: 600 !important;
      cursor: pointer !important;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
      outline: none !important;
    }
    body.dark-mode .sleek-dropdown-trigger,
    [data-theme="dark"] .sleek-dropdown-trigger {
      background: rgba(255, 255, 255, 0.05) !important;
      border: 1px solid rgba(255, 255, 255, 0.1) !important;
      color: #f4f4f5 !important;
    }
    .sleek-dropdown-trigger:hover {
      border-color: rgba(13, 148, 136, 0.45) !important;
    }
    .sleek-dropdown-trigger svg {
      width: 13px !important;
      height: 13px !important;
      color: #71717a !important;
      transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    body.dark-mode .sleek-dropdown-trigger svg,
    [data-theme="dark"] .sleek-dropdown-trigger svg {
      color: #a1a1aa !important;
    }
    .sleek-dropdown-trigger.open {
      border-color: #0d9488 !important;
      background: rgba(13, 148, 136, 0.08) !important;
      color: #0d9488 !important;
    }
    body.dark-mode .sleek-dropdown-trigger.open,
    [data-theme="dark"] .sleek-dropdown-trigger.open {
      border-color: #2dd4bf !important;
      background: rgba(45, 212, 191, 0.1) !important;
      color: #2dd4bf !important;
    }
    .sleek-dropdown-trigger.open svg {
      transform: rotate(180deg) !important;
      color: currentColor !important;
    }

    .sleek-dropdown-menu {
      max-height: 0 !important;
      opacity: 0 !important;
      overflow: hidden !important;
      margin: 0 12px !important;
      border-radius: 10px !important;
      background: rgba(0, 0, 0, 0.025) !important;
      border: 0px solid transparent !important;
      transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease, padding 0.2s ease !important;
    }
    body.dark-mode .sleek-dropdown-menu,
    [data-theme="dark"] .sleek-dropdown-menu {
      background: rgba(255, 255, 255, 0.03) !important;
    }
    .sleek-dropdown-menu.open {
      max-height: 200px !important;
      opacity: 1 !important;
      margin: 0 12px 10px 12px !important;
      padding: 4px !important;
      border: 1px solid rgba(0, 0, 0, 0.06) !important;
    }
    body.dark-mode .sleek-dropdown-menu.open,
    [data-theme="dark"] .sleek-dropdown-menu.open {
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .sleek-dropdown-option {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      padding: 8px 10px !important;
      border-radius: 7px !important;
      font-size: 12.5px !important;
      font-weight: 500 !important;
      color: #3f3f46 !important;
      cursor: pointer !important;
      transition: background 0.15s ease, color 0.15s ease !important;
      white-space: nowrap !important;
    }
    body.dark-mode .sleek-dropdown-option,
    [data-theme="dark"] .sleek-dropdown-option {
      color: #d4d4d8 !important;
    }
    .sleek-dropdown-option:hover {
      background: rgba(0, 0, 0, 0.04) !important;
    }
    body.dark-mode .sleek-dropdown-option:hover,
    [data-theme="dark"] .sleek-dropdown-option:hover {
      background: rgba(255, 255, 255, 0.06) !important;
    }
    .sleek-dropdown-option.selected {
      color: #0d9488 !important;
      font-weight: 600 !important;
      background: rgba(13, 148, 136, 0.08) !important;
    }
    body.dark-mode .sleek-dropdown-option.selected,
    [data-theme="dark"] .sleek-dropdown-option.selected {
      color: #2dd4bf !important;
      background: rgba(45, 212, 191, 0.1) !important;
    }
    .sleek-dropdown-option svg {
      width: 14px !important;
      height: 14px !important;
      opacity: 0 !important;
      stroke: currentColor !important;
      transition: opacity 0.15s ease !important;
    }
    .sleek-dropdown-option.selected svg {
      opacity: 1 !important;
    }

    /* 🚀 Fix 5: Settings Menu Compact Button & Calendar Row */
    .settings-item {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      padding: 16px 20px !important;
      border-radius: 20px !important;
      width: 100% !important;
      box-sizing: border-box !important;
      margin-bottom: 2px !important;
      background: rgba(255, 255, 255, 0.78) !important;
      border: 1px solid rgba(0, 0, 0, 0.06) !important;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
      transition: background 0.2s ease, border-color 0.2s ease !important;
    }
    body.dark-mode .settings-item,
    html.dark .settings-item,
    [data-theme="dark"] .settings-item {
      background: rgba(255, 255, 255, 0.04) !important;
      border: 1px solid rgba(255, 255, 255, 0.07) !important;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    }
    .settings-item .setting-icon {
      width: 22px !important;
      height: 22px !important;
      stroke: #60a5fa !important;
      fill: none !important;
      flex-shrink: 0 !important;
    }
    .compact-btn {
      padding: 4px 12px !important;
      font-size: 11px !important;
      height: 28px !important;
    }

    /* ==========================================================================
       SETTINGS LIST & GOOGLE CALENDAR ACCORDION POLISH (FOCUS MODE TARGETS)
       ========================================================================== */
    #sheet-settings-menu > #settings-modal {
      padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
    }
    #sheet-settings-menu > #settings-modal > .modal-content {
      flex: 0 0 auto !important;
      min-height: 0 !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container {
      gap: 14px !important;
      padding: 8px 4px 0 4px !important;
      min-height: 0 !important;
      flex: 0 0 auto !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container .setting-card,
    #sheet-settings-menu #settings-modal .settings-list-container #setting-google-calendar {
      padding: 16px 18px !important;
      border-radius: 20px !important;
      gap: 14px !important;
      min-height: 68px !important;
      background: rgba(255, 255, 255, 0.86) !important;
      border: 1px solid rgba(15, 23, 42, 0.07) !important;
      box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
      transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, border-color 0.2s ease !important;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container .setting-card,
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #setting-google-calendar,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container .setting-card,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #setting-google-calendar,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container .setting-card,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #setting-google-calendar {
      background: rgba(255, 255, 255, 0.045) !important;
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-card:active {
      transform: scale(0.986) !important;
    }

    /* Prevent all text wrapping in settings cards, labels, values, buttons & accordion rows */
    #sheet-settings-menu #settings-modal .settings-list-container .setting-left {
      width: auto !important;
      max-width: none !important;
      flex: 0 0 auto !important;
      gap: 13px !important;
      font-size: 15px !important;
      font-weight: 600 !important;
      letter-spacing: -0.01em !important;
      white-space: nowrap !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-left span {
      white-space: nowrap !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      background: rgba(148, 163, 184, 0.12);
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge {
      background: rgba(255, 255, 255, 0.06);
    }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-theme { background: rgba(129, 140, 248, 0.14); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-name { background: rgba(56, 189, 248, 0.14); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-macro { background: rgba(251, 113, 133, 0.14); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-gcal { background: rgba(96, 165, 250, 0.15); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-sound { background: rgba(167, 139, 250, 0.14); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-backup { background: rgba(251, 191, 36, 0.14); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-reminders { background: rgba(52, 211, 153, 0.14); }
    #sheet-settings-menu #settings-modal .settings-list-container .setting-icon-badge.badge-haptic { background: rgba(167, 139, 250, 0.14); }

    #sheet-settings-menu #settings-modal .settings-list-container .setting-left svg {
      width: 18px !important;
      height: 18px !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container .setting-right {
      flex: 1 1 auto !important;
      min-width: 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 10px !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-align: right !important;
      font-size: 13.5px !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container #setting-google-calendar .setting-right {
      overflow: visible !important;
      flex: 1 1 auto !important;
      min-width: 0 !important;
      gap: 8px !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container #name-display,
    #sheet-settings-menu #settings-modal .settings-list-container #macro-goal-display {
      display: block !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      font-size: 13.5px !important;
      font-weight: 500 !important;
      color: #64748b !important;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #name-display,
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #macro-goal-display,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #name-display,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #macro-goal-display {
      color: #94a3b8 !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container .chevron-icon {
      flex-shrink: 0 !important;
      width: 16px !important;
      height: 16px !important;
      opacity: 0.65;
      transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
    }

    /* Google Calendar Header Status Pill & Accordion Body */
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 5px !important;
      height: 25px !important;
      padding: 0 10px !important;
      box-sizing: border-box !important;
      border-radius: 999px !important;
      font-size: 11px !important;
      font-weight: 600 !important;
      line-height: 1 !important;
      letter-spacing: -0.01em !important;
      white-space: nowrap !important;
      flex: 0 1 auto !important;
      min-width: 0 !important;
      max-width: 100% !important;
      overflow: hidden !important;
      background: rgba(148, 163, 184, 0.14) !important;
      color: #64748b !important;
      border: 1px solid rgba(148, 163, 184, 0.22) !important;
      vertical-align: middle !important;
    }
    body.dark-mode #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill,
    html.dark #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill,
    [data-theme="dark"] #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill {
      background: rgba(255, 255, 255, 0.06) !important;
      color: #a1a1aa !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill #gcal-status-pill-text {
      display: inline-block !important;
      min-width: 0 !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
      color: inherit !important;
      font-size: inherit !important;
      font-weight: inherit !important;
      line-height: 1.2 !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill .gcal-dot {
      display: inline-block !important;
      width: 6px !important;
      height: 6px !important;
      border-radius: 50% !important;
      background: #94a3b8 !important;
      flex-shrink: 0 !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-connected,
    body.dark-mode #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-connected,
    html.dark #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-connected,
    [data-theme="dark"] #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-connected {
      background: rgba(16, 185, 129, 0.14) !important;
      color: #10b981 !important;
      border-color: rgba(16, 185, 129, 0.28) !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-connected .gcal-dot {
      background: #10b981 !important;
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.55) !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready,
    body.dark-mode #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready,
    html.dark #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready,
    [data-theme="dark"] #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready {
      background: rgba(59, 130, 246, 0.13) !important;
      color: #2563eb !important;
      border-color: rgba(59, 130, 246, 0.25) !important;
    }
    body.dark-mode #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready,
    html.dark #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready,
    [data-theme="dark"] #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready {
      color: #60a5fa !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-ready .gcal-dot {
      background: #3b82f6 !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-warning,
    body.dark-mode #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-warning,
    html.dark #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-warning,
    [data-theme="dark"] #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-warning {
      background: rgba(245, 158, 11, 0.14) !important;
      color: #f59e0b !important;
      border-color: rgba(245, 158, 11, 0.28) !important;
    }
    #sheet-settings-menu #settings-modal #setting-google-calendar #gcal-status-pill.is-warning .gcal-dot {
      background: #f59e0b !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container .settings-expansion {
      border-radius: 18px !important;
      margin-top: -4px !important;
      border: 1px solid transparent !important;
      transition: max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, padding 0.24s ease !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .settings-expansion.open {
      padding: 16px 18px !important;
      background: rgba(255, 255, 255, 0.65) !important;
      border-color: rgba(15, 23, 42, 0.06) !important;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container .settings-expansion.open,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container .settings-expansion.open {
      background: rgba(255, 255, 255, 0.03) !important;
      border-color: rgba(255, 255, 255, 0.07) !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #gcal-expansion.open {
      padding: 14px 16px !important;
      margin-top: -6px !important;
    }
    #gcal-expansion .sleek-card {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }
    #gcal-expansion .sleek-row {
      display: flex !important;
      flex-wrap: wrap !important;
      align-items: center !important;
      justify-content: space-between !important;
      padding: 2px 2px !important;
      min-height: 44px !important;
      gap: 10px 14px !important;
    }
    #gcal-expansion .sleek-text-group {
      flex: 1 1 170px !important;
      min-width: 0 !important;
      gap: 3px !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container #backup-expansion .sleek-row {
      padding: 14px 16px !important;
      min-height: 54px !important;
    }
    #gcal-expansion #gcal-status-sub {
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: clip !important;
      overflow-wrap: anywhere !important;
      word-break: normal !important;
      line-height: 1.38 !important;
    }
    #backup-expansion #gdrive-status-text {
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    #backup-expansion .gdrive-linked-badge {
      display: inline-flex !important;
      align-items: center !important;
      gap: 5px !important;
      height: 24px !important;
      padding: 0 9px !important;
      border-radius: 999px !important;
      font-size: 11px !important;
      font-weight: 650 !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
      background: rgba(16, 185, 129, 0.14) !important;
      color: #10b981 !important;
      border: 1px solid rgba(16, 185, 129, 0.28) !important;
    }
    #backup-expansion .gdrive-linked-badge::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #10b981;
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
    }
    #gcal-expansion .sleek-action-group {
      flex: 0 0 auto !important;
      display: flex !important;
      flex-wrap: wrap !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 8px !important;
      margin-left: auto !important;
    }
    #gcal-expansion .sleek-btn {
      white-space: nowrap !important;
      height: 34px !important;
      padding: 0 13px !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      border-radius: 10px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    #gcal-expansion .gcal-cloud-row {
      padding-bottom: 6px !important;
    }
    #gcal-expansion .gcal-divider {
      height: 1px;
      margin: 8px 0 10px;
      background: rgba(15, 23, 42, 0.08);
    }
    body.dark-mode #gcal-expansion .gcal-divider,
    html.dark #gcal-expansion .gcal-divider,
    [data-theme="dark"] #gcal-expansion .gcal-divider {
      background: rgba(255, 255, 255, 0.08);
    }
    #gcal-expansion .gcal-cloud-mini-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 24px;
      padding: 0 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 650;
      white-space: nowrap;
      flex-shrink: 0;
      background: rgba(148, 163, 184, 0.14);
      color: #64748b;
      border: 1px solid rgba(148, 163, 184, 0.24);
    }
    #gcal-expansion .gcal-cloud-mini-pill.is-active {
      background: rgba(16, 185, 129, 0.14);
      color: #10b981;
      border-color: rgba(16, 185, 129, 0.28);
    }
    #gcal-expansion .gcal-cloud-mini-pill.is-warning {
      background: rgba(245, 158, 11, 0.14);
      color: #f59e0b;
      border-color: rgba(245, 158, 11, 0.28);
    }
    #gcal-expansion .gcal-blocked-notice-box {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      font-size: 12.2px;
      line-height: 1.45;
      font-weight: 500;
      color: #92400e;
      background: rgba(245, 158, 11, 0.11);
      border: 1px solid rgba(245, 158, 11, 0.26);
    }
    body.dark-mode #gcal-expansion .gcal-blocked-notice-box,
    html.dark #gcal-expansion .gcal-blocked-notice-box,
    [data-theme="dark"] #gcal-expansion .gcal-blocked-notice-box {
      color: #fde68a;
      background: rgba(245, 158, 11, 0.13);
      border-color: rgba(245, 158, 11, 0.28);
    }

    /* Clean bordered input styling inside Name & Macro Goal accordions */
    #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper {
      flex-direction: row;
      align-items: center;
      gap: 10px;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input {
      flex: 1 1 auto;
      min-width: 0;
      width: 100%;
      box-sizing: border-box;
      padding: 11px 14px;
      border-radius: 12px;
      background: #F8FAFC;
      border: 1px solid rgba(15, 23, 42, 0.14);
      color: #18181b;
      font-family: inherit;
      font-size: 14px;
      font-weight: 500;
      text-align: left;
      outline: none;
      transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input {
      background: #1C202B;
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: #f4f4f5;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input:focus {
      border-color: var(--accent-primary, #0d9488);
      box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
      background: #FFFFFF;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input:focus,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input:focus,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper input:focus {
      border-color: #2DD4BF;
      box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
      background: #222734;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .inline-input-wrapper .save-btn {
      flex: 0 0 auto !important;
      white-space: nowrap !important;
      padding: 11px 18px !important;
      border-radius: 12px !important;
      font-size: 13px !important;
      font-weight: 700 !important;
    }

    /* No text wrap inside accordion sub-rows and destructive button */
    #sheet-settings-menu #settings-modal .settings-list-container .sub-setting-header {
      margin-top: 10px !important;
      margin-bottom: 4px !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .sub-setting-row {
      white-space: nowrap !important;
      gap: 14px !important;
      padding: 14px 4px !important;
      font-size: 14px !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .sub-setting-row > span:first-child {
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      min-width: 0 !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .sub-setting-row .val {
      flex-shrink: 0 !important;
      white-space: nowrap !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .settings-destructive-btn {
      white-space: nowrap !important;
      border-radius: 20px !important;
      padding: 17px 18px !important;
      min-height: 58px !important;
      margin-top: 8px !important;
    }

    /* ==========================================================================
       GLASSMORPHIC ACCOUNT PROFILE CARD (TOP OF SETTINGS MENU)
       ========================================================================== */
    #sheet-settings-menu #settings-modal .settings-list-container .account-profile-card {
      position: relative !important;
      overflow: hidden !important;
      display: flex !important;
      align-items: center !important;
      gap: 12px !important;
      padding: 15px 16px !important;
      margin-bottom: 6px !important;
      border-radius: 22px !important;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.78)) !important;
      border: 1px solid rgba(15, 23, 42, 0.08) !important;
      box-shadow: 0 10px 26px -10px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
      transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .account-profile-card::before {
      content: "";
      position: absolute;
      top: -36px;
      right: -28px;
      width: 118px;
      height: 118px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 72%);
      pointer-events: none;
    }
    #sheet-settings-menu #settings-modal .settings-list-container .account-profile-card.is-connected::before {
      background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 72%);
    }
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container .account-profile-card,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container .account-profile-card,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container .account-profile-card {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
      border: 1px solid rgba(255, 255, 255, 0.11) !important;
      border-top-color: rgba(255, 255, 255, 0.19) !important;
      box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
    }

    #sheet-settings-menu #settings-modal .account-avatar-wrap {
      position: relative;
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      border-radius: 50%;
      padding: 2px;
      background: linear-gradient(135deg, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0.12));
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #sheet-settings-menu #settings-modal .account-profile-card.is-connected .account-avatar-wrap {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.72), rgba(56, 189, 248, 0.45));
      box-shadow: 0 0 16px rgba(16, 185, 129, 0.22);
    }
    #sheet-settings-menu #settings-modal .account-avatar-img,
    #sheet-settings-menu #settings-modal .account-avatar-initials {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(241, 245, 249, 0.96);
      color: #0f172a;
      font-size: 15px;
      font-weight: 700;
      letter-spacing: -0.02em;
      user-select: none;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-avatar-initials,
    html.dark #sheet-settings-menu #settings-modal .account-avatar-initials,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-avatar-initials {
      background: rgba(24, 24, 29, 0.96);
      color: #f4f4f5;
    }
    #sheet-settings-menu #settings-modal .account-avatar-dot {
      position: absolute;
      right: 1px;
      bottom: 1px;
      width: 11px;
      height: 11px;
      border-radius: 50%;
      background: #94a3b8;
      border: 2px solid #ffffff;
      box-sizing: border-box;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-avatar-dot,
    html.dark #sheet-settings-menu #settings-modal .account-avatar-dot,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-avatar-dot {
      border-color: #141418;
    }
    #sheet-settings-menu #settings-modal .account-profile-card.is-connected .account-avatar-dot {
      background: #10b981;
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
    }

    #sheet-settings-menu #settings-modal .account-profile-meta {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
      position: relative;
      z-index: 1;
    }
    #sheet-settings-menu #settings-modal .account-profile-name-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px 7px;
      min-width: 0;
    }
    #sheet-settings-menu #settings-modal .account-profile-name {
      font-size: 15.5px;
      font-weight: 700;
      line-height: 1.25;
      letter-spacing: -0.015em;
      color: #0f172a;
      flex: 0 1 auto;
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-profile-name,
    html.dark #sheet-settings-menu #settings-modal .account-profile-name,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-profile-name {
      color: #f4f4f5;
    }
    #sheet-settings-menu #settings-modal .account-profile-badge {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      height: 19px;
      padding: 0 7px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.02em;
      white-space: nowrap;
      background: rgba(148, 163, 184, 0.16);
      color: #64748b;
      border: 1px solid rgba(148, 163, 184, 0.22);
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-profile-badge,
    html.dark #sheet-settings-menu #settings-modal .account-profile-badge,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-profile-badge {
      background: rgba(255, 255, 255, 0.07);
      color: #a1a1aa;
      border-color: rgba(255, 255, 255, 0.1);
    }
    #sheet-settings-menu #settings-modal .account-profile-card.is-connected .account-profile-badge {
      background: rgba(16, 185, 129, 0.14);
      color: #059669;
      border-color: rgba(16, 185, 129, 0.28);
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-profile-card.is-connected .account-profile-badge,
    html.dark #sheet-settings-menu #settings-modal .account-profile-card.is-connected .account-profile-badge,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-profile-card.is-connected .account-profile-badge {
      color: #34d399;
    }

    #sheet-settings-menu #settings-modal .account-profile-email {
      font-size: 12px;
      font-weight: 500;
      color: #64748b;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-profile-email,
    html.dark #sheet-settings-menu #settings-modal .account-profile-email,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-profile-email {
      color: #a1a1aa;
    }

    #sheet-settings-menu #settings-modal .account-profile-btn {
      flex: 0 0 auto;
      position: relative;
      z-index: 1;
      height: 30px;
      padding: 0 11px;
      border-radius: 10px;
      font-family: inherit;
      font-size: 12px;
      font-weight: 650;
      white-space: nowrap;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(15, 23, 42, 0.05);
      color: #334155;
      border: 1px solid rgba(15, 23, 42, 0.1);
      transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease;
    }
    body.dark-mode #sheet-settings-menu #settings-modal .account-profile-btn,
    html.dark #sheet-settings-menu #settings-modal .account-profile-btn,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .account-profile-btn {
      background: rgba(255, 255, 255, 0.07);
      color: #e4e4e7;
      border-color: rgba(255, 255, 255, 0.12);
    }
    #sheet-settings-menu #settings-modal .account-profile-btn.is-primary {
      background: #10b981;
      color: #ffffff;
      border-color: transparent;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
    }
    #sheet-settings-menu #settings-modal .account-profile-btn:active {
      transform: scale(0.95);
    }

    /* ==========================================================================
       APP-WIDE GLASSMORPHIC CONFIRMATION POPUP (CLEAR DATA & DESTRUCTIVE ACTIONS)
       ========================================================================== */
    .app-confirm-overlay {
      position: fixed;
      inset: 0;
      z-index: 999999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(10, 10, 14, 0.56);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      opacity: 0;
      transition: opacity 0.22s ease;
    }
    .app-confirm-overlay.is-visible {
      opacity: 1;
    }
    .app-confirm-card {
      width: min(352px, 100%);
      border-radius: var(--squircle-lg, 26px);
      padding: 22px 20px 18px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.82);
      box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.92);
      color: var(--text-primary, #18181b);
      font-family: var(--font-body, inherit);
      display: flex;
      flex-direction: column;
      gap: 14px;
      transform: scale(0.92) translateY(12px);
      opacity: 0;
      transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
    }
    .app-confirm-overlay.is-visible .app-confirm-card {
      transform: scale(1) translateY(0);
      opacity: 1;
    }
    body.dark-mode .app-confirm-card,
    html.dark .app-confirm-card,
    [data-theme="dark"] .app-confirm-card {
      background: rgba(18, 18, 22, 0.94);
      border: 1px solid rgba(255, 255, 255, 0.13);
      border-top-color: rgba(255, 255, 255, 0.2);
      box-shadow: 0 28px 64px -10px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.09);
      color: #f4f4f5;
    }
    .app-confirm-head {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .app-confirm-badge {
      width: 40px;
      height: 40px;
      border-radius: 13px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      background: rgba(13, 148, 136, 0.14);
      color: var(--accent-primary, #0d9488);
      border: 1px solid rgba(13, 148, 136, 0.22);
    }
    .app-confirm-badge.is-danger {
      background: rgba(239, 68, 68, 0.13);
      color: #ef4444;
      border-color: rgba(239, 68, 68, 0.24);
    }
    .app-confirm-title {
      margin: 0;
      font-family: var(--font-display, inherit);
      font-size: 16.5px;
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.25;
      color: inherit;
    }
    .app-confirm-sub {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-muted, #71717a);
      margin-top: 2px;
    }
    .app-confirm-msg {
      font-size: 13.5px;
      line-height: 1.5;
      color: var(--text-secondary, #52525b);
      margin: 0;
    }
    body.dark-mode .app-confirm-msg,
    html.dark .app-confirm-msg,
    [data-theme="dark"] .app-confirm-msg {
      color: #a1a1aa;
    }
    .app-confirm-scope-box {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      padding: 10px 11px;
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.035);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    body.dark-mode .app-confirm-scope-box,
    html.dark .app-confirm-scope-box,
    [data-theme="dark"] .app-confirm-scope-box {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.07);
    }
    .app-confirm-scope-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary, #52525b);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    body.dark-mode .app-confirm-scope-item,
    html.dark .app-confirm-scope-item,
    [data-theme="dark"] .app-confirm-scope-item {
      color: #d4d4d8;
    }
    .app-confirm-scope-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #ef4444;
      opacity: 0.8;
      flex-shrink: 0;
    }
    .app-confirm-actions {
      display: flex;
      gap: 8px;
      margin-top: 2px;
    }
    .app-confirm-btn {
      flex: 1 1 0;
      height: 42px;
      border-radius: 14px;
      font-family: var(--font-display, inherit);
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      transition: transform 0.14s ease, filter 0.16s ease, background 0.18s ease;
    }
    .app-confirm-btn:active {
      transform: scale(0.97);
    }
    .app-confirm-btn.cancel {
      background: rgba(15, 23, 42, 0.06);
      color: var(--text-primary, #18181b);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    body.dark-mode .app-confirm-btn.cancel,
    html.dark .app-confirm-btn.cancel,
    [data-theme="dark"] .app-confirm-btn.cancel {
      background: rgba(255, 255, 255, 0.07);
      color: #e4e4e7;
      border: 1px solid rgba(255, 255, 255, 0.09);
    }
    .app-confirm-btn.confirm {
      background: var(--accent-primary, #0d9488);
      color: var(--accent-contrast, #ffffff);
      box-shadow: 0 8px 20px -6px var(--accent-glow, rgba(13, 148, 136, 0.45));
    }
    .app-confirm-btn.confirm.is-danger {
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
      color: #ffffff;
      box-shadow: 0 8px 20px -6px rgba(239, 68, 68, 0.48);
    }

    /* ======================================================================
       THE CULTIVATOR SEQUENCE — Slow, Relaxed, Interactive Day-End Easter Egg
       Blended Seamlessly into the App Interface Workspace Area
       ====================================================================== */
    #cultivator-stage {
      position: fixed;
      left: var(--cult-left, 0px);
      top: var(--cult-top, 64px);
      width: var(--cult-width, 100vw);
      height: var(--cult-height, calc(100vh - 136px));
      z-index: 940;
      pointer-events: none;
      overflow: hidden;
      border-radius: 24px;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s ease;
      -webkit-mask-image: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.65) 5%,
        #000000 13%,
        #000000 87%,
        rgba(0, 0, 0, 0.65) 95%,
        transparent 100%
      );
      mask-image: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.65) 5%,
        #000000 13%,
        #000000 87%,
        rgba(0, 0, 0, 0.65) 95%,
        transparent 100%
      );
    }
    #cultivator-stage.active {
      opacity: 1;
      visibility: visible;
    }

    /* Golden Hour Haze Backdrop Veil — Softly Blended with App Workspace */
    #cultivator-golden-veil {
      position: absolute;
      inset: 0;
      opacity: 0;
      border-radius: inherit;
      background:
        radial-gradient(ellipse 82% 68% at 50% 50%, rgba(251, 191, 36, 0.32) 0%, rgba(245, 158, 11, 0.20) 46%, rgba(217, 119, 6, 0.08) 76%, transparent 100%),
        linear-gradient(180deg, rgba(254, 243, 199, 0.08) 0%, rgba(251, 146, 60, 0.22) 52%, rgba(245, 158, 11, 0.12) 100%);
      will-change: opacity, transform;
    }
    body.dark-mode #cultivator-golden-veil,
    html.dark #cultivator-golden-veil,
    [data-theme="dark"] #cultivator-golden-veil {
      background:
        radial-gradient(ellipse 82% 68% at 50% 50%, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.18) 48%, rgba(146, 64, 14, 0.09) 78%, transparent 100%),
        linear-gradient(180deg, rgba(251, 191, 36, 0.06) 0%, rgba(234, 88, 12, 0.18) 52%, rgba(180, 83, 9, 0.12) 100%);
    }

    /* Plowed Digital Furrow Lines Layer aligned vertically behind the 9 tines (Smaller Refined Width) */
    #cultivator-furrows-wrap {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      width: min(184px, 46vw);
      transform: translateX(-50%);
      opacity: 1;
      transition: opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: clip-path, opacity;
      -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
      mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    }
    #cultivator-furrows-svg {
      width: 100%;
      height: 100%;
      display: block;
    }
    .cultivator-furrow-bed {
      fill: rgba(180, 83, 9, 0.07);
    }
    body.dark-mode .cultivator-furrow-bed,
    html.dark .cultivator-furrow-bed,
    [data-theme="dark"] .cultivator-furrow-bed {
      fill: rgba(245, 158, 11, 0.06);
    }
    .cultivator-furrow-groove {
      stroke: rgba(146, 64, 14, 0.32);
      stroke-width: 5.5;
      stroke-linecap: round;
    }
    .cultivator-furrow-ridge {
      stroke: rgba(245, 158, 11, 0.48);
      stroke-width: 1.75;
      stroke-dasharray: 8 5 3 5;
      stroke-linecap: round;
    }
    .cultivator-furrow-tire {
      stroke: rgba(120, 53, 15, 0.18);
      stroke-width: 12;
      stroke-dasharray: 4 6;
    }
    body.dark-mode .cultivator-furrow-groove,
    html.dark .cultivator-furrow-groove,
    [data-theme="dark"] .cultivator-furrow-groove {
      stroke: rgba(146, 64, 14, 0.52);
    }
    body.dark-mode .cultivator-furrow-ridge,
    html.dark .cultivator-furrow-ridge,
    [data-theme="dark"] .cultivator-furrow-ridge {
      stroke: rgba(251, 191, 36, 0.42);
    }
    body.dark-mode .cultivator-furrow-tire,
    html.dark .cultivator-furrow-tire,
    [data-theme="dark"] .cultivator-furrow-tire {
      stroke: rgba(245, 158, 11, 0.15);
    }

    /* Smaller, Refined Interactive Tractor + 9-Tine Cultivator Carrier */
    #cultivator-rig {
      position: absolute;
      top: 0;
      left: 50%;
      width: min(184px, 46vw);
      transform: translate3d(-50%, -340px, 0);
      will-change: transform;
      pointer-events: auto;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      -webkit-tap-highlight-color: transparent;
      filter: drop-shadow(0 14px 22px rgba(124, 45, 18, 0.26));
      transition: filter 0.28s ease;
    }
    #cultivator-rig:hover {
      filter: drop-shadow(0 16px 26px rgba(245, 158, 11, 0.38));
    }
    #cultivator-rig-vibrator {
      width: 100%;
      will-change: transform;
      transform-origin: 50% 62%;
    }
    /* Smooth, realistic low-RPM diesel suspension sway (no harsh steps) */
    #cultivator-rig.is-rumbling #cultivator-rig-vibrator {
      animation: cultivatorEngineRumble 0.34s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    }
    /* High-torque engine rev state when user clicks/taps the tractor */
    #cultivator-rig.is-revving #cultivator-rig-vibrator {
      animation: cultivatorEngineRevTorque 0.14s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite !important;
    }
    @keyframes cultivatorEngineRumble {
      0%, 100% { transform: translate3d(0px, 0px, 0) rotate(0deg) scale(1); }
      25% { transform: translate3d(-0.45px, 0.4px, 0) rotate(-0.14deg) scale(1.002); }
      50% { transform: translate3d(0px, -0.35px, 0) rotate(0deg) scale(0.999); }
      75% { transform: translate3d(0.45px, 0.4px, 0) rotate(0.14deg) scale(1.002); }
    }
    @keyframes cultivatorEngineRevTorque {
      0%, 100% { transform: translate3d(0px, 0px, 0) rotate(0deg) scale(1.035); }
      25% { transform: translate3d(-1.1px, 0.9px, 0) rotate(-0.45deg) scale(1.045); }
      50% { transform: translate3d(0.9px, -0.8px, 0) rotate(0.38deg) scale(1.03); }
      75% { transform: translate3d(1.1px, 0.7px, 0) rotate(0.45deg) scale(1.048); }
    }

    /* Rolling agricultural tire lugs animation */
    @keyframes tractorTreadRoll {
      0% { stroke-dashoffset: 0; }
      100% { stroke-dashoffset: -24; }
    }
    #cultivator-rig.is-rumbling .tractor-rolling-lugs {
      animation: tractorTreadRoll 0.52s linear infinite;
    }
    #cultivator-rig.is-revving .tractor-rolling-lugs {
      animation: tractorTreadRoll 0.22s linear infinite !important;
    }

    /* Rotating Amber Cab Beacon Glow */
    @keyframes tractorBeaconPulse {
      0%, 100% { opacity: 0.45; transform: scale(0.88); }
      50% { opacity: 0.98; transform: scale(1.22); }
    }
    .tractor-beacon-halo {
      transform-box: fill-box;
      transform-origin: center;
      animation: tractorBeaconPulse 1.1s ease-in-out infinite;
    }
    #cultivator-rig.is-revving .tractor-beacon-halo {
      animation-duration: 0.28s !important;
    }
    #cultivator-rig.is-revving .tractor-headlight-cone {
      opacity: 1 !important;
      filter: brightness(1.35);
    }

    /* Continuous Ambient Exhaust Puffs inside SVG */
    @keyframes cultivatorExhaustPuff {
      0% { transform: translate(0px, 0px) scale(0.45); opacity: 0.68; }
      55% { transform: translate(-7px, -15px) scale(1.18); opacity: 0.38; }
      100% { transform: translate(-15px, -32px) scale(1.85); opacity: 0; }
    }
    .cultivator-smoke-puff {
      transform-box: fill-box;
      transform-origin: center;
      animation: cultivatorExhaustPuff 1.05s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    }
    .cultivator-smoke-puff.puff-2 {
      animation-delay: 0.35s;
    }
    .cultivator-smoke-puff.puff-3 {
      animation-delay: 0.70s;
    }
    #cultivator-rig.is-revving .cultivator-smoke-puff {
      animation-duration: 0.42s !important;
    }

    /* Dynamic Interactive Exhaust Smoke Plume & Horn Soundwave Rings */
    .cultivator-exhaust-plume-puff {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      will-change: transform, opacity;
      background: radial-gradient(circle at 35% 35%,
        rgba(248, 250, 252, 0.88) 0%,
        rgba(203, 213, 225, 0.72) 42%,
        rgba(100, 116, 139, 0.45) 74%,
        rgba(51, 65, 85, 0) 100%);
      filter: blur(2.5px);
      z-index: 6;
    }
    .cultivator-horn-wave {
      position: absolute;
      border-radius: 50%;
      border: 2px solid rgba(251, 191, 36, 0.82);
      box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
      pointer-events: none;
      z-index: 5;
      will-change: transform, opacity;
    }

    /* Golden-Hour Dust Clouds Layer */
    #cultivator-dust-layer {
      position: absolute;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
    }
    .cultivator-dust-puff {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      will-change: transform, opacity;
      background: radial-gradient(circle at 38% 38%,
        rgba(254, 240, 138, 0.72) 0%,
        rgba(251, 191, 36, 0.54) 38%,
        rgba(249, 115, 22, 0.28) 72%,
        rgba(234, 88, 12, 0) 100%);
      filter: blur(11px);
    }
    body.dark-mode .cultivator-dust-puff,
    html.dark .cultivator-dust-puff,
    [data-theme="dark"] .cultivator-dust-puff {
      background: radial-gradient(circle at 38% 38%,
        rgba(253, 224, 71, 0.58) 0%,
        rgba(245, 158, 11, 0.44) 40%,
        rgba(234, 88, 12, 0.24) 74%,
        rgba(154, 52, 18, 0) 100%);
    }

    /* Task List Churning Mask while Dust Swallows DOM Smoothly */
    #todo-list-container.cultivator-churning > *:not(.cultivator-empty-reveal) {
      transition: opacity 1.65s cubic-bezier(0.22, 1, 0.36, 1), filter 1.65s ease, transform 1.65s cubic-bezier(0.22, 1, 0.36, 1);
      opacity: 0.06 !important;
      filter: blur(6px) sepia(0.38);
      transform: scale(0.985);
    }

    /* Phase 3: Organic Reveal & Glassmorphic Quote Takeaway Badge */
    .cultivator-empty-reveal {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      min-height: clamp(260px, 44vh, 390px);
      width: 100%;
      padding: 24px 18px 56px;
      box-sizing: border-box;
      user-select: none;
      -webkit-user-select: none;
    }
    .cultivator-sprout-wrap {
      position: relative;
      width: 84px;
      height: 84px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 14px;
    }
    .cultivator-sprout-halo {
      position: absolute;
      inset: 8px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(251, 191, 36, 0.12) 55%, transparent 75%);
      filter: blur(8px);
      animation: cultivatorHaloBreath 4.2s ease-in-out infinite;
    }
    @keyframes cultivatorHaloBreath {
      0%, 100% { transform: scale(0.95); opacity: 0.72; }
      50% { transform: scale(1.1); opacity: 1; }
    }
    .cultivator-sprout-svg {
      position: relative;
      width: 68px;
      height: 68px;
      overflow: visible;
    }
    .cultivator-empty-reveal.animate-in .cultivator-soil-line {
      stroke-dasharray: 64;
      stroke-dashoffset: 64;
      animation: cultivatorDrawLine 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    .cultivator-empty-reveal.animate-in .cultivator-stem {
      stroke-dasharray: 48;
      stroke-dashoffset: 48;
      animation: cultivatorDrawLine 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.32s forwards;
    }
    .cultivator-empty-reveal.animate-in .cultivator-leaf-left {
      transform-origin: 34px 41px;
      opacity: 0;
      transform: scale(0.2) rotate(18deg);
      animation: cultivatorLeafUnfurl 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.78s forwards;
    }
    .cultivator-empty-reveal.animate-in .cultivator-leaf-right {
      transform-origin: 34px 36px;
      opacity: 0;
      transform: scale(0.2) rotate(-18deg);
      animation: cultivatorLeafUnfurl 0.95s cubic-bezier(0.22, 1, 0.36, 1) 1.02s forwards;
    }
    @keyframes cultivatorDrawLine {
      to { stroke-dashoffset: 0; }
    }
    @keyframes cultivatorLeafUnfurl {
      0% { opacity: 0; transform: scale(0.2); }
      70% { opacity: 1; transform: scale(1.06); }
      100% { opacity: 1; transform: scale(1); }
    }

    .cultivator-reveal-text {
      margin: 0 0 14px;
      font-family: var(--font-display, inherit);
      font-size: 16.5px;
      font-weight: 650;
      letter-spacing: -0.015em;
      line-height: 1.4;
      color: var(--text-primary, #18181b);
      opacity: 0.92;
    }
    .cultivator-empty-reveal.animate-in .cultivator-reveal-text {
      opacity: 0;
      transform: translateY(8px);
      animation: cultivatorTextFade 0.88s cubic-bezier(0.22, 1, 0.36, 1) 1.05s forwards;
    }
    @keyframes cultivatorTextFade {
      to { opacity: 0.92; transform: translateY(0); }
    }

    /* Compact Glassmorphism Quote / Tip Badge */
    .cultivator-quote-badge {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      max-width: min(340px, 86vw);
      padding: 10px 16px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.56);
      border: 1px solid rgba(255, 255, 255, 0.72);
      box-shadow:
        0 10px 28px -12px rgba(15, 23, 42, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
      color: var(--text-secondary, #52525b);
      font-size: 12.5px;
      font-weight: 500;
      line-height: 1.42;
      text-align: left;
    }
    body.dark-mode .cultivator-quote-badge,
    html.dark .cultivator-quote-badge,
    [data-theme="dark"] .cultivator-quote-badge {
      background: rgba(24, 24, 30, 0.58);
      border: 1px solid rgba(255, 255, 255, 0.11);
      box-shadow:
        0 12px 30px -12px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
      color: rgba(228, 228, 231, 0.86);
    }
    .cultivator-empty-reveal.animate-in .cultivator-quote-badge {
      opacity: 0;
      transform: translateY(10px) scale(0.97);
      animation: cultivatorBadgeFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.32s forwards;
    }
    @keyframes cultivatorBadgeFade {
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .cultivator-quote-dot {
      flex-shrink: 0;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: linear-gradient(135deg, #34d399 0%, #f59e0b 100%);
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
    }
    .cultivator-quote-copy {
      flex: 1;
      min-width: 0;
    }

    /* Interactive Mini-Tractor Easter Egg Icon inside the Revealed State */
    .cultivator-interactive-dock {
      margin-top: 14px;
      width: 38px;
      height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      border-radius: 999px;
      background: rgba(251, 191, 36, 0.10);
      border: 1px solid rgba(245, 158, 11, 0.24);
      color: var(--text-secondary, #52525b);
      cursor: pointer;
      position: relative;
      overflow: visible;
      transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, border-color 0.2s ease;
    }
    body.dark-mode .cultivator-interactive-dock,
    html.dark .cultivator-interactive-dock,
    [data-theme="dark"] .cultivator-interactive-dock {
      background: rgba(245, 158, 11, 0.12);
      border-color: rgba(251, 191, 36, 0.22);
      color: rgba(254, 243, 199, 0.86);
    }
    .cultivator-interactive-dock:hover {
      background: rgba(245, 158, 11, 0.18);
      border-color: rgba(245, 158, 11, 0.42);
    }
    .cultivator-interactive-dock:active,
    .cultivator-interactive-dock.is-revving {
      transform: scale(0.95);
    }
    .cultivator-empty-reveal.animate-in .cultivator-interactive-dock {
      opacity: 0;
      transform: translateY(8px);
      animation: cultivatorBadgeFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.58s forwards;
    }

    /* Morning / Empty Day Minimalistic Quote State */
    .morning-quote-empty {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      min-height: clamp(220px, 38vh, 320px);
      width: 100%;
      padding: 28px 20px 44px;
      box-sizing: border-box;
      gap: 10px;
      user-select: none;
      -webkit-user-select: none;
    }
    .morning-quote-icon {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent-primary, #0D9488);
      background: rgba(13, 148, 136, 0.08);
      border: 1px solid rgba(13, 148, 136, 0.16);
      margin-bottom: 2px;
    }
    .morning-quote-text {
      margin: 0;
      max-width: 300px;
      font-family: var(--font-display, inherit);
      font-size: 15px;
      font-weight: 600;
      line-height: 1.5;
      letter-spacing: -0.01em;
      color: var(--text-primary);
      opacity: 0.88;
    }
    .morning-quote-sub {
      margin: 0;
      font-size: 11.5px;
      font-weight: 500;
      color: var(--text-muted);
      letter-spacing: 0.01em;
    }

    @media (prefers-reduced-motion: reduce) {
      #cultivator-rig.is-rumbling #cultivator-rig-vibrator,
      .cultivator-smoke-puff,
      .cultivator-sprout-halo {
        animation: none !important;
      }
      .cultivator-empty-reveal.animate-in .cultivator-soil-line,
      .cultivator-empty-reveal.animate-in .cultivator-stem,
      .cultivator-empty-reveal.animate-in .cultivator-leaf-left,
      .cultivator-empty-reveal.animate-in .cultivator-leaf-right,
      .cultivator-empty-reveal.animate-in .cultivator-reveal-text,
      .cultivator-empty-reveal.animate-in .cultivator-quote-badge,
      .cultivator-empty-reveal.animate-in .cultivator-interactive-dock {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
      }
    }

    /* Translucent Today sticky header with subtle frosted blur */
    main#tab-todo > #action-subview-todo > .todo-header,
    body.light-mode main#tab-todo > #action-subview-todo > .todo-header,
    [data-theme="light"] main#tab-todo > #action-subview-todo > .todo-header {
      background: rgba(248, 250, 252, 0.86) !important;
      background-color: rgba(248, 250, 252, 0.86) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      border: none !important;
      box-shadow: none !important;
      position: sticky !important;
      top: 0 !important;
      z-index: 999 !important;
      pointer-events: auto !important;
    }
    body.dark-mode main#tab-todo > #action-subview-todo > .todo-header,
    html.dark main#tab-todo > #action-subview-todo > .todo-header,
    [data-theme="dark"] main#tab-todo > #action-subview-todo > .todo-header {
      background: rgba(9, 9, 11, 0.86) !important;
      background-color: rgba(9, 9, 11, 0.86) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      border: none !important;
      box-shadow: none !important;
      position: sticky !important;
      top: 0 !important;
      z-index: 999 !important;
      pointer-events: auto !important;
    }

    /* Dynamic Daily Task Completion Progress Bar beneath Today title */
    main#tab-todo > #action-subview-todo > .todo-header {
      flex-wrap: wrap;
    }
    .today-progress-wrap {
      flex: 1 0 100%;
      width: 100%;
      max-width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 8px;
      padding-bottom: 2px;
      box-sizing: border-box;
    }
    .today-progress-track {
      flex: 1;
      min-width: 0;
      height: 5px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.09);
      overflow: hidden;
      position: relative;
    }
    body.dark-mode .today-progress-track,
    html.dark .today-progress-track,
    [data-theme="dark"] .today-progress-track {
      background: rgba(255, 255, 255, 0.11);
    }
    .today-progress-fill,
    #today-progress-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--accent-primary, #0D9488), #38BDF8);
      will-change: width;
      transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, box-shadow 0.35s ease;
    }
    .today-progress-wrap.is-complete .today-progress-fill {
      background: linear-gradient(90deg, #10B981, #34D399);
      box-shadow: 0 0 10px rgba(16, 185, 129, 0.42);
    }
    .today-progress-meta {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.01em;
      line-height: 1;
      color: var(--text-muted, #71717A);
      white-space: nowrap;
      flex-shrink: 0;
      transition: color 0.25s ease;
    }
    .today-progress-wrap.has-progress .today-progress-meta {
      color: var(--accent-primary, #0D9488);
    }
    .today-progress-wrap.is-complete .today-progress-meta {
      color: #10B981;
    }

    /* Task Completion Spark & Micro-Confetti Burst Effect */
    .task-spark-burst-root {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 100500;
      overflow: hidden;
    }
    .task-spark-ring {
      position: fixed;
      width: 22px;
      height: 22px;
      margin-left: -11px;
      margin-top: -11px;
      border-radius: 50%;
      border: 2px solid rgba(16, 185, 129, 0.82);
      box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
      pointer-events: none;
      will-change: transform, opacity;
      animation: taskSparkRingExpand 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .task-spark-particle {
      position: fixed;
      pointer-events: none;
      will-change: transform, opacity;
      opacity: 0;
      animation: taskSparkFly var(--spark-dur, 580ms) cubic-bezier(0.16, 1, 0.3, 1) var(--spark-delay, 0ms) forwards;
    }
    .task-spark-particle.is-spark {
      width: 2.5px;
      height: 8.5px;
      margin-left: -1.25px;
      margin-top: -4.25px;
      border-radius: 999px;
      box-shadow: 0 0 6px currentColor;
    }
    .task-spark-particle.is-confetti {
      width: 5.5px;
      height: 3.2px;
      margin-left: -2.75px;
      margin-top: -1.6px;
      border-radius: 1.5px;
    }
    .task-spark-particle.is-dot {
      width: 4px;
      height: 4px;
      margin-left: -2px;
      margin-top: -2px;
      border-radius: 50%;
      box-shadow: 0 0 6px currentColor;
    }
    @keyframes taskSparkRingExpand {
      0% {
        transform: translate3d(0, 0, 0) scale(0.55);
        opacity: 0.92;
      }
      100% {
        transform: translate3d(0, 0, 0) scale(2.35);
        opacity: 0;
      }
    }
    @keyframes taskSparkFly {
      0% {
        transform: translate3d(0, 0, 0) rotate(var(--spark-rot-start, 0deg)) scale(0.55);
        opacity: 1;
      }
      22% {
        opacity: 1;
      }
      72% {
        opacity: 0.88;
      }
      100% {
        transform: translate3d(var(--spark-tx, 0px), var(--spark-ty, -24px), 0) rotate(var(--spark-rot-end, 140deg)) scale(0.25);
        opacity: 0;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .task-spark-ring,
      .task-spark-particle {
        animation-duration: 1ms !important;
      }
    }

    /* Translucent bottom section navigation bar with subtle frosted blur */
    nav.bottom-nav:nth-of-type(1),
    body.light-mode nav.bottom-nav:nth-of-type(1),
    [data-theme="light"] nav.bottom-nav:nth-of-type(1) {
      background: rgba(255, 255, 255, 0.86) !important;
      background-color: rgba(255, 255, 255, 0.86) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
    }
    body.dark-mode nav.bottom-nav:nth-of-type(1),
    html.dark nav.bottom-nav:nth-of-type(1),
    [data-theme="dark"] nav.bottom-nav:nth-of-type(1) {
      background: rgba(9, 9, 11, 0.86) !important;
      background-color: rgba(9, 9, 11, 0.86) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
    }
    nav.bottom-nav:nth-of-type(1) > div:nth-of-type(1) {
      background: transparent !important;
    }

    /* ==========================================================================
       HEADER CIRCULAR AVATAR BUTTON & ANIMATED RIGHT-SIDE PROFILE SLIDE DRAWER
       ========================================================================== */
    .header-profile-avatar-btn {
      position: relative;
      width: 38px;
      height: 38px;
      flex-shrink: 0;
      border-radius: 9999px;
      padding: 2px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      background: rgba(15, 23, 42, 0.06);
      border: 1px solid rgba(15, 23, 42, 0.1);
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
      transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
      will-change: transform, opacity;
    }
    .header-profile-avatar-btn::after {
      content: '';
      position: absolute;
      inset: -4px;
      border-radius: 9999px;
    }
    body.dark-mode .header-profile-avatar-btn,
    html.dark .header-profile-avatar-btn,
    [data-theme="dark"] .header-profile-avatar-btn {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.14);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    }
    .header-profile-avatar-btn.is-connected {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(56, 189, 248, 0.65));
      border-color: transparent;
      box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    }
    .header-profile-avatar-btn:hover {
      transform: translateY(-1px) scale(1.04);
    }
    .header-profile-avatar-btn:active,
    .header-profile-avatar-btn.is-open {
      transform: scale(0.93);
    }
    .header-profile-avatar-btn:focus-visible {
      outline: 2px solid var(--accent-primary, #0D9488);
      outline-offset: 2px;
    }
    .header-profile-avatar-btn .header-avatar-img,
    .header-profile-avatar-btn .header-avatar-initials {
      width: 100%;
      height: 100%;
      border-radius: 9999px;
      object-fit: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(248, 250, 252, 0.96);
      color: #0f172a;
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 800;
      letter-spacing: -0.02em;
      user-select: none;
      overflow: hidden;
    }
    body.dark-mode .header-profile-avatar-btn .header-avatar-initials,
    html.dark .header-profile-avatar-btn .header-avatar-initials,
    [data-theme="dark"] .header-profile-avatar-btn .header-avatar-initials {
      background: rgba(24, 24, 29, 0.96);
      color: #f4f4f5;
    }
    @keyframes avatarBounceSettle {
      0% { transform: scale(0.86); opacity: 0.7; }
      60% { transform: scale(1.06); opacity: 1; }
      100% { transform: scale(1); opacity: 1; }
    }
    .header-profile-avatar-btn.avatar-pulse {
      animation: avatarBounceSettle 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    }
    /* Account Avatar scroll fade is grouped in lockstep with To-Do 🔍 search pill via .hidden on actual task scroll */

    /* Right-Side Slide Drawer & Backdrop */
    .profile-side-backdrop {
      position: fixed;
      inset: 0;
      z-index: 4200;
      background: rgba(10, 12, 16, 0.38);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s ease;
    }
    .profile-side-backdrop.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .profile-side-drawer {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      z-index: 4201;
      width: min(88vw, 356px);
      max-width: 100vw;
      display: flex;
      flex-direction: column;
      padding: max(20px, env(safe-area-inset-top, 20px)) 20px max(22px, env(safe-area-inset-bottom, 22px));
      background: rgba(252, 251, 249, 0.985);
      backdrop-filter: blur(22px);
      -webkit-backdrop-filter: blur(22px);
      border-left: 1px solid rgba(15, 23, 42, 0.08);
      box-shadow: -20px 0 60px -12px rgba(15, 23, 42, 0.18);
      color: #0f172a;
      transform: translate3d(105%, 0, 0);
      visibility: hidden;
      transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s ease;
      will-change: transform;
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    body.dark-mode .profile-side-drawer,
    html.dark .profile-side-drawer,
    [data-theme="dark"] .profile-side-drawer {
      background: rgba(12, 13, 16, 0.985);
      border-left-color: rgba(255, 255, 255, 0.1);
      box-shadow: -24px 0 64px -8px rgba(0, 0, 0, 0.72);
      color: #f4f4f5;
    }
    .profile-side-drawer.open {
      transform: translate3d(0, 0, 0);
      visibility: visible;
    }
    .profile-side-drawer.is-dragging {
      transition: none !important;
    }

    /* Staggered Inner Entrance Animation */
    .profile-side-stagger {
      opacity: 0;
      transform: translate3d(18px, 0, 0);
      transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
      transition-delay: calc(var(--stagger, 0) * 45ms + 70ms);
    }
    .profile-side-drawer.open .profile-side-stagger {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }

    .profile-side-close {
      width: 40px;
      height: 40px;
      flex-shrink: 0;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(15, 23, 42, 0.05);
      border: 1px solid rgba(15, 23, 42, 0.08);
      color: inherit;
      cursor: pointer;
      transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s ease;
    }
    body.dark-mode .profile-side-close,
    html.dark .profile-side-close,
    [data-theme="dark"] .profile-side-close {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.11);
    }
    .profile-side-close:active {
      transform: scale(0.92);
    }
    .profile-side-close:focus-visible {
      outline: 2px solid var(--accent-primary, #0D9488);
      outline-offset: 2px;
    }

    .profile-side-hero {
      display: flex;
      align-items: center;
      gap: 13px;
      padding: 2px 0 20px;
      border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .profile-side-avatar-ring {
      position: relative;
      width: 64px;
      height: 64px;
      flex-shrink: 0;
      border-radius: 9999px;
      padding: 2.5px;
      border: none;
      appearance: none;
      -webkit-appearance: none;
      cursor: pointer;
      background: rgba(148, 163, 184, 0.28);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease;
    }
    .profile-side-avatar-ring:hover {
      transform: scale(1.045);
      box-shadow: 0 8px 20px rgba(13, 148, 136, 0.2);
    }
    .profile-side-avatar-ring:active {
      transform: scale(0.93);
    }
    .profile-side-avatar-ring:focus-visible {
      outline: 2px solid var(--accent-primary, #0D9488);
      outline-offset: 3px;
    }
    .profile-side-avatar-ring.is-connected {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(56, 189, 248, 0.65));
      box-shadow: 0 6px 20px rgba(16, 185, 129, 0.24);
    }
    .profile-side-avatar-img,
    .profile-side-avatar-initials {
      width: 100%;
      height: 100%;
      border-radius: 9999px;
      object-fit: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(241, 245, 249, 0.96);
      color: #0f172a;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.02em;
      user-select: none;
      overflow: hidden;
    }
    .profile-side-avatar-img {
      display: block;
    }
    .profile-side-avatar-cue {
      position: absolute;
      right: -1.5px;
      bottom: -1.5px;
      width: 22px;
      height: 22px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--accent-primary, #0D9488);
      color: #ffffff;
      border: 2px solid rgba(252, 251, 249, 0.96);
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.24);
      pointer-events: none;
      z-index: 5;
    }
    .profile-side-avatar-cue svg {
      width: 12px;
      height: 12px;
      stroke-width: 3;
      transform: translateX(0.5px);
    }
    body.dark-mode .profile-side-avatar-cue,
    html.dark .profile-side-avatar-cue,
    [data-theme="dark"] .profile-side-avatar-cue {
      border-color: rgba(12, 13, 16, 0.96);
    }
    body.dark-mode .profile-side-avatar-initials,
    html.dark .profile-side-avatar-initials,
    [data-theme="dark"] .profile-side-avatar-initials {
      background: rgba(24, 24, 29, 0.96);
      color: #f4f4f5;
    }
    .profile-side-rank-btn {
      margin-top: 5px;
      padding: 0;
      border: none;
      background: transparent;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11.5px;
      font-weight: 700;
      color: var(--accent-primary, #0D9488);
      cursor: pointer;
      text-align: left;
      white-space: nowrap;
      transition: opacity 0.16s ease, transform 0.16s ease;
    }
    .profile-side-rank-btn:active {
      transform: scale(0.97);
      opacity: 0.78;
    }
    .profile-side-identity {
      min-width: 0;
      flex: 1;
    }
    .profile-side-name {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.025em;
      line-height: 1.2;
      color: inherit;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .profile-side-sub {
      margin-top: 4px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-secondary, #4A4843);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    body.dark-mode .profile-side-sub,
    html.dark .profile-side-sub,
    [data-theme="dark"] .profile-side-sub {
      color: #a1a1aa;
    }

    .profile-side-goal-block {
      padding: 18px 0;
      border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .profile-side-section-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted, #78756E);
      margin-bottom: 6px;
    }
    .profile-side-goal-text {
      font-size: 14.5px;
      font-weight: 600;
      line-height: 1.45;
      color: inherit;
    }

    .profile-side-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      padding: 18px 0;
      border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .profile-side-metric {
      display: flex;
      flex-direction: column;
      gap: 3px;
      padding: 0 10px;
      border-right: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .profile-side-metric:first-child {
      padding-left: 0;
    }
    .profile-side-metric:last-child {
      padding-right: 0;
      border-right: none;
    }
    .profile-side-metric-val {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 18px;
      font-weight: 700;
      line-height: 1.15;
      color: inherit;
    }
    .profile-side-metric-lbl {
      font-size: 11.5px;
      font-weight: 500;
      color: var(--text-muted, #78756E);
      white-space: nowrap;
    }
    .profile-side-progress-wrap {
      grid-column: 1 / -1;
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      flex-direction: column;
      gap: 7px;
    }
    .profile-side-progress-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 12px;
      line-height: 1.25;
    }
    .profile-side-progress-lbl {
      font-weight: 600;
      color: var(--text-secondary, #4A4843);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    body.dark-mode .profile-side-progress-lbl,
    html.dark .profile-side-progress-lbl,
    [data-theme="dark"] .profile-side-progress-lbl {
      color: #a1a1aa;
    }
    .profile-side-progress-pct {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--accent-primary, #0D9488);
      flex-shrink: 0;
    }
    .profile-side-progress-wrap.is-complete .profile-side-progress-pct {
      color: #10B981;
    }
    .profile-side-progress-track {
      width: 100%;
      height: 7px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.09);
      overflow: hidden;
    }
    body.dark-mode .profile-side-progress-track,
    html.dark .profile-side-progress-track,
    [data-theme="dark"] .profile-side-progress-track {
      background: rgba(255, 255, 255, 0.11);
    }
    .profile-side-progress-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--accent-primary, #0D9488), #38BDF8);
      transition: width 0.36s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
    }
    .profile-side-progress-wrap.is-complete .profile-side-progress-fill {
      background: linear-gradient(90deg, #10B981, #34D399);
    }

    /* Sharpener Points, Levels & Simplified Badges */
    .sharpener-level-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .sharpener-rank-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 3px;
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 800;
      color: var(--level-accent, var(--accent-primary));
    }
    .sharpener-points-pill {
      display: inline-flex;
      align-items: baseline;
      gap: 4px;
      padding: 7px 12px;
      border-radius: 16px;
      background: color-mix(in srgb, var(--level-accent, var(--accent-primary)) 12%, var(--bg-elevated));
      border: 1px solid color-mix(in srgb, var(--level-accent, var(--accent-primary)) 32%, var(--border-subtle));
      color: var(--text-primary);
      cursor: pointer;
      flex-shrink: 0;
      transition: transform 0.16s ease, border-color 0.16s ease;
    }
    .sharpener-points-pill:active {
      transform: scale(0.96);
    }
    .sharpener-points-num {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 16px;
      font-weight: 800;
      line-height: 1;
      color: var(--level-accent, var(--accent-primary));
    }
    .sharpener-points-unit {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .sharpener-level-track {
      width: 100%;
      height: 8px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.2);
      overflow: hidden;
    }
    .sharpener-level-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--level-accent, var(--accent-primary)), color-mix(in srgb, var(--level-accent, var(--accent-primary)) 65%, #38BDF8));
      transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .sharpener-level-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 7px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-muted);
    }
    .sharpener-points-breakdown {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-subtle);
    }
    .sharpener-pt-cell {
      padding: 8px 6px;
      border-radius: 14px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      text-align: center;
      min-width: 0;
    }
    .sharpener-pt-val {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
      line-height: 1.15;
    }
    .sharpener-pt-lbl {
      font-size: 10.5px;
      font-weight: 600;
      color: var(--text-muted);
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Account Profile Header inside Sharpener Hub Sheet */
    .reward-hub-profile {
      display: flex;
      align-items: center;
      gap: 13px;
      min-width: 0;
      flex: 1;
    }
    .reward-hub-avatar-wrap {
      position: relative;
      width: 52px;
      height: 52px;
      flex-shrink: 0;
      border-radius: 9999px;
      padding: 2px;
      background: rgba(148, 163, 184, 0.28);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      cursor: pointer;
    }
    .reward-hub-avatar-edit-badge {
      position: absolute;
      bottom: -1px;
      right: -1px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--accent, #0D9488);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 1px 3px rgba(0,0,0,0.25);
      border: 1.5px solid var(--bg-surface);
      pointer-events: none;
    }
    .reward-hub-photo-popover {
      position: absolute;
      top: 100%;
      left: 0;
      margin-top: 6px;
      background: var(--surface-variant, var(--bg-elevated));
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 6px;
      box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25), 0 8px 10px -6px rgba(0,0,0,0.2);
      display: flex;
      flex-direction: column;
      gap: 4px;
      z-index: 50;
      min-width: 140px;
      opacity: 0;
      transform: translateY(-4px);
      pointer-events: none;
      transition: opacity 0.15s ease, transform 0.15s ease;
    }
    .reward-hub-photo-popover.open {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    .reward-hub-popover-item {
      width: 100%;
      text-align: left;
      padding: 7px 10px;
      border-radius: 8px;
      background: transparent;
      border: none;
      color: var(--text-primary);
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.12s ease;
    }
    .reward-hub-popover-item:hover {
      background: rgba(148, 163, 184, 0.14);
    }
    .reward-hub-popover-item.is-danger {
      color: #EF4444;
    }
    .reward-hub-popover-item.is-danger:hover {
      background: rgba(239, 68, 68, 0.12);
    }
    .reward-hub-avatar-wrap.is-connected {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(56, 189, 248, 0.65));
    }
    .reward-hub-avatar-img,
    .reward-hub-avatar-initials {
      width: 100%;
      height: 100%;
      border-radius: 9999px;
      object-fit: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(241, 245, 249, 0.96);
      color: #0f172a;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 800;
    }
    .reward-hub-avatar-img {
      display: block;
    }
    body.dark-mode .reward-hub-avatar-initials,
    html.dark .reward-hub-avatar-initials,
    [data-theme="dark"] .reward-hub-avatar-initials {
      background: rgba(24, 24, 29, 0.96);
      color: #f4f4f5;
    }
    .reward-hub-photo-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 5px;
      flex-wrap: wrap;
    }
    .reward-hub-photo-btn {
      min-height: 26px;
      padding: 3px 9px;
      border-radius: 9px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
    .reward-hub-photo-btn:active {
      transform: scale(0.95);
    }
    .reward-hub-photo-btn.is-danger {
      color: #EF4444;
    }
    .reward-badges-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .reward-badge-card {
      min-height: 104px;
      padding: 13px 12px 11px;
      border-radius: 20px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      text-align: center;
      gap: 6px;
      cursor: pointer;
      transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, background-color 0.18s ease;
    }
    .reward-badge-card:active {
      transform: scale(0.96);
    }
    .reward-badge-card:focus-visible {
      outline: 2px solid var(--accent-primary);
      outline-offset: 2px;
    }
    .reward-badge-card.is-unlocked {
      background: var(--bg-surface);
      border-color: color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 40%, var(--border-subtle));
    }
    .reward-badge-card.is-locked {
      opacity: 0.74;
    }
    .reward-badge-emblem {
      width: 40px;
      height: 40px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .reward-badge-card.is-unlocked .reward-badge-emblem,
    .reward-sheet-item.is-unlocked .reward-badge-emblem {
      color: var(--badge-accent, var(--accent-primary));
      background: color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 14%, var(--bg-surface));
      border-color: color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 46%, transparent);
      box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 42%, transparent);
    }
    .reward-badge-title {
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.2;
      color: var(--text-primary);
      width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .reward-badge-sub {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted);
      line-height: 1.2;
    }
    .reward-badge-card.is-unlocked .reward-badge-sub {
      color: var(--badge-accent, var(--accent-primary));
    }
    .reward-badge-progress-track {
      width: 100%;
      height: 4px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.22);
      overflow: hidden;
    }
    .reward-badge-progress-fill {
      height: 100%;
      border-radius: 999px;
      background: var(--badge-accent, var(--accent-primary));
      transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reward-sheet-filter-row {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 4px;
      padding: 4px;
      border-radius: 16px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      margin-bottom: 14px;
    }
    .reward-sheet-filter-btn {
      min-height: 38px;
      padding: 6px 12px;
      border-radius: 12px;
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 700;
      color: var(--text-secondary);
      cursor: pointer;
      white-space: nowrap;
      transition: background-color 0.16s ease, color 0.16s ease;
    }
    .reward-sheet-filter-btn.active {
      background: var(--bg-surface);
      color: var(--text-primary);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    .sharpener-hero-sheet-card {
      padding: 15px 16px;
      border-radius: 22px;
      background: color-mix(in srgb, var(--level-accent, var(--accent-primary)) 8%, var(--bg-elevated));
      border: 1px solid color-mix(in srgb, var(--level-accent, var(--accent-primary)) 32%, var(--border-subtle));
      margin-bottom: 12px;
    }
    .sharpener-hero-sheet-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .sharpener-tier-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 18px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
    }
    .sharpener-tier-row.is-unlocked {
      background: var(--bg-surface);
    }
    .sharpener-tier-row.is-current {
      border-color: var(--level-accent, var(--accent-primary));
      box-shadow: 0 4px 16px -6px color-mix(in srgb, var(--level-accent, var(--accent-primary)) 36%, transparent);
    }
    .sharpener-tier-row.is-locked {
      opacity: 0.62;
    }
    .reward-sheet-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-bottom: 6px;
    }
    .reward-sheet-item {
      display: flex;
      align-items: center;
      gap: 13px;
      padding: 13px 14px;
      border-radius: 18px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      transition: border-color 0.2s ease, transform 0.2s ease;
    }
    .reward-sheet-item.is-unlocked {
      background: var(--bg-surface);
      border-color: color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 38%, var(--border-subtle));
    }
    .reward-sheet-item.is-locked {
      opacity: 0.78;
    }
    .reward-sheet-item.is-focused {
      border-color: var(--badge-accent, var(--accent-primary));
      transform: scale(1.01);
    }
    .reward-sheet-info {
      min-width: 0;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .reward-sheet-top {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
    }
    .reward-sheet-name {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .reward-sheet-status {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .reward-sheet-item.is-unlocked .reward-sheet-status {
      color: var(--badge-accent, var(--accent-primary));
    }
    .reward-sheet-desc {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.35;
    }
    .reward-shield-meta {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 2px;
      font-size: 11px;
      font-weight: 700;
      color: #0284C7;
    }
    html.dark .reward-shield-meta,
    [data-theme="dark"] .reward-shield-meta,
    body.dark-mode .reward-shield-meta {
      color: #38BDF8;
    }
    .reward-shield-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 13px 15px;
      border-radius: 22px;
      background: color-mix(in srgb, #38BDF8 10%, var(--bg-elevated));
      border: 1px solid color-mix(in srgb, #38BDF8 28%, var(--border-subtle));
      margin-bottom: 12px;
    }
    .reward-shield-banner-left {
      display: flex;
      align-items: center;
      gap: 11px;
      min-width: 0;
      flex: 1;
    }
    .reward-shield-icon-orb {
      width: 38px;
      height: 38px;
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: color-mix(in srgb, #38BDF8 18%, var(--bg-surface));
      border: 1px solid color-mix(in srgb, #38BDF8 42%, transparent);
      color: #0284C7;
      flex-shrink: 0;
    }
    html.dark .reward-shield-icon-orb,
    [data-theme="dark"] .reward-shield-icon-orb,
    body.dark-mode .reward-shield-icon-orb {
      color: #38BDF8;
    }
    .reward-shield-title {
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
      display: flex;
      align-items: baseline;
      gap: 6px;
    }
    .reward-shield-sub {
      font-size: 11.5px;
      color: var(--text-secondary);
      line-height: 1.35;
      margin-top: 2px;
    }
    .reward-shield-action-btn {
      min-height: 44px;
      padding: 8px 13px;
      border-radius: 14px;
      background: #0284C7;
      color: #FFFFFF;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
      flex-shrink: 0;
      cursor: pointer;
      transition: transform 0.16s ease, opacity 0.16s ease;
    }
    html.dark .reward-shield-action-btn,
    [data-theme="dark"] .reward-shield-action-btn,
    body.dark-mode .reward-shield-action-btn {
      background: #38BDF8;
      color: #082F49;
    }
    .reward-shield-action-btn:active {
      transform: scale(0.96);
    }
    /* Minimalistic Scoped Refinement for #sheet-reward-badges */
    #sheet-reward-badges > .bottom-sheet {
      padding-top: 10px;
    }
    #sheet-reward-badges .reward-hub-profile {
      gap: 11px;
    }
    #sheet-reward-badges .reward-hub-avatar-wrap {
      width: 44px;
      height: 44px;
      padding: 1.5px;
      background: var(--border-subtle);
    }
    #sheet-reward-badges .reward-hub-avatar-wrap.is-connected {
      background: color-mix(in srgb, #10B981 55%, var(--border-subtle));
    }
    #sheet-reward-badges #reward-hub-name {
      font-size: 16px !important;
      font-weight: 700 !important;
      letter-spacing: -0.01em;
    }
    #sheet-reward-badges #reward-sheet-subtitle {
      font-size: 12px !important;
      font-weight: 500;
      color: var(--text-muted) !important;
      white-space: nowrap !important;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.3;
      margin-top: 2px !important;
    }
    #sheet-reward-badges .reward-hub-photo-actions {
      gap: 5px;
      margin-top: 4px;
    }
    #sheet-reward-badges .reward-hub-photo-btn {
      min-height: 22px;
      padding: 2px 7px;
      border-radius: 7px;
      background: transparent;
      border: 1px solid var(--border-subtle);
      font-size: 10.5px;
      font-weight: 600;
      color: var(--text-muted);
    }
    #sheet-reward-badges .reward-sheet-filter-row {
      padding: 3px;
      border-radius: 13px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      margin-bottom: 12px;
    }
    #sheet-reward-badges .reward-sheet-filter-btn {
      min-height: 32px;
      padding: 4px 10px;
      border-radius: 10px;
      font-size: 12.5px;
      font-weight: 600;
    }
    #sheet-reward-badges .reward-sheet-filter-btn.active {
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
    #sheet-reward-badges #reward-tab-levels {
      gap: 8px !important;
    }
    #sheet-reward-badges #reward-sheet-level-hero {
      padding: 14px 15px;
      border-radius: 18px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      margin-bottom: 0;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
      transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background-color 0.2s ease;
    }
    #sheet-reward-badges #reward-sheet-level-hero.is-pressing {
      transform: scale(0.985);
      border-color: color-mix(in srgb, var(--level-accent, var(--accent-primary)) 35%, var(--border-subtle));
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-hero-sheet-top {
      margin-bottom: 10px;
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-level-track {
      height: 5px;
      background: rgba(148, 163, 184, 0.16);
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-level-fill {
      background: var(--level-accent, var(--accent-primary));
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-level-meta {
      margin-top: 6px !important;
      font-size: 11px;
      font-weight: 500;
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-points-breakdown {
      margin-top: 10px;
      padding-top: 10px;
      gap: 4px;
      border-top: 1px solid var(--border-subtle);
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-pt-cell {
      padding: 2px 4px;
      border-radius: 0;
      background: transparent;
      border: none;
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-pt-val {
      font-size: 13px;
      font-weight: 700;
    }
    #sheet-reward-badges #reward-sheet-level-hero .sharpener-pt-lbl {
      font-size: 10px;
      font-weight: 500;
    }
    #sheet-reward-badges #reward-sheet-level-hero > div:nth-of-type(5) {
      display: none;
      font-size: 11px;
      color: var(--text-secondary);
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid var(--border-subtle);
      line-height: 1.4;
    }
    #sheet-reward-badges #reward-sheet-level-hero.is-earn-revealed > div:nth-of-type(5) {
      display: block;
      animation: paneEnter 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    }
    #sheet-reward-badges .reward-shield-banner {
      padding: 11px 14px;
      border-radius: 16px;
      background: transparent;
      border: 1px solid var(--border-subtle);
      margin-bottom: 0 !important;
    }
    #sheet-reward-badges .reward-shield-icon-orb {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      background: color-mix(in srgb, #38BDF8 10%, var(--bg-elevated));
      border: none;
    }
    #sheet-reward-badges .reward-shield-title {
      font-size: 13px;
      font-weight: 700;
    }
    #sheet-reward-badges .reward-shield-sub {
      font-size: 11px;
      color: var(--text-muted);
    }
    #sheet-reward-badges #reward-sheet-levels-list {
      gap: 6px !important;
    }
    #sheet-reward-badges .sharpener-tier-row {
      padding: 10px 12px;
      border-radius: 14px;
      background: transparent;
      border: 1px solid var(--border-subtle);
      box-shadow: none;
    }
    #sheet-reward-badges .sharpener-tier-row.is-unlocked {
      background: transparent;
    }
    #sheet-reward-badges .sharpener-tier-row.is-current {
      background: var(--bg-elevated);
      border-color: color-mix(in srgb, var(--level-accent, var(--accent-primary)) 45%, var(--border-subtle));
      box-shadow: none;
    }
    #sheet-reward-badges .reward-sheet-list {
      gap: 8px;
    }
    #sheet-reward-badges .reward-sheet-item {
      padding: 11px 13px;
      border-radius: 16px;
      background: transparent;
      border: 1px solid var(--border-subtle);
    }
    #sheet-reward-badges .reward-sheet-item.is-unlocked {
      background: var(--bg-elevated);
      border-color: color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 30%, var(--border-subtle));
    }
    #sheet-reward-badges .reward-sheet-item.is-unlocked .reward-badge-emblem {
      box-shadow: none;
    }
    .reward-shield-pill-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 32px;
      padding: 4px 10px;
      border-radius: 12px;
      background: color-mix(in srgb, #38BDF8 14%, var(--bg-elevated));
      border: 1px solid color-mix(in srgb, #38BDF8 36%, var(--border-subtle));
      color: #0284C7;
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.16s ease, border-color 0.16s ease;
    }
    html.dark .reward-shield-pill-btn,
    [data-theme="dark"] .reward-shield-pill-btn,
    body.dark-mode .reward-shield-pill-btn {
      color: #38BDF8;
    }
    .reward-shield-pill-btn:active {
      transform: scale(0.95);
    }
    .side-shield-cta {
      min-height: 36px;
      padding: 6px 11px;
      border-radius: 11px;
      background: color-mix(in srgb, #38BDF8 16%, transparent);
      border: 1px solid color-mix(in srgb, #38BDF8 44%, transparent);
      color: #0284C7;
      font-family: var(--font-display);
      font-size: 11.5px;
      font-weight: 800;
      cursor: pointer;
      white-space: nowrap;
      transition: transform 0.16s ease, opacity 0.16s ease;
    }
    html.dark .side-shield-cta,
    [data-theme="dark"] .side-shield-cta,
    body.dark-mode .side-shield-cta {
      color: #38BDF8;
    }
    .side-shield-cta:active {
      transform: scale(0.96);
    }

    /* Main-Screen Floating Visual Milestone Badge (Appears on Milestone Unlock & Disappears with Animation) */
    .reward-celebration-backdrop {
      position: fixed;
      top: max(18px, env(safe-area-inset-top, 18px));
      left: 0;
      right: 0;
      z-index: 9800;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 0 16px;
      pointer-events: none;
    }
    .reward-celebration-backdrop.open {
      display: flex;
    }
    .reward-celebration-card {
      pointer-events: auto;
      width: 100%;
      max-width: 372px;
      border-radius: 26px;
      padding: 15px 17px 16px;
      background: rgba(255, 255, 255, 0.96);
      color: #1A1A1A;
      border: 1px solid color-mix(in srgb, var(--cel-accent, #10B981) 44%, rgba(15, 23, 42, 0.1));
      box-shadow: 0 22px 52px -14px rgba(15, 23, 42, 0.26), 0 0 32px -10px color-mix(in srgb, var(--cel-accent, #10B981) 42%, transparent);
      display: flex;
      align-items: center;
      gap: 15px;
      text-align: left;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transform: translate3d(0, -24px, 0) scale(0.88);
      opacity: 0;
    }
    html.dark .reward-celebration-card,
    [data-theme="dark"] .reward-celebration-card,
    body.dark-mode .reward-celebration-card {
      background: rgba(18, 18, 22, 0.96);
      color: #F4F4F5;
      border-color: color-mix(in srgb, var(--cel-accent, #10B981) 50%, rgba(255, 255, 255, 0.14));
      box-shadow: 0 24px 56px -12px rgba(0, 0, 0, 0.78), 0 0 36px -12px color-mix(in srgb, var(--cel-accent, #10B981) 48%, transparent);
    }
    .reward-celebration-backdrop.open .reward-celebration-card {
      animation: rewardBadgeEnter 0.46s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .reward-celebration-backdrop.is-leaving .reward-celebration-card {
      animation: rewardBadgeLeave 0.36s cubic-bezier(0.4, 0, 1, 1) forwards;
    }
    @keyframes rewardBadgeEnter {
      0% { opacity: 0; transform: translate3d(0, -26px, 0) scale(0.86); }
      65% { opacity: 1; transform: translate3d(0, 3px, 0) scale(1.02); }
      100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    }
    @keyframes rewardBadgeLeave {
      0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
      100% { opacity: 0; transform: translate3d(0, -24px, 0) scale(0.9); }
    }
    .reward-celebration-emblem-wrap {
      position: relative;
      width: 72px;
      height: 72px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .reward-celebration-halo {
      position: absolute;
      inset: -4px;
      border-radius: 9999px;
      background: radial-gradient(circle, color-mix(in srgb, var(--cel-accent, #10B981) 44%, transparent) 0%, transparent 72%);
      opacity: 0;
      transform: scale(0.7);
    }
    .reward-celebration-backdrop.open .reward-celebration-halo {
      animation: rewardHaloPulse 2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    }
    @keyframes rewardHaloPulse {
      0% { opacity: 0.45; transform: scale(0.92); }
      50% { opacity: 1; transform: scale(1.22); }
      100% { opacity: 0.45; transform: scale(0.92); }
    }
    .reward-celebration-burst {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }
    .reward-celebration-burst span {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 3px;
      height: 9px;
      border-radius: 99px;
      background: var(--cel-accent, #10B981);
      opacity: 0;
      transform-origin: center center;
    }
    .reward-celebration-burst span:nth-child(1) { --ray-angle: 0deg; }
    .reward-celebration-burst span:nth-child(2) { --ray-angle: 60deg; }
    .reward-celebration-burst span:nth-child(3) { --ray-angle: 120deg; }
    .reward-celebration-burst span:nth-child(4) { --ray-angle: 180deg; }
    .reward-celebration-burst span:nth-child(5) { --ray-angle: 240deg; }
    .reward-celebration-burst span:nth-child(6) { --ray-angle: 300deg; }
    .reward-celebration-backdrop.open .reward-celebration-burst span {
      animation: rewardBurstRay 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    }
    @keyframes rewardBurstRay {
      0% { opacity: 0.95; transform: translate(-50%, -50%) rotate(var(--ray-angle)) translateY(-16px) scaleY(0.6); }
      100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--ray-angle)) translateY(-38px) scaleY(1.1); }
    }
    .reward-celebration-emblem {
      position: relative;
      z-index: 2;
      width: 66px;
      height: 66px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      border: none;
      box-shadow: none;
      filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--cel-accent, #10B981) 46%, transparent));
      transform: scale(0.45) rotate(-14deg);
    }
    .reward-celebration-backdrop.open .reward-celebration-emblem {
      animation: rewardMedalSpring 0.56s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.04s forwards;
    }
    @keyframes rewardMedalSpring {
      0% { transform: scale(0.45) rotate(-14deg); }
      70% { transform: scale(1.07) rotate(3deg); }
      100% { transform: scale(1) rotate(0deg); }
    }
    .reward-celebration-shine {
      position: absolute;
      inset: 4px;
      z-index: 3;
      border-radius: 9999px;
      overflow: hidden;
      pointer-events: none;
    }
    .reward-celebration-shine::after {
      content: '';
      position: absolute;
      top: -20%;
      left: -80%;
      width: 48%;
      height: 140%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
      transform: skewX(-24deg);
      opacity: 0;
    }
    .reward-celebration-backdrop.open .reward-celebration-shine::after {
      animation: rewardMedalSheen 0.85s ease 0.34s forwards;
    }
    @keyframes rewardMedalSheen {
      0% { left: -75%; opacity: 0; }
      25% { opacity: 1; }
      100% { left: 135%; opacity: 0; }
    }
    .reward-celebration-body {
      min-width: 0;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .reward-celebration-kicker {
      font-family: var(--font-display);
      font-variant-numeric: tabular-nums;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.015em;
      color: var(--cel-accent, #10B981);
    }
    .reward-celebration-title {
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.2;
      color: inherit;
    }
    .reward-celebration-desc {
      font-size: 12.5px;
      line-height: 1.35;
      color: var(--text-secondary);
    }
    .reward-celebration-tap-hint {
      margin-top: 3px;
      font-size: 10.5px;
      font-weight: 600;
      color: var(--text-muted);
    }
    .reward-celebration-bonus {
      display: none;
      align-items: center;
      gap: 5px;
      margin-top: 3px;
      font-size: 11px;
      font-weight: 700;
      color: #0284C7;
    }
    html.dark .reward-celebration-bonus,
    [data-theme="dark"] .reward-celebration-bonus,
    body.dark-mode .reward-celebration-bonus {
      color: #38BDF8;
    }
    .reward-celebration-bonus.is-visible {
      display: inline-flex;
    }
    .reward-cel-timer-bar {
      position: absolute;
      left: 16px;
      right: 16px;
      bottom: 0;
      height: 2.5px;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--cel-accent, #10B981), color-mix(in srgb, var(--cel-accent, #10B981) 60%, #38BDF8));
      transform-origin: left center;
      transform: scaleX(1);
    }
    .reward-celebration-backdrop.open .reward-cel-timer-bar {
      animation: rewardTimerDrain 4.2s linear forwards;
    }
    @keyframes rewardTimerDrain {
      0% { transform: scaleX(1); }
      100% { transform: scaleX(0); }
    }

    /* Visual Badge SVG Helpers */
    .visual-badge-svg {
      display: block;
      flex-shrink: 0;
    }
    .visual-badge-svg.is-unlocked {
      filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.16));
    }

    /* Profile Side Drawer — Earned Badges Strip */
    .profile-side-badges-block {
      padding: 15px 0;
      border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .profile-side-badges-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 10px;
    }
    .profile-side-badges-more {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 0;
      background: transparent;
      border: none;
      font-family: var(--font-mono);
      font-size: 11.5px;
      font-weight: 700;
      color: var(--accent-primary);
      cursor: pointer;
    }
    .profile-side-badges-shelf {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      overflow-x: auto;
      padding: 2px 0 4px;
      scrollbar-width: none;
    }
    .profile-side-badges-shelf::-webkit-scrollbar {
      display: none;
    }
    .side-badge-medal-btn {
      flex: 0 0 auto;
      width: 60px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      padding: 2px 0;
      background: transparent;
      border: none;
      cursor: pointer;
      color: var(--text-primary);
    }
    .side-badge-medal-svg {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .side-badge-medal-name {
      font-family: var(--font-display);
      font-size: 10.5px;
      font-weight: 700;
      line-height: 1.2;
      color: var(--text-secondary);
      width: 100%;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .side-badges-empty-row {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      cursor: pointer;
    }
    .side-badges-empty-silhouettes {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }
    .side-badges-empty-copy {
      font-size: 11.5px;
      line-height: 1.35;
      color: var(--text-muted);
    }

    /* Insight Hub — Dedicated Earned Badges Trophy Shelf Card */
    .insight-badges-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 14px;
    }
    .insight-badges-head-left {
      display: flex;
      align-items: baseline;
      gap: 8px;
      min-width: 0;
    }
    .insight-badges-count {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
    }
    .insight-badges-all-btn {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      min-height: 32px;
      padding: 4px 2px;
      background: transparent;
      border: none;
      font-family: var(--font-display);
      font-size: 12.5px;
      font-weight: 700;
      color: var(--accent-primary);
      cursor: pointer;
      white-space: nowrap;
    }
    .insight-badges-shelf {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
      gap: 12px 10px;
    }
    .insight-badge-medal-tile {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 5px;
      padding: 8px 4px;
      background: transparent;
      border: none;
      border-radius: 14px;
      cursor: pointer;
      transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.16s ease;
    }
    .insight-badge-medal-tile:hover {
      background: var(--bg-elevated);
    }
    .insight-badge-medal-tile:active {
      transform: scale(0.95);
    }
    .insight-badge-medal-art {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .insight-badge-medal-title {
      font-family: var(--font-display);
      font-size: 11.5px;
      font-weight: 700;
      line-height: 1.2;
      color: var(--text-primary);
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .insight-badge-medal-tile.is-next .insight-badge-medal-title {
      color: var(--text-secondary);
    }
    .insight-badge-medal-meta {
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 600;
      line-height: 1.1;
      color: var(--text-muted);
    }
    .insight-badge-medal-tile.is-unlocked .insight-badge-medal-meta {
      color: var(--badge-accent, var(--accent-primary));
    }

    /* Full Badges Modal — Earned Trophy Grid & In-Progress List */
    .reward-gallery-section-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      padding: 2px 2px 6px;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 700;
      color: var(--text-secondary);
    }
    .reward-gallery-section-head > span:last-child {
      font-family: var(--font-body);
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
    }
    .reward-earned-trophy-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 10px;
    }
    .reward-earned-tile {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 4px;
      padding: 14px 10px 12px;
      border-radius: 18px;
      background: var(--bg-elevated);
      border: 1px solid color-mix(in srgb, var(--badge-accent, var(--accent-primary)) 30%, var(--border-subtle));
      cursor: pointer;
      transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.16s ease;
    }
    .reward-earned-tile.is-focused {
      border-color: var(--badge-accent, var(--accent-primary));
    }
    .reward-earned-tile:active {
      transform: scale(0.96);
    }
    .reward-earned-tile-art {
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .reward-earned-tile-name {
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 800;
      line-height: 1.2;
      color: var(--text-primary);
    }
    .reward-earned-tile-desc {
      font-size: 11px;
      line-height: 1.3;
      color: var(--text-secondary);
    }
    .reward-earned-tile-date {
      margin-top: 2px;
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 700;
      color: var(--badge-accent, var(--accent-primary));
    }
    .reward-earned-empty {
      padding: 14px 12px;
      margin-bottom: 8px;
      border-radius: 14px;
      border: 1px dashed var(--border-strong);
      font-size: 12px;
      line-height: 1.45;
      color: var(--text-muted);
      text-align: center;
    }
    .reward-locked-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .reward-sheet-medallion-slot {
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    @media (prefers-reduced-motion: reduce) {
      .reward-celebration-backdrop,
      .reward-celebration-card,
      .reward-celebration-halo,
      .reward-celebration-emblem,
      .reward-celebration-burst span,
      .reward-celebration-shine::after,
      .reward-cel-timer-bar {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
      }
    }

    .profile-side-details {
      display: flex;
      flex-direction: column;
      padding: 10px 0;
      flex: 1 1 auto;
    }
    .profile-side-row {
      width: 100%;
      min-height: 52px;
      padding: 13px 4px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      text-align: left;
      border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .profile-side-row:last-child {
      border-bottom: none;
    }
    button.profile-side-row {
      cursor: pointer;
    }
    button.profile-side-row:active {
      transform: scale(0.985);
      opacity: 0.78;
    }
    .profile-side-row-key {
      font-size: 13.5px;
      font-weight: 500;
      color: var(--text-secondary, #4A4843);
      white-space: nowrap;
      flex-shrink: 0;
    }
    body.dark-mode .profile-side-row-key,
    html.dark .profile-side-row-key,
    [data-theme="dark"] .profile-side-row-key {
      color: #a1a1aa;
    }
    .profile-side-row-val {
      font-size: 13.5px;
      font-weight: 600;
      color: inherit;
      text-align: right;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .profile-side-row-val.is-accent {
      color: var(--accent-primary, #0D9488);
    }
    aside#profile-side-drawer #side-theme-row #side-detail-theme {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      overflow: visible;
      color: var(--text-secondary, #4A4843);
    }
    body.dark-mode aside#profile-side-drawer #side-theme-row #side-detail-theme,
    html.dark aside#profile-side-drawer #side-theme-row #side-detail-theme,
    [data-theme="dark"] aside#profile-side-drawer #side-theme-row #side-detail-theme {
      color: #a1a1aa;
    }
    aside#profile-side-drawer #side-theme-row #side-detail-theme svg {
      width: 18px;
      height: 18px;
      display: block;
      stroke: currentColor;
      transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }
    aside#profile-side-drawer #side-theme-row:active #side-detail-theme svg {
      transform: rotate(22deg) scale(0.92);
    }

    .profile-side-footer {
      padding-top: 16px;
      margin-top: auto;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .profile-side-cta {
      width: 100%;
      min-height: 46px;
      padding: 10px 18px;
      border-radius: 14px;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease, background 0.18s ease;
    }
    .profile-side-cta.primary {
      background: var(--accent-primary, #0D9488);
      color: var(--accent-contrast, #FFFFFF);
      box-shadow: 0 10px 24px -6px var(--accent-glow, rgba(13, 148, 136, 0.28));
    }
    .profile-side-cta.secondary {
      background: rgba(15, 23, 42, 0.05);
      border: 1px solid rgba(15, 23, 42, 0.1);
      color: inherit;
    }
    body.dark-mode .profile-side-cta.secondary,
    html.dark .profile-side-cta.secondary,
    [data-theme="dark"] .profile-side-cta.secondary {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.12);
    }
    .profile-side-cta:active {
      transform: scale(0.97);
    }
    .profile-side-cta:focus-visible {
      outline: 2px solid var(--accent-primary, #0D9488);
      outline-offset: 2px;
    }

    @media (prefers-reduced-motion: reduce) {
      .profile-side-backdrop,
      .profile-side-drawer,
      .profile-side-stagger,
      .header-profile-avatar-btn,
      .ritual-moon-pulse,
      .winddown-carousel-track {
        transition: none !important;
        animation: none !important;
      }
      .profile-side-avatar-ring.is-night-trigger .profile-side-night-overlay svg,
      .profile-side-shutdown-btn.is-night-active .shutdown-btn-icon {
        animation: none !important;
      }
    }

    /* ==========================================================================
       END-OF-DAY SHUTDOWN & MORNING RITUAL SYSTEM
       ========================================================================== */
    @keyframes ritualMoonPulse {
      0%, 100% { transform: scale(1); opacity: 0.92; filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.45)); }
      50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 14px rgba(129, 140, 248, 0.85)); }
    }

    /* 8 PM Trigger: Gently pulsing crescent moon inside Slide Menu Profile icon + Header cue */
    .profile-side-night-overlay {
      position: absolute;
      inset: 2.5px;
      border-radius: 9999px;
      display: none;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #0d9488 125%);
      color: #e0e7ff;
      z-index: 2;
    }
    .profile-side-avatar-ring.is-night-trigger {
      background: linear-gradient(135deg, rgba(129, 140, 248, 0.92), rgba(13, 148, 136, 0.85));
      box-shadow: 0 6px 22px rgba(99, 102, 241, 0.34);
    }
    .profile-side-avatar-ring.is-night-trigger .profile-side-night-overlay {
      display: flex;
    }
    .profile-side-avatar-ring.is-night-trigger .profile-side-night-overlay svg {
      animation: ritualMoonPulse 2.6s ease-in-out infinite;
    }
    .header-profile-avatar-btn.is-night-trigger::before {
      content: '';
      position: absolute;
      top: -1px;
      right: -1px;
      width: 10px;
      height: 10px;
      border-radius: 9999px;
      background: #818cf8;
      border: 2px solid var(--bg-canvas, #ffffff);
      box-shadow: 0 0 8px rgba(129, 140, 248, 0.75);
      z-index: 3;
    }

    /* Prominent Redesigned Shutdown the Day Button inside Slide Menu */
    .profile-side-shutdown-btn {
      position: relative;
      width: 100%;
      min-height: 58px;
      padding: 12px 14px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background:
        radial-gradient(130% 160% at 0% 0%, rgba(99, 102, 241, 0.28) 0%, rgba(13, 148, 136, 0.14) 45%, rgba(10, 12, 22, 0.98) 100%),
        #0b0e17;
      border: 1px solid rgba(129, 140, 248, 0.32);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 14px 28px -12px rgba(9, 11, 20, 0.65);
      color: #f8fafc;
      font-family: var(--font-display);
      cursor: pointer;
      overflow: hidden;
      transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .profile-side-shutdown-btn::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 88% 20%, rgba(129, 140, 248, 0.2), transparent 55%);
      pointer-events: none;
    }
    .profile-side-shutdown-btn.is-night-active {
      border-color: rgba(129, 140, 248, 0.72);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 14px 32px -8px rgba(99, 102, 241, 0.5);
    }
    .profile-side-shutdown-btn.is-night-active .shutdown-btn-icon {
      animation: ritualMoonPulse 2.6s ease-in-out infinite;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.38), rgba(13, 148, 136, 0.32));
      border-color: rgba(165, 180, 252, 0.55);
      color: #e0e7ff;
    }
    .profile-side-shutdown-btn:active {
      transform: scale(0.97);
    }
    .profile-side-shutdown-btn:focus-visible {
      outline: 2px solid #818cf8;
      outline-offset: 2px;
    }
    .shutdown-btn-left {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      text-align: left;
    }
    .shutdown-btn-icon {
      width: 38px;
      height: 38px;
      border-radius: 13px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(129, 140, 248, 0.16);
      border: 1px solid rgba(129, 140, 248, 0.32);
      color: #c7d2fe;
      flex-shrink: 0;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    .shutdown-btn-title {
      font-size: 14px;
      font-weight: 800;
      letter-spacing: -0.015em;
      line-height: 1.2;
      color: #ffffff;
    }
    .shutdown-btn-sub {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.01em;
      color: rgba(199, 210, 254, 0.82);
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .shutdown-btn-pill {
      position: relative;
      z-index: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      height: 30px;
      padding: 0 11px;
      border-radius: 9999px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: #e0e7ff;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
      transition: background 0.2s ease, transform 0.2s ease;
    }
    .profile-side-shutdown-btn:hover .shutdown-btn-pill {
      background: rgba(129, 140, 248, 0.28);
    }

    /* Floating Return Pill when routing out of Step 1 to fix Loose Ends */
    .winddown-return-pill {
      position: fixed;
      right: 16px;
      bottom: calc(82px + env(safe-area-inset-bottom, 0px));
      z-index: 6150;
      display: none;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 9px 16px;
      border-radius: 9999px;
      background: linear-gradient(135deg, #1e1b4b, #0d9488);
      color: #ffffff;
      border: 1px solid rgba(255, 255, 255, 0.22);
      box-shadow: 0 14px 32px rgba(15, 23, 42, 0.34);
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }
    .winddown-return-pill.visible {
      display: inline-flex;
    }
    .winddown-return-pill:active {
      transform: scale(0.95);
    }

    /* 4-Step Full-Screen Wind-Down Wizard (Minimal & Elegant) */
    .winddown-wizard-modal {
      position: fixed;
      inset: 0;
      z-index: 100010;
      display: none;
      flex-direction: column;
      background: var(--bg-canvas, #F7F6F2);
      color: var(--text-primary, #171614);
      opacity: 0;
      transform: translateY(16px);
      transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
      overflow: hidden;
    }
    body.dark-mode .winddown-wizard-modal,
    html.dark .winddown-wizard-modal,
    [data-theme="dark"] .winddown-wizard-modal {
      background: #07080c;
      color: #f4f4f5;
    }
    .winddown-wizard-modal.open,
    body.light-mode .winddown-wizard-modal.open,
    body.dark-mode .winddown-wizard-modal.open,
    html.dark .winddown-wizard-modal.open,
    [data-theme="dark"] .winddown-wizard-modal.open {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
      transform: translateY(0);
    }
    .winddown-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: max(14px, env(safe-area-inset-top, 14px)) 18px 8px;
      max-width: 680px;
      width: 100%;
      margin: 0 auto;
      box-sizing: border-box;
    }
    .winddown-close-icon-btn {
      width: 36px;
      height: 36px;
      border-radius: 9999px;
      border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
      background: var(--bg-elevated, rgba(148, 163, 184, 0.1));
      color: var(--text-secondary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
    }
    .winddown-step-dots {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .winddown-step-dot {
      height: 28px;
      min-width: 28px;
      padding: 0 9px;
      border-radius: 9999px;
      border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
      background: rgba(148, 163, 184, 0.1);
      color: var(--text-muted, #64748B);
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      cursor: pointer;
      transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .winddown-step-dot .wd-dot-label {
      display: none;
      font-family: var(--font-display);
      font-weight: 700;
      letter-spacing: -0.01em;
    }
    .winddown-step-dot.is-active {
      background: var(--accent-primary, #0D9488);
      color: #ffffff;
      border-color: transparent;
      padding: 0 12px;
      box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.42);
    }
    .winddown-step-dot.is-active .wd-dot-label {
      display: inline;
    }
    .winddown-step-dot.is-done {
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 16%, transparent);
      color: var(--accent-primary, #0D9488);
      border-color: color-mix(in srgb, var(--accent-primary, #0D9488) 34%, transparent);
    }
    .winddown-carousel-viewport {
      flex: 1;
      width: 100%;
      max-width: 680px;
      margin: 0 auto;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .winddown-carousel-track {
      display: flex;
      width: 400%;
      height: 100%;
      transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: transform;
    }
    .winddown-slide {
      width: 25%;
      height: 100%;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 8px 20px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-sizing: border-box;
    }
    .winddown-step-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
    }
    .winddown-hero-title {
      font-family: var(--font-display);
      font-size: clamp(20px, 4vw, 26px);
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.15;
      margin: 0;
    }
    .winddown-hero-sub {
      font-size: 13px;
      color: var(--text-secondary, #57534E);
      line-height: 1.4;
      margin: 0;
    }
    .winddown-kicker {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--accent-primary, #0D9488);
      margin: 0 0 2px;
    }
    .winddown-audit-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .winddown-audit-card {
      padding: 14px 16px;
      border-radius: 20px;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .winddown-audit-row-compact {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 13px 16px;
    }
    .winddown-audit-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .winddown-audit-name {
      font-family: var(--font-display);
      font-size: 15.5px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .winddown-audit-meta {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 1px;
    }
    .winddown-audit-actions {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .winddown-summary-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }
    .winddown-ring-card {
      padding: 16px 10px;
      border-radius: 22px;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 8px;
    }
    .winddown-ring-wrap {
      position: relative;
      width: 78px;
      height: 78px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .winddown-ring-svg {
      width: 78px;
      height: 78px;
      transform: rotate(-90deg);
    }
    .winddown-ring-track {
      fill: none;
      stroke: rgba(148, 163, 184, 0.2);
      stroke-width: 7.5;
    }
    .winddown-ring-prog {
      fill: none;
      stroke: var(--ring-color, var(--accent-primary, #0D9488));
      stroke-width: 7.5;
      stroke-linecap: round;
      stroke-dasharray: 226.19;
      stroke-dashoffset: 226.19;
      transition: stroke-dashoffset 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .winddown-ring-center {
      position: absolute;
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .winddown-ring-label {
      font-family: var(--font-display);
      font-size: 12.5px;
      font-weight: 800;
      color: var(--text-secondary);
      letter-spacing: -0.01em;
    }
    .winddown-preview-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .winddown-preview-row {
      padding: 12px 15px;
      border-radius: 18px;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    /* Step 4 & App-Wide Interactive Virtual Clock Time Picker */
    .winddown-alarm-card {
      padding: 14px 14px;
      border-radius: 24px;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 11px;
      text-align: center;
    }
    .vclock-header-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
      width: 100%;
    }
    .vclock-digital-box {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 2px;
      padding: 5px 10px;
      border-radius: 16px;
      background: var(--bg-elevated, #F1F5F9);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .vclock-seg-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 48px;
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: clamp(24px, 5.8vw, 32px);
      font-weight: 800;
      line-height: 1;
      text-align: center;
      padding: 5px 7px;
      border-radius: 10px;
      border: none;
      background: transparent;
      color: var(--text-muted, #64748B);
      cursor: pointer;
      transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    }
    .vclock-seg-btn.is-active,
    .vclock-seg-btn.active {
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 16%, transparent);
      color: var(--accent-primary, #0D9488);
    }
    .vclock-seg-colon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-mono);
      font-size: clamp(22px, 5vw, 28px);
      font-weight: 800;
      line-height: 1;
      padding-bottom: 2px;
      color: var(--text-muted, #64748B);
      user-select: none;
    }
    .vclock-ampm-group {
      display: inline-flex;
      flex-direction: column;
      gap: 2px;
      padding: 3px;
      border-radius: 12px;
      background: var(--bg-elevated, #F1F5F9);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    }
    .vclock-ampm-btn {
      min-width: 42px;
      min-height: 22px;
      padding: 2px 7px;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--text-muted, #64748B);
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 800;
      cursor: pointer;
      transition: background 0.16s ease, color 0.16s ease;
    }
    .vclock-ampm-btn.is-active,
    .vclock-ampm-btn.active {
      background: var(--accent-primary, #0D9488);
      color: var(--accent-contrast, #ffffff);
    }
    .vclock-stepper-btn {
      min-width: 42px;
      min-height: 42px;
      padding: 0 9px;
      border-radius: 12px;
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      background: var(--bg-elevated, #F1F5F9);
      color: var(--text-primary);
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
    }
    .vclock-stepper-btn:active {
      transform: scale(0.94);
    }
    .vclock-dial-stage {
      position: relative;
      width: 224px;
      height: 224px;
      max-width: 100%;
      aspect-ratio: 1 / 1;
      box-sizing: border-box;
      border-radius: 9999px;
      background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent-primary, #0D9488) 9%, var(--bg-elevated, #F1F5F9)), var(--bg-elevated, #F1F5F9));
      border: 1.5px solid var(--border-subtle, rgba(15, 23, 42, 0.1));
      box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.06), 0 8px 24px -10px rgba(15, 23, 42, 0.12);
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      cursor: pointer;
      flex-shrink: 0;
      margin: 0 auto;
    }
    body.dark-mode .vclock-dial-stage,
    html.dark .vclock-dial-stage,
    [data-theme="dark"] .vclock-dial-stage {
      background: radial-gradient(circle at 50% 35%, rgba(13, 148, 136, 0.14), rgba(24, 24, 29, 0.95));
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.45), 0 12px 28px -10px rgba(0, 0, 0, 0.55);
    }
    .vclock-hand-svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 2;
    }
    .vclock-numbers-layer {
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
    }
    .vclock-num {
      position: absolute;
      width: 33px;
      height: 33px;
      margin: 0;
      transform: translate(-50%, -50%);
      border-radius: 9999px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 13px;
      font-weight: 700;
      line-height: 1;
      color: var(--text-primary);
      transition: color 0.12s ease;
    }
    .vclock-num.is-selected {
      color: var(--accent-contrast, #ffffff);
      font-weight: 800;
    }
    .vclock-dial-stage.is-dial-dragging .vclock-num {
      transition: none !important;
    }
    .vclock-mode-hint {
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-muted, #64748B);
    }

    /* Time-Block Virtual Clock Range Tabs (From -> To) in To-Do Composer & Universal Clock Modal */
    .tb-vclock-widget {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding-top: 4px;
    }
    .tb-vclock-range-tabs {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 6px;
      width: 100%;
    }
    .tb-vclock-endpoint-btn {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding: 8px 12px;
      border-radius: 14px;
      background: var(--bg-elevated, rgba(148, 163, 184, 0.1));
      border: 1.5px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
      color: var(--text-primary);
      cursor: pointer;
      text-align: left;
      transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
    }
    .tb-vclock-endpoint-btn.is-active {
      border-color: var(--accent-primary, #0D9488);
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 12%, var(--bg-elevated, #F1F5F9));
    }
    .tb-vclock-endpoint-lbl,
    .tb-ep-lbl {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted, #64748B);
    }
    .tb-vclock-endpoint-btn.is-active .tb-vclock-endpoint-lbl,
    .tb-vclock-endpoint-btn.is-active .tb-ep-lbl {
      color: var(--accent-primary, #0D9488);
    }
    .tb-vclock-endpoint-val,
    .tb-ep-val {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 14.5px;
      font-weight: 800;
      color: var(--text-primary);
      margin-top: 2px;
    }
    .tb-vclock-arrow,
    .tb-vclock-range-arrow {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 800;
      color: var(--text-muted);
      padding: 0 2px;
    }

    /* Inline Task Card Time Block Clock Trigger Buttons */
    .exact-vclock-range-bar {
      display: flex;
      align-items: center;
      gap: 6px;
      width: 100%;
    }
    .exact-vclock-trigger-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 12px;
      background: var(--bg-elevated, rgba(128, 128, 128, 0.08));
      border: 1px solid var(--border-subtle, rgba(128, 128, 128, 0.22));
      color: var(--text-primary);
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: border-color 0.18s ease, transform 0.15s ease;
    }
    .exact-vclock-trigger-btn:active {
      transform: scale(0.97);
    }
    .exact-vclock-trigger-btn .evc-tag,
    .exact-vclock-trigger-btn .exact-vclock-trigger-lbl {
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      color: var(--accent-primary, #0D9488);
      letter-spacing: 0.04em;
      display: block;
    }
    .exact-vclock-trigger-btn .evc-val,
    .exact-vclock-trigger-btn .exact-vclock-trigger-val {
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
      display: block;
      margin-top: 1px;
    }

    /* Universal Virtual Clock Modal (for inline task time blocks & any time input) */
    .universal-vclock-modal {
      position: fixed;
      inset: 0;
      z-index: 100060;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(6, 8, 14, 0.68);
      opacity: 0;
      transition: opacity 0.24s ease;
    }
    .universal-vclock-modal.open {
      display: flex !important;
      opacity: 1 !important;
    }
    .universal-vclock-dialog,
    .universal-vclock-sheet {
      width: min(100%, 360px);
      padding: 18px 18px 16px;
      border-radius: 26px;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
      box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
      color: var(--text-primary);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    body.dark-mode .universal-vclock-dialog,
    html.dark .universal-vclock-dialog,
    [data-theme="dark"] .universal-vclock-dialog,
    body.dark-mode .universal-vclock-sheet,
    html.dark .universal-vclock-sheet,
    [data-theme="dark"] .universal-vclock-sheet {
      background: #12131a;
      border-color: rgba(255, 255, 255, 0.12);
    }

    .vclock-input-trigger {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 40px;
      padding: 6px 12px;
      border-radius: 11px;
      border: 1px solid var(--border-strong, rgba(148, 163, 184, 0.28));
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      white-space: nowrap;
      transition: transform 0.18s var(--spring-bounce), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    }
    .vclock-input-trigger svg {
      color: var(--accent-primary, #0D9488);
      flex-shrink: 0;
    }
    .vclock-input-trigger.is-empty {
      color: var(--text-muted);
      font-weight: 600;
    }
    .vclock-input-trigger.is-empty svg {
      color: var(--text-muted);
    }
    .vclock-input-trigger:hover {
      border-color: var(--accent-primary, #0D9488);
      color: var(--accent-primary, #0D9488);
    }
    .anti-edit-time-btn {
      width: 100%;
      justify-content: flex-start;
    }

    .winddown-sleep-duration {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 13px;
      font-weight: 700;
      color: var(--accent-primary, #0D9488);
      padding: 5px 13px;
      border-radius: 9999px;
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 12%, transparent);
    }
    .winddown-preset-row {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 6px;
    }
    .winddown-preset-btn {
      min-height: 34px;
      padding: 5px 11px;
      border-radius: 11px;
      background: var(--bg-elevated, #F3F4F6);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      color: var(--text-primary);
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }
    .winddown-preset-btn.active {
      background: var(--accent-primary, #0D9488);
      color: #ffffff;
      border-color: transparent;
    }
    .winddown-routine-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 2px 10px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
    }
    .winddown-routine-label input {
      width: 17px;
      height: 17px;
      accent-color: var(--accent-primary, #0D9488);
    }
    .winddown-footer {
      padding: 10px 20px max(18px, env(safe-area-inset-bottom, 18px));
      max-width: 680px;
      width: 100%;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      box-sizing: border-box;
    }
    .winddown-btn-primary {
      flex: 1;
      min-height: 48px;
      padding: 11px 20px;
      border-radius: 16px;
      background: var(--accent-primary, #0D9488);
      color: #ffffff;
      font-family: var(--font-display);
      font-size: 14.5px;
      font-weight: 800;
      cursor: pointer;
      border: none;
      transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease;
    }
    .winddown-btn-secondary {
      min-height: 46px;
      padding: 10px 16px;
      border-radius: 15px;
      background: var(--bg-elevated, #F1F5F9);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.1));
      color: var(--text-primary);
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .winddown-btn-primary:active,
    .winddown-btn-secondary:active {
      transform: scale(0.97);
    }

    /* ======================================================================
       CINEMATIC WINDING-OFF / SHUTTING-OFF POWER-DOWN OVERLAY (Non-Overlapping)
       ====================================================================== */
    .shutdown-poweroff-cinema {
      position: fixed;
      inset: 0;
      z-index: 100035;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background:
        radial-gradient(circle at 50% 42%, rgba(30, 27, 75, 0.78) 0%, rgba(7, 9, 18, 0.96) 54%, #000000 100%);
      color: #ffffff;
      overflow: hidden;
      pointer-events: auto;
      opacity: 0;
      transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1), background 0.48s ease;
    }
    .shutdown-poweroff-cinema.open {
      display: flex !important;
      opacity: 1;
    }
    .shutdown-poweroff-cinema.phase-stage-exit,
    .shutdown-poweroff-cinema.phase-horizon-collapse {
      background: #000000 !important;
    }
    .shutdown-poweroff-cinema.phase-fadeout {
      opacity: 0 !important;
      pointer-events: none !important;
      background: #000000 !important;
    }
    .poweroff-starfield {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 1;
      opacity: 0;
      transition: opacity 0.45s ease;
    }
    .shutdown-poweroff-cinema.open .poweroff-starfield {
      opacity: 0.9;
    }
    .shutdown-poweroff-cinema.phase-stage-exit .poweroff-starfield,
    .shutdown-poweroff-cinema.phase-horizon-collapse .poweroff-starfield,
    .shutdown-poweroff-cinema.phase-fadeout .poweroff-starfield {
      opacity: 0 !important;
    }
    .poweroff-star {
      position: absolute;
      border-radius: 9999px;
      background: rgba(224, 231, 255, 0.82);
      box-shadow: 0 0 8px rgba(165, 180, 252, 0.55);
      animation: poweroffStarTwinkle var(--twinkle-dur, 2.6s) ease-in-out infinite alternate;
    }
    @keyframes poweroffStarTwinkle {
      0% { opacity: 0.25; transform: scale(0.85); }
      100% { opacity: 0.95; transform: scale(1.15); }
    }
    .poweroff-iris-stage {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      text-align: center;
      padding: 28px;
      transform: scale(1) translateY(0);
      opacity: 1;
      transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .shutdown-poweroff-cinema.phase-stage-exit .poweroff-iris-stage,
    .shutdown-poweroff-cinema.phase-horizon-collapse .poweroff-iris-stage,
    .shutdown-poweroff-cinema.phase-fadeout .poweroff-iris-stage {
      transform: scale(0.9) translateY(8px);
      opacity: 0 !important;
      pointer-events: none;
    }
    .poweroff-ring-emblem {
      position: relative;
      width: 108px;
      height: 108px;
      border-radius: 9999px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(circle at 35% 30%, rgba(129, 140, 248, 0.22), rgba(15, 23, 42, 0.92));
      border: 1px solid rgba(165, 180, 252, 0.26);
      color: #e0e7ff;
      box-shadow: 0 0 42px rgba(99, 102, 241, 0.36);
      animation: poweroffEmblemBreathe 2.2s ease-in-out infinite;
    }
    .poweroff-eclipse-svg {
      position: absolute;
      inset: -4px;
      width: calc(100% + 8px);
      height: calc(100% + 8px);
      transform: rotate(-90deg);
      pointer-events: none;
    }
    .poweroff-eclipse-track {
      fill: none;
      stroke: rgba(165, 180, 252, 0.14);
      stroke-width: 2.2;
    }
    .poweroff-eclipse-arc {
      fill: none;
      stroke: url(#poweroffGrad);
      stroke-width: 2.4;
      stroke-linecap: round;
      stroke-dasharray: 289.03;
      stroke-dashoffset: 289.03;
    }
    .shutdown-poweroff-cinema.open .poweroff-eclipse-arc {
      animation: eclipseRingSweep 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    @keyframes eclipseRingSweep {
      0% { stroke-dashoffset: 289.03; opacity: 0.35; }
      75% { stroke-dashoffset: 0; opacity: 1; }
      100% { stroke-dashoffset: 0; opacity: 0.85; }
    }
    #poweroff-cinema-title,
    #poweroff-cinema-sub {
      transition: opacity 0.22s ease, transform 0.22s ease;
    }
    #poweroff-cinema-title.text-swapping {
      opacity: 0;
      transform: translateY(-4px);
    }
    .poweroff-lock-phone-cue {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-top: 6px;
      padding: 8px 16px;
      border-radius: 9999px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(199, 210, 254, 0.22);
      font-family: var(--font-mono);
      font-size: 11.5px;
      font-weight: 600;
      color: rgba(226, 232, 240, 0.92);
      letter-spacing: 0.02em;
      opacity: 0;
      transform: translateY(10px) scale(0.96);
      transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1), transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .shutdown-poweroff-cinema.phase-rest-cue .poweroff-lock-phone-cue {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    .shutdown-poweroff-cinema.phase-stage-exit .poweroff-lock-phone-cue,
    .shutdown-poweroff-cinema.phase-horizon-collapse .poweroff-lock-phone-cue {
      opacity: 0 !important;
      transform: translateY(6px) scale(0.94);
    }
    .poweroff-horizon-line {
      position: absolute;
      left: 6%;
      right: 6%;
      top: 50%;
      height: 2px;
      border-radius: 9999px;
      background: linear-gradient(90deg, transparent 2%, rgba(129, 140, 248, 0.88) 26%, #ffffff 50%, rgba(13, 148, 136, 0.88) 74%, transparent 98%);
      box-shadow: 0 0 28px rgba(129, 140, 248, 0.9), 0 0 10px rgba(255, 255, 255, 0.85);
      transform: scaleX(0);
      opacity: 0;
      z-index: 3;
      pointer-events: none;
    }
    .shutdown-poweroff-cinema.phase-horizon-collapse .poweroff-horizon-line {
      animation: poweroffHorizonCollapse 0.54s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    @keyframes poweroffHorizonCollapse {
      0% { transform: scaleX(0.96) scaleY(1); opacity: 0; }
      20% { transform: scaleX(1) scaleY(1.8); opacity: 1; }
      68% { transform: scaleX(0.38) scaleY(1); opacity: 0.92; }
      100% { transform: scaleX(0) scaleY(0.35); opacity: 0; }
    }
    @keyframes poweroffEmblemBreathe {
      0%, 100% { transform: scale(0.97) translateZ(0); opacity: 0.86; }
      50% { transform: scale(1.03) translateZ(0); opacity: 1; }
    }

    /* ======================================================================
       CINEMATIC DAY IGNITION / SUNRISE OVERLAY
       ====================================================================== */
    .day-ignition-cinema {
      position: fixed;
      inset: 0;
      z-index: 100055;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background:
        radial-gradient(120% 90% at 50% 100%, rgba(245, 158, 11, 0.42) 0%, rgba(13, 148, 136, 0.28) 42%, rgba(8, 11, 18, 0.96) 85%),
        #070a12;
      color: #ffffff;
      overflow: hidden;
      pointer-events: auto;
      opacity: 0;
      transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .day-ignition-cinema.open {
      display: flex !important;
      opacity: 1 !important;
    }
    .day-ignition-cinema.dissolving {
      opacity: 0 !important;
      transform: scale(1.06);
      pointer-events: none !important;
    }
    .day-ignition-stage {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      text-align: center;
      padding: 24px;
      opacity: 0;
      transform: translateY(22px) scale(0.94);
      transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s ease;
    }
    .day-ignition-cinema.stage-rise .day-ignition-stage {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    .day-ignition-sun-orb {
      width: 88px;
      height: 88px;
      border-radius: 9999px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(circle at 50% 40%, rgba(251, 191, 36, 0.36), rgba(13, 148, 136, 0.22));
      border: 1.5px solid rgba(251, 191, 36, 0.65);
      color: #fde68a;
      box-shadow:
        0 0 56px rgba(245, 158, 11, 0.52),
        0 0 96px rgba(13, 148, 136, 0.35);
      animation: ignitionOrbPulse 1.5s ease-in-out infinite;
    }
    .day-ignition-title {
      font-family: var(--font-display);
      font-size: clamp(24px, 5.5vw, 32px);
      font-weight: 800;
      letter-spacing: -0.025em;
    }
    .day-ignition-sub {
      font-size: 13.5px;
      color: rgba(254, 243, 199, 0.82);
    }
    @keyframes ignitionOrbPulse {
      0%, 100% { transform: scale(0.96) translateZ(0); opacity: 0.84; }
      50% { transform: scale(1.06) translateZ(0); opacity: 1; }
    }
    .day-ignition-horizon-glow {
      position: absolute;
      left: -10%;
      right: -10%;
      bottom: -18%;
      height: 55%;
      border-radius: 50% 50% 0 0;
      background: radial-gradient(ellipse at 50% 100%, rgba(251, 191, 36, 0.42), rgba(13, 148, 136, 0.16) 55%, transparent 78%);
      filter: blur(20px);
      pointer-events: none;
      opacity: 0.25;
      transform: translateY(35%) scaleY(0.7);
      transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.75s ease;
    }
    .day-ignition-cinema.stage-rise .day-ignition-horizon-glow {
      opacity: 1;
      transform: translateY(0) scaleY(1);
    }

    /* Persistent Full-Screen #000000 OLED Sleep Overlay */
    .sleep-shutdown-overlay {
      position: fixed;
      inset: 0;
      z-index: 100030;
      background: #000000 !important;
      color: #FFFFFF !important;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 28px 24px;
      text-align: center;
      opacity: 0;
      transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
      pointer-events: auto;
    }
    .sleep-shutdown-overlay.open,
    body.light-mode .sleep-shutdown-overlay.open,
    body.dark-mode .sleep-shutdown-overlay.open,
    html.dark .sleep-shutdown-overlay.open,
    [data-theme="dark"] .sleep-shutdown-overlay.open,
    [data-theme="light"] .sleep-shutdown-overlay.open {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }
    .sleep-shutdown-overlay.fading-out,
    body.light-mode .sleep-shutdown-overlay.fading-out,
    body.dark-mode .sleep-shutdown-overlay.fading-out,
    html.dark .sleep-shutdown-overlay.fading-out {
      opacity: 0 !important;
      pointer-events: none !important;
    }
    .sleep-moon-emblem {
      width: 60px;
      height: 60px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(129, 140, 248, 0.08);
      border: 1px solid rgba(129, 140, 248, 0.22);
      color: rgba(199, 210, 254, 0.85);
      margin-bottom: 16px;
      animation: ritualMoonPulse 4s ease-in-out infinite;
    }
    .sleep-live-clock {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: clamp(44px, 11vw, 60px);
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 1;
      color: rgba(255, 255, 255, 0.86);
      margin-bottom: 10px;
    }
    .sleep-shutdown-title {
      font-family: var(--font-display);
      font-size: clamp(18px, 4vw, 24px);
      font-weight: 700;
      letter-spacing: -0.02em;
      color: rgba(255, 255, 255, 0.88);
      text-wrap: balance;
      margin: 0;
    }
    .sleep-shutdown-meta {
      margin-top: 8px;
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: 12.5px;
      color: rgba(255, 255, 255, 0.5);
    }
    .sleep-lock-hint {
      margin-top: 14px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 13px;
      border-radius: 9999px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      font-family: var(--font-mono);
      font-size: 11px;
      color: rgba(255, 255, 255, 0.46);
    }
    .sleep-actions-row {
      margin-top: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .sleep-wake-btn {
      min-height: 44px;
      padding: 10px 20px;
      border-radius: 9999px;
      background: rgba(13, 148, 136, 0.22);
      border: 1px solid rgba(45, 212, 191, 0.36);
      color: #99f6e4;
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.18s ease, background 0.18s ease;
    }
    .sleep-reopen-btn {
      min-height: 44px;
      padding: 10px 20px;
      border-radius: 9999px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: rgba(255, 255, 255, 0.78);
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.18s ease, background 0.18s ease;
    }
    .sleep-wake-btn:active,
    .sleep-reopen-btn:active {
      transform: scale(0.96);
    }

    /* Morning Alarm UI (Modern Full-Screen Glassmorphism) */
    .morning-alarm-overlay {
      position: fixed;
      inset: 0;
      z-index: 100050;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background:
        radial-gradient(circle at 20% 15%, rgba(251, 191, 36, 0.32), transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(13, 148, 136, 0.28), transparent 55%),
        rgba(9, 11, 16, 0.88);
      opacity: 0;
      transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .morning-alarm-overlay.open,
    body.light-mode .morning-alarm-overlay.open,
    body.dark-mode .morning-alarm-overlay.open,
    html.dark .morning-alarm-overlay.open {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }
    .morning-alarm-glass {
      width: min(100%, 400px);
      padding: 30px 24px;
      border-radius: 30px;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.24);
      box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45);
      color: #FFFFFF;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    .morning-alarm-clock {
      font-family: var(--font-mono);
      font-variant-numeric: tabular-nums;
      font-size: clamp(46px, 12vw, 62px);
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 1;
    }
    .morning-alarm-actions {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 10px;
    }
    .morning-alarm-snooze {
      min-height: 50px;
      padding: 12px 18px;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.14);
      border: 1px solid rgba(255, 255, 255, 0.26);
      color: #FFFFFF;
      font-family: var(--font-display);
      font-size: 14.5px;
      font-weight: 700;
      cursor: pointer;
    }
    .morning-alarm-turnoff {
      min-height: 50px;
      padding: 12px 18px;
      border-radius: 18px;
      background: #0D9488;
      border: none;
      color: #FFFFFF;
      font-family: var(--font-display);
      font-size: 14.5px;
      font-weight: 800;
      box-shadow: 0 12px 28px rgba(13, 148, 136, 0.4);
      cursor: pointer;
    }
    .morning-alarm-snooze:active,
    .morning-alarm-turnoff:active {
      transform: scale(0.96);
    }

    /* Good Morning Plan & Reorder Gate Overlay */
    .good-morning-overlay {
      position: fixed;
      inset: 0;
      z-index: 99940;
      display: none;
      flex-direction: column;
      background: var(--bg-canvas, #F7F6F2);
      color: var(--text-primary, #171614);
      opacity: 0;
      transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    }
    body.dark-mode .good-morning-overlay,
    html.dark .good-morning-overlay,
    [data-theme="dark"] .good-morning-overlay {
      background: #090a0d;
      color: #f4f4f5;
    }
    .good-morning-overlay.open,
    body.light-mode .good-morning-overlay.open,
    body.dark-mode .good-morning-overlay.open,
    html.dark .good-morning-overlay.open {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }
    .good-morning-inner {
      width: 100%;
      max-width: 680px;
      margin: 0 auto;
      height: 100%;
      display: flex;
      flex-direction: column;
      padding: max(20px, env(safe-area-inset-top, 20px)) 20px max(20px, env(safe-area-inset-bottom, 20px));
      gap: 14px;
      box-sizing: border-box;
    }
    .good-morning-list {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      gap: 0;
      padding: 4px 2px 24px;
      position: relative;
      touch-action: pan-y !important;
      -webkit-overflow-scrolling: touch;
    }
    .good-morning-task-row {
      padding: 12px 14px;
      border-radius: 20px;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      align-items: center;
      gap: 10px;
      transition: transform 0.16s ease, border-color 0.16s ease;
    }
    .good-morning-task-row.dragging {
      opacity: 0.5;
      border-color: var(--accent-primary, #0D9488);
    }
    .gm-drag-handle {
      color: var(--text-muted);
      cursor: grab;
      min-width: 28px;
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      user-select: none;
    }
    .gm-move-controls {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }
    .gm-move-btn {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: var(--bg-elevated, #F1F5F9);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      color: var(--text-primary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .gm-move-btn:disabled {
      opacity: 0.32;
      cursor: default;
    }
    .gm-move-btn:not(:disabled):active {
      transform: scale(0.92);
    }
    body.ritual-lockdown-active .v-tip-balloon,
    body.ritual-lockdown-active .feature-micro-balloon {
      display: none !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }

    /* ==========================================================================
       FULL-SCREEN OLED FOCUS CLOCK (TRUE #000000 TABLE CLOCK — THEME-INDEPENDENT)
       ========================================================================== */
    #oled-focus-clock-modal,
    body.light-mode #oled-focus-clock-modal,
    body.dark-mode #oled-focus-clock-modal,
    html.dark #oled-focus-clock-modal,
    html.light #oled-focus-clock-modal,
    [data-theme="light"] #oled-focus-clock-modal,
    [data-theme="dark"] #oled-focus-clock-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      inset: 0;
      width: 100vw;
      height: 100vh;
      height: 100dvh;
      z-index: 99999;
      background: #000000 !important;
      background-color: #000000 !important;
      color: #FFFFFF !important;
      display: none;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      overflow: hidden;
      user-select: none;
      -webkit-user-select: none;
      -webkit-tap-highlight-color: transparent;
      touch-action: pan-y;
      cursor: pointer;
      box-sizing: border-box;
      padding: max(16px, env(safe-area-inset-top, 16px)) max(16px, env(safe-area-inset-right, 16px)) max(20px, env(safe-area-inset-bottom, 20px)) max(16px, env(safe-area-inset-left, 16px));
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }

    #oled-focus-clock-modal.oled-clock-open,
    body.light-mode #oled-focus-clock-modal.oled-clock-open,
    body.dark-mode #oled-focus-clock-modal.oled-clock-open,
    html.dark #oled-focus-clock-modal.oled-clock-open,
    html.light #oled-focus-clock-modal.oled-clock-open,
    [data-theme="light"] #oled-focus-clock-modal.oled-clock-open,
    [data-theme="dark"] #oled-focus-clock-modal.oled-clock-open {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }

    /* Entrance & Exit Choreography Keyframes */
    @keyframes oledTopbarEnter {
      0%   { opacity: 0; transform: translate3d(0, -18px, 0) scale(0.96); }
      100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    }

    @keyframes oledStageEnter {
      0% { opacity: 0; transform: scale(0.92) translateZ(0); }
      100% { opacity: 1; transform: scale(1) translateZ(0); }
    }

    @keyframes oledBottombarEnter {
      0%   { opacity: 0; transform: translate3d(0, 18px, 0); }
      100% { opacity: 1; transform: translate3d(0, 0, 0); }
    }

    @keyframes oledSlideInFromRight {
      0%   { opacity: 0; transform: translate3d(42px, 0, 0) scale(0.97); }
      100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    }

    @keyframes oledSlideInFromLeft {
      0%   { opacity: 0; transform: translate3d(-42px, 0, 0) scale(0.97); }
      100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    }

    #oled-focus-clock-modal.oled-clock-entering .oled-clock-topbar {
      animation: oledTopbarEnter 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    #oled-focus-clock-modal.oled-clock-entering .oled-stage-transition-box {
      animation: oledStageEnter 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    #oled-focus-clock-modal.oled-clock-entering .oled-clock-bottombar {
      animation: oledBottombarEnter 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
    }

    #oled-focus-clock-modal.oled-clock-closing .oled-clock-topbar {
      opacity: 0 !important;
      transform: translate3d(0, -14px, 0) scale(0.96) !important;
      transition: opacity 0.22s ease, transform 0.22s ease !important;
    }

    #oled-focus-clock-modal.oled-clock-closing .oled-stage-transition-box {
      opacity: 0 !important;
      transform: scale(0.93) !important;
      transition: opacity 0.22s ease, transform 0.22s ease !important;
    }

    #oled-focus-clock-modal.oled-clock-closing .oled-clock-bottombar {
      opacity: 0 !important;
      transform: translate3d(0, 14px, 0) !important;
      transition: opacity 0.22s ease, transform 0.22s ease !important;
    }

    .oled-stage-transition-box.oled-anim-slide-right,
    .oled-mode-controls.active.oled-anim-slide-right {
      animation: oledSlideInFromRight 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .oled-stage-transition-box.oled-anim-slide-left,
    .oled-mode-controls.active.oled-anim-slide-left {
      animation: oledSlideInFromLeft 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    /* Top Navigation Bar: 3-Column Symmetrical Grid (Left Spacer | Centered Toggle | Right X Button) */
    .oled-clock-topbar {
      position: relative;
      width: 100%;
      max-width: 460px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) 36px;
      align-items: center;
      justify-items: center;
      gap: 8px;
      box-sizing: border-box;
      z-index: 6;
      transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .oled-clock-spacer {
      width: 36px;
      height: 36px;
      flex-shrink: 0;
    }

    /* Segmented Toggle: Left = Stopwatch (0) | Center = Clock (1) | Right = Timer (2) */
    .oled-clock-tabs {
      --oled-tab-idx: 1;
      position: relative;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      align-items: center;
      width: 100%;
      max-width: 264px;
      padding: 3px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.07) !important;
      border: 1px solid rgba(255, 255, 255, 0.13) !important;
      box-sizing: border-box;
      overflow: hidden;
    }

    .oled-tab-glider {
      position: absolute;
      top: 3px;
      bottom: 3px;
      left: 3px;
      width: calc((100% - 6px) / 3);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.18) !important;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
      transform: translate3d(calc(var(--oled-tab-idx, 1) * 100%), 0, 0);
      transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
      pointer-events: none;
      z-index: 1;
    }

    .oled-clock-tab {
      position: relative;
      z-index: 2;
      appearance: none;
      -webkit-appearance: none;
      border: none;
      background: transparent !important;
      color: rgba(255, 255, 255, 0.52) !important;
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 7px 4px;
      border-radius: 999px;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: pointer;
      transition: color 0.22s ease, transform 0.16s ease;
    }

    .oled-clock-tab:hover {
      color: rgba(255, 255, 255, 0.85) !important;
    }

    .oled-clock-tab.active {
      color: #FFFFFF !important;
      font-weight: 700;
    }

    .oled-clock-close-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.16) !important;
      background: rgba(255, 255, 255, 0.07) !important;
      color: rgba(255, 255, 255, 0.82) !important;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      justify-self: end;
      cursor: pointer;
      flex-shrink: 0;
      padding: 0;
      transition: background 0.2s ease, color 0.2s ease, transform 0.16s ease, border-color 0.2s ease;
    }

    .oled-clock-close-btn:hover {
      background: rgba(255, 255, 255, 0.16) !important;
      border-color: rgba(255, 255, 255, 0.32) !important;
      color: #FFFFFF !important;
    }

    .oled-clock-close-btn:active,
    .oled-clock-tab:active,
    .oled-ctrl-btn:active,
    .oled-preset-chip:active {
      transform: scale(0.94);
    }

    /* Dead-Center Clock Stage & 120s Figure-Eight OLED Burn-In Drift */
    .oled-clock-stage {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      inset: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      pointer-events: none;
      overflow: visible;
      padding: 0 16px;
      box-sizing: border-box;
      z-index: 2;
    }

    .oled-stage-transition-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
    }

    @keyframes oledBurnInDrift {
      0%   { transform: translate3d(0px, 0px, 0); }
      12.5%{ transform: translate3d(10px, -9px, 0); }
      25%  { transform: translate3d(14px, 0px, 0); }
      37.5%{ transform: translate3d(10px, 9px, 0); }
      50%  { transform: translate3d(0px, 0px, 0); }
      62.5%{ transform: translate3d(-10px, -9px, 0); }
      75%  { transform: translate3d(-14px, 0px, 0); }
      87.5%{ transform: translate3d(-10px, 9px, 0); }
      100% { transform: translate3d(0px, 0px, 0); }
    }

    .oled-drift-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      will-change: transform;
      animation: oledBurnInDrift 120s linear infinite !important;
    }

    .oled-time-row {
      display: inline-flex;
      align-items: baseline;
      justify-content: center;
      max-width: 96vw;
      margin: 0 auto;
    }

    .oled-giant-digits {
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif !important;
      font-weight: 300 !important;
      font-variant-numeric: tabular-nums !important;
      font-feature-settings: "tnum" 1, "zero" 0 !important;
      color: #FFFFFF !important;
      line-height: 0.94;
      letter-spacing: -0.04em;
      white-space: nowrap;
      text-align: center;
      margin: 0;
      padding: 0;
      /* Slightly larger fluid scaling for 5-char HH:MM (Clock) and MM:SS (Stopwatch/Timer) */
      font-size: clamp(5.4rem, 26.8vw, 18rem);
      transition: font-size 0.24s ease, transform 0.24s ease;
    }

    /* Scaling when displaying 8-char HH:MM:SS (Stopwatch/Timer >= 1 hour) */
    .oled-giant-digits[data-char-mode="long"] {
      font-size: clamp(3.65rem, 17.8vw, 13rem);
    }

    /* Landscape orientation: maximize table-clock presence while respecting vertical height */
    @media (orientation: landscape) {
      .oled-giant-digits {
        font-size: clamp(6rem, min(26.5vw, 56dvh), 20.5rem);
      }
      .oled-giant-digits[data-char-mode="long"] {
        font-size: clamp(4.4rem, min(19vw, 48dvh), 15rem);
      }
    }

    .oled-meta-row {
      margin-top: clamp(12px, 2.2dvh, 22px);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .oled-ampm-badge {
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
      font-weight: 400 !important;
      font-variant-numeric: tabular-nums !important;
      font-size: clamp(1.15rem, 3.8vw, 2.5rem);
      letter-spacing: 0.06em;
      color: rgba(255, 255, 255, 0.65) !important;
      margin-left: clamp(8px, 1.8vw, 18px);
      max-width: 120px;
      white-space: nowrap;
      text-transform: uppercase;
      user-select: none;
      transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                  max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                  margin-left 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                  transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .oled-submeta-label {
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-weight: 400;
      font-variant-numeric: tabular-nums;
      font-size: clamp(0.8rem, 2.1vw, 1.05rem);
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.45) !important;
      transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* Bottom Controls Dock (Centered Stopwatch / Timer controls + Swipe/Zen hint) */
    .oled-clock-bottombar {
      position: relative;
      width: 100%;
      max-width: 420px;
      margin: 0 auto;
      min-height: 44px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      z-index: 6;
      box-sizing: border-box;
      transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .oled-mode-controls {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      width: 100%;
    }

    .oled-mode-controls.active {
      display: flex;
    }

    .oled-btn-row {
      display: grid;
      grid-template-columns: repeat(2, 126px);
      align-items: center;
      justify-content: center;
      gap: 12px;
      width: 100%;
      margin: 0 auto;
    }

    .oled-ctrl-btn {
      appearance: none;
      -webkit-appearance: none;
      border: 1px solid rgba(255, 255, 255, 0.22) !important;
      background: rgba(255, 255, 255, 0.08) !important;
      color: #FFFFFF !important;
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 13.5px;
      font-weight: 600;
      letter-spacing: 0.02em;
      padding: 10px 18px;
      border-radius: 999px;
      cursor: pointer;
      width: 100%;
      text-align: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .oled-ctrl-btn.primary {
      background: #FFFFFF !important;
      color: #000000 !important;
      border-color: #FFFFFF !important;
      font-weight: 700;
    }

    .oled-ctrl-btn:hover {
      border-color: rgba(255, 255, 255, 0.45) !important;
    }

    .oled-preset-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      flex-wrap: wrap;
      width: 100%;
      max-width: 360px;
      margin: 0 auto;
    }

    .oled-preset-chip {
      appearance: none;
      -webkit-appearance: none;
      border: 1px solid rgba(255, 255, 255, 0.15) !important;
      background: rgba(255, 255, 255, 0.05) !important;
      color: rgba(255, 255, 255, 0.72) !important;
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-variant-numeric: tabular-nums;
      font-size: 11.5px;
      font-weight: 600;
      padding: 6px 11px;
      border-radius: 999px;
      cursor: pointer;
      text-align: center;
      transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    }

    .oled-preset-chip:hover,
    .oled-preset-chip.active {
      background: rgba(255, 255, 255, 0.18) !important;
      color: #FFFFFF !important;
      border-color: rgba(255, 255, 255, 0.38) !important;
    }

    .oled-zen-hint {
      font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 10.5px;
      font-weight: 500;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      text-align: center;
      color: rgba(255, 255, 255, 0.28) !important;
      pointer-events: none;
    }

    /* Tap-to-Zen State: Fades out all tabs, buttons, AM/PM, and metadata, leaving ONLY the centered drifting numbers */
    #oled-focus-clock-modal.zen-mode .oled-clock-topbar {
      opacity: 0 !important;
      pointer-events: none !important;
      transform: translate3d(0, -12px, 0);
    }

    #oled-focus-clock-modal.zen-mode .oled-clock-bottombar,
    #oled-focus-clock-modal.zen-mode .oled-submeta-label {
      opacity: 0 !important;
      pointer-events: none !important;
      transform: translate3d(0, 12px, 0);
    }

    #oled-focus-clock-modal.zen-mode .oled-ampm-badge {
      opacity: 0 !important;
      max-width: 0 !important;
      margin-left: 0 !important;
      padding: 0 !important;
      overflow: hidden !important;
      pointer-events: none !important;
      transform: translate3d(8px, 0, 0);
    }

    /* Subtle visual pulse when Timer finishes */
    @keyframes oledTimerFinishPulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.3; transform: scale(0.985); }
    }

    #oled-focus-clock-modal.timer-finished .oled-giant-digits {
      animation: oledTimerFinishPulse 1.1s ease-in-out infinite;
    }
    #oled-focus-clock-modal #btn-oled-timer-toggle.alarm-ringing-btn {
      background: #fbbf24 !important;
      color: #090a0d !important;
      border-color: #fbbf24 !important;
      box-shadow: 0 0 26px rgba(251, 191, 36, 0.42) !important;
    }

    /* ==========================================================================
       PHONE USAGE & DIGITAL WELLBEING — MINIMALISTIC GLASSMORPHISM SUITE
       ========================================================================== */
    #more-phone-usage-view {
      padding-bottom: 96px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-width: 100%;
      overflow-x: hidden;
      box-sizing: border-box;
    }
    .dw-glass-card {
      position: relative;
      background: linear-gradient(155deg, rgba(22, 26, 40, 0.92) 0%, rgba(14, 17, 28, 0.95) 100%);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 20px;
      padding: 14px;
      box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.42);
      overflow: hidden;
      min-width: 0;
      max-width: 100%;
    }
    html[data-theme="light"] .dw-glass-card {
      background: linear-gradient(155deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 248, 252, 0.94) 100%);
      border-color: rgba(15, 23, 42, 0.11);
      box-shadow: 0 10px 26px -12px rgba(15, 23, 42, 0.10);
    }
    .dw-top-bar {
      position: relative;
      z-index: 30;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 2px 0;
    }
    .dw-three-dot-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }
    .dw-three-dot-btn {
      width: 36px;
      height: 36px;
      padding: 0;
      border-radius: 11px;
    }
    .dw-three-dot-menu {
      position: absolute;
      top: calc(100% + 7px);
      right: 0;
      min-width: 236px;
      padding: 7px;
      border-radius: 16px;
      background: linear-gradient(155deg, rgba(24, 29, 45, 0.98) 0%, rgba(15, 19, 31, 0.99) 100%);
      border: 1px solid rgba(255, 255, 255, 0.15);
      box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.65);
      display: none;
      flex-direction: column;
      gap: 3px;
      z-index: 120;
    }
    .dw-three-dot-menu.open {
      display: flex;
    }
    html[data-theme="light"] .dw-three-dot-menu {
      background: rgba(255, 255, 255, 0.98);
      border-color: rgba(15, 23, 42, 0.12);
      box-shadow: 0 18px 40px -10px rgba(15, 23, 42, 0.20);
    }
    .dw-menu-item {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 10px;
      border: none;
      background: transparent;
      color: var(--text-primary);
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 700;
      text-align: left;
      cursor: pointer;
      transition: background 0.14s ease;
    }
    .dw-menu-item:hover {
      background: rgba(255, 255, 255, 0.08);
    }
    html[data-theme="light"] .dw-menu-item:hover {
      background: rgba(15, 23, 42, 0.06);
    }
    .dw-menu-divider {
      height: 1px;
      background: rgba(255, 255, 255, 0.09);
      margin: 4px 6px;
    }
    html[data-theme="light"] .dw-menu-divider {
      background: rgba(15, 23, 42, 0.09);
    }
    .dw-menu-toggle {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 8px 10px;
      border-radius: 10px;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 700;
      color: var(--text-primary);
      cursor: pointer;
      user-select: none;
    }
    .dw-menu-toggle:hover {
      background: rgba(255, 255, 255, 0.06);
    }
    html[data-theme="light"] .dw-menu-toggle:hover {
      background: rgba(15, 23, 42, 0.05);
    }
    .dw-glass-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      min-height: 34px;
      padding: 6px 11px;
      border-radius: 11px;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 700;
      color: var(--text-primary);
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.13);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
    }
    html[data-theme="light"] .dw-glass-btn {
      background: rgba(241, 245, 249, 0.92);
      border-color: rgba(15, 23, 42, 0.12);
    }
    .dw-glass-btn:active {
      transform: scale(0.97);
    }
    .dw-glass-btn.primary {
      background: rgba(139, 92, 246, 0.22);
      border-color: rgba(139, 92, 246, 0.48);
      color: #C4B5FD;
    }
    html[data-theme="light"] .dw-glass-btn.primary {
      background: rgba(139, 92, 246, 0.15);
      border-color: rgba(109, 40, 217, 0.35);
      color: #6D28D9;
    }
    .dw-glass-btn.danger {
      background: rgba(244, 63, 94, 0.18);
      border-color: rgba(244, 63, 94, 0.45);
      color: #FDA4AF;
    }
    html[data-theme="light"] .dw-glass-btn.danger {
      background: rgba(244, 63, 94, 0.12);
      color: #E11D48;
    }
    .dw-control-strip {
      position: relative;
      z-index: 25;
      overflow: visible;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
      padding: 6px;
      border-radius: 15px;
      background: rgba(20, 24, 38, 0.88);
      border: 1px solid rgba(255, 255, 255, 0.11);
    }
    html[data-theme="light"] .dw-control-strip {
      background: rgba(255, 255, 255, 0.92);
      border-color: rgba(15, 23, 42, 0.10);
    }
    .dw-pill-group {
      display: inline-flex;
      align-items: center;
      background: rgba(0, 0, 0, 0.28);
      border-radius: 11px;
      padding: 3px;
      gap: 2px;
      max-width: 100%;
    }
    html[data-theme="light"] .dw-pill-group {
      background: rgba(15, 23, 42, 0.06);
    }
    .dw-pill-btn {
      padding: 5px 10px;
      border-radius: 8px;
      font-family: var(--font-display);
      font-size: 11px;
      font-weight: 700;
      color: var(--text-secondary);
      background: transparent;
      border: none;
      cursor: pointer;
      white-space: nowrap;
      transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
    }
    .dw-pill-btn.active {
      background: rgba(255, 255, 255, 0.16);
      color: var(--text-primary);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    }
    html[data-theme="light"] .dw-pill-btn.active {
      background: #FFFFFF;
      color: #0F172A;
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.10);
    }
    .dw-vdrop {
      position: relative;
      display: inline-flex;
      flex-direction: column;
      background: rgba(0, 0, 0, 0.28);
      border-radius: 11px;
      padding: 3px;
      z-index: 40;
    }
    html[data-theme="light"] .dw-vdrop {
      background: rgba(15, 23, 42, 0.06);
    }
    .dw-vdrop-trigger {
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      min-width: 72px;
    }
    .dw-vdrop-trigger svg {
      transition: transform 0.18s ease;
      flex-shrink: 0;
    }
    .dw-vdrop.expanded .dw-vdrop-trigger svg {
      transform: rotate(180deg);
    }
    .dw-vdrop-trigger.single-option {
      cursor: default;
    }
    .dw-vdrop-trigger.single-option svg {
      display: none;
    }
    .dw-vdrop-menu {
      position: absolute;
      top: calc(100% + 5px);
      min-width: 112px;
      padding: 5px;
      border-radius: 13px;
      background: linear-gradient(155deg, rgba(24, 29, 45, 0.98) 0%, rgba(15, 19, 31, 0.99) 100%);
      border: 1px solid rgba(255, 255, 255, 0.15);
      box-shadow: 0 18px 36px -10px rgba(0, 0, 0, 0.65);
      display: none;
      flex-direction: column;
      gap: 3px;
      z-index: 110;
    }
    .dw-vdrop-menu.align-left { left: 0; }
    .dw-vdrop-menu.align-right { right: 0; }
    html[data-theme="light"] .dw-vdrop-menu {
      background: rgba(255, 255, 255, 0.98);
      border-color: rgba(15, 23, 42, 0.12);
      box-shadow: 0 16px 32px -10px rgba(15, 23, 42, 0.18);
    }
    .dw-vdrop.expanded .dw-vdrop-menu {
      display: flex;
    }
    .dw-vdrop-menu .dw-pill-btn {
      width: 100%;
      text-align: left;
      padding: 7px 10px;
    }
    .dw-vdrop-menu .dw-pill-btn.active {
      background: rgba(139, 92, 246, 0.28);
      color: #DDD6FE;
    }
    html[data-theme="light"] .dw-vdrop-menu .dw-pill-btn.active {
      background: rgba(139, 92, 246, 0.16);
      color: #6D28D9;
    }
    .dw-mgr-cat-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 8px;
      border-radius: 9px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.11);
      color: var(--text-primary);
    }
    html[data-theme="light"] .dw-mgr-cat-chip {
      background: rgba(241, 245, 249, 0.92);
      border-color: rgba(15, 23, 42, 0.10);
    }
    .dw-mgr-cat-del {
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 700;
      line-height: 1;
      padding: 0 2px;
      cursor: pointer;
    }
    .dw-mgr-cat-del:hover {
      color: #F43F5E;
    }
    .dw-charts-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      align-items: stretch;
    }
    @media (max-width: 520px) {
      .dw-charts-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .dw-charts-grid > .dw-glass-card {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    .dw-hero-summary-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      padding-bottom: 12px;
      margin-bottom: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    }
    html[data-theme="light"] .dw-hero-summary-row {
      border-bottom-color: rgba(15, 23, 42, 0.08);
    }
    .dw-kpi-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    @media (min-width: 640px) {
      .dw-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }
    .dw-kpi-tile {
      background: rgba(255, 255, 255, 0.055);
      border: 1px solid rgba(255, 255, 255, 0.09);
      border-radius: 14px;
      padding: 10px 11px;
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }
    html[data-theme="light"] .dw-kpi-tile {
      background: rgba(241, 245, 249, 0.85);
      border-color: rgba(15, 23, 42, 0.08);
    }
    .dw-kpi-label {
      font-size: 10.5px;
      font-weight: 600;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dw-kpi-value {
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 800;
      color: var(--text-primary);
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dw-kpi-meta {
      font-size: 10.5px;
      font-weight: 600;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dw-kpi-meta.good { color: #10B981; }
    .dw-kpi-meta.bad { color: #F43F5E; }

    /* Goals & Strict Limit Trackers */
    .dw-goals-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    @media (max-width: 560px) {
      .dw-goals-grid {
        grid-template-columns: minmax(0, 1fr);
      }
      .dw-hero-summary-row {
        align-items: flex-start;
      }
    }
    .dw-connect-actions-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 10px;
    }
    @media (max-width: 360px) {
      .dw-connect-actions-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .dw-web-status-banner {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 9px 12px;
      border-radius: 13px;
      background: rgba(139, 92, 246, 0.09);
      border: 1px solid rgba(139, 92, 246, 0.24);
      font-size: 11.5px;
      line-height: 1.4;
      font-weight: 500;
      color: var(--text-secondary);
    }
    html[data-theme="light"] .dw-web-status-banner {
      background: rgba(139, 92, 246, 0.07);
      border-color: rgba(139, 92, 246, 0.22);
      color: #475569;
    }
    .dw-web-status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--accent-primary, #8B5CF6);
      box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
      flex-shrink: 0;
    }
    .dw-web-status-text {
      min-width: 0;
      flex: 1;
    }
    .dw-goal-box {
      background: rgba(255, 255, 255, 0.055);
      border: 1px solid rgba(255, 255, 255, 0.09);
      border-radius: 14px;
      padding: 11px 12px;
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-width: 0;
    }
    html[data-theme="light"] .dw-goal-box {
      background: rgba(241, 245, 249, 0.88);
      border-color: rgba(15, 23, 42, 0.08);
    }
    .dw-goal-box.over-limit {
      border-color: rgba(244, 63, 94, 0.55);
      background: rgba(244, 63, 94, 0.10);
    }
    .dw-goal-track {
      height: 7px;
      width: 100%;
      border-radius: 99px;
      background: rgba(255, 255, 255, 0.09);
      overflow: hidden;
    }
    html[data-theme="light"] .dw-goal-track {
      background: rgba(15, 23, 42, 0.10);
    }
    .dw-goal-fill {
      height: 100%;
      border-radius: 99px;
      transition: width 0.25s ease, background 0.25s ease;
    }
    .dw-limit-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      padding: 10px 12px;
      border-radius: 13px;
      background: rgba(244, 63, 94, 0.16);
      border: 1px solid rgba(244, 63, 94, 0.42);
      color: #FECDD3;
      margin-bottom: 10px;
    }
    html[data-theme="light"] .dw-limit-banner {
      background: rgba(244, 63, 94, 0.10);
      color: #9F1239;
    }
    .dw-toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      padding-top: 10px;
      margin-top: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    html[data-theme="light"] .dw-toggle-row {
      border-top-color: rgba(15, 23, 42, 0.08);
    }
    .dw-switch-label {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
    }

    /* Category Time Dashboard Visual Bars */
    .dw-cat-bar-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .dw-cat-bar-row {
      width: 100%;
      text-align: left;
      background: rgba(255, 255, 255, 0.045);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 9px 11px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 6px;
      transition: border-color 0.15s ease, background 0.15s ease;
    }
    html[data-theme="light"] .dw-cat-bar-row {
      background: rgba(241, 245, 249, 0.85);
      border-color: rgba(15, 23, 42, 0.08);
    }
    .dw-cat-bar-row.active {
      border-color: rgba(139, 92, 246, 0.65);
      background: rgba(139, 92, 246, 0.14);
    }
    .dw-cat-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 10px;
      border-radius: 9px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.10);
      color: var(--text-secondary);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }
    html[data-theme="light"] .dw-cat-chip {
      background: rgba(241, 245, 249, 0.9);
      border-color: rgba(15, 23, 42, 0.10);
    }
    .dw-cat-chip.active {
      border-color: rgba(139, 92, 246, 0.60);
      color: var(--text-primary);
      background: rgba(139, 92, 246, 0.18);
    }

    /* App Rows (Minimalist Single-Line + Slim Proportional Usage Bar) */
    .dw-app-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 9px 6px;
      border-radius: 10px;
      background: transparent;
      border: none;
      border-bottom: 1px solid var(--border-subtle);
      transition: background 0.16s ease, opacity 0.16s ease;
      min-width: 0;
      cursor: pointer;
    }
    .dw-app-row:last-child {
      border-bottom: none;
    }
    .dw-app-row:hover {
      background: rgba(255, 255, 255, 0.045);
    }
    html[data-theme="light"] .dw-app-row:hover {
      background: rgba(15, 23, 42, 0.035);
    }
    .dw-app-row-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }
    .dw-app-usage-track {
      height: 3px;
      width: 100%;
      border-radius: 99px;
      background: var(--border-subtle);
      overflow: hidden;
    }
    .dw-app-usage-fill {
      height: 100%;
      border-radius: 99px;
      transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .dw-app-row.is-excluded {
      opacity: 0.55;
    }
    .dw-app-row.is-expanded {
      background: rgba(255, 255, 255, 0.045);
      border-bottom-color: transparent;
      padding: 10px 8px;
    }
    html[data-theme="light"] .dw-app-row.is-expanded {
      background: rgba(15, 23, 42, 0.035);
    }
    .dw-app-chevron {
      color: var(--text-muted);
      transition: transform 0.2s ease, color 0.16s ease;
      flex-shrink: 0;
    }
    .dw-app-row.is-expanded .dw-app-chevron {
      transform: rotate(180deg);
      color: var(--text-primary);
    }
    .dw-app-insights-panel {
      margin-top: 6px;
      padding-top: 8px;
      border-top: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 8px;
      cursor: default;
    }
    .dw-app-insights-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 11px;
      color: var(--text-muted);
      flex-wrap: wrap;
    }
    .dw-app-insights-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
    }
    @media (max-width: 420px) {
      .dw-app-insights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    .dw-app-stat-box {
      padding: 6px 8px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    html[data-theme="light"] .dw-app-stat-box {
      background: rgba(255, 255, 255, 0.72);
    }
    .dw-app-stat-lbl {
      font-size: 10px;
      font-weight: 600;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dw-app-stat-val {
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .dw-app-hourly-bars {
      display: flex;
      align-items: flex-end;
      gap: 2px;
      height: 24px;
      width: 100%;
    }
    .dw-app-hourly-bar {
      flex: 1;
      border-radius: 2px 2px 0 0;
      min-height: 2px;
    }
    .dw-app-hourly-axis {
      display: flex;
      justify-content: space-between;
      font-size: 9.5px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    .dw-apps-expand-btn {
      margin-top: 8px;
      width: 100%;
      padding: 8px 12px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
      background: transparent;
      color: var(--text-secondary);
      font-family: var(--font-sans, inherit);
      font-size: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
      transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    }
    .dw-apps-expand-btn:hover {
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-primary);
      border-color: var(--border-strong);
    }
    html[data-theme="light"] .dw-apps-expand-btn:hover {
      background: rgba(15, 23, 42, 0.04);
    }
    .dw-cat-select {
      padding: 5px 8px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(15, 19, 32, 0.85);
      color: var(--text-primary);
      border: 1px solid rgba(255, 255, 255, 0.14);
      outline: none;
      cursor: pointer;
      max-width: 140px;
    }
    html[data-theme="light"] .dw-cat-select {
      background: #FFFFFF;
      color: #0F172A;
      border-color: rgba(15, 23, 42, 0.14);
    }
    .dw-exclude-btn {
      padding: 5px 9px;
      min-height: 30px;
      border-radius: 9px;
      font-size: 11px;
      font-weight: 700;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-secondary);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .dw-exclude-btn.monitored {
      border-color: rgba(16, 185, 129, 0.38);
      color: #10B981;
    }
    .dw-exclude-btn.excluded {
      border-color: rgba(244, 63, 94, 0.38);
      color: #F43F5E;
    }

    /* Glassmorphic Accordions (Higher Opacity + Crisp Borders) */
    details.dw-glass-accordion {
      background: linear-gradient(155deg, rgba(22, 26, 40, 0.92) 0%, rgba(14, 17, 28, 0.95) 100%);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 18px;
      overflow: hidden;
    }
    html[data-theme="light"] details.dw-glass-accordion {
      background: linear-gradient(155deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 248, 252, 0.94) 100%);
      border-color: rgba(15, 23, 42, 0.11);
    }
    details.dw-glass-accordion > summary {
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 13px 15px;
      cursor: pointer;
      user-select: none;
    }
    details.dw-glass-accordion > summary::-webkit-details-marker {
      display: none;
    }
    .dw-acc-chevron {
      transition: transform 0.2s ease;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    details.dw-glass-accordion[open] .dw-acc-chevron {
      transform: rotate(180deg);
    }
    .dw-acc-body {
      padding: 13px 15px 15px;
      border-top: 1px solid rgba(255, 255, 255, 0.09);
    }
    html[data-theme="light"] .dw-acc-body {
      border-top-color: rgba(15, 23, 42, 0.08);
    }
    .dw-tip-item {
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.055);
      border: 1px solid rgba(255, 255, 255, 0.09);
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    html[data-theme="light"] .dw-tip-item {
      background: rgba(241, 245, 249, 0.88);
      border-color: rgba(15, 23, 42, 0.08);
    }
    #dw-intensity-strip {
      display: grid !important;
      grid-template-columns: repeat(24, minmax(0, 1fr));
      gap: 2px !important;
      width: 100%;
    }
    .dw-hour-cell {
      width: 100%;
      height: 14px;
      border-radius: 3px;
      min-width: 0;
    }

    /* Non-permanent Floating Access Popup & Over-Usage Modal */
    .dw-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 9600;
      background: rgba(5, 8, 16, 0.72);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
    }
    .dw-modal-backdrop.open {
      display: flex;
    }
    .dw-modal-panel {
      width: 100%;
      max-width: 390px;
      background: linear-gradient(155deg, rgba(24, 29, 45, 0.98) 0%, rgba(15, 19, 31, 0.99) 100%);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 22px;
      padding: 18px;
      box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.65);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    html[data-theme="light"] .dw-modal-panel {
      background: #FFFFFF;
      border-color: rgba(15, 23, 42, 0.12);
      box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.22);
    }
    .dw-cat-mgr-list {
      max-height: 44vh;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding-right: 2px;
    }
    #dw-cat-manager-backdrop > .dw-modal-panel {
      max-width: 420px;
      padding: 16px;
      gap: 11px;
    }
    #dw-create-cat-backdrop {
      z-index: 9660;
    }
    .dw-cat-mgr-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .dw-cat-mgr-hint {
      font-size: 11px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .dw-cat-mgr-chips {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }
    .dw-mgr-cat-chip {
      transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
    }
    .dw-mgr-cat-chip.is-filter {
      cursor: pointer;
    }
    .dw-mgr-cat-chip.active-filter {
      border-color: rgba(139, 92, 246, 0.58);
      background: rgba(139, 92, 246, 0.16);
    }
    .dw-is-dragging .dw-mgr-cat-chip[data-dw-drop-cat] {
      border-style: dashed;
      border-color: rgba(139, 92, 246, 0.45);
    }
    .dw-mgr-cat-chip.drag-over {
      transform: scale(1.06);
      border-style: solid !important;
      border-color: var(--drop-accent, #8B5CF6) !important;
      background: rgba(139, 92, 246, 0.24) !important;
      box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    }
    .dw-cat-mgr-add-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 99px;
      font-size: 11px;
      font-weight: 700;
      border: 1px dashed rgba(139, 92, 246, 0.5);
      background: rgba(139, 92, 246, 0.10);
      color: var(--accent-primary);
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s ease, transform 0.15s ease;
    }
    .dw-cat-mgr-add-chip:hover {
      background: rgba(139, 92, 246, 0.18);
    }
    .dw-cat-mgr-divider {
      height: 1px;
      background: rgba(255, 255, 255, 0.08);
      margin: 0;
    }
    html[data-theme="light"] .dw-cat-mgr-divider {
      background: rgba(15, 23, 42, 0.08);
    }
    .dw-cat-mgr-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 4px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 10px;
      transition: opacity 0.15s ease, background 0.15s ease;
    }
    .dw-cat-mgr-row[draggable="true"] {
      cursor: grab;
    }
    .dw-cat-mgr-row.dragging {
      opacity: 0.42;
      background: rgba(139, 92, 246, 0.08);
    }
    .dw-cat-mgr-row:last-child {
      border-bottom: none;
    }
    html[data-theme="light"] .dw-cat-mgr-row {
      border-bottom-color: rgba(15, 23, 42, 0.07);
    }
    .dw-cat-drag-handle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 28px;
      color: var(--text-muted);
      cursor: grab;
      touch-action: none;
      flex-shrink: 0;
      border-radius: 6px;
      opacity: 0.72;
      transition: opacity 0.14s ease, color 0.14s ease;
    }
    .dw-cat-mgr-row:hover .dw-cat-drag-handle {
      opacity: 1;
      color: var(--text-secondary);
    }
    .dw-cat-drag-ghost {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 9850;
      pointer-events: none;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 7px 12px;
      border-radius: 99px;
      background: rgba(20, 24, 38, 0.94);
      border: 1px solid rgba(139, 92, 246, 0.55);
      box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.55);
      color: #F8FAFC;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      will-change: transform;
    }
    html[data-theme="light"] .dw-cat-drag-ghost {
      background: rgba(255, 255, 255, 0.96);
      color: #0F172A;
      box-shadow: 0 14px 28px -8px rgba(15, 23, 42, 0.22);
    }
    .dw-create-cat-input {
      width: 100%;
      padding: 9px 11px;
      border-radius: 11px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.13);
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      outline: none;
      transition: border-color 0.15s ease;
    }
    .dw-create-cat-input:focus {
      border-color: rgba(139, 92, 246, 0.65);
    }
    html[data-theme="light"] .dw-create-cat-input {
      background: rgba(241, 245, 249, 0.92);
      border-color: rgba(15, 23, 42, 0.12);
    }
    .dw-color-swatches {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
    }
    .dw-color-swatch {
      width: 26px;
      height: 26px;
      border-radius: 99px;
      border: 2px solid transparent;
      cursor: pointer;
      padding: 0;
      transition: transform 0.14s ease, box-shadow 0.14s ease;
    }
    .dw-color-swatch:hover {
      transform: scale(1.08);
    }
    .dw-color-swatch.active {
      border-color: #FFFFFF;
      box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.65);
      transform: scale(1.08);
    }
    html[data-theme="light"] .dw-color-swatch.active {
      border-color: #0F172A;
    }

    /* ==========================================================================
       PWA MOBILE POLISH: SAFE-AREA INSETS & INSTALL UI
       ========================================================================== */
    .bottom-nav {
      padding-left: env(safe-area-inset-left, 0px);
      padding-right: env(safe-area-inset-right, 0px);
    }
    .settings-modal-container {
      padding-bottom: 0 !important;
    }
    #missile-arena.missile-lockdown,
    #pomo-arena.pomo-fullscreen-lockdown {
      padding-top: env(safe-area-inset-top, 0px) !important;
      padding-bottom: env(safe-area-inset-bottom, 0px) !important;
      padding-left: env(safe-area-inset-left, 0px) !important;
      padding-right: env(safe-area-inset-right, 0px) !important;
    }

    /* Minimalist Seamless Single-Box Task Title Input & Embedded Mic */
    #sheet-task-composer .composer-title-shell {
      display: flex;
      align-items: center;
      gap: 4px;
      background: transparent;
      border: 1px solid rgba(15, 23, 42, 0.13);
      border-radius: 14px;
      padding: 2px 6px 2px 2px;
      margin-bottom: 10px;
      transition: border-color 0.18s ease, background-color 0.18s ease;
    }
    body.dark-mode #sheet-task-composer .composer-title-shell,
    html.dark #sheet-task-composer .composer-title-shell,
    [data-theme="dark"] #sheet-task-composer .composer-title-shell {
      border-color: rgba(255, 255, 255, 0.13);
    }
    #sheet-task-composer .composer-title-shell:focus-within {
      border-color: color-mix(in srgb, var(--accent-primary, #0d9488) 62%, transparent);
      background: color-mix(in srgb, var(--bg-elevated) 32%, transparent);
    }
    #sheet-task-composer .composer-title-shell .nlp-wrapper {
      flex: 1;
      min-width: 0;
      position: relative;
      height: 44px;
      overflow: hidden;
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop,
    #sheet-task-composer #composer-task-title.nlp-input {
      position: absolute !important;
      inset: 0 !important;
      width: 100% !important;
      height: 44px !important;
      line-height: 44px !important;
      padding: 0 12px !important;
      margin: 0 !important;
      border: 0 solid transparent !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
      outline: none !important;
      font-family: var(--font-body) !important;
      font-size: 15.5px !important;
      font-weight: 600 !important;
      letter-spacing: 0 !important;
      word-spacing: 0 !important;
      font-kerning: normal !important;
      font-variant-ligatures: none !important;
      font-feature-settings: "liga" 0, "calt" 0 !important;
      white-space: pre !important;
      overflow-x: auto !important;
      overflow-y: hidden !important;
      box-sizing: border-box !important;
      -webkit-text-size-adjust: 100% !important;
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop {
      color: transparent !important;
      -webkit-text-fill-color: transparent !important;
      pointer-events: none !important;
      user-select: none !important;
      z-index: 1 !important;
      scrollbar-width: none !important;
      transition: none !important;
      animation: none !important;
      transform: translateZ(0);
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop::-webkit-scrollbar {
      display: none !important;
      width: 0 !important;
      height: 0 !important;
    }
    #sheet-task-composer #composer-task-title.nlp-input {
      color: var(--text-primary) !important;
      -webkit-text-fill-color: var(--text-primary) !important;
      caret-color: var(--accent-primary, #0D9488) !important;
      z-index: 2 !important;
      transition: none !important;
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-scroll-tail {
      display: inline-block;
      width: 24px;
      height: 1px;
      pointer-events: none;
    }
    /* Zero-net-advance semantic highlight box: padding is cancelled 1:1 by negative margin so character X-coordinates never drift */
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match {
      --nlp-token-bg: rgba(13, 148, 136, 0.17);
      --nlp-token-border: rgba(13, 148, 136, 0.48);
      display: inline !important;
      font: inherit !important;
      letter-spacing: inherit !important;
      word-spacing: inherit !important;
      color: transparent !important;
      -webkit-text-fill-color: transparent !important;
      background: var(--nlp-token-bg) !important;
      border: 0 !important;
      border-bottom: 1.5px solid var(--nlp-token-border) !important;
      border-radius: 6px !important;
      padding: 2.5px 3px !important;
      margin: -2.5px -3px !important;
      box-decoration-break: clone;
      -webkit-box-decoration-break: clone;
      transition: none !important;
      animation: none !important;
    }
    body.dark-mode #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match,
    html.dark #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match,
    [data-theme="dark"] #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match {
      --nlp-token-bg: rgba(45, 212, 191, 0.20);
      --nlp-token-border: rgba(45, 212, 191, 0.56);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-time {
      --nlp-token-bg: rgba(37, 99, 235, 0.16);
      --nlp-token-border: rgba(37, 99, 235, 0.48);
    }
    body.dark-mode #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-time,
    html.dark #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-time,
    [data-theme="dark"] #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-time {
      --nlp-token-bg: rgba(96, 165, 250, 0.22);
      --nlp-token-border: rgba(96, 165, 250, 0.56);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-repeat {
      --nlp-token-bg: rgba(124, 58, 237, 0.16);
      --nlp-token-border: rgba(124, 58, 237, 0.48);
    }
    body.dark-mode #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-repeat,
    html.dark #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-repeat,
    [data-theme="dark"] #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-repeat {
      --nlp-token-bg: rgba(167, 139, 250, 0.22);
      --nlp-token-border: rgba(167, 139, 250, 0.56);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-priority[data-nlp-sub="p1"] {
      --nlp-token-bg: rgba(239, 68, 68, 0.18);
      --nlp-token-border: rgba(239, 68, 68, 0.55);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-priority[data-nlp-sub="p2"] {
      --nlp-token-bg: rgba(245, 158, 11, 0.19);
      --nlp-token-border: rgba(245, 158, 11, 0.55);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-priority[data-nlp-sub="p3"] {
      --nlp-token-bg: rgba(59, 130, 246, 0.18);
      --nlp-token-border: rgba(59, 130, 246, 0.52);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-category {
      --nlp-token-bg: color-mix(in srgb, var(--nlp-cat-color, #0D9488) 20%, transparent);
      --nlp-token-border: color-mix(in srgb, var(--nlp-cat-color, #0D9488) 60%, transparent);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-energy[data-nlp-sub="high"] {
      --nlp-token-bg: rgba(234, 179, 8, 0.20);
      --nlp-token-border: rgba(234, 179, 8, 0.58);
    }
    #sheet-task-composer #nlp-shadow.nlp-backdrop .nlp-match.is-energy[data-nlp-sub="low"] {
      --nlp-token-bg: rgba(16, 185, 129, 0.18);
      --nlp-token-border: rgba(16, 185, 129, 0.52);
    }
    #sheet-task-composer #btn-composer-mic {
      width: 36px;
      height: 36px;
      flex-shrink: 0;
      border-radius: 10px;
      background: transparent;
      border: none;
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: color 0.18s ease, background-color 0.18s ease, transform 0.16s ease;
    }
    #sheet-task-composer #btn-composer-mic:hover,
    #sheet-task-composer #btn-composer-mic:active {
      color: var(--accent-primary);
      background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
    }

    /* Notes Editor: Background Scroll Lock While Editing a Note */
    html.note-editor-open,
    body.note-editor-open {
      overflow: hidden !important;
      overscroll-behavior: none !important;
    }
    body.note-editor-open .app-shell,
    body.note-editor-open .tab-pane,
    body.note-editor-open #tab-mind {
      overflow: hidden !important;
      overscroll-behavior: none !important;
    }
    #sheet-note-modal {
      overscroll-behavior: contain;
      touch-action: none;
    }
    #sheet-note-modal #note-editor-sheet-box {
      overscroll-behavior: contain;
      touch-action: pan-y;
    }
    #note-editor-container {
      position: relative;
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      border-radius: 20px;
      overflow: hidden;
    }
    #note-editor-container #note-rte-canvas {
      flex: 1;
      min-height: 0;
      max-height: none;
      height: 100%;
      padding: 18px 18px 66px 18px;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
    }
    #note-editor-container #note-mic-btn {
      position: absolute;
      bottom: 14px;
      right: 14px;
      z-index: 20;
      width: 42px;
      height: 42px;
      padding: 0;
      border-radius: 50%;
    }

    /* Undo / Redo Disabled Visual Feedback */
    #btn-note-undo.is-disabled,
    #btn-note-redo.is-disabled {
      opacity: 0.34;
      pointer-events: none;
    }

    /* Notes Editor: Local Bottom-Left + Block Insert Button & High-Contrast Open (X) State */
    #note-editor-container #note-block-insert-btn {
      position: absolute;
      bottom: 14px;
      left: 14px;
      z-index: 22;
      width: 42px;
      height: 42px;
      padding: 0;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #FFFFFF;
      color: #0F172A;
      border: 1px solid rgba(15, 23, 42, 0.14);
      box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
      cursor: pointer;
      transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }
    body.dark-mode #note-editor-container #note-block-insert-btn,
    html.dark #note-editor-container #note-block-insert-btn,
    [data-theme="dark"] #note-editor-container #note-block-insert-btn {
      background: rgba(28, 28, 34, 0.96);
      color: #F4F4F5;
      border-color: rgba(255, 255, 255, 0.16);
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.44);
    }
    #note-editor-container #note-block-insert-btn svg {
      stroke: currentColor;
      transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }
    #note-editor-container #note-block-insert-btn.is-open,
    body.light-mode #note-editor-container #note-block-insert-btn.is-open,
    [data-theme="light"] #note-editor-container #note-block-insert-btn.is-open {
      background: #0D9488 !important;
      color: #FFFFFF !important;
      border-color: #0D9488 !important;
      box-shadow: 0 8px 22px rgba(13, 148, 136, 0.34) !important;
    }
    body.dark-mode #note-editor-container #note-block-insert-btn.is-open,
    html.dark #note-editor-container #note-block-insert-btn.is-open,
    [data-theme="dark"] #note-editor-container #note-block-insert-btn.is-open {
      background: #2DD4BF !important;
      color: #041513 !important;
      border-color: #2DD4BF !important;
      box-shadow: 0 8px 22px rgba(45, 212, 191, 0.34) !important;
    }
    #note-editor-container #note-block-insert-btn.is-open svg {
      transform: rotate(45deg);
    }

    .note-block-menu {
      position: absolute;
      bottom: 64px;
      left: 14px;
      z-index: 32;
      width: min(218px, calc(100% - 28px));
      max-height: min(360px, calc(100% - 80px));
      overflow-y: auto;
      overscroll-behavior: contain;
      padding: 6px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.97);
      border: 1px solid rgba(15, 23, 42, 0.11);
      box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      display: none;
      flex-direction: column;
      gap: 2px;
      transform-origin: bottom left;
      opacity: 0;
      transform: translateY(8px) scale(0.95);
      transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }
    body.dark-mode .note-block-menu,
    html.dark .note-block-menu,
    [data-theme="dark"] .note-block-menu {
      background: rgba(20, 20, 24, 0.97);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 20px 46px rgba(0, 0, 0, 0.56);
    }
    .note-block-menu.open {
      display: flex;
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    .note-block-menu-header {
      font-family: var(--font-display);
      font-size: 10.5px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      padding: 5px 9px 4px 9px;
      user-select: none;
    }
    .note-block-menu-sep {
      height: 1px;
      background: var(--border-subtle, rgba(148, 163, 184, 0.16));
      margin: 4px 8px;
      flex-shrink: 0;
    }
    .note-block-menu-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 9px;
      border-radius: 11px;
      border: none;
      background: transparent;
      color: var(--text-primary);
      text-align: left;
      cursor: pointer;
      transition: background-color 0.14s ease, transform 0.14s ease;
    }
    .note-block-menu-item:hover,
    .note-block-menu-item:focus-visible {
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 12%, transparent);
      outline: none;
    }
    .note-block-menu-icon {
      width: 26px;
      height: 26px;
      border-radius: 8px;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 800;
      color: var(--accent-primary, #0D9488);
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 11%, transparent);
      border: 1px solid color-mix(in srgb, var(--accent-primary, #0D9488) 18%, transparent);
    }
    .note-block-menu-title {
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 700;
      line-height: 1.25;
      color: var(--text-primary);
    }

    /* Seamless Inline Toggle Heading & Toggle List (No Box, No Placeholder Instruction Text) */
    .rte-canvas .note-toggle-block,
    .nc-preview .note-toggle-block {
      margin: 3px 0;
      padding: 0;
      background: transparent;
      border: none;
      border-radius: 0;
    }
    .rte-canvas .note-toggle-header,
    .nc-preview .note-toggle-header {
      display: flex;
      align-items: flex-start;
      gap: 4px;
    }
    .rte-canvas .note-toggle-btn,
    .nc-preview .note-toggle-btn {
      width: 20px;
      height: 26px;
      padding: 0;
      margin: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--text-secondary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      font-size: 13px;
      line-height: 1;
      user-select: none;
      transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.15s ease, background-color 0.15s ease;
    }
    .rte-canvas .note-toggle-btn:hover {
      color: var(--text-primary);
      background: rgba(148, 163, 184, 0.14);
    }
    .rte-canvas .note-toggle-block.is-open > .note-toggle-header > .note-toggle-btn,
    .nc-preview .note-toggle-block.is-open > .note-toggle-header > .note-toggle-btn {
      transform: rotate(90deg);
    }
    .rte-canvas .note-toggle-summary,
    .nc-preview .note-toggle-summary {
      flex: 1;
      min-width: 0;
      min-height: 1.5em;
      outline: none;
      line-height: 1.6;
    }
    .rte-canvas .note-toggle-block.is-heading .note-toggle-summary,
    .nc-preview .note-toggle-block.is-heading .note-toggle-summary {
      font-family: var(--font-display);
      font-size: 19px;
      font-weight: 800;
      line-height: 1.38;
    }
    .rte-canvas .note-toggle-block.is-heading .note-toggle-btn {
      height: 27px;
    }
    .rte-canvas .note-toggle-body,
    .nc-preview .note-toggle-body {
      display: none;
      margin: 2px 0 2px 24px;
      padding: 0;
      min-height: 1.5em;
      border-left: none;
      font-size: inherit;
      line-height: 1.65;
      outline: none;
    }
    .rte-canvas .note-toggle-block.is-open > .note-toggle-body,
    .nc-preview .note-toggle-block.is-open > .note-toggle-body {
      display: block;
    }

    .rte-canvas hr.note-divider,
    .nc-preview hr.note-divider {
      border: none;
      height: 1.5px;
      margin: 14px 0;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, var(--border-strong, rgba(148, 163, 184, 0.38)) 12%, var(--border-strong, rgba(148, 163, 184, 0.38)) 88%, transparent);
    }

    /* Modern Minimalist Note Table (No Autofill, No Header Fill, Clean Grid) */
    .rte-canvas .note-table-wrap,
    .nc-preview .note-table-wrap {
      position: relative;
      margin: 14px 0 12px 0;
      padding: 16px 0 2px 16px;
      max-width: 100%;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      background: transparent;
      border: none;
      border-radius: 0;
    }
    .nc-preview .note-table-wrap {
      padding: 0;
      margin: 8px 0;
    }
    .rte-canvas table.note-table,
    .nc-preview table.note-table {
      width: 100%;
      min-width: 240px;
      border-collapse: separate;
      border-spacing: 0;
      table-layout: fixed;
      font-size: 14.5px;
      line-height: 1.5;
      border: 1px solid rgba(148, 163, 184, 0.28);
      border-radius: 12px;
      overflow: hidden;
      background: transparent;
    }
    body.dark-mode .rte-canvas table.note-table,
    html.dark .rte-canvas table.note-table,
    [data-theme="dark"] .rte-canvas table.note-table {
      border-color: rgba(255, 255, 255, 0.14);
    }
    .rte-canvas table.note-table th,
    .rte-canvas table.note-table td,
    .nc-preview table.note-table th,
    .nc-preview table.note-table td {
      border-right: 1px solid rgba(148, 163, 184, 0.22);
      border-bottom: 1px solid rgba(148, 163, 184, 0.22);
      border-top: none;
      border-left: none;
      padding: 9px 11px;
      min-width: 72px;
      min-height: 36px;
      vertical-align: top;
      text-align: left;
      font-weight: 400;
      background: transparent;
      word-break: break-word;
      outline: none;
      transition: background-color 0.14s ease, box-shadow 0.14s ease;
    }
    body.dark-mode .rte-canvas table.note-table th,
    body.dark-mode .rte-canvas table.note-table td,
    html.dark .rte-canvas table.note-table th,
    html.dark .rte-canvas table.note-table td,
    [data-theme="dark"] .rte-canvas table.note-table th,
    [data-theme="dark"] .rte-canvas table.note-table td {
      border-right-color: rgba(255, 255, 255, 0.11);
      border-bottom-color: rgba(255, 255, 255, 0.11);
    }
    .rte-canvas table.note-table tr > *:last-child,
    .nc-preview table.note-table tr > *:last-child {
      border-right: none;
    }
    .rte-canvas table.note-table tbody tr:last-child > *,
    .rte-canvas table.note-table tr:last-child > *,
    .nc-preview table.note-table tbody tr:last-child > * {
      border-bottom: none;
    }
    .rte-canvas table.note-table th:focus,
    .rte-canvas table.note-table td:focus,
    .rte-canvas table.note-table th.is-cell-active,
    .rte-canvas table.note-table td.is-cell-active {
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 7%, transparent);
      box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent-primary, #0D9488) 55%, transparent);
    }
    .rte-canvas .note-table-controls,
    .nc-preview .note-table-controls {
      display: none !important;
    }

    /* Floating Contextual Row (Left) & Column (Top) Handle Symbols */
    .note-table-axis-handle {
      position: absolute;
      z-index: 28;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 0;
      border-radius: 6px;
      border: 1px solid rgba(15, 23, 42, 0.14);
      background: rgba(255, 255, 255, 0.96);
      color: #475569;
      box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
      cursor: pointer;
      transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.14s ease;
    }
    body.dark-mode .note-table-axis-handle,
    html.dark .note-table-axis-handle,
    [data-theme="dark"] .note-table-axis-handle {
      background: rgba(34, 34, 42, 0.96);
      border-color: rgba(255, 255, 255, 0.16);
      color: #CBD5E1;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.42);
    }
    .note-table-axis-handle.is-visible {
      display: inline-flex;
    }
    .note-table-axis-handle.is-row {
      width: 18px;
      height: 26px;
    }
    .note-table-axis-handle.is-col {
      width: 26px;
      height: 18px;
    }
    .note-table-axis-handle:hover,
    .note-table-axis-handle.is-active {
      background: var(--accent-primary, #0D9488);
      border-color: var(--accent-primary, #0D9488);
      color: var(--accent-contrast, #FFFFFF);
      transform: scale(1.06);
    }

    /* Floating Row / Column Action Menu Popover */
    .note-table-action-menu {
      position: absolute;
      z-index: 36;
      display: none;
      flex-direction: column;
      gap: 2px;
      min-width: 174px;
      max-width: calc(100% - 24px);
      padding: 5px;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.98);
      border: 1px solid rgba(15, 23, 42, 0.12);
      box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    body.dark-mode .note-table-action-menu,
    html.dark .note-table-action-menu,
    [data-theme="dark"] .note-table-action-menu {
      background: rgba(22, 22, 28, 0.98);
      border-color: rgba(255, 255, 255, 0.13);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.56);
    }
    .note-table-action-menu.open {
      display: flex;
    }
    .note-table-action-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: 9px;
      border: none;
      background: transparent;
      color: var(--text-primary);
      font-family: var(--font-display);
      font-size: 12.5px;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
      transition: background-color 0.14s ease, color 0.14s ease;
    }
    .note-table-action-item:hover:not(:disabled) {
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 12%, transparent);
    }
    .note-table-action-item.is-danger {
      color: #EF4444;
    }
    .note-table-action-item.is-danger:hover:not(:disabled) {
      background: rgba(239, 68, 68, 0.12);
    }
    .note-table-action-item:disabled {
      opacity: 0.36;
      cursor: not-allowed;
    }
    .note-table-action-sep {
      height: 1px;
      background: var(--border-subtle, rgba(148, 163, 184, 0.16));
      margin: 3px 6px;
    }
    .pwa-install-card {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 13px 15px;
      margin-bottom: 10px;
      border-radius: 18px;
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 12%, var(--bg-surface, #141418));
      border: 1px solid color-mix(in srgb, var(--accent-primary, #0D9488) 32%, transparent);
    }
    .pwa-install-card.is-visible {
      display: flex;
    }
    .pwa-install-meta {
      min-width: 0;
      flex: 1;
    }
    .pwa-install-title {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .pwa-install-sub {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 2px;
    }
    .pwa-install-btn {
      flex-shrink: 0;
      padding: 9px 14px;
      border-radius: 12px;
      border: none;
      background: var(--accent-primary, #0D9488);
      color: var(--accent-contrast, #FFFFFF);
      font-family: var(--font-display);
      font-size: 12.5px;
      font-weight: 800;
      cursor: pointer;
      transition: transform 0.16s ease, opacity 0.16s ease;
    }
    .pwa-install-btn:active {
      transform: scale(0.95);
    }
    .pwa-side-install-btn {
      display: none;
      width: 100%;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 16px;
      border-radius: 16px;
      border: 1px solid color-mix(in srgb, var(--accent-primary, #0D9488) 36%, transparent);
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 14%, transparent);
      color: var(--accent-primary, #0D9488);
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 800;
      cursor: pointer;
      transition: transform 0.16s ease, opacity 0.16s ease;
    }
    .pwa-side-install-btn.is-visible {
      display: flex;
    }
    .pwa-side-install-btn:active {
      transform: scale(0.97);
    }
    .pwa-ios-guide-backdrop {
      position: fixed;
      inset: 0;
      z-index: 100090;
      display: none;
      align-items: center;
      justify-content: center;
      padding: max(20px, env(safe-area-inset-top, 20px)) 20px max(20px, env(safe-area-inset-bottom, 20px));
      background: rgba(0, 0, 0, 0.72);
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    .pwa-ios-guide-backdrop.open {
      display: flex;
      opacity: 1;
    }
    .pwa-ios-guide-sheet {
      width: min(100%, 360px);
      padding: 22px 20px;
      border-radius: 24px;
      background: var(--bg-surface, #141418);
      border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
      color: var(--text-primary);
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
      transform: translateY(10px);
      transition: transform 0.22s ease;
    }
    .pwa-ios-guide-backdrop.open .pwa-ios-guide-sheet {
      transform: translateY(0);
    }
    main#tab-todo > #action-subview-todo > .todo-header > .header-left {
      flex: 1 1 0;
      min-width: 0;
    }
    main#tab-todo > #action-subview-todo > .todo-header > .header-right {
      flex: 1 1 0;
      justify-content: flex-end;
    }
    #pwa-offline-pill {
      display: none;
      flex: 0 0 auto;
      align-self: flex-start;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin: 6px 8px 0;
      padding: 0;
      background: transparent;
      border: none;
      color: var(--text-secondary);
      pointer-events: none;
      white-space: nowrap;
    }
    #pwa-offline-pill.is-offline {
      display: inline-flex;
      animation: offlineRibbonIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    @keyframes offlineRibbonIn {
      from {
        opacity: 0;
        transform: translateY(-3px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    #pwa-offline-pill .pwa-offline-icon {
      flex-shrink: 0;
      display: block;
    }
    #pwa-offline-pill .pwa-offline-label {
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.015em;
      line-height: 1;
      color: var(--text-secondary);
      white-space: nowrap;
    }
    @media (prefers-reduced-motion: reduce) {
      #pwa-offline-pill.is-offline {
        animation: none;
      }
    }

    /* Focus Insight Deep Dive — Timeline Bar & Google Sheets Export */
    .focus-drill-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }
    .focus-drill-range-tabs {
      display: inline-flex;
      gap: 4px;
      background: var(--bg-elevated);
      padding: 3px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
    }
    .focus-drill-range-tabs .focus-range-pill {
      padding: 5px 10px;
      border-radius: 7px;
      font-size: 11.5px;
      font-weight: 700;
      border: none;
      cursor: pointer;
      background: transparent;
      color: var(--text-secondary);
      transition: background 0.18s ease, color 0.18s ease;
    }
    .focus-sheets-trigger-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 11px;
      border-radius: 10px;
      border: 1px solid rgba(15, 157, 88, 0.34);
      background: rgba(15, 157, 88, 0.11);
      color: var(--text-primary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    }
    .focus-sheets-trigger-btn:hover {
      background: rgba(15, 157, 88, 0.18);
      border-color: rgba(15, 157, 88, 0.55);
    }
    .focus-sheets-range-tag {
      font-size: 10px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 6px;
      background: rgba(15, 157, 88, 0.2);
      color: #10B981;
    }
    [data-theme="light"] .focus-sheets-range-tag {
      color: #0B8043;
    }
    .focus-sheets-confirm-panel {
      padding: 13px 14px;
      border-radius: 16px;
      background: var(--bg-elevated);
      border: 1px solid rgba(15, 157, 88, 0.36);
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .focus-sheets-confirm-panel[hidden] {
      display: none;
    }
    .focus-sheets-panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .focus-sheets-panel-title {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .focus-sheets-close-x {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-secondary);
      font-size: 16px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .focus-sheets-desc {
      font-size: 12px;
      line-height: 1.45;
      color: var(--text-secondary);
      margin: 0;
    }
    .focus-sheets-field-label {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: -4px;
    }
    .focus-sheets-title-input {
      width: 100%;
      box-sizing: border-box;
      padding: 9px 11px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-primary);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      outline: none;
    }
    .focus-sheets-title-input:focus {
      border-color: #0F9D58;
    }
    .focus-sheets-summary-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }
    .focus-sheets-stat {
      padding: 8px 10px;
      border-radius: 10px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .focus-sheets-stat span {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--text-muted);
    }
    .focus-sheets-stat strong {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .focus-sheets-auth-note {
      font-size: 11.5px;
      color: var(--text-secondary);
      margin-bottom: 8px;
    }
    .focus-sheets-connected-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 11.5px;
      color: #10B981;
      font-weight: 600;
      margin-bottom: 8px;
      flex-wrap: wrap;
    }
    [data-theme="light"] .focus-sheets-connected-row {
      color: #0B8043;
    }
    .focus-sheets-switch-btn {
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-size: 11px;
      font-weight: 700;
      text-decoration: underline;
      cursor: pointer;
      padding: 0;
    }
    .focus-sheets-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .focus-sheets-actions-auth {
      justify-content: space-between;
    }
    .focus-sheets-btn-primary {
      padding: 9px 14px;
      border-radius: 10px;
      border: none;
      background: #0F9D58;
      color: #FFFFFF;
      font-size: 12.5px;
      font-weight: 800;
      cursor: pointer;
    }
    .focus-sheets-btn-secondary {
      padding: 8px 12px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-primary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }
    .focus-sheets-open-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 9px 14px;
      border-radius: 10px;
      background: #0F9D58;
      color: #FFFFFF;
      font-size: 12.5px;
      font-weight: 800;
      text-decoration: none;
    }
    .focus-sheets-success-box {
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.28);
    }
    .focus-sheets-success-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--text-primary);
      margin-bottom: 3px;
      word-break: break-word;
    }
    .focus-sheets-success-meta {
      font-size: 11.5px;
      color: var(--text-secondary);
    }
    .focus-sheets-error-box {
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.35);
      color: #F87171;
      font-size: 12px;
      font-weight: 600;
    }
    [data-theme="light"] .focus-sheets-error-box {
      color: #B91C1C;
    }
    .focus-sheets-loading-row {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--text-primary);
      padding: 4px 0;
    }
    .focus-sheets-spinner {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 2px solid rgba(15, 157, 88, 0.25);
      border-top-color: #0F9D58;
      display: inline-block;
      animation: focusSheetsSpin 0.75s linear infinite;
      flex-shrink: 0;
    }
    @keyframes focusSheetsSpin {
      to { transform: rotate(360deg); }
    }

    /* Official Google Sign-In Material Button */
    .gsi-material-button {
      -moz-user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
      user-select: none;
      background-color: #FFFFFF;
      background-image: none;
      border: 1px solid #747775;
      border-radius: 20px;
      box-sizing: border-box;
      color: #1F1F1F;
      cursor: pointer;
      font-family: 'Roboto', 'Inter', Arial, sans-serif;
      font-size: 13px;
      height: 38px;
      letter-spacing: 0.2px;
      outline: none;
      overflow: hidden;
      padding: 0 14px;
      position: relative;
      text-align: center;
      transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
      vertical-align: middle;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .gsi-material-button .gsi-material-button-icon {
      height: 18px;
      margin-right: 10px;
      min-width: 18px;
      width: 18px;
    }
    .gsi-material-button .gsi-material-button-content-wrapper {
      align-items: center;
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      height: 100%;
      justify-content: center;
      position: relative;
      width: 100%;
    }
    .gsi-material-button .gsi-material-button-contents {
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .gsi-material-button .gsi-material-button-state {
      transition: opacity 0.2s;
      inset: 0;
      opacity: 0;
      position: absolute;
    }
    .gsi-material-button:hover {
      box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    }
    .gsi-material-button:hover .gsi-material-button-state {
      background-color: #303030;
      opacity: 0.08;
    }
    [data-theme="dark"] .gsi-material-button,
    body.dark-mode .gsi-material-button {
      background-color: #131314;
      border-color: #8E918F;
      color: #E3E3E3;
    }
    [data-theme="dark"] .gsi-material-button:hover .gsi-material-button-state,
    body.dark-mode .gsi-material-button:hover .gsi-material-button-state {
      background-color: #FFFFFF;
      opacity: 0.12;
    }

    /* ==========================================================================
       POMODORO CATEGORY SELECTOR, DYNAMIC RING COLOR & ACTIVE FOCUS DISPLAY
       ========================================================================== */
    .ring-progress {
      transition: stroke-dashoffset 0.18s linear, stroke 0.28s ease, filter 0.28s ease;
    }

    .pomo-cat-task-setup {
      width: 100%;
      max-width: 390px;
      margin: 2px auto 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }

    .pomo-category-picker-wrap {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 7px;
      padding: 10px 12px;
      border-radius: 18px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      box-sizing: border-box;
    }

    .pomo-category-picker-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 0 2px;
    }

    .pomo-category-picker-label {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .pomo-selected-cat-hint {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--text-secondary);
      transition: color 0.2s ease;
    }

    .pomo-category-pills {
      display: flex;
      align-items: center;
      gap: 7px;
      overflow-x: auto;
      padding: 2px 1px;
      scrollbar-width: none;
      -ms-overflow-style: none;
      -webkit-overflow-scrolling: touch;
    }
    .pomo-category-pills::-webkit-scrollbar {
      display: none;
    }

    .pomo-cat-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 32px;
      padding: 0 12px;
      border-radius: 999px;
      background: var(--bg-elevated);
      border: 1.5px solid var(--border-subtle);
      color: var(--text-secondary);
      font-size: 12.5px;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
      cursor: pointer;
      transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    }

    .pomo-cat-pill.active {
      background: color-mix(in srgb, var(--pill-cat-color, var(--accent-primary)) 15%, var(--bg-elevated));
      border-color: var(--pill-cat-color, var(--accent-primary));
      color: var(--text-primary);
      box-shadow: 0 2px 10px color-mix(in srgb, var(--pill-cat-color, var(--accent-primary)) 24%, transparent);
    }

    .pomo-cat-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .pomo-task-optional-wrap {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .pomo-optional-task-btn {
      font-size: 12.5px;
      font-weight: 700;
      color: var(--text-secondary);
      padding: 6px 14px;
      border-radius: 12px;
      background: transparent;
      border: 1px dashed var(--border-strong);
      cursor: pointer;
      transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
    }
    .pomo-optional-task-btn:hover {
      border-color: var(--pomo-cat-color, var(--accent-primary));
      color: var(--text-primary);
    }

    .pomo-task-chip {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      max-width: 100%;
      min-height: 50px;
      padding: 8px 10px 8px 12px;
      border-radius: 16px;
      background: var(--bg-surface);
      border: 1px solid var(--border-strong);
      box-sizing: border-box;
      transition: border-color 0.18s ease, background 0.18s ease;
    }

    .pomo-task-chip-edit {
      flex: 1 1 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 2px 0;
      background: transparent;
      border: none;
      color: var(--text-primary);
      min-width: 0;
      text-align: left;
      cursor: pointer;
    }

    .pomo-task-chip-body {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 1px;
    }

    .pomo-task-chip-prefix {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-muted);
      line-height: 1.2;
      flex-shrink: 0;
    }
    .pomo-task-chip.is-live-linked .pomo-task-chip-prefix {
      color: var(--pomo-cat-color, var(--accent-primary));
    }
    .pomo-task-chip.is-completed .pomo-task-chip-prefix {
      color: #10B981;
    }

    .pomo-task-chip-text {
      width: 100%;
      font-size: 13.5px;
      font-weight: 700;
      line-height: 1.3;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      transition: color 0.18s ease, opacity 0.18s ease;
    }
    .pomo-task-chip.is-completed .pomo-task-chip-text {
      text-decoration: line-through;
      color: var(--text-muted);
      opacity: 0.85;
    }

    .pomo-task-chip-clear {
      flex-shrink: 0;
      width: 30px;
      height: 30px;
      padding: 0;
      border: none;
      border-radius: 9px;
      background: transparent;
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.16s ease, color 0.16s ease;
    }
    .pomo-task-chip-clear:hover {
      background: var(--bg-elevated);
      color: var(--text-primary);
    }

    .pomo-task-input-row {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
    }

    .pomo-task-name-input {
      flex: 1 1 auto;
      min-width: 0;
      height: 40px;
      padding: 0 13px;
      border-radius: 12px;
      border: 1.5px solid var(--pomo-cat-color, var(--accent-primary));
      background: var(--bg-surface);
      color: var(--text-primary);
      font-size: 13.5px;
      font-weight: 600;
      outline: none;
      box-sizing: border-box;
    }

    .pomo-task-done-btn {
      flex-shrink: 0;
      height: 40px;
      padding: 0 14px;
      border-radius: 12px;
      border: none;
      background: var(--pomo-cat-color, var(--accent-primary));
      color: #FFFFFF;
      font-size: 12.5px;
      font-weight: 800;
      cursor: pointer;
    }

    /* Running Focus Badge: hidden during setup, prominently shown below timer circle while running */
    .pomo-active-focus-pill {
      display: none !important;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 8px;
      max-width: 340px;
      margin: 4px auto 12px;
      padding: 8px 14px;
      border-radius: 16px;
      background: var(--bg-surface);
      border: 1px solid var(--border-strong);
      box-shadow: var(--shadow-soft);
      text-align: center;
      pointer-events: none;
    }

    #pomo-arena.pomo-timer-running .pomo-active-focus-pill,
    #pomo-arena.pomo-fullscreen-lockdown .pomo-active-focus-pill {
      display: inline-flex !important;
    }

    #pomo-arena.pomo-timer-running .pomo-active-focus-pill[style*="display: none"],
    #pomo-arena.pomo-fullscreen-lockdown .pomo-active-focus-pill[style*="display: none"] {
      display: none !important;
    }

    #pomo-arena.pomo-timer-running #pomo-target-prelaunch-wrap,
    #pomo-arena.pomo-fullscreen-lockdown #pomo-target-prelaunch-wrap {
      display: none !important;
    }

    .pomo-run-cat-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      background: color-mix(in srgb, var(--run-cat-color, var(--accent-primary)) 16%, transparent);
      color: var(--run-cat-color, var(--accent-primary));
      border: 1px solid color-mix(in srgb, var(--run-cat-color, var(--accent-primary)) 35%, transparent);
    }

    .pomo-run-cat-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .pomo-run-task-name {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
      word-break: break-word;
    }

    /* Focus Insight Category Breakdown Rows */
    .focus-cat-insight-row {
      padding: 9px 11px;
      border-radius: 12px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .focus-cat-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .focus-inline-cat-pill {
      font-size: 10px;
      font-weight: 800;
      padding: 1.5px 7px;
      border-radius: 999px;
      border: 1px solid transparent;
      white-space: nowrap;
      flex-shrink: 0;
    }

    /* ==========================================================================
       UPGRADED ANTI-TASKS: IMPULSE SHIELDS, ANCHOR COMPOSER & REMINDER SCHEDULER
       ========================================================================== */
    #tab-todo #action-subview-antitasks .anti-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: nowrap;
      margin-bottom: 14px;
    }
    #tab-todo #action-subview-antitasks .anti-header-title-wrap {
      min-width: 0;
      flex: 1 1 auto;
    }
    #tab-todo #action-subview-antitasks .anti-header-row .page-title {
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.15;
    }
    #tab-todo #action-subview-antitasks .anti-subtitle {
      font-size: 12.5px;
      font-weight: 500;
      color: var(--text-muted);
      margin: 3px 0 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #tab-todo #action-subview-antitasks .anti-header-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
      justify-content: flex-end;
      flex-shrink: 0;
    }
    #tab-todo #action-subview-antitasks .anti-nudge-trigger,
    #more-habit-tracker-view #btn-toggle-habit-nudge-panel {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      min-width: 44px;
      min-height: 44px;
      padding: 0;
      border-radius: 13px;
      border: 1px solid var(--border-strong);
      background: var(--bg-surface);
      color: var(--text-primary);
      cursor: pointer;
      flex-shrink: 0;
      transition: transform 0.18s var(--spring-bounce), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    }
    #tab-todo #action-subview-antitasks .anti-nudge-trigger.is-paused,
    #more-habit-tracker-view #btn-toggle-habit-nudge-panel.is-paused {
      border-style: dashed;
      color: var(--text-muted);
      opacity: 0.78;
    }
    #tab-todo #action-subview-antitasks .anti-nudge-trigger.active,
    #tab-todo #action-subview-antitasks .anti-nudge-trigger:hover,
    #more-habit-tracker-view #btn-toggle-habit-nudge-panel.active,
    #more-habit-tracker-view #btn-toggle-habit-nudge-panel:hover {
      opacity: 1;
      border-color: var(--accent-primary);
      color: var(--accent-primary);
      background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-surface));
    }
    #tab-todo #action-subview-antitasks .anti-lock-all-btn {
      min-height: 44px;
      padding: 0 13px;
      border-radius: 13px;
      gap: 6px;
      font-size: 12.5px;
      font-weight: 700;
    }

    /* Collapsible Reminder Schedule Card */
    #tab-todo #action-subview-antitasks .anti-schedule-card,
    #more-habit-tracker-view #habit-notif-schedule-card {
      padding: 12px 14px;
      margin-bottom: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    #tab-todo #action-subview-antitasks .anti-schedule-top,
    #more-habit-tracker-view #habit-notif-schedule-card .anti-schedule-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .anti-switch {
      position: relative;
      display: inline-flex;
      align-items: center;
      width: 46px;
      height: 26px;
      flex-shrink: 0;
      cursor: pointer;
    }
    .anti-switch input {
      opacity: 0;
      width: 0;
      height: 0;
      position: absolute;
    }
    .anti-switch-slider {
      position: absolute;
      inset: 0;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.35);
      transition: background-color 0.2s ease;
    }
    .anti-switch-slider::before {
      content: "";
      position: absolute;
      width: 20px;
      height: 20px;
      left: 3px;
      top: 3px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
      transition: transform 0.22s var(--spring-bounce);
    }
    .anti-switch input:checked + .anti-switch-slider {
      background: var(--accent-primary, #0d9488);
    }
    .anti-switch input:checked + .anti-switch-slider::before {
      transform: translateX(20px);
    }

    /* Unified 46x26 Pill Switch for Digital Wellbeing (.dw-menu-toggle) */
    .dw-menu-toggle input[type="checkbox"] {
      appearance: none !important;
      -webkit-appearance: none !important;
      position: relative;
      width: 46px !important;
      height: 26px !important;
      border-radius: 999px !important;
      background: rgba(148, 163, 184, 0.34) !important;
      border: 1px solid rgba(15, 23, 42, 0.08) !important;
      cursor: pointer;
      flex-shrink: 0;
      margin: 0;
      transition: background-color 0.22s ease, border-color 0.22s ease;
    }
    body.dark-mode .dw-menu-toggle input[type="checkbox"],
    html.dark .dw-menu-toggle input[type="checkbox"],
    [data-theme="dark"] .dw-menu-toggle input[type="checkbox"] {
      background: rgba(148, 163, 184, 0.26) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
    }
    .dw-menu-toggle input[type="checkbox"]::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24);
      transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .dw-menu-toggle input[type="checkbox"]:checked {
      background: var(--accent-primary, #0d9488) !important;
      border-color: transparent !important;
    }
    .dw-menu-toggle input[type="checkbox"]:checked::after {
      transform: translateX(20px);
    }

    .anti-schedule-controls {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--border-subtle);
    }
    .anti-schedule-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .anti-time-input {
      min-height: 38px;
      padding: 4px 10px;
      border-radius: 10px;
      border: 1px solid var(--border-strong);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 700;
      font-family: inherit;
    }
    .anti-schedule-days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 5px;
    }
    .anti-nudge-day-btn {
      min-height: 32px;
      border-radius: 9px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-muted);
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
    }
    .anti-nudge-day-btn.active {
      background: var(--accent-primary);
      border-color: var(--accent-primary);
      color: var(--accent-contrast);
    }
    .anti-test-nudge-btn {
      min-height: 34px;
      padding: 0 12px;
      border-radius: 10px;
      border: 1px solid var(--border-strong);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }
    .anti-test-nudge-btn:hover {
      border-color: var(--accent-primary);
      color: var(--accent-primary);
    }

    /* Shield Status Summary Strip */
    #tab-todo #action-subview-antitasks .anti-summary-card {
      padding: 12px 15px;
      margin-bottom: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .anti-summary-metrics {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }
    .anti-summary-cell {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .anti-summary-label {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      letter-spacing: 0.02em;
    }
    .anti-summary-value {
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 800;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .anti-summary-progress-track {
      width: 100%;
      height: 6px;
      border-radius: 99px;
      background: var(--bg-elevated, var(--bg-surface));
      overflow: hidden;
    }
    .anti-summary-progress-fill {
      height: 100%;
      border-radius: 99px;
      background: #10B981;
      transition: width 0.35s var(--spring-fluid);
    }

    /* Connective Composer Card */
    #tab-todo #action-subview-antitasks .anti-composer-card {
      padding: 6px 8px 6px 14px;
      margin-bottom: 12px;
    }
    #tab-todo #action-subview-antitasks .anti-composer-card .anti-composer-bar {
      margin-bottom: 0;
      padding: 0;
      border: none;
      background: transparent;
      box-shadow: none;
    }
    .anti-compose-details-btn {
      min-height: 38px;
      padding: 0 11px;
      border-radius: 12px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
      white-space: nowrap;
    }
    .anti-compose-details-btn.active {
      border-color: var(--accent-primary);
      color: var(--accent-primary);
      background: color-mix(in srgb, var(--accent-primary) 12%, var(--bg-elevated));
    }
    .anti-composer-details {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 10px 6px 8px 2px;
      margin-top: 6px;
      border-top: 1px solid var(--border-subtle);
    }
    .anti-field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    @media (max-width: 520px) {
      .anti-field-grid {
        grid-template-columns: 1fr;
      }
      .anti-field-grid.anti-field-grid-tight {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    .anti-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }
    .anti-field label {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
    }
    .anti-field input,
    .anti-field select {
      width: 100%;
      min-height: 40px;
      padding: 6px 10px;
      border-radius: 11px;
      border: 1px solid var(--border-strong);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      box-sizing: border-box;
      outline: none;
    }
    .anti-field input:focus,
    .anti-field select:focus {
      border-color: var(--accent-primary);
    }
    .anti-compose-reminder-opt {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      user-select: none;
    }
    .anti-compose-reminder-opt input {
      width: 17px;
      height: 17px;
      accent-color: var(--accent-primary);
    }

    /* Filter & Templates Toolbar */
    .anti-toolbar-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }
    .anti-filter-group {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px;
      border-radius: 12px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
    }
    .anti-filter-btn {
      min-height: 36px;
      padding: 0 11px;
      border-radius: 9px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }
    .anti-filter-btn.active {
      background: var(--accent-primary);
      color: var(--accent-contrast);
      font-weight: 800;
    }
    .anti-templates-toggle {
      min-height: 40px;
      padding: 0 12px;
      border-radius: 12px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }
    .anti-templates-toggle.active {
      border-color: var(--accent-primary);
      color: var(--accent-primary);
    }
    .anti-presets-shelf {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-bottom: 12px;
    }
    #tab-todo .anti-preset-btn.is-added {
      opacity: 0.55;
      border-style: dashed;
      cursor: default;
    }

    /* Anti-Task Cards (Proud Held State + Expandable Drawer) */
    #tab-todo .anti-card {
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 12px 13px;
    }
    #tab-todo .anti-card-main {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px 12px;
      width: 100%;
    }
    #tab-todo .anti-card-body {
      flex: 1 1 210px;
      min-width: 0;
    }
    #tab-todo .anti-actions {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    #tab-todo .shield-check-btn {
      width: 44px;
      height: 44px;
      min-width: 44px;
      border-radius: 14px;
    }
    #tab-todo .shield-check-btn.locked {
      background: #10B981;
      border-color: #10B981;
      color: #ffffff;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
    }
    #tab-todo .anti-card.anti-held-today {
      border-color: color-mix(in srgb, #10B981 36%, var(--border-subtle));
      background: color-mix(in srgb, #10B981 5%, var(--bg-surface));
    }
    #tab-todo .anti-card.anti-slipped-today {
      border-color: color-mix(in srgb, #F43F5E 35%, var(--border-subtle));
    }
    #tab-todo .anti-anchor-line {
      font-size: 12.5px;
      font-weight: 500;
      color: var(--text-secondary);
      margin-top: 3px;
      line-height: 1.35;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #tab-todo .anti-meta-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px 8px;
      margin-top: 5px;
      font-size: 12px;
      font-weight: 500;
      line-height: 1.35;
      color: var(--text-muted);
    }
    #tab-todo .anti-dot.slipped {
      background: #F43F5E;
      opacity: 0.95;
    }
    #tab-todo .anti-nudge-card-btn {
      width: 44px;
      height: 44px;
      min-width: 44px;
      min-height: 44px;
      padding: 0;
      border-radius: 12px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: transform 0.18s var(--spring-bounce), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    }
    #tab-todo .anti-nudge-card-btn.is-on {
      border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-subtle));
      background: color-mix(in srgb, var(--accent-primary) 13%, var(--bg-surface));
      color: var(--accent-primary);
    }
    #tab-todo .anti-nudge-card-btn.is-off {
      border-style: dashed;
      opacity: 0.72;
      color: var(--text-muted);
    }
    #tab-todo .anti-nudge-card-btn:hover {
      opacity: 1;
      border-color: var(--accent-primary);
      color: var(--accent-primary);
    }
    #tab-todo .anti-resist-btn {
      min-width: 48px;
      min-height: 44px;
      padding: 0 11px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
    }
    #tab-todo .anti-missed-card-btn {
      min-width: 48px;
      min-height: 44px;
      padding: 0 11px;
      border-radius: 12px;
      border: 1px solid var(--border-strong);
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      white-space: nowrap;
      transition: transform 0.18s var(--spring-bounce), border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    }
    #tab-todo .anti-missed-card-btn:hover {
      border-color: rgba(244, 63, 94, 0.5);
      color: #F43F5E;
    }
    #tab-todo .anti-missed-card-btn.is-missed {
      border-color: rgba(244, 63, 94, 0.45);
      background: rgba(244, 63, 94, 0.12);
      color: #F43F5E;
    }
    .anti-expand-btn {
      width: 44px;
      height: 44px;
      min-width: 44px;
      border-radius: 12px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    }
    .anti-card.is-expanded .anti-expand-btn svg {
      transform: rotate(180deg);
    }
    .anti-expand-btn:hover {
      background: var(--bg-elevated, var(--bg-surface));
      color: var(--text-primary);
    }

    /* Inline Expanded Card Drawer */
    .anti-card-drawer {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-subtle);
    }
    .anti-drawer-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
    }
    .anti-drawer-stat {
      padding: 7px 8px;
      border-radius: 10px;
      background: var(--bg-elevated, var(--bg-surface));
      border: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 1px;
      text-align: center;
    }
    .anti-ds-lbl {
      font-size: 10px;
      font-weight: 700;
      color: var(--text-muted);
    }
    .anti-drawer-stat strong {
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .anti-cal-box {
      padding: 10px;
      border-radius: 13px;
      background: var(--bg-elevated, var(--bg-surface));
      border: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .anti-cal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .anti-cal-nav-btn {
      width: 34px;
      height: 34px;
      min-width: 34px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-primary);
      font-size: 16px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .anti-cal-nav-btn:hover {
      border-color: var(--accent-primary);
      color: var(--accent-primary);
    }
    .anti-cal-title-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .anti-cal-month-label {
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .anti-cal-month-count {
      font-size: 11.5px;
      font-weight: 700;
      color: #10B981;
    }
    .anti-cal-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 4px;
    }
    .anti-cal-wd {
      text-align: center;
      font-size: 10.5px;
      font-weight: 700;
      color: var(--text-muted);
      padding: 2px 0;
    }
    .anti-cal-day {
      height: 34px;
      border-radius: 9px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.15s var(--spring-bounce), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }
    .anti-cal-day.is-today {
      border-color: var(--accent-primary);
      box-shadow: inset 0 0 0 1px var(--accent-primary);
      color: var(--text-primary);
      font-weight: 800;
    }
    .anti-cal-day.is-held {
      background: #10B981;
      border-color: #10B981;
      box-shadow: none;
      color: #ffffff;
      font-weight: 700;
    }
    .anti-cal-day.is-missed {
      background: rgba(244, 63, 94, 0.16);
      border-color: rgba(244, 63, 94, 0.55);
      box-shadow: none;
      color: #F43F5E;
      font-weight: 700;
    }
    .anti-more-opts-wrap {
      border-radius: 12px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated, var(--bg-surface));
      overflow: hidden;
    }
    .anti-more-opts-toggle {
      width: 100%;
      min-height: 42px;
      padding: 0 12px;
      border: none;
      background: transparent;
      color: var(--text-primary);
      font-size: 12.5px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
    }
    .anti-more-opts-toggle svg {
      color: var(--text-muted);
      transition: transform 0.2s ease;
    }
    .anti-more-opts-wrap.is-open .anti-more-opts-toggle svg {
      transform: rotate(180deg);
    }
    .anti-more-opts-body {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 10px 12px 12px;
      border-top: 1px solid var(--border-subtle);
    }
    .anti-drawer-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      padding-top: 4px;
      flex-wrap: wrap;
    }
    .anti-slip-btn {
      min-height: 40px;
      padding: 0 13px;
      border-radius: 11px;
      border: 1px solid rgba(244, 63, 94, 0.35);
      background: rgba(244, 63, 94, 0.08);
      color: #F43F5E;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }
    .anti-del-btn-text {
      min-height: 40px;
      padding: 0 12px;
      border-radius: 11px;
      border: 1px solid var(--border-subtle);
      background: transparent;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }
    .anti-del-btn-text:hover {
      color: #F43F5E;
      border-color: rgba(244, 63, 94, 0.35);
    }
    .anti-save-btn {
      min-height: 40px;
      padding: 0 16px;
      border-radius: 11px;
      border: none;
      background: var(--accent-primary);
      color: var(--accent-contrast);
      font-size: 12.5px;
      font-weight: 800;
      cursor: pointer;
    }

    /* ==========================================================================
       VISUAL CLASSIFIED DATA EXPORT DASHBOARD (#more-data-export-view)
       ========================================================================== */
    .dx-dashboard {
      flex-direction: column;
      gap: 16px;
      padding-bottom: 84px;
      width: 100%;
    }
    .dx-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .dx-topbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .dx-topbar-titles {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .dx-title {
      margin: 0;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 800;
      color: var(--text-primary);
      line-height: 1.2;
      text-wrap: balance;
    }
    .dx-subtitle {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      line-height: 1.3;
    }

    /* 4-Column KPI Summary Strip */
    .dx-kpi-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }
    @media (max-width: 640px) {
      .dx-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    .dx-kpi-cell {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 14px;
      padding: 13px 14px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .dx-kpi-lbl {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dx-kpi-val {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      color: var(--text-primary);
      line-height: 1.15;
    }

    /* Single-Elevation Structural Panels */
    .dx-panel {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 16px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .dx-controls-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .dx-scope-group {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px;
      border-radius: 12px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      flex-wrap: wrap;
    }
    .dx-scope-btn {
      min-height: 36px;
      padding: 0 12px;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: background-color 0.16s ease, color 0.16s ease;
    }
    .dx-scope-btn:hover {
      color: var(--text-primary);
    }
    .dx-scope-btn.active {
      background: var(--bg-surface);
      color: var(--text-primary);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    .dx-export-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .dx-btn {
      min-height: 42px;
      padding: 0 15px;
      border-radius: 11px;
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease, border-color 0.16s ease;
    }
    .dx-btn:focus-visible,
    .dx-scope-btn:focus-visible,
    .dx-tab-btn:focus-visible,
    .dx-mini-btn:focus-visible,
    .dx-inspect-link:focus-visible {
      outline: 2px solid var(--accent-primary);
      outline-offset: 2px;
    }
    .dx-btn-primary {
      background: var(--accent-primary);
      color: var(--accent-contrast);
      border: 1px solid transparent;
    }
    .dx-btn-secondary {
      background: var(--bg-elevated);
      color: var(--text-primary);
      border: 1px solid var(--border-strong);
    }
    .dx-btn-secondary:hover {
      border-color: var(--accent-primary);
    }

    /* Visual Proportional Distribution Strip */
    .dx-dist-wrap {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .dx-dist-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .dx-section-heading {
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .dx-bulk-links {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--text-muted);
    }
    .dx-text-btn {
      background: transparent;
      border: none;
      padding: 4px 2px;
      font-size: 12px;
      font-weight: 700;
      color: var(--accent-primary);
      cursor: pointer;
    }
    .dx-dist-bar {
      width: 100%;
      height: 10px;
      border-radius: 99px;
      background: var(--bg-elevated);
      display: flex;
      gap: 2px;
      overflow: hidden;
    }

    /* Classified Section Selection Grid */
    .dx-sections-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    @media (max-width: 600px) {
      .dx-sections-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .dx-section-card {
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated);
      display: flex;
      flex-direction: column;
      gap: 6px;
      opacity: 0.68;
      transition: border-color 0.16s ease, opacity 0.16s ease;
    }
    .dx-section-card.is-selected {
      opacity: 1;
      border-color: var(--border-strong);
    }
    .dx-section-card.is-inspecting {
      border-color: var(--accent-primary);
    }
    .dx-section-card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .dx-section-check-wrap {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      min-width: 0;
      flex: 1;
    }
    .dx-section-checkbox {
      width: 16px;
      height: 16px;
      accent-color: var(--accent-primary);
      cursor: pointer;
      flex-shrink: 0;
    }
    .dx-section-swatch {
      width: 9px;
      height: 9px;
      border-radius: 3px;
      flex-shrink: 0;
    }
    .dx-section-name {
      font-family: var(--font-display);
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dx-section-count {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 800;
      color: var(--text-primary);
      flex-shrink: 0;
    }
    .dx-section-desc {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.4;
    }
    .dx-section-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 2px;
      padding-top: 6px;
      border-top: 1px solid var(--border-subtle);
    }
    .dx-section-meta {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-muted);
    }
    .dx-inspect-link {
      background: transparent;
      border: none;
      padding: 2px 0;
      font-size: 12px;
      font-weight: 700;
      color: var(--accent-primary);
      cursor: pointer;
      white-space: nowrap;
    }

    /* Full-Detail Live Data Inspector */
    .dx-inspector-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .dx-inspector-title-group {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .dx-inspector-title {
      margin: 0;
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .dx-inspector-count {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
    }
    .dx-inspector-tools {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      flex: 1;
      justify-content: flex-end;
      min-width: 220px;
    }
    .dx-search-input {
      min-height: 38px;
      padding: 0 12px;
      border-radius: 10px;
      border: 1px solid var(--border-strong);
      background: var(--bg-elevated);
      color: var(--text-primary);
      font-size: 13px;
      flex: 1;
      min-width: 170px;
      max-width: 300px;
    }
    .dx-search-input::placeholder {
      color: var(--text-muted);
    }
    .dx-section-quick-dl {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .dx-mini-btn {
      min-height: 38px;
      padding: 0 11px;
      border-radius: 10px;
      border: 1px solid var(--border-strong);
      background: var(--bg-elevated);
      color: var(--text-primary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .dx-mini-btn:hover {
      border-color: var(--accent-primary);
      color: var(--accent-primary);
    }

    .dx-tabs-scroll {
      display: flex;
      align-items: center;
      gap: 6px;
      overflow-x: auto;
      padding-bottom: 4px;
      scrollbar-width: none;
    }
    .dx-tabs-scroll::-webkit-scrollbar {
      display: none;
    }
    .dx-tab-btn {
      min-height: 36px;
      padding: 0 12px;
      border-radius: 9px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated);
      color: var(--text-secondary);
      font-size: 12.5px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    }
    .dx-tab-btn.active {
      background: var(--accent-primary);
      color: var(--accent-contrast);
      border-color: var(--accent-primary);
    }
    .dx-tab-count {
      font-size: 11.5px;
      opacity: 0.82;
    }

    .dx-inspector-list {
      display: flex;
      flex-direction: column;
      gap: 0;
      border-top: 1px solid var(--border-subtle);
    }
    .dx-record-card {
      padding: 14px 2px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .dx-record-card:last-child {
      border-bottom: none;
      padding-bottom: 4px;
    }
    .dx-record-head {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .dx-record-title-wrap {
      display: flex;
      align-items: baseline;
      gap: 8px;
    }
    .dx-record-idx {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .dx-record-title {
      margin: 0;
      font-family: var(--font-display);
      font-size: 14.5px;
      font-weight: 800;
      color: var(--text-primary);
      line-height: 1.35;
      word-break: break-word;
    }
    .dx-record-meta {
      font-size: 12px;
      font-weight: 600;
      color: var(--accent-primary);
      padding-left: 22px;
    }
    .dx-record-fields {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding-left: 22px;
    }
    .dx-field-row {
      display: grid;
      grid-template-columns: 148px minmax(0, 1fr);
      gap: 10px;
      align-items: baseline;
      font-size: 12.8px;
      line-height: 1.5;
    }
    .dx-field-row.is-block {
      grid-template-columns: minmax(0, 1fr);
      gap: 4px;
    }
    @media (max-width: 560px) {
      .dx-field-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
      }
      .dx-record-meta,
      .dx-record-fields {
        padding-left: 0;
      }
    }
    .dx-field-lbl {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--text-muted);
    }
    .dx-field-val {
      color: var(--text-primary);
      word-break: break-word;
    }
    .dx-field-val.is-multiline {
      white-space: pre-wrap;
      padding: 9px 12px;
      border-radius: 10px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      font-size: 12.8px;
      line-height: 1.55;
    }
    .dx-empty-state {
      padding: 32px 16px;
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .dx-empty-title {
      font-family: var(--font-display);
      font-size: 14.5px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .dx-empty-sub {
      font-size: 12.5px;
      color: var(--text-muted);
    }

    /* Tactile Habit Detail Daily Reminder Toggle Switch */
    .habit-nudge-switch {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 48px;
      min-height: 44px;
      margin: -8px -2px;
      cursor: pointer;
      flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .habit-nudge-switch input#habit-detail-nudge-toggle {
      position: absolute;
      opacity: 0;
      width: 1px;
      height: 1px;
      margin: 0;
      pointer-events: none;
    }
    .habit-nudge-switch-track {
      position: relative;
      display: inline-flex;
      align-items: center;
      width: 46px;
      height: 26px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.34);
      border: 1px solid rgba(15, 23, 42, 0.08);
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.14);
      transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                  border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                  box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body.dark-mode .habit-nudge-switch-track,
    html.dark .habit-nudge-switch-track,
    [data-theme="dark"] .habit-nudge-switch-track {
      background: rgba(148, 163, 184, 0.24);
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
    }
    .habit-nudge-switch-thumb {
      position: absolute;
      top: 2px;
      left: 2px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24), 0 0.5px 1px rgba(15, 23, 42, 0.12);
      transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1),
                  box-shadow 0.2s ease;
      will-change: transform;
    }
    .habit-nudge-switch:active .habit-nudge-switch-thumb {
      transform: scale(0.92);
    }
    .habit-nudge-switch input#habit-detail-nudge-toggle:checked + .habit-nudge-switch-track {
      background: var(--accent-primary, #0D9488);
      border-color: transparent;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 2px 8px rgba(13, 148, 136, 0.28);
    }
    .habit-nudge-switch input#habit-detail-nudge-toggle:checked + .habit-nudge-switch-track .habit-nudge-switch-thumb {
      transform: translateX(20px);
    }
    .habit-nudge-switch:active input#habit-detail-nudge-toggle:checked + .habit-nudge-switch-track .habit-nudge-switch-thumb {
      transform: translateX(20px) scale(0.92);
    }
    .habit-nudge-switch input#habit-detail-nudge-toggle:focus-visible + .habit-nudge-switch-track {
      outline: 2px solid var(--accent-primary, #0D9488);
      outline-offset: 2px;
    }
    #habit-detail-nudge-card:has(#habit-detail-nudge-toggle:not(:checked)) #btn-habit-detail-nudge-clock {
      opacity: 0.52;
    }
    #habit-detail-nudge-card:has(#habit-detail-nudge-toggle:not(:checked)) #btn-habit-detail-nudge-clock:hover {
      opacity: 0.85;
    }
    @media (prefers-reduced-motion: reduce) {
      .habit-nudge-switch-track,
      .habit-nudge-switch-thumb {
        transition: none;
      }
    }

    /* ============================================================================
       BOARD & CALENDAR VIEW SURFACE OPACITY PARITY WITH LIST VIEW
       Matches the solid, non-transparent surface level of List View (.task-card)
       ============================================================================ */
    html.dark .task-card,
    [data-theme="dark"] .task-card {
      background: #18181b !important;
      background-color: #18181b !important;
    }

    /* 1. Task Cards in Board View & Calendar View — Identical solid surface to List View .task-card */
    .detailed-board-card,
    .board-column .detailed-board-card,
    #board-view-container .detailed-board-card,
    #todo-calendar-view-container .detailed-board-card,
    #todo-cal-day-tasks-panel .detailed-board-card,
    #todo-cal-selected-day-list .detailed-board-card,
    .search-task-scroll-area .detailed-board-card {
      background: #ffffff !important;
      background-color: #ffffff !important;
      border: 1px solid var(--border-subtle, rgba(26, 26, 26, 0.08)) !important;
      box-shadow: var(--shadow-soft, 0 8px 24px rgba(15, 23, 42, 0.06)) !important;
    }

    body.dark-mode .detailed-board-card,
    html.dark .detailed-board-card,
    [data-theme="dark"] .detailed-board-card,
    body.dark-mode .board-column .detailed-board-card,
    html.dark .board-column .detailed-board-card,
    [data-theme="dark"] .board-column .detailed-board-card,
    body.dark-mode #board-view-container .detailed-board-card,
    html.dark #board-view-container .detailed-board-card,
    [data-theme="dark"] #board-view-container .detailed-board-card,
    body.dark-mode #todo-calendar-view-container .detailed-board-card,
    html.dark #todo-calendar-view-container .detailed-board-card,
    [data-theme="dark"] #todo-calendar-view-container .detailed-board-card,
    body.dark-mode #todo-cal-day-tasks-panel .detailed-board-card,
    html.dark #todo-cal-day-tasks-panel .detailed-board-card,
    [data-theme="dark"] #todo-cal-day-tasks-panel .detailed-board-card,
    body.dark-mode #todo-cal-selected-day-list .detailed-board-card,
    html.dark #todo-cal-selected-day-list .detailed-board-card,
    [data-theme="dark"] #todo-cal-selected-day-list .detailed-board-card,
    body.dark-mode .search-task-scroll-area .detailed-board-card,
    html.dark .search-task-scroll-area .detailed-board-card,
    [data-theme="dark"] .search-task-scroll-area .detailed-board-card {
      background: #18181b !important;
      background-color: #18181b !important;
      border: 1px solid var(--border-subtle, rgba(234, 234, 234, 0.09)) !important;
      box-shadow: var(--shadow-soft, 0 8px 28px rgba(0, 0, 0, 0.45)) !important;
    }

    /* 2. Calendar Month Grid Card — Solid surface matching List View card level */
    #todo-calendar-view-container .todo-cal-card,
    #todo-calendar-view-container .compact-search-cal-wrapper,
    .compact-search-cal-wrapper {
      background: #ffffff !important;
      background-color: #ffffff !important;
      border: 1px solid var(--border-subtle, rgba(26, 26, 26, 0.08)) !important;
      box-shadow: var(--shadow-soft, 0 8px 24px rgba(15, 23, 42, 0.06)) !important;
    }

    body.dark-mode #todo-calendar-view-container .todo-cal-card,
    html.dark #todo-calendar-view-container .todo-cal-card,
    [data-theme="dark"] #todo-calendar-view-container .todo-cal-card,
    body.dark-mode #todo-calendar-view-container .compact-search-cal-wrapper,
    html.dark #todo-calendar-view-container .compact-search-cal-wrapper,
    [data-theme="dark"] #todo-calendar-view-container .compact-search-cal-wrapper,
    body.dark-mode .compact-search-cal-wrapper,
    html.dark .compact-search-cal-wrapper,
    [data-theme="dark"] .compact-search-cal-wrapper {
      background: #18181b !important;
      background-color: #18181b !important;
      border: 1px solid var(--border-subtle, rgba(234, 234, 234, 0.09)) !important;
      box-shadow: var(--shadow-soft, 0 8px 28px rgba(0, 0, 0, 0.45)) !important;
    }

    /* 3. Board Columns & Calendar Selected-Day Tasks Panel — Solid container surfaces with crisp card contrast */
    .board-column,
    #board-view-container .board-column,
    #todo-cal-day-tasks-panel,
    #todo-calendar-view-container #todo-cal-day-tasks-panel {
      background: #f1f5f9 !important;
      background-color: #f1f5f9 !important;
      border: 1px solid var(--border-subtle, rgba(26, 26, 26, 0.08)) !important;
      box-shadow: var(--shadow-soft, 0 8px 24px rgba(15, 23, 42, 0.06)) !important;
    }

    body.dark-mode .board-column,
    html.dark .board-column,
    [data-theme="dark"] .board-column,
    body.dark-mode #board-view-container .board-column,
    html.dark #board-view-container .board-column,
    [data-theme="dark"] #board-view-container .board-column,
    body.dark-mode #todo-cal-day-tasks-panel,
    html.dark #todo-cal-day-tasks-panel,
    [data-theme="dark"] #todo-cal-day-tasks-panel,
    body.dark-mode #todo-calendar-view-container #todo-cal-day-tasks-panel,
    html.dark #todo-calendar-view-container #todo-cal-day-tasks-panel,
    [data-theme="dark"] #todo-calendar-view-container #todo-cal-day-tasks-panel {
      background: #121216 !important;
      background-color: #121216 !important;
      border: 1px solid var(--border-subtle, rgba(234, 234, 234, 0.09)) !important;
      box-shadow: var(--shadow-soft, 0 8px 28px rgba(0, 0, 0, 0.45)) !important;
    }

    .board-column.drag-over,
    #board-view-container .board-column.drag-over {
      background: #e6f4f1 !important;
      background-color: #e6f4f1 !important;
    }
    body.dark-mode .board-column.drag-over,
    html.dark .board-column.drag-over,
    [data-theme="dark"] .board-column.drag-over,
    body.dark-mode #board-view-container .board-column.drag-over,
    html.dark #board-view-container .board-column.drag-over,
    [data-theme="dark"] #board-view-container .board-column.drag-over {
      background: #132220 !important;
      background-color: #132220 !important;
    }

    /* ======================================================================
       UNIFIED CROSS-DEVICE AUTH (GOOGLE + LINKED EMAIL/PASSWORD) & OFFICE PC UI
       ====================================================================== */
    .velocity-work-login-drawer-wrap {
      padding: 0 2px;
      margin: 8px 0 12px;
    }

    .velocity-settings-auth-companion {
      margin: -4px 0 14px;
    }

    .velocity-auth-card {
      background: var(--bg-surface, #ffffff);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      border-radius: 16px;
      padding: 13px 14px;
      box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
      transition: border-color 0.2s ease, background 0.2s ease;
    }

    body.dark-mode .velocity-auth-card,
    html.dark .velocity-auth-card,
    [data-theme="dark"] .velocity-auth-card {
      background: #18181b;
      border-color: rgba(255, 255, 255, 0.08);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    }

    .velocity-auth-card.is-linked {
      border-color: rgba(16, 185, 129, 0.28);
    }

    .velocity-auth-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .velocity-auth-card-title-row {
      display: flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
      flex: 1;
    }

    .velocity-auth-icon-badge {
      width: 28px;
      height: 28px;
      border-radius: 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(13, 148, 136, 0.12);
      color: var(--accent-primary, #0d9488);
      flex-shrink: 0;
    }

    .velocity-auth-icon-badge.is-linked {
      background: rgba(16, 185, 129, 0.14);
      color: #10b981;
    }

    .velocity-auth-card-title {
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--text-primary, #18181b);
      line-height: 1.25;
    }

    body.dark-mode .velocity-auth-card-title,
    html.dark .velocity-auth-card-title,
    [data-theme="dark"] .velocity-auth-card-title {
      color: #f4f4f5;
    }

    .velocity-auth-card-sub,
    .velocity-auth-card-desc {
      font-size: 0.74rem;
      line-height: 1.45;
      color: var(--text-secondary, #64748b);
      margin: 6px 0 0;
    }

    body.dark-mode .velocity-auth-card-sub,
    html.dark .velocity-auth-card-sub,
    [data-theme="dark"] .velocity-auth-card-sub,
    body.dark-mode .velocity-auth-card-desc,
    html.dark .velocity-auth-card-desc,
    [data-theme="dark"] .velocity-auth-card-desc {
      color: #a1a1aa;
    }

    .velocity-auth-status-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 9px;
      border-radius: 999px;
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      white-space: nowrap;
    }

    .velocity-auth-status-chip.is-linked {
      background: rgba(16, 185, 129, 0.14);
      color: #10b981;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .velocity-auth-status-chip.is-unlinked {
      background: rgba(245, 158, 11, 0.13);
      color: #d97706;
      border: 1px solid rgba(245, 158, 11, 0.28);
    }

    body.dark-mode .velocity-auth-status-chip.is-unlinked,
    html.dark .velocity-auth-status-chip.is-unlinked,
    [data-theme="dark"] .velocity-auth-status-chip.is-unlinked {
      color: #fbbf24;
    }

    .velocity-auth-status-chip.is-local {
      background: rgba(148, 163, 184, 0.14);
      color: var(--text-secondary, #64748b);
    }

    .velocity-dual-entry-stack {
      display: flex;
      flex-direction: column;
      gap: 7px;
      margin-top: 10px;
    }

    .velocity-dual-btn {
      width: 100%;
      min-height: 38px;
      padding: 8px 12px;
      border-radius: 11px;
      font-size: 0.79rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      transition: transform 0.14s ease, filter 0.16s ease, background 0.18s ease;
    }

    .velocity-dual-btn:active {
      transform: scale(0.98);
    }

    .velocity-dual-btn.is-google {
      background: var(--accent-primary, #0d9488);
      color: #ffffff;
      border: none;
      box-shadow: 0 6px 16px -6px rgba(13, 148, 136, 0.45);
    }

    .velocity-dual-btn.is-email {
      background: #F1F5F9;
      color: var(--text-primary, #18181b);
      border: 1px solid rgba(15, 23, 42, 0.12);
    }

    .velocity-dual-btn.is-email.is-onboard {
      height: 46px;
      border-radius: 15px;
      font-size: 14px;
      font-weight: 600;
      background: #F8FAFC;
      border: 1px solid rgba(15, 23, 42, 0.12);
    }

    body.dark-mode .velocity-dual-btn.is-email,
    html.dark .velocity-dual-btn.is-email,
    [data-theme="dark"] .velocity-dual-btn.is-email {
      background: #1E222D;
      color: #f4f4f5;
      border-color: rgba(255, 255, 255, 0.14);
    }

    .velocity-onboard-dual-slot {
      width: 100%;
      margin-top: 0;
      text-align: center;
    }

    .velocity-onboard-dual-sub {
      display: none;
    }

    .velocity-auth-mode-tabs {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 5px;
      background: rgba(15, 23, 42, 0.05);
      padding: 4px;
      border-radius: 11px;
      margin: 11px 0 10px;
    }

    body.dark-mode .velocity-auth-mode-tabs,
    html.dark .velocity-auth-mode-tabs,
    [data-theme="dark"] .velocity-auth-mode-tabs {
      background: rgba(255, 255, 255, 0.06);
    }

    .velocity-auth-mode-tab {
      border: none;
      background: transparent;
      color: var(--text-secondary, #64748b);
      font-size: 0.73rem;
      font-weight: 700;
      padding: 7px 6px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.16s ease, color 0.16s ease;
    }

    .velocity-auth-mode-tab.active {
      background: var(--bg-surface, #ffffff);
      color: var(--text-primary, #18181b);
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    }

    body.dark-mode .velocity-auth-mode-tab.active,
    html.dark .velocity-auth-mode-tab.active,
    [data-theme="dark"] .velocity-auth-mode-tab.active {
      background: #27272a;
      color: #ffffff;
    }

    .velocity-dual-auth-form,
    .velocity-inline-pw-form {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 9px;
    }

    .velocity-pw-field-wrap {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
    }

    .velocity-auth-input {
      width: 100%;
      height: 38px;
      padding: 0 38px 0 12px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.14));
      background: rgba(15, 23, 42, 0.03);
      color: var(--text-primary, #18181b);
      font-size: 0.81rem;
      outline: none;
      transition: border-color 0.16s ease, background 0.16s ease;
    }

    body.dark-mode .velocity-auth-input,
    html.dark .velocity-auth-input,
    [data-theme="dark"] .velocity-auth-input {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.12);
      color: #f4f4f5;
    }

    .velocity-auth-input:focus {
      border-color: var(--accent-primary, #0d9488);
    }

    .velocity-pw-eye-btn {
      position: absolute;
      right: 4px;
      top: 50%;
      transform: translateY(-50%);
      width: 34px;
      height: 34px;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--text-secondary, #64748b);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .velocity-pw-eye-btn:hover {
      color: var(--text-primary, #18181b);
    }

    body.dark-mode .velocity-pw-eye-btn:hover,
    html.dark .velocity-pw-eye-btn:hover,
    [data-theme="dark"] .velocity-pw-eye-btn:hover {
      color: #ffffff;
    }

    .velocity-inline-pw-actions,
    .velocity-linked-footer-actions,
    .velocity-settings-pw-head-actions {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
    }

    .velocity-linked-footer-actions {
      margin-top: 9px;
    }

    .velocity-mini-btn {
      height: 32px;
      padding: 0 11px;
      border-radius: 9px;
      font-size: 0.74rem;
      font-weight: 700;
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.12));
      background: rgba(15, 23, 42, 0.04);
      color: var(--text-primary, #18181b);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
      transition: transform 0.12s ease, filter 0.15s ease;
    }

    body.dark-mode .velocity-mini-btn,
    html.dark .velocity-mini-btn,
    [data-theme="dark"] .velocity-mini-btn {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.11);
      color: #e4e4e7;
    }

    .velocity-mini-btn.is-primary {
      background: var(--accent-primary, #0d9488);
      border-color: transparent;
      color: #ffffff;
    }

    .velocity-mini-btn.is-full {
      width: 100%;
      height: 38px;
      font-size: 0.8rem;
    }

    .velocity-auth-helper-note {
      font-size: 0.72rem;
      line-height: 1.4;
      color: var(--text-secondary, #64748b);
      margin-top: 2px;
    }

    .velocity-auth-feedback {
      margin-top: 6px;
      padding: 9px 11px;
      border-radius: 10px;
      font-size: 0.75rem;
      line-height: 1.42;
    }

    .velocity-auth-feedback.is-error {
      background: rgba(239, 68, 68, 0.11);
      border: 1px solid rgba(239, 68, 68, 0.28);
      color: #dc2626;
    }

    body.dark-mode .velocity-auth-feedback.is-error,
    html.dark .velocity-auth-feedback.is-error,
    [data-theme="dark"] .velocity-auth-feedback.is-error {
      color: #fca5a5;
    }

    .velocity-auth-feedback.is-success {
      background: rgba(16, 185, 129, 0.12);
      border: 1px solid rgba(16, 185, 129, 0.3);
      color: #059669;
    }

    body.dark-mode .velocity-auth-feedback.is-success,
    html.dark .velocity-auth-feedback.is-success,
    [data-theme="dark"] .velocity-auth-feedback.is-success {
      color: #6ee7b7;
    }

    .velocity-auth-feedback-actions {
      margin-top: 8px;
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    /* Email Verification Pending Banner */
    .velocity-verify-banner {
      background: rgba(245, 158, 11, 0.11);
      border: 1px solid rgba(245, 158, 11, 0.32);
      border-radius: 14px;
      padding: 11px 13px;
      margin-bottom: 9px;
    }

    .velocity-verify-head {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .velocity-verify-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #f59e0b;
      box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
      flex-shrink: 0;
    }

    .velocity-verify-title {
      font-size: 0.8rem;
      font-weight: 700;
      color: #b45309;
    }

    body.dark-mode .velocity-verify-title,
    html.dark .velocity-verify-title,
    [data-theme="dark"] .velocity-verify-title {
      color: #fcd34d;
    }

    .velocity-verify-desc {
      font-size: 0.74rem;
      line-height: 1.42;
      color: var(--text-secondary, #64748b);
      margin: 5px 0 9px;
    }

    body.dark-mode .velocity-verify-desc,
    html.dark .velocity-verify-desc,
    [data-theme="dark"] .velocity-verify-desc {
      color: #d4d4d8;
    }

    .velocity-verify-actions {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
    }

    /* Dual-Entry Modal Overlay & Card (Minimal, High-Opacity, Clean Rhythm) */
    .velocity-dual-auth-modal-overlay {
      background: rgba(15, 23, 42, 0.68) !important;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    body.dark-mode .velocity-dual-auth-modal-overlay,
    html.dark .velocity-dual-auth-modal-overlay,
    [data-theme="dark"] .velocity-dual-auth-modal-overlay {
      background: rgba(3, 5, 9, 0.82) !important;
    }

    .velocity-dual-auth-modal-card {
      box-sizing: border-box;
      max-width: 392px;
      width: calc(100vw - 28px);
      padding: 20px !important;
      gap: 12px !important;
      border-radius: 24px !important;
      background: #FFFFFF !important;
      border: 1px solid rgba(15, 23, 42, 0.1) !important;
      box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.28) !important;
      text-align: left;
    }

    body.dark-mode .velocity-dual-auth-modal-card,
    html.dark .velocity-dual-auth-modal-card,
    [data-theme="dark"] .velocity-dual-auth-modal-card {
      background: #14171F !important;
      border: 1px solid rgba(255, 255, 255, 0.14) !important;
      box-shadow: 0 28px 68px -12px rgba(0, 0, 0, 0.84) !important;
      color: #F8FAFC !important;
    }

    .velocity-dual-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 0;
    }

    .velocity-dual-auth-modal-card .app-confirm-title {
      font-size: 18px;
      font-weight: 750;
      letter-spacing: -0.02em;
    }

    .velocity-dual-auth-modal-card .app-confirm-sub {
      font-size: 12.5px;
      margin-top: 2px;
      color: var(--text-secondary, #64748b);
    }

    body.dark-mode .velocity-dual-auth-modal-card .app-confirm-sub,
    html.dark .velocity-dual-auth-modal-card .app-confirm-sub,
    [data-theme="dark"] .velocity-dual-auth-modal-card .app-confirm-sub {
      color: #94A3B8;
    }

    .velocity-modal-close-btn {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      background: #F1F5F9;
      color: var(--text-secondary, #475569);
      font-size: 1.2rem;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: background 0.16s ease, color 0.16s ease;
    }

    .velocity-modal-close-btn:hover {
      background: #E2E8F0;
      color: #0F172A;
    }

    body.dark-mode .velocity-modal-close-btn,
    html.dark .velocity-modal-close-btn,
    [data-theme="dark"] .velocity-modal-close-btn {
      background: #1E222D;
      border-color: rgba(255, 255, 255, 0.12);
      color: #CBD5E1;
    }

    .velocity-dual-auth-modal-card .velocity-dual-btn.is-google {
      height: 44px;
      border-radius: 12px;
      background: #F8FAFC;
      color: #0F172A;
      border: 1px solid rgba(15, 23, 42, 0.12);
      box-shadow: none;
      font-size: 13.5px;
      font-weight: 600;
    }

    body.dark-mode .velocity-dual-auth-modal-card .velocity-dual-btn.is-google,
    html.dark .velocity-dual-auth-modal-card .velocity-dual-btn.is-google,
    [data-theme="dark"] .velocity-dual-auth-modal-card .velocity-dual-btn.is-google {
      background: #FFFFFF;
      color: #0F172A;
      border-color: transparent;
    }

    .velocity-dual-divider {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 0;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted, #94A3B8);
    }

    .velocity-dual-divider::before,
    .velocity-dual-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: rgba(15, 23, 42, 0.09);
    }

    body.dark-mode .velocity-dual-divider::before,
    body.dark-mode .velocity-dual-divider::after,
    html.dark .velocity-dual-divider::before,
    html.dark .velocity-dual-divider::after,
    [data-theme="dark"] .velocity-dual-divider::before,
    [data-theme="dark"] .velocity-dual-divider::after {
      background: rgba(255, 255, 255, 0.11);
    }

    .velocity-dual-auth-modal-card .velocity-auth-mode-tabs {
      margin: 0;
      padding: 4px;
      background: #F1F5F9;
      border: 1px solid rgba(15, 23, 42, 0.06);
      border-radius: 12px;
      gap: 4px;
    }

    body.dark-mode .velocity-dual-auth-modal-card .velocity-auth-mode-tabs,
    html.dark .velocity-dual-auth-modal-card .velocity-auth-mode-tabs,
    [data-theme="dark"] .velocity-dual-auth-modal-card .velocity-auth-mode-tabs {
      background: #1C202B;
      border-color: rgba(255, 255, 255, 0.08);
    }

    .velocity-dual-auth-modal-card .velocity-auth-mode-tab {
      white-space: nowrap;
      padding: 8px 6px;
      font-size: 12.5px;
      font-weight: 600;
      border-radius: 9px;
    }

    .velocity-dual-auth-modal-card .velocity-auth-mode-tab.active {
      background: #FFFFFF;
      color: #0F172A;
      box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    }

    body.dark-mode .velocity-dual-auth-modal-card .velocity-auth-mode-tab.active,
    html.dark .velocity-dual-auth-modal-card .velocity-auth-mode-tab.active,
    [data-theme="dark"] .velocity-dual-auth-modal-card .velocity-auth-mode-tab.active {
      background: #2B3140;
      color: #FFFFFF;
    }

    .velocity-dual-auth-modal-card .velocity-dual-auth-form {
      margin: 0;
      gap: 10px;
    }

    .velocity-dual-auth-modal-card .velocity-auth-input {
      box-sizing: border-box;
      height: 44px;
      border-radius: 12px;
      padding: 0 40px 0 14px;
      font-size: 14px;
      background: #F8FAFC;
      border: 1px solid rgba(15, 23, 42, 0.14);
      color: #0F172A;
    }

    .velocity-dual-auth-modal-card .velocity-auth-input:focus {
      background: #FFFFFF;
      border-color: var(--accent-primary, #0d9488);
      box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
    }

    body.dark-mode .velocity-dual-auth-modal-card .velocity-auth-input,
    html.dark .velocity-dual-auth-modal-card .velocity-auth-input,
    [data-theme="dark"] .velocity-dual-auth-modal-card .velocity-auth-input {
      background: #1C202B;
      border-color: rgba(255, 255, 255, 0.15);
      color: #F8FAFC;
    }

    body.dark-mode .velocity-dual-auth-modal-card .velocity-auth-input:focus,
    html.dark .velocity-dual-auth-modal-card .velocity-auth-input:focus,
    [data-theme="dark"] .velocity-dual-auth-modal-card .velocity-auth-input:focus {
      background: #222734;
      border-color: #2DD4BF;
      box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
    }

    .velocity-dual-auth-modal-card .velocity-pw-eye-btn {
      right: 6px;
      width: 36px;
      height: 36px;
    }

    .velocity-dual-auth-modal-card .velocity-mini-btn.is-full {
      height: 44px;
      border-radius: 12px;
      font-size: 14px;
      font-weight: 700;
      margin-top: 2px;
    }

    .velocity-dual-auth-modal-card .velocity-auth-helper-note {
      font-size: 12px;
      color: var(--text-muted, #64748b);
      text-align: center;
      margin: 0;
    }

    /* Softly Disabled Office-PC Google-Only Integrations (Drive & Calendar) */
    .sleek-btn.is-office-disabled,
    button.is-office-disabled {
      opacity: 0.62 !important;
      cursor: not-allowed !important;
      filter: grayscale(0.25);
    }

    /* Profile Drawer Work PC Login Section Hidden */
    aside#profile-side-drawer > div#side-profile-work-login-section {
      display: none !important;
    }

    .velocity-auth-card.is-minimal {
      padding: 8px 11px;
      border-radius: 13px;
      box-shadow: none;
    }

    .velocity-auth-card.is-minimal .velocity-auth-card-head {
      gap: 8px;
      flex-wrap: nowrap;
    }

    .velocity-auth-card.is-minimal .velocity-auth-card-title-row {
      gap: 7px;
    }

    .velocity-auth-card.is-minimal .velocity-auth-icon-badge {
      width: 24px;
      height: 24px;
      border-radius: 7px;
    }

    .velocity-auth-card.is-minimal .velocity-auth-card-title {
      font-size: 0.78rem;
      font-weight: 650;
      white-space: nowrap;
    }

    .velocity-auth-card.is-minimal .velocity-auth-status-chip {
      padding: 2px 7px;
      font-size: 0.64rem;
    }

    .velocity-auth-card.is-minimal .velocity-mini-btn {
      height: 27px;
      padding: 0 9px;
      font-size: 0.71rem;
      border-radius: 8px;
    }

    .velocity-minimal-btn-pair {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }

    .velocity-inline-pw-form.is-minimal {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.07));
      gap: 6px;
    }

    body.dark-mode .velocity-inline-pw-form.is-minimal,
    html.dark .velocity-inline-pw-form.is-minimal,
    [data-theme="dark"] .velocity-inline-pw-form.is-minimal {
      border-top-color: rgba(255, 255, 255, 0.07);
    }

    .velocity-minimal-pw-row {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .velocity-minimal-pw-row .velocity-auth-input,
    .velocity-inline-pw-form.is-minimal .velocity-auth-input {
      height: 32px;
      font-size: 0.76rem;
      border-radius: 8px;
      padding: 0 32px 0 10px;
    }

    .velocity-minimal-pw-row .velocity-mini-btn {
      height: 32px;
      padding: 0 11px;
      flex-shrink: 0;
    }

    .velocity-minimal-sub-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }

    .velocity-text-link-btn {
      border: none;
      background: transparent;
      padding: 2px 0;
      font-size: 0.69rem;
      font-weight: 600;
      color: var(--text-secondary, #64748b);
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .velocity-text-link-btn:hover {
      color: var(--accent-primary, #0d9488);
    }

    .velocity-verify-banner.is-minimal {
      padding: 6px 9px;
      margin-bottom: 7px;
      border-radius: 9px;
    }

    .velocity-verify-banner.is-minimal .velocity-verify-head {
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 6px;
    }

    .velocity-verify-banner.is-minimal .velocity-verify-title {
      font-size: 0.72rem;
      flex: 1;
    }

    /* Minimalistic Settings Dual-Auth Companion Card (Docked to Account Card Above) */
    #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card.has-auth-companion,
    #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card:has(+ #settings-dual-auth-companion) {
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
      border-bottom-color: transparent !important;
      margin-bottom: 0 !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card.has-auth-companion,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card.has-auth-companion,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card.has-auth-companion,
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card:has(+ #settings-dual-auth-companion),
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card:has(+ #settings-dual-auth-companion),
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-account-profile-card:has(+ #settings-dual-auth-companion) {
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion {
      width: 100%;
      box-sizing: border-box;
      margin: -14px 0 6px 0;
      padding: 0;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1) {
      width: 100%;
      box-sizing: border-box;
      padding: 10px 16px 11px;
      border-radius: 0 0 22px 22px;
      background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.9));
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-top: 1px solid rgba(15, 23, 42, 0.07);
      box-shadow: 0 10px 26px -10px rgba(15, 23, 42, 0.12);
      overflow: hidden;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1).is-expanded {
      padding: 11px 16px 14px;
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1),
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1),
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1) {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
      border: 1px solid rgba(255, 255, 255, 0.11);
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.58);
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1).is-linked {
      border-color: rgba(15, 23, 42, 0.08);
      border-top-color: rgba(16, 185, 129, 0.16);
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1).is-linked,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1).is-linked,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1).is-linked {
      border-color: rgba(255, 255, 255, 0.11);
      border-top-color: rgba(16, 185, 129, 0.22);
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      min-width: 0;
      flex-wrap: nowrap;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-title-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1 1 auto;
      min-width: 0;
      flex-wrap: nowrap;
      overflow: visible;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-icon-badge {
      width: 24px;
      height: 24px;
      border-radius: 7px;
      flex-shrink: 0;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-title {
      font-size: 0.79rem;
      font-weight: 600;
      letter-spacing: -0.01em;
      white-space: nowrap !important;
      word-break: keep-all;
      flex-shrink: 0;
      overflow: visible;
      text-overflow: clip;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-status-chip {
      flex-shrink: 0;
      padding: 2px 7px;
      font-size: 0.64rem;
      line-height: 1.3;
      white-space: nowrap;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-head > .velocity-mini-btn {
      flex-shrink: 0;
      height: 28px;
      padding: 0 11px;
      border-radius: 9px;
      font-size: 0.72rem;
      font-weight: 650;
      white-space: nowrap;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-settings-inline-auth-body.is-minimal,
    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-inline-pw-form.is-minimal {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid rgba(15, 23, 42, 0.08);
      width: 100%;
      box-sizing: border-box;
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-settings-inline-auth-body.is-minimal,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-settings-inline-auth-body.is-minimal,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-settings-inline-auth-body.is-minimal,
    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-inline-pw-form.is-minimal,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-inline-pw-form.is-minimal,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-inline-pw-form.is-minimal {
      border-top-color: rgba(255, 255, 255, 0.08);
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-mode-tabs.is-minimal {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 4px;
      margin: 0 0 10px;
      padding: 3px;
      border-radius: 10px;
      width: 100%;
      box-sizing: border-box;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-mode-tabs.is-minimal .velocity-auth-mode-tab {
      padding: 6px 6px;
      font-size: 0.72rem;
      border-radius: 7px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-dual-auth-form.is-minimal {
      margin-top: 0;
      gap: 8px;
      width: 100%;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-minimal-pw-row {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-pw-field-wrap {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
      min-width: 0;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-minimal-pw-row .velocity-pw-field-wrap {
      flex: 1 1 auto;
      width: auto;
      min-width: 0;
    }

    /* Restore crisp input styling (overrides global .settings-list-container input purge rule) */
    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input {
      all: revert !important;
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      height: 38px !important;
      box-sizing: border-box !important;
      padding: 0 38px 0 12px !important;
      border-radius: 10px !important;
      border: 1px solid rgba(15, 23, 42, 0.12) !important;
      background: rgba(15, 23, 42, 0.04) !important;
      background-color: rgba(15, 23, 42, 0.04) !important;
      color: #18181b !important;
      font-family: inherit !important;
      font-size: 13.5px !important;
      font-weight: 500 !important;
      text-align: left !important;
      outline: none !important;
      box-shadow: none !important;
      transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input::placeholder {
      color: #64748b !important;
      opacity: 0.85 !important;
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input {
      background: rgba(255, 255, 255, 0.06) !important;
      background-color: rgba(255, 255, 255, 0.06) !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      color: #f4f4f5 !important;
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input::placeholder,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input::placeholder,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input::placeholder {
      color: #a1a1aa !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input:focus {
      border: 1px solid var(--accent-primary, #10b981) !important;
      background: rgba(15, 23, 42, 0.05) !important;
      background-color: rgba(15, 23, 42, 0.05) !important;
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.16) !important;
    }

    body.dark-mode #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input:focus,
    html.dark #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input:focus,
    [data-theme="dark"] #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input:focus {
      background: rgba(255, 255, 255, 0.08) !important;
      background-color: rgba(255, 255, 255, 0.08) !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input.is-invalid,
    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion input.velocity-auth-input.is-invalid:focus {
      border: 1px solid #ef4444 !important;
      box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.16) !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-pw-eye-btn {
      position: absolute;
      right: 4px;
      top: 50%;
      transform: translateY(-50%);
      width: 34px;
      height: 34px;
      z-index: 2;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-minimal-pw-row .velocity-mini-btn {
      height: 38px;
      padding: 0 14px;
      border-radius: 10px;
      font-size: 0.78rem;
      flex-shrink: 0;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-dual-auth-form.is-minimal .velocity-mini-btn.is-full {
      height: 38px;
      font-size: 0.8rem;
      border-radius: 10px;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-minimal-sub-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 0;
      width: 100%;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-text-link-btn {
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-verify-banner.is-minimal {
      padding: 8px 10px;
      margin-bottom: 10px;
      border-radius: 11px;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-verify-banner.is-minimal .velocity-verify-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-verify-banner.is-minimal .velocity-verify-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-left: auto;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion #settings-auth-feedback {
      box-sizing: border-box !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin-top: 6px !important;
      padding: 10px 12px !important;
      border-radius: 10px !important;
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
      overflow: hidden !important;
      position: relative !important;
      left: 0 !important;
      right: 0 !important;
      transform: none !important;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion #settings-auth-feedback > div:nth-of-type(1) {
      font-size: 0.74rem;
      font-weight: 500;
      line-height: 1.35;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion #settings-auth-feedback > div:nth-of-type(2) {
      margin-top: 8px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 6px;
      flex-wrap: wrap;
      width: 100%;
    }

    #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion #settings-auth-feedback > div:nth-of-type(2) > button:nth-of-type(1) {
      width: 100%;
      max-width: 100%;
      min-height: 32px;
      height: auto;
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 0.74rem;
      font-weight: 650;
      white-space: normal;
      text-align: center;
      line-height: 1.25;
      box-sizing: border-box;
    }

    @media (max-width: 390px) {
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion > div:nth-of-type(1) {
        padding: 9px 14px 10px;
      }
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-head {
        gap: 6px;
      }
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-title-row {
        gap: 6px;
      }
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-icon-badge {
        width: 22px;
        height: 22px;
      }
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-title {
        font-size: 0.75rem;
      }
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-status-chip {
        padding: 1px 6px;
        font-size: 0.62rem;
      }
      #sheet-settings-menu #settings-modal .settings-list-container #settings-dual-auth-companion .velocity-auth-card-head > .velocity-mini-btn {
        height: 27px;
        padding: 0 9px;
        font-size: 0.7rem;
      }
    }

    /* ==========================================================================
       SEARCH & CALENDAR SHEET (#sheet-cal-search) TASK FEED LAYOUT FIX
       Targets: div#sheet-cal-search > div:nth-of-type(1) > div:nth-of-type(4)
       ========================================================================== */
    #sheet-cal-search,
    #sheet-cal-search .bottom-sheet,
    #sheet-cal-search .search-view-master-container {
      transition: none !important;
    }

    #sheet-cal-search .bottom-sheet.search-view-master-container {
      height: 100% !important;
      max-height: 100% !important;
      animation: slideUpSheet 0.24s cubic-bezier(0.22, 1, 0.36, 1) both !important;
    }

    div#sheet-cal-search > div:nth-of-type(1) > div:nth-of-type(4) {
      border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08)) !important;
      margin-top: 10px !important;
      padding: 10px 0 0 0 !important;
      flex: 1 1 auto !important;
      display: flex !important;
      flex-direction: column !important;
      min-height: 0 !important;
      width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden !important;
    }

    body.dark-mode div#sheet-cal-search > div:nth-of-type(1) > div:nth-of-type(4),
    html.dark div#sheet-cal-search > div:nth-of-type(1) > div:nth-of-type(4),
    [data-theme="dark"] div#sheet-cal-search > div:nth-of-type(1) > div:nth-of-type(4) {
      border-top-color: rgba(255, 255, 255, 0.08) !important;
    }

    div#sheet-cal-search > div:nth-of-type(1) > div:nth-of-type(4) > #cal-popup-grouped-feed.search-task-scroll-area {
      flex: 1 1 auto !important;
      min-height: 0 !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding: 2px 2px 32px 2px !important;
      margin: 0 !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 14px !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
    }

    #cal-popup-grouped-feed > .squircle-card,
    #cal-popup-grouped-feed > .search-feed-date-group {
      padding: 0 !important;
      margin: 0 !important;
      width: 100% !important;
      box-sizing: border-box !important;
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 7px !important;
    }

    #cal-popup-grouped-feed .search-date-header {
      font-size: 11.5px !important;
      font-weight: 800 !important;
      letter-spacing: 0.02em !important;
      color: var(--accent-primary, #0d9488) !important;
      margin: 0 !important;
      padding: 0 4px !important;
      line-height: 1.3 !important;
    }

    #cal-popup-grouped-feed .group-items {
      display: flex !important;
      flex-direction: column !important;
      gap: 8px !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    /* Unified To-Do List View Task Cards & Expanded View inside Search Feed */
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap {
      margin: 0 !important;
      width: 100% !important;
      box-sizing: border-box !important;
      border-radius: 20px !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap.task-expanded {
      border-radius: 26px !important;
      overflow: visible !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card {
      width: 100% !important;
      box-sizing: border-box !important;
      margin: 0 !important;
      background: var(--bg-surface, #ffffff) !important;
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08)) !important;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
      transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
    }

    body.dark-mode #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card,
    html.dark #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card,
    [data-theme="dark"] #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card {
      background: #18181b !important;
      border-color: rgba(255, 255, 255, 0.09) !important;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card:not(.expanded):not(.sliding-to-bottom) {
      height: auto !important;
      min-height: 52px !important;
      max-height: none !important;
      padding: 11px 14px !important;
      border-radius: 20px !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.expanded {
      height: auto !important;
      max-height: none !important;
      padding: 13px 14px 12px !important;
      border-radius: 26px !important;
      display: block !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap .drag-grip {
      display: none !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap .task-select-badge {
      display: none !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap .task-card.expanded .task-options-row {
      margin-top: 8px !important;
    }

    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap .task-card.expanded .inline-active-fields-slot,
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap .task-card.expanded .inline-more-menu-slot {
      width: 100% !important;
      box-sizing: border-box !important;
    }

    /* ==========================================================================
       INBOX INSIDE SEARCH PILL (#todo-fab-search-pill), SEARCH SHEET & INBOX VIEW
       ========================================================================== */
    #todo-fab-search-pill.expanded {
      width: min(340px, calc(100vw - 32px)) !important;
      gap: 0;
    }

    #todo-fab-search-pill .fab-search-inbox-btn {
      position: relative;
      display: none;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 50%;
      flex-shrink: 0;
      margin-right: 4px;
      background: var(--bg-elevated);
      border: none;
      color: var(--accent-primary);
      cursor: pointer;
      transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
    }

    #todo-fab-search-pill.expanded .fab-search-inbox-btn {
      display: inline-flex;
    }

    #todo-fab-search-pill .fab-search-inbox-btn:hover {
      background: rgba(13, 148, 136, 0.14);
    }

    body.dark-mode #todo-fab-search-pill .fab-search-inbox-btn:hover,
    html.dark #todo-fab-search-pill .fab-search-inbox-btn:hover,
    [data-theme="dark"] #todo-fab-search-pill .fab-search-inbox-btn:hover {
      background: rgba(45, 212, 191, 0.16);
    }

    #todo-fab-search-pill .fab-inbox-label {
      display: none;
    }

    #todo-fab-search-pill .fab-inbox-count {
      position: absolute;
      top: -4px;
      right: -4px;
      min-width: 15px;
      height: 15px;
      padding: 0 3.5px;
      border-radius: 999px;
      align-items: center;
      justify-content: center;
      font-size: 9.5px;
      font-weight: 800;
      line-height: 1;
      background: var(--accent-primary, #0d9488);
      color: #ffffff;
      box-shadow: 0 0 0 1.5px var(--bg-surface, #ffffff);
      pointer-events: none;
    }

    body.dark-mode #todo-fab-search-pill .fab-inbox-count,
    html.dark #todo-fab-search-pill .fab-inbox-count,
    [data-theme="dark"] #todo-fab-search-pill .fab-inbox-count {
      background: #14b8a6;
      color: #042f2e;
      box-shadow: 0 0 0 1.5px #18181d;
    }

    /* Quick Inbox Entry & Filter Row inside #sheet-cal-search */
    #sheet-cal-search .search-inbox-toolbar-row {
      width: 100%;
      margin-top: 8px;
      display: flex;
      align-items: stretch;
      gap: 8px;
      flex-shrink: 0;
      box-sizing: border-box;
    }

    #sheet-cal-search .search-inbox-filter-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: 14px;
      background: var(--bg-surface, #ffffff);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      color: var(--text-secondary);
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
      transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }

    #sheet-cal-search .search-inbox-filter-chip:hover {
      border-color: rgba(13, 148, 136, 0.35);
      color: var(--text-primary);
    }

    #sheet-cal-search .search-inbox-filter-chip.active {
      background: rgba(13, 148, 136, 0.14);
      border-color: var(--accent-primary, #0d9488);
      color: var(--accent-primary, #0d9488);
    }

    body.dark-mode #sheet-cal-search .search-inbox-filter-chip,
    html.dark #sheet-cal-search .search-inbox-filter-chip,
    [data-theme="dark"] #sheet-cal-search .search-inbox-filter-chip {
      background: rgba(24, 24, 27, 0.92);
      border-color: rgba(255, 255, 255, 0.09);
      color: #a1a1aa;
    }

    body.dark-mode #sheet-cal-search .search-inbox-filter-chip.active,
    html.dark #sheet-cal-search .search-inbox-filter-chip.active,
    [data-theme="dark"] #sheet-cal-search .search-inbox-filter-chip.active {
      background: rgba(45, 212, 191, 0.16);
      border-color: #2dd4bf;
      color: #2dd4bf;
    }

    #sheet-cal-search .search-inbox-entry-row {
      flex: 1 1 auto;
      min-width: 0;
      margin-top: 0;
      padding: 9px 12px;
      border-radius: 14px;
      background: var(--bg-surface, #ffffff);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      cursor: pointer;
      box-sizing: border-box;
      transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    }

    #sheet-cal-search .search-inbox-entry-row:hover {
      border-color: rgba(13, 148, 136, 0.35);
    }

    body.dark-mode #sheet-cal-search .search-inbox-entry-row,
    html.dark #sheet-cal-search .search-inbox-entry-row,
    [data-theme="dark"] #sheet-cal-search .search-inbox-entry-row {
      background: rgba(24, 24, 27, 0.92);
      border-color: rgba(255, 255, 255, 0.09);
    }

    /* Compact One-Tap "→ Today" Triage Button on Inbox Task Rows */
    .inbox-triage-today-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      padding: 4px 9px;
      border-radius: 999px;
      background: rgba(13, 148, 136, 0.12);
      border: 1px solid rgba(13, 148, 136, 0.28);
      color: var(--accent-primary, #0d9488);
      font-size: 11px;
      font-weight: 800;
      line-height: 1.1;
      white-space: nowrap;
      flex-shrink: 0;
      cursor: pointer;
      margin-left: 6px;
      transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.15s ease;
    }

    .inbox-triage-today-btn:hover {
      background: rgba(13, 148, 136, 0.2);
      border-color: rgba(13, 148, 136, 0.45);
    }

    body.dark-mode .inbox-triage-today-btn,
    html.dark .inbox-triage-today-btn,
    [data-theme="dark"] .inbox-triage-today-btn {
      background: rgba(45, 212, 191, 0.14);
      border-color: rgba(45, 212, 191, 0.3);
      color: #2dd4bf;
    }

    body.dark-mode .inbox-triage-today-btn:hover,
    html.dark .inbox-triage-today-btn:hover,
    [data-theme="dark"] .inbox-triage-today-btn:hover {
      background: rgba(45, 212, 191, 0.22);
      border-color: rgba(45, 212, 191, 0.5);
    }

    #sheet-cal-search .search-inbox-entry-left {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    #sheet-cal-search .search-inbox-icon-wrap {
      width: 28px;
      height: 28px;
      border-radius: 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(13, 148, 136, 0.12);
      color: var(--accent-primary, #0d9488);
      flex-shrink: 0;
    }

    body.dark-mode #sheet-cal-search .search-inbox-icon-wrap,
    html.dark #sheet-cal-search .search-inbox-icon-wrap,
    [data-theme="dark"] #sheet-cal-search .search-inbox-icon-wrap {
      background: rgba(45, 212, 191, 0.14);
      color: #2dd4bf;
    }

    #sheet-cal-search .search-inbox-entry-title {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-primary);
    }

    #sheet-cal-search .search-inbox-entry-right {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--text-muted);
      flex-shrink: 0;
    }

    #sheet-cal-search .search-inbox-count-pill {
      min-width: 22px;
      height: 20px;
      padding: 0 7px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11.5px;
      font-weight: 800;
      background: var(--bg-elevated, rgba(15, 23, 42, 0.06));
      color: var(--text-secondary);
    }

    /* Dedicated Full-Viewport Inbox Section (#sheet-inbox-view) */
    #sheet-inbox-view.inbox-section-overlay {
      position: fixed;
      inset: 0;
      z-index: 74;
      display: none;
      flex-direction: column;
      background: var(--bg-color, var(--bg-canvas, #f8fafc));
      color: var(--text-primary);
      overflow: hidden;
      opacity: 0;
      transform: translate3d(0, 14px, 0);
      transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    #sheet-inbox-view.inbox-section-overlay.open {
      display: flex;
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }

    body.dark-mode #sheet-inbox-view.inbox-section-overlay,
    html.dark #sheet-inbox-view.inbox-section-overlay,
    [data-theme="dark"] #sheet-inbox-view.inbox-section-overlay {
      background: var(--bg-color, #09090b);
    }

    #sheet-inbox-view .inbox-section-shell {
      width: 100%;
      max-width: 680px;
      height: 100%;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      min-height: 0;
      box-sizing: border-box;
    }

    #sheet-inbox-view .inbox-top-banner {
      position: sticky;
      top: 0;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: max(env(safe-area-inset-top), 16px) 18px 14px 14px;
      background: var(--bg-color, var(--bg-canvas, #f8fafc));
      border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      flex-shrink: 0;
    }

    body.dark-mode #sheet-inbox-view .inbox-top-banner,
    html.dark #sheet-inbox-view .inbox-top-banner,
    [data-theme="dark"] #sheet-inbox-view .inbox-top-banner {
      background: var(--bg-color, #09090b);
      border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    #sheet-inbox-view .inbox-banner-left {
      display: flex;
      align-items: center;
      gap: 11px;
      min-width: 0;
    }

    #sheet-inbox-view .inbox-back-btn,
    #sheet-inbox-view .inbox-add-btn {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-surface, #ffffff);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      color: var(--text-primary);
      box-shadow: var(--shadow-soft);
      flex-shrink: 0;
      cursor: pointer;
      transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.16s ease;
    }

    #sheet-inbox-view .inbox-add-btn {
      background: var(--accent-primary, #0d9488);
      border-color: transparent;
      color: #ffffff;
    }

    body.dark-mode #sheet-inbox-view .inbox-back-btn,
    html.dark #sheet-inbox-view .inbox-back-btn,
    [data-theme="dark"] #sheet-inbox-view .inbox-back-btn {
      background: #18181b;
      border-color: rgba(255, 255, 255, 0.1);
      color: #f4f4f5;
    }

    #sheet-inbox-view .inbox-banner-icon {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(13, 148, 136, 0.12);
      border: 1px solid rgba(13, 148, 136, 0.24);
      color: var(--accent-primary, #0d9488);
      flex-shrink: 0;
    }

    body.dark-mode #sheet-inbox-view .inbox-banner-icon,
    html.dark #sheet-inbox-view .inbox-banner-icon,
    [data-theme="dark"] #sheet-inbox-view .inbox-banner-icon {
      background: rgba(45, 212, 191, 0.14);
      border-color: rgba(45, 212, 191, 0.28);
      color: #2dd4bf;
    }

    #sheet-inbox-view .inbox-banner-titles {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    #sheet-inbox-view .inbox-banner-heading {
      margin: 0;
      font-size: 24px;
      line-height: 1.15;
    }

    #sheet-inbox-view .inbox-banner-subtitle {
      margin: 2px 0 0 0;
      font-size: 12.5px;
      color: var(--text-muted);
    }

    div#sheet-inbox-view > div:nth-of-type(1) > div#inbox-task-list,
    #sheet-inbox-view .inbox-task-list {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 14px 16px calc(env(safe-area-inset-bottom, 24px) + 96px);
      display: flex;
      flex-direction: column;
      gap: 10px;
      box-sizing: border-box;
      align-items: stretch;
    }

    /* Prevent Flexbox from ever shrinking sibling tasks when a task is expanded inside #inbox-task-list */
    div#sheet-inbox-view > div:nth-of-type(1) > div#inbox-task-list > *,
    #sheet-inbox-view .inbox-task-list > *,
    #sheet-inbox-view .inbox-completed-section > * {
      flex: 0 0 auto !important;
      flex-shrink: 0 !important;
    }

    #sheet-inbox-view .squircle-card,
    #sheet-inbox-view .task-card,
    #sheet-inbox-view .task-card-swipe-wrap,
    #sheet-inbox-view .task-swipe-underlay {
      border-radius: 26px;
    }

    #sheet-inbox-view .inbox-list-task-wrap {
      margin: 0 !important;
      width: 100% !important;
      box-sizing: border-box !important;
      flex: 0 0 auto !important;
      flex-shrink: 0 !important;
      border-radius: 26px !important;
    }

    #sheet-inbox-view .inbox-list-task-wrap:not(.task-collapsing):not(.deleting) {
      height: auto !important;
      max-height: none !important;
    }

    #sheet-inbox-view .inbox-list-task-wrap.task-expanded {
      max-height: none !important;
      height: auto !important;
      overflow: visible !important;
      z-index: 25 !important;
    }

    #sheet-inbox-view .inbox-list-task-wrap > .task-card {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
      box-sizing: border-box !important;
      border-radius: 26px !important;
      background: var(--bg-surface, #ffffff);
      border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
      box-shadow: var(--shadow-soft, 0 2px 8px rgba(15, 23, 42, 0.04));
    }

    body.dark-mode #sheet-inbox-view .inbox-list-task-wrap > .task-card,
    html.dark #sheet-inbox-view .inbox-list-task-wrap > .task-card,
    [data-theme="dark"] #sheet-inbox-view .inbox-list-task-wrap > .task-card {
      background: #18181b;
      border-color: rgba(255, 255, 255, 0.09);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    }

    #sheet-inbox-view .inbox-list-task-wrap > .task-card:not(.expanded):not(.sliding-to-bottom) {
      min-height: 68px !important;
      height: auto !important;
      max-height: none !important;
      padding: 10px 14px !important;
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important;
    }

    #sheet-inbox-view .inbox-list-task-wrap > .task-card.expanded {
      height: auto !important;
      min-height: 68px !important;
      max-height: none !important;
      padding: 12px 14px !important;
      display: block !important;
      overflow: visible !important;
    }

    #sheet-inbox-view .inbox-list-task-wrap > .task-card.expanded .inline-active-fields-slot,
    #sheet-inbox-view .inbox-list-task-wrap > .task-card.expanded .inline-more-menu-slot {
      width: 100% !important;
      box-sizing: border-box !important;
    }

    #sheet-inbox-view .inbox-list-task-wrap .task-inbox-badge {
      background: rgba(13, 148, 136, 0.14);
      color: #0f5e57;
      border: 1px solid rgba(13, 148, 136, 0.34);
      font-weight: 800;
    }

    body.dark-mode #sheet-inbox-view .inbox-list-task-wrap .task-inbox-badge,
    html.dark #sheet-inbox-view .inbox-list-task-wrap .task-inbox-badge,
    [data-theme="dark"] #sheet-inbox-view .inbox-list-task-wrap .task-inbox-badge {
      background: rgba(45, 212, 191, 0.18);
      color: #5eead4;
      border-color: rgba(45, 212, 191, 0.42);
    }

    #sheet-inbox-view .inbox-completed-section {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 8px;
      flex: 0 0 auto !important;
      flex-shrink: 0 !important;
    }

    #sheet-inbox-view #bulk-action-bar {
      bottom: max(env(safe-area-inset-bottom, 20px), 24px);
      z-index: 90;
    }

    #sheet-inbox-view .inbox-empty-state {
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 48px 24px;
      gap: 10px;
    }

    #sheet-inbox-view .inbox-empty-icon {
      width: 64px;
      height: 64px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(13, 148, 136, 0.1);
      color: var(--accent-primary, #0d9488);
      margin-bottom: 4px;
    }

    #sheet-inbox-view .inbox-empty-title {
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 800;
      color: var(--text-primary);
    }

    #sheet-inbox-view .inbox-empty-subtitle {
      margin: 0;
      max-width: 260px;
      font-size: 13px;
      line-height: 1.45;
      color: var(--text-muted);
    }

    /* ==========================================================================
       UNIVERSAL OVERLAY SCROLL ISOLATION (Prevents Background Layer Scrolling)
       ========================================================================== */
    html.overlay-scroll-locked,
    body.overlay-scroll-locked {
      overflow: hidden !important;
      overscroll-behavior: none !important;
    }

    body.overlay-scroll-locked .app-shell,
    body.overlay-scroll-locked .tab-pane,
    body.overlay-scroll-locked #tab-todo,
    body.overlay-scroll-locked #tab-focus,
    body.overlay-scroll-locked #tab-mind,
    body.overlay-scroll-locked #tab-insights,
    body.overlay-scroll-locked #tab-more {
      overflow: hidden !important;
      overscroll-behavior: none !important;
    }

    .sheet-backdrop,
    .note-sheet-backdrop,
    .fullscreen-modal,
    .inbox-section-overlay,
    .settings-modal-container,
    .dw-modal-backdrop,
    .profile-side-drawer,
    .brain-dump-modal,
    .winddown-wizard-modal,
    .universal-vclock-modal,
    .pwa-ios-guide-backdrop,
    .cmd-palette-backdrop,
    #osm-map-picker-modal,
    #oled-focus-clock-modal {
      overscroll-behavior: none;
    }

    .sheet-backdrop .bottom-sheet,
    .note-bottom-sheet,
    .inbox-task-list,
    .search-task-scroll-area,
    .task-sheet-scroll-body,
    .fullscreen-modal textarea,
    .rte-canvas,
    #note-rte-canvas,
    .profile-side-drawer,
    .cmd-palette-results,
    .pomo-link-task-picker {
      overscroll-behavior: contain;
    }

    /* ==========================================================================
       FEATURE: NLP COMPOSER INTERACTIVE PREVIEW PILLS & SYNTAX HINT BAR
       ========================================================================== */
    #composer-nlp-preview,
    .composer-nlp-preview-bar {
      display: none !important;
    }
    .composer-nlp-preview-bar.is-hint-mode {
      background: color-mix(in srgb, var(--bg-elevated) 46%, transparent);
      border: 1px dashed color-mix(in srgb, var(--border-color) 75%, transparent);
      flex-wrap: nowrap;
      overflow-x: auto;
      scrollbar-width: none;
      gap: 5px;
    }
    .composer-nlp-preview-bar.is-hint-mode::-webkit-scrollbar {
      display: none;
    }
    .nlp-hint-badge {
      font-size: 9.5px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--accent-primary, #0D9488);
      background: color-mix(in srgb, var(--accent-primary, #0D9488) 13%, transparent);
      padding: 2px 6px;
      border-radius: 6px;
      flex-shrink: 0;
      user-select: none;
    }
    .nlp-hint-chip {
      display: inline-flex;
      align-items: center;
      font-family: var(--font-mono, monospace);
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted);
      background: color-mix(in srgb, var(--bg-surface) 75%, transparent);
      border: 1px solid color-mix(in srgb, var(--border-color) 65%, transparent);
      padding: 2px 7px;
      border-radius: 7px;
      white-space: nowrap;
      flex-shrink: 0;
      user-select: none;
    }
    .nlp-preview-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 26px;
      padding: 2px 7px 2px 8px;
      border-radius: 9px;
      font-family: var(--font-body);
      font-size: 11.5px;
      font-weight: 600;
      line-height: 1.2;
      color: var(--accent-primary, #0D9488);
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid rgba(13, 148, 136, 0.30);
      cursor: pointer;
      transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease;
      max-width: 100%;
    }
    body.dark-mode .nlp-preview-pill,
    html.dark .nlp-preview-pill,
    [data-theme="dark"] .nlp-preview-pill {
      background: rgba(20, 20, 25, 0.92);
      color: #2DD4BF;
      border-color: rgba(45, 212, 191, 0.34);
    }
    .nlp-preview-pill.is-time {
      color: #2563EB;
      border-color: rgba(37, 99, 235, 0.30);
    }
    body.dark-mode .nlp-preview-pill.is-time,
    html.dark .nlp-preview-pill.is-time,
    [data-theme="dark"] .nlp-preview-pill.is-time {
      color: #60A5FA;
      border-color: rgba(96, 165, 250, 0.34);
    }
    .nlp-preview-pill.is-repeat {
      color: #7C3AED;
      border-color: rgba(124, 58, 237, 0.30);
    }
    body.dark-mode .nlp-preview-pill.is-repeat,
    html.dark .nlp-preview-pill.is-repeat,
    [data-theme="dark"] .nlp-preview-pill.is-repeat {
      color: #A78BFA;
      border-color: rgba(167, 139, 250, 0.34);
    }
    .nlp-preview-pill.is-priority[data-nlp-sub="p1"] {
      color: #EF4444;
      border-color: rgba(239, 68, 68, 0.36);
    }
    .nlp-preview-pill.is-priority[data-nlp-sub="p2"] {
      color: #D97706;
      border-color: rgba(245, 158, 11, 0.38);
    }
    body.dark-mode .nlp-preview-pill.is-priority[data-nlp-sub="p2"],
    html.dark .nlp-preview-pill.is-priority[data-nlp-sub="p2"],
    [data-theme="dark"] .nlp-preview-pill.is-priority[data-nlp-sub="p2"] {
      color: #FBBF24;
    }
    .nlp-preview-pill.is-priority[data-nlp-sub="p3"] {
      color: #2563EB;
      border-color: rgba(59, 130, 246, 0.36);
    }
    body.dark-mode .nlp-preview-pill.is-priority[data-nlp-sub="p3"],
    html.dark .nlp-preview-pill.is-priority[data-nlp-sub="p3"],
    [data-theme="dark"] .nlp-preview-pill.is-priority[data-nlp-sub="p3"] {
      color: #60A5FA;
    }
    .nlp-preview-pill.is-category {
      color: var(--nlp-cat-color, #0D9488);
      border-color: color-mix(in srgb, var(--nlp-cat-color, #0D9488) 42%, transparent);
    }
    .nlp-preview-pill.is-energy[data-nlp-sub="high"] {
      color: #CA8A04;
      border-color: rgba(234, 179, 8, 0.38);
    }
    body.dark-mode .nlp-preview-pill.is-energy[data-nlp-sub="high"],
    html.dark .nlp-preview-pill.is-energy[data-nlp-sub="high"],
    [data-theme="dark"] .nlp-preview-pill.is-energy[data-nlp-sub="high"] {
      color: #FACC15;
    }
    .nlp-preview-pill.is-energy[data-nlp-sub="low"] {
      color: #059669;
      border-color: rgba(16, 185, 129, 0.36);
    }
    body.dark-mode .nlp-preview-pill.is-energy[data-nlp-sub="low"],
    html.dark .nlp-preview-pill.is-energy[data-nlp-sub="low"],
    [data-theme="dark"] .nlp-preview-pill.is-energy[data-nlp-sub="low"] {
      color: #34D399;
    }
    .nlp-preview-pill:hover {
      border-color: currentColor;
    }
    .nlp-preview-pill-icon {
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
      opacity: 0.92;
    }
    .nlp-pill-cat-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }
    .nlp-preview-pill-val {
      font-weight: 700;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 140px;
    }
    .nlp-preview-pill-x {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      font-size: 9.5px;
      font-weight: 800;
      margin-left: 1px;
      opacity: 0.65;
      background: rgba(128, 128, 128, 0.14);
      transition: opacity 0.15s ease, background 0.15s ease;
    }
    .nlp-preview-pill:hover .nlp-preview-pill-x {
      opacity: 1;
      background: rgba(239, 68, 68, 0.16);
      color: #EF4444;
    }
    .nlp-preview-clear-all {
      margin-left: auto;
      padding: 3px 7px;
      border-radius: 7px;
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-size: 10.5px;
      font-weight: 700;
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease;
    }
    .nlp-preview-clear-all:hover {
      color: var(--text-primary);
      background: var(--bg-elevated);
    }

    /* ==========================================================================
       FEATURE: TASK-TO-POMODORO LIVE LINKING
       ========================================================================== */
    .pomo-task-chip.is-live-linked {
      border-color: rgba(13, 148, 136, 0.42) !important;
      background: rgba(13, 148, 136, 0.06);
    }
    .pomo-task-chip.is-completed {
      border-color: rgba(16, 185, 129, 0.36) !important;
      background: rgba(16, 185, 129, 0.06);
    }
    .pomo-task-chip-meta {
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 700;
      color: var(--accent-primary);
      background: rgba(13, 148, 136, 0.12);
      flex-shrink: 0;
    }
    .pomo-task-chip-done {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      padding: 0;
      border-radius: 7px;
      border: 2px solid var(--border-strong);
      background: var(--bg-surface);
      color: #FFFFFF;
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
    }
    .pomo-task-chip-done svg {
      opacity: 0;
      transform: scale(0.6);
      transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .pomo-task-chip-done:hover {
      border-color: #10B981;
      background: rgba(16, 185, 129, 0.10);
      color: #10B981;
    }
    .pomo-task-chip-done:hover svg {
      opacity: 0.45;
      transform: scale(0.85);
    }
    .pomo-task-chip-done.is-checked,
    .pomo-task-chip-done.is-checked:hover {
      border-color: #10B981;
      background: #10B981;
      color: #FFFFFF;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.30);
    }
    .pomo-task-chip-done.is-checked svg,
    .pomo-task-chip-done.is-checked:hover svg {
      opacity: 1;
      transform: scale(1);
    }
    .pomo-run-linked-stats {
      font-size: 11px;
      font-weight: 700;
      color: var(--accent-primary);
      padding-left: 6px;
      border-left: 1px solid var(--border-subtle);
      flex-shrink: 0;
    }
    .pomo-link-task-picker {
      margin-top: 8px;
      max-height: 204px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 6px;
      border-radius: 14px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      box-shadow: var(--shadow-soft);
    }
    .pomo-link-picker-heading {
      font-size: 10.5px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      padding: 3px 8px 4px;
    }
    .pomo-link-picker-empty {
      font-size: 12px;
      color: var(--text-muted);
      text-align: center;
      padding: 10px 8px;
    }
    .pomo-link-picker-item {
      width: 100%;
      min-height: 38px;
      padding: 7px 10px;
      border-radius: 10px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 8px;
      text-align: left;
      cursor: pointer;
      font-family: var(--font-body);
      transition: background 0.14s ease, border-color 0.14s ease;
    }
    .pomo-link-picker-item:hover,
    .pomo-link-picker-item.is-selected {
      background: var(--bg-elevated);
      border-color: var(--border-strong);
    }
    .pomo-link-item-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .pomo-link-item-title {
      flex: 1 1 auto;
      min-width: 0;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .pomo-link-item-meta {
      flex-shrink: 0;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .pomo-flow-actions-stack {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      max-width: min(340px, 88vw);
      text-align: center;
    }
    .pomo-flow-linked-summary {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      padding: 6px 12px;
      border-radius: 12px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
    }
    .pomo-flow-complete-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 46px;
      padding: 0 22px;
      border-radius: 16px;
      border: 1px solid rgba(16, 185, 129, 0.35);
      background: rgba(16, 185, 129, 0.14);
      color: #059669;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 750;
      cursor: pointer;
      transition: background 0.16s ease, transform 0.14s ease;
    }
    body.dark-mode .pomo-flow-complete-btn,
    html.dark .pomo-flow-complete-btn,
    [data-theme="dark"] .pomo-flow-complete-btn {
      color: #34D399;
      background: rgba(16, 185, 129, 0.18);
    }
    .pomo-flow-complete-btn:hover {
      background: #10B981;
      color: #FFFFFF;
    }
    .task-pomo-meta-badge {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .task-pomo-meta-badge.is-linked,
    .task-pomo-meta-badge.is-live {
      color: var(--accent-primary, #0D9488);
    }
    .task-options-row .opt-focus-pomo {
      margin-left: auto;
      flex-shrink: 0 !important;
      height: 34px;
      min-height: 34px;
      padding: 0 11px !important;
      border-radius: 11px;
      background: rgba(13, 148, 136, 0.08);
      border: 1.5px solid rgba(13, 148, 136, 0.34);
      color: var(--accent-primary, #0D9488);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    }
    body.dark-mode .task-options-row .opt-focus-pomo,
    html.dark .task-options-row .opt-focus-pomo,
    [data-theme="dark"] .task-options-row .opt-focus-pomo {
      background: rgba(45, 212, 191, 0.10);
      border-color: rgba(45, 212, 191, 0.36);
    }
    .task-options-row .opt-focus-pomo:hover {
      background: rgba(13, 148, 136, 0.14);
      border-color: var(--accent-primary, #0D9488);
    }
    .task-options-row .opt-focus-pomo .pomo-nav-arrow {
      transition: transform 0.18s ease;
    }
    .task-options-row .opt-focus-pomo:hover .pomo-nav-arrow,
    .task-options-row .opt-focus-pomo:active .pomo-nav-arrow {
      transform: translateX(2px);
    }
    .task-options-row .opt-focus-pomo + .opt-del {
      margin-left: 2px !important;
    }
    .opt-focus-pomo.is-linked {
      color: var(--accent-primary, #0D9488) !important;
      border-color: var(--accent-primary, #0D9488) !important;
      background: rgba(13, 148, 136, 0.18) !important;
    }

    /* ==========================================================================
       FEATURE: KEYBOARD SHORTCUT COMMAND PALETTE (Cmd+K / Ctrl+K)
       ========================================================================== */
    .cmd-palette-backdrop {
      position: fixed;
      inset: 0;
      z-index: 10050;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: clamp(48px, 11vh, 112px) 16px 24px;
      background: rgba(10, 10, 14, 0.48);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.16s ease, visibility 0.16s ease;
      overscroll-behavior: none;
    }
    .cmd-palette-backdrop.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .cmd-palette-panel {
      width: min(520px, 100%);
      max-height: min(500px, calc(100dvh - 56px));
      display: flex;
      flex-direction: column;
      border-radius: 18px;
      overflow: hidden;
      background: var(--bg-surface, #FFFFFF);
      border: 1px solid var(--border-strong);
      box-shadow: var(--shadow-float, 0 24px 60px rgba(0, 0, 0, 0.32));
      color: var(--text-primary);
      transform: translateY(-6px) scale(0.985);
      transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .cmd-palette-backdrop.open .cmd-palette-panel {
      transform: translateY(0) scale(1);
    }
    body.dark-mode .cmd-palette-panel,
    html.dark .cmd-palette-panel,
    [data-theme="dark"] .cmd-palette-panel {
      background: #121216;
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72);
    }
    .cmd-palette-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 13px 16px;
      border-bottom: 1px solid var(--border-subtle);
      flex-shrink: 0;
    }
    .cmd-palette-search-icon {
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .cmd-palette-input {
      flex: 1 1 auto;
      min-width: 0;
      border: none;
      outline: none;
      background: transparent;
      color: var(--text-primary);
      font-family: var(--font-body);
      font-size: 14.5px;
      font-weight: 500;
    }
    .cmd-palette-input::placeholder {
      color: var(--text-muted);
    }
    .cmd-palette-esc-btn {
      flex-shrink: 0;
      height: 24px;
      padding: 0 7px;
      border-radius: 6px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-elevated);
      color: var(--text-muted);
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: color 0.14s ease, border-color 0.14s ease;
    }
    .cmd-palette-esc-btn:hover {
      color: var(--text-primary);
      border-color: var(--border-strong);
    }
    .cmd-palette-results {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      overscroll-behavior: contain;
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      scrollbar-gutter: stable;
    }
    .cmd-palette-group-label {
      font-size: 10px;
      font-weight: 750;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: var(--text-muted);
      padding: 8px 10px 4px;
      user-select: none;
    }
    .cmd-palette-item {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 36px;
      padding: 6px 10px;
      border-radius: 9px;
      cursor: pointer;
      transition: background 0.12s ease;
    }
    .cmd-palette-item.is-active {
      background: var(--bg-elevated);
    }
    body.dark-mode .cmd-palette-item.is-active,
    html.dark .cmd-palette-item.is-active,
    [data-theme="dark"] .cmd-palette-item.is-active {
      background: rgba(255, 255, 255, 0.065);
    }
    .cmd-palette-item.is-completed .cmd-item-title {
      text-decoration: line-through;
      opacity: 0.58;
    }
    .cmd-item-icon {
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--text-muted);
    }
    .cmd-palette-item.is-active .cmd-item-icon {
      color: var(--accent-primary, #0D9488);
    }
    .cmd-item-title {
      flex: 1 1 auto;
      min-width: 0;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .cmd-item-meta {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .cmd-item-right {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .cmd-item-kbd,
    .cmd-palette-footer kbd,
    .cmd-shortcut-keys kbd {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      border-radius: 6px;
      border: 1px solid var(--border-subtle);
      box-shadow: inset 0 -1px 0 var(--border-subtle);
      background: var(--bg-canvas);
      color: var(--text-secondary);
      font-family: var(--font-mono);
      font-size: 10.5px;
      font-weight: 650;
      line-height: 1;
    }
    body.dark-mode .cmd-item-kbd,
    body.dark-mode .cmd-palette-footer kbd,
    body.dark-mode .cmd-shortcut-keys kbd,
    html.dark .cmd-item-kbd,
    html.dark .cmd-palette-footer kbd,
    html.dark .cmd-shortcut-keys kbd,
    [data-theme="dark"] .cmd-item-kbd,
    [data-theme="dark"] .cmd-palette-footer kbd,
    [data-theme="dark"] .cmd-shortcut-keys kbd {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.11);
      box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
      color: rgba(244, 244, 245, 0.88);
    }
    .cmd-item-focus-btn {
      height: 26px;
      padding: 0 10px;
      border-radius: 8px;
      border: 1px solid rgba(13, 148, 136, 0.28);
      background: rgba(13, 148, 136, 0.10);
      color: var(--accent-primary, #0D9488);
      font-family: var(--font-display);
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
    }
    .cmd-item-focus-btn:hover {
      background: var(--accent-primary, #0D9488);
      color: var(--accent-contrast, #FFFFFF);
    }
    .cmd-palette-empty {
      padding: 36px 16px;
      text-align: center;
      font-size: 13px;
      color: var(--text-muted);
    }
    .cmd-palette-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 14px;
      border-top: 1px solid var(--border-subtle);
      background: var(--bg-canvas);
      font-size: 11px;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .cmd-palette-hints {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .cmd-palette-hints span {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .cmd-palette-shortcuts-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-size: 11.5px;
      font-weight: 600;
      cursor: pointer;
      padding: 3px 6px;
      border-radius: 7px;
      transition: color 0.14s ease, background 0.14s ease;
    }
    .cmd-palette-shortcuts-btn:hover,
    .cmd-palette-shortcuts-btn.is-active {
      color: var(--accent-primary);
      background: rgba(13, 148, 136, 0.08);
    }

    /* Clean, Minimalistic Single-Column Shortcuts Sheet (Zero Box-in-Box Clutter) */
    .cmd-shortcuts-sheet {
      display: flex;
      flex-direction: column;
      padding: 2px 4px 8px;
    }
    .cmd-shortcuts-group-title {
      font-size: 10px;
      font-weight: 750;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      padding: 12px 10px 5px;
      user-select: none;
    }
    .cmd-shortcuts-group-title:first-child {
      padding-top: 6px;
    }
    .cmd-shortcut-row {
      width: 100%;
      min-height: 36px;
      padding: 6px 10px;
      border: none;
      border-radius: 9px;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      text-align: left;
      font-family: var(--font-body);
      cursor: default;
      transition: background 0.12s ease;
    }
    .cmd-shortcut-row.is-actionable {
      cursor: pointer;
    }
    .cmd-shortcut-row.is-active {
      background: var(--bg-elevated);
    }
    body.dark-mode .cmd-shortcut-row.is-active,
    html.dark .cmd-shortcut-row.is-active,
    [data-theme="dark"] .cmd-shortcut-row.is-active {
      background: rgba(255, 255, 255, 0.065);
    }
    .cmd-shortcut-label {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .cmd-shortcut-row:not(.is-actionable) .cmd-shortcut-label {
      color: var(--text-secondary);
    }
    .cmd-shortcut-keys {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }
    .cmd-shortcut-plus {
      font-size: 10px;
      color: var(--text-muted);
      font-weight: 600;
    }
    @keyframes cmdTaskPulseRing {
      0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.45); }
      70% { box-shadow: 0 0 0 8px rgba(13, 148, 136, 0); }
      100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
    }
    .task-card.cmd-task-pulse {
      animation: cmdTaskPulseRing 0.9s ease-out 1;
      border-color: var(--accent-primary) !important;
    }
    @media (max-width: 520px) {
      .cmd-palette-hints {
        display: none;
      }
      .cmd-palette-backdrop {
        padding-top: 28px;
      }
    }

    /* ==========================================================================
       UNIVERSAL TASK & ANTI-TASK EXPAND / COLLAPSE DRAWER TRANSITIONS
       ========================================================================== */
    @keyframes taskDrawerExpandFadeIn {
      0% {
        opacity: 0;
      }
      100% {
        opacity: 1;
      }
    }
    @keyframes taskDrawerCollapseFadeOut {
      0% {
        opacity: 1;
      }
      100% {
        opacity: 0;
      }
    }
    .task-item.task-card-height-animating-wrap,
    .task-card-swipe-wrap.task-card-height-animating-wrap {
      max-height: none !important;
      overflow: visible !important;
    }
    /* Keep main task row (checkbox, title, badges, metadata) and card padding 100% identical across collapsed, animating, and expanded states so nothing shifts when the height transition completes */
    .task-card.expanded,
    .task-card.task-card-height-animating,
    #sheet-inbox-view .inbox-list-task-wrap > .task-card.expanded,
    #sheet-inbox-view .inbox-list-task-wrap > .task-card.task-card-height-animating {
      padding: 10px 14px !important;
      display: block !important;
      justify-content: flex-start !important;
    }
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.expanded,
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.task-card-height-animating {
      padding: 11px 14px !important;
      display: block !important;
      justify-content: flex-start !important;
    }
    .task-card.expanded > .task-main-row,
    .task-card.task-card-height-animating > .task-main-row {
      height: auto !important;
      min-height: 46px !important;
      align-items: center !important;
    }
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.expanded > .task-main-row,
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.task-card-height-animating > .task-main-row {
      min-height: 30px !important;
    }
    .task-card.expanded .task-body-area,
    .task-card.task-card-height-animating .task-body-area {
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important;
      height: auto !important;
      min-height: 46px !important;
      padding: 0 !important;
    }
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.expanded .task-body-area,
    #cal-popup-grouped-feed .task-card-swipe-wrap.search-list-task-wrap > .task-card.task-card-height-animating .task-body-area {
      min-height: 30px !important;
    }
    .task-card.expanded .task-title-row,
    .task-card.task-card-height-animating .task-title-row {
      min-height: 22px !important;
      line-height: 22px !important;
    }
    .task-drawer-expanding-in {
      animation: taskDrawerExpandFadeIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .task-drawer-collapsing-out {
      animation: taskDrawerCollapseFadeOut 0.22s cubic-bezier(0.22, 1, 0.36, 1) both !important;
      pointer-events: none !important;
    }
    .task-collapsing-drawer-ghost {
      display: flex;
      flex-direction: column;
      width: 100%;
      pointer-events: none !important;
      user-select: none !important;
      animation: taskDrawerCollapseFadeOut 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .task-collapsing-drawer-ghost .subtasks-accordion {
      max-height: none !important;
      opacity: 1 !important;
      margin-top: 10px !important;
      overflow: visible !important;
    }
    .task-collapsing-drawer-ghost .task-options-row {
      display: flex !important;
      animation: none !important;
    }

    /* ==========================================================================
       BOARD & CALENDAR VIEW: POLISHED EXPANDED TASK LAYOUT & RELIABLE SCROLLING
       ========================================================================== */

    /* 1. Eliminate nested scroll traps so vertical & horizontal scrolling never jam */
    .tab-pane,
    #tab-todo,
    #tab-focus,
    #tab-mind,
    #tab-insights,
    #tab-more {
      touch-action: pan-y;
      -webkit-overflow-scrolling: touch;
    }

    #board-view-container {
      width: 100%;
      overflow: visible !important;
      padding-bottom: 12px;
    }

    #board-view-container .board-horizontal-scroll,
    #board-view-container .board-view-layout {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: nowrap !important;
      align-items: flex-start !important;
      gap: 14px !important;
      height: auto !important;
      min-height: 0 !important;
      overflow-x: auto !important;
      overflow-y: visible !important;
      padding: 6px 4px 28px 4px !important;
      scroll-snap-type: x proximity !important;
      touch-action: pan-x pan-y !important;
      -webkit-overflow-scrolling: touch !important;
      overscroll-behavior-x: contain;
    }

    #board-view-container .board-horizontal-scroll .board-column,
    #board-view-container .board-column {
      flex: 0 0 min(86vw, 344px) !important;
      width: min(86vw, 344px) !important;
      max-width: 344px !important;
      min-height: 160px !important;
      max-height: none !important;
      overflow-y: visible !important;
      overflow-x: visible !important;
      padding: 12px !important;
      border-radius: 22px !important;
      gap: 10px !important;
      scroll-snap-align: start;
      box-sizing: border-box !important;
      touch-action: pan-x pan-y;
    }

    #board-view-container .board-column-header {
      padding: 4px 4px 10px 4px !important;
      margin-bottom: 2px !important;
    }

    /* Calendar View: De-nest scroll from #todo-cal-day-tasks-panel & remove 100px bottom blank gap */
    #todo-calendar-view-container {
      padding: 0 0 24px 0 !important;
      gap: 12px !important;
      overflow: visible !important;
    }

    #todo-calendar-view-container #todo-cal-day-tasks-panel {
      flex: none !important;
      min-height: 0 !important;
      max-height: none !important;
      overflow: visible !important;
      overflow-y: visible !important;
      padding: 14px 12px 16px 12px !important;
      border-radius: 22px !important;
      touch-action: pan-y;
    }

    #todo-cal-selected-day-list {
      display: flex !important;
      flex-direction: column !important;
      gap: 10px !important;
      width: 100%;
    }

    /* 2. Unified Card Surface, Spacing & Header Alignment (Board + Calendar) */
    #board-view-container .detailed-board-card,
    #todo-calendar-view-container .detailed-board-card,
    #todo-cal-day-tasks-panel .detailed-board-card,
    #todo-cal-selected-day-list .detailed-board-card {
      display: flex !important;
      flex-direction: column !important;
      gap: 0 !important;
      min-height: 0 !important;
      padding: 12px 14px !important;
      margin-bottom: 0 !important;
      border-radius: 18px !important;
      animation: none !important;
      transition: border-radius 0.22s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
      overflow: visible !important;
      box-sizing: border-box !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
    }

    #board-view-container .detailed-board-card {
      touch-action: pan-x pan-y !important;
    }

    #todo-calendar-view-container .detailed-board-card,
    #todo-cal-selected-day-list .detailed-board-card {
      touch-action: pan-y !important;
    }

    #board-view-container .detailed-board-card.expanded,
    #todo-calendar-view-container .detailed-board-card.expanded,
    #todo-cal-day-tasks-panel .detailed-board-card.expanded,
    #todo-cal-selected-day-list .detailed-board-card.expanded {
      border-radius: 24px !important;
      padding: 14px !important;
      cursor: default !important;
      transform: none !important;
      border-color: var(--border-strong, rgba(15, 23, 42, 0.16)) !important;
    }

    body.dark-mode #board-view-container .detailed-board-card.expanded,
    html.dark #board-view-container .detailed-board-card.expanded,
    [data-theme="dark"] #board-view-container .detailed-board-card.expanded,
    body.dark-mode #todo-calendar-view-container .detailed-board-card.expanded,
    html.dark #todo-calendar-view-container .detailed-board-card.expanded,
    [data-theme="dark"] #todo-calendar-view-container .detailed-board-card.expanded {
      border-color: rgba(255, 255, 255, 0.16) !important;
    }

    #board-view-container .detailed-board-card.expanded:active,
    #todo-calendar-view-container .detailed-board-card.expanded:active {
      transform: none !important;
    }

    #board-view-container .board-card-header,
    #todo-calendar-view-container .board-card-header {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: flex-start !important;
      gap: 10px !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
    }

    #board-view-container .exact-checkbox,
    #todo-calendar-view-container .exact-checkbox {
      width: 22px !important;
      height: 22px !important;
      min-width: 22px !important;
      border-radius: 7px !important;
      border-width: 2px !important;
      margin: 1px 0 0 0 !important;
      flex-shrink: 0 !important;
    }

    #board-view-container .card-title-meta-col,
    #todo-calendar-view-container .card-title-meta-col {
      display: flex !important;
      flex-direction: column !important;
      gap: 4px !important;
      flex: 1 1 auto !important;
      min-width: 0 !important;
    }

    #board-view-container .task-title-row,
    #todo-calendar-view-container .task-title-row {
      display: flex !important;
      align-items: center !important;
      flex-wrap: wrap !important;
      gap: 6px !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
    }

    #board-view-container .board-card-title,
    #todo-calendar-view-container .board-card-title {
      flex: 0 1 auto !important;
      min-width: 0 !important;
      max-width: 100% !important;
      font-size: 14.5px !important;
      font-weight: 650 !important;
      line-height: 1.35 !important;
      padding: 0 !important;
      margin: 0 !important;
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
    }

    #board-view-container .search-task-meta-row,
    #todo-calendar-view-container .search-task-meta-row {
      margin-top: 1px !important;
      gap: 10px !important;
    }

    #board-view-container .search-task-meta-row:empty,
    #todo-calendar-view-container .search-task-meta-row:empty {
      display: none !important;
    }

    /* 3. Expanded Tray Internal Layout: Clean Sections, Full-Width Subtasks & Zero Clumsiness */
    .exact-expanded-tray {
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin-top: 0 !important;
      padding-top: 0 !important;
      gap: 0 !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .subtasks-accordion {
      display: flex !important;
      flex-direction: column !important;
      gap: 8px !important;
      margin-top: 11px !important;
      padding-top: 10px !important;
      border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08)) !important;
      width: 100% !important;
      max-width: 100% !important;
      margin-left: 0 !important;
    }

    .exact-expanded-tray .subtasks-accordion .subtasks-wrapper,
    .exact-expanded-tray .subtasks-accordion .btn-reveal-subtask-input,
    .exact-expanded-tray .subtasks-accordion .subtask-add-row {
      margin-left: 0 !important;
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .subtasks-accordion .btn-reveal-subtask-input {
      width: auto !important;
      align-self: flex-start !important;
      margin-top: 0 !important;
      padding: 5px 10px !important;
      border-radius: 9px !important;
      font-size: 12.5px !important;
    }

    .exact-expanded-tray .subtasks-accordion .subtask-add-row {
      margin-top: 0 !important;
      gap: 6px !important;
    }

    .exact-expanded-tray .subtasks-accordion .subtask-inline-input {
      min-width: 0 !important;
      flex: 1 1 auto !important;
      width: 100% !important;
      font-size: 13px !important;
      padding: 7px 10px !important;
    }

    .exact-expanded-tray .task-inline-cat-strip {
      margin-top: 0 !important;
      padding: 8px 0 2px 0 !important;
      gap: 6px !important;
      width: 100% !important;
      box-sizing: border-box !important;
      touch-action: pan-x;
    }

    .exact-expanded-tray .task-inline-cat-strip .todo-cat-chip {
      flex-shrink: 0 !important;
    }

    .exact-expanded-tray .exact-active-fields-slot {
      flex-direction: column !important;
      gap: 8px !important;
      width: 100% !important;
      max-width: 100% !important;
      margin-top: 2px !important;
    }

    .exact-expanded-tray .advanced-input-card {
      padding: 10px 11px !important;
      border-radius: 14px !important;
      gap: 8px !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .tb-vclock-range-tabs {
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
      gap: 6px !important;
      width: 100% !important;
    }

    .exact-expanded-tray .tb-vclock-endpoint-btn {
      min-width: 0 !important;
      width: 100% !important;
      padding: 7px 9px !important;
      border-radius: 12px !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .tb-vclock-endpoint-val {
      font-size: 13px !important;
      white-space: nowrap !important;
    }

    /* 4. Action Row: Exact List View Colors + Crisp Single-Row Alignment with Paired Trailing Actions */
    .exact-expanded-tray .task-options-row {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: flex-start !important;
      flex-wrap: wrap !important;
      gap: 6px !important;
      margin-top: 10px !important;
      padding-top: 10px !important;
      border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08)) !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .task-options-row .mini-opt-btn,
    .exact-expanded-tray .task-options-row .energy-icon-cycle-btn {
      min-height: 34px !important;
      height: 34px !important;
      padding: 5px 9px !important;
      border-radius: 11px !important;
      font-size: 12px !important;
      gap: 5px !important;
      flex-shrink: 0 !important;
    }

    .exact-expanded-tray .task-options-row .opt-date-repeat {
      max-width: 132px;
    }

    .exact-expanded-tray .task-options-row .exact-trailing-actions {
      margin-left: auto !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 6px !important;
      flex-shrink: 0 !important;
    }

    .exact-expanded-tray .task-options-row .exact-trailing-actions .opt-focus-pomo {
      margin-left: 0 !important;
      height: 34px !important;
      min-height: 34px !important;
      padding: 0 9px !important;
      border-radius: 11px !important;
    }

    .exact-expanded-tray .task-options-row .exact-trailing-actions .opt-del {
      margin-left: 0 !important;
      width: 34px !important;
      height: 34px !important;
      min-height: 34px !important;
      padding: 0 !important;
      border-radius: 11px !important;
    }

    /* 5. Priority & Energy Popovers: Balanced Equal-Width Grids (No Awkward 3+1 Wrap) */
    .exact-expanded-tray .prio-popup-menu.open {
      display: grid !important;
      grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
      gap: 5px !important;
      padding: 6px !important;
      margin-top: 8px !important;
      border-radius: 14px !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .energy-popup-menu.open {
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      gap: 6px !important;
      padding: 6px !important;
      margin-top: 8px !important;
      border-radius: 14px !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .prio-choice-btn,
    .exact-expanded-tray .energy-choice-btn,
    .exact-expanded-tray .energy-choice-pill {
      flex: none !important;
      width: 100% !important;
      min-width: 0 !important;
      min-height: 34px !important;
      padding: 6px 4px !important;
      font-size: 11.5px !important;
      gap: 4px !important;
      border-radius: 10px !important;
    }

    .exact-expanded-tray .prio-choice-btn svg {
      flex-shrink: 0 !important;
      width: 12px !important;
      height: 12px !important;
    }

    .exact-expanded-tray .prio-choice-btn span,
    .exact-expanded-tray .energy-choice-btn span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* 6. More Options Accordion inside Expanded Board/Calendar Cards */
    .exact-expanded-tray .exact-more-slot {
      margin-top: 8px !important;
      padding-top: 2px !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .more-toggle-btn {
      width: 100% !important;
      justify-content: flex-start !important;
      margin-top: 0 !important;
      padding: 6px 2px !important;
    }

    .exact-expanded-tray .more-menu-actions {
      margin-top: 6px !important;
      padding: 5px !important;
      border-radius: 14px !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    .exact-expanded-tray .more-menu-actions .advanced-action-btn {
      min-height: 38px !important;
      padding: 7px 10px !important;
      border-radius: 10px !important;
      font-size: 12.5px !important;
    }
  