/* GG Call — botões, campos, lista suspensa, modais e configurações (carregado depois de features.css).
   Grade de 4/8 px; padrões de layout do Discord, com a paleta e os ícones do GG Call. */
:root { --input-bg: var(--bg-rail); --input-border: rgba(0, 0, 0, 0.3); --footer-bg: var(--bg-sidebar); }
[data-theme='light'] { --input-bg: #fff; --input-border: rgba(0, 0, 0, 0.16); --footer-bg: #f2f3f5; }
[data-theme='amoled'] { --input-bg: var(--bg-input); --input-border: rgba(255, 255, 255, 0.1); --footer-bg: var(--bg-sidebar); }

/* ---------- botões: nunca quebram linha nem encolhem ao lado de campos. */
.btn {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; min-height: 38px; padding: 0 16px; border-radius: 4px; white-space: nowrap; user-select: none;
  font-size: 0.875rem; font-weight: 600; line-height: 1; color: #fff; transition: background 0.15s;
}
.btn.small { min-height: 32px; padding: 0 12px; font-size: 0.8125rem; }
.btn.block { width: 100%; min-height: 44px; font-size: 1rem; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.secondary { background: var(--bg-input); color: var(--text-strong); }
.btn.secondary:hover:not(:disabled) { background: var(--grey); color: #fff; }
[data-theme='light'] .btn.secondary { background: #e3e5e8; }
[data-theme='light'] .btn.secondary:hover:not(:disabled) { background: #d4d7dc; color: var(--text-strong); }
.btn.danger { background: var(--red); }
.btn.danger:hover:not(:disabled) { background: #c93b3e; }
.btn.success, .btn.on { background: var(--green); }
.btn.success:hover:not(:disabled), .btn.on:hover:not(:disabled) { background: #2f8a4c; }
/* Botão de texto: ação secundária ("Cancelar") e ações discretas. */
.btn.link { background: none; color: var(--text-strong); padding: 0 12px; }
.btn.link:hover:not(:disabled) { background: none; text-decoration: underline; }
.btn.link.danger { color: var(--red); background: none; }
.btn .icon { flex: none; }
.link-btn { color: var(--link); font-size: 0.875rem; white-space: nowrap; flex: none; }
.link-btn:hover { text-decoration: underline; }

/* ---------- campos */
.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 4px;
  border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-strong);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.input[readonly] { color: var(--text); }
.input:disabled { opacity: 0.6; cursor: not-allowed; }
.input[aria-invalid='true'] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.input.big { min-height: 52px; font-size: 1.25rem; }
.input.short { width: 72px; flex: none; text-align: center; }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.375; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; min-width: 0; }
.field-label { font-size: 0.75rem; font-weight: 700; line-height: 1rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-channel); }
p.field-label { margin-bottom: 8px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.range-value { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.field input[type='range'] { width: 100%; margin: 4px 0; accent-color: var(--brand); cursor: pointer; }
.hint { font-size: 0.8125rem; line-height: 1.125rem; color: var(--text-muted); margin: 0 0 16px; }
.field > .hint { margin: 0; }
.hint.warn { color: var(--yellow); }
[data-theme='light'] .hint.warn { color: #8a6100; }
.hint.ok { color: var(--green); }
.form-error { color: var(--red); font-size: 0.875rem; margin: 0 0 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; cursor: pointer; color: var(--text); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; cursor: pointer; }
.check small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 0.8125rem; }
.check span .icon { vertical-align: -2px; }
.check.disabled { opacity: 0.5; cursor: not-allowed; }
.check-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; padding: 4px; margin-bottom: 16px; border-radius: 6px; background: var(--bg-sidebar); }
.check-list.tall { max-height: 320px; }
.check-list .check { align-items: center; margin: 0; padding: 8px; border-radius: 4px; }
.check-list .check:hover { background: var(--bg-hover); }
.check-list .check > span { min-width: 0; overflow-wrap: anywhere; }
.access-box { margin-bottom: 8px; }
.access-box > .field-label { margin-bottom: 4px; }
.access-box > .hint { margin-bottom: 8px; }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-right: 6px; vertical-align: 0; }
.radio-group { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.radio-group.horizontal { flex-direction: row; flex-wrap: wrap; }
.radio-group legend { margin-bottom: 8px; padding: 0; }
.radio-card { display: flex; align-items: center; gap: 12px; flex: 1 1 180px; min-width: 0; padding: 10px 12px; border-radius: 4px; background: var(--bg-sidebar); color: var(--text-channel); cursor: pointer; }
.radio-group:not(.horizontal) .radio-card { flex: none; }
.radio-card:hover { background: var(--bg-active); color: var(--text); }
.radio-card:has(input:checked) { background: var(--bg-active); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--brand); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.radio-card input { accent-color: var(--brand); margin: 0; flex: none; }
.radio-card strong { color: var(--text-strong); font-weight: 600; }
.radio-card > span { min-width: 0; }
.radio-card small { display: block; color: var(--text-muted); font-size: 0.8125rem; }
.theme-swatch { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--grey); }
.theme-swatch.dark { background: #36393e; }
.theme-swatch.light { background: #fff; }
.theme-swatch.amoled { background: #000; }
.accent-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.accent-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; }
.accent-dot.active { border-color: var(--text-strong); box-shadow: 0 0 0 2px var(--bg-chat) inset; }
.color-input { width: 56px; height: 40px; padding: 4px; border-radius: 4px; border: 1px solid var(--input-border); background: var(--input-bg); cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 2px; }
.color-input:disabled { opacity: 0.5; cursor: not-allowed; }
.accent-row .color-input { width: 32px; height: 32px; padding: 2px; border-radius: 50%; }
.accent-row .color-input::-webkit-color-swatch { border-radius: 50%; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row > .input { flex: 1 1 0; min-width: 0; }
.copy-row > .btn { flex: none; }
.copy-row.spaced { margin-top: 8px; }
/* Campo com o botão dentro (convite), como no Discord. */
.copy-row.joined { gap: 4px; padding: 4px; border-radius: 4px; border: 1px solid var(--input-border); background: var(--input-bg); }
.copy-row.joined:focus-within { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.copy-row.joined > .input { min-height: 32px; padding: 4px 8px; border: 0; background: none; box-shadow: none; font-family: var(--mono); }
.copy-row.joined > .btn { min-width: 76px; }
.share-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }

/* ---------- lista suspensa própria (select.js) */
.select {
  position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 40px;
  padding: 0 8px 0 12px; border-radius: 4px; border: 1px solid var(--input-border); background: var(--input-bg);
  color: var(--text-strong); cursor: pointer; user-select: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.select:hover { border-color: rgba(127, 127, 127, 0.45); }
.select:focus { outline: none; }
.select:focus-visible, .select.open { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select.placeholder .select-value { color: var(--text-muted); }
.select-arrow { display: flex; color: var(--text-channel); transition: transform 0.18s ease; }
.select.open .select-arrow { transform: rotate(180deg); }
.select.disabled { opacity: 0.5; cursor: not-allowed; }
.select-list {
  position: fixed; z-index: 250; overflow-y: auto; padding: 4px; border-radius: 4px;
  background: var(--bg-float); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: select-in 0.12s ease-out; transform-origin: top center;
}
.select-list.up { transform-origin: bottom center; }
@keyframes select-in { from { opacity: 0; transform: scaleY(0.96); } }
.select-option {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 8px; border-radius: 3px;
  color: var(--text-channel); cursor: pointer; font-size: 0.9375rem;
}
.select-option.active { background: var(--bg-hover); color: var(--text-strong); }
.select-option.selected { color: var(--text-strong); font-weight: 500; }
.select-option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.select-option-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-option small { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }
.select-check { display: flex; color: var(--brand); }
[data-theme='dark'] .select-check, [data-theme='amoled'] .select-check { color: var(--brand-hint); }
.select-empty { padding: 8px; color: var(--text-muted); font-size: 0.875rem; }

/* ---------- modais */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal { position: relative; width: min(460px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--bg-chat); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.modal.wide { width: min(760px, 100%); }
.modal-header { position: relative; flex: none; padding: 16px 52px 8px 16px; }
.modal-title { font-size: 1.25rem; line-height: 1.5rem; font-weight: 700; color: var(--text-strong); overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.modal-header .icon-btn { position: absolute; top: 12px; right: 12px; }
.modal-body { flex: 1 1 auto; min-height: 0; padding: 8px 16px 16px; overflow-y: auto; }
.modal-body > .field:last-child, .modal-body > div:last-child > .field:last-child, .modal-body > .check-list:last-child, .modal-body > .hint:last-child { margin-bottom: 0; }
.modal-text { color: var(--text-channel); margin-bottom: 16px; }
.modal > .form-error { flex: none; padding: 0 16px; margin: 0 0 16px; }
.modal-actions { flex: none; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px; background: var(--footer-bg); }
.modal-actions .btn:not(.link) { min-width: 96px; }
.modal .tabs { gap: 16px; margin-bottom: 16px; }
.modal .tab { padding: 8px 0; margin-bottom: -1px; }
.modal.lightbox { width: auto; max-width: 92vw; }
.modal.lightbox img { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto 8px; border-radius: 4px; }

/* seletor de tela */
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; max-height: 320px; min-height: 160px; overflow-y: auto; padding: 4px; margin-bottom: 16px; }
.source-grid > .empty-state, .source-grid > .spinner-wrap { grid-column: 1 / -1; }
.source { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 6px; border-radius: 6px; border: 2px solid transparent; background: var(--bg-sidebar); cursor: pointer; }
.source:hover { border-color: var(--grey); }
.source.selected { border-color: var(--brand); }
.source:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.source img:not(.source-icon), .source-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--grey); }
.source-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.8125rem; color: var(--text); }
.source-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-icon { width: 16px; height: 16px; flex: none; }
.modal .tabs .link-btn { margin-left: auto; }

/* troca rápida */
.modal.switcher { width: min(560px, 100%); align-self: flex-start; margin-top: 8vh; max-height: calc(100% - 8vh); }
.modal.switcher .modal-body { padding: 16px; display: flex; flex-direction: column; }
.switcher-list { flex: 1 1 auto; max-height: 320px; min-height: 0; overflow-y: auto; margin: 12px 0; }
.switcher-list > .empty-state { padding: 24px 16px; }
.switcher-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px; border-radius: 4px; cursor: pointer; color: var(--text-channel); }
.switcher-item.active { background: var(--bg-active); color: var(--text-strong); }
.switcher-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-item > small { flex: none; max-width: 45%; margin-left: auto; color: var(--text-muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal.switcher .hint { margin: 0; text-align: center; }

/* ---------- configurações em tela cheia */
.modal-backdrop:has(> .modal.settings) { padding: 0; background: var(--bg-chat); }
.native .modal-backdrop:has(> .modal.settings) { top: var(--titlebar-h); }
.modal.settings { width: 100%; height: 100%; max-width: none; border-radius: 0; box-shadow: none; animation: settings-in 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes settings-in { from { opacity: 0; transform: scale(1.04); } }
.modal-backdrop.closing .modal.settings { animation: settings-out 0.11s ease-in forwards; }
@keyframes settings-out { to { opacity: 0; transform: scale(1.04); } }
.modal.settings .modal-body { flex: 1; min-height: 0; padding: 0; display: flex; overflow: hidden; }
.settings-layout { flex: 1; display: flex; min-width: 0; min-height: 0; }
.settings-sidebar { flex: 1 0 218px; display: flex; justify-content: flex-end; min-height: 0; overflow-y: auto; background: var(--bg-sidebar); }
.settings-nav { width: 218px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 60px 8px 60px 20px; }
.settings-nav-title { padding: 6px 10px; font-size: 0.75rem; font-weight: 700; line-height: 1rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav-sep { height: 1px; margin: 8px 10px; background: var(--bg-active); flex: none; }
.settings-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 6px 10px; border-radius: 4px; text-align: left; font-weight: 500; line-height: 1.25rem; color: var(--text-channel); }
.settings-tab:hover { background: var(--bg-hover); color: var(--text); }
.settings-tab.active { background: var(--bg-active); color: var(--text-strong); }
.settings-tab.danger { color: var(--red); }
.settings-tab.danger:hover { background: rgba(237, 66, 69, 0.1); color: var(--red); }
.settings-main { position: relative; flex: 1 1 800px; min-width: 0; display: flex; background: var(--bg-chat); }
.settings-pane { flex: 1; min-width: 0; overflow-y: auto; padding: 60px 96px 80px 40px; }
.settings-pane > * { max-width: 740px; }
/* Fechar: botão redondo com "ESC" à direita do conteúdo. */
.settings-main > .modal-header { position: absolute; top: 60px; right: 32px; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.settings-main > .modal-header .modal-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.settings-main > .modal-header .icon-btn { position: static; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--text-channel); color: var(--text-channel); }
.settings-main > .modal-header .icon-btn:hover { border-color: var(--text-strong); color: var(--text-strong); background: var(--bg-hover); }
.settings-main > .modal-header::after { content: 'ESC'; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); pointer-events: none; }
.settings-main > .form-error { position: absolute; left: 40px; right: 96px; bottom: 20px; max-width: 740px; z-index: 2; margin: 0; padding: 10px 16px; border-radius: 6px; background: var(--red); color: #fff; font-weight: 500; box-shadow: var(--shadow); }
@media (max-height: 640px) {
  .source-grid { max-height: 200px; min-height: 120px; }
  .settings-nav { padding-top: 24px; padding-bottom: 24px; }
  .settings-pane { padding-top: 24px; }
  .settings-main > .modal-header { top: 24px; }
}

/* conteúdo das seções */
.settings-pane h3 { font-size: 1.25rem; line-height: 1.5rem; font-weight: 700; color: var(--text-strong); margin-bottom: 20px; }
.settings-pane h4 { font-size: 0.75rem; font-weight: 700; line-height: 1rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-channel); margin: 32px 0 16px; padding-top: 24px; border-top: 1px solid var(--bg-active); }
.settings-pane h3 + h4 { margin-top: 0; padding-top: 0; border-top: 0; }
.settings-gap { height: 16px; }
.settings-ellipsis { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Interruptores no lugar das caixas de seleção (linha de texto à esquerda, chave à direita). */
.settings-pane .check { flex-direction: row-reverse; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--bg-active); }
.settings-pane .check > span { flex: 1; min-width: 0; color: var(--text-strong); font-weight: 500; }
.settings-pane .check small { margin-top: 4px; font-weight: 400; }
.settings-pane .check input[type='checkbox'] { appearance: none; position: relative; width: 40px; height: 24px; margin: 0; border-radius: 12px; background: var(--grey); transition: background-color 0.15s ease; }
.settings-pane .check input[type='checkbox']::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
.settings-pane .check input[type='checkbox']:checked { background: var(--green); }
.settings-pane .check input[type='checkbox']:checked::before { transform: translateX(16px); }
.settings-pane .check input[type='checkbox']:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.settings-pane .check + .field, .settings-pane .check + .hint { margin-top: 16px; }
.settings-pane .check.disabled input { cursor: not-allowed; }
.profile-card { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px; border-radius: 8px; background: var(--bg-rail); margin-bottom: 24px; }
[data-theme='light'] .profile-card { background: var(--bg-sidebar); }
.profile-names { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
.profile-names strong { display: block; color: var(--text-strong); font-size: 1.125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-names small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card .row-actions { margin: 0; flex: none; }
.guild-icon-preview { width: 72px; height: 72px; flex: none; border-radius: 22px; background: var(--brand); color: var(--on-brand); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.guild-icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.row-actions.end { justify-content: flex-end; }
.row-actions .push-left { margin-right: auto; }
.settings-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px; border-radius: 4px; text-align: left; color: var(--text); }
.settings-list > .settings-row + .settings-row, .settings-pane > .settings-row { border-top: 1px solid var(--bg-active); }
.settings-list > .settings-row:hover, button.settings-row:hover { background: var(--bg-hover); }
.settings-list > .settings-row:hover + .settings-row { border-top-color: transparent; }
.settings-pane > .settings-row { padding: 12px 0; border-top: 0; }
.settings-pane > .settings-row:hover { background: none; }
.settings-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-row-text strong { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-strong); font-weight: 600; }
.settings-row-text small { color: var(--text-muted); font-size: 0.8125rem; }
.settings-owner { flex: none; color: var(--yellow); }
[data-theme='light'] .settings-owner { color: #b58900; }
.settings-tag { flex: none; padding: 0 6px; border-radius: 8px; background: var(--grey); color: #fff; font-size: 0.6875rem; font-weight: 700; line-height: 16px; text-transform: uppercase; }
.settings-role { flex: 0 1 auto; display: inline-flex; align-items: center; max-width: 200px; min-width: 0; padding: 2px 8px; border-radius: 4px; background: var(--bg-sidebar); font-size: 0.75rem; color: var(--text); }
.settings-role > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.settings-toolbar > .hint { flex: 1; min-width: 0; margin: 0; }
.settings-toolbar > .input { width: 240px; flex: none; }
.settings-count { flex: 1; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-channel); }
.settings-form-row { display: flex; align-items: flex-start; gap: 12px; }
.settings-form-row > .field { flex: 1 1 0; }
.settings-form-row > .field:has(> .input.short) { flex: none; }
.settings-form-row > .btn { margin-top: 24px; min-height: 40px; }
.settings-table-head, .settings-table-row { display: grid; align-items: center; gap: 12px; padding: 0 8px; }
.settings-table-head.invites, .settings-table-row.invites { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 56px minmax(0, 1.1fr) 72px; }
.settings-table-head { padding-bottom: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-channel); }
.settings-table-row { min-height: 52px; border-top: 1px solid var(--bg-active); border-radius: 4px; font-size: 0.875rem; }
.settings-table-row:hover { background: var(--bg-hover); }
.settings-table-row code { font-family: var(--mono); color: var(--text-strong); user-select: text; }
.settings-cell-user { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-strong); }
.settings-cell-actions { display: flex; justify-content: flex-end; gap: 4px; }
.settings-sound-emoji { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-sidebar); font-size: 1.25rem; color: var(--text-channel); }
.settings-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center; border-radius: 8px; border: 1px dashed var(--bg-active); }
.settings-empty-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; border-radius: 50%; background: var(--bg-sidebar); color: var(--text-muted); }
.settings-empty strong { color: var(--text-strong); font-size: 1rem; }
.settings-empty p { max-width: 380px; color: var(--text-muted); font-size: 0.875rem; }
.settings-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 160px; color: var(--text-muted); font-size: 0.875rem; }
.mic-test { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.mic-test .meter { flex: 1; }
.meter { position: relative; height: 8px; border-radius: 4px; background: var(--bg-input); }
[data-theme='light'] .meter { background: #e3e5e8; }
.meter span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--grey); }
.meter span.open { background: var(--green); }
.meter-mark { position: absolute; top: -4px; width: 3px; height: 16px; border-radius: 2px; background: var(--text-strong); }
.keybind-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--bg-active); }
.keybind-row > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.keybind-row strong { color: var(--text-strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keybind-row small { color: var(--text-muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.keybind-row > .btn { min-width: 128px; }
.keybind-row + .field, .keybind-row + .settings-gap { margin-top: 16px; }
.settings-list.spaced { margin-top: 12px; }
.keybind-row code, .asset code { font-family: var(--mono); user-select: text; }
.btn.recording { background: var(--red); color: #fff; }
.shortcut-list { margin: 0; }
.shortcut-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; padding: 4px 0; border-bottom: 1px solid var(--bg-active); }
.shortcut-list dt { min-width: 0; color: var(--text); }
.shortcut-list dd { margin: 0; display: flex; flex: none; gap: 12px; }
.shortcut-combo { display: inline-flex; gap: 4px; }
.shortcut-list kbd { min-width: 24px; height: 24px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--bg-sidebar); box-shadow: inset 0 -2px 0 var(--border); color: var(--text-strong); font: 600 0.75rem var(--font); }
.address-list { margin: 8px 0 16px; padding-left: 20px; }
.address-list code { font-family: var(--mono); user-select: text; }
.roles-layout { display: flex; gap: 24px; align-items: flex-start; }
.role-list { position: sticky; top: 0; width: 200px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.role-item { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px; border-radius: 4px; text-align: left; color: var(--text-channel); }
.role-item .role-dot { margin: 0; }
.role-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-item:hover { background: var(--bg-hover); color: var(--text); }
.role-item.active { background: var(--bg-active); color: var(--text-strong); }
.role-list .btn { margin-top: 8px; align-self: flex-start; }
.role-editor { flex: 1; min-width: 0; }
.role-editor-head { display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }
.settings-pane .role-editor-head h4 { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-editor-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; }
.role-editor-fields + .hint { margin-top: -12px; }
.role-editor .check-list { max-height: none; padding: 0; margin-bottom: 16px; background: none; border-radius: 0; gap: 0; }
.role-editor .check-list .check { padding: 12px 0; border-radius: 0; }
.role-editor .check-list .check:hover { background: none; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.asset { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 6px; background: var(--bg-sidebar); }
.asset img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.asset code { flex: 1; min-width: 0; font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); }

@media (max-width: 1100px) {
  .roles-layout { flex-direction: column; align-items: stretch; }
  .role-list { position: static; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .select-list, .modal.settings { animation: none; }
}
