.vetnote-tools { position: fixed; right: 18px; bottom: 76px; z-index: 1180; display: grid; gap: 14px; }
.vetnote-tools > form { margin: 0; }
.vetnote-tool { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-alt); color: var(--muted); box-shadow:var(--shadow-card); cursor: pointer; }
.vetnote-tool svg { width: 22px; height: 22px; }
.vetnote-tool svg, .vetnote-mobile-ai-tool svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vetnote-mobile-ai-tool svg { width: 100%; height: 100%; }
.vetnote-ai-tool { border-color: var(--line-strong); background: var(--accent); color: var(--ink-on-bright); }
.vetnote-tool:focus-visible, .vetnote-chat-drawer button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vetnote-chat-backdrop { position: fixed; inset: 0; z-index: 1190; background: color-mix(in srgb, var(--navy) 60%, transparent); }
.vetnote-chat-drawer { position: fixed; z-index: 1200; inset: 0 0 0 auto; width: clamp(360px, 34vw, 720px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr); background: var(--surface); color: var(--text); border-left: 3px solid var(--accent); box-shadow:var(--shadow-card); }
.vetnote-chat-drawer[hidden], .vetnote-chat-backdrop[hidden] { display: none; }
.vetnote-chat-drawer header { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); font-weight: 700; letter-spacing: -.01em; }
.vetnote-chat-drawer header button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 26px; cursor: pointer; }
.vetnote-chat-status { grid-column: 1; grid-row: 2; align-self: center; justify-self: center; margin: 0; color: var(--muted); font-size: 13px; }
.vetnote-chat-drawer [data-vetnote-chat-frame-host] { grid-column: 1; grid-row: 2; min-width: 0; min-height: 0; }
.vetnote-chat-drawer iframe { width: 100%; height: 100%; display: block; border: 0; background: var(--surface); }
@media (min-width: 901px) {
  /* Keep the persistent Vetnote rail above each page's desktop action rail. */
  .app-shell:has(.request-fabs > :nth-child(1):last-child) .vetnote-tools { bottom: 76px; }
  .app-shell:has(.request-fabs > :nth-child(2):last-child) .vetnote-tools { bottom: 134px; }
  .app-shell:has(.request-fabs > :nth-child(3):last-child) .vetnote-tools { bottom: 192px; }
  .app-shell:has(.request-fabs > :nth-child(4):last-child) .vetnote-tools { bottom: 250px; }
}
@media (max-width: 900px) {
  .vetnote-tools > .vetnote-desktop-ai-tool,
  .vetnote-tools > .vetnote-desktop-notes-form { display: none; }
  .board-nav .notes-launch-form {
    flex: 0 1 44px;
    display: grid;
    place-items: center;
    min-width: 0;
    width: 44px;
    min-height: 44px;
    margin: 0;
  }
  .board-nav .notes-launch-form .board-nav-item { width: 100%; }
}
@media (max-width: 767px) {
  .vetnote-tools { right: 12px; bottom: calc(env(safe-area-inset-bottom) + 70px); }
  .vetnote-tool { width: 42px; height: 42px; border-radius: 13px; }
  .vetnote-chat-drawer { width: 100vw; height: 100dvh; padding-bottom: env(safe-area-inset-bottom); border-left: 0; border-top: 3px solid var(--accent); }
}
@media (prefers-reduced-motion: no-preference) {
  .vetnote-chat-drawer { animation: vetnote-drawer-in 150ms ease-out; }
  @keyframes vetnote-drawer-in { from { transform: translateX(18px); opacity: .85; } }
}
