html:has(body.pronunciation-mode) { overflow: hidden; height: 100%; }
body.pronunciation-mode { overflow: hidden; height: 100dvh; min-height: 0; }
.pronunciation-mode .app-shell.pronunciation-shell {
  position: fixed; inset: var(--nav-height, 100px) 0 0; padding: 0; margin: 0;
  max-width: none; width: 100%; min-height: 0; background: var(--page);
}
#pronunciationFrame { display: block; border: none; width: 100%; height: calc(100dvh - var(--nav-height, 100px)); }
.pronunciation-mode > footer, .pronunciation-mode .site-footer { display: none; }
.pronunciation-status { position: absolute; z-index: 2; top: 0; left: 1rem; right: 1rem; background: var(--paper); color: var(--ink); padding: 1rem; border: 1px solid var(--line); }
.pronunciation-status[hidden], .pronunciation-retry[hidden] { display: none; }
.pronunciation-retry { position: absolute; z-index: 3; top: 7rem; left: 1rem; }
#mainNav #pronunciationNav { display: inline-flex; align-items: center; gap: .35rem; }
#mainNav #pronunciationNav[hidden] { display: none; }
#pronunciationNav svg { width: 1rem; height: 1rem; flex-shrink: 0; }
#mainNav #pronunciationNav.active { color: var(--teal); background: var(--teal-soft); box-shadow: inset 0 -2px var(--teal); }
.pronunciation-link { display: inline-flex; gap: .4rem; align-items: center; color: var(--teal); font-weight: 600; }
.word-actions .pronunciation-icon { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; flex-shrink: 0; }
.pronunciation-icon svg { width: 15px; height: 15px; }
@media (max-width: 650px), (hover: none) {
  .pronunciation-mode .topbar:not([data-open="true"]) { width: 102px; grid-template-columns: 38px 38px; }
  .pronunciation-mode .topbar:not([data-open="true"]) .brand { min-width: 38px; }
}
