/* Graphite call scene. Media streams and call actions stay in their owners. */
body.workspace-design.graphite-interface .graphite-voice-stage{grid-template-rows:56px 0 minmax(0,1fr) 78px}
body.workspace-design.graphite-interface .graphite-voice-stage>.stream-toolbar{visibility:hidden;overflow:hidden;min-height:0;padding:0 20px;border:0;gap:10px;background:var(--bg)}
body.workspace-design.graphite-interface .graphite-voice-stage .stage-body{background:var(--bg);margin:0;border-radius:0}
body.workspace-design.graphite-interface .graphite-voice-stage .stage-header{min-height:56px;padding:0 18px;gap:9px;border-bottom:1px solid var(--line)}
body.workspace-design.graphite-interface .graphite-voice-stage .stage-title{font-size:16px;font-weight:600}
body.workspace-design.graphite-interface .graphite-voice-stage .stage-subtitle{font-size:11px;color:var(--muted)}
body.workspace-design.graphite-interface .graphite-voice-stage .room-glyph{width:28px;height:28px;border:0;border-radius:0;background:transparent;color:var(--muted)}
body.workspace-design.graphite-interface .graphite-voice-stage .room-glyph svg{width:23px;height:23px}
body.workspace-design.graphite-interface .community-call-actions{gap:4px}
body.workspace-design.graphite-interface .community-call-actions button:is([data-call-chat],[data-call-members]){width:34px;min-height:34px;padding:6px;background:transparent;border:0;color:var(--muted)}
body.workspace-design.graphite-interface .community-call-actions button:is([data-call-chat],[data-call-members])[aria-pressed=true]{color:var(--accent);background:var(--panel-soft)}

/* Gallery and focus retain the original stream and keyboard handlers. */
body.workspace-design.graphite-interface .graphite-voice-stage .call-media-grid{inset:12px 16px;gap:10px}
body.workspace-design.graphite-interface .call-source-tile{border:1px solid var(--line);border-radius:10px;background:var(--panel);box-shadow:0 4px 18px #0003;transition:border-color .15s,box-shadow .15s}
body.workspace-design.graphite-interface .call-source-tile:is(:hover,:focus-visible){border-color:var(--accent)}
body.workspace-design.graphite-interface .call-source-tile.call-tile-focused{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),0 10px 28px #0005}
body.workspace-design.graphite-interface .call-source-tile:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
body.workspace-design.graphite-interface .call-source-label{padding:28px 14px 11px;color:#fff;font-size:12px;font-weight:600;background:linear-gradient(transparent,#000c)}
body.workspace-design.graphite-interface .call-source-tile::after{content:attr(data-focus-tip);position:absolute;top:9px;right:9px;max-width:calc(100% - 18px);padding:6px 9px;border:1px solid #ffffff32;border-radius:6px;background:#12191ddd;color:#e9f2ee;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transform:translateY(-3px);pointer-events:none;transition:opacity .12s,transform .12s}
body.workspace-design.graphite-interface .call-source-tile:has(>.call-source-tools)::after{right:48px;max-width:calc(100% - 58px);box-sizing:border-box}
body.workspace-design.graphite-interface .call-source-tile:is(:hover,:focus-visible)::after{opacity:1;transform:none}
body.workspace-design.graphite-interface .call-source-tile:fullscreen::after{display:none}
body.workspace-design.graphite-interface .call-thumbnail-row .call-source-tile{box-sizing:border-box}
body.workspace-design.graphite-interface .call-thumbnail-row .call-source-label{padding:14px 8px 5px;font-size:10px;font-weight:500}

/* Compact, keyboard accessible call controls with hover and focus labels. */
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock{gap:12px;padding:10px 16px;border-top:1px solid var(--line);background:var(--bg);overflow:visible}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item{position:relative;gap:0;min-width:44px}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item>span{display:none}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item[data-call-tip]::after{content:attr(data-call-tip);position:absolute;z-index:10;left:50%;bottom:calc(100% + 9px);transform:translate(-50%,3px);padding:7px 10px;border:1px solid var(--line);border-radius:7px;background:var(--panel-soft);color:var(--text);font-size:11px;white-space:nowrap;opacity:0;pointer-events:none;box-shadow:0 7px 20px #0006;transition:opacity .12s,transform .12s}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item[data-call-tip]:is(:hover,:focus-within)::after{opacity:1;transform:translate(-50%,0)}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn{width:44px;height:44px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text)}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn svg{width:21px;height:21px}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock #start-screen-btn{width:52px;border-color:var(--accent);border-radius:12px;background:var(--accent);color:var(--bg)}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn[aria-pressed=true]{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 10%,var(--panel))}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn.voice-control-active{color:var(--accent)}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn.danger:not(:disabled){border-color:#ec4d60;background:#ec4d60;color:white}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock [data-call-only] .round-btn[aria-pressed=true]{border-color:#80414e;background:#592e38;color:#ffd8df}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn:not(:disabled):hover{border-color:var(--accent);background:var(--panel-soft)}
body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item[hidden],body.workspace-design.graphite-interface .graphite-call-empty-actions button[hidden]{display:none!important}

body.workspace-design.graphite-interface .graphite-call-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:480px;padding:24px;gap:13px;color:var(--muted)}
body.workspace-design.graphite-interface .graphite-call-empty[hidden]{display:none}
.graphite-call-empty-icon{display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--line);border-radius:17px;background:var(--panel);color:var(--accent)}
.graphite-call-empty-icon svg{width:29px;height:29px}
.graphite-call-empty h2{margin:7px 0 0;color:var(--text);font-size:23px;font-weight:600;letter-spacing:-.4px}
.graphite-call-empty p{margin:0;font-size:13px;line-height:1.6}
.graphite-call-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:10px}
.graphite-call-empty-actions button{min-height:38px;padding:7px 14px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text)}
.graphite-call-empty-actions button:first-child:not([hidden]),.graphite-call-empty-actions button:nth-child(2):not([hidden]){border-color:var(--accent);background:var(--accent);color:var(--bg)}

.graphite-call-extras{display:none;position:fixed;inset:auto;margin:0;min-width:220px;max-width:calc(100vw - 16px);padding:7px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);box-shadow:0 14px 50px #0007}
.graphite-call-extras:popover-open{display:grid;gap:3px}
.graphite-call-extras .dock-item{display:flex;flex-direction:row;align-items:center;gap:10px;padding:3px 10px 3px 4px;border-radius:7px;cursor:pointer}
.graphite-call-extras .dock-item:hover{background:var(--panel-soft)}
.graphite-call-extras .dock-item[hidden]{display:none}
.graphite-call-extras .round-btn{width:34px;height:34px;border:0;border-radius:7px;background:transparent;color:var(--text)}
.graphite-call-extras .dock-item>span{color:var(--text);font-size:13px}
.graphite-call-extras .round-btn[aria-pressed=true]{color:var(--accent)}

/* Desktop camera rail sits above chat and retains the original camera tiles. */
body.workspace-design.graphite-interface .graphite-camera-rail{min-width:0;border-left:1px solid var(--line)}
body.workspace-design.graphite-interface .graphite-camera-rail>.chat-panel{border:0;border-radius:0;background:var(--panel)}
body.workspace-design.graphite-interface .call-chat-hidden .graphite-camera-rail>.chat-resizer{display:none}
body.workspace-design.graphite-interface .graphite-camera-rail .chat-header{min-height:48px;padding:10px 16px;border-color:var(--line)}
body.workspace-design.graphite-interface .graphite-camera-rail .chat-title{font-size:14px}
body.workspace-design.graphite-interface .graphite-camera-rail .chat-mark{color:var(--muted)}
body.workspace-design.graphite-interface .graphite-camera-rail .chat-input{margin:10px 12px;border-radius:10px;background:var(--bg)}
body.workspace-design.graphite-interface .graphite-camera-rail .chat{padding:16px}
body.workspace-design.graphite-interface .graphite-camera-rail .chat-input button{display:grid;place-items:center}
body.workspace-design.graphite-interface .camera-tile{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--bg)}
body.workspace-design.graphite-interface .camera-tile[hidden]{display:none!important}
body.workspace-design.graphite-interface .camera-tile .camera-label{left:0;right:0;bottom:0;max-width:none;padding:23px 12px 8px;border-radius:0;background:linear-gradient(transparent,#000b);color:#fff;font-size:12px}
body.workspace-design.graphite-interface .camera-tile:fullscreen{width:100vw;height:100vh;max-height:none;border-radius:0;aspect-ratio:auto}
body.workspace-design.graphite-interface .camera-tile:fullscreen video{width:100%;height:100%;object-fit:contain!important}
@media(min-width:901px){
    body.workspace-design.graphite-interface.reference-desktop-shell .main:not(:has(.text-channel-open,.community-friends:not([hidden]))){grid-template-columns:minmax(0,1fr) var(--graphite-detail-width,300px)}
    body.workspace-design.graphite-interface.reference-desktop-shell .main.call-chat-hidden:not(.call-mini-visible):not(.call-cameras-visible):not(:has(.text-channel-open,.community-friends:not([hidden]))){grid-template-columns:minmax(0,1fr)}
    body.workspace-design.graphite-interface .graphite-rail-cameras{display:flex;padding:0 8px 8px;min-height:0;gap:8px;border:0}
    body.workspace-design.graphite-interface .graphite-rail-cameras:not(:has(.camera-tile:not([hidden]))){display:none}
    body.workspace-design.graphite-interface .graphite-rail-cameras>header{display:flex;flex-direction:row;align-items:center;min-height:38px;padding:7px 8px 0;border-bottom:1px solid var(--line)}
    body.workspace-design.graphite-interface .graphite-rail-cameras>header strong{width:100%;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.3px}
    body.workspace-design.graphite-interface .graphite-rail-cameras>header select,body.workspace-design.graphite-interface .graphite-rail-cameras>.camera-empty{display:none}
    body.workspace-design.graphite-interface .graphite-rail-cameras .camera-list{display:flex;flex-direction:column;gap:8px;overflow:auto;padding:0}
    body.workspace-design.graphite-interface .graphite-rail-cameras .camera-tile{width:100%;min-height:100px;max-height:none;flex-shrink:0;aspect-ratio:16/9}
    body.workspace-design.graphite-interface .graphite-rail-cameras .camera-tile video{width:100%;height:100%;object-fit:cover}
    body.workspace-design.graphite-interface .graphite-rail-cameras .camera-expand{top:8px;right:8px;border-radius:7px;opacity:0}
    body.workspace-design.graphite-interface .graphite-rail-cameras .camera-tile:is(:hover,:focus-within) .camera-expand{opacity:1}
}
@media(min-width:901px) and (max-width:1250px){
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock{gap:8px;padding:10px 8px}
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn{width:40px;height:40px}
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item{min-width:40px}
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock #start-screen-btn{width:46px}
}
@media(max-width:900px){
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock{gap:7px;padding:8px}
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .round-btn{width:38px;height:38px}
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item{min-width:38px}
    body.workspace-design.graphite-interface .graphite-voice-stage .call-dock #start-screen-btn{width:42px}
    body.workspace-design.graphite-interface .graphite-call-empty{padding:18px}
    .graphite-call-empty h2{font-size:20px}
    .graphite-call-empty-actions button{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
    body.workspace-design.graphite-interface .call-source-tile,body.workspace-design.graphite-interface .call-source-tile::after,body.workspace-design.graphite-interface .graphite-voice-stage .call-dock .dock-item::after{transition:none}
}
/* Voice uses the same right-hand member list as text channels. The media rail
   remains mounted, so switching panels does not affect camera/stream tracks. */
body.workspace-design.graphite-interface .main.call-members-visible>.camera-chat-rail{display:none!important}
body.workspace-design.graphite-interface.reference-desktop-shell .main.call-members-visible{grid-template-columns:minmax(0,1fr) var(--graphite-detail-width,300px)!important}
