/* A separate, movable voice surface. Chat keeps its full height and composer. */
#chat-panel .voice-toggle[hidden],#voice-room-panel[hidden],#voice-room-panel [hidden]{display:none!important}
#chat-panel .chat-toolbar .voice-toggle{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:7px 10px;border:1px solid var(--paper-line);border-radius:10px;background:var(--paper-field);color:var(--paper-ink);font:600 13px/1.2 'Alegreya Sans',system-ui,sans-serif;cursor:pointer;white-space:nowrap}
#chat-panel .voice-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#chat-panel .voice-toggle small{font:600 11px/1 'Alegreya Sans',system-ui,sans-serif}
#chat-panel .voice-toggle small:empty{display:none}
#chat-panel .voice-toggle.connected{background:#45634d;color:#fff;border-color:#45634d}
:root[data-time="night"] #chat-panel .voice-toggle.connected{background:#7fa985;color:#152b23;border-color:#a8c7a9}
#chat-panel .voice-toggle:focus-visible,#voice-room-panel button:focus-visible,#voice-room-panel input:focus-visible{outline:2px solid #a67d4f;outline-offset:2px}

#voice-room-panel{position:fixed;inset:auto auto auto 0;margin:0;top:0;box-sizing:border-box;width:min(344px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;scrollbar-width:none;background:var(--paper-grain),var(--paper);color:var(--paper-ink);border:1px solid var(--paper-line);border-radius:18px;box-shadow:0 18px 42px -18px #091d2c91,0 2px 8px #091d2c33;font:14px/1.4 'Alegreya Sans',system-ui,sans-serif}
#voice-room-panel::-webkit-scrollbar{display:none}
#voice-room-panel .voice-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:15px 16px 12px;border-bottom:1px solid var(--paper-line);cursor:grab;touch-action:none;user-select:none}
#voice-room-panel .voice-panel-head:active{cursor:grabbing}
#voice-room-panel .voice-panel-head>div{display:flex;flex-direction:column;gap:2px}
#voice-room-panel .voice-panel-head strong{font:600 19px/1.1 'Alegreya',Georgia,serif}
#voice-room-panel #voice-connection{font-size:12px;opacity:.78}
#voice-room-panel.connected #voice-connection::before{content:"";display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:#76b786;vertical-align:1px}
#voice-room-panel #voice-close{width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:inherit;font:24px/1 'Alegreya Sans',system-ui,sans-serif;cursor:pointer}
#voice-room-panel #voice-close:hover{background:var(--paper-line)}
#voice-room-panel .voice-panel-body{padding:12px 16px 15px}
#voice-room-panel #voice-status{min-height:1.35em;margin:0 0 12px;font-size:13px}
#voice-room-panel #voice-people{display:flex;flex-direction:column;gap:3px;max-height:100px;overflow:auto;scrollbar-width:none}
#voice-room-panel #voice-people:empty{display:none}
#voice-room-panel .voice-person{margin:0;padding:2px 0;font-size:12px}
#voice-room-panel .voice-person.talking{font-weight:700}
#voice-room-panel button{position:static;width:auto;height:auto;opacity:1;font-family:'Alegreya Sans',system-ui,sans-serif;cursor:pointer}
#voice-room-panel button:disabled{opacity:.5;cursor:default}
#voice-room-panel #voice-join{display:block;width:100%;min-height:48px;padding:10px 16px;border:1px solid #45634d;border-radius:12px;background:#45634d;color:#fff;font-size:16px;font-weight:650}
#voice-room-panel .voice-connected-controls{display:grid;grid-template-columns:minmax(0,1fr) 102px;gap:9px;align-items:stretch}
#voice-room-panel #voice-talk{min-height:72px;padding:10px;border:1px solid var(--paper-ink);border-radius:14px;background:transparent;color:inherit;font-size:17px;font-weight:600;touch-action:none}
#voice-room-panel #voice-talk:not(:disabled):active{background:#45634d;color:#fff}
#voice-room-panel .voice-side-actions{display:flex;flex-direction:column;gap:8px}
#voice-room-panel .voice-side-actions button{flex:1;min-height:32px;padding:5px 7px;border:1px solid var(--paper-line);border-radius:11px;background:transparent;color:inherit;font-size:12px}
#voice-room-panel #voice-always[aria-pressed="true"]{background:#45634d;color:#fff;border-color:#45634d}
:root[data-time="night"] #voice-room-panel #voice-always[aria-pressed="true"]{background:#7fa985;color:#152b23}
#voice-room-panel #voice-leave{color:#ad5a4c;border-color:#ad5a4c88}
#voice-room-panel .voice-volume{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;font-size:12px}
#voice-room-panel .voice-volume input{width:min(160px,65%);accent-color:#45634d}
#voice-room-panel #voice-remaining{margin:10px 0 0;font-size:12px;opacity:.78}

/* The small icon sits above the Peep; chat speech stays separate. */
.seated-person>.person-voice-badge{position:absolute;left:50%;bottom:calc(100% + 5px);transform:translateX(-50%);z-index:3;width:24px;height:24px;border-radius:50%;background:#254253;color:#f5f2e9;display:grid;place-items:center;border:1px solid #d2ddce99;box-shadow:0 3px 9px #0d1b2780;pointer-events:none}
.seated-person>.person-voice-badge.talking{background:#45634d;border-color:#b7dcaf;box-shadow:0 3px 10px #0d1b2780,0 0 0 2px #a6d3aa55}
.seated-person>.person-voice-badge svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.seated-person:has(>.person-note:not([hidden]))>.person-voice-badge{bottom:calc(100% + var(--note-offset,0px) + 50px)}
@media(max-width:600px){
 #chat-panel .chat-toolbar .voice-toggle{min-width:40px;width:40px;height:40px;padding:0}
 #chat-panel .voice-toggle span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #chat-panel .voice-toggle small{position:absolute;right:2px;top:1px;font-size:9px}
 #voice-room-panel{width:min(340px,calc(100vw - 20px));max-height:calc(100dvh - 20px)}
 #voice-room-panel .voice-panel-head{padding:11px 13px 9px}
 #voice-room-panel .voice-panel-body{padding:10px 13px 13px}
 #voice-room-panel .voice-connected-controls{grid-template-columns:minmax(0,1fr) 92px}
 #voice-room-panel #voice-talk{min-height:62px}
}
