    /* Custom Monochrome Liquid Glass Design System & Apple-Grade Ergonomics */
    :root {
      --bg-canvas: #f2f2f0;
      --bg-surface: linear-gradient(165deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.68) 100%);
      --bg-subtle: rgba(236, 236, 233, 0.72);
      --bg-dock: rgba(246, 246, 244, 0.82);
      --ink-primary: #0f0f10;
      --ink-secondary: #4a4a4e;
      --ink-muted: #7c7c82;
      --border-hairline: rgba(17, 17, 19, 0.09);
      --border-strong: #111113;
      --glass-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.85), 0 8px 24px -8px rgba(0, 0, 0, 0.06);
      --dot-color: rgba(17, 17, 17, 0.05);
    }

    html.dark {
      --bg-canvas: #070708;
      --bg-surface: linear-gradient(165deg, rgba(28, 28, 31, 0.78) 0%, rgba(15, 15, 17, 0.66) 100%);
      --bg-subtle: rgba(34, 34, 38, 0.68);
      --bg-dock: rgba(12, 12, 14, 0.82);
      --ink-primary: #f6f6f7;
      --ink-secondary: #a6a6ad;
      --ink-muted: #72727a;
      --border-hairline: rgba(255, 255, 255, 0.10);
      --border-strong: #f6f6f7;
      --glass-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.14), 0 12px 30px -10px rgba(0, 0, 0, 0.55);
      --dot-color: rgba(255, 255, 255, 0.05);
    }

    body {
      background-color: var(--bg-canvas);
      color: var(--ink-primary);
      background-image:
        radial-gradient(circle at 15% 8%, rgba(160, 160, 168, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 85% 24%, rgba(130, 130, 138, 0.10) 0%, transparent 45%),
        radial-gradient(var(--dot-color) 1px, transparent 1px);
      background-size: 100% 100%, 100% 100%, 22px 22px;
      background-attachment: fixed;
      padding-bottom: env(safe-area-inset-bottom, 0px);
      transition: background-color 0.22s ease, color 0.22s ease;
      -webkit-tap-highlight-color: transparent;
      letter-spacing: -0.011em;
    }

    /* Hardware-Accelerated Liquid Glass Surface (Zero-Lag on Android) */
    .surface-card {
      background: var(--bg-surface);
      backdrop-filter: blur(18px) saturate(150%);
      -webkit-backdrop-filter: blur(18px) saturate(150%);
      border: 1px solid var(--border-hairline);
      box-shadow: var(--glass-specular);
      transform: translateZ(0);
      transition: border-color 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
    }

    .surface-card-focus:focus-within {
      border-color: var(--border-strong);
    }

    .surface-subtle {
      background-color: var(--bg-subtle);
    }

    .glass-bar {
      background-color: var(--bg-dock);
      backdrop-filter: blur(20px) saturate(160%);
      -webkit-backdrop-filter: blur(20px) saturate(160%);
      transform: translateZ(0);
    }

    .border-hairline {
      border-color: var(--border-hairline);
    }

    .border-strong {
      border-color: var(--border-strong);
    }

    .text-ink {
      color: var(--ink-primary);
    }

    .text-ink-sec {
      color: var(--ink-secondary);
    }

    .text-ink-muted {
      color: var(--ink-muted);
    }

    .tactile-btn {
      transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
      user-select: none;
    }
    .tactile-btn:active {
      transform: scale(0.965);
    }

    /* Crisp scrollbar & mobile horizontal strip utility */
    .no-scrollbar::-webkit-scrollbar {
      display: none;
    }
    .no-scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }

    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: var(--border-hairline);
      border-radius: 9999px;
    }

    /* Progressive Staggered Motion-Blur Reveal (Ultra-Fast 220ms GPU Pipeline) */
    @keyframes kalamMotionBlurIn {
      0% {
        opacity: 0;
        filter: blur(7px);
        transform: translate3d(0, 6px, 0) scale(0.988);
      }
      100% {
        opacity: 1;
        filter: blur(0px);
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    .motion-blur-stage-1 {
      animation: kalamMotionBlurIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
      will-change: transform, opacity, filter;
    }

    .motion-blur-stage-2 {
      animation: kalamMotionBlurIn 0.23s cubic-bezier(0.22, 1, 0.36, 1) 0.045s both;
      will-change: transform, opacity, filter;
    }

    .motion-blur-stage-3 {
      animation: kalamMotionBlurIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) 0.09s both;
      will-change: transform, opacity, filter;
    }

    /* Equalizer bars for TTS playback & live mic */
    @keyframes eqBar {
      0%, 100% { height: 4px; }
      50% { height: 14px; }
    }
    .eq-1 { animation: eqBar 0.55s infinite ease-in-out; }
    .eq-2 { animation: eqBar 0.4s infinite ease-in-out 0.15s; }
    .eq-3 { animation: eqBar 0.65s infinite ease-in-out 0.25s; }

    @keyframes pulseLive {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.25; }
    }
    .pulse-live {
      animation: pulseLive 1s infinite ease-in-out;
    }

    @keyframes micPulseRing {
      0% { box-shadow: 0 0 0 0 rgba(128, 128, 128, 0.45); }
      70% { box-shadow: 0 0 0 8px rgba(128, 128, 128, 0); }
      100% { box-shadow: 0 0 0 0 rgba(128, 128, 128, 0); }
    }
    .mic-recording {
      animation: micPulseRing 1.3s infinite ease-out;
    }

    /* Arabic script refinement with generous vertical clearance for Harakat */
    .arabic-output {
      font-family: 'IBM Plex Sans Arabic', sans-serif;
      line-height: 1.95;
      letter-spacing: 0;
    }

    /* Prevent Android WebView / browser autofill white background box on inputs */
    textarea, input {
      background-color: transparent !important;
      color: var(--ink-primary);
      -webkit-appearance: none;
    }

    /* Native Android/iOS Bottom Thumb Dock */
    .android-thumb-dock {
      padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
    }