.voice-settings{margin-block:24px;min-width:0}.voice-settings fieldset{border:0;padding:0;margin:18px 0;min-width:0}.voice-settings legend{font-weight:600;margin-bottom:10px}.voice-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.voice-card{border:1px solid var(--border,#c8cdd2);border-radius:12px;padding:12px;min-width:0}.voice-card strong{display:block;font-size:.875rem;margin-bottom:8px}.voice-segments{display:flex;gap:6px}.voice-settings button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;font-size:.875rem;min-width:0}.voice-segments button{flex:1;padding:8px}.voice-segments button[aria-pressed=true]{border-color:currentColor;background:color-mix(in srgb,currentColor 10%,transparent);font-weight:600}.voice-settings button:focus-visible{outline:2px solid currentColor;outline-offset:3px}.voice-preview{margin-top:10px}.voice-settings .control-icon{width:20px;height:20px;flex-shrink:0}@media(max-width:480px){.voice-options{grid-template-columns:1fr}}
.engrnote-voice-notice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:1000;width:max-content;max-width:calc(100% - 32px);padding:12px 16px;border:1px solid var(--border,#c8cdd2);border-radius:12px;background:var(--card,#fff);color:var(--text,#17212b);box-shadow:0 4px 18px #0002;font-size:.875rem}.engrnote-voice-notice[hidden]{display:none}.voice-debug pre{overflow:auto;max-height:340px;font-size:.8rem;white-space:pre-wrap;overflow-wrap:anywhere}.voice-segments button[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor}.voice-settings [data-resolved]{overflow-wrap:anywhere}
.thai-voice-picker{display:grid;gap:7px;margin-top:14px;font-size:.875rem}.thai-voice-picker select{min-width:0;width:100%;max-width:100%;font-size:.875rem;text-overflow:ellipsis}.thai-voice-note{margin-top:8px!important;line-height:1.7}

/* Settings share a single reading column and consistent label/control alignment. */
#settings .pref-stack{width:100%;max-width:54rem;display:grid;gap:1rem;margin-block:1rem 2rem}
#settings .pref-card{box-sizing:border-box;min-width:0;max-width:none;margin:0!important;padding:clamp(1rem,3vw,1.65rem);border:1px solid var(--line);border-radius:16px}
#settings .pref-card h2{margin:0 0 .7rem;font-size:1.15rem;font-weight:650;line-height:1.5}
#settings .pref-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:0;padding:.72rem 0;min-height:46px;border-bottom:1px solid var(--line);font-size:.95rem;box-sizing:border-box}
#settings .pref-row>span{min-width:0;overflow-wrap:anywhere}
#settings .pref-row>select,#settings .pref-row>input[type=number]{width:clamp(9rem,32%,15rem);min-height:42px;flex:none;margin:0}
#settings .pref-row>input[type=checkbox]{width:20px;height:20px;flex:none;accent-color:var(--accent,#1457d9);margin:0 .35rem}
#settings .pref-hint,#settings .pref-details p{font-size:.87rem;line-height:1.6;color:var(--muted);margin:.7rem 0 0}
#settings .pref-hint:empty{display:none}
#settings .pref-preview{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
#settings .pref-preview button{display:inline-flex;align-items:center;gap:.4rem;min-height:42px}
#settings .pref-preview svg{width:17px;height:17px}
#settings .pref-details{margin-top:1rem}
#settings .pref-details summary{cursor:pointer;padding:.35rem 0;font-size:.9rem;font-weight:600}
#settings .pref-owner{border-top:1px solid var(--line);padding-top:.65rem}
#settings .pref-sample{display:grid;gap:.4rem;margin:.5rem 0}
#settings :is(input,select,button,textarea,summary):focus-visible{outline:2px solid var(--accent,#1457d9);outline-offset:3px}
@media(max-width:520px){#settings .pref-row:has(select),#settings .pref-row:has(input[type=number]){align-items:stretch;flex-direction:column;gap:.4rem}#settings .pref-row>select,#settings .pref-row>input[type=number]{width:100%}#settings .pref-preview button{flex:1}#settings .pref-stack{gap:.75rem}}
@media(min-width:761px){body:has(#settings:not([hidden]))>.user-toolbar{position:absolute}}

.review-word-groups{border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin-top:10px;text-align:left;min-width:0;max-width:100%;box-sizing:border-box}
.word-group-types{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding:2px;scroll-snap-type:x proximity}
.word-group-types button{white-space:nowrap;flex:none;min-height:40px;padding:7px 12px;font-size:.85rem;scroll-snap-align:start}
.word-group-wheel{display:grid;grid-template-columns:32px minmax(0,1fr) 32px;gap:6px;align-items:center;margin-top:5px}
.word-group-wheel>[data-group-step]{width:32px;min-height:42px;padding:0;font-size:23px;border-radius:9px}
.word-group-wheel>[data-group-step]:disabled{opacity:.3;cursor:default}
.word-group-scroll{display:flex;gap:7px;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scroll-snap-type:x proximity;padding:3px 2px 6px;align-items:center}
.word-group-scroll button{flex:0 0 auto;white-space:nowrap;min-height:40px;padding:7px 15px;scroll-snap-align:center;font-size:.86rem}
.word-group-scroll>span{font-size:.8rem;white-space:nowrap}
.review-word-groups button:focus-visible,.word-group-scroll:focus-visible{outline:2px solid var(--accent,#2468fa);outline-offset:2px}