/* Call layout sized to the visible browser viewport, including the software keyboard. */
.call-shell.polish-call,.call-shell.polish-prejoin{height:var(--call-height,100dvh);min-height:0;position:fixed;top:var(--call-top,0);left:0;right:0;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}
.polish-call .call-body{position:relative;flex:1;min-height:0;overflow:hidden}
.polish-call .stage{flex:1;min-width:0;min-height:0;padding:4px;background:transparent;overflow:hidden}
.polish-call .participant-tile{position:relative;min-height:0!important;min-width:0!important;overflow:hidden;border-radius:12px;cursor:pointer;outline-offset:-3px}
.polish-call .participant-tile:focus-visible{outline:2px solid var(--text)}
.polish-call .standard-participant-tile{width:100%;height:100%;min-height:0;pointer-events:none}
.polish-call .standard-participant-tile video{width:100%;height:100%;object-fit:cover}
.polish-call .screen-tile .standard-participant-tile video{object-fit:contain}
.polish-call .tile-identity{pointer-events:none;max-width:calc(100% - 16px);bottom:8px;left:8px;white-space:nowrap;text-overflow:ellipsis}
.polish-grid{display:grid;height:100%;min-height:0;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr)}
.polish-grid[data-count="1"]{grid-template-columns:minmax(0,1fr)}
.polish-grid:has(>:nth-child(5)){grid-template-columns:repeat(3,minmax(0,1fr))}
.polish-grid:has(>:nth-child(10)){grid-template-columns:repeat(4,minmax(0,1fr))}
.polish-focus-layout{height:100%;min-height:0;display:flex;flex-direction:column;gap:10px}
.polish-filmstrip{display:flex;justify-content:safe center;flex:0 0 clamp(72px,17vh,132px);gap:8px;overflow-x:auto;overflow-y:hidden;min-height:0;scrollbar-width:thin}
.polish-call .polish-filmstrip>.participant-tile{flex:0 0 auto;width:auto;aspect-ratio:16/9;height:100%}
.polish-filmstrip .tile-identity{font-size:11px!important;padding:3px 5px!important}
.polish-main-tile{position:relative;flex:1;min-height:0;min-width:0;display:flex;gap:8px}
.polish-main-tile>.participant-tile{height:100%;width:100%;flex:1}
.polish-unpin{position:absolute;top:10px;left:10px;display:flex;align-items:center;gap:6px;padding:8px 12px;min-height:36px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:12px;color:var(--text)}
.polish-unpin svg{width:16px;height:16px}
.cameras-hidden .participant-tile:not(.screen-tile) video{visibility:hidden}
.polish-call .cameras-hidden .participant-tile:not(.screen-tile) .tile-initials{display:flex!important}
.polish-call #chat-form{display:flex;align-items:flex-end;gap:6px;margin:0;padding-top:12px;flex:none;min-width:0}
.polish-call #chat-text{flex:1;min-width:0;width:0;height:44px;min-height:44px;max-height:144px;resize:none;overflow-y:auto;font-size:16px;line-height:22px;padding:10px 12px;border-radius:12px;box-sizing:border-box;scroll-margin-block:12px}
.polish-call #chat-text:focus{outline:1px solid var(--text);outline-offset:1px}
.polish-call #chat-form>.icon-button{flex:0 0 38px;width:38px;height:44px}
.polish-call #chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
.polish-call #call-panel{min-height:0;overflow-y:auto}
.polish-call[data-panel="chat"] #call-panel{overflow:hidden;display:flex;flex-direction:column}
.polish-call .panel-heading{flex:none}.polish-call .panel-heading h2{font-size:18px}
.polish-call .call-error:empty{display:none}.polish-call .call-error{flex:none;max-height:58px;overflow:auto}
.polish-call input,.polish-call select,.polish-prejoin input,.polish-prejoin select{font-size:16px!important;max-width:100%;box-sizing:border-box}
.polish-call .polish-top-settings{width:36px!important;height:36px!important;min-width:36px!important;padding:7px!important;margin-left:8px}
.polish-more-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;order:2;margin-top:16px}
.polish-call .polish-more-controls .control{display:flex;width:100%!important;min-width:0!important;height:auto!important;min-height:48px;gap:8px;padding:10px!important;justify-content:flex-start;text-align:left;font-size:12px;margin:0}
.polish-more-controls .control svg{width:20px;height:20px;flex:none}
.polish-more-controls .control-caption{display:inline!important}
.polish-more-controls .control-count{position:static!important;margin-left:auto}
.polish-more-controls .control:not(:has(.control-caption)):after{content:attr(aria-label)}
.polish-device-notice{display:flex;align-items:center;gap:10px;padding:8px 16px;background:var(--panel);font-size:12px;flex:none}.polish-device-notice .button{flex:none}
.polish-mobile .call-top{height:44px!important;min-height:44px!important;padding:0 max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));gap:6px}
.polish-mobile .call-title{position:static;transform:none;margin:0 auto 0 0;min-width:0;max-width:none;font-size:12px}
.polish-mobile #call-clock{position:static;transform:none;font-size:11px;white-space:nowrap}
.polish-mobile .call-title>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.polish-mobile .call-body{padding:0 max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left))}
.polish-mobile .call-bottom{padding:8px 12px max(8px,env(safe-area-inset-bottom));min-height:0}
.polish-mobile .main-controls{display:flex;flex-wrap:nowrap!important;justify-content:center;gap:16px;padding:0}
.polish-mobile .main-controls>.control{width:48px!important;height:48px!important;min-width:48px!important;padding:12px!important;margin:0!important;flex:none;position:relative}
.polish-mobile .main-controls .control-caption{display:none!important}
.polish-mobile .main-controls .control-count{position:absolute;right:0;top:0}
.polish-mobile .polish-grid{gap:6px}
.polish-mobile .polish-grid[data-count="2"]{grid-template-columns:minmax(0,1fr)}
.polish-mobile .polish-filmstrip{flex-basis:82px;gap:6px}
.polish-mobile .polish-focus-layout{gap:6px}
.polish-mobile #call-panel{position:absolute;inset:0 6px;width:auto;max-width:none;min-width:0;margin:0;padding:14px;border-radius:12px;z-index:10;box-sizing:border-box}
.polish-mobile .record-reminder{font-size:11px;max-height:90px;overflow:auto;padding:8px}
.polish-mobile .record-reminder .button{font-size:11px;padding:6px}
.polish-mobile .tile-pager{position:absolute;bottom:5px;left:50%;transform:translateX(-50%)}
@media(orientation:landscape){.polish-mobile .polish-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.polish-mobile .polish-focus-layout{flex-direction:row}.polish-mobile .polish-filmstrip{order:2;flex:0 0 132px;flex-direction:column;overflow-y:auto;overflow-x:hidden;justify-content:safe center}.polish-mobile .polish-filmstrip>.participant-tile{width:100%;height:auto;min-height:64px!important;aspect-ratio:16/9;flex:0 0 auto}.polish-mobile .call-top{height:34px!important;min-height:34px!important}.polish-mobile .call-bottom{padding-top:4px;padding-bottom:max(4px,env(safe-area-inset-bottom))}.polish-mobile .main-controls>.control{width:44px!important;height:44px!important;min-width:44px!important;padding:10px!important}}
/* Compact prejoin with device controls in an explicit settings dialog. */
.call-shell.polish-prejoin{overflow-y:auto;padding-bottom:max(16px,env(safe-area-inset-bottom))}
.polish-prejoin .call-top{min-height:48px;flex:none;padding:0 16px;gap:10px}
.polish-prejoin .call-top>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.polish-prejoin-card{width:min(860px,calc(100% - 32px));margin:auto;flex:none;padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:24px;box-sizing:border-box}
.polish-prejoin .preview-camera{width:100%;height:min(50vh,440px);aspect-ratio:auto;min-height:180px;border:0;border-radius:16px;background:var(--panel);position:relative;overflow:hidden}
.polish-prejoin .preview-camera video{width:100%;height:100%;object-fit:cover}
.polish-prejoin .preview-avatar{width:clamp(96px,20vh,180px);height:clamp(96px,20vh,180px);font-size:clamp(36px,8vh,64px)}
.polish-prejoin .preview-name{bottom:18px;left:50%;transform:translateX(-50%);font-size:18px;text-align:center;white-space:nowrap;max-width:90%;overflow:hidden;text-overflow:ellipsis}
.polish-prejoin-identity{padding:12px 16px;display:flex;flex-direction:column;gap:12px;align-items:center}.polish-prejoin-identity .guest-name{width:min(360px,100%);font-size:13px}.polish-prejoin-identity input{width:100%;margin-top:6px}.polish-prejoin-identity .prejoin-count{font-size:12px;text-align:center}
.polish-prejoin-controls{display:flex;align-items:center;gap:8px;padding:8px 12px;min-width:0}
.polish-prejoin-controls>.control{width:48px!important;height:48px!important;min-width:48px!important;padding:12px!important;flex:none}
.polish-prejoin-controls .join-button{width:auto!important;min-width:0!important;flex:1;max-width:360px;margin:0 auto;height:48px;justify-content:center;font-size:15px}
.polish-prejoin .call-error{margin:0;padding:0 12px;font-size:13px}.polish-prejoin .call-error:empty{display:none}
.polish-modal-backdrop{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:16px;background:#101212b3;box-sizing:border-box}
.polish-modal{width:min(680px,100%);max-height:100%;overflow:auto;border:1px solid var(--line);border-radius:20px;padding:24px;background:var(--panel);box-sizing:border-box}
.polish-modal .panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.polish-modal h2{font-size:18px;margin:0}
.polish-modal .device-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}.polish-modal .device-panel section{background:transparent;border:0;padding:0}.polish-modal .section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.polish-modal .device-panel label{display:flex;flex-direction:column;gap:8px}.polish-modal select{width:100%;min-width:0;overflow:hidden}.polish-modal .meter{margin-top:12px}.polish-modal .muted{font-size:13px}
@media(max-width:650px){.polish-prejoin-card{width:calc(100% - 20px);border-radius:18px;padding:8px}.polish-prejoin .preview-camera{height:38vh;min-height:160px}.polish-prejoin-controls{gap:6px;padding:8px 0}.polish-prejoin-controls>.control{width:42px!important;height:44px!important;min-width:42px!important;padding:10px!important}.polish-prejoin-controls .join-button{height:44px;font-size:13px;padding:8px}.polish-prejoin-controls .join-button svg{display:none}.polish-modal{padding:18px}.polish-prejoin .preview-name{font-size:16px}}
@media(max-height:500px) and (orientation:landscape){.polish-prejoin-card{max-width:740px}.polish-prejoin .preview-camera{height:140px;min-height:140px}.polish-prejoin .preview-avatar{width:80px;height:80px;font-size:32px}.polish-prejoin .preview-name{bottom:8px;font-size:14px}.polish-prejoin-identity{padding:6px}.polish-prejoin-controls{padding:4px}}
.call-shell .polish-more-controls .control-caption{display:inline!important}
.call-shell .polish-more-controls{order:0;flex:none;margin:0 0 18px}
