@import "@fontsource-variable/noto-sans-sc";
@import "tailwindcss";
@import "tw-animate-css";
@source "../node_modules/streamdown/dist";
@source "../node_modules/@streamdown/*/dist";

@custom-variant dark (&:where(.dark, .dark *));

@theme inline {
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));
  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));
  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));
  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);
  --shadow-glass: 0 18px 50px rgba(10, 18, 32, 0.18);
}

@theme {
  --animate-accordion-down: accordion-down 0.2s ease-out;
  --animate-accordion-up: accordion-up 0.2s ease-out;

  @keyframes accordion-down {
    from {
      height: 0;
    }

    to {
      height: var(--radix-accordion-content-height);
    }
  }

  @keyframes accordion-up {
    from {
      height: var(--radix-accordion-content-height);
    }

    to {
      height: 0;
    }
  }
}

@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentColor);
  }

  :where(*) {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }

  :where(*)::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
  }

  :where(*)::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 0;
  }

  :where(*)::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--scrollbar-radius);
  }

  :where(*):hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-hover);
  }

  :where(*)::-webkit-scrollbar-thumb:active {
    background: var(--scrollbar-thumb-active);
  }

  :where(*)::-webkit-scrollbar-corner {
    background: var(--scrollbar-track);
  }

  @media (forced-colors: active) {
    :where(*) {
      scrollbar-color: auto;
    }
  }
}

:root {
  color-scheme: light;
  background: oklch(94.5% 0.012 250);
  --canvas-map: oklch(94.5% 0.012 250);
  --canvas-map-grid: rgba(37, 99, 235, 0.06);
  --acrylic-navigation: rgba(234, 243, 250, 0.64);
  --acrylic-panel: rgba(223, 235, 246, 0.56);
  --acrylic-control: rgba(242, 248, 253, 0.74);
  --agent-floating-reading-surface: rgba(235, 244, 251, 0.82);
  --agent-floating-reading-item: rgba(249, 251, 254, 0.72);
  --agent-floating-reading-item-hover: rgba(249, 251, 254, 0.9);
  --agent-floating-reading-active: rgba(219, 234, 254, 0.82);
  --agent-user-message-surface: rgba(224, 229, 249, 0.92);
  --agent-user-message-border: rgba(79, 70, 229, 0.22);
  --agent-white-acrylic-surface: rgba(255, 255, 255, 0.86);
  --agent-operational-surface: rgba(255, 255, 255, 0.86);
  --acrylic-panel-blur: 24px;
  --acrylic-control-blur: 18px;
  --acrylic-backdrop-saturation: 1.08;
  --agent-floating-acrylic-backdrop: blur(var(--acrylic-control-blur))
    saturate(var(--acrylic-backdrop-saturation));
  --acrylic-exclusion: rgba(255, 255, 255, 0.035);
  --acrylic-luminosity: rgba(255, 255, 255, 0.1);
  --scrollbar-size: 4px;
  --scrollbar-radius: 2px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(100, 116, 139, 0.22);
  --scrollbar-thumb-hover: rgba(100, 116, 139, 0.3);
  --scrollbar-thumb-active: rgba(71, 85, 105, 0.36);
  --acrylic-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.035'/%3E%3C/svg%3E");
  --acrylic-border: rgba(255, 255, 255, 0.52);
  --acrylic-outline: rgba(63, 83, 108, 0.18);
  --acrylic-highlight: rgba(255, 255, 255, 0.68);
  --shadow-navigation: 0 1px 0 rgba(48, 65, 85, 0.14);
  --shadow-panel: 0 12px 32px rgba(15, 33, 55, 0.14);
  --shadow-agent-history-bottom: 0 12px 12px -12px rgba(15, 33, 55, 0.32);
  --shadow-control: 0 6px 18px rgba(15, 33, 55, 0.1);
  --shadow-transient: 0 14px 34px rgba(15, 33, 55, 0.18);
  --shadow-agent-floating:
    0 18px 42px rgba(15, 33, 55, 0.18), 0 4px 12px rgba(15, 33, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --shadow-agent-operational: 0 12px 32px rgba(15, 33, 55, 0.14), 0 3px 10px rgba(15, 33, 55, 0.08);
  --surface-dock: oklch(96.5% 0.012 248);
  --surface-control: rgba(239, 246, 252, 0.92);
  --surface-well: rgba(213, 227, 239, 0.66);
  --surface-reading: rgba(250, 252, 254, 0.96);
  --glass-transient: rgba(232, 242, 250, 0.66);
  --surface-border: oklch(86.5% 0.012 250);
  --surface-divider: oklch(90.5% 0.009 250);
  --surface-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-control: 12px;
  --radius-panel: 16px;
  --action-blue: #2563eb;
  --action-blue-hover: #1d4ed8;
  --action-blue-pressed: #1e40af;
  --action-soft: oklch(96.8% 0.018 255.5);
  --action-soft-pressed: oklch(94.8% 0.028 255.5);
  --action-selection-soft: #e8f1ff;
  --action-selection-soft-hover: #dbeafe;
  --action-selection-soft-pressed: #cfe2ff;
  --action-selection-border: rgba(59, 130, 246, 0.2);
  --action-border: oklch(88.2% 0.015 250);
  --action-border-hover: rgba(37, 99, 235, 0.3);
  --action-border-pressed: rgba(37, 99, 235, 0.44);
  --action-danger: #dc2626;
  --action-danger-hover: #b91c1c;
  --action-danger-pressed: #991b1b;
  --action-focus-ring: rgba(37, 99, 235, 0.34);
  --action-focus-offset: rgba(250, 252, 254, 0.96);
  --action-shadow-primary: 0 5px 12px rgba(37, 99, 235, 0.2);
  --action-shadow-secondary: 0 2px 5px rgba(15, 33, 55, 0.08);
  --action-shadow-primary-pressed: 0 1px 3px rgba(30, 64, 175, 0.18);
  --action-shadow-secondary-pressed: 0 1px 2px rgba(15, 33, 55, 0.06);
  --ink: #0f172a;
  --status-neutral-soft: oklch(96.9% 0.005 247.9);
  --status-neutral-border: oklch(90.6% 0.013 244.3);
  --status-neutral-foreground: oklch(46.5% 0.04 253.9);
  --status-neutral-mark: oklch(66% 0.039 253.6);
  --status-info-soft: oklch(97.1% 0.011 256.7);
  --status-info-border: oklch(90.7% 0.031 252.7);
  --status-info-foreground: oklch(48.9% 0.124 258);
  --status-info-mark: oklch(59.7% 0.124 257.2);
  --status-success-soft: oklch(97.2% 0.011 158.8);
  --status-success-border: oklch(90.4% 0.031 159);
  --status-success-foreground: oklch(51.2% 0.086 163.6);
  --status-success-mark: oklch(62% 0.107 162);
  --status-warning-soft: oklch(97.2% 0.016 82.8);
  --status-warning-border: oklch(89.5% 0.049 77.2);
  --status-warning-foreground: oklch(51.8% 0.105 62.8);
  --status-warning-mark: oklch(67.2% 0.126 65.2);
  --status-danger-soft: oklch(96.5% 0.01 17.3);
  --status-danger-border: oklch(87.8% 0.031 17.8);
  --status-danger-foreground: oklch(50.5% 0.118 22.2);
  --status-danger-mark: oklch(62.6% 0.142 22);
  --tone-agent: oklch(95% 0.035 290);
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 221 83% 53%;
  --primary-foreground: 210 40% 98%;
  --secondary: 214 32% 91%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 210 40% 96%;
  --accent-foreground: 222 47% 11%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 210 40% 98%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 221 83% 53%;
  --radius: 0.5rem;
}

[data-basemap-tone="satellite"] {
  --acrylic-navigation: rgba(232, 241, 249, 0.8);
  --acrylic-panel: rgba(220, 232, 243, 0.72);
  --acrylic-control: rgba(241, 247, 252, 0.86);
  --agent-floating-reading-surface: rgba(228, 239, 247, 0.88);
  --agent-floating-reading-item: rgba(247, 251, 254, 0.78);
  --agent-floating-reading-item-hover: rgba(249, 252, 255, 0.92);
  --agent-floating-reading-active: rgba(219, 234, 254, 0.88);
  --agent-user-message-surface: rgba(222, 227, 249, 0.94);
  --agent-user-message-border: rgba(79, 70, 229, 0.28);
  --agent-white-acrylic-surface: rgba(255, 255, 255, 0.9);
  --agent-operational-surface: rgba(255, 255, 255, 0.9);
  --acrylic-panel-blur: 24px;
  --acrylic-control-blur: 18px;
  --acrylic-backdrop-saturation: 1.02;
  --acrylic-exclusion: rgba(255, 255, 255, 0.04);
  --acrylic-luminosity: rgba(255, 255, 255, 0.1);
  --surface-control: rgba(242, 248, 253, 0.96);
  --surface-well: rgba(217, 230, 241, 0.78);
  --surface-reading: rgba(252, 253, 255, 0.985);
  --glass-transient: rgba(232, 242, 250, 0.76);
  --acrylic-outline: rgba(43, 63, 86, 0.28);
  --shadow-panel: 0 14px 36px rgba(7, 18, 32, 0.22);
  --shadow-agent-history-bottom: 0 14px 14px -14px rgba(7, 18, 32, 0.4);
  --shadow-control: 0 7px 20px rgba(7, 18, 32, 0.16);
  --shadow-transient: 0 16px 38px rgba(7, 18, 32, 0.26);
  --shadow-agent-floating:
    0 20px 46px rgba(7, 18, 32, 0.26), 0 5px 14px rgba(7, 18, 32, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  --shadow-agent-operational: 0 14px 36px rgba(7, 18, 32, 0.2), 0 4px 12px rgba(7, 18, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
}

button {
  touch-action: manipulation;
}

button:not([data-slot="button"]) {
  transition-duration: 120ms;
  transition-property: color, background-color, border-color, box-shadow, filter, outline-color;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

button:not([data-slot="button"]):focus-visible {
  outline: 2px solid var(--action-focus-ring);
  outline-offset: 2px;
}

button:not([data-slot="button"]):not(:disabled):active {
  filter: brightness(0.97) saturate(1.02);
  outline: 1px solid var(--action-border-pressed);
  outline-offset: -1px;
}

button.action-control[aria-pressed="true"]:not(:disabled) {
  border-color: var(--action-blue);
  background-color: var(--action-blue);
  color: #ffffff;
}

@media (hover: hover) {
  button.action-control[aria-pressed="true"]:not(:disabled):hover {
    border-color: var(--action-blue-hover);
    background-color: var(--action-blue-hover);
    color: #ffffff;
  }
}

button.action-control[aria-pressed="true"]:not(:disabled):active {
  border-color: var(--action-blue-pressed);
  background-color: var(--action-blue-pressed);
  color: #ffffff;
  filter: none;
}

button.action-control[data-selection-tone="soft"][aria-pressed="true"]:not(:disabled) {
  border-color: var(--action-selection-border);
  background-color: var(--action-selection-soft);
  color: var(--action-blue);
}

button.action-control[data-selection-tone="soft"][aria-pressed="true"]:not(:disabled)
  .header-control-icon {
  background-color: rgba(255, 255, 255, 0.68);
  color: #3b82f6;
}

@media (hover: hover) {
  button.action-control[data-selection-tone="soft"][aria-pressed="true"]:not(:disabled):hover {
    border-color: var(--action-border-hover);
    background-color: var(--action-selection-soft-hover);
    color: var(--action-blue);
  }

  button.action-control[data-selection-tone="soft"][aria-pressed="true"]:not(:disabled):hover
    .header-control-icon {
    background-color: rgba(255, 255, 255, 0.82);
    color: var(--action-blue);
  }
}

button.action-control[data-selection-tone="soft"][aria-pressed="true"]:not(:disabled):active {
  border-color: var(--action-border-pressed);
  background-color: var(--action-selection-soft-pressed);
  color: var(--action-blue-hover);
  box-shadow: var(--action-shadow-secondary-pressed);
  filter: none;
}

button:disabled {
  cursor: not-allowed;
}

.map-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08)),
    linear-gradient(90deg, var(--canvas-map-grid) 1px, transparent 1px),
    linear-gradient(var(--canvas-map-grid) 1px, transparent 1px), var(--canvas-map);
  background-size:
    auto,
    68px 68px,
    68px 68px,
    auto;
}

.acrylic-navigation,
.acrylic-panel,
.acrylic-control,
.glass-transient,
.material-tone-agent {
  border-color: var(--surface-border);
  background-clip: padding-box;
}

.acrylic-navigation,
.acrylic-panel,
.acrylic-control,
.glass-transient {
  border-color: var(--acrylic-border);
  background-image:
    linear-gradient(var(--acrylic-exclusion), var(--acrylic-exclusion)),
    linear-gradient(var(--acrylic-luminosity), var(--acrylic-luminosity)), var(--acrylic-noise);
  background-blend-mode: exclusion, luminosity, soft-light;
  box-shadow:
    inset 0 1px 0 var(--acrylic-highlight),
    0 0 0 1px var(--acrylic-outline),
    var(--shadow-panel);
}

.acrylic-navigation {
  background-color: var(--acrylic-navigation);
  box-shadow: var(--shadow-navigation);
  backdrop-filter: blur(var(--acrylic-panel-blur)) saturate(var(--acrylic-backdrop-saturation));
  -webkit-backdrop-filter: blur(var(--acrylic-panel-blur))
    saturate(var(--acrylic-backdrop-saturation));
}

.acrylic-panel {
  background-color: var(--acrylic-panel);
  backdrop-filter: blur(var(--acrylic-panel-blur)) saturate(var(--acrylic-backdrop-saturation));
  -webkit-backdrop-filter: blur(var(--acrylic-panel-blur))
    saturate(var(--acrylic-backdrop-saturation));
}

.agent-panel-shell.acrylic-panel,
.mobile-workbench-sheet:has(.agent-panel-shell) {
  background-color: var(--agent-floating-reading-surface);
  backdrop-filter: var(--agent-floating-acrylic-backdrop);
  -webkit-backdrop-filter: var(--agent-floating-acrylic-backdrop);
}

.acrylic-control {
  background-color: var(--acrylic-control);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 1px rgba(59, 130, 246, 0.14),
    var(--shadow-control);
  backdrop-filter: blur(var(--acrylic-control-blur)) saturate(var(--acrylic-backdrop-saturation));
  -webkit-backdrop-filter: blur(var(--acrylic-control-blur))
    saturate(var(--acrylic-backdrop-saturation));
}

@layer components {
  .surface-dock,
  .surface-control,
  .surface-well,
  .surface-reading {
    border-color: var(--surface-border);
    background-clip: padding-box;
  }

  .surface-dock {
    background-color: var(--surface-dock);
  }
  .surface-control {
    background-color: var(--surface-control);
  }
  .surface-well {
    background-color: var(--surface-well);
  }
  .surface-reading {
    background-color: var(--surface-reading);
  }
}

.glass-transient {
  background-color: var(--glass-transient);
  box-shadow:
    inset 0 1px 0 var(--acrylic-highlight),
    0 0 0 1px var(--acrylic-outline),
    var(--shadow-transient);
  backdrop-filter: blur(var(--acrylic-control-blur)) saturate(var(--acrylic-backdrop-saturation));
  -webkit-backdrop-filter: blur(var(--acrylic-control-blur))
    saturate(var(--acrylic-backdrop-saturation));
}

.material-tone-agent {
  background-color: var(--tone-agent);
  box-shadow: inset 0 1px 0 rgba(196, 181, 253, 0.42);
}

.status-tone-neutral {
  --status-soft: var(--status-neutral-soft);
  --status-border: var(--status-neutral-border);
  --status-foreground: var(--status-neutral-foreground);
  --status-mark: var(--status-neutral-mark);
}

.status-tone-info {
  --status-soft: var(--status-info-soft);
  --status-border: var(--status-info-border);
  --status-foreground: var(--status-info-foreground);
  --status-mark: var(--status-info-mark);
}

.status-tone-success {
  --status-soft: var(--status-success-soft);
  --status-border: var(--status-success-border);
  --status-foreground: var(--status-success-foreground);
  --status-mark: var(--status-success-mark);
}

.status-tone-warning {
  --status-soft: var(--status-warning-soft);
  --status-border: var(--status-warning-border);
  --status-foreground: var(--status-warning-foreground);
  --status-mark: var(--status-warning-mark);
}

.status-tone-danger {
  --status-soft: var(--status-danger-soft);
  --status-border: var(--status-danger-border);
  --status-foreground: var(--status-danger-foreground);
  --status-mark: var(--status-danger-mark);
}

.status-badge,
.status-icon {
  border-color: var(--status-border);
  background-color: var(--status-soft);
  color: var(--status-foreground);
}

.status-icon[data-selected="true"] {
  --status-border: var(--action-blue);
  --status-soft: var(--action-blue);
  --status-foreground: #ffffff;
}

.status-dot {
  background-color: var(--status-mark);
}

.status-dot[data-activity="live"] {
  animation: status-live 1.4s ease-in-out infinite;
}

.status-glyph[data-activity="loading"] {
  animation: status-spin 0.9s linear infinite;
}

@keyframes status-live {
  0%,
  100% {
    opacity: 0.48;
  }

  50% {
    opacity: 1;
  }
}

@keyframes status-spin {
  to {
    transform: rotate(360deg);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root,
  [data-basemap-tone] {
    --agent-floating-reading-surface: rgba(250, 252, 255, 0.98);
    --agent-floating-reading-item: rgba(250, 252, 255, 0.98);
    --agent-floating-reading-item-hover: rgba(255, 255, 255, 0.98);
    --agent-floating-reading-active: rgba(232, 241, 255, 0.98);
    --agent-user-message-surface: rgba(238, 240, 252, 0.98);
    --agent-white-acrylic-surface: rgba(255, 255, 255, 0.98);
    --agent-operational-surface: rgba(255, 255, 255, 0.98);
    --agent-floating-acrylic-backdrop: none;
  }

  .acrylic-navigation,
  .acrylic-panel,
  .acrylic-control,
  .glass-transient {
    background-color: rgba(250, 252, 255, 0.98);
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root,
  [data-basemap-tone] {
    --agent-floating-reading-surface: rgba(250, 252, 255, 0.98);
    --agent-floating-reading-item: rgba(250, 252, 255, 0.98);
    --agent-floating-reading-item-hover: rgba(255, 255, 255, 0.98);
    --agent-floating-reading-active: rgba(232, 241, 255, 0.98);
    --agent-user-message-surface: rgba(238, 240, 252, 0.98);
    --agent-white-acrylic-surface: rgba(255, 255, 255, 0.98);
    --agent-operational-surface: rgba(255, 255, 255, 0.98);
    --agent-floating-acrylic-backdrop: none;
  }

  .acrylic-navigation,
  .acrylic-panel,
  .acrylic-control,
  .glass-transient {
    background-color: rgba(250, 252, 255, 0.98);
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .surface-well,
  .surface-control,
  .surface-reading {
    background-color: rgba(255, 255, 255, 0.98);
    background-image: none;
  }

  .material-tone-agent {
    background-color: #f5f3ff;
  }
}

@media (forced-colors: active) {
  :root,
  [data-basemap-tone] {
    --agent-floating-reading-surface: Canvas;
    --agent-floating-reading-item: Canvas;
    --agent-floating-reading-item-hover: Canvas;
    --agent-floating-reading-active: Highlight;
    --agent-user-message-surface: Canvas;
    --agent-user-message-border: CanvasText;
    --agent-white-acrylic-surface: Canvas;
    --agent-operational-surface: Canvas;
    --agent-floating-acrylic-backdrop: none;
  }

  .acrylic-navigation,
  .acrylic-panel,
  .acrylic-control,
  .glass-transient,
  .surface-dock,
  .surface-control,
  .surface-well,
  .surface-reading,
  .material-tone-agent {
    forced-color-adjust: none;
    border-color: CanvasText;
    background-color: Canvas;
    background-image: none;
    box-shadow: none;
    color: CanvasText;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .status-badge,
  .status-icon {
    border-color: CanvasText;
    background-color: Canvas;
    color: CanvasText;
  }

  .status-dot {
    background-color: CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot[data-activity="live"],
  .status-glyph[data-activity="loading"] {
    animation: none;
  }
}

.agent-panel-shell {
  border-color: var(--acrylic-border);
}

.agent-panel-header {
  z-index: 1;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  box-shadow: inset 0 -1px 0 var(--surface-divider);
}

.agent-panel-header-expandable {
  position: absolute;
  isolation: isolate;
}

.agent-panel-floating-acrylic {
  background-image:
    linear-gradient(var(--acrylic-exclusion), var(--acrylic-exclusion)),
    linear-gradient(var(--acrylic-luminosity), var(--acrylic-luminosity)), var(--acrylic-noise);
  background-blend-mode: exclusion, luminosity, soft-light;
  background-clip: padding-box;
  box-shadow: var(--shadow-agent-floating);
  backdrop-filter: var(--agent-floating-acrylic-backdrop);
  -webkit-backdrop-filter: var(--agent-floating-acrylic-backdrop);
}

.agent-panel-header-expanded {
  z-index: 2;
  border-color: var(--acrylic-outline);
  border-style: solid;
  border-width: 0 0 1px;
  border-bottom-right-radius: var(--radius-panel);
  border-bottom-left-radius: var(--radius-panel);
  box-shadow: var(--shadow-agent-history-bottom);
}

.agent-panel-integrated-header {
  inset-inline: -0.25rem;
  top: -0.25rem;
}

.agent-panel-header-mobile {
  top: -2rem;
  padding-top: 2rem;
}

.agent-panel-operational-float > .agent-panel-control,
.agent-panel-history-extension .agent-panel-control,
.agent-panel-composer > .agent-panel-control {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.agent-panel-operational-float > .agent-panel-control {
  border-radius: inherit;
}

.agent-panel-history-extension {
  border: 0;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  background-color: var(--agent-floating-reading-surface);
  box-shadow: none;
}

.agent-panel-composer,
.agent-conversation-scroll-button,
.agent-speech-selection-action {
  background-color: var(--agent-white-acrylic-surface);
}

.agent-panel-operational-float,
.agent-panel-composer {
  inset-inline: calc(1rem + var(--scrollbar-size) + 1px);
}

.agent-panel-operational-float,
.agent-panel-composer,
.agent-conversation-scroll-button,
.agent-speech-selection-action {
  border: 0;
}

.agent-panel-operational-float {
  top: 4.75rem;
  background-color: var(--agent-operational-surface);
  background-clip: padding-box;
  box-shadow: var(--shadow-agent-operational);
  backdrop-filter: var(--agent-floating-acrylic-backdrop);
  -webkit-backdrop-filter: var(--agent-floating-acrylic-backdrop);
}

.agent-panel-history-extension .agent-history-item,
.agent-panel-history-extension .agent-history-state,
.agent-panel-operational-float .agent-brief-metric {
  background-color: var(--agent-floating-reading-item);
}

@media (hover: hover) {
  .agent-panel-history-extension .agent-history-item:hover {
    background-color: var(--agent-floating-reading-item-hover);
  }
}

.agent-panel-history-extension .agent-history-item-active {
  background-color: var(--agent-floating-reading-active);
}

button.agent-history-session-trigger:not(:disabled):active {
  outline: none;
}

.agent-history-rename-input,
.agent-history-rename-input:focus-visible {
  border-color: #cbd5e1;
  outline: none;
  box-shadow: none;
}

.agent-panel-band:not(.agent-panel-floating-acrylic) {
  background: var(--surface-control);
}

.agent-panel-conversation {
  background: rgba(232, 240, 248, 0.12);
}

.agent-panel-conversation-canvas {
  border-radius: var(--radius-control);
  background: rgba(232, 240, 248, 0.18);
}

.agent-panel-conversation button:not([data-slot="button"]):not(:disabled):active {
  outline: none;
}

.agent-panel-conversation-content {
  padding-bottom: 10.5rem;
}

.agent-panel-conversation-content-has-brief {
  padding-top: 13rem;
}

.agent-panel-conversation-content-empty {
  padding-bottom: 13.5rem;
}

.agent-panel-message {
  border: 1px solid var(--surface-divider);
  background: var(--surface-reading);
}

.agent-panel-user-message {
  border: 1px solid var(--agent-user-message-border);
  background: var(--agent-user-message-surface);
  color: var(--ink);
}

.agent-panel-message,
.agent-panel-user-message {
  box-shadow: var(--action-shadow-secondary);
}

@media (hover: hover) {
  .agent-conversation-scroll-button:hover,
  .agent-speech-selection-action:hover {
    background-color: var(--agent-white-acrylic-surface);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .agent-panel-floating-acrylic,
  .agent-panel-operational-float {
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .agent-panel-floating-acrylic,
  .agent-panel-operational-float {
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .agent-panel-header-expanded {
    border-color: CanvasText;
    box-shadow: none;
  }

  .agent-panel-floating-acrylic,
  .agent-panel-operational-float {
    forced-color-adjust: none;
    border-color: CanvasText;
    background-color: Canvas;
    background-image: none;
    box-shadow: none;
    color: CanvasText;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.agent-streaming-response {
  display: block;
  --sd-animation: agent-stream-token-in;
  --sd-duration: 260ms;
  --sd-easing: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-streamdown="table-fullscreen"] [data-sd-animate] {
  animation: none;
  filter: none;
  opacity: 1;
  transform: none;
}

.agent-chart-line {
  animation: agent-chart-line-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center;
  will-change: opacity, transform;
}

.agent-chart-point,
.agent-chart-bar {
  animation: agent-chart-mark-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-box: fill-box;
  transform-origin: center bottom;
  will-change: opacity, transform;
}

.agent-panel-nested {
  border: 1px solid var(--surface-divider);
  background: var(--surface-control);
}

.agent-panel-control {
  border: 1px solid rgba(100, 116, 139, 0.16);
  background: var(--surface-reading);
}

.agent-ready-orbit,
.agent-ready-core {
  transform-box: fill-box;
  transform-origin: center;
}

.agent-ready-orbit {
  animation: agent-ready-orbit 9s linear infinite;
}

.agent-ready-core {
  animation: agent-ready-core 2.8s ease-in-out infinite;
}

.agent-panel-icon-button {
  border: 1px solid var(--surface-divider);
  background: var(--surface-control);
  box-shadow: var(--action-shadow-secondary);
}

@media (hover: hover) {
  .agent-panel-icon-button:hover {
    border-color: var(--action-border-hover);
    background: var(--action-soft);
    color: var(--action-blue-hover);
  }
}

.agent-panel-primary-icon {
  border: 0;
  background: var(--action-blue);
  color: #ffffff;
  box-shadow: var(--action-shadow-primary);
}

@media (hover: hover) {
  .agent-panel-primary-icon:hover {
    border-color: var(--action-blue-hover);
    background: var(--action-blue-hover);
    color: #ffffff;
  }
}

.agent-panel-primary-icon:disabled {
  background: #93c5fd;
  color: rgba(255, 255, 255, 0.86);
}

.scheduled-feed-scroll,
.agent-conversation-scroll {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.agent-conversation-scroll {
  scrollbar-gutter: stable both-edges;
}

.scheduled-feed-panel-shell {
  --scheduled-feed-timeline-width: calc(var(--workbench-condition-width) - 1.5rem - 2px);
  transition:
    width 180ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 150ms ease-out;
}

.scheduled-feed-panel-expanded {
  width: min(
    var(--workbench-condition-expanded-width),
    calc(100vw - var(--workbench-agent-current-width) - 100px)
  );
}

@media (min-width: 1536px) {
  .scheduled-feed-panel-expanded {
    width: min(
      var(--workbench-condition-expanded-width-wide),
      calc(100vw - var(--workbench-agent-current-width) - 100px)
    );
  }
}

.scheduled-feed-mobile {
  transition: none;
}

.mobile-workbench-sheet {
  overscroll-behavior: contain;
  touch-action: manipulation;
}

.scheduled-feed-detail-enter {
  animation: scheduled-feed-detail-show 140ms ease-out 180ms both;
  will-change: opacity;
}

.scheduled-feed-layout {
  grid-template-columns: 0 minmax(0, 1fr);
  column-gap: 0;
  transition:
    grid-template-columns 180ms cubic-bezier(0.22, 1, 0.36, 1),
    column-gap 180ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: grid-template-columns;
}

.scheduled-feed-layout-expanded {
  grid-template-columns:
    minmax(0, 1fr)
    var(--scheduled-feed-timeline-width);
  column-gap: 0.75rem;
}

.scheduled-feed-layout-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
  column-gap: 0;
}

.scheduled-feed-shell-enter {
  animation:
    scheduled-feed-shell-show 170ms cubic-bezier(0.22, 1, 0.36, 1),
    agent-panel-fade 140ms ease-out;
  transform-origin: top right;
}

.scheduled-feed-shell-exit {
  animation:
    scheduled-feed-shell-hide 170ms cubic-bezier(0.5, 0, 0.2, 1) forwards,
    agent-panel-dim 140ms ease-in forwards;
  pointer-events: none;
  transform-origin: top right;
}

.agent-panel-confirmation {
  border: 1px solid rgba(253, 186, 116, 0.46);
  background: rgba(255, 247, 237, 0.82);
}

.agent-panel-enter {
  animation:
    agent-panel-reveal 170ms cubic-bezier(0.22, 1, 0.36, 1),
    agent-panel-fade 150ms ease-out;
  transform-origin: left top;
}

.agent-panel-collapse {
  animation:
    agent-panel-dismiss 170ms cubic-bezier(0.5, 0, 0.2, 1) forwards,
    agent-panel-dim 150ms ease-in forwards;
  pointer-events: none;
  transform-origin: left top;
}

.agent-rail-enter {
  animation:
    agent-rail-shell 170ms cubic-bezier(0.22, 1, 0.36, 1),
    agent-panel-fade 130ms ease-out;
  transform-origin: left top;
}

.agent-rail-item {
  animation: agent-rail-item 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.agent-rail-item:nth-child(2) {
  animation-delay: 24ms;
}

.agent-rail-item:nth-child(3) {
  animation-delay: 42ms;
}

.agent-rail-item:nth-child(4) {
  animation-delay: 58ms;
}

@keyframes agent-panel-reveal {
  from {
    transform: translateX(-8px) scale(0.985);
  }

  to {
    transform: translateX(0) scale(1);
  }
}

@keyframes agent-panel-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes agent-panel-dim {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes agent-panel-dismiss {
  from {
    transform: translateX(0) scale(1);
  }

  to {
    transform: translateX(-8px) scale(0.985);
  }
}

@keyframes agent-rail-shell {
  from {
    transform: translateX(-5px) scale(0.94);
  }

  to {
    transform: translateX(0) scale(1);
  }
}

@keyframes agent-rail-item {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes agent-stream-token-in {
  from {
    opacity: 0;
    filter: blur(0.75px);
    transform: translateY(2px);
  }

  60% {
    opacity: 0.88;
    filter: blur(0);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes agent-chart-line-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes agent-chart-mark-in {
  from {
    opacity: 0;
    transform: translateY(4px) scaleY(0.75);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes scheduled-feed-detail-show {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scheduled-feed-shell-show {
  from {
    transform: translateX(10px) translateY(-4px) scale(0.985);
  }

  to {
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes scheduled-feed-shell-hide {
  from {
    transform: translateX(0) translateY(0) scale(1);
  }

  to {
    transform: translateX(10px) translateY(-4px) scale(0.985);
  }
}

@keyframes agent-ready-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes agent-ready-core {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.94);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-panel-enter,
  .agent-panel-collapse,
  .agent-rail-enter,
  .agent-rail-item,
  .scheduled-feed-shell-enter,
  .scheduled-feed-shell-exit,
  .scheduled-feed-detail-enter {
    animation: none;
    clip-path: none;
    transform: none;
  }

  .scheduled-feed-panel-shell {
    transition: none;
  }

  .scheduled-feed-layout {
    transition: none;
  }

  .agent-streaming-response [data-sd-animate] {
    animation: none;
    filter: none;
    opacity: 1;
    transform: none;
  }

  .agent-chart-line,
  .agent-chart-point,
  .agent-chart-bar {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .agent-ready-orbit,
  .agent-ready-core {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.maplibregl-ctrl-group {
  border: 1px solid var(--surface-border) !important;
  border-radius: var(--radius-control) !important;
  box-shadow: var(--surface-shadow) !important;
  overflow: hidden;
}

.maplibregl-ctrl button {
  width: 34px !important;
  height: 34px !important;
}

.maplibregl-ctrl-attrib {
  border-radius: 8px 0 0 0 !important;
  color: #475569 !important;
}
