
.ovi-voice[hidden], .ovi-voice [hidden], .ovi-voice-directory [hidden] { display:none !important; }
.ovi-voice { position:relative; isolation:isolate; flex:1; min-width:0; min-height:0; display:grid;
  grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;row-gap:8px;padding:12px 0; }
.ovi-call-main {grid-area:1/1;container-type:inline-size;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;}
.ovi-call-footer {grid-area:2/1;display:grid;justify-items:center;gap:4px;min-width:0;}
.ovi-call-footer:has([data-controls][hidden]):has([role=status]:empty) {display:none;}
.ovi-voice:has(.ovi-room-chat:not([hidden])) {grid-template-columns:minmax(0,1fr) clamp(250px,31%,380px);column-gap:12px;}
.ovi-voice [data-participants] { order:1; flex:1; align-self:stretch; display:grid; min-height:0; grid-auto-rows:minmax(0,1fr); gap:8px; }
.ovi-voice [data-participants]:empty { display:none; }
.ovi-voice [data-participants]:is([data-count="2"],[data-count="3"],[data-count="4"]) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ovi-voice-person { position:relative; isolation:isolate; overflow:hidden; display:grid; place-items:center; min-width:0; min-height:0;
  border-radius:14px; color:white; background:radial-gradient(ellipse at 55% 24%,#56334c 0,#352031 56%,#20171f 100%); }
.ovi-voice-person:nth-child(2n) { background:radial-gradient(ellipse at 55% 24%,#334558 0,#233140 56%,#171d26 100%); }
.ovi-voice-person video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#151318; }
.ovi-voice-person audio { display:none; }
.ovi-call-avatar { position:relative; flex:none; display:inline-grid; place-items:center; overflow:hidden; border-radius:50%; aspect-ratio:1;
  width:clamp(54px,9vmin,108px); color:white; background:#51374f; font-weight:650; font-size:clamp(20px,4vmin,38px); }
.ovi-call-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ovi-person-label { position:absolute; inset:auto auto 12px 12px; display:grid; gap:2px; max-width:calc(100% - 24px);
  padding:5px 9px; border-radius:7px; background:rgb(13 12 16 / 85%); overflow-wrap:anywhere; line-height:1.25; }
.ovi-person-label small { font-size:12px; color:#ded9e0; }
.ovi-voice [data-controls] { order:3; display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.ovi-voice button { min-height:42px; padding:8px 14px; border:1px solid #635661; border-radius:12px; background:#29262c; color:white;
  font:inherit; cursor:pointer; }
.ovi-voice button:hover { filter:brightness(1.18); }
.ovi-voice button:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.ovi-voice [aria-pressed=true],.ovi-voice [data-join] { background:#ff82cf; color:#191019; border-color:transparent; }
.ovi-voice [data-leave] { background:#ad304b; color:white; border-color:transparent; }
.ovi-voice [role=status] { order:2; font-size:.85rem; }
.ovi-voice [role=status]:empty {display:none;}
.ovi-voice .ovi-voice-person button { position:relative; }
.chat:has(.ovi-voice:not([hidden])) {display:flex;flex-direction:column;align-self:start;width:100%;height:calc(100dvh - 62px - 2 * var(--ovi-message-padding,32px));min-height:0;}
.studio-project-center [data-room-title][data-voice]::before {content:none;}
@media(max-width:680px) {
  .ovi-voice [data-participants][data-count="2"] { grid-template-columns:1fr; }
  .ovi-voice [data-controls] {gap:4px;}
  .ovi-voice [data-controls] button {padding:8px 10px;font-size:14px;}
  .ovi-person-label {inset:auto 4px 4px 4px;max-width:none;font-size:14px;}
  .chat:has(.ovi-voice:not([hidden])) {height:auto;}
}
.ovi-voice-directory { margin-block:12px; }
.ovi-voice-directory[hidden] { display:none; }
.ovi-voice-directory h3 { margin:0 0 6px; font-size:.88rem; }
.ovi-voice-directory nav { display:grid; gap:2px; }
.ovi-voice-directory nav [data-voice-channel] { display:grid; grid-template-columns:16px 1fr; align-items:center;
  column-gap:8px; width:100%; text-align:start; min-height:40px; padding:5px 10px; border:0; border-radius:6px;
  background:transparent; color:inherit; font:inherit; overflow-wrap:anywhere; cursor:pointer; }
.ovi-voice-directory nav [data-voice-channel]::before { content:''; grid-row:span 2; width:16px; height:16px; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 9h4l5-5v16l-5-5H3z M15 8q4 4 0 8 M18 5q7 7 0 14'/%3E%3C/svg%3E") center/contain no-repeat; }
.ovi-voice-directory small { color:inherit;opacity:.78;font-size:.78rem; }
.ovi-voice-directory nav [data-voice-channel]:is(:hover,[aria-current]) { background:var(--workspace-soft,#332e39); }
.ovi-voice-directory nav [data-voice-channel]:focus-visible {outline:2px solid currentColor; outline-offset:-2px;}
.ovi-voice-directory nav [data-voice-channel]:disabled {opacity:.65;cursor:default;}

.ovi-voice-directory .ovi-rail-head {display:flex;align-items:center;justify-content:space-between;gap:6px;}
.ovi-voice-directory .ovi-rail-head button {background:transparent;color:inherit;border:0;padding:6px;font-size:.83rem;}
.ovi-voice-directory ul {display:grid;gap:5px;list-style:none;margin:3px 0 6px;padding:0 0 0 28px;}
.ovi-voice-directory li {display:flex;align-items:center;gap:7px;font-size:.85rem;overflow-wrap:anywhere;}
.ovi-voice-directory .ovi-call-avatar {width:24px;font-size:11px;}

.ovi-voice [data-controls] button {display:inline-flex;align-items:center;justify-content:center;gap:6px;}
.ovi-voice [data-controls] svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.ovi-voice [aria-pressed=true] .device-off {display:none;}
@media(min-width:681px) {
  .ovi-voice [data-participants][data-count="2"] {align-items:center;}
  .ovi-voice [data-count="2"] .ovi-voice-person {width:100%;aspect-ratio:16/10;max-height:100%;}
}

@media(max-width:680px) {
  [data-voice-screen] main {padding:8px 12px;}
  [data-voice-screen] #workspace {height:calc(100dvh - 78px);display:flex;flex-direction:column;gap:6px;}
  [data-voice-screen][data-ovi-view=project] #workspace {height:calc(100dvh - 16px);}
  [data-voice-screen] #workspace .chat {display:flex;flex-direction:column;flex:1;min-height:0;}
  [data-voice-screen] .heading h1 {font-size:1.45rem;margin:2px 0 4px;}
  [data-voice-screen] .ovi-voice {padding:0 0 env(safe-area-inset-bottom);gap:6px;}
  [data-voice-screen] #voiceNavToggle, #voiceNavClose {align-self:start;min-height:40px;padding:5px 12px;border:1px solid var(--line);
    background:#242127;color:inherit;font-size:.9rem;}
  [data-voice-screen] #projectNavigation:popover-open {inset:0 auto 0 0;margin:0;width:min(85vw,340px);height:100dvh;max-height:none;
    box-sizing:border-box;overflow:auto;padding:16px;border:0;border-right:1px solid var(--line);background:#19171d;color:inherit;}
  #projectNavigation::backdrop {background:rgb(0 0 0 / .62);}
  #voiceNavClose {display:block;margin:0 0 14px auto;}
}

.ovi-voice-row {display:flex;align-items:center;gap:3px;}
.ovi-voice-row [data-voice-channel] {flex:1;min-width:0;}
.ovi-voice-directory nav [data-voice-channel][data-activity]::before {background:#ff60d3;}
.ovi-voice-directory nav [data-voice-channel][aria-current] {background:#392735;box-shadow:inset 3px 0 #ff60d3;}

.ovi-lock-mark {display:inline-flex;color:#ff9dde;vertical-align:middle;margin-inline-end:.35em;}
.ovi-voice-directory .ovi-room-gear {flex:none;display:grid;place-items:center;width:34px;height:36px;background:transparent;color:#ff9dde;border:0;cursor:pointer;}
.ovi-call-main:has([data-ended]:not([hidden])) {padding-bottom:clamp(36px,8dvh,88px);gap:0;}
.ovi-voice [data-ended] {margin:0;font:400 .875rem/1.4 system-ui;color:#c5bec6;text-align:center;}
.ovi-voice [data-ended]:not([hidden]) + [data-join] {min-height:44px;padding:3px 12px;border:6px solid transparent;
  border-radius:14px;background-clip:padding-box;font-size:.8125rem;font-weight:500;}
.ovi-voice [data-controls] button {width:46px;height:46px;padding:0;border-radius:50%;}
.ovi-thread-heading:has(.ovi-chat-toggle:not([hidden])) {width:100%;}
.ovi-voice-toolbar {display:flex;justify-content:flex-end;}
.ovi-voice-toolbar:has(.ovi-chat-toggle[hidden]) {display:none;}
.ovi-thread-heading .ovi-chat-toggle,.ovi-voice-toolbar .ovi-chat-toggle {display:grid;place-items:center;flex:none;
  width:44px;height:44px;margin-inline-start:auto;padding:0;border:0;border-radius:8px;
  background:transparent;color:inherit;cursor:pointer;}
.ovi-chat-toggle svg {width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;}
.ovi-chat-toggle:is(:hover,[aria-expanded=true]) {color:#ffa3da;background:#392c36;}
.ovi-chat-toggle:focus-visible,.ovi-room-chat :focus-visible {outline:2px solid #ff9dde;outline-offset:-2px;}
.ovi-room-chat {grid-column:2;grid-row:1/-1;min-height:0;min-width:0;box-sizing:border-box;
  display:flex;flex-direction:column;gap:8px;padding:10px 12px 12px;border:1px solid #473b45;
  border-radius:10px;background:#221d22;color:#f2edf1;}
.ovi-room-chat-head {display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #483d46;}
.ovi-room-chat-head h2 {margin:0;font-size:.94rem;font-weight:600;}
.ovi-room-chat-head [data-chat-close] {width:44px;height:44px;padding:0;border:0;background:transparent;color:#dbd2d9;font-size:1.5rem;}
.ovi-room-chat ol {flex:1;min-height:0;max-height:none;list-style:none;overflow:auto;margin:0;padding:0;overscroll-behavior:contain;}
.ovi-room-chat li {padding:8px 0;display:grid;gap:2px;overflow-wrap:anywhere;white-space:pre-wrap;}
.ovi-room-chat li strong {color:#f4bfdf;font-size:.82rem;}
.ovi-room-chat form {display:flex;gap:6px;min-width:0;}
.ovi-room-chat input {min-width:0;flex:1;padding:8px;border:1px solid #675b65;border-radius:6px;background:#171417;color:white;font:inherit;}
.ovi-room-chat [role=status] {order:0;color:#c9bdc7;}
.ovi-room-chat [data-earlier] {align-self:start;min-height:32px;font-size:.85rem;}
@container (max-width:760px) {
  .ovi-voice [data-participants][data-count="2"] {grid-template-columns:minmax(0,1fr);align-items:stretch;}
  .ovi-voice [data-count="2"] .ovi-voice-person {width:100%;height:100%;aspect-ratio:auto;}
}
@media(max-width:900px) {
  .ovi-voice:has(.ovi-room-chat:not([hidden])) {grid-template-columns:minmax(0,1fr);column-gap:0;}
  .ovi-room-chat {grid-column:1;grid-row:1;z-index:2;justify-self:end;width:min(94%,24rem);box-shadow:-5px 2px 18px #0006;}
}
@media(max-width:680px) {
  .ovi-voice-directory .ovi-room-gear {width:42px;height:42px;}
  .ovi-room-chat {padding-bottom:max(10px,env(safe-area-inset-bottom));}
}
