/* Shared reading control: placement does not depend on page banners. */
.page-listen { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 70; max-width: min(340px, calc(100vw - 40px)); padding: 4px 10px; border: 1px solid #cbd7df; border-radius: 6px; background: #fff; color: var(--muted, #536473); font: 14px/1.6 var(--font, sans-serif); }
.page-listen-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.listen-control { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 2px; border: 0; border-radius: 0; background: transparent; color: var(--brand, #2264c4); font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.listen-control:hover .listen-label, .listen-stop:hover { text-decoration: underline; text-underline-offset: 3px; }
.listen-control:focus-visible { outline: 2px solid var(--brand, #2264c4); outline-offset: 2px; }
.listen-icon { flex: none; }
.listen-control[hidden], .page-listen [hidden], .listen-status:empty { display: none; }
.page-listen .listen-note { margin: 6px 0 4px; font-size: 13px; color: inherit; }
.page-listen .listen-status { font-size: 13px; }
/* Chat owns the right corner. Keep reading controls on the left, reserving
   space for the compact phone launcher even when Pause/Stop/status wrap. */
.has-site-assistant .page-listen {
  right: auto;
  left: max(20px, env(safe-area-inset-left));
  max-width: min(340px, calc(100vw - 112px));
}
@media (width <= 600px) {
  /* The phone dialog already makes background controls inert. Restore Listen
     unchanged when it closes; do not interrupt or reset browser speech. */
  .has-open-mobile-assistant .page-listen { visibility: hidden; }
}
/* Keep final footer links reachable below the control in every state. */
html.has-page-listen { scroll-padding-bottom: calc(var(--listen-height, 64px) + 40px); }
.has-page-listen .site-footer { padding-bottom: calc(var(--listen-height, 64px) + 40px); }
@media print { .page-listen { display: none; } .has-page-listen .site-footer { padding-bottom: 0; } }
