.narration-tools { padding: 8px 0 20px; }
.narration-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.narration-heading h3 { margin: 0; font: 500 19px/1.6 var(--serif); color: var(--ink); }
.narration-counter { font-size: 12px; color: var(--muted); }
.narration-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.narration-actions > button,
.pronunciation-words > button,
.pronunciation-done {
  min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 7px;
  color: var(--whole-ink, var(--ink)); background: var(--whole-button, var(--paper-light));
}
.narration-actions #narrationPlay { background: var(--whole-selected, var(--sage-pale)); border-color: var(--sage); }
.narration-actions > button:disabled { opacity: .55; cursor: default; }
.narration-loop { display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 8px 2px; font-size: 13px; color: var(--ink); }
.narration-loop input { width: 17px; height: 17px; accent-color: var(--sage); }
.narration-options { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.narration-options label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.narration-options select {
  width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--whole-button, var(--paper-light)); font-size: 13px;
}
.narration-status { margin: 13px 0 0; color: var(--whole-ink, var(--ink)); font-size: 13px; line-height: 1.8; }
.narration-help { margin: 6px 0 0; font-size: 11px; line-height: 1.85; color: var(--muted); }
.pronunciation-list { border-top: 1px solid var(--line); margin-top: 18px; }
.pronunciation-list > summary { min-height: 44px; padding: 13px 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.pronunciation-words { display: flex; gap: 7px; flex-wrap: wrap; padding: 2px 0 8px; }
.pronunciation-words > button { font-family: var(--serif); font-size: 17px; }
.pronunciation-empty { margin: 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.inline-reading {
  display: inline; position: relative; padding: 0; margin: 0; border: 0; border-radius: 2px;
  min-width: 0; min-height: 0; font: inherit; line-height: inherit; letter-spacing: inherit;
  color: inherit; background: transparent; text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: .18em; cursor: pointer; touch-action: manipulation;
}
.inline-reading::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
.inline-reading:hover { background: var(--sage-pale); }
.inline-reading:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.pronunciation-dialog {
  width: min(440px, calc(100% - 28px)); max-height: calc(100dvh - 48px); overflow: auto;
  padding: 30px 25px 24px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper-light); color: var(--ink);
}
.pronunciation-close { position: absolute; right: 8px; top: 7px; width: 44px; height: 44px; font-size: 26px; color: var(--muted); }
.pronunciation-dialog h2 { font: 500 32px/1.6 var(--serif); margin: 0 40px 0 0; }
.pronunciation-pinyin { margin: 3px 0 18px; font: 500 22px/1.6 var(--sans); letter-spacing: 1px; color: var(--whole-ink, var(--ink)); }
.pronunciation-context { font: 500 20px/1.8 var(--serif); margin: 0; }
.pronunciation-meaning { margin: 13px 0 22px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.pronunciation-done { width: 100%; background: var(--whole-selected, var(--sage-pale)); }
:root:is([data-theme="light"],[data-theme="dark"]) .pronunciation-dialog { background: var(--theme-surface); }
@media (max-width: 699px) {
  .narration-options { grid-template-columns: minmax(0, 105px) minmax(0, 1fr); gap: 8px; }
  .narration-actions { gap: 7px; }
  .narration-actions > button { padding: 9px 12px; font-size: 13px; }
  .narration-loop { font-size: 12px; }
  .pronunciation-dialog { padding: 27px 20px 20px; }
}
