/* Personal AI V20: adaptive wallpaper contrast and restrained Harness-style motion. */
.ai-shell.lobe-inspired {
  --ai-v20-ease: cubic-bezier(.22, 1, .36, 1);
  --ai-wallpaper-accent-rgb: 139, 124, 246;
  --ai-home-scrim-core: rgba(7, 8, 18, .24);
  --ai-home-scrim-mid: rgba(7, 8, 18, .12);
  --ai-reading-scrim-core: rgba(6, 7, 16, .44);
  --ai-reading-scrim-mid: rgba(6, 7, 16, .28);
  --ai-reading-scrim-edge: rgba(6, 7, 16, .07);
  --ai-wallpaper-home-brightness: .98;
  --ai-wallpaper-reading-brightness: .94;
  grid-template-columns: var(--ai-sidebar-width, 272px) minmax(0, 1fr);
}

.ai-shell.lobe-inspired.ai-wallpaper-light {
  --ai-home-scrim-core: rgba(8, 7, 17, .36);
  --ai-home-scrim-mid: rgba(8, 7, 17, .19);
  --ai-reading-scrim-core: rgba(7, 7, 16, .55);
  --ai-reading-scrim-mid: rgba(7, 7, 16, .35);
  --ai-reading-scrim-edge: rgba(7, 7, 16, .10);
  --ai-wallpaper-home-brightness: .92;
  --ai-wallpaper-reading-brightness: .89;
}

.ai-shell.lobe-inspired.ai-wallpaper-bright {
  --ai-home-scrim-core: rgba(8, 7, 17, .46);
  --ai-home-scrim-mid: rgba(8, 7, 17, .25);
  --ai-reading-scrim-core: rgba(7, 7, 16, .62);
  --ai-reading-scrim-mid: rgba(7, 7, 16, .41);
  --ai-reading-scrim-edge: rgba(7, 7, 16, .13);
  --ai-wallpaper-home-brightness: .87;
  --ai-wallpaper-reading-brightness: .86;
}

.ai-shell.lobe-inspired.ai-wallpaper-busy {
  --ai-home-scrim-core: rgba(7, 7, 17, .39);
  --ai-home-scrim-mid: rgba(7, 7, 17, .21);
  --ai-reading-scrim-core: rgba(6, 7, 16, .58);
  --ai-reading-scrim-mid: rgba(6, 7, 16, .38);
  --ai-reading-scrim-edge: rgba(6, 7, 16, .11);
}

.ai-shell.lobe-inspired.ai-wallpaper-bright.ai-wallpaper-busy,
.ai-shell.lobe-inspired.ai-wallpaper-unresolved {
  --ai-home-scrim-core: rgba(7, 7, 16, .50);
  --ai-home-scrim-mid: rgba(7, 7, 16, .28);
  --ai-reading-scrim-core: rgba(6, 7, 15, .66);
  --ai-reading-scrim-mid: rgba(6, 7, 15, .45);
  --ai-reading-scrim-edge: rgba(6, 7, 15, .15);
}

/* Keep the complete sidebar. Contact adds depth without changing layout width. */
.ai-shell.lobe-inspired .ai-sidebar {
  position: relative;
  z-index: 4;
  min-width: 0;
  transform: translateZ(0);
  transform-origin: left center;
  transition:
    transform .28s var(--ai-v20-ease),
    background .32s ease,
    border-color .32s ease,
    box-shadow .34s var(--ai-v20-ease),
    backdrop-filter .32s ease,
    -webkit-backdrop-filter .32s ease;
}

.ai-shell.lobe-inspired .ai-composer {
  transform: translateZ(0);
  transform-origin: center bottom;
  transition:
    transform .26s var(--ai-v20-ease),
    background .3s ease,
    border-color .3s ease,
    box-shadow .32s var(--ai-v20-ease) !important;
}

/* Keyboard contact follows the same motion; coarse pointers are disabled below. */
.ai-shell.lobe-inspired .ai-sidebar:focus-within {
  transform: translateX(2px) scale(1.008) !important;
  border-color: rgba(var(--ai-wallpaper-accent-rgb), .28) !important;
  box-shadow:
    18px 0 58px rgba(0, 7, 20, .24),
    0 0 30px rgba(var(--ai-wallpaper-accent-rgb), .10),
    inset 0 1px rgba(255,255,255,.11) !important;
}

.ai-shell.lobe-inspired.ai-dream-home .ai-composer:focus-within {
  transform: translateY(-3px) scale(1.012) !important;
  border-color: rgba(var(--ai-wallpaper-accent-rgb), .42) !important;
  box-shadow:
    0 25px 68px rgba(0,0,0,.30),
    0 0 34px rgba(var(--ai-wallpaper-accent-rgb), .13),
    inset 0 1px rgba(255,255,255,.14) !important;
}

.ai-shell.lobe-inspired.ai-dream-reading .ai-composer:focus-within {
  transform: translateY(-2px) scale(1.007) !important;
  border-color: rgba(var(--ai-wallpaper-accent-rgb), .35) !important;
  box-shadow:
    0 21px 58px rgba(0,0,0,.26),
    0 0 27px rgba(var(--ai-wallpaper-accent-rgb), .10),
    inset 0 1px rgba(255,255,255,.12) !important;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .ai-shell.lobe-inspired .ai-sidebar:hover {
    transform: translateX(2px) scale(1.008) !important;
    border-color: rgba(var(--ai-wallpaper-accent-rgb), .28) !important;
    box-shadow:
      18px 0 58px rgba(0, 7, 20, .24),
      0 0 30px rgba(var(--ai-wallpaper-accent-rgb), .10),
      inset 0 1px rgba(255,255,255,.11) !important;
  }

  .ai-shell.lobe-inspired.ai-dream-home .ai-composer:hover {
    transform: translateY(-3px) scale(1.012) !important;
    border-color: rgba(var(--ai-wallpaper-accent-rgb), .42) !important;
    box-shadow:
      0 25px 68px rgba(0,0,0,.30),
      0 0 34px rgba(var(--ai-wallpaper-accent-rgb), .13),
      inset 0 1px rgba(255,255,255,.14) !important;
  }

  .ai-shell.lobe-inspired.ai-dream-reading .ai-composer:hover {
    transform: translateY(-2px) scale(1.007) !important;
    border-color: rgba(var(--ai-wallpaper-accent-rgb), .35) !important;
    box-shadow:
      0 21px 58px rgba(0,0,0,.26),
      0 0 27px rgba(var(--ai-wallpaper-accent-rgb), .10),
      inset 0 1px rgba(255,255,255,.12) !important;
  }
}

/* New chat: preserve the art and place contrast only around the controls. */
.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-aqua-fluid {
  filter:
    saturate(108%)
    contrast(102%)
    brightness(var(--ai-wallpaper-home-brightness));
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-main {
  background: rgba(9, 9, 18, .035);
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-main::after {
  background:
    radial-gradient(ellipse 62% 58% at 50% 54%, var(--ai-home-scrim-core) 0%, var(--ai-home-scrim-mid) 50%, transparent 78%),
    linear-gradient(180deg, rgba(6,7,16,.07), transparent 23%, transparent 76%, rgba(6,7,16,.15));
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-empty--horizon h1 {
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.62), 0 9px 30px rgba(0,0,0,.30);
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-empty-copy {
  color: rgba(246,247,252,.91);
  text-shadow: 0 1px 3px rgba(0,0,0,.72), 0 6px 20px rgba(0,0,0,.28);
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-empty-eyebrow {
  color: rgb(var(--ai-wallpaper-accent-rgb));
  filter: brightness(1.24) saturate(.88);
  text-shadow: 0 1px 5px rgba(0,0,0,.68);
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-lobe-suggestions button {
  border-color: rgba(255,255,255,.19);
  color: rgba(249,249,253,.91);
  background:
    linear-gradient(145deg, rgba(var(--ai-wallpaper-accent-rgb), .12), rgba(12,13,24,.43));
  box-shadow: 0 14px 36px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.09);
  text-shadow: 0 1px 2px rgba(0,0,0,.56);
}

.ai-shell.lobe-inspired.ai-wallpaper-light.ai-dream-home .ai-lobe-suggestions button,
.ai-shell.lobe-inspired.ai-wallpaper-busy.ai-dream-home .ai-lobe-suggestions button {
  background:
    linear-gradient(145deg, rgba(var(--ai-wallpaper-accent-rgb), .15), rgba(11,12,23,.55));
  -webkit-backdrop-filter: blur(15px) saturate(118%);
  backdrop-filter: blur(15px) saturate(118%);
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-lobe-suggestions button:hover {
  border-color: rgba(var(--ai-wallpaper-accent-rgb), .52);
  background:
    linear-gradient(145deg, rgba(var(--ai-wallpaper-accent-rgb), .25), rgba(12,14,26,.58));
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-composer {
  border-color: rgba(255,255,255,.19) !important;
  background:
    linear-gradient(145deg, rgba(var(--ai-wallpaper-accent-rgb), .11), rgba(13,14,26,.70)) !important;
  box-shadow: 0 20px 56px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.11) !important;
}

.ai-shell.lobe-inspired.ai-wallpaper-light.ai-dream-home .ai-composer,
.ai-shell.lobe-inspired.ai-wallpaper-busy.ai-dream-home .ai-composer {
  background:
    linear-gradient(145deg, rgba(var(--ai-wallpaper-accent-rgb), .14), rgba(12,12,24,.76)) !important;
}

.ai-shell.lobe-inspired:is(.ai-wallpaper-light, .ai-wallpaper-bright, .ai-wallpaper-busy) .ai-composer textarea::placeholder {
  color: rgba(238,240,248,.68);
}

.ai-shell.lobe-inspired:is(.ai-wallpaper-light, .ai-wallpaper-bright, .ai-wallpaper-busy) .ai-composer .ai-tool-btn {
  color: rgba(231,234,245,.72);
}

.ai-shell.lobe-inspired.aqua-wallpaper .ai-topbar h2,
.ai-shell.lobe-inspired.aqua-wallpaper .ai-topbar strong {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.58);
}

.ai-shell.lobe-inspired.aqua-wallpaper .ai-topbar p,
.ai-shell.lobe-inspired.aqua-wallpaper .ai-topbar small {
  color: rgba(236,238,247,.73);
  text-shadow: 0 1px 3px rgba(0,0,0,.52);
}

/* Reading: no full-page grey film; a soft central lane protects long text. */
.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-aqua-fluid {
  filter:
    blur(max(var(--ai-aqua-wallpaper-blur, 0px), 1px))
    saturate(102%)
    contrast(101%)
    brightness(var(--ai-wallpaper-reading-brightness));
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-aqua-fluid::before {
  background: rgba(0,0,0,.025);
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-aqua-fluid::after {
  background: linear-gradient(135deg, rgba(7,8,18,.08), transparent 50%, rgba(7,8,18,.10));
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-main {
  background: rgba(7,8,17,.055);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-main::after {
  background:
    radial-gradient(ellipse 92% 92% at 50% 48%, transparent 58%, rgba(6,7,16,.06) 82%, rgba(6,7,16,.13)),
    linear-gradient(180deg, rgba(6,7,16,.045), transparent 21%, transparent 74%, rgba(6,7,16,.12));
}

.ai-shell.lobe-inspired .ai-dream-reading-veil {
  background:
    radial-gradient(ellipse 64% 118% at 50% 48%, var(--ai-reading-scrim-core) 0%, var(--ai-reading-scrim-mid) 54%, var(--ai-reading-scrim-edge) 79%, transparent 96%),
    linear-gradient(180deg, rgba(6,7,16,.03), transparent 18%, transparent 77%, rgba(6,7,16,.13));
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-message.assistant .ai-bubble::before {
  inset: -18px -28px;
  opacity: .88;
  background:
    radial-gradient(ellipse at 48% 45%, rgba(6,7,16,.42), rgba(6,7,16,.25) 54%, transparent 80%);
  filter: blur(10px);
}

.ai-shell.lobe-inspired.ai-wallpaper-light.ai-dream-reading .ai-message.assistant .ai-bubble::before,
.ai-shell.lobe-inspired.ai-wallpaper-busy.ai-dream-reading .ai-message.assistant .ai-bubble::before {
  opacity: .96;
  background:
    radial-gradient(ellipse at 48% 45%, rgba(6,7,16,.52), rgba(6,7,16,.32) 55%, transparent 82%);
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-answer-content,
.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-live-answer {
  color: #f4f4f8;
  text-shadow: 0 1px 2px rgba(0,0,0,.60), 0 5px 16px rgba(0,0,0,.18);
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-message-actions {
  opacity: .74;
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-answer-content .ai-quote {
  border-left-color: rgb(var(--ai-wallpaper-accent-rgb)) !important;
  color: rgba(244,244,249,.92);
  background: rgba(var(--ai-wallpaper-accent-rgb), .105);
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-rich-list li::marker,
.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-inline-link,
.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-reference-toggle > span > i {
  color: rgb(var(--ai-wallpaper-accent-rgb)) !important;
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-message.user .ai-bubble {
  border-color: rgba(var(--ai-wallpaper-accent-rgb), .26);
  background:
    linear-gradient(135deg, rgba(var(--ai-wallpaper-accent-rgb), .26), rgba(18,20,34,.38));
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-composer-wrap {
  background: linear-gradient(0deg, rgba(6,7,15,.48) 16%, rgba(6,7,15,.18) 64%, transparent);
}

.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-composer {
  border-color: rgba(255,255,255,.18) !important;
  background:
    linear-gradient(145deg, rgba(var(--ai-wallpaper-accent-rgb), .09), rgba(12,13,24,.69)) !important;
  box-shadow: 0 17px 48px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.10) !important;
}

.ai-shell.lobe-inspired.ai-dream-home.aqua-wallpaper .ai-sidebar,
.ai-shell.lobe-inspired.ai-dream-reading.aqua-wallpaper .ai-sidebar {
  background:
    linear-gradient(180deg, rgba(var(--ai-wallpaper-accent-rgb), .075), rgba(8,9,18,.62)) !important;
  border-color: rgba(255,255,255,.15);
  box-shadow: 13px 0 44px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.08);
}

.ai-shell.lobe-inspired.ai-wallpaper-light.aqua-wallpaper .ai-sidebar,
.ai-shell.lobe-inspired.ai-wallpaper-busy.aqua-wallpaper .ai-sidebar {
  background:
    linear-gradient(180deg, rgba(var(--ai-wallpaper-accent-rgb), .09), rgba(8,9,18,.71)) !important;
}

.ai-shell.lobe-inspired.ai-dream-transitioning .ai-aqua-fluid,
.ai-shell.lobe-inspired.ai-dream-transitioning .ai-main,
.ai-shell.lobe-inspired.ai-dream-transitioning .ai-main::after,
.ai-shell.lobe-inspired.ai-dream-transitioning .ai-topbar,
.ai-shell.lobe-inspired.ai-dream-transitioning .ai-composer-wrap,
.ai-shell.lobe-inspired.ai-dream-transitioning .ai-dream-reading-veil {
  transition-duration: .65s;
}

@media (max-width: 899.98px), (hover: none), (pointer: coarse) {
  .ai-shell.lobe-inspired .ai-sidebar,
  .ai-shell.lobe-inspired .ai-composer {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-shell.lobe-inspired .ai-sidebar,
  .ai-shell.lobe-inspired .ai-composer,
  .ai-shell.lobe-inspired .ai-aqua-fluid,
  .ai-shell.lobe-inspired .ai-dream-reading-veil {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
