  /* ============================================================
     AMBIENT MODE — Orb stays present outside conversation
     When ambient is active and we're idle, the full HUD recedes
     and the Orb takes residence in a corner. From there, the
     backend can pulse it softly to call attention, or the agent
     can whisper a brief notification line.
  ============================================================ */
  body.ambient-resident[data-state="idle"] .holo-frame,
  body.ambient-resident[data-state="idle"] .hud-top,
  body.ambient-resident[data-state="idle"] .hud-brand,
  body.ambient-resident[data-state="idle"] .cube-label,
  body.ambient-resident[data-state="idle"] .brand-lockup,
  body.ambient-resident[data-state="idle"] .idle-controls,
  body.ambient-resident[data-state="idle"] .reset-session {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
  }
  /* Hide the central canvas drawing — ambient renders its own small orb */
  body.ambient-resident[data-state="idle"] canvas#field {
    opacity: 0.18;
    transition: opacity 0.8s ease;
  }
  /* Ambient resident orb — corner placement */
  .ambient-orb {
    position: absolute;
    bottom: 32px;
    right: 32px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    z-index: 40;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.4s ease;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
    border: none;
    padding: 0;
  }
  body.ambient-resident[data-state="idle"] .ambient-orb {
    opacity: 1;
    pointer-events: auto;
  }
  .ambient-orb:hover { transform: scale(1.08); }
  .ambient-orb canvas {
    width: 100%; height: 100%;
    display: block;
  }
  .ambient-orb-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--bone-30);
    white-space: nowrap;
    pointer-events: none;
  }
  /* Whisper bubble — Apryl's brief notification line */
  .ambient-whisper {
    position: absolute;
    bottom: 150px;
    right: 32px;
    max-width: 320px;
    padding: 14px 18px;
    background: rgba(13, 11, 10, 0.85);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(220, 170, 100, 0.32);
    border-radius: 10px 10px 2px 10px;
    z-index: 41;
    transform: translateY(8px) scale(0.96);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
    pointer-events: none;
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.55),
      0 0 22px rgba(232, 196, 120, 0.10);
  }
  .ambient-whisper.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .ambient-whisper-from {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-icon-soft);
    margin-bottom: 6px;
  }
  .ambient-whisper-from .dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 0 6px currentColor;
  }
  .ambient-whisper-text {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.45;
    color: var(--bone);
  }
  .ambient-whisper-actions {
    margin-top: 10px;
    display: flex; gap: 12px;
    justify-content: flex-end;
  }
  .ambient-whisper-action {
    background: none;
    border: 1px solid rgba(220, 170, 100, 0.32);
    border-radius: 3px;
    padding: 6px 10px;
    color: var(--gold-icon-soft);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .ambient-whisper-action:hover {
    color: var(--gold-icon);
    border-color: rgba(220, 170, 100, 0.55);
    background: rgba(50, 35, 18, 0.32);
  }
  .ambient-whisper-action.dismiss {
    color: var(--bone-50);
    border-color: var(--bone-15);
  }
  .ambient-whisper-action.dismiss:hover {
    color: var(--bone-70);
    background: rgba(245, 240, 232, 0.06);
  }

  @media (max-width: 720px) {
    .ambient-orb {
      width: 80px; height: 80px;
      bottom: 24px; right: 20px;
    }
    .ambient-whisper {
      right: 20px;
      bottom: 120px;
      max-width: calc(100vw - 40px);
    }
  }
