/* One pronunciation control for every word card. Accent and speed belong to
   each card: "inline" shows them on the card, "menu" folds them behind one
   speaker in dense lists. Article players reuse the same accent toggle. */
.pronunciation{display:flex;flex-wrap:wrap;align-items:center;gap:7px;min-width:0}
.pronunciation-accents{display:inline-flex;flex:0 0 auto;gap:2px;padding:2px;border:1px solid #d5decf;border-radius:9px;background:#eef3e7}
.pronunciation-accents button{min-width:48px;min-height:32px;padding:4px 11px;border-radius:7px;background:transparent;color:#5e7656;font-size:12px;line-height:1.4;touch-action:manipulation}
.pronunciation-accents button:hover{color:var(--green,#34563f)}
.pronunciation-accents button[aria-pressed=true]{background:#fffef8;color:var(--green,#34563f);font-weight:650;box-shadow:0 1px 3px #23402a29}
.pronunciation-rates{display:flex;flex-wrap:wrap;gap:7px;min-width:0}
.pronunciation-rates button{min-height:36px;padding:7px 12px;border:1px solid #d5decf;border-radius:7px;background:#fffef8;color:#45643e;font-size:11px;font-variant-numeric:tabular-nums;touch-action:manipulation}
.pronunciation-rates button:hover:not(:disabled){background:#f1f5e9}
.pronunciation-accents button:focus-visible,.pronunciation-rates button:focus-visible,.pronunciation-menu>summary:focus-visible{outline:2px solid var(--green,#34563f);outline-offset:2px}

.pronunciation-menu{position:relative;display:block;flex:0 0 auto}
.pronunciation-menu>summary{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px;list-style:none;cursor:pointer;border:1px solid transparent;border-radius:50%;color:var(--green,#34563f);background:#edf3e9}
.pronunciation-menu>summary::-webkit-details-marker{display:none}
.pronunciation-menu[open]>summary,.pronunciation-menu>summary:hover{background:#dfeada;border-color:#cfddc7}
.pronunciation-badge{position:absolute;right:-5px;bottom:-5px;min-width:19px;height:19px;padding:0 3px;border:2px solid var(--card,#fff);border-radius:10px;background:var(--green,#34563f);color:#fff;font-size:10px;font-weight:650;line-height:15px;text-align:center}
.pronunciation-badge[hidden]{display:none}
.pronunciation-pending{display:none}
.pronunciation-menu[data-pronunciation-waiting]>summary{background:#edf0ea;color:#8d9787}
.pronunciation-menu[data-pronunciation-waiting] .pronunciation-icon{display:none}
.pronunciation-menu[data-pronunciation-waiting] .pronunciation-pending{display:inline-flex}
.pronunciation-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:20;display:grid;gap:6px;width:216px;max-width:calc(100vw - 16px);padding:12px;background:var(--card,#fff);border:1px solid #dce4d7;border-radius:12px;box-shadow:0 8px 25px #233d281c;text-align:left}
.pronunciation-panel>span{font-size:.72rem;line-height:1.4;color:var(--muted,#637169)}
.pronunciation-panel>span:not(:first-child){margin-top:4px}
.pronunciation-panel .pronunciation-accents{display:flex}
.pronunciation-panel .pronunciation-accents button{flex:1;min-height:36px}
.pronunciation-panel .pronunciation-rates{flex-wrap:nowrap;gap:5px}
.pronunciation-panel .pronunciation-rates button{flex:1;min-width:0;min-height:40px;padding:6px 4px;background:#f7f9f4;color:var(--green,#34563f);font-size:.78rem}

/* Placement on each card type. */
.reading-popover .pronunciation{margin:5px 0 12px}
.reading-popover .pronunciation-rates{flex:1 1 100%}
.reading-popover .pronunciation-rates button{flex:1;min-height:44px;font-size:12px;background:#f1f5e9}
.exam-option-recommendations .pronunciation{gap:6px}
.exam-option-recommendations .pronunciation-rates{gap:4px}
.exam-option-recommendations .pronunciation-rates button{padding:7px 9px}
.exam-glossary-name .pronunciation-menu>summary{width:34px;height:34px}
.familiarity-word-name{display:flex;align-items:center;gap:8px;min-width:0}
.familiarity-word-name h3{min-width:0}
.reading-audio .pronunciation-accents button{min-height:30px}

@media(max-width:760px){
  .pronunciation-rates button,.pronunciation-panel .pronunciation-rates button{min-height:44px}
  .pronunciation-accents button,.pronunciation-panel .pronunciation-accents button{min-height:40px}
  .pronunciation-menu>summary,.exam-glossary-name .pronunciation-menu>summary{width:44px;height:44px}
  .reading-audio .pronunciation-accents button{min-height:34px}
}
