.ovi-settings { box-sizing:border-box; color-scheme:dark; color:#f5f3f5; background:#201e22; border:1px solid #504b51; border-radius:12px; padding:20px; width:min(30rem,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:auto; font:14px/1.45 'DM Sans',sans-serif; }
.ovi-settings::backdrop { background:#090809bf; }
.ovi-dialog-head,.ovi-settings [data-chosen] li { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ovi-settings h2,.ovi-settings h3 { margin:0; color:inherit; font-weight:600;line-height:1.3; }
.ovi-settings h2 { font-size:20px; }
.ovi-settings h3,.ovi-settings legend { font-size:14px; }
.ovi-settings form,.ovi-settings [data-access] { display:grid; gap:12px; margin-top:16px; }
.ovi-settings [data-role] { border-top:1px solid #484348; padding-top:16px; }
.ovi-settings label { display:grid; gap:4px; margin:0; color:inherit; }
.ovi-settings input:not([type=checkbox]),.ovi-settings select,.ovi-settings button { box-sizing:border-box; max-width:100%; min-height:38px; padding:7px 10px; color:inherit; background:#171618; border:1px solid #585158; border-radius:6px; font:inherit; }
.ovi-settings button { cursor:pointer; }
.ovi-settings [type=submit] { justify-self:start; background:#f0e8f0; color:#1c181c; font-weight:600; }
.ovi-settings :focus-visible { outline:2px solid #ff7edb; outline-offset:2px; }
.ovi-settings fieldset { margin:0; border:1px solid #514c51; border-radius:6px; display:grid; gap:5px; }
.ovi-settings fieldset label { display:flex; align-items:center; gap:8px; }
.ovi-settings input[type=checkbox] { width:16px; height:16px; accent-color:#ff70d5; }
.ovi-settings [hidden],.ovi-settings [role=status]:empty,.ovi-settings [data-results]:empty { display:none; }
.ovi-settings p,.ovi-settings ul { margin:0; color:#c8c1c9; }
.ovi-settings [role=status]:not(:empty) { margin-top:12px; }
.ovi-settings ul { padding:0; list-style:none; }
.ovi-settings [data-results] { display:grid; max-height:10rem; overflow:auto; }
.ovi-settings [data-results] button { text-align:left; overflow-wrap:anywhere; }
.ovi-settings [data-chosen] li { overflow-wrap:anywhere; }
.ovi-settings[data-chat-panel] {width:min(38rem,calc(100vw - 24px));}
.ovi-settings-tabs {display:flex;flex-wrap:wrap;gap:6px;margin-block:14px 4px;padding-bottom:10px;border-bottom:1px solid #484348;}
.ovi-settings-tabs button[aria-pressed=true] {background:#45283d;border-color:#b464a2;color:#ffe3f8;}

.ovi-category {font-size:.875rem;}
.ovi-navigation-head,.ovi-folder-heading,.ovi-thread-row {display:flex;align-items:center;gap:2px;min-width:0;}
.ovi-navigation-head :is(h2,h3) {flex:1;min-width:0;}
.ovi-navigation-head button,.ovi-folder-heading button {
  color:inherit;background:transparent;border:0;border-radius:5px;cursor:pointer;min-height:32px;min-width:32px;padding:4px 6px;font:inherit;
}
.ovi-navigation-head button:hover,.ovi-text-folder button:hover {background:rgba(180,158,178,.13);}
.ovi-navigation-head .ovi-gear {display:grid;place-items:center;padding:0;font:18px/1 system-ui;}
.ovi-navigation-head .ovi-gear[hidden] {display:none;}
.ovi-text-folder {min-width:0;}
.ovi-folder-heading {color:var(--workspace-muted,#c8c0ca);}
.ovi-folder-heading .ovi-folder-toggle {flex:1;text-align:left;overflow-wrap:anywhere;font-weight:600;}
.ovi-folder-toggle::before {content:'▾';margin-right:6px;display:inline-block;}
.ovi-folder-toggle[aria-expanded=false]::before {transform:rotate(-90deg);}
.ovi-folder-threads {margin-inline-start:12px;border-inline-start:1px solid #746b783f;padding-inline-start:5px;}
.ovi-thread-row [data-thread] {flex:1;min-width:0;}
.ovi-folder-threads[hidden],.ovi-navigation-head [hidden] {display:none;}
.ovi-category-tree[hidden] {display:none;}
.ovi-extra-categories:not(:empty) {display:grid;gap:8px;margin-top:8px;}
.ovi-extra-categories .ovi-category-tree {display:grid;gap:2px;}
.ovi-extra-categories .ovi-category-tree[hidden] {display:none;}
@media (max-width:680px) {
  #workspace #threads {display:grid;overflow:visible;}
  #workspace .ovi-text-folder button {min-height:36px;}
}

:is(.ovi-folder-toggle,[data-thread],[data-voice-channel])[aria-haspopup=dialog] {-webkit-touch-callout:none;user-select:none;}
.ovi-nav-popup .ovi-action-stack label {display:grid;gap:4px;padding:6px 9px;color:#dbccd8;font-size:.8rem;}
.ovi-nav-popup select {min-height:32px;background:#211e22;border:1px solid #6e5066;border-radius:5px;color:inherit;}
.ovi-nav-popup :focus-visible,.ovi-text-folder :focus-visible,.ovi-voice-row :focus-visible {outline:2px solid #ff60d3;outline-offset:-2px;}
.ovi-nav-popup .ovi-action-state {margin:4px 8px;}
.ovi-nav-popup .ovi-action-state:empty {display:none;}
#studioProjectRail .ovi-thread-row a[data-thread][aria-current],:is(#threads,.ovi-extra-categories) button[data-thread][aria-current] {
  box-shadow:inset 3px 0 #ff60d3;background:#392735;color:#fff;
}
:is(.ovi-thread-row,.ovi-folder-heading,.ovi-voice-row) [data-favorite]::after {content:' ★';color:#ff92dd;}
:is(.ovi-thread-row,.ovi-folder-heading) [data-activity] {font-weight:700;}
:is(.ovi-thread-row,.ovi-folder-heading) [data-activity]::after {content:' ●';color:#ff60d3;}
:is(.ovi-thread-row,.ovi-folder-heading) [data-favorite][data-activity]::after {content:' ★ ●';}
.ovi-folder-heading button:not(.ovi-folder-toggle),.ovi-navigation-head button,.ovi-voice-directory .ovi-rail-head button {color:#ff99df;}

.ovi-text-folder[data-kind=voice] {margin-block:0;}
.ovi-folder-toggle::before {color:#d7a7cc;font-size:.75rem;}
.ovi-folder-icon {display:inline-block;width:1em;height:1em;vertical-align:-.08em;margin-right:.35em;color:#ff92dd;}
.ovi-text-folder .ovi-folder-icon,
.ovi-thread-row [data-thread]::before,
.studio-project-center [data-room-title]:not([data-voice])::before {
  content:'';
  display:inline-block;
  width:1em;
  height:1em;
  vertical-align:-.12em;
  flex:none;
  background:currentColor;
  mask:url('./thread.svg') center/contain no-repeat;
}
.ovi-thread-row button[data-thread]::before,
.studio-project-center [data-room-title]:not([data-voice])::before {margin-inline-end:.4em;}
.ovi-thread-lock {font-size:.72em;margin-inline-start:.35em;}
.ovi-text-folder .ovi-folder-icon {mask-image:url('./channel.svg');}
.ovi-category .ovi-navigation-head {gap:3px;}
.ovi-navigation-head .ovi-category-toggle {display:flex;align-items:center;gap:6px;flex:1;min-width:0;padding-inline:4px;text-align:start;color:inherit;font-weight:650;}
.ovi-category-toggle::before {content:'▾';color:#d7a7cc;font-size:.75rem;}
.ovi-category-toggle[aria-expanded=false]::before {transform:rotate(-90deg);}
.ovi-category-toggle img {flex:none;border-radius:5px;}
.ovi-category-toggle small {font-size:.75em;font-weight:500;}
.ovi-navigation-head .ovi-add-channel {display:grid;place-items:center;padding:0;font:500 22px/1 system-ui;}
.ovi-navigation-head .ovi-add-channel[hidden] {display:none;}
.ovi-navigation-head :is(.ovi-add-channel,.ovi-gear) {width:36px;height:36px;}
@media(pointer:coarse){.ovi-navigation-head :is(.ovi-add-channel,.ovi-gear){width:44px;height:44px;}}
:root[data-ovi-view='project'] #threads:has([data-voice-folder]) {display:grid;}
:root[data-ovi-view='project'] :is(#threads,.ovi-extra-categories) :is([data-kind=text],[data-kind=announcement]) {display:none;}

:is(.ovi-folder-toggle,[data-thread])[draggable=true] {cursor:grab;}
:is(.ovi-folder-heading,.ovi-thread-row)[data-drop=before] {box-shadow:inset 0 2px #ff60d3;}
:is(.ovi-folder-heading,.ovi-thread-row)[data-drop=after] {box-shadow:inset 0 -2px #ff60d3;}
.ovi-order-notice {font-size:.82rem;color:#ffbde9;}
.ovi-order-notice:empty {display:none;}


html:has(dialog.ovi-settings-screen[open]) {overflow:hidden !important;scrollbar-gutter:auto !important;}
dialog.ovi-settings-screen[open] {
  position:fixed;inset:0;box-sizing:border-box;margin:0;border:0;border-radius:0;
  width:100vw;max-width:none;height:100dvh;max-height:none;
  display:grid;align-content:start;grid-template-columns:minmax(11rem,15rem) minmax(0,40rem);
  grid-template-rows:auto auto 1fr;column-gap:clamp(24px,5vw,72px);justify-content:center;
  padding:clamp(20px,5vw,64px);overflow:auto;background:#19171b;color:#f6f1f5;
}
.ovi-settings-screen .ovi-dialog-head {grid-column:1/-1;border-bottom:1px solid #523a4d;padding-bottom:18px;}
.ovi-settings-screen .ovi-dialog-head h2 {overflow-wrap:anywhere;}
.ovi-settings-screen .ovi-settings-tabs {grid-column:1;grid-row:2/4;align-self:start;display:grid;gap:4px;border:0;padding:0;margin:22px 0;}
.ovi-settings-screen .ovi-settings-tabs button {text-align:left;border-color:transparent;background:transparent;}
.ovi-settings-screen .ovi-settings-tabs button[aria-pressed=true] {background:#442337;border-color:#895273;color:#ffe1f5;}
.ovi-settings-screen [data-fields],.ovi-settings-screen [role=status] {grid-column:2;min-width:0;}
.ovi-settings-screen [data-fields] {margin-top:8px;}
.ovi-settings-screen .ovi-danger {background:#532633;color:#ffdde5;}
.ovi-settings-screen details summary {cursor:pointer;}
.ovi-settings-screen details li {padding:4px 0;overflow-wrap:anywhere;}
@media(max-width:680px){
  dialog.ovi-settings-screen[open] {display:block;padding:18px 16px max(24px,env(safe-area-inset-bottom));}
  .ovi-settings-screen .ovi-settings-tabs {display:flex;gap:4px;flex-wrap:wrap;margin:12px 0;}
  .ovi-settings-screen .ovi-settings-tabs button {flex:1 1 auto;text-align:center;}
}

.ovi-settings .ovi-channel-types {padding:0;border:0;gap:6px;}
.ovi-channel-types legend {margin-bottom:6px;}
.ovi-settings .ovi-channel-types label {padding:9px;border:1px solid #52454e;border-radius:7px;cursor:pointer;gap:10px;}
.ovi-channel-types label:has(:checked) {background:#382535;border-color:#ea81cd;}
.ovi-channel-types label:has(:disabled) {opacity:.55;}
.ovi-settings .ovi-channel-types input[type=radio] {flex:0 0 16px;width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:#ff92dd;}
.ovi-channel-types small {display:block;color:#d6cbd3;}
.ovi-type-icon {color:#ff92dd;font:600 1.2rem system-ui;width:1.7em;text-align:center;}
.ovi-text-folder[data-kind=announcement] .ovi-folder-toggle::before {content:none;}
.ovi-text-folder[data-kind=announcement] [aria-current] {background:#392735;box-shadow:inset 3px 0 #ff60d3;}

.ovi-channel-help > [aria-hidden] {display:none;}
.ovi-channel-help[data-reserve] {display:grid;}
.ovi-channel-help[data-reserve] > p {grid-area:1 / 1;}
.ovi-channel-help[data-reserve] > [aria-hidden] {display:block;visibility:hidden;pointer-events:none;}

.ovi-settings .ovi-channel-wizard {grid-template-columns:minmax(0,1fr);}
.ovi-channel-wizard > *, .ovi-channel-types label > span:last-child {min-width:0;}
.ovi-channel-wizard :is(input,select) {min-width:0;}
.ovi-channel-wizard :is(p,small) {overflow-wrap:anywhere;}
