/* Same controls on the board and its human invitation. */
.preferences-panel { position: fixed; z-index: 90; box-sizing: border-box; width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 20px; border-radius: 14px; background: var(--surface, #fff); color: var(--ink, #101827); box-shadow: var(--shadow-lg, 0 8px 30px #10182726); font: 14px/1.5 Roboto, sans-serif; }
.preferences-panel[hidden] { display: none; }
.preferences-panel h2 { margin: 0 0 20px; font: 600 17px/1.3 Roboto, sans-serif; }
.preferences-panel fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.preferences-panel legend, .language-label { display: block; padding: 0; margin-bottom: 8px; font-weight: 500; }
.appearance-options { display: flex; gap: 6px; }
.appearance-options label { flex: 1; position: relative; cursor: pointer; }
.appearance-options input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.appearance-options span { display: block; padding: 10px 4px; text-align: center; border: 1px solid var(--line, #dfe2ec); border-radius: 8px; }
.appearance-options input:checked + span { color: var(--on-accent, #fff); background: var(--navy, #303b80); border-color: var(--navy, #303b80); }
.appearance-options input:focus-visible + span, .preferences-panel select:focus-visible, #btn-preferences:focus-visible { outline: 2px solid var(--navy-2, #4755a0); outline-offset: 3px; }
.preferences-panel select { width: 100%; min-height: 44px; font: inherit; color: inherit; background: var(--surface, #fff); border: 1px solid var(--line, #dfe2ec); border-radius: 8px; padding: 8px; }
.preferences-panel p { color: var(--muted, #566078); font-size: 12px; margin: 16px 0 0; }
#btn-preferences, #invite-page #btn-preferences { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-width: 36px; padding: 0; cursor: pointer; border: 1px solid var(--line, #dfe2ec); border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #101827); }
#btn-preferences:hover, #btn-preferences[aria-expanded="true"], #invite-page #btn-preferences:hover, #invite-page #btn-preferences[aria-expanded="true"] { background: var(--soft, #f3f4f9); }
.invite-preferences { display: flex; justify-content: flex-end; margin-bottom: 8px; }
:root[data-theme="dark"] .preferences-panel { --surface: #202639; --ink: #ecedf4; --line: #485169; --muted: #bcc3d4; --navy: #bcc2ff; --on-accent: #171b2b; --navy-2: #c8ceff; }
@media (max-width: 760px) { #btn-preferences, #invite-page #btn-preferences { min-width: 44px; width: 44px; height: 44px; } }
/* Card #16: voice settings, board page only. */
.preferences-panel .voice-settings { margin: 24px 0 0; }
.voice-form label { display: block; margin: 10px 0 4px; font-size: 13px; }
.voice-form input { box-sizing: border-box; width: 100%; min-height: 44px; font: inherit; color: inherit; background: var(--surface, #fff); border: 1px solid var(--line, #dfe2ec); border-radius: 8px; padding: 8px; }
.voice-form input[aria-invalid="true"] { border-color: var(--red, #931414); }
.voice-form button, .voice-saved button { margin-top: 12px; min-height: 44px; padding: 0 14px; font: inherit; font-weight: 500; cursor: pointer; border-radius: 8px; border: 1px solid var(--navy, #303b80); background: var(--navy, #303b80); color: var(--on-accent, #fff); }
.voice-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.voice-saved[hidden], .voice-form[hidden] { display: none; }
.voice-saved span { flex: 1 1 100%; overflow-wrap: anywhere; }
.voice-saved button { margin-top: 0; background: transparent; color: inherit; border-color: var(--line, #dfe2ec); }
.voice-form input:focus-visible, .voice-settings button:focus-visible { outline: 2px solid var(--navy-2, #4755a0); outline-offset: 2px; }
.preferences-panel .voice-note { margin-top: 10px; }
.voice-advanced { margin-top: 6px; }
.voice-advanced summary { display: flex; align-items: center; min-height: 44px; font-size: 13px; cursor: pointer; }
.voice-advanced summary::-webkit-details-marker { display: none; }
.voice-advanced summary::before { content: ""; width: 6px; height: 6px; margin: 0 10px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.voice-advanced[open] summary::before { transform: rotate(45deg); }
.voice-advanced summary:focus-visible { outline: 2px solid var(--navy-2, #4755a0); outline-offset: 2px; }
.preferences-panel .voice-error { margin: 8px 0 0; font-size: 13px; color: var(--red, #931414); }
.preferences-panel .voice-error[hidden] { display: none; }
