@import url('cursors/cursors.css');

/* ==========================================================================
   TOCCATA OS - Apple macOS 27 UI Kit Architecture (Liquid Glass & Precision HIG)
   Continuous Squircle Curvature (G2), Multi-Layer Ambient Occlusion,
   High-Dynamic-Range Retinal Materials, 0.7ms PipeWire Studio DSP Integration
   ========================================================================== */

:root {
  /* Apple Official macOS 27 System Colors (Extracted from UI Kit Swatches) */
  --system-blue: #0078f0;
  --system-blue-hover: #0067d4;
  --system-purple: #af52de;
  --system-pink: #ff2d55;
  --system-green: #34c759;
  --system-orange: #ff9500;
  --system-yellow: #ffcc00;
  --system-red: #ff3b30;
  --system-teal: #00c7be;
  --system-indigo: #5856d6;
  --system-gray: #8e8e93;

  --accent-color: var(--system-blue);
  --accent-glow: rgba(0, 120, 240, 0.38);
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, monospace;

  /* Official High-Resolution 6K Liquid Silk Wallpapers */
  --bg-wallpaper: url('assets/wallpapers/macos27-light.webp');

  /* macOS 27 Liquid Glass Materials (Light Theme Standard) */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-rim-light: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 0 1px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08), 0 20px 60px rgba(0, 0, 0, 0.15);
  --window-shadow: 0 0 1px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08), 0 20px 60px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  --window-shadow-inactive: 0 0 1px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  --text-primary: #1d1d1f;
  --text-secondary: rgba(60, 60, 67, 0.65);
  --titlebar-bg: rgba(248, 248, 250, 0.88);
  --menubar-bg: rgba(255, 255, 255, 0.72);
  --dock-bg: rgba(245, 245, 248, 0.58);
  --active-card: rgba(0, 0, 0, 0.06);
  --sidebar-bg: rgba(244, 244, 247, 0.80);
}

body.dark-mode {
  --system-blue: #0091ff;
  --system-blue-hover: #1a9dff;
  --system-green: #30d158;
  --system-yellow: #ffd60a;
  --system-orange: #ff9f0a;
  --system-red: #ff453a;
  --system-purple: #bf5af2;
  --system-pink: #ff375f;
  --system-teal: #40c8e0;
  --system-indigo: #5e5ce6;
  --system-gray: #98989d;

  --bg-wallpaper: url('assets/wallpapers/macos27-dark.webp');
  --glass-bg: rgba(28, 28, 32, 0.78);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-rim-light: inset 0 1px 0 rgba(255, 255, 255, 0.20);
  --glass-shadow: 0 0 1px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.15), 0 24px 72px rgba(0, 0, 0, 0.42);
  --window-shadow: 0 0 1px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.15), 0 24px 72px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  --window-shadow-inactive: 0 0 1px rgba(0, 0, 0, 0.6), 0 1px 4px rgba(0, 0, 0, 0.12), 0 12px 36px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.65);
  --titlebar-bg: rgba(32, 32, 38, 0.88);
  --menubar-bg: rgba(18, 18, 22, 0.70);
  --dock-bg: rgba(38, 38, 44, 0.50);
  --active-card: rgba(255, 255, 255, 0.12);
  --sidebar-bg: rgba(22, 22, 26, 0.78);
}

body.light-mode {
  --bg-wallpaper: url('assets/wallpapers/macos27-light.webp');
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-rim-light: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 0 1px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08), 0 20px 60px rgba(0, 0, 0, 0.15);
  --window-shadow: 0 0 1px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08), 0 20px 60px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  --window-shadow-inactive: 0 0 1px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  --text-primary: #1d1d1f;
  --text-secondary: rgba(60, 60, 67, 0.65);
  --titlebar-bg: rgba(248, 248, 250, 0.88);
  --menubar-bg: rgba(255, 255, 255, 0.72);
  --dock-bg: rgba(245, 245, 248, 0.58);
  --active-card: rgba(0, 0, 0, 0.06);
  --sidebar-bg: rgba(244, 244, 247, 0.80);
}

/* ==========================================================================
   GLOBAL RESET & SIGNATURE TOCCATA CURSORS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-drag: none;
  cursor: var(--cursor-default), default;
}

/* Interactive Pointer Cursor */
a, button, [role="button"], 
.menu-item, .dock-item, .tl-btn, .btn, .desktop-item,
.cc-toggle, .cc-row, .slider-pill, .result-item, 
.tab, .tag-pill, .tool-pill, .action-item, .theme-card, 
.sidebar-row, .maestro-badge, .settings-nav-item, 
.accent-dot, .switch, .switch input, .installer-actions button,
.view-btn, .action-pill, .vault-btn, .btn-primary, .btn-secondary,
.seg-btn, .toolbar-icon-btn, .app-card, .status-icon-item {
  cursor: var(--cursor-pointer), pointer !important;
}

/* Acoustic Text I-Beam Cursor */
input, textarea, .scribe-editor, .notes-content, [contenteditable="true"] {
  cursor: var(--cursor-text), text !important;
}

/* Titlebar Grabbing Cursors */
.window-titlebar {
  height: 44px;
  flex-shrink: 0;
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
  transition: background 0.2s ease, opacity 0.2s ease;
}

body.is-window-dragging,
body.is-window-dragging *,
.window.is-dragging,
.window.is-dragging .window-titlebar {
  cursor: var(--cursor-grabbing), grabbing !important;
}

/* Edge & Corner Resizer Cursors */
.window-resizer-r, .window-resizer-l {
  cursor: var(--cursor-resize-ew), ew-resize !important;
}
.window-resizer-b, .window-resizer-t {
  cursor: var(--cursor-resize-ns), ns-resize !important;
}
.window-resizer-rb {
  cursor: var(--cursor-resize-nwse), nwse-resize !important;
}
.window-resizer-lb {
  cursor: var(--cursor-resize-nesw), nesw-resize !important;
}

/* Sleek macOS / pearOS Custom Scrollbars */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(140, 140, 145, 0.35);
  border-radius: 9999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 140, 145, 0.55);
}
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
body.light-mode *::-webkit-scrollbar-thumb {
  background: rgba(60, 60, 67, 0.25);
}
body.light-mode *::-webkit-scrollbar-thumb:hover {
  background: rgba(60, 60, 67, 0.45);
}

body {
  font-family: var(--font-system);
  background-color: #1a1b26;
  background-image: var(--bg-wallpaper);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-primary);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  letter-spacing: -0.012em;
  transition: background 0.4s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#desktop {
  position: relative;
  width: 100%;
  height: 100%;
  contain: strict;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(210%);
  -webkit-backdrop-filter: blur(40px) saturate(210%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-rim-light);
  border-radius: 14px;
  transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   TOP GLOBAL MENU BAR
   ========================================================================== */
#menu-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--menubar-bg);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.menu-left, .menu-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-item {
  padding: 2px 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Toccata Apple-Style System Dropdown */
.toccata-system-dropdown {
  position: absolute;
  top: 30px;
  left: 10px;
  min-width: 255px;
  width: max-content;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(210%);
  -webkit-backdrop-filter: blur(40px) saturate(210%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  border-radius: 9px;
  padding: 5px;
  z-index: 9999;
  animation: menuDrop 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-dropdown-item {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-primary);
  user-select: none;
  transition: background 0.08s ease, color 0.08s ease;
}

.menu-dropdown-item:hover {
  background: var(--accent-color);
  color: white;
}

.menu-dropdown-item:hover .menu-shortcut {
  color: rgba(255, 255, 255, 0.85);
}

.menu-dropdown-separator {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 6px;
}

.menu-shortcut {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* The Toccata Tuning Logo in Apple Cyan/Sapphire */
.toccata-tuning-logo {
  width: 15px;
  height: 15px;
  filter: drop-shadow(0 0 6px rgba(0, 122, 255, 0.7));
}

.active-app-name {
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.menu-item {
  white-space: nowrap;
}

.audio-wave-glyph {
  width: 15px;
  height: 15px;
  color: var(--accent-color);
}

.status-icon-item svg {
  width: 15px;
  height: 15px;
}

.status-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.clock {
  font-size: 12px;
  font-weight: 600;
}

/* Maestro Copilot Badge */
.maestro-badge {
  background: rgba(0, 122, 255, 0.18);
  border: 1px solid rgba(0, 122, 255, 0.35);
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.maestro-spark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: sparkPulse 2s infinite ease-in-out;
}

@keyframes sparkPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ==========================================================================
   DESKTOP MOUNTED VOLUMES (TOP-RIGHT)
   ========================================================================== */
#desktop-icons {
  position: absolute;
  top: 40px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 10;
}

.desktop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 86px;
  text-align: center;
}

.desktop-item:hover .desktop-label {
  background: var(--accent-color);
  color: white;
}

.toccata-disk-art {
  width: 52px;
  height: 44px;
  background: linear-gradient(180deg, #d8d8d8 0%, #999999 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.disk-plate {
  width: 44px;
  height: 28px;
  background: linear-gradient(135deg, #eaeaea 0%, #bfbfbf 100%);
  border-radius: 4px;
  border: 1px solid #777;
}

.disk-plate.vault {
  background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%);
}

.disk-notch {
  position: absolute;
  bottom: 4px;
  width: 14px;
  height: 3px;
  background: #333;
  border-radius: 1px;
}

.desktop-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  transition: all 0.12s ease;
}

/* ==========================================================================
   AUTHENTIC APPLE TRAFFIC LIGHTS, RESIZERS & WINDOW PHYSICS
   ========================================================================== */
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--window-shadow);
  backdrop-filter: blur(48px) saturate(200%);
  -webkit-backdrop-filter: blur(48px) saturate(200%);
  transform-origin: center center;
  transition: box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.22s ease, opacity 0.2s ease;
  will-change: transform, opacity, left, top;
}

.window:not(.active-window) {
  box-shadow: var(--window-shadow-inactive);
}

.window:not(.active-window) .tl-btn {
  opacity: 0.45;
  filter: grayscale(70%);
}

.window:not(.active-window) .window-titlebar {
  opacity: 0.85;
}

.window:not(.calc-window):not([data-maximized="true"]):not(.is-maximized) {
  min-width: min(480px, calc(100vw - 20px));
  min-height: 320px;
  max-width: 96vw;
  max-height: calc(100vh - 100px);
}

/* Authentic macOS Full Screen Window State */
.window[data-maximized="true"],
.window.is-maximized {
  top: 28px !important;
  left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 100vw !important;
  height: calc(100vh - 28px) !important;
  max-height: calc(100vh - 28px) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  transform: none !important;
}

.window[data-maximized="true"] .window-titlebar,
.window.is-maximized .window-titlebar {
  border-radius: 0 !important;
}

.window[data-maximized="true"] .window-resizer,
.window.is-maximized .window-resizer {
  display: none !important;
}

.calc-window:not(.scientific-mode):not(.with-tape) {
  width: 280px !important;
  min-width: 260px !important;
  max-width: 320px !important;
  min-height: 390px !important;
  max-height: 480px !important;
}

.calc-window.scientific-mode:not(.with-tape) {
  width: 460px !important;
  min-width: 440px !important;
  max-width: 500px !important;
}

.calc-window.with-tape:not(.scientific-mode) {
  width: 440px !important;
  min-width: 420px !important;
  max-width: 480px !important;
}

.calc-window.scientific-mode.with-tape {
  width: 600px !important;
  min-width: 580px !important;
  max-width: 660px !important;
}

/* Universal .window-body Contract (Universal flex-1 container for all applications) */
.window-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  background: transparent;
}

.window.active-window {
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.25), var(--glass-rim-light);
  z-index: 100;
}

/* Dynamic Window Dragging Physics Elevation */
.window.is-dragging {
  box-shadow: 0 42px 95px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 122, 255, 0.4), var(--glass-rim-light);
  transition: box-shadow 0.15s ease !important;
}

/* Window Resizers */
.window-resizer {
  position: absolute;
  z-index: 100;
}

.window-resizer-r {
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
}

.window-resizer-b {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 8px;
}

.window-resizer-rb {
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 13px 13px, rgba(255, 255, 255, 0.35) 2px, transparent 2.5px);
}

.window-titlebar {
  height: 40px;
  flex-shrink: 0;
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 16px;
}

/* Iconic Apple macOS 27 Window Controls (Traffic Lights) */
.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  user-select: none;
}

.tl-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  outline: none;
  position: relative;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.1s ease;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.tl-btn:active {
  transform: scale(0.92) !important;
  filter: brightness(0.85);
}

.tl-close {
  background: #ff5f56;
}

.tl-minimize {
  background: #ffbd2e;
}

.tl-maximize {
  background: #27c93f;
}

body.dark-mode .tl-btn {
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.35);
}

/* Crisp Vector Hover Glyphs (100% SVG - Zero Unicode Text Distortion) */
.tl-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
}

.traffic-lights:hover .tl-btn::after {
  opacity: 1;
}

/* Close: Clean diagonal cross with rounded stroke caps */
.traffic-lights:hover .tl-close::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%234c0002' stroke-width='1.15' stroke-linecap='round'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5'/%3E%3C/svg%3E");
}

/* Minimize: Crisp horizontal bar aligned to optical center */
.traffic-lights:hover .tl-minimize::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23553300' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M3.25 6h5.5'/%3E%3C/svg%3E");
}

/* Maximize / Fullscreen: Modern macOS opposing diagonal triangles */
.traffic-lights:hover .tl-maximize::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%2300380a'%3E%3Cpath d='M8.5 3.5L5 3.5l3.5 3.5zM3.5 8.5L7 8.5 3.5 5z'/%3E%3C/svg%3E");
}

/* Restored / Inward Triangles when Window is Maximized */
.window[data-maximized="true"] .traffic-lights:hover .tl-maximize::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%2300380a'%3E%3Cpath d='M5 3.5v3.5h3.5zM7 8.5v-3.5h-3.5z'/%3E%3C/svg%3E");
}

.toolbar-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-icon-btn {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
}

.toolbar-icon-btn svg {
  width: 14px;
  height: 14px;
}

.toolbar-icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.toolbar-icon-btn:not(:disabled):hover {
  background: var(--active-card);
}

.toolbar-title {
  font-size: 13px;
  font-weight: 600;
  margin-left: 8px;
}

/* Segmented Control Pills (macOS 27 HIG Standard) */
.segmented-control {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

body.dark-mode .segmented-control {
  background: rgba(255, 255, 255, 0.08);
}

.seg-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.seg-btn svg {
  width: 14px;
  height: 14px;
}

.seg-btn:hover:not(.active) {
  color: var(--text-primary);
}

.seg-btn.active {
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0.5px 1px rgba(0, 0, 0, 0.08);
}

body.dark-mode .seg-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.toolbar-search {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  padding: 4px 8px;
  gap: 6px;
  width: 140px;
}

.toolbar-search svg {
  width: 13px;
  height: 13px;
  color: var(--text-secondary);
}

.toolbar-search input {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  font-size: 12px;
  color: var(--text-primary);
}

/* ==========================================================================
   CADENCE (FINDER) & CRISP APP SQUIRCLES
   ========================================================================== */
.finder-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.finder-sidebar {
  width: 190px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex-shrink: 0;
  scrollbar-width: thin;
}

.sidebar-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 8px 4px 8px;
}

.sidebar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s ease;
}

.sidebar-row:hover {
  background: var(--active-card);
}

.sidebar-row.active {
  background: var(--accent-color);
  color: white;
}

.sb-icon {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.finder-grid-view {
  flex: 1;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 104px));
  grid-auto-rows: min-content;
  align-content: start;
  align-items: start;
  justify-content: start;
  gap: 16px 20px;
  overflow-y: auto;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  padding: 10px 8px 8px;
  border-radius: 10px;
  transition: all 0.15s ease;
  width: 100px;
  max-width: 100px;
  height: auto !important;
  max-height: 98px !important;
  align-self: start !important;
  box-sizing: border-box;
}

.app-card:hover {
  background: var(--active-card);
  transform: translateY(-2px);
}

.app-card.selected {
  background: rgba(0, 122, 255, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.35);
}

body.light-mode .app-card.selected {
  background: rgba(0, 0, 0, 0.07) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.app-card.selected .app-title {
  background: var(--accent-color);
  color: #ffffff !important;
  padding: 1px 6px;
  border-radius: 4px;
}

.app-title {
  font-size: 11px;
  font-weight: 500;
  margin-top: 6px;
  text-align: center;
  word-break: break-word;
  line-height: 1.25;
  max-width: 90px;
}

.finder-statusbar {
  height: 24px;
  background: var(--titlebar-bg);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-secondary);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

/* ==========================================================================
   VIBRANT 3D MACOS-STYLE SQUIRCLE APP ICONS
   ========================================================================== */
.mac-app-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 1. Cadence (Vibrant Royal Azure Flow) */
.icon-cadence {
  background: linear-gradient(135deg, #0ea5e9 0%, #007aff 50%, #4338ca 100%);
}

.cadence-wave {
  width: 36px;
  height: 36px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* 2. Scribe (Luminous Gold Pad with Stylus) */
.icon-scribe {
  background: linear-gradient(180deg, #fef08a 0%, #facc15 100%);
  border: 1px solid #eab308;
}

.scribe-lines {
  position: absolute;
  top: 14px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.scribe-lines span {
  height: 2px;
  background: rgba(180, 83, 9, 0.4);
  border-radius: 1px;
}

.scribe-pen {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 14px;
  height: 24px;
  background: linear-gradient(135deg, #1c1917 0%, #78716c 100%);
  clip-path: polygon(50% 0%, 100% 70%, 100% 100%, 0% 100%, 0% 70%);
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 3. Sonata / Settings (Brushed Metallic Gear) */
.icon-sonata {
  background: linear-gradient(180deg, #6c6c70 0%, #48484a 100%);
}

.gear-outer {
  width: 38px;
  height: 38px;
  background: repeating-conic-gradient(#8e8e93 0% 12.5%, #48484a 12.5% 25%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.gear-center {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, #e5e5ea 30%, #8e8e93 100%);
  border-radius: 50%;
  border: 4px solid #3a3a3c;
}

/* 4. Tempo (Electric Cyan Pulse) */
.icon-tempo {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid #38bdf8;
}

.tempo-pulse {
  width: 36px;
  height: 18px;
  border-bottom: 2px solid #38bdf8;
  position: relative;
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.5);
}

/* 5. Gallery (Vibrant Prismatic Indigo/Sky) */
.icon-gallery {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.gallery-prism {
  width: 28px;
  height: 28px;
  background: #ffffff;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
}

/* 6. Horizon Browser (Ocean Compass) */
.icon-horizon {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
}

.compass-dial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #0284c7 0%, #0369a1 100%);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.compass-needle {
  width: 6px;
  height: 32px;
  background: linear-gradient(180deg, #ef4444 50%, #ffffff 50%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  transform: rotate(45deg);
}

/* 7. Shell / Terminal (Dark Slate with Cyan Prompt) */
.icon-shell {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
}

.term-prompt {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  color: #38bdf8;
}

/* 8. Dampener / Trash */
.icon-dampener {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  width: 44px;
  height: 48px;
  border-radius: 6px 6px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.trash-rim {
  width: 46px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 3px;
  position: absolute;
  top: 4px;
}

.trash-mesh {
  width: 34px;
  height: 26px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.2) 0 2px, transparent 2px 6px);
}

/* ==========================================================================
   CENTERED FLOATING DOCK WITH MAGNIFICATION
   ========================================================================== */
#dock-container {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 1000;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#dock {
  pointer-events: auto;
  height: 70px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 22px;
  background: var(--dock-bg);
  backdrop-filter: blur(44px) saturate(210%);
  -webkit-backdrop-filter: blur(44px) saturate(210%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.35), var(--glass-rim-light);
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item .mac-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mac-dock-svg {
  width: 52px;
  height: 52px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item:hover .mac-dock-svg {
  transform: translateY(-4px) scale(1.14);
}

.desktop-disk-svg {
  width: 56px;
  height: 56px;
  display: block;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.15s ease;
}

.desktop-item:hover .desktop-disk-svg {
  transform: scale(1.05);
}

.apple-menu-logo {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}

/* Authentic macOS Dock Launch Bounce with 3 Decaying Oscillations */
@keyframes dockBounce {
  0% { transform: translateY(0) scale(1); }
  22% { transform: translateY(-24px) scale(1.08, 0.94); }
  45% { transform: translateY(0) scale(0.96, 1.05); }
  68% { transform: translateY(-11px) scale(1.03, 0.98); }
  85% { transform: translateY(0) scale(0.99, 1.01); }
  100% { transform: translateY(0) scale(1); }
}

.dock-bounce-icon {
  animation: dockBounce 0.65s cubic-bezier(0.28, 0.84, 0.42, 1) !important;
}

/* Dock absorption pulse when window minimizes into icon */
@keyframes dockAbsorb {
  0% { transform: scale(1); }
  40% { transform: scale(0.88); filter: brightness(1.25); }
  75% { transform: scale(1.06); }
  100% { transform: scale(1); filter: brightness(1); }
}

.dock-absorbed .mac-dock-svg,
.dock-absorbed .mac-app-icon {
  animation: dockAbsorb 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-primary);
  margin-top: 4px;
  box-shadow: 0 0 4px var(--text-primary);
}

.dock-divider {
  width: 1px;
  height: 42px;
  background: var(--glass-border);
  margin: 0 6px;
}

.dock-tooltip {
  position: absolute;
  top: -38px;
  background: rgba(24, 24, 27, 0.88);
  backdrop-filter: blur(14px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: opacity 0.15s ease;
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
}

/* ==========================================================================
   SCRIBE, TEMPO, SETTINGS & CONTROLS
   ========================================================================== */
.textedit-toolbar {
  height: 38px;
  background: rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
}

.tb-segmented {
  display: flex;
  background: rgba(0, 0, 0, 0.14);
  border-radius: 6px;
  padding: 2px;
}

.tb-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.tb-btn.active {
  background: var(--glass-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tb-divider {
  width: 1px;
  height: 16px;
  background: var(--glass-border);
}

.tb-font-picker {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.tb-tag {
  font-size: 11px;
  margin-left: auto;
  color: var(--accent-color);
  font-weight: 600;
}

.editor-area {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 20px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  resize: none;
}

/* Tempo Window */
.tempo-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
  gap: 16px;
  overflow: hidden;
}

.tempo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tempo-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tc-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.tc-metric {
  color: var(--accent-color);
}

.tempo-wave-box {
  height: 80px;
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid rgba(0, 122, 255, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.oscilloscope-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #007aff 0 8px, transparent 8px 16px);
  animation: waveShift 1.2s infinite linear;
  box-shadow: 0 0 10px #007aff;
}

@keyframes waveShift {
  from { transform: translateX(0); }
  to { transform: translateX(24px); }
}

.tempo-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Settings Window */
.settings-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.settings-sidebar {
  width: 230px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.settings-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.settings-search-input {
  width: 100%;
  height: 28px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  padding: 0 10px 0 28px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
}

.settings-search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.settings-search-icon {
  position: absolute;
  left: 8px;
  top: 7px;
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.settings-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: var(--active-card);
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff, #5856d6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
}

.user-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.settings-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 8px 4px;
}

.settings-nav-item {
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.1s ease;
}

.settings-nav-item:hover {
  background: var(--active-card);
}

.settings-nav-item.active {
  background: var(--accent-color);
  color: white;
}

.settings-nav-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
}

.settings-content {
  flex: 1;
  padding: 24px 28px 48px;
  overflow-y: auto;
}

.settings-content h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.settings-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 20px 0;
}

/* macOS Sequoia Inset Grouped Cards */
.settings-group-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  position: relative;
  transition: background 0.1s ease;
}

/* Inset divider lines matching authentic macOS Sequoia HIG */
.settings-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.settings-row:last-child {
  border-bottom: none;
}

body.light-mode .settings-group-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body.light-mode .settings-row:not(:last-child)::after {
  background: rgba(0, 0, 0, 0.08);
}

/* Authentic Apple macOS Sequoia Light Mode Component Overrides */
body.light-mode #menu-bar {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}

body.light-mode .menu-item:hover {
  background: rgba(0, 0, 0, 0.07);
}

body.light-mode .toccata-system-dropdown {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  color: #1d1d1f;
}

body.light-mode .menu-dropdown-item:hover {
  background: var(--accent-color);
  color: #ffffff;
}

body.light-mode .menu-dropdown-separator {
  background: rgba(0, 0, 0, 0.08);
}

body.light-mode #dock {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

body.light-mode .dock-divider {
  background: rgba(0, 0, 0, 0.12);
}

body.light-mode .dock-dot {
  background: #1d1d1f;
}

body.light-mode .window {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #1d1d1f;
}

body.light-mode .window-titlebar {
  background: rgba(246, 246, 248, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}

body.light-mode .finder-sidebar {
  background: rgba(242, 242, 247, 0.78);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .sidebar-category {
  color: rgba(0, 0, 0, 0.45);
}

body.light-mode .sidebar-row {
  color: #1d1d1f;
}

body.light-mode .sidebar-row:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .sidebar-row.active {
  background: rgba(0, 122, 255, 0.15);
  color: #007aff;
}

body.light-mode .finder-grid-view,
body.light-mode .finder-list-view {
  background: #ffffff;
}

body.light-mode .app-card:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-mode .app-title {
  color: #1d1d1f;
}

body.light-mode .file-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

body.light-mode .file-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-mode .file-row.selected {
  background: #007aff;
  color: #ffffff;
}

body.light-mode .file-row.selected span {
  color: #ffffff !important;
}

body.light-mode .settings-sidebar {
  background: rgba(242, 242, 247, 0.78);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .settings-content {
  background: #ffffff;
}

body.light-mode .settings-nav-item {
  color: #1d1d1f;
}

body.light-mode .settings-nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .settings-nav-item.active {
  background: rgba(0, 122, 255, 0.15);
  color: #007aff;
}

body.light-mode #control-center {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
  color: #1d1d1f;
}

body.light-mode .cc-large-module,
body.light-mode .cc-card-btn,
body.light-mode .cc-slider-card {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .cc-title {
  color: #1d1d1f;
}

body.light-mode .cc-desc {
  color: rgba(0, 0, 0, 0.55);
}

body.light-mode .cc-icon-bubble {
  background: rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}

body.light-mode .cc-icon-bubble.active {
  background: var(--accent-color);
  color: #ffffff;
}

body.light-mode #spotlight {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.22);
  color: #1d1d1f;
}

body.light-mode .spotlight-search input {
  color: #1d1d1f;
}

body.light-mode .spotlight-search input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

body.light-mode .result-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .result-item.selected {
  background: var(--accent-color);
  color: #ffffff;
}

body.light-mode .result-item.selected .res-meta {
  color: rgba(255, 255, 255, 0.8);
}

.proxy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  font-size: 13px;
}

.finder-pathbar {
  height: 24px;
  flex-shrink: 0;
  background: var(--titlebar-bg);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.finder-pathbar span {
  cursor: pointer;
}
.finder-pathbar span:hover {
  color: var(--text-primary);
}

.theme-picker-row {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.theme-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.theme-box {
  width: 110px;
  height: 68px;
  border-radius: 10px;
  border: 2px solid transparent;
}

.light-theme-preview .theme-box {
  background: #f4f4f5;
  box-shadow: inset 0 0 0 1px #d4d4d8;
}

.dark-theme-preview .theme-box {
  background: #18181b;
  box-shadow: inset 0 0 0 1px #3f3f46;
}

.theme-card.active .theme-box {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}


.row-title {
  font-size: 14px;
  font-weight: 600;
}

.row-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.accent-dots {
  display: flex;
  gap: 10px;
}

.accent-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}

.accent-dot.active {
  border-color: var(--text-primary);
  transform: scale(1.15);
}

.accent-dot.blue { background: #007aff; }
.accent-dot.purple { background: #af52de; }
.accent-dot.pink { background: #ff2d55; }
.accent-dot.green { background: #34c759; }
.accent-dot.orange { background: #ff9500; }

/* Real Apple Toggle Switches */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

body.light-mode .slider.round {
  background-color: #d1d1d6 !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 1px;
  bottom: 1px;
  background-color: #ffffff;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

input:checked + .slider.round {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

input:checked + .slider.round:before {
  transform: translateX(20px);
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: var(--system-blue-hover);
}

/* ==========================================================================
   CONTROL CENTER POPUP
   ========================================================================== */
#control-center {
  position: absolute;
  top: 36px;
  right: 14px;
  width: 330px;
  padding: 16px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform-origin: top right;
  animation: controlCenterSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes controlCenterSlide {
  0% { opacity: 0; transform: translateY(-12px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.cc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 6px #34c759;
}

.cc-modules-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.cc-large-module {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
}

.cc-icon-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-icon-bubble.active {
  background: var(--accent-color);
  color: white;
}

.cc-icon-bubble svg {
  width: 15px;
  height: 15px;
}

.cc-title {
  font-size: 12px;
  font-weight: 700;
}

.cc-desc {
  font-size: 10px;
  opacity: 0.75;
}

.cc-small-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-card-btn {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cc-card-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.cc-slider-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-title {
  font-size: 12px;
  font-weight: 600;
}

.slider-pill {
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.slider-leading-icon {
  width: 16px;
  height: 16px;
  z-index: 2;
  color: #ffffff;
}

.slider-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: #ffffff;
  border-radius: 14px;
  transition: width 0.1s ease;
}

body.light-mode .slider-track-fill {
  background: var(--text-primary);
}

body.light-mode .slider-leading-icon {
  color: var(--text-primary);
}

/* ==========================================================================
   SPOTLIGHT OVERLAY
   ========================================================================== */
#spotlight-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  padding-top: 15vh;
  z-index: 2000;
}

.spotlight-card {
  width: 640px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.65);
  animation: spotlightDrop 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spotlightDrop {
  0% { opacity: 0; transform: translateY(-24px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.spotlight-input-row {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--glass-border);
  gap: 14px;
}

.spotlight-lens {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
}

#spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
}

.spotlight-esc-pill {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
}

#spotlight-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.result-item:hover, .result-item.selected {
  background: var(--accent-color);
  color: white;
}

/* Notification Toast */
#toast {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  z-index: 3000;
  border-radius: 24px;
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden {
  display: none !important;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   ACOUSTIC TOUCH RESONANCE RIPPLE ("TO TOUCH")
   ========================================================================== */
.acoustic-touch-ripple {
  position: fixed;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 999999;
  border-radius: 50%;
  border: 1.5px solid rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 14px rgba(0, 122, 255, 0.5), inset 0 0 8px rgba(56, 189, 248, 0.35);
  transform: translate(-50%, -50%) scale(0.15);
  animation: acousticTouchExpand 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes acousticTouchExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.15);
    opacity: 0.95;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.4);
    opacity: 0;
  }
}


/* ==========================================================================
   PHASE 1 CORE APP SUITE EXTENSIONS
   Quick Look, Sonata Sound Stage, Tempo Process Table, Scribe Split Canvas
   ========================================================================== */

/* 1. Quick Look Modal Overlay */
#quick-look-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2500;
  animation: fadeIn 0.2s ease;
}

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

.quick-look-card {
  width: 520px;
  max-width: 90vw;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 35px 95px rgba(0, 0, 0, 0.75), var(--glass-rim-light);
  animation: scalePop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

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

.ql-header {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--titlebar-bg);
}

.ql-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ql-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.ql-preview-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.ql-hero-icon {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.ql-file-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.ql-meta-tag {
  font-size: 12px;
  color: var(--text-secondary);
}

.ql-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* 2. Cadence List & Table View */
.finder-list-view {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-row {
  display: grid;
  grid-template-columns: 28px 1fr 140px 100px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  gap: 12px;
  transition: background 0.1s ease;
  cursor: pointer;
}

.file-row:hover, .file-row.selected {
  background: var(--active-card);
}

.file-row.selected {
  background: rgba(0, 122, 255, 0.25);
  box-shadow: inset 0 0 0 1px var(--accent-color);
}

/* Disk Space Donut Card in Cadence */
.disk-overview-card {
  padding: 24px;
  display: flex;
  gap: 28px;
  align-items: center;
}

.donut-chart {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(var(--system-blue) 0% 58%, var(--system-purple) 58% 78%, var(--system-pink) 78% 88%, rgba(255,255,255,0.15) 88% 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.donut-hole {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--glass-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* 3. Sonata Music & Sound Stage */
.sonata-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
}

.sonata-stage {
  display: flex;
  gap: 24px;
  align-items: center;
}

.vinyl-disc {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #007aff 14px, #18181b 15px, #27272a 18px, #09090b 24px, #27272a 32px, #18181b 48px, #09090b 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 122, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: vinylSpin 6s infinite linear paused;
}

.vinyl-disc.playing {
  animation-play-state: running;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-center-art {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff, #af52de);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
}

.sonata-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sonata-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sonata-artist {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Animated Frequency Spectrum Bars */
.spectrum-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
  padding: 4px 0;
}

.spectrum-bar {
  width: 6px;
  background: linear-gradient(180deg, #38bdf8 0%, #007aff 100%);
  border-radius: 3px;
  height: 6px;
  transition: height 0.15s ease;
}

.spectrum-bars.playing .spectrum-bar:nth-child(1) { animation: barDance 0.8s infinite ease-in-out alternate; }
.spectrum-bars.playing .spectrum-bar:nth-child(2) { animation: barDance 0.5s infinite ease-in-out alternate 0.1s; }
.spectrum-bars.playing .spectrum-bar:nth-child(3) { animation: barDance 0.9s infinite ease-in-out alternate 0.2s; }
.spectrum-bars.playing .spectrum-bar:nth-child(4) { animation: barDance 0.6s infinite ease-in-out alternate 0.15s; }
.spectrum-bars.playing .spectrum-bar:nth-child(5) { animation: barDance 1.1s infinite ease-in-out alternate 0.3s; }
.spectrum-bars.playing .spectrum-bar:nth-child(6) { animation: barDance 0.7s infinite ease-in-out alternate 0.25s; }
.spectrum-bars.playing .spectrum-bar:nth-child(7) { animation: barDance 0.9s infinite ease-in-out alternate 0.4s; }
.spectrum-bars.playing .spectrum-bar:nth-child(8) { animation: barDance 0.6s infinite ease-in-out alternate 0.1s; }

@keyframes barDance {
  0% { height: 6px; }
  100% { height: 32px; }
}

.sonata-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.play-round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 6px 16px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.play-round-btn:active {
  transform: scale(0.9);
}

.pipewire-output-box {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.output-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.output-pill.active {
  background: var(--accent-color);
  color: white;
}

/* 4. Tempo Process Table & Force Quit Sheet */
.process-table-container {
  flex: 1 1 auto;
  min-height: 140px;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.process-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.process-table th {
  position: sticky;
  top: 0;
  background: var(--titlebar-bg);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
}

.process-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.process-row:hover, .process-row.selected {
  background: var(--active-card);
}

.process-row.selected {
  background: rgba(0, 122, 255, 0.2);
}

.force-quit-sheet {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  background: var(--glass-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  border-radius: 0 0 14px 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
  animation: sheetDrop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetDrop {
  0% { transform: translate(-50%, -100%); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

/* 5. Scribe Split View */
.scribe-split-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}

.terminal-body,
.horizon-viewport,
#messages-chat-history,
#mail-reader-pane {
  min-height: 0;
  min-width: 0;
}

.scribe-rendered-preview {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  border-left: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.1);
  font-size: 14px;
  line-height: 1.7;
}

.scribe-rendered-preview h1, .scribe-rendered-preview h2, .scribe-rendered-preview h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.scribe-rendered-preview code {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.scribe-statusbar {
  height: 26px;
  background: var(--titlebar-bg);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================================================
   EXPANDED CORE SUITE APPLICATIONS (macOS Richness & Zero Windows Bloat)
   Horizon Browser, Console Terminal, Solfege Calc, Prism Photos, Chronicle
   ========================================================================== */

/* 1. HORIZON BROWSER (Safari-Class Sovereign Browser) */
.horizon-toolbar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--titlebar-bg);
}

.horizon-url-box {
  flex: 1;
  max-width: 580px;
  margin: 0 auto;
  height: 30px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  transition: all 0.15s ease;
}

.horizon-url-box:focus-within {
  background: rgba(0, 0, 0, 0.35);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.horizon-url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.horizon-shield-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #34c759;
  background: rgba(52, 199, 89, 0.15);
  padding: 2px 7px;
  border-radius: 12px;
  cursor: pointer;
}

.horizon-bookmarks-bar {
  height: 28px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 16px;
  font-size: 11px;
  color: var(--text-secondary);
}

.horizon-bookmark-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.12s ease;
}

.horizon-bookmark-item:hover {
  color: var(--text-primary);
}

.horizon-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f0f2f5;
  padding: 0;
  display: block;
  position: relative;
}

body.light-mode .horizon-viewport {
  background: #f0f2f5;
}

body.dark-mode .horizon-viewport {
  background: #18191a;
}

.horizon-page-card {
  width: 100%;
  max-width: 760px;
  margin: 32px auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

/* 2. CONSOLE TERMINAL (macOS Terminal + Windows Command Subsystem) */
.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 14, 0.94);
  backdrop-filter: blur(40px);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: #e4e4e7;
  overflow-y: auto;
}

.terminal-tab-bar {
  height: 32px;
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.terminal-tab-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
}

.terminal-tab-pill.active {
  background: rgba(12, 12, 14, 0.94);
  color: var(--text-primary);
  border-top: 2px solid var(--accent-color);
}

.term-line-output {
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 6px;
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-prompt {
  color: #34c759;
  font-weight: 700;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f4f4f5;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* 3. SOLFEGE CALCULATOR (Apple Compact Glass Precision) */
.calc-window:not(.scientific-mode):not(.with-tape) {
  width: 280px !important;
  min-width: 260px !important;
  max-width: 320px !important;
  min-height: 390px !important;
  max-height: 480px !important;
}

.calc-window.scientific-mode:not(.with-tape) {
  width: 460px !important;
  min-width: 440px !important;
  max-width: 500px !important;
}

.calc-window.with-tape:not(.scientific-mode) {
  width: 440px !important;
  min-width: 420px !important;
  max-width: 480px !important;
}

.calc-window.scientific-mode.with-tape {
  width: 600px !important;
  min-width: 580px !important;
  max-width: 660px !important;
}

.calc-body {
  flex: 1 1 auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.calc-screen {
  flex: none;
  height: 72px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
}

.calc-screen-sub {
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 14px;
}

.calc-screen-main {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.calc-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-key {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.1s ease;
  user-select: none;
}

.calc-key:active {
  transform: scale(0.92);
}

.calc-key-num {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.calc-key-fn {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
}

.calc-key-op {
  background: #ff9500;
  color: white;
  border: none;
  font-size: 22px;
}

.calc-key-op.active {
  background: white;
  color: #ff9500;
}

/* 4. PRISM PHOTOS & VECTOR PREVIEW INSPECTOR */
.prism-toolbar {
  height: 42px;
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.prism-canvas-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 30, 35, 0.8) 0%, rgba(10, 10, 12, 0.95) 100%);
  overflow: hidden;
  position: relative;
  padding: 20px;
}

.prism-image-frame {
  max-width: 85%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prism-exif-pill {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  gap: 14px;
}

/* 5. CHRONICLE CALENDAR & POMODORO ACOUSTIC CLOCK */
.chronicle-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.chronicle-sidebar {
  width: 240px;
  border-right: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex-shrink: 0;
}

.pomodoro-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pomodoro-digits {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--accent-color);
  font-family: var(--font-mono);
}

.chronicle-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cal-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.cal-day-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding-bottom: 6px;
}

.cal-cell {
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.cal-cell:hover {
  background: var(--active-card);
}

.cal-cell.today {
  background: var(--accent-color);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.cal-cell.other-month {
  opacity: 0.3;
}

/* ==========================================================================
   6. ZORIN-STYLE DESKTOP LAYOUT SWITCHER
   ========================================================================== */
.layout-preset-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
  user-select: none;
}

.layout-preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.layout-preset-card.active {
  border: 2px solid var(--accent-color);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.layout-preview-box {
  height: 64px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  position: relative;
  margin-bottom: 8px;
  border: 1px dashed var(--glass-border);
}

.lp-topbar {
  position: absolute;
  top: 4px;
  left: 6px;
  right: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
}

.lp-dock {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 8px;
  background: var(--accent-color);
  border-radius: 4px;
}

.lp-bottombar-center {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 8px;
  background: #007aff;
  border-radius: 4px;
}

.lp-bottombar-left {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
}

.lp-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.lp-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Layout State Transformations */
body.layout-win11 #dock {
  bottom: 10px;
  border-radius: 14px;
  padding: 6px 20px;
}

body.layout-win10 #dock {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  transform: none !important;
  border-radius: 0 !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  justify-content: flex-start !important;
  padding: 4px 18px !important;
}

body.layout-gnome #dock {
  left: 14px !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  width: auto !important;
  height: auto !important;
  border-radius: 20px !important;
  padding: 12px 6px !important;
}

body.layout-gnome #dock-container {
  flex-direction: column !important;
  gap: 10px !important;
  height: auto !important;
}

body.layout-gnome .dock-divider {
  width: 32px !important;
  height: 1px !important;
  margin: 4px 0 !important;
}

body.layout-gnome .dock-item:hover {
  transform: scale(1.15) translateX(6px) !important;
}

/* ==========================================================================
   7. PEAROS / ZORIN / GNOME 47 WORKFLOW OVERHAUL STYLES
   ========================================================================== */

/* GNOME 47 Center Workspace / Activities Pill in Top Bar (GNOME Layout Only) */
.gnome-top-center-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.14s ease;
  user-select: none;
}

body.layout-gnome .gnome-top-center-pill {
  display: flex;
}

.gnome-top-center-pill:hover {
  background: rgba(255, 255, 255, 0.26);
}

.ws-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.35;
  transition: width 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.ws-dot.active {
  width: 18px;
  opacity: 1;
}

.gnome-activities-label {
  font-size: 11px;
  font-weight: 700;
  margin-left: 3px;
  letter-spacing: 0.2px;
}

/* Window Edge Snapping Preview Zone (Zorin / GNOME Tiling) */
#snap-preview-overlay {
  position: fixed;
  z-index: 88000;
  background: rgba(0, 122, 255, 0.22);
  border: 2px solid rgba(0, 122, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  pointer-events: none;
  transition: all 0.15s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 36px rgba(0, 122, 255, 0.25);
}

/* Hide background windows when Launchpad is active so zero ghost window lines cut through workspaces or app grid */
body.launchpad-active .window {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.96) !important;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Full-Screen pearOS Launchpad & GNOME 47 Workspaces Overview */
#launchpad-overlay {
  position: fixed;
  inset: 0;
  z-index: 92000;
  background: rgba(14, 16, 24, 0.78);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 40px 100px;
  animation: fadeInOverview 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

body.light-mode #launchpad-overlay {
  background: rgba(242, 242, 247, 0.85);
}

@keyframes fadeInOverview {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.launchpad-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.workspaces-strip {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.workspace-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
}

.workspace-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.workspace-pill.active {
  background: rgba(0, 122, 255, 0.28);
  border-color: #007aff;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.ws-preview {
  width: 68px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-size: cover;
  background-position: center;
}

.ws-bg-1 { background: linear-gradient(135deg, #38bdf8, #818cf8, #f472b6); }
.ws-bg-2 { background: linear-gradient(135deg, #fb7185, #f59e0b, #6366f1); }
.ws-bg-3 { background: linear-gradient(135deg, #10b981, #0ea5e9, #1e293b); }

.ws-meta {
  display: flex;
  flex-direction: column;
}

.ws-title {
  font-size: 12px;
  font-weight: 700;
}

.ws-sub {
  font-size: 10px;
  opacity: 0.75;
}

.launchpad-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 360px;
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.launchpad-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13px;
  width: 100%;
}

.launchpad-search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 24px 18px;
  width: 100%;
  margin-top: 8px;
}

.launchpad-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.launchpad-item:hover {
  transform: scale(1.1);
}

.lp-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Zorin OS Start Menu (Windows 11 / Zorin Layout) */
#zorin-start-menu {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: 540px;
  height: 440px;
  z-index: 94000;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.zorin-start-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--glass-border);
}

.zorin-start-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

.zorin-start-body {
  display: flex;
  gap: 14px;
  flex: 1;
  overflow: hidden;
}

.zorin-start-left {
  flex: 1.25;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 6px;
  border-right: 1px solid var(--glass-border);
}

.zorin-app-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease;
}

.zorin-app-row:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.zorin-start-right {
  flex: 0.95;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zorin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.zorin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #007aff, #af52de);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.zorin-place-item {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease;
}

.zorin-place-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.zorin-power-row {
  margin-top: auto;
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}

/* Dock Dynamic Size, Position & Autohide Variants */
body.dock-size-small .dock-item {
  width: 40px !important;
  height: 40px !important;
}
body.dock-size-small #dock {
  height: 54px !important;
}

body.dock-size-large .dock-item {
  width: 60px !important;
  height: 60px !important;
}
body.dock-size-large #dock {
  height: 76px !important;
}

body.dock-pos-left #dock {
  left: 12px !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  width: auto !important;
  height: auto !important;
  padding: 12px 6px !important;
}
body.dock-pos-left #dock-container {
  flex-direction: column !important;
  height: auto !important;
}
body.dock-pos-left .dock-divider {
  width: 32px !important;
  height: 1px !important;
  margin: 4px 0 !important;
}

body.dock-pos-right #dock {
  right: 12px !important;
  left: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  width: auto !important;
  height: auto !important;
  padding: 12px 6px !important;
}
body.dock-pos-right #dock-container {
  flex-direction: column !important;
  height: auto !important;
}
body.dock-pos-right .dock-divider {
  width: 32px !important;
  height: 1px !important;
  margin: 4px 0 !important;
}

body.dock-autohide #dock {
  transform: translateX(-50%) translateY(72px);
  opacity: 0.15;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
body.dock-autohide #dock:hover {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Dock Autohide during macOS Full Screen Mode */
body.has-fullscreen-window #dock-container {
  transform: translateY(120px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
}

body.has-fullscreen-window #dock-container:hover,
body.has-fullscreen-window.dock-peek #dock-container {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* True Tone / GNOME Night Light Filter */
body.true-tone-active #desktop {
  filter: sepia(14%) saturate(108%) brightness(var(--screen-brightness, 1));
}
#desktop {
  filter: brightness(var(--screen-brightness, 1));
  transition: filter 0.2s ease;
}

/* Software Store Cards (Gallery.app) */
.store-app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.store-app-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent-color);
}
.store-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}
.chat-bubble {
  max-width: 78%;
  padding: 8px 13px;
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.45;
}
.chat-bubble.incoming {
  align-self: flex-start;
  background: rgba(142, 142, 147, 0.22);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-bubble.outgoing {
  align-self: flex-end;
  background: var(--accent-color);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* ==========================================================================
   TOCCATA OS AFTER-EFFECTS CC RADIAL FAST BLUR VOLUMETRIC BOOT ANIMATION
   (1. Bouncing White Seed Pill -> 2. Liquid 1:1 Morph into Monolith -> 3. Shape-Extruded Orbiting Ray Stack -> 4. Pure White Resolve)
   Audited & Verified via Elephant-Goldfish Model (EGM)
   ========================================================================== */
#toccata-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

#toccata-boot-splash.boot-dismissed {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.6s;
}

.boot-logo-stage {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stage 1: Bouncing White Seed Pill (0.0s -> 0.72s) - Pure GPU Scale/Translate, Zero CPU Reflow */
.boot-seed-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -11px;
  margin-left: -11px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.8), 0 0 32px rgba(255, 255, 255, 0.3);
  z-index: 4;
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: bootSeedPillBounce 0.72s linear forwards;
}

/* Stage 2: Monolith SVG Container (Seamlessly expands from exact 22px seed at 0.70s) */
.boot-svg-emblem {
  position: relative;
  z-index: 3;
  width: 136px;
  height: 136px;
  overflow: visible;
  opacity: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: bootMonolithExpand 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.70s forwards;
}

.boot-foreground-monolith {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}

.boot-svg-emblem .boot-part-bar {
  transform-origin: 128px 72px;
  will-change: transform;
  animation: bootBarUnfurl 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.70s both;
}

.boot-svg-emblem .boot-part-fork {
  transform-origin: 128px 156px;
  will-change: transform;
  animation: bootForkUnfurl 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.70s both;
}

/* Stage 3: CC Radial Fast Blur Extrusion Stack — 4 Hardware-Optimized Silhouette Echoes
   (Begins sweeping at 1.40s once foreground monolith has locked into place) */
.boot-volumetric-stack {
  opacity: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: bootVolumetricStackFade 1.70s cubic-bezier(0.25, 0.8, 0.25, 1) 1.40s forwards;
}

.boot-echo {
  transform-origin: 128px 131px;
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: bootEchoOrbit 1.70s cubic-bezier(0.25, 0.8, 0.25, 1) 1.40s forwards;
}

.boot-echo.echo-1 { --d: 0.25; filter: blur(4px);  opacity: 0.44; }
.boot-echo.echo-2 { --d: 0.55; filter: blur(10px); opacity: 0.30; }
.boot-echo.echo-3 { --d: 0.90; filter: blur(20px); opacity: 0.18; }
.boot-echo.echo-4 { --d: 1.35; filter: blur(34px); opacity: 0.08; }

/* Subtle Luminous Glow on Top Menu Bar & Interactive Logo Hover */
#toccata-menu-btn:hover .toccata-menubar-logo {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
  transition: filter 0.25s ease;
}

.toccata-interactive-logo {
  transition: filter 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.toccata-interactive-logo:hover {
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.7)) !important;
  transform: scale(1.03);
}

.toccata-interactive-logo.logo-ping {
  animation: bootMonolithExpand 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Keyframes with Physical Gravity Acceleration & 100% GPU Compositing */
@keyframes bootSeedPillBounce {
  0% {
    opacity: 0;
    transform: translateY(-85px) scale(0.64, 1.91);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); /* Accelerating fall under gravity */
  }
  28% {
    opacity: 1;
    transform: translateY(0px) scale(1.36, 0.68); /* Elastic squash on ground impact */
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); /* Decelerating rebound to apex */
  }
  48% {
    transform: translateY(-14px) scale(0.85, 1.15); /* Rebound apex */
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); /* Secondary drop */
  }
  68% {
    transform: translateY(0px) scale(1.10, 0.90); /* Secondary ground landing */
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); /* Spring settling */
  }
  86% {
    opacity: 1;
    transform: translateY(0px) scale(1.0, 1.0); /* Exact 22px circle matching SVG start */
    animation-timing-function: ease-out;
  }
  100% {
    opacity: 0;
    transform: translateY(0px) scale(1.0, 1.0);
  }
}

@keyframes bootMonolithExpand {
  0% {
    opacity: 0;
    transform: scale(0.162); /* 136px * 0.162 = 22.03px exact diameter */
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
  }
  12% {
    opacity: 1;
    transform: scale(0.24);
  }
  60% {
    opacity: 1;
    transform: scale(1.03);
  }
  80%, 100% {
    opacity: 1;
    transform: scale(1.0);
  }
}

@keyframes bootBarUnfurl {
  0% {
    transform: translateY(14px) scaleX(0.4);
  }
  50% {
    transform: translateY(-2px) scaleX(1.02);
  }
  75%, 100% {
    transform: translateY(0) scaleX(1);
  }
}

@keyframes bootForkUnfurl {
  0% {
    transform: translateY(-12px) scale(0.4);
  }
  50% {
    transform: translateY(2px) scale(1.02);
  }
  75%, 100% {
    transform: translateY(0) scale(1);
  }
}

/* Each echo translates and scales outward along the orbiting light vector */
@keyframes bootEchoOrbit {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  20% {
    /* Light hits from Right -> Volumetric rays cast Left & slightly Down */
    transform: translate(calc(-42px * var(--d)), calc(16px * var(--d))) scale(calc(1 + 0.14 * var(--d)));
  }
  45% {
    /* Light orbits to Bottom -> Volumetric rays cast Up & Left */
    transform: translate(calc(-24px * var(--d)), calc(-34px * var(--d))) scale(calc(1 + 0.18 * var(--d)));
  }
  72% {
    /* Light orbits to Top-Left -> Volumetric rays cast Right & Down */
    transform: translate(calc(40px * var(--d)), calc(24px * var(--d))) scale(calc(1 + 0.16 * var(--d)));
  }
  92% {
    /* Rays contract back into the center silhouette */
    transform: translate(calc(12px * var(--d)), calc(6px * var(--d))) scale(calc(1 + 0.04 * var(--d)));
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

@keyframes bootVolumetricStackFade {
  0% {
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  75% {
    opacity: 0.92;
  }
  95% {
    opacity: 0.15;
  }
  100% {
    opacity: 0;
  }
}

/* Reduced Motion Accessibility Safeguards */
@media (prefers-reduced-motion: reduce) {
  .boot-seed-pill {
    display: none !important;
  }
  .boot-volumetric-stack {
    display: none !important;
  }
  .boot-svg-emblem {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .boot-part-bar,
  .boot-part-fork {
    transform: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   SOVEREIGN APPLICATION SUITE ENHANCEMENTS
   Rich Interactive Desktop UI for all 12 Native Applications
   ========================================================================== */

/* 1. Universal Glass Modal Backdrops */
.toccata-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.16s ease;
}

.toccata-modal-sheet {
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border-radius: 16px;
  overflow: hidden;
  animation: sheetPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetPop {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 2. Cadence File Context Menu */
.file-context-menu {
  position: fixed;
  z-index: 99999;
  background: var(--menu-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 6px;
  min-width: 175px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.12s ease;
}

.file-context-menu-item:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.file-context-menu-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

/* 3. Solfege Calculator Tape Drawer & Scientific Mode */
.calc-tape-drawer {
  position: absolute;
  top: 38px;
  right: 0;
  width: 180px;
  bottom: 0;
  background: rgba(18, 18, 22, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--glass-border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: -8px 0 24px rgba(0,0,0,0.4);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-tape-drawer.hidden {
  display: none !important;
}

.calc-window.scientific-mode {
  width: 460px !important;
}

.calc-sci-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid var(--glass-border);
}

/* 4. Sonata Graphic Equalizer */
.sonata-eq-drawer {
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--glass-border);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.18s ease;
}

.eq-sliders-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.eq-band-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
}

.eq-band-col input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 16px;
  height: 76px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

/* 5. Prism Photo Filmstrip & Adjustments */
.prism-filmstrip {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid var(--glass-border);
  overflow-x: auto;
  align-items: center;
}

.prism-thumb {
  width: 64px;
  height: 44px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  overflow: hidden;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.prism-thumb.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-glow);
}

.prism-adjustments-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid var(--glass-border);
  font-size: 11px;
}

.prism-slider-group {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.prism-slider-group input[type="range"] {
  width: 68px;
  accent-color: var(--accent-color);
}

/* 6. Chronicle Calendar Selection */
.cal-day-cell.selected {
  background: var(--accent-color) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 0 10px var(--accent-glow);
}






/* ==========================================================================
   REVERSE-ENGINEERED APPS SUITE (pearOS NiceC0re + Zorin OS 18 Core)
   1. Reminders (pearos-todo)
   2. Contacts (pearos-contacts)
   3. Zorin Connect (zorin-connect)
   4. Welcome Tour (zorin-os-tour & pearos-welcome)
   5. Dynamic Island Notch (pearos-notch)
   ========================================================================== */

/* 1. Reminders (pearos-todo) */
.todo-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.todo-sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-shrink: 0;
}

.todo-smart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.todo-smart-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.todo-smart-card:hover, .todo-smart-card.active {
  background: rgba(0, 122, 255, 0.16);
  border-color: rgba(0, 122, 255, 0.4);
}

body.light-mode .todo-smart-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

body.light-mode .todo-smart-card:hover,
body.light-mode .todo-smart-card.active {
  background: rgba(0, 122, 255, 0.1);
  border-color: #007aff;
}

.todo-smart-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.todo-icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.todo-smart-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.todo-smart-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.todo-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-window);
}

body.light-mode .todo-content {
  background: #ffffff;
}

.todo-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.todo-header-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent-color);
}

.todo-header-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.todo-items-list {
  flex: 1;
  padding: 16px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  transition: all 0.15s ease;
}

body.light-mode .todo-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.todo-item.completed .todo-text-title {
  text-decoration: line-through;
  opacity: 0.5;
}

.todo-item-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.todo-item-check:hover {
  border-color: var(--accent-color);
}

.todo-item.completed .todo-item-check {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.todo-item.completed .todo-item-check::after {
  content: '';
  width: 6px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.todo-item-body {
  flex: 1;
  min-width: 0;
}

.todo-text-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.todo-text-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.todo-input-bar {
  padding: 12px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.08);
}

body.light-mode .todo-input-bar {
  background: #f8f8fa;
}

/* 2. Contacts (pearos-contacts) */
.contacts-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.contacts-sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.contacts-search-box {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.contact-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.contact-row.active {
  background: var(--accent-color) !important;
  color: #ffffff !important;
}

.contact-row.active .contact-row-sub {
  color: rgba(255, 255, 255, 0.8) !important;
}

.contact-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.contact-row-info {
  flex: 1;
  min-width: 0;
}

.contact-row-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-row-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contacts-detail-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 32px 36px;
  background: var(--bg-window);
}

body.light-mode .contacts-detail-pane {
  background: #ffffff;
}

.contact-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.contact-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.contact-actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.contact-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 72px;
}

.contact-action-btn:hover {
  background: rgba(0, 122, 255, 0.15);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* 3. Zorin Connect (zorin-connect) */
.connect-body {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-window);
}

body.light-mode .connect-body {
  background: #ffffff;
}

.connect-device-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

body.light-mode .connect-device-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.connect-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.connect-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.light-mode .connect-tile {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.connect-tile:hover {
  transform: translateY(-2px);
  background: rgba(0, 122, 255, 0.12);
  border-color: var(--accent-color);
}

.connect-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* 4. Welcome Tour (zorin-os-tour & pearos-welcome) */
.tour-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 40px 24px;
  background: var(--bg-window);
}

body.light-mode .tour-body {
  background: #ffffff;
}

.tour-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  max-width: 580px;
  margin: auto;
}

.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 18px;
}

.tour-dots {
  display: flex;
  gap: 8px;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.35;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tour-dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--accent-color);
  opacity: 1;
}

/* Precision Settings Divider and Container Fixes */
.settings-content {
  flex: 1;
  padding: 24px 32px 64px !important;
  overflow-y: auto !important;
}

.settings-group-card {
  margin-bottom: 24px !important;
}

.settings-row:last-child::after {
  display: none !important;
}

/* Light mode launchpad search refinement */
body.light-mode .launchpad-search-bar {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  color: #1d1d1f !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .launchpad-search-bar input {
  color: #1d1d1f !important;
}

body.light-mode .launchpad-search-bar input::placeholder {
  color: rgba(60, 60, 67, 0.6) !important;
}

body.light-mode .launchpad-item span {
  color: #1d1d1f !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

body.light-mode .workspace-pill {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  color: #1d1d1f !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

body.light-mode .workspace-pill .ws-title {
  color: #1d1d1f !important;
}

body.light-mode .workspace-pill .ws-sub {
  color: rgba(60, 60, 67, 0.7) !important;
}

body.light-mode .workspace-pill.active {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 4px 18px rgba(0, 122, 255, 0.25) !important;
}


/* Horizon Dual Engine Switcher Button (WebKit Safari vs Chromium Blink) */
.engine-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(0, 122, 255, 0.35);
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.engine-switcher-btn:hover {
  background: rgba(0, 122, 255, 0.22);
  transform: translateY(-1px);
}

.engine-switcher-btn.engine-chromium {
  border-color: rgba(175, 82, 222, 0.38);
  background: rgba(175, 82, 222, 0.14);
  color: #af52de;
}

.engine-switcher-btn.engine-chromium:hover {
  background: rgba(175, 82, 222, 0.24);
}


/* ==========================================================================
   APP SUITE PROFESSIONAL ENHANCEMENTS: PERSISTENCE & INTERACTIVITY
   ========================================================================== */

/* Sonata Interactive Playlist */
.sonata-playlist-section {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 4px;
  gap: 6px;
}
body.light-mode .sonata-playlist-section {
  background: rgba(0, 0, 0, 0.04);
}
.sonata-playlist {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 140px;
  overflow-y: auto;
}
.sonata-track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.14s ease;
  font-size: 12px;
  user-select: none;
}
.sonata-track-row:hover {
  background: rgba(255, 255, 255, 0.08);
}
body.light-mode .sonata-track-row:hover {
  background: rgba(0, 0, 0, 0.06);
}
.sonata-track-row.active {
  background: rgba(255, 45, 85, 0.18) !important;
  color: #ff2d55;
  font-weight: 600;
}
body.light-mode .sonata-track-row.active {
  background: rgba(255, 45, 85, 0.12) !important;
  color: #fa114f;
}
.sonata-track-num {
  font-size: 11px;
  color: var(--text-secondary);
  width: 16px;
  text-align: center;
}
.sonata-track-row.active .sonata-track-num {
  color: #ff2d55;
}
.sonata-track-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sonata-track-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sonata-track-sub {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sonata-track-dur {
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Scribe Search & Delete */
.scribe-search-box {
  width: 100%;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 4px;
}
body.light-mode .scribe-search-box {
  background: rgba(0, 0, 0, 0.05);
}
.scribe-note-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}
.scribe-note-item:hover .scribe-del-btn {
  opacity: 1;
}
.scribe-del-btn {
  opacity: 0;
  transition: opacity 0.15s ease;
  background: transparent;
  border: none;
  color: #ff453a;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.scribe-del-btn:hover {
  background: rgba(255, 69, 58, 0.18);
}

/* Chronicle Calendar Interactive Selection & Event Dots */
.cal-cell {
  position: relative;
}
.cal-cell.selected {
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
  background: rgba(0, 122, 255, 0.18) !important;
  font-weight: 700;
}
.cal-event-dots {
  position: absolute;
  bottom: 2px;
  display: flex;
  gap: 2px;
  justify-content: center;
}
.cal-event-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-color);
}
.cal-event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  transition: background 0.12s ease;
}
.cal-event-item:hover .cal-event-del {
  opacity: 1;
}
.cal-event-del {
  opacity: 0;
  background: transparent;
  border: none;
  color: #ff453a;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.cal-event-del:hover {
  background: rgba(255, 69, 58, 0.18);
}

/* Reminders Delete Button */
.todo-item {
  position: relative;
}
.todo-item:hover .todo-delete-btn {
  opacity: 1;
}
.todo-delete-btn {
  opacity: 0;
  transition: opacity 0.15s ease;
  background: transparent;
  border: none;
  color: #ff453a;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.todo-delete-btn:hover {
  background: rgba(255, 69, 58, 0.18);
}

/* Prism Color Presets Bar */
.prism-presets-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.prism-preset-btn {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.12s ease;
}
.prism-preset-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.prism-preset-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}
body.light-mode .prism-preset-btn {
  background: rgba(0, 0, 0, 0.05);
}
body.light-mode .prism-preset-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}
body.light-mode .prism-preset-btn.active {
  background: var(--accent-color);
  color: #ffffff;
}
