/* Responsive Calls forms and dialogs, with native text sizing and zoom. */
html body .scrim {
  top: var(--calls-visual-top, 0px);
  bottom: auto;
  height: var(--calls-visual-height, 100dvh);
  width: 100%;
  max-width: 100%;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow: hidden;
}
html body .scrim > .dialog {
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
html body #modal-content {
  min-width: 0;
  max-width: 100%;
  max-height: calc(var(--calls-visual-height, 100dvh) - max(14px, env(safe-area-inset-top)) - max(14px, env(safe-area-inset-bottom)) - 2px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: 24px;
}
/* Shared field bounds also cover cabinet tasks, filters, integration keys,
   sign-in and purchase forms rendered outside a dialog. Do not force a width
   on flex inputs (search/chat) or on native selects hidden by the UI. */
html body :is(.dialog, .cab-main, .purchase-card) :is(form, details, label, .settings-field, .calls-field, .field-shell, .calls-task-columns),
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea, .calls-select) {
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  box-sizing: border-box;
}
/* Explicit zero-minimum tracks let native date fields and long translated
   labels shrink with the card instead of setting the grid's minimum width. */
html body :is(.calls-task-form, .calls-field, .cab-key-form, .cab-key-form label, .cab-login form, .cab-login label, .purchase-card form, .purchase-card label, .cw-filter-fields > label) {
  grid-template-columns: minmax(0, 1fr);
}
html body .calls-task-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* The cabinet form also lives in a narrow sidebar on wide screens. Native
   date/time values need the whole card width, independently of the viewport. */
html body .cab-tasks-layout .calls-task-columns {
  grid-template-columns: minmax(0, 1fr);
}
html body :is(.settings-field, .calls-field, .cab-key-form label, .cab-login label, .purchase-card label, .cw-filter-fields > label) {
  white-space: normal;
  overflow-wrap: anywhere;
}
html body .dialog .calls-create-options,
html body .dialog .calls-create-options > .settings-field {
  width: 100%;
  box-sizing: border-box;
}
html body .dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea) {
  width: 100%;
  box-sizing: border-box;
}
/* iOS date/time controls have their own intrinsic native width. Keep the
   native picker, while sizing its control and internal value to the field. */
html body input:is([type=date], [type=time], [type=datetime-local]) {
  /* Calls stays dark even when the shared profile prefers a light theme. */
  color-scheme: dark;
  display: block;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  text-align: left;
  overflow: hidden;
}
html body input:is([type=date], [type=time], [type=datetime-local])::-webkit-date-and-time-value {
  min-width: 0;
  max-width: 100%;
  min-height: 1.5em;
  text-align: left;
}
html body input:is([type=date], [type=time], [type=datetime-local])::-webkit-datetime-edit {
  min-width: 0;
  max-width: 100%;
  padding: 0;
}
@media (max-width: 1100px) {
  html body :is(.cab-tasks-layout, .cab-integration-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  html body .calls-task-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* With no detected camera, the chevron is the first span. The old first-span
   flex rule stretched its two borders into a viewport-sized diagonal. */
html body .calls-select > .calls-select-chevron {
  display: block;
  flex: 0 0 8px;
  width: 8px;
  min-width: 8px;
  max-width: 8px;
  height: 8px;
  min-height: 8px;
  max-height: 8px;
  align-self: center;
  margin: -4px 4px 0 auto;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
html body .calls-select > span:not(.calls-select-chevron) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .scrim:not([hidden]) > .dialog,
html body .cg-dialog[open] {
  animation: calls-dialog-arrive .24s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes calls-dialog-arrive {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Help shares the same sampled optical glass as the invitation dialog. */
html.calls-matte body .cg-dialog:not(.glass-painted) {
  background: var(--matte-panel) !important;
  backdrop-filter: var(--matte-blur) !important;
  -webkit-backdrop-filter: var(--matte-blur) !important;
}
html.calls-matte body .cg-dialog.glass-painted {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body .cg-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(960px, calc(100% - 40px));
  max-width: calc(100% - 40px);
  max-height: min(820px, calc(100dvh - 40px));
  border: 1px solid rgba(235,247,255,.26);
  border-radius: 28px;
  isolation: isolate;
}
html body .cg-dialog .cg-dialog-head {
  padding: 26px 28px 22px;
  background: transparent;
  border-bottom: 1px solid rgba(232,245,255,.15);
  outline: none;
}
html body .cg-dialog .cg-dialog-head h2 {
  margin: 8px 0;
  font-weight: 600;
  letter-spacing: -.025em;
}
html body .cg-dialog .cg-dialog-head p { color: var(--matte-muted); }
html body .cg-dialog .cg-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid rgba(232,245,255,.2);
  border-radius: 50%;
  padding: 0;
  background: rgba(255,255,255,.07) !important;
}
html body .cg-dialog .cg-close .icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
}
html body .cg-dialog .cg-close:hover { background: rgba(255,255,255,.13) !important; }
html body .cg-dialog .cg-dialog-body {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 30px;
  align-items: start;
  padding: 8px 28px 28px;
  background: transparent;
}
html body .cg-dialog .cg-topics {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 0 0;
  padding-right: 12px;
  border-right: 1px solid rgba(232,245,255,.13);
}
html body .cg-dialog .cg-topics a {
  display: block;
  padding: 11px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent !important;
  color: var(--matte-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: none !important;
}
html body .cg-dialog .cg-topics a:hover,
html body .cg-dialog .cg-topics a:focus-visible {
  background: rgba(255,255,255,.07) !important;
  color: #fff;
}
html body .cg-dialog .cg-topic {
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(232,245,255,.15) !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body .cg-dialog .cg-topic:last-child { border-bottom: 0 !important; }
html body .cg-dialog .cg-topic summary {
  gap: 12px;
  padding: 21px 0;
  font-size: 17px;
  font-weight: 550;
  line-height: 1.4;
}
html body .cg-dialog .cg-topic summary::after {
  flex: 0 0 8px;
  content: '';
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin: -4px 5px 0 auto;
  color: var(--matte-muted);
  transition: transform .18s ease;
}
html body .cg-dialog .cg-topic[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
html body .cg-dialog .cg-num {
  width: 23px;
  height: auto;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  color: rgba(222,235,249,.6);
  font-size: 11px;
  font-weight: 500;
}
html body .cg-dialog .cg-topic ol {
  padding: 0 8px 22px 34px;
  font-size: 15px;
  line-height: 1.65;
}
html body .cg-dialog .cg-topic li { padding: 5px 0 7px 6px; }
html body .cg-dialog .cg-topic li::marker { color: rgba(222,235,249,.65); font-weight: 400; }
html body .cg-dialog .cg-figure {
  margin: 2px 0 24px 34px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent !important;
}
html body .cg-dialog .cg-figure figcaption { font-size: 13px; color: var(--matte-muted); }
html body .cg-dialog .cg-zoom-label { font-size: 12px; font-weight: 500; color: var(--matte-info); }
html body .cg-dialog :is(a,summary,button):focus-visible {
  outline: 2px solid var(--matte-blue);
  outline-offset: 3px;
}

@media (max-width: 800px), (pointer: coarse) {
  /* Safari focuses controls below 16 CSS pixels by enlarging the page. */
  html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,[contenteditable=true]) {
    font-size: 16px !important;
  }
  html body .calls-select,
  html body .calls-select-popup > button { font-size: 16px !important; }
  html body .dialog .panel-head h2 { font-size: 20px; line-height: 1.25; }
  html body .dialog .panel-head { gap: 12px; }
  html body .dialog .panel-head .icon-btn { flex-shrink: 0; }
  html body #modal-content { padding: 20px; }
  html body .cg-dialog {
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
    max-height: calc(100dvh - max(14px, env(safe-area-inset-top)) - max(14px, env(safe-area-inset-bottom)));
    border-radius: 26px;
  }
  html body .cg-dialog .cg-dialog-head { padding: 23px 20px 19px; gap: 14px; }
  html body .cg-dialog .cg-dialog-head h2 { font-size: 23px; }
  html body .cg-dialog .cg-dialog-head p { font-size: 13px; }
  html body .cg-dialog .cg-dialog-body { display: block; padding: 0 20px 20px; }
  /* The accordion is also the mobile table of contents, without duplicates. */
  html body .cg-dialog .cg-topics { display: none; }
  html body .cg-dialog .cg-topic summary { padding: 20px 0; font-size: 16px; gap: 10px; }
  html body .cg-dialog .cg-topic ol { padding-left: 27px; padding-right: 0; font-size: 14px; }
  html body .cg-dialog .cg-num { width: 20px; }
  html body .cg-dialog .cg-figure { margin-left: 0; }
}
@media (max-width: 380px) {
  html body #modal-content { padding: 17px; }
  html body .cg-dialog .cg-dialog-head { padding-inline: 17px; }
  html body .cg-dialog .cg-dialog-head h2 { font-size: 21px; }
  html body .cg-dialog .cg-dialog-body { padding-inline: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .scrim:not([hidden]) > .dialog,
  html body .cg-dialog[open] { animation: none; }
  html body .cg-dialog .cg-topic summary::after { transition: none; }
}

/* The meeting dock already exposes Sabian. Hide only the duplicate closed
   floating launcher so it cannot cover Chat or Leave; an open widget keeps
   its own panel and controls. This rule does not apply outside a meeting. */
html.calls-matte body:has(.in-call .toolbar [data-action="sabian"]:not([hidden]):not(:disabled)) .sb-chat:not(:has(.sb-panel:not([hidden]))) .sb-launch {
  display: none !important;
}



/* 2026-11-27: Calls mobile viewport and history geometry.
   The native bridge already adds body safe-area padding. A second 100dvh
   child previously extended past that padded body, causing iPhone scrolling,
   a moving header, and a cut-off Leave button. Apply the inset exactly once
   to controls, not to the full-bleed media scene. */
@media (max-width:800px), (pointer:coarse) and (max-height:560px) {
  html {
    --calls-safe-top: max(env(safe-area-inset-top,0px),var(--sabsus-safe-top,0px));
    --calls-safe-bottom: max(env(safe-area-inset-bottom,0px),var(--sabsus-safe-bottom,0px));
    --calls-safe-left: max(env(safe-area-inset-left,0px),var(--sabsus-safe-left,0px));
    --calls-safe-right: max(env(safe-area-inset-right,0px),var(--sabsus-safe-right,0px));
  }
  html body.calls-scene-page:has(#app > :is(.studio-lobby-shell,.in-call)),
  html body.calls-cabinet-page {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  html:has(#app > .shell.in-call):not(.calls-video-focus),
  html:not(.calls-video-focus) body.calls-scene-page:has(#app > .shell.in-call) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
  }
  html:not(.calls-video-focus) body:has(#app > .shell.in-call) > #app {
    position: relative;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
  html:not(.calls-video-focus) body #app > .shell.in-call {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    --room-top-space: calc(var(--calls-safe-top) + 104px);
    --room-bottom-space: calc(var(--calls-safe-bottom) + 138px);
  }
  html:not(.calls-video-focus) body #app .in-call > .ux-topbar {
    top: calc(var(--calls-safe-top) + 8px);
    left: max(12px,var(--calls-safe-left));
    right: max(12px,var(--calls-safe-right));
    bottom: auto;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas: "account brand" "summary summary";
    gap: 6px 8px;
    align-items: center;
  }
  html:not(.calls-video-focus) body #app .in-call .ux-topbar > .header-right {
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    padding: 2px 4px !important;
    gap: 2px;
    box-sizing: border-box;
  }
  html:not(.calls-video-focus) body #app .in-call .ux-topbar > .brand {
    min-width: 0;
    max-width: 100%;
    padding: 0 !important;
  }
  html:not(.calls-video-focus) body #app .in-call .room-call-summary {
    min-height: 32px;
    max-width: 100%;
    padding: 4px 10px;
    box-sizing: border-box;
  }
  html:not(.calls-video-focus) body #app .in-call .call-content {
    left: max(10px,var(--calls-safe-left));
    right: max(10px,var(--calls-safe-right));
    min-height: 0;
  }
  html:not(.calls-video-focus) body #app .in-call .toolbar.room-dock {
    position: absolute;
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    grid-auto-rows: 54px;
    gap: 4px !important;
    left: max(12px,var(--calls-safe-left));
    right: max(12px,var(--calls-safe-right));
    bottom: calc(var(--calls-safe-bottom) + 8px);
    width: auto;
    max-width: none;
    transform: none;
    margin: 0;
    padding: 6px;
    box-sizing: border-box;
    border-radius: 26px;
    align-items: stretch;
  }
  html:not(.calls-video-focus) body #app .in-call .room-dock > .tool,
  html:not(.calls-video-focus) body #app .in-call .room-dock .room-more-toggle {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 54px;
    min-height: 54px;
    padding: 5px 2px;
    margin: 0;
    border-radius: 18px !important;
    box-sizing: border-box;
    gap: 4px;
  }
  html:not(.calls-video-focus) body #app .in-call .room-dock > .tool > span,
  html:not(.calls-video-focus) body #app .in-call .room-dock .room-more-toggle > span {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
  }
  html:not(.calls-video-focus) body #app .in-call .room-dock > .tool > .icon,
  html:not(.calls-video-focus) body #app .in-call .room-dock .room-more-toggle > .icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }
  /* With all nine actions visible, the destructive action fills the
     remaining two cells instead of leaving a stranded empty cell. */
  html:not(.calls-video-focus) body #app .in-call .room-dock:has(> [data-action=sabian]:not([hidden])) > [data-action=leave] {
    grid-column: span 2;
  }
  html:not(.calls-video-focus) body #app .in-call .room-dock > .room-more { position: static; min-width: 0; }
  html:not(.calls-video-focus) body #app .in-call .room-dock .room-more-menu {
    right: 8px;
    bottom: calc(100% + 8px);
    width: min(250px,calc(100% - 16px));
    max-height: max(100px,calc(100dvh - var(--calls-safe-top) - var(--room-bottom-space) - 20px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* The lobby has two non-overlapping rows. Profile/language and Call
     occupy the first; all standalone utilities use the second. */
  html body #app .studio-lobby-shell .ux-topbar {
    top: calc(var(--calls-safe-top) + 8px);
    left: max(12px,var(--calls-safe-left));
    right: max(12px,var(--calls-safe-right));
    bottom: auto;
    gap: 8px;
    min-height: 48px;
    flex-wrap: nowrap;
  }
  html body #app .studio-lobby-shell .ux-topbar > .brand {
    min-width: 0;
    max-width: 44%;
    min-height: 44px;
    padding: 0 !important;
    margin: 0;
    flex-shrink: 0;
  }
  html body #app .studio-lobby-shell .ux-topbar > .header-right {
    min-width: 0;
    max-width: 56%;
    padding: 3px !important;
    gap: 2px;
    flex-wrap: nowrap;
    box-sizing: border-box;
  }
  html body #app .studio-lobby-shell .header-right .calls-cabinet-entry {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    padding-inline: 8px;
  }
  html body:has(.studio-lobby) .studio-utilities {
    top: calc(var(--calls-safe-top) + 64px);
    right: max(12px,var(--calls-safe-right));
    bottom: auto;
    gap: 8px;
    position: absolute;
    flex-direction: row;
  }
  html body:has(.studio-lobby) .cg-launch:not(.room-help) {
    position: absolute;
    top: calc(var(--calls-safe-top) + 64px);
    right: calc(max(12px,var(--calls-safe-right)) + 52px);
    bottom: auto;
  }
  html body:has(.studio-lobby):has(.studio-account-entry:not([hidden])) .cg-launch:not(.room-help) {
    right: calc(max(12px,var(--calls-safe-right)) + 104px);
  }
  html body:has(.studio-lobby) .sb-chat:not(:has(.sb-panel:not([hidden]))) {
    position: absolute !important;
    top: calc(var(--calls-safe-top) + 64px) !important;
    right: calc(max(12px,var(--calls-safe-right)) + 104px) !important;
    bottom: auto !important;
    left: auto !important;
  }
  html body:has(.studio-lobby):has(.studio-account-entry:not([hidden])) .sb-chat:not(:has(.sb-panel:not([hidden]))) {
    right: calc(max(12px,var(--calls-safe-right)) + 156px) !important;
  }
  html body #app .studio-lobby .preview-controls {
    left: max(12px,var(--calls-safe-left));
    right: max(12px,var(--calls-safe-right));
    bottom: calc(var(--calls-safe-bottom) + 8px);
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px 44px;
    gap: 4px;
    padding: 6px;
    box-sizing: border-box;
  }
  html body #app .studio-lobby .preview-controls .btn > span {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
  }
  html body #app .studio-lobby .preview-controls [data-action=test-speaker] > span {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
  }
  html body #app .studio-lobby-shell .prejoin.studio-lobby:has(#join-form) {
    padding-top: calc(var(--calls-safe-top) + 120px);
    padding-bottom: calc(var(--calls-safe-bottom) + 86px);
  }
  html body #app .studio-lobby .join-content:has(#join-form) {
    margin-top: auto;
  }
  /* The cabinet scrolls between the status bar and the fixed controls,
     instead of allowing rows to slide under the iPhone status bar/dock. */
  html body.calls-cabinet-page {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    --calls-cab-bottom: calc(var(--calls-safe-bottom) + 144px);
  }
  html body.calls-cabinet-page:has(.calls-workspace .cab-nav:not([hidden])) {
    --cw-utility-edge: max(12px,var(--calls-safe-right));
    --cw-utility-bottom: calc(var(--calls-safe-bottom) + 92px);
  }
  html body.calls-cabinet-page > #app {
    top: var(--calls-safe-top);
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }
  html body.calls-cabinet-page .cab-shell.calls-workspace {
    height: 100%;
    min-height: 0;
    padding-top: 8px;
    padding-left: max(12px,var(--calls-safe-left));
    padding-right: max(12px,var(--calls-safe-right));
    scrollbar-width: none;
  }
  html body.calls-cabinet-page .cab-shell.calls-workspace:has(.cab-nav:not([hidden])) {
    height: calc(100% - var(--calls-cab-bottom));
    padding-bottom: 12px;
    scroll-padding-bottom: 16px;
  }
  html body.calls-cabinet-page .calls-workspace .cab-nav {
    left: max(12px,var(--calls-safe-left));
    right: max(12px,var(--calls-safe-right));
    bottom: calc(var(--calls-safe-bottom) + 8px);
  }
  /* Every field occupies a grid cell in BOTH history modes. The old mobile
     absolute duration and avatar offsets competed for the same pixels. */
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(72px,auto);
    grid-template-rows: auto auto auto;
    min-height: 0;
    gap: 10px 9px;
    padding: 14px;
    align-items: center;
    box-sizing: border-box;
    border-radius: 20px;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > span {
    min-width: 0;
    max-width: 100%;
    position: static;
    inset: auto;
    margin: 0;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-title {
    grid-column: 1/3;
    grid-row: 1;
    gap: 10px;
    padding: 0;
    text-align: left;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-title > .icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 7px;
    box-sizing: border-box;
    border-radius: 12px;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-title > span {
    min-width: 0;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-title strong {
    font-size: 15px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-row-arrow {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-row-date {
    grid-column: 1/3;
    grid-row: 2;
    font-size: 12px;
    max-width: none;
    overflow-wrap: anywhere;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > .cw-duration {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    text-align: right;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cw-duration::before {
    content: attr(data-cw-label);
    display: block;
    font-size: 10px;
    margin: 0 0 3px;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > span[data-label] {
    grid-row: 3;
    text-align: left;
    align-self: center;
    overflow-wrap: anywhere;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > span[data-label]:nth-of-type(5) { grid-column: 1; }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > span[data-label]:nth-of-type(6) { grid-column: 2; }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > span[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    margin: 0 0 4px;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row .cab-badge {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 10px;
    line-height: 1.2;
    padding: 4px 7px;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row > .cab-avatars {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: end;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    width: max-content;
    max-width: none;
    padding: 0 0 1px 5px;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-avatars .cab-avatar {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    font-size: 9px;
    margin-left: -6px;
    border-width: 1px;
    box-sizing: border-box;
  }
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-avatars small {
    margin-left: 3px;
    white-space: nowrap;
  }
  /* Prevent a touch hover from lifting a card into its neighbors. */
  html body.calls-cabinet-page .calls-workspace[data-cw-layout] .cab-call-row:hover { transform: none; }
}
@media (max-width:800px) and (orientation:portrait) and (min-height:520px) {
  html:has(#app > .studio-lobby-shell .studio-lobby:not(:has(#join-form))),
  html body.calls-scene-page:has(#app > .studio-lobby-shell .studio-lobby:not(:has(#join-form))) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }
  html body #app:has(> .studio-lobby-shell .studio-lobby:not(:has(#join-form))) {
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
  }
  html body #app > .studio-lobby-shell:has(.studio-lobby:not(:has(#join-form))) {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
  }
  html body #app .studio-lobby-shell .prejoin.studio-lobby:not(:has(#join-form)) {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: calc(var(--calls-safe-top) + 120px) max(12px,var(--calls-safe-right)) calc(var(--calls-safe-bottom) + 84px) max(12px,var(--calls-safe-left));
    gap: 10px;
    box-sizing: border-box;
    overflow: hidden;
  }
  html body #app .studio-lobby .preview-card.glass,
  html body #app .studio-lobby .camera-preview { border-radius: 0; }
  html body #app .studio-lobby .studio-backdrop {
    height: 100%;
    max-height: none;
  }
  html body #app .studio-lobby:not(:has(#join-form)) .join-content {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
  }
  html body #app .studio-lobby.studio-home .join-content.studio-home-panel {
    margin: 0;
    padding: 14px 12px 12px;
  }
  html body #app .studio-lobby.studio-home .studio-editorial {
    flex: 0 1 auto;
    min-height: 0;
    margin: 0 6px;
    max-height: 40%;
    overflow: hidden;
  }
  html body #app .studio-lobby:is(.studio-preview-focus,:has(.camera-preview[data-live-camera=true])) .studio-editorial {
    display: none;
  }
  html body #app .studio-lobby:not(:has(#join-form)) .join-content h1 {
    font-size: clamp(26px,8vw,36px);
    line-height: 1.15;
    margin-bottom: 12px;
  }
  html body #app .studio-lobby:not(:has(#join-form)) .entry-hint { margin-bottom: 14px; }
  html body #app .studio-lobby:has(.studio-backdrop) .camera-off {
    inset: calc(var(--calls-safe-top) + 120px) auto auto 14px;
  }
}
@media (orientation:landscape) and (max-height:560px) and (pointer:coarse) {
  html:not(.calls-video-focus) body #app > .shell.in-call {
    --room-top-space: calc(var(--calls-safe-top) + 62px);
    --room-bottom-space: calc(var(--calls-safe-bottom) + 70px);
  }
  html:not(.calls-video-focus) body #app .in-call > .ux-topbar {
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    grid-template-areas: "account summary brand";
  }
  html:not(.calls-video-focus) body #app .in-call .toolbar.room-dock {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 3px !important;
  }
  html:not(.calls-video-focus) body #app .in-call .room-dock > :is(.tool,.room-more) {
    flex: 1 1 0;
    min-width: 0;
  }
  html:not(.calls-video-focus) body #app .in-call .room-dock > .tool,
  html:not(.calls-video-focus) body #app .in-call .room-dock .room-more-toggle {
    height: 48px;
    min-height: 48px;
  }
  html body.calls-cabinet-page { --calls-cab-bottom: calc(var(--calls-safe-bottom) + 88px); }
  html body.calls-cabinet-page:has(.calls-workspace .cab-nav:not([hidden])) { --cw-utility-bottom: calc(var(--calls-safe-bottom) + 80px); }
}
