:root {
  color-scheme: dark;
  --page: #071624;
  --panel: #0d2031;
  --panel-raised: #112a40;
  --line: #25435a;
  --text: #f3f8fc;
  --muted: #9eb6c6;
  --blue: #08cce0;
  --purple: #25e0ed;
  --green: #36e89c;
  --danger: #ff5f75;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 50% -35%, #12354a 0, var(--page) 64%); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
button:hover { border-color: var(--blue); background: #15354c; }
button:active { transform: scale(.98); }
button:disabled { opacity: .45; cursor: not-allowed; }
input { width: 100%; padding: .8rem .9rem; color: var(--text); background: #081a29; border: 1px solid #37536a; border-radius: 10px; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px #08cce044; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.brand-row { height: 72px; display: flex; align-items: center; padding: 10px clamp(16px, 4vw, 52px); border-bottom: 1px solid #173348; background: #071624dd; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; flex: none; fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px #00ddec44); }
.brand-mark path:last-child { fill: var(--blue); stroke: none; }
.brand-wordmark { display: inline-flex; gap: .25em; font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1; white-space: nowrap; letter-spacing: -.04em; }
.brand-wordmark span:first-child { color: #f5f9fc; }
.brand-wordmark span:last-child { color: var(--blue); }
.home-shell { min-height: 100dvh; padding-bottom: 40px; }
.welcome-card { width: min(calc(100% - 32px), 650px); margin: clamp(24px, 8vh, 78px) auto 0; padding: clamp(24px, 6vw, 54px); text-align: center; background: linear-gradient(145deg, #112b41, #0b1b2a 70%); border: 1px solid #1b526b; border-radius: 28px; box-shadow: 0 24px 80px #0005; }
.eyebrow { color: var(--blue); font-size: .75rem; letter-spacing: .17em; font-weight: 750; }
.welcome-card h1 { margin: .3rem 0; font-size: clamp(2.2rem, 7vw, 4rem); letter-spacing: -.04em; }
.muted, .capability-note { color: #b1c4d1; }
.welcome-card > p:not(.eyebrow):not(.error) { font-size: 1.08rem; }
.welcome-card label { display: block; margin: 25px 0 8px; text-align: left; font-weight: 650; }
.welcome-card label span { font-weight: 400; color: var(--muted); }
.welcome-card input { padding: 1rem; font-size: 1.05rem; }
.primary { display: block; width: 100%; margin-top: 12px; padding: 1rem; border: 1px solid var(--blue); border-radius: 13px; background: var(--blue); color: #031420; font-weight: 800; font-size: 1.08rem; }
.primary:hover { color: #031420; background: #48e6f0; }
.separator { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); }
.separator:before, .separator:after { content: ""; height: 1px; background: #45677d; flex: 1; }
.join-row { display: flex; gap: 8px; }
.join-row input { min-width: 0; }
.join-row button { border-color: var(--blue); color: #031420; background: var(--blue); font-weight: 700; white-space: nowrap; }
.capability-note { width: min(calc(100% - 32px), 720px); margin: 18px auto; text-align: center; font-size: .84rem; }
.error { min-height: 1.3em; color: #ff9eae; font-size: .9rem; }

.call-shell { width: 100%; height: 100dvh; min-height: 500px; display: flex; flex-direction: column; overflow: hidden; background: var(--page); }
.call-header { min-height: 76px; display: flex; align-items: center; gap: clamp(8px, 1.3vw, 20px); padding: 10px clamp(12px, 2vw, 28px); background: linear-gradient(90deg, #081a29, #0b1f30); border-bottom: 1px solid #1c3d53; z-index: 3; }
.connection-state { display: grid; place-items: center; width: 17px; height: 44px; flex: none; }
.connection-state i { width: 11px; height: 11px; border-radius: 50%; background: #718393; box-shadow: 0 0 0 4px #7183931d; }
.connection-state i.online { background: var(--green); box-shadow: 0 0 12px #36e89c99; }
.connection-state i.offline { background: var(--danger); box-shadow: 0 0 12px #ff5f7599; }
.call-brand .brand-mark { width: 39px; height: 39px; }
.call-brand .brand-wordmark { font-size: clamp(1.05rem, 1.7vw, 1.45rem); }
.room-context { min-width: 110px; display: flex; align-items: center; gap: 10px; padding-left: clamp(6px, 1vw, 18px); border-left: 1px solid #36566c; }
.room-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.95rem, 1.25vw, 1.16rem); }
.participant-count, .sidebar-count { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 4px 10px; color: #c2d9e5; background: #102d42; border: 1px solid #34566d; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-actions button { min-height: 42px; padding: .52rem .9rem; white-space: nowrap; font-weight: 700; }
.invite-button { color: var(--blue); background: #08202d; border: 1px solid var(--blue); }
.invite-button:hover { color: #04202a; background: var(--blue); }
.header-button { display: none; }
.leave-button { background: #331f2a; border-color: #75404e; color: #ffbdc6; }
.call-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 12px; padding: 12px; }
.stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #173a52; border-radius: 18px; background: radial-gradient(ellipse at center, #0c2030, #06111c 76%); }
.video-grid { min-width: 0; min-height: 0; flex: 1; display: flex; align-content: center; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(8px, 1vw, 16px); overflow: auto; padding: 16px 12px 10px; }
.tile { position: relative; isolation: isolate; flex: 0 1 clamp(145px, calc((100% - 36px) / 3), 360px); width: clamp(145px, calc((100% - 36px) / 3), 360px); aspect-ratio: 9 / 16; max-height: min(68vh, 650px); min-width: 0; overflow: hidden; border: 1px solid #4b7187; border-radius: 20px; background: linear-gradient(160deg, #173249, #0a1927); box-shadow: 0 10px 34px #0005; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #081725; transform: scale(var(--tile-zoom, 1)); transition: transform .18s; }
.tile.local { position: absolute; z-index: 4; right: 16px; bottom: 16px; width: clamp(86px, 11vw, 142px); flex: none; aspect-ratio: 9 / 16; max-height: 33vh; border: 2px solid var(--blue); box-shadow: 0 0 0 2px #02131f, 0 8px 24px #0009; }
.tile.local .tile-actions, .tile.local .tile-name { display: none; }
.tile.screen-share-local { position: relative; right: auto; bottom: auto; width: clamp(145px, calc((100% - 36px) / 3), 360px); max-height: min(68vh, 650px); border: 1px solid #79eff7; }
.tile:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; background: #000; }
.tile.self-preview-hidden { visibility: hidden; pointer-events: none; }
.tile-name { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: center; min-height: 54px; padding: 10px 12px; background: linear-gradient(0deg, #06131deb, #06131d99 75%, transparent); font-size: .95rem; font-weight: 700; }
.tile-placeholder { position: absolute; inset: 0; z-index: 1; display: none; align-items: center; justify-content: center; padding: 20px; color: #c3d8e4; text-align: center; font-size: 1.05rem; font-weight: 650; background: radial-gradient(circle at 50% 38%, #19384b, #091723 72%); }
.tile.video-hidden video { visibility: hidden; }
.tile.video-hidden .tile-placeholder { display: flex; }
.tile-actions { position: absolute; z-index: 3; top: 8px; right: 8px; display: flex; gap: 5px; }
.tile-action { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid #d0e9f288; border-radius: 11px; color: white; background: #06131dbb; backdrop-filter: blur(6px); font-size: 1rem; }
.tile-action[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); }
.zoom-control { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 5px 12px; color: #d8eaf2; background: #0d2638; border: 1px solid #31566e; border-radius: 14px; }
.zoom-control label { flex: none; font-weight: 650; }
.zoom-control input[type="range"] { min-width: 50px; flex: 1; height: 5px; padding: 0; accent-color: var(--blue); }
.zoom-control output { min-width: 42px; color: var(--blue); text-align: right; font-variant-numeric: tabular-nums; }
.media-dock { position: relative; z-index: 6; flex: none; display: grid; gap: 9px; padding: 10px 12px 12px; background: linear-gradient(0deg, #061521, #071624e8); border-top: 1px solid #18394f; }
.media-actions { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.media-button { min-width: 0; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 4px; color: #e3f3f9; background: linear-gradient(145deg, #0b2638, #081a28); border: 1.5px solid #16728a; border-radius: 15px; font-size: clamp(.69rem, .84vw, .84rem); line-height: 1.15; white-space: nowrap; }
.media-button:hover, .media-button[aria-pressed="true"] { border-color: var(--blue); box-shadow: inset 0 0 16px #05cfe019, 0 0 10px #08cce022; }
.button-icon { display: block; color: var(--blue); font-size: 1.5rem; line-height: 1.3; }
.wizz-button .button-icon { color: #ffd534; }
.theme-panel { position: fixed; z-index: 30; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); width: min(650px, calc(100vw - 16px)); max-height: min(82dvh, 720px); overflow: auto; transform: translateX(-50%); padding: clamp(14px, 2vw, 24px); color: var(--theme-text, #17202a); background: var(--theme-panel, #fff); border: 1px solid var(--theme-line, #d6dce2); border-radius: 24px; box-shadow: 0 18px 56px #0009; }
.theme-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.theme-panel-heading h2 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.theme-panel-heading p { margin: 2px 0 14px; color: var(--theme-muted, #65717c); }
.theme-close { width: 40px; height: 40px; padding: 0; color: var(--theme-text, #17202a); background: transparent; border-color: transparent; font-size: 1.6rem; }
.theme-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.theme-modes button { color: var(--theme-text, #17202a); background: var(--theme-surface, #f2f1ef); border-color: var(--theme-line, #d6dce2); }
.theme-modes button[aria-pressed="true"] { background: var(--theme-accent, #dfe8df); border-color: var(--theme-primary, #789777); }
.theme-palette { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.theme-palette button { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 5px 2px; color: var(--theme-text, #17202a); background: transparent; border: 1px solid transparent; font-size: clamp(.65rem, 1.5vw, .8rem); }
.theme-palette button[aria-pressed="true"] { border-color: var(--theme-primary, #789777); border-radius: 14px; }
.theme-palette i { width: clamp(30px, 5vw, 50px); aspect-ratio: 1; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #0002; }
.theme-palette button[aria-pressed="true"] i { outline: 2px solid var(--theme-primary, #789777); outline-offset: 2px; }
.theme-palette [data-theme-color="sage"] { --swatch: #91ad8d; }
.theme-palette [data-theme-color="plum"] { --swatch: #9262a7; }
.theme-palette [data-theme-color="apricot"] { --swatch: #ee9968; }
.theme-palette [data-theme-color="rose"] { --swatch: #dc8296; }
.theme-palette [data-theme-color="blue"] { --swatch: #5799c4; }
.theme-palette [data-theme-color="graphite"] { --swatch: #555b60; }
.theme-note { margin: 12px 0; color: var(--theme-muted, #65717c); text-align: center; font-size: .8rem; }
.theme-apply { width: 100%; color: #fff; background: var(--theme-primary, #789777); border-color: var(--theme-primary, #789777); font-weight: 750; }
.theme-apply:hover { filter: brightness(1.08); }
[data-user-theme][data-theme-mode="light"] { --theme-page: #f5f3ef; --theme-panel: #fffdfa; --theme-text: #171a20; --theme-muted: #5e666e; --theme-surface: #f0eeeb; --theme-line: #dedbd5; }
[data-user-theme][data-theme-mode="dark"] { --theme-page: #101018; --theme-panel: #211d29; --theme-text: #faf7fc; --theme-muted: #c7bfcc; --theme-surface: #1a1720; --theme-line: #4d4357; }
[data-user-theme] { --theme-primary: var(--blue); }
[data-user-theme] body, [data-user-theme] .call-shell, [data-user-theme] .home-shell { color: var(--theme-text); background: var(--theme-page); }
[data-user-theme] .brand-row, [data-user-theme] .call-header, [data-user-theme] .media-dock { color: var(--theme-text); background: var(--theme-panel); border-color: var(--theme-line); }
[data-user-theme] .stage, [data-user-theme] .conversation { background: var(--theme-surface); border-color: var(--theme-line); }
[data-user-theme] .media-button, [data-user-theme] .zoom-control { color: var(--theme-text); background: var(--theme-panel); border-color: var(--theme-line); }
[data-user-theme] .message .body, [data-user-theme] .welcome-card { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-line); }
[data-user-theme] input { color: var(--theme-text); background: var(--theme-panel); border-color: var(--theme-line); }
[data-user-theme] .header-actions button { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-line); }
[data-user-theme] .header-actions .invite-button { color: #fff; background: var(--theme-primary); border-color: var(--theme-primary); }
[data-user-theme] .header-actions .leave-button { color: var(--theme-text); background: var(--theme-surface); }
[data-user-theme] .participant-count, [data-user-theme] .sidebar-count { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-line); }
[data-user-theme] .room-context { border-color: var(--theme-line); }
[data-user-theme] .tile-name { color: #fff; }
[data-user-theme] .conversation-head, [data-user-theme] .people-list, [data-user-theme] .message-form { border-color: var(--theme-line); }
[data-user-theme][data-theme-mode="light"] .brand-wordmark span:first-child { color: var(--theme-text); }
.stage-error { position: absolute; z-index: 8; left: 50%; top: 8px; width: min(92%, 620px); transform: translateX(-50%); margin: 0; pointer-events: none; text-align: center; background: #091621cc; border-radius: 8px; }
.conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(160deg, #10263a, #0a1c2a); border: 1px solid #28506a; border-radius: 18px; }
.conversation-head { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-bottom: 1px solid #294a60; }
.conversation-head strong { font-size: 1.02rem; }
.sidebar-count { margin-left: auto; font-size: .77rem; }
.wizz-permission { flex: none; padding: 4px 8px; color: #ffd534; border-color: #786d33; border-radius: 9px; font-size: .69rem; }
.wizz-permission[aria-pressed="false"] { color: var(--muted); }
.conversation-close { display: none; width: 34px; height: 34px; padding: 0; font-size: 1.4rem; }
.people-list { max-height: 132px; flex: none; overflow: auto; padding: 6px 10px; border-bottom: 1px solid #294a60; color: var(--muted); font-size: .82rem; }
.person { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.person span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .wizz { flex: none; padding: 4px 9px; color: #ffd534; border-color: #987e24; border-radius: 9px; font-size: .72rem; font-weight: 700; }
.messages { min-height: 100px; flex: 1; overflow: auto; padding: 12px; scrollbar-color: #31576d transparent; }
.message { max-width: 95%; margin: 0 0 14px; overflow-wrap: anywhere; }
.message .author { margin: 0 0 3px; color: var(--blue); font-size: .82rem; font-weight: 700; }
.message .body { display: inline-block; padding: 8px 12px; border-radius: 5px 14px 14px 14px; color: #eff7fb; background: #1b3549; white-space: pre-wrap; }
.message time { display: block; margin-top: 3px; color: #94aabb; font-size: .68rem; }
.message a { color: #79eff7; }
.file-preview { max-width: 100%; max-height: 220px; display: block; margin-top: 6px; border-radius: 8px; }
.event { margin: 9px 0; padding: 5px 8px; color: #c7d7e1; text-align: center; font-size: .75rem; }
.attachment-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 10px 8px; border: 1px solid #40627a; border-radius: 13px; overflow: hidden; }
.attachment-choice { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #dcebf3; cursor: pointer; font-size: .88rem; }
.attachment-choice + .attachment-choice { border-left: 1px solid #40627a; }
.attachment-choice:hover { color: var(--blue); background: #143247; }
.message-form { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-top: 1px solid #294a60; }
.message-form input { min-width: 0; padding: .76rem .85rem; border-radius: 13px; }
.attach-button, .send-button { width: 42px; height: 42px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid #41647b; border-radius: 12px; background: #102b40; color: var(--blue); cursor: pointer; font-size: 1.25rem; }
.send-button { border-color: var(--blue); color: #031420; background: var(--blue); }
.upload-state { min-height: 19px; padding: 0 12px 8px; color: var(--muted); font-size: .76rem; }
.upload-state progress { width: 100%; height: 5px; accent-color: var(--blue); }
.upload-state button { margin-left: 8px; padding: 3px 8px; font-size: .75rem; }
.shake { animation: shake .38s ease-in-out; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

@media (max-width: 1020px) {
  .call-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 9px; padding: 9px; }
  .call-header { gap: 10px; }
  .call-brand .brand-mark { width: 33px; height: 33px; }
  .room-context { min-width: 88px; gap: 7px; }
  .room-context strong { font-size: .95rem; }
  .header-actions { gap: 5px; }
  .header-actions button { padding: .46rem .65rem; font-size: .84rem; }
  .media-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .media-button { min-height: 65px; }
  .tile { flex-basis: clamp(140px, calc((100% - 24px) / 3), 225px); width: clamp(140px, calc((100% - 24px) / 3), 225px); }
}
@media (max-width: 760px) {
  .call-shell { min-height: 420px; }
  .call-header { min-height: 68px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px 9px; padding: 7px 10px; }
  .connection-state { grid-column: 1; grid-row: 1; width: 13px; }
  .call-brand { grid-column: 2; grid-row: 1; }
  .call-brand .brand-mark { display: block; width: 27px; height: 27px; }
  .call-brand .brand-wordmark { font-size: 1.05rem; }
  .room-context { grid-column: 3; grid-row: 1; min-width: 0; padding-left: 8px; }
  .room-context strong { max-width: 30vw; font-size: .9rem; }
  .participant-count { min-width: 44px; padding: 3px 7px; font-size: .75rem; }
  .header-actions { grid-column: 4; grid-row: 1; gap: 5px; }
  .header-actions button { min-height: 36px; padding: .36rem .6rem; border-radius: 10px; font-size: .75rem; }
  #conversation-toggle { display: inline-flex; align-items: center; gap: 4px; }
  .call-layout { position: relative; display: block; padding: 6px; }
  .stage { height: 100%; border-radius: 15px; }
  .video-grid { align-content: center; gap: 8px; padding: 9px 7px 8px; }
  .tile { flex-basis: clamp(130px, calc((100% - 18px) / 2), 230px); width: clamp(130px, calc((100% - 18px) / 2), 230px); max-height: 46vh; border-radius: 16px; }
  .tile-name { min-height: 42px; padding: 7px 9px; font-size: .83rem; }
  .tile-actions { top: 5px; right: 5px; gap: 4px; }
  .tile-action { width: 34px; height: 34px; border-radius: 10px; }
  .tile.local { right: 10px; bottom: 10px; width: clamp(78px, 21vw, 118px); max-height: 27vh; }
  .media-dock { padding: 7px; gap: 7px; }
  .zoom-control { min-height: 39px; gap: 9px; padding: 4px 10px; border-radius: 12px; font-size: .85rem; }
  .media-actions { grid-template-columns: repeat(7, minmax(72px, 1fr)); gap: 6px; padding-bottom: 2px; }
  .media-button { min-height: 62px; border-radius: 12px; font-size: .75rem; }
  .button-icon { font-size: 1.35rem; }
  .conversation { display: none; }
  .call-layout.conversation-open .conversation { position: fixed; z-index: 20; left: 7px; right: 7px; bottom: max(7px, env(safe-area-inset-bottom)); height: min(64dvh, 620px); display: flex; box-shadow: 0 14px 50px #000b; }
  .call-layout.conversation-open:after { content: ""; position: fixed; z-index: 19; inset: 0; background: #0007; pointer-events: none; }
  .conversation-close { display: block; }
  .conversation-head { min-height: 48px; padding: 7px 10px; }
  .people-list { max-height: 78px; }
  .messages { padding: 8px 10px; }
  .attachment-choice { min-height: 40px; font-size: .82rem; }
  .message-form { padding: 6px 8px; }
}
@media (max-width: 430px) {
  .brand-row { height: 60px; padding-inline: 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-wordmark { font-size: 1.32rem; }
  .welcome-card { width: calc(100% - 20px); margin-top: 22px; padding: 24px 19px; border-radius: 22px; }
  .welcome-card h1 { font-size: 2.18rem; }
  .welcome-card > p:not(.eyebrow):not(.error) { font-size: .96rem; }
  .join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .join-row button { padding: .62rem .7rem; font-size: .86rem; }
  .call-header { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: 40px 36px; min-height: 84px; padding: 5px 8px; }
  .connection-state { grid-column: 1; }
  .call-brand { grid-column: 2; }
  .header-actions { display: contents; }
  #share-room { grid-column: 3; grid-row: 1; }
  #leave-room { grid-column: 4; grid-row: 1; }
  #conversation-toggle { grid-column: 4; grid-row: 2; }
  .header-actions button { width: auto; min-width: 0; min-height: 30px; padding: .25rem .42rem; font-size: .68rem; }
  .room-context { grid-column: 1 / 4; grid-row: 2; padding: 0 0 0 2px; border: 0; }
  .room-context strong { max-width: 58vw; font-size: .82rem; }
  .participant-count { min-width: 42px; }
  .header-actions { grid-column: auto; grid-row: auto; }
  #conversation-toggle { justify-content: center; }
  .tile { flex-basis: clamp(132px, calc((100% - 14px) / 2), 190px); width: clamp(132px, calc((100% - 14px) / 2), 190px); max-height: 43vh; }
  .tile-actions .tile-action { width: 30px; height: 30px; font-size: .82rem; }
  .tile-name { min-height: 38px; font-size: .76rem; }
  .media-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .media-button { min-height: 58px; font-size: .7rem; }
  .button-icon { font-size: 1.18rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
