:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --menubar-height: 30px;
  --dock-height: 68px;

  --accent: #0a84ff;
  --accent-hover: #2d96ff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --danger: #ff453a;
  --warning: #ffd60a;
  --success: #30d158;

  --radius-window: 16px;
  --radius-panel: 18px;
  --radius-control: 10px;
  --radius-pill: 999px;

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Dark Theme Default */
  --glass-bg: rgba(24, 28, 38, 0.72);
  --glass-bg-elevated: rgba(30, 35, 48, 0.84);
  --glass-bg-subtle: rgba(255, 255, 255, 0.08);
  --glass-menubar: rgba(15, 19, 28, 0.56);
  --glass-dock: rgba(24, 28, 40, 0.52);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.12);

  --surface-app: rgba(22, 25, 34, 0.92);
  --surface-sidebar: rgba(18, 21, 29, 0.78);
  --surface-card: rgba(255, 255, 255, 0.06);
  --surface-input: rgba(0, 0, 0, 0.28);

  --text-primary: #f5f7fa;
  --text-secondary: rgba(235, 240, 248, 0.68);
  --text-muted: rgba(235, 240, 248, 0.45);
  --divider: rgba(255, 255, 255, 0.11);

  --shadow-window: 0 24px 64px rgba(0, 0, 0, 0.52), 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-window-inactive: 0 12px 32px rgba(0, 0, 0, 0.34);
  --shadow-panel: 0 20px 52px rgba(0, 0, 0, 0.48);
}

html[data-theme="light"] {
  --glass-bg: rgba(246, 248, 252, 0.78);
  --glass-bg-elevated: rgba(255, 255, 255, 0.88);
  --glass-bg-subtle: rgba(15, 23, 42, 0.06);
  --glass-menubar: rgba(244, 247, 252, 0.65);
  --glass-dock: rgba(255, 255, 255, 0.54);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-highlight: rgba(255, 255, 255, 0.72);

  --surface-app: rgba(250, 251, 254, 0.94);
  --surface-sidebar: rgba(238, 242, 249, 0.84);
  --surface-card: rgba(15, 23, 42, 0.045);
  --surface-input: rgba(15, 23, 42, 0.06);

  --text-primary: #111827;
  --text-secondary: rgba(17, 24, 39, 0.68);
  --text-muted: rgba(17, 24, 39, 0.46);
  --divider: rgba(15, 23, 42, 0.1);

  --shadow-window: 0 24px 60px rgba(15, 23, 42, 0.24), 0 4px 14px rgba(15, 23, 42, 0.12);
  --shadow-window-inactive: 0 10px 28px rgba(15, 23, 42, 0.14);
  --shadow-panel: 0 20px 48px rgba(15, 23, 42, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: #0b162c;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(128, 138, 158, 0.35);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 138, 158, 0.55);
}
