*{box-sizing:border-box}body{margin:0;background:#f7f7fa;color:#22212c;font:16px Inter,Arial,sans-serif}header{height:78px;background:white;border-bottom:1px solid #e2e1e8;padding:0 6vw;display:flex;align-items:center;justify-content:space-between}header b{font-size:23px;letter-spacing:-1px}.logo,.icon{display:inline-grid;place-items:center;background:#6e51e5;color:white;border-radius:12px;width:38px;height:38px;margin-right:6px;font-style:normal}header span,.detail span,p{color:#6a6875}main{max-width:1280px;margin:auto;padding:60px 5vw}.eyebrow{font-size:12px;letter-spacing:.16em;font-weight:700;color:#7161ac}h1{font-size:clamp(36px,5vw,64px);letter-spacing:-.065em;margin:14px 0 6px}h1 span{color:#8460ed}p{line-height:1.55;margin:8px 0 24px}section{display:grid;grid-template-columns:1.95fr 1fr;gap:22px;margin-top:34px}article,aside{border:1px solid #e1dfe8;background:white;border-radius:22px;overflow:hidden}.stage{background:#19152a;position:relative;height:clamp(290px,32vw,445px);isolation:isolate;overflow:hidden}.ribbons{position:absolute;inset:0;background:repeating-radial-gradient(ellipse 94% 135% at 0% 119%,transparent 26%,#8270b82b 26.2%,transparent 26.6%,transparent 29%),radial-gradient(ellipse at 7% 98%,#886cbb 0%,#584675 25%,transparent 55%),radial-gradient(ellipse at 100% 0%,#5d4b7b,transparent 54%),#211b32}.badge,.you{position:absolute;background:#201c30b5;color:#fff;padding:8px 13px;border-radius:20px;font-size:13px}.badge{top:18px;left:18px}.you{bottom:16px;left:17px}.identity{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:14px;color:#eae5fa}.avatar{display:grid;place-items:center;width:84px;height:84px;border-radius:50%;background:#c3b5e13b;border:1px solid #ffffff39;font-size:34px}.identity strong{font-size:14px;font-weight:500}video{position:absolute;width:100%;height:100%;object-fit:cover}video.mini{width:25%;height:25%;right:12px;bottom:12px;z-index:2;border-radius:10px}footer{padding:16px;display:flex;justify-content:center;gap:10px}button,input{font:inherit;border-radius:10px;border:1px solid #dddbe5;background:white;color:inherit;padding:12px 16px}button{cursor:pointer;font-weight:600}button:hover{filter:brightness(.95)}aside{padding:30px;align-self:start}.icon{background:#eee9ff;color:#6849d5;font-size:28px}h2{letter-spacing:-.045em;font-size:30px;margin:20px 0 4px}.primary{background:#674bd8;color:white;border:none}aside button,input{width:100%;margin-bottom:9px}hr{border:0;border-top:1px solid #e8e6ef;margin:20px 0}.detail{display:flex;justify-content:space-between;font-size:14px;margin:14px 0}.detail b{font-weight:550}#status{margin:12px 0 0;font-size:14px}[hidden]{display:none!important}@media(max-width:760px){main{padding:36px 5vw}section{grid-template-columns:1fr}aside{padding:22px}.stage{height:300px}header{height:62px}}
:root{color-scheme:dark}body,header,article,aside,.stage,footer{background:#000;color:#fafafa}header,article,aside,hr{border-color:#303034}header span,.detail span,p{color:#bbb9c2}.identity{color:#ddd}button,input,.badge,.you{background:#111;color:#eee;border-color:#444}.primary{background:#7457dd;color:white}.icon{background:#211a32;color:#c5b4ff}.eyebrow,a{color:#bca8ff}#devices{position:absolute;bottom:40px;left:12px;right:12px;margin:0;text-align:center;background:#000;color:white}#devices:empty{display:none}
#archive{margin-top:32px;border-top:1px solid #333}#files a{display:block;padding:10px 0}#notice{color:#ddd;font-size:14px}#recStatus:empty{display:none}

#notice{font-size:14px;margin:0 0 12px}
main{max-width:1000px;margin:auto}#title{text-align:center;color:#fff;font-size:clamp(30px,5vw,56px);margin:0 0 30px}section{display:block;margin:0}.actions{text-align:center;margin:20px auto}.actions button{margin:4px}.actions input{max-width:420px}.stage{height:clamp(275px,49vh,540px)}#logout{margin-top:22px}#live input{display:block;margin:8px auto}
.entry{max-width:360px;margin:40px auto;text-align:center}.entry label{display:block;font-size:22px;font-weight:600;margin-bottom:16px}.entry input,.entry button{width:100%}.entry p{font-size:14px}.request{padding:16px;border:1px solid #444;border-radius:14px;margin-bottom:12px}.request strong{display:block;margin-bottom:10px}.request button{margin-right:8px}

.stage{height:auto;aspect-ratio:16/9}.stage video{object-fit:contain;background:#000}.stage video.mini{height:auto;max-height:32%;width:24%;border-radius:8px}@media(max-width:600px) and (orientation:portrait){.stage{aspect-ratio:3/4}}
#chat{border-top:1px solid #333;padding:14px 16px}#chat h2{font-size:16px;margin:0 0 10px;letter-spacing:0}#messages{max-height:180px;overflow-y:auto;overflow-wrap:anywhere}#messages p{margin:0 0 8px;color:#ddd}#messages strong{color:#bca8ff;margin-right:4px}#chatForm{display:flex;gap:8px}#chatForm input{min-width:0;margin:0}#chatStatus{font-size:14px}
.stage .tools{display:flex;gap:10px;position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:5}.tools button{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:10px;border-radius:50%;background:#25252bdf;color:white}.tools svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tools [aria-pressed=false]:after{content:"";position:absolute;width:26px;height:2px;background:currentColor;transform:rotate(45deg);box-shadow:0 1px #333}.stage .mini{bottom:72px!important}.stage.group #remote,.stage.group #remote2{width:50%;height:100%;top:0;left:0}.stage.group #remote2{left:50%}.stage:fullscreen,.stage.expanded{width:100%;height:100%;aspect-ratio:auto;background:#000}.stage.expanded{position:fixed;inset:0;z-index:999}.stage video{transform:none;object-fit:contain}@media(orientation:portrait){.stage.group #remote,.stage.group #remote2{width:100%;height:50%;left:0}.stage.group #remote2{top:50%}}
.mobileActions{display:none}
@media (max-width:760px),(pointer:coarse) and (max-height:600px){
 body.guestActive{overflow:hidden}
 .guestActive #stage{position:fixed;inset:0;z-index:30;background:#000}
 .guestActive #stage article,.guestActive #stage .stage{width:100%;height:100%;max-height:none;aspect-ratio:auto;border:0;border-radius:0}
 .guestActive .mobileActions{display:flex;position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));gap:8px;z-index:6}
 .mobileActions button{padding:8px 14px;border-radius:24px;background:#26262bdd}.mobileActions #mobileLeave{background:#a32233}
 .guestActive #chat{display:none}.guestActive.chatOpen #chat:not([hidden]){display:block;position:absolute;z-index:8;bottom:72px;left:8px;right:8px;background:#111;border-radius:14px}
 .guestActive .badge{top:max(12px,env(safe-area-inset-top))}
 .guestActive .actions #status:not(:empty){position:fixed;z-index:32;top:58px;left:12px;font-size:13px;pointer-events:none}
}
#selfTile{position:absolute;inset:0;overflow:hidden;touch-action:manipulation}
.stage #selfTile video{inset:0!important;width:100%;height:100%;max-height:none;border-radius:0}
#selfTile span{position:absolute;bottom:3px;left:6px;font-size:12px;color:white;text-shadow:0 1px 4px black}
.cornerActions{position:absolute;top:max(12px,env(safe-area-inset-top));right:12px;z-index:7}
.guestActive:has(.mobileActions) .cornerActions{right:84px}
#chatToggle,.mobileActions button{background:#28282ee8;padding:8px 14px;border-radius:24px;color:white}
.stage #chat,.guestActive.chatOpen .stage #chat:not([hidden]),#selfOptions{display:block;position:absolute;z-index:10;inset:auto 10px 70px auto;width:min(350px,calc(100% - 20px));border:1px solid #444;border-radius:14px;background:#121216f5;color:white;padding:14px;box-sizing:border-box}
.stage #chat[hidden],#selfOptions[hidden]{display:none!important}
#chatClose{position:absolute;right:6px;top:3px;background:none;border:0;font-size:21px}
#selfOptions button{font-size:14px;padding:8px;margin:5px 2px}
#selfOptions strong{display:block}#selfMirror[aria-pressed=true]{background:#58429d}
.demo #remote{background:radial-gradient(ellipse at 40% 40%,#514d61,#252330 60%,#111118)}
.demo #selfTile video{background:linear-gradient(140deg,#8c8a99,#464352)}

.stage {
 display: flex;
 flex-direction: column;
 height: auto;
 aspect-ratio: auto;
 background: #151519;
}
.picture {
 position: relative;
 flex: 1 1 auto;
 min-height: 0;
 aspect-ratio: 16 / 9;
 overflow: hidden;
 isolation: isolate;
 background: #000;
}
#selfTile.insetTile {
 inset: 62px 12px auto auto;
 width: clamp(84px, 25%, 220px);
 height: 28%;
 min-height: 64px;
 z-index: 4;
 border: 1px solid #777;
 border-radius: 12px;
 background: #151515;
 cursor: grab;
 touch-action: none;
}
#selfTile.insetTile.large { width: 44%; height: 44%; }
#selfTile.insetTile.placed { inset: var(--tile-y) auto auto var(--tile-x); }
#selfTile.insetTile video { object-fit: cover; }
#selfTile.cameraOff:not(.insetTile), #selfTile.cameraOff video { visibility: hidden; }
#selfTile.cameraOff.insetTile::before {
 content: 'Camera off';
 position: absolute;
 inset: 0;
 display: grid;
 place-items: center;
 padding-bottom: 12px;
 color: #ddd;
 font-size: .875rem;
}
.stage .tools {
 position: static;
 transform: none;
 justify-content: center;
 padding: 8px 12px;
 border-top: 1px solid #333;
}
.stage #chat:not([hidden]), .guestActive .stage #chat:not([hidden]) {
 display: block;
 position: static;
 width: auto;
 background: #151519;
 border: 0;
 border-top: 1px solid #333;
 border-radius: 0;
 padding: 8px 12px max(8px, env(safe-area-inset-bottom));
}
.stage #messages { max-height: min(15dvh, 100px); display: block; }
.stage #messages p { color: #eee; margin: 0 0 6px; }
.stage #chatForm input, .stage #chatForm button { padding: 10px 12px; }
.stage #chatStatus:empty { display: none; }
.demo .picture::after {
 content: 'Example video';
 position: absolute;
 inset: 0;
 display: grid;
 place-items: center;
 color: #ddd;
 pointer-events: none;
}
.stage:fullscreen .picture, .stage.expanded .picture { aspect-ratio: auto; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 600px) {
 .guestActive .picture { aspect-ratio: auto; }
 .guestActive .actions #status:not(:empty) { top: 54px; left: 12px; right: 32%; }
 #selfTile.insetTile { inset-block-start: max(62px, calc(env(safe-area-inset-top) + 50px)); }
 #selfTile.insetTile.placed { inset-block-start: var(--tile-y); }
}

.previewControls {
 display: flex;
 justify-content: center;
 flex-wrap: wrap;
 gap: 8px;
 padding: 8px 12px;
 text-align: center;
}
.previewControls p { flex-basis: 100%; margin: 0; font-size: .875rem; }
.previewControls p:empty { display: none; }
.previewCalling.demo .picture::after, .previewCalling .mobileActions { display: none; }
.previewAvatar {
 position: absolute;
 inset: 0;
 display: grid;
 align-content: center;
 justify-items: center;
 gap: 14px;
 background: radial-gradient(ellipse at center, #34365c, #10101a 75%);
 color: #efedf9;
}
.previewFace {
 position: relative;
 width: clamp(56px, 30%, 120px);
 aspect-ratio: 1;
 border-radius: 45%;
 background: #9b8bdc;
 box-shadow: 0 0 32px #9582e466;
}
.previewFace::before, .previewFace::after {
 content: '';
 position: absolute;
 top: 38%;
 width: 10%;
 height: 13%;
 border-radius: 50%;
 background: #262140;
}
.previewFace::before { left: 28%; }
.previewFace::after { right: 28%; }
.previewFace i {
 position: absolute;
 top: 64%;
 left: 42%;
 width: 16%;
 height: 6%;
 border-radius: 50%;
 background: #262140;
}
.previewAvatar.speaking i { animation: preview-mouth .25s alternate infinite; }
@keyframes preview-mouth { to { height: 14%; } }
@media (prefers-reduced-motion: reduce) {
 .previewAvatar.speaking i { animation: none; height: 14%; }
}

.previewAvatar .previewFace {
 background: radial-gradient(circle at 36% 25%, #d4c7fb, #9c8bda 72%);
 animation: preview-idle 5s ease-in-out infinite;
}
.previewAvatar .previewFace::before,
.previewAvatar .previewFace::after {
 animation: preview-blink 5s infinite;
}
.previewAvatar.speaking .previewFace {
 animation: preview-nod .6s ease-in-out infinite alternate;
}
@keyframes preview-idle { 50% { transform: translateY(-4px) rotate(2deg); } }
@keyframes preview-blink { 47%, 51% { transform: scaleY(1); } 49% { transform: scaleY(.12); } }
@keyframes preview-nod { to { transform: translateY(-3px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) {
 .previewAvatar .previewFace,
 .previewAvatar .previewFace::before,
 .previewAvatar .previewFace::after,
 .previewAvatar.speaking .previewFace { animation: none; }
}

.roomAgentControls {display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 12px}
.roomAgentControls p {flex-basis:100%;text-align:center;margin:0;font-size:.875rem}
.roomAgentControls p:empty {display:none}
.roomAgentControls select,.previewControls select {font:inherit;color:inherit;background:#25252b;padding:8px;border:1px solid #555;border-radius:10px}
.roomAgentTile {position:absolute;left:12px;bottom:12px;z-index:3;width:clamp(90px,28%,225px);aspect-ratio:4/3;border:1px solid #777;border-radius:12px;overflow:hidden;background:#202025}
.stage .roomAgentTile video {inset:0;object-fit:cover}
.roomAgentTile span {position:absolute;bottom:5px;left:5px;padding:3px 6px;border-radius:6px;background:#16161cde;color:#fff;font-size:.75rem}

.demo.previewCalling #remote {background:#101014}
@media (min-width:761px) {
 body.demo {overflow:auto}
 body.demo main {width:min(100%,1250px);max-width:none;padding:14px 20px 20px}
 body.demo #title,body.demo .actions:has(#status:empty) {display:none}
 body.demo .picture {flex:none;height:clamp(270px,calc(100dvh - 190px),690px);aspect-ratio:auto}
 body.demo .stage:fullscreen .picture,body.demo .stage.expanded .picture {flex:1;height:auto}
 body.demo #selfTile.insetTile {width:clamp(110px,20%,240px);height:28%}
}
@media (max-width:760px) and (orientation:portrait) {
 body.demo.previewCalling #remote {object-fit:contain}
 body.demo .previewControls {padding:6px 8px}
}

/* Shared white-card theme for the join screen, host panel and call. */
:root {color-scheme:light}
body,html {min-height:100%;background:radial-gradient(ellipse at 50% 110%,#e4e4e4,transparent 65%),#f6f6f6;color:#191919}
main {color:#191919;padding:clamp(18px,4vw,44px) clamp(12px,3vw,28px)}
#title,.signIn h1 {color:#191919;letter-spacing:-.065em;font-weight:670}
#title {margin-bottom:19px}
a {color:#333;text-underline-offset:3px}
p,#notice {color:#595959}
article,.entry,.signIn form,#queue,#archive {
 background:#fff;color:#191919;border:1px solid #fff;border-radius:29px;
 box-shadow:0 16px 40px #00000014,0 2px 9px #00000007;
}
body[data-view=admin] article {padding:11px}
.entry {padding:clamp(18px,5vw,32px);text-align:left;margin:24px auto}
.entry label {margin-bottom:9px;font-size:1rem}
.entry p {margin:2px 0 16px}
.signIn {max-width:510px}
.signIn form {padding:clamp(15px,4vw,25px)}
.signIn form p {margin:0 0 10px}
.signIn form input {display:block;margin-top:4px}
#queue {padding:14px 16px;margin:13px 0}
#archive {padding:16px;margin-top:18px}
.request {border-color:#e3e3e3;background:#f6f6f6;margin:8px 0 0}
button,input,select {background:#f3f3f3;color:#252525;border-color:#dedede}
input {background:#fff}
.primary,.entry .primary,#end,#mobileLeave {background:#222;color:#fff;border-color:#222}
button:focus-visible,input:focus-visible,select:focus-visible {outline:2px solid #525252;outline-offset:2px}
.stage {background:#fff;color:#202020}
.picture {border-radius:23px;background:#dedede}
.stage video,.demo.previewCalling #remote {background:#dedede}
.identity {color:#434343}
#selfTile.insetTile {border:2px solid #fff;border-radius:15px;box-shadow:0 3px 13px #0004}
#selfTile.insetTile video {background:#555}
.callHeading {
 position:absolute;z-index:5;top:12px;left:50%;transform:translateX(-50%);
 max-width:calc(100% - 150px);padding:5px 12px;text-align:center;
 background:#f7f7f7eb;color:#202020;border-radius:15px;pointer-events:none;
}
.callHeading strong {display:block;font-size:clamp(1rem,2vw,1.5rem);letter-spacing:-.045em;overflow-wrap:anywhere}
.callHeading strong:empty {display:none}
.callHeading .badge {position:static;display:block;border:0;background:none;color:#444;padding:2px 0;font-size:12px}
.stage .tools {border-color:#e6e6e6}
.tools button {border-radius:15px;background:#f3f3f3;color:#242424;border-color:#e5e5e5}
.tools [aria-pressed=false]:after {box-shadow:none;color:#7a3434}
.stage #chat:not([hidden]),.guestActive .stage #chat:not([hidden]) {background:#fff;color:#252525;border-color:#e6e6e6}
.stage #messages p {color:#444}
#messages strong {color:#262626}
.stage #chatStatus:not(:empty) {background:none;color:#7f3434}
#selfOptions {background:#fafafa;color:#252525;border-color:#ddd}
#selfMirror[aria-pressed=true] {background:#dedede}
.roomAgentControls select,.previewControls select {background:#f3f3f3;color:#252525;border-color:#dedede}
.previewAvatar {background:radial-gradient(ellipse at center,#efefef,#d2d2d2);color:#333}
.demo #remote:not([src]) {background:#dedede}
.demo .picture::after {color:#474747}
@media (min-width:761px) {
 body.guestActive #stage article {padding:12px}
}
@media (max-width:760px), (pointer:coarse) and (max-height:600px) {
 .guestActive #stage {background:#f6f6f6;padding:max(6px,env(safe-area-inset-top)) 6px max(6px,env(safe-area-inset-bottom))}
 .guestActive #stage article {padding:6px;background:#fff;border-radius:22px}
 .guestActive #stage .stage {border-radius:18px}
 .guestActive .picture {border-radius:16px}
 .guestActive .actions #status:not(:empty) {display:none}
 .callHeading {max-width:calc(100% - 130px);top:8px}
}

.recordingFilters {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 12px;margin:10px 0 14px}
.recordingFilters label {font-size:.875rem;font-weight:650}
.recordingFilters input {grid-column:1;grid-row:2;margin:0}
.recordingFilters select {grid-column:2;grid-row:2;font:inherit;border:1px solid #dedede;border-radius:11px;padding:8px;min-width:0}
.recordingDay {margin:6px 0;border:1px solid #e6e6e6;border-radius:13px;background:#fafafa}
.recordingDay summary {cursor:pointer;font-weight:650;padding:12px}
.recordingRow {display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-top:1px solid #e6e6e6;background:#fff}
.recordingRow strong,.recordingRow span {display:block;overflow-wrap:anywhere}
.recordingRow span {font-size:.875rem;color:#555}
#files .recordingRow a {padding:6px 0;white-space:nowrap;font-size:.875rem}
@media(max-width:460px){.recordingFilters{gap:6px}.recordingFilters input,.recordingFilters select{font-size:.875rem}}

.directInvitePanel {display:grid;justify-items:start;gap:8px;margin:0 0 12px}
.directInvitePanel input {max-width:590px;margin:0}
.directInvitePanel p {margin:0;font-size:.875rem}
.directInvitePanel p:empty {display:none}
#archive summary {cursor:pointer;font-size:1.05rem;font-weight:700}
#archive summary:focus-visible {outline:2px solid #525252;outline-offset:4px}
#archive[open] > summary {margin-bottom:12px}
#archive #recStatus:empty {display:none}

.recordingActions {display:flex;align-items:center;justify-content:end;gap:10px}
.recordingActions button {font-size:.875rem;padding:6px 10px;min-height:36px;white-space:nowrap}
.recordingPlayer {background:#fff;border-top:1px solid #e6e6e6;padding:10px 12px}
.recordingPlayer video {display:block;width:100%;max-height:60dvh;background:#191919;border-radius:10px}
.recordingPlayer p:empty {display:none}
.recordingPlayer p {margin:8px 0 0;font-size:.875rem}

body[data-view=admin] main {max-width:800px;padding:9px clamp(12px,3vw,24px) 18px}
.adminHeading {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
body[data-view=admin] #title {margin:0;font-size:.875rem;line-height:1.2;letter-spacing:.08em;text-align:left}
.adminHeading a {font-size:.875rem}
body[data-view=admin] .directInvitePanel {margin-bottom:6px}
body[data-view=admin] .directInvitePanel button {min-height:38px;padding:7px 12px;font-size:.875rem}
body[data-view=admin] #queue {padding:9px 13px;margin:7px 0;border-radius:16px}
body[data-view=admin] > main > .actions {margin:10px auto}

.roomActionRow {display:flex;align-items:center;justify-content:center;gap:7px}
.actions .directInvitePlus {width:42px;height:42px;padding:0;display:grid;place-items:center;font-size:1.55rem;line-height:1;border-radius:12px;font-weight:550}
.actions .directInvitePlus[aria-expanded=true] {background:#222;color:white;border-color:#222}
body[data-view=admin] .directInvitePanel {width:min(100%,420px);margin:7px auto 10px;padding:12px;text-align:left;background:#fff;border:1px solid #e4e4e4;border-radius:15px}
.directInvitePanel label {font-size:.875rem;font-weight:650}
.directInviteLink {display:flex;align-items:center;gap:6px;width:100%}
.directInviteLink input {flex:1;min-width:0;font-size:.875rem}
.recordingPlayer {width:100%;min-width:0;box-sizing:border-box}
.recordingPlayer video {
 position:static;display:block;inset:auto;width:min(100%,420px);height:auto;
 max-width:100%;max-height:min(42vh,260px);aspect-ratio:16/9;
 object-fit:contain;margin:0 auto;background:#141414;
}
.recordingPlayer video:fullscreen {width:100%;height:100%;max-width:none;max-height:none;border-radius:0}
.recordingFullscreen {display:block;margin:8px auto 0;padding:6px 11px;font-size:.875rem}

.adminHeading {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px}
body[data-view=admin] .adminHeading #title {grid-column:2;text-align:center}
.adminHeading .testCall {grid-column:3;justify-self:end;display:inline-flex;align-items:center;gap:5px;padding:4px 6px;font-weight:750;text-decoration:none;white-space:nowrap;border-radius:8px}
.adminHeading .testCall:hover {background:#e9e9e9}
.adminHeading .testCall svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

body[data-view=guest].guestActive main {padding-top:8px}

.stage.expanded {
 height: 100dvh;
 padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
 box-sizing: border-box;
}
.stage.expanded .picture { flex: 1 1 0; min-height: 0; }
body.guestActive #stage .stage.expanded { border-radius: 0; }

:root {
 --room-ink: #18232a;
 --room-surface: #f6f9fa;
 --room-line: #d5dfe3;
 --room-mint: #e0f4ea;
 --room-green: #1a5946;
}
html {
 color: var(--room-ink);
 background: radial-gradient(ellipse at 18% 0%, #eef7f4, transparent 55%),
  radial-gradient(ellipse at 82% 92%, #d7e1e9, transparent 68%), #e9eef1;
 background-repeat: no-repeat;
}
body { background: transparent; color: var(--room-ink); }
main, #title, .signIn h1 { color: var(--room-ink); }
article, .entry, .signIn form, #queue, #archive, body.guestActive #stage article {
 background: linear-gradient(145deg, #fff, #edf2f5);
 border-color: #ffffffed;
 box-shadow: 0 16px 40px #273e521c, inset 0 1px #fff;
}
.stage, .stage:fullscreen, .stage.expanded { background: var(--room-surface); }
.picture, .stage video, .demo.previewCalling #remote, .demo #remote:not([src]) { background: #dce5eb; }
.tools button, .request, .recordingDay, .roomAgentControls select, .previewControls select {
 background: #edf3f5; border-color: var(--room-line); color: var(--room-ink);
}
.stage .tools { border-color: var(--room-line); }
.callHeading { background: #f6faf9f5; color: var(--room-ink); }
.callHeading .badge { color: var(--room-green); }
.callHeading .badge:not(:empty)::before {
 content: ''; display: inline-block; width: .45em; height: .45em; margin-right: .45em;
 border-radius: 50%; vertical-align: .12em; background: #339879;
}
.primary, .entry .primary { background: #243640; border-color: #243640; }
.tools button:hover, .tools button[aria-pressed=true]:hover { background: var(--room-mint); }
button:focus-visible, input:focus-visible, select:focus-visible { outline-color: #26715a; }
@media (max-width:760px), (pointer:coarse) and (max-height:600px) {
 .guestActive #stage { background: #e5edf1; }
}

@media (max-width:760px), (pointer:coarse) {
 body.guestActive .stage:is(.expanded,:fullscreen) {
  padding: 0;
  background: #111c23;
 }
 body.guestActive .stage:is(.expanded,:fullscreen) .picture {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: #111c23;
 }
 body.guestActive .stage:is(.expanded,:fullscreen) #remote,
 body.guestActive .stage:is(.expanded,:fullscreen) #remote2 { object-fit: cover; }
 body.guestActive .stage:is(.expanded,:fullscreen) .tools {
  position: absolute;
  inset: auto 0 0;
  transform: none;
  border: 0;
  padding: 28px 8px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #101a24c9);
 }
 body.guestActive .stage:is(.expanded,:fullscreen) .tools button {
  border: 1px solid #ffffff40;
  border-radius: 50%;
  background: #20313de8;
  color: white;
 }
 body.guestActive .stage:is(.expanded,:fullscreen) .mobileActions {
  display: flex;
  right: max(10px, env(safe-area-inset-right));
  left: max(10px, env(safe-area-inset-left));
  justify-content: flex-end;
  pointer-events: none;
 }
 body.guestActive .stage:is(.expanded,:fullscreen) .mobileActions button { pointer-events: auto; }
 body.guestActive .stage:is(.expanded,:fullscreen) #chat:not([hidden]) {
  display: none;
  position: absolute;
  inset: auto 8px calc(66px + env(safe-area-inset-bottom));
  border: 1px solid var(--room-line);
  border-radius: 16px;
 }
 body.guestActive .picture.selfFocused #selfTile.insetTile {
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
 }
 body.guestActive .stage:not(.group) .picture.selfFocused #remote {
  inset: 62px 12px auto auto;
  width: clamp(84px, 25%, 150px);
  height: 28%;
  border-radius: 14px;
  object-fit: cover;
  z-index: 5;
  pointer-events: none;
 }
 body.guestActive .stage.group .picture.selfFocused #selfTile.insetTile {
  inset: 62px 12px auto auto;
  width: 42%;
  height: 42%;
  border-radius: 14px;
 }
}

body.guestActive:has(.stage.expanded) { overflow: hidden; }
@media (min-width:761px) and (pointer:fine) {
 body.guestActive .stage:is(.expanded,:fullscreen) .mobileActions {
  display: flex;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
 }
}


body.guestActive .stage:is(.expanded,:fullscreen) {
 --chat-bottom:calc(66px + env(safe-area-inset-bottom));
 --chat-bar-height:36px;
}
body.guestActive .stage:is(.expanded,:fullscreen) #chat:not([hidden]) {
 display:block;
 position:absolute;
 z-index:8;
 inset:auto max(12px,env(safe-area-inset-right)) var(--chat-bottom) max(12px,env(safe-area-inset-left));
 width:min(82%,300px);
 margin-inline:auto;
 padding:2px 3px;
 background:#102531bf;
 border:1px solid #d7ecff3d;
 border-radius:22px;
 color:#fff;
 backdrop-filter:blur(14px);
}
body.guestActive .stage:is(.expanded,:fullscreen) #chatForm {
 gap:6px;
}
body.guestActive .stage:is(.expanded,:fullscreen) #message {
 min-width:0;
 height:30px;
 padding:3px 8px;
 border:1px solid transparent;
 border-radius:999px;
 background:transparent;
 color:#fff;
}
body.guestActive .stage:is(.expanded,:fullscreen) #message::placeholder { color:#d4e4eb; }
body.guestActive .stage:is(.expanded,:fullscreen) #chatForm button {
 height:30px;
 padding:3px 9px;
 font-size:.875rem;
 border:0;
 border-radius:999px;
 background:#e8f4f8;
 color:#102531;
}
body.guestActive .stage:is(.expanded,:fullscreen) #messages { display:none; }
body.guestActive .stage:is(.expanded,:fullscreen) #messages p,
body.guestActive .stage:is(.expanded,:fullscreen) #messages strong,
body.guestActive .stage:is(.expanded,:fullscreen) #chatStatus { color:#fff; }
.picture #chatOverlay:not([hidden]) {
 display:block;
 position:absolute;
 z-index:9;
 inset:auto max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));
 width:fit-content;
 max-width:min(460px,calc(100% - 24px));
 margin-inline:auto;
 max-height:20svh;
 overflow:hidden;
 overflow-wrap:anywhere;
 padding:10px 13px;
 border:1px solid #d7ecff3d;
 border-radius:15px;
 background:#102531d9;
 color:#fff;
 pointer-events:none;
}
body.guestActive .stage:is(.expanded,:fullscreen) .mobileActions { gap:8px; }

body.guestActive #stage .stage.expanded {
 position:fixed;
 inset:0;
 z-index:999;
 width:100%;
 height:100dvh;
 max-height:none;
 padding:0;
 border:0;
 border-radius:0;
 background:#111c23;
}
body.guestActive #stage .stage.expanded .picture {
 position:absolute;
 inset:0;
 border-radius:0;
}
body.guestActive #stage .stage.expanded .tools {
 position:absolute;
 inset:auto 0 0;
 transform:none;
 border:0;
 padding:12px 8px max(12px,env(safe-area-inset-bottom));
 background:linear-gradient(transparent,#101a24c9);
}

.picture #chatOverlay:not([hidden]) {
 background:#102531ed;
 font-weight:600;
 line-height:1.4;
}

body.guestActive .stage:is(.expanded,:fullscreen) .picture #chatOverlay:not([hidden]) {
 inset-block-end:calc(var(--chat-bottom) + var(--chat-bar-height) + 6px);
 max-width:min(82%,300px);
 padding:6px 10px;
 font-size:.875rem;
}

body[data-view=guest] .mobileActions #mobileLeave {
 padding:5px 10px;
 min-height:32px;
 font-size:.875rem;
 background:#982832;
 border-color:#ffffff48;
}

body[data-view=guest].guestActive:not(.demo) .callHeading { display:none; }

.picture #recovery:not([hidden]) {position:absolute;z-index:15;top:max(54px,env(safe-area-inset-top));left:10px;max-width:calc(100% - 20px);display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:6px 8px 6px 12px;border-radius:14px;background:#17212bee;color:white;font:500 14px/1.35 system-ui;box-shadow:0 2px 8px #0003}
.picture #recovery button {min-height:36px;padding:6px 10px;border:0;border-radius:10px;background:#fff;color:#17212b;font:inherit}
