.note-guide {
  position: fixed;
  inset: 0;
  z-index: 2600;
  letter-spacing: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.note-guide-panel, .note-guide-launcher { pointer-events: auto; }
.note-guide [hidden] { display: none !important; }
.note-guide-launcher {
  position: fixed;
  right: max(0px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  user-select: none;
}
.note-guide.has-guide-position .note-guide-launcher {
  top: var(--guide-launcher-y);
  bottom: auto;
  transform: translateY(-50%);
}
.note-guide.is-dragging .note-guide-launcher { cursor: grabbing; }
.note-guide.is-page-hidden .visitor-prompt-slip-logo-shimmer,
.note-guide.is-page-hidden .visitor-prompt-slip-logo-shimmer::after { animation-play-state: paused; }
.note-guide-panel {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(70px, calc(env(safe-area-inset-bottom) + 54px));
  width: 348px;
  max-width: calc(100vw - 32px);
  max-height: min(600px, calc(100dvh - 100px));
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: #f7f8f4;
  color: #343a37;
  border: 1px solid #ced3cf;
  border-radius: 8px;
  box-shadow: 0 10px 36px #0003;
  overflow: hidden;
  outline: none;
}
.note-guide-subtitle { display: none; margin: 3px 0 0; font-size: 12px; line-height: 1.4; color: #636b66; }
.note-guide-header, .note-guide-actions, .note-guide-input { display: flex; align-items: center; gap: 8px; }
.note-guide-header { justify-content: space-between; }
.note-guide-header strong { font-size: 17px; }
.note-guide .icon-button { flex: 0 0 34px; width: 34px; height: 34px; }
.note-guide .icon-button svg { width: 20px; height: 20px; }
.note-guide-status {
  font-size: 12px;
  margin: 8px 0;
  min-height: 18px;
  color: #636b66;
  transition: color 120ms ease;
}
.note-guide[data-guide-status="listening"] .note-guide-status,
.note-guide[data-guide-status="thinking"] .note-guide-status,
.note-guide[data-guide-status="speaking"] .note-guide-status,
.note-guide[data-guide-status="readyToReconnect"] .note-guide-status,
.note-guide[data-guide-status="noMic"] .note-guide-status { color: var(--primary-action); }
.note-guide[data-guide-status="connecting"] .note-guide-status,
.note-guide[data-guide-status="capacity_wait"] .note-guide-status,
.note-guide[data-guide-status="cooldown"] .note-guide-status,
.note-guide[data-guide-status="guide_rate_limited"] .note-guide-status,
.note-guide[data-guide-status="guide_capacity_cooldown"] .note-guide-status,
.note-guide[data-guide-status="turn_timeout"] .note-guide-status { color: #a66d00; }
.note-guide[data-guide-status="guide_provider_unavailable"] .note-guide-status,
.note-guide[data-guide-status="connection_lost"] .note-guide-status,
.note-guide[data-guide-status="guide_access_expired"] .note-guide-status,
.note-guide[data-guide-status="access_changed"] .note-guide-status { color: #a74545; }
.note-guide-microphone-help { font-size: 12px; line-height: 1.5; margin: 8px 0 0; color: #636b66; }
.note-guide-retry { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; flex-shrink: 0; }
.note-guide-retry svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note-guide-transcript { min-height: 48px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.note-guide-transcript p { font-size: 14px; line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-guide-transcript .is-user { color: #606c65; border-left: 2px solid #c2cbc5; padding-left: 9px; }
.note-guide-input { padding-top: 10px; flex-shrink: 0; }
.note-guide-input input { min-width: 0; width: 100%; height: 38px; font-size: 16px; }
.note-guide-privacy { font-size: 11px; line-height: 1.5; margin-top: 10px; color: #6b736e; flex-shrink: 0; }
.note-guide-privacy summary { cursor: pointer; width: fit-content; }
.note-guide-privacy p { margin: 6px 0 0; }
.note-guide-report { border-top: 1px solid #ced3cf; padding-top: 10px; margin-top: 8px; overflow-y: auto; }
.note-guide-report strong { font-size: 13px; }
.note-guide-report p { font-size: 13px; overflow-wrap: anywhere; }
.note-guide-report-actions { display: flex; gap: 8px; }
.note-guide-report-actions button { font-size: 13px; padding: 7px 10px; }
.note-guide-brief {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #ced3cf;
  border-radius: 6px;
  background: #fff;
  overflow-y: auto;
}
.note-guide-brief-kicker { margin: 0 0 3px; color: #68716c; font-size: 10px; text-transform: uppercase; }
.note-guide-brief h3 { margin: 0 0 8px; font-size: 16px; color: #263630; }
.note-guide-brief h4 { margin: 10px 0 3px; font-size: 13px; color: #263630; }
.note-guide-brief p { margin: 0 0 7px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.note-guide-brief-actions { display: flex; gap: 8px; margin-top: 10px; }
.note-guide-brief-actions a, .note-guide-brief-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  text-decoration: none;
}
.note-guide-wave { display: none; flex: 0 0 25px; align-items: center; justify-content: center; gap: 2px; width: 25px; height: 25px; }
.note-guide-wave i { display: block; width: 3px; height: 18px; background: #a74545; border-radius: 2px; animation: guide-wave .8s ease-in-out infinite alternate; }
.note-guide-wave i:nth-child(2n) { animation-delay: -.4s; height: 24px; }
.note-guide-wave i:nth-child(3) { animation-delay: -.6s; height: 12px; }
.note-guide[data-listening="true"] .note-guide-launcher .visitor-prompt-slip-logo { display: none; }
.note-guide[data-listening="true"] .note-guide-wave { display: flex; }
.note-guide-launcher:hover .note-guide-wave,
.note-guide-launcher:focus-visible .note-guide-wave,
.note-guide-launcher.is-peeked .note-guide-wave { display: none; }
/* An open conversation owns the invitation; hover/focus must not stretch its slip. */
.note-guide .note-guide-launcher[aria-expanded="true"] {
  max-width: 43px;
  padding: 5px 8px 5px 7px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(238,241,237,.66)), rgba(255,255,255,.62);
  box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.2);
}
.note-guide .note-guide-launcher[aria-expanded="true"] .visitor-prompt-slip-copy { display: none; }
.note-guide .note-guide-launcher[aria-expanded="true"] .visitor-prompt-slip-logo { display: grid; }
.note-guide[data-listening="true"] .note-guide-launcher[aria-expanded="true"] .visitor-prompt-slip-logo { display: none; }
.note-guide[data-listening="true"] .note-guide-launcher[aria-expanded="true"] .note-guide-wave { display: flex; }
.note-guide-launcher:focus-visible { outline: 2px solid var(--primary-action); outline-offset: 2px; }
/* Quiet, non-blocking states stay visible on the voice-first slip. */
.note-guide[data-voice-first="true"][data-guide-status="connecting"] .note-guide-launcher::before,
.note-guide[data-voice-first="true"][data-guide-status="capacity_wait"] .note-guide-launcher::before,
.note-guide[data-voice-first="true"][data-guide-attention="passive"] .note-guide-launcher::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a66d00;
  box-shadow: 0 0 0 1px #fff;
}
.note-guide[data-voice-first="true"][data-guide-attention="passive"]
  .note-guide-launcher[aria-expanded="false"] {
  max-width: min(330px, calc(100vw - 10px));
  padding-right: 9px;
  padding-left: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(238,241,237,.78)),
    rgba(255,255,255,.74);
  box-shadow:
    0 16px 38px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.78);
}
.note-guide[data-voice-first="true"][data-guide-attention="passive"]
  .note-guide-launcher[aria-expanded="false"] .visitor-prompt-slip-logo {
  display: grid;
}
.note-guide[data-voice-first="true"][data-guide-attention="passive"]
  .note-guide-launcher[aria-expanded="false"] .note-guide-wave {
  display: none;
}
.note-guide[data-voice-first="true"][data-guide-attention="passive"]
  .note-guide-launcher[aria-expanded="false"] .visitor-prompt-slip-copy {
  display: grid;
  opacity: 1;
  transform: translateX(0);
}
.note-guide[data-voice-first="true"][data-guide-attention="passive"]
  .note-guide-launcher[aria-expanded="false"] .visitor-prompt-slip-copy small {
  display: none;
}

@media (max-width: 700px), (hover: none) {
  /* Touch has no intermediate hover invitation: every tap opens the same panel. */
  .note-guide .note-guide-launcher {
    max-width: 43px;
    padding: 5px 8px 5px 7px;
    background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(238,241,237,.66)), rgba(255,255,255,.62);
    box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.2);
  }
  .note-guide .note-guide-launcher .visitor-prompt-slip-copy { display: none; }
  .note-guide .note-guide-launcher .visitor-prompt-slip-logo { display: grid; }
  .note-guide[data-listening="true"] .note-guide-launcher .visitor-prompt-slip-logo { display: none; }
  .note-guide[data-listening="true"] .note-guide-launcher .note-guide-wave { display: flex; }
  .note-guide-panel {
    width: 348px;
    max-height: min(420px, calc(100dvh - 100px));
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .note-guide-header { gap: 6px; flex-shrink: 0; }
  .note-guide-header strong { min-width: 0; font-size: 16px; line-height: 1.3; }
  .note-guide-actions { gap: 4px; }
  .note-guide .icon-button { flex-basis: 44px; width: 44px; height: 44px; }
  .note-guide-subtitle { display: block; flex-shrink: 0; }
  .note-guide-status { flex-shrink: 0; }
  .note-guide-transcript { min-height: 0; max-height: 140px; flex-shrink: 1; }
  .note-guide-input input { height: 44px; }
}
@media (max-width: 359px) {
  .note-guide-header { flex-wrap: wrap; }
  .note-guide-actions { margin-left: auto; }
}
.note-guide [data-guide-mute][aria-pressed="true"] { color: #a74545; border-color: #a74545; }
@keyframes guide-wave { from { transform: scaleY(.4); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .note-guide-launcher, .note-guide-wave i { animation: none; }
}
