/* One calm workspace across current and future modules. */
#dashboard-main:has(.module-workspace) { max-width: 1440px; padding: 26px 32px 32px; }
.module-workspace { width: 100%; max-width: none; }
.module-workspace :is(h2,h3,h4),.module-workspace .panel-heading h2 { letter-spacing: normal; word-spacing: normal; line-height: 1.35; }
.module-workspace .workspace-module-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.module-workspace :is(.welcome-heading,.voice-settings-hero) { display: flex; grid-column: 1/-1; grid-row: auto; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 0; }
.module-workspace :is(.welcome-heading,.voice-settings-hero) h1 { font-size: 27px; margin: 0; }
.module-workspace :is(.welcome-heading,.voice-settings-hero) .eyebrow { display: none; }
.module-workspace :is(.welcome-heading,.voice-settings-hero) p { margin: 6px 0 0; font-size: 14px; }
.welcome-page.module-workspace { display: block; }
.module-workspace > .module-action-rail,
.module-workspace .voice-action-rail { max-width: none; margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; }
.module-workspace .module-action-rail .button { min-height: 40px; font-size: 13px; }
.module-workspace .module-action-rail :is([data-module-publish],#local-publish-voice) { order: 2; }
.module-workspace .module-action-rail .field-hint { margin: 0; }
.module-workspace .welcome-section-bar { padding: 15px 20px; }
.module-workspace .welcome-section-body { max-width: none; padding: 0 20px 20px; }
.module-workspace .welcome-section-bar strong { font-size: 16px; }
.workspace-section-title { flex: 1; min-width: 0; }
.module-workspace .workspace-section-title h2 { font-size: 16px; margin: 0; }
.module-workspace .welcome-section-bar .section-chevron { display: none; }
.module-workspace .welcome-sections { margin: 0 0 16px; }
.module-workspace .welcome-section-issue { margin: 0 20px 12px; }
.module-workspace .welcome-section-body .direct-editor { width: 100%; }
.module-workspace input[role=switch] { appearance: none; width: 40px; height: 24px; min-width: 40px; border: 1px solid var(--muted); border-radius: 20px; background: var(--surface-2); margin: 0; padding: 3px; cursor: pointer; }
.module-workspace input[role=switch]::before { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); }
.module-workspace input[role=switch]:checked { background: var(--accent); border-color: var(--accent); }
.module-workspace input[role=switch]:checked::before { transform: translateX(16px); background: var(--bg); }
.module-workspace input[role=switch]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.module-workspace .direct-editor .direct-channel-row { grid-template-columns: 150px minmax(0, 1fr); max-width: 740px; }
.module-workspace .direct-message { width: 100%; }
.module-workspace .voice-form .form-body { padding: 20px; }
.module-workspace .voice-form .form-body > form > label { margin-top: 18px; }
.module-workspace .voice-form #local-voice-check-form > label { margin-top: 18px; }
.module-workspace #local-entry-name-group,.module-workspace #local-category-name-group { margin: 12px 0; }
.module-workspace :is(#local-entry-name-group,#local-category-name-group) label { margin-top: 0; }
.module-workspace .voice-channel-list { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 12px 0 18px; }
.module-workspace .voice-channel-choice { flex: 0 1 auto; min-width: 150px; padding: 10px 14px; }
.module-workspace .voice-channel-choice small { font-size: 11px; }
.module-workspace #voice-channel-feedback:empty { display: none; }
.module-workspace #local-action-fieldset[hidden] { display: none; }
.module-workspace .checkbox-row { padding-top: 16px; margin-top: 18px; }
.module-workspace .local-action-choices { gap: 8px; margin-top: 10px; }
.module-workspace .local-hub-footer:empty { display: none; }
.workspace-direct-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.workspace-direct-choices .button[aria-pressed=true] { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.workspace-preview { margin-top: 12px; }
.workspace-preview-button { width: auto; min-height: 36px; }
.workspace-preview-body { margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.workspace-preview-body > .welcome-message { width: 100%; max-width: 760px; }
.workspace-preview-body > small { color: var(--muted); }
.workspace-footer { padding: 16px 0; }
.workspace-history-link { border: 0; padding: 6px 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.module-support-view { width: min(900px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.module-support-view:not([open]),.module-workspace [hidden] { display: none !important; }
.module-support-view::backdrop { background: #0009; }
.module-support-view > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.module-support-view h2 { margin: 0; font-size: 23px; }
.workspace-support-tabs { display: flex; gap: 8px; margin: 20px 0; }
.workspace-support-tabs [aria-pressed=true] { color: var(--accent-text); border-color: var(--accent); }
.workspace-support-section { border-top: 1px solid var(--line); padding: 16px 0; }
.workspace-support-section h3 { margin: 0 0 12px; font-size: 17px; }
.workspace-support-section .welcome-status { grid-template-columns: repeat(2,minmax(0,1fr)); }
.workspace-support-section .local-access-body { padding: 0; }
.workspace-support-section p { overflow-wrap: anywhere; }
.workspace-role-picker { max-width: 740px; }
.workspace-role-selected { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.workspace-role-chip { border: 1px solid var(--line); border-radius: 18px; padding: 6px 10px; color: var(--ink); background: var(--surface-2); font: inherit; font-size: 13px; cursor: pointer; }
.workspace-role-chip span { margin-left: 8px; color: var(--muted); }
.workspace-role-picker .welcome-role-search { width: 100%; max-width: none; margin: 0; }
.workspace-role-picker .welcome-role-list { max-height: 190px; overflow: auto; margin: 8px 0 0; border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; }
.workspace-role-picker .welcome-role-list .welcome-toggle { margin: 0; padding: 8px 0; font-size: 14px; }
.workspace-role-picker .welcome-role-list small { margin: 0; font-size: 11px; }
.workspace-role-picker .welcome-role-list:empty { display: none; }
.module-workspace .wc-builder { margin-bottom: 0; }
.module-workspace .wc-direct-layout { gap: 20px; }
.module-workspace .wc-direct-layout.workspace-no-gallery { grid-template-columns: minmax(0,1fr); }
.module-workspace .wc-builder-toolbar { margin-bottom: 14px; }
.module-workspace .wc-builder-toolbar > .workspace-preview-button { margin-left: 0; }
.workspace-add-elements { border-top: 1px solid var(--line); margin: 18px 0 8px; padding-top: 14px; }
.workspace-add-elements h3 { margin: 0 0 10px; font-size: 14px; }
.workspace-add-elements > div { display: flex; flex-wrap: wrap; gap: 8px; }
@media(max-width:760px) {
  #dashboard-main:has(.module-workspace) { padding: 20px 14px 24px; }
  .welcome-page.module-workspace { padding-bottom: 0; }
  .dashboard-body:has(.module-workspace) .dashboard-footer { padding-bottom: calc(var(--module-action-rail-offset,90px) + 70px); }
  .module-workspace :is(.welcome-heading,.voice-settings-hero) { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .module-workspace :is(.welcome-heading,.voice-settings-hero) h1 { font-size: 24px; }
  .module-workspace .welcome-section-bar { padding: 14px 12px; }
  .module-workspace .welcome-section-body,.module-workspace .voice-form .form-body { padding: 0 12px 16px; }
  .module-workspace .voice-form .form-body { padding-top: 16px; }
  .module-workspace .direct-editor .direct-channel-row { grid-template-columns: 1fr; }
  .module-workspace > .module-action-rail { position: fixed; bottom: var(--welcome-keyboard-inset,0px); margin: 0; padding: 8px 12px; border-radius: 0; }
  .module-workspace .voice-action-rail { position: sticky; top: 0; }
  .module-workspace .welcome-section-bar strong { font-size: 15px; }
  .workspace-preview-body { padding: 12px; }
  .module-support-view { padding: 16px; max-height: calc(100dvh - 24px); }
  .workspace-support-section .welcome-status { grid-template-columns: 1fr; }
}
/* Voice uses the same compact controls and surfaces as the shared studio. */
.dashboard-body #dashboard-main:has(.voice-settings-page) { max-width:1440px; padding:24px 28px 32px; }
.voice-settings-page.module-workspace .voice-form { border:0; background:none; box-shadow:none; }
.voice-settings-page.module-workspace .voice-form .form-body { padding:0; max-width:none; }
.voice-settings-page #local-voice-check-form { display:grid; gap:12px; }
.voice-settings-page .voice-channel-setups { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 12px; padding:12px 16px; background:var(--surface); border:1px solid var(--line); border-radius:var(--editor-radius,8px); }
.voice-settings-page .voice-channel-setups .panel-heading { display:contents; }
.voice-settings-page .voice-channel-setups h2 { margin:0; font-size:16px; }
.voice-settings-page.module-workspace .voice-channel-list { flex:1; order:1; margin:0; gap:6px; }
.voice-settings-page .voice-channel-setups [data-action=add-voice-channel] { order:3; }
.voice-settings-page.module-workspace .voice-channel-choice { min-width:130px; padding:8px 32px 8px 12px; min-height:38px; box-shadow:none; border-radius:6px; }
.voice-settings-page .voice-channel-choice small { display:none; }
.voice-settings-page #voice-channel-feedback { flex-basis:100%; order:4; margin:0; }
.voice-settings-page #voice-channel-options { display:grid; grid-template-columns:minmax(140px,1fr) auto auto; gap:8px 18px; align-items:end; margin:0; padding:12px 16px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.voice-settings-page #voice-channel-options .field-hint { grid-column:1/-1; margin:0; }
.voice-settings-page .voice-form .form-body label.voice-setup-enabled { display:flex; align-items:center; gap:8px; min-height:40px; }
.voice-settings-page .voice-resource-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; min-width:0; }
.voice-settings-page .voice-field,.voice-settings-page .voice-switch-row,.voice-settings-page .local-control-fieldset { padding:12px 16px; border:1px solid var(--line); border-radius:8px; background:var(--surface); min-width:0; margin:0; }
.voice-settings-page .voice-field-label { display:flex; align-items:center; gap:6px; min-height:28px; flex-wrap:wrap; margin-bottom:5px; }
.voice-settings-page .voice-field-label :is(label,h2) { font-size:14px; font-weight:650; margin:0; color:var(--ink); line-height:1.4; }
.voice-settings-page.module-workspace :is(input:not([type=checkbox]),select) { width:100%; min-width:0; height:40px; min-height:40px; font-size:14px; border-radius:6px; padding:8px 12px; }
.voice-settings-page .field-hint { display:block; font-size:12px; line-height:1.5; margin:6px 0 0; color:var(--muted); }
.voice-settings-page .voice-switch-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding-block:7px; }
.voice-settings-page .voice-switch-row .voice-field-label { margin:0; }
.voice-settings-page .voice-naming .workspace-direct-choices { margin:4px 0 8px; }
.voice-settings-page .workspace-direct-choices .button { min-height:38px; font-size:13px; padding:8px 14px; }
.voice-settings-page .voice-existing-rule { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:9px 12px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); font-size:13px; }
.voice-settings-page .voice-existing-rule output { flex:1; min-width:120px; overflow-wrap:anywhere; color:var(--ink); }
.voice-settings-page .voice-kept-label { color:var(--accent-text); font-size:12px; }
.voice-settings-page #local-room-name-group { max-width:720px; }
.voice-settings-page #local-room-name-group label { font-size:12px; color:var(--muted); }
.voice-settings-page .voice-controls-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.voice-settings-page #voice-control-count { margin:0 0 0 10px; }
.voice-settings-page .voice-bulk-actions { display:flex; flex-wrap:wrap; gap:6px; }
.voice-settings-page .voice-bulk-actions .button { min-height:30px; padding:4px 10px; font-size:12px; }
.voice-settings-page .local-control-choice { min-height:36px; padding:6px 10px; font-size:13px; gap:8px; box-shadow:none; }
.voice-settings-page .local-control-choice:has(input:disabled) { color:var(--muted); }
.voice-settings-page .local-control-choice small { font-size:11px; }
.voice-settings-page .local-control-choice .voice-control-note { margin-left:auto; max-width:50%; font-size:11px; line-height:1.3; text-align:right; }
.voice-settings-page .voice-validation { margin:7px 0 0; font-size:13px; color:var(--danger-text,var(--ink)); }
.voice-settings-page input[aria-invalid=true] { border-color:var(--danger-text,var(--accent)); }
@media(max-width:700px) {
 .dashboard-body #dashboard-main:has(.voice-settings-page) { padding:18px 12px 28px; }
 .voice-settings-page .voice-resource-grid { grid-template-columns:1fr; }
 .voice-settings-page .voice-form .form-body label.local-control-choice { min-height:44px; }
 .voice-settings-page #voice-channel-options { grid-template-columns:1fr; }
 .voice-settings-page .voice-field,.voice-settings-page .local-control-fieldset { padding:10px 12px; }
 .voice-settings-page .local-action-choices { grid-template-columns:1fr; }
 .voice-settings-page .voice-channel-setups { padding:10px 12px; gap:8px; }
 .voice-settings-page .voice-channel-list { min-width:100%; }
 .voice-settings-page .workspace-direct-choices .button { flex:1; padding-inline:9px; }
 .voice-settings-page .voice-existing-rule { align-items:flex-start; }
}
