:root {
  --ink: oklch(.22 .025 226);
  --muted: oklch(.5 .04 226);
  --paper: oklch(.97 .012 226);
  --panel: oklch(.995 .003 226);
  --panel-deep: oklch(.94 .025 226);
  --line: oklch(.86 .025 226);
  --teal: oklch(.53 .075 226);
  --teal-dark: oklch(.4 .075 226);
  --orange: #f4a064;
  --danger: #de6f67;
  --shadow: 0 18px 48px -32px rgba(18, 52, 64, .38);
  --weight-medium: 500;
  --weight-semibold: 600;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 "Avenir Next", "Segoe UI", sans-serif; font-kerning: normal; }
body:has(.meeting:not([hidden])) { height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
.app { width: 100%; min-height: 100vh; padding: clamp(18px, 4vw, 54px); background: var(--paper); }
.app:has(.meeting:not([hidden])) { width: 100%; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; background: var(--paper); }
.app:has(.meeting:not([hidden])) {
  --ink: #eaf3f6;
  --muted: #9db5bd;
  --paper: #102731;
  --panel: #173640;
  --panel-deep: #0b1d24;
  --line: rgba(209, 237, 242, .16);
  --teal: #5eb7c5;
  --teal-dark: #9edbe2;
  --orange: #ef8b39;
  --danger: #de6f67;
  --shadow: 0 24px 80px rgba(3, 14, 18, .38);
}
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.brand-lockup b { color: var(--ink); font-weight: var(--weight-semibold); }
.lobby { max-width: 1360px; margin: 0 auto; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: center; gap: clamp(34px, 8vw, 120px); min-height: 70vh; }
.lobby-grid.invite-only { grid-template-columns: minmax(0, 1.45fr) minmax(340px, .72fr); align-items: center; gap: clamp(48px, 7vw, 110px); min-height: 70vh; }
.lobby > .brand-lockup { margin-bottom: clamp(28px, 4vw, 48px); }
.kicker { margin: 0 0 12px; color: var(--teal); font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { font-weight: var(--weight-semibold); }
strong { font-weight: var(--weight-semibold); }
h1, h2, p { margin-top: 0; }
.lobby-copy h1 { max-width: 660px; margin-bottom: 20px; font-size: clamp(42px, 7vw, 86px); line-height: .98; letter-spacing: -.055em; }
.lede { max-width: 530px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.join-card { display: grid; gap: 9px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.join-card label { margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: var(--weight-medium); }
input { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-deep); color: var(--ink); outline: none; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94, 183, 197, .18); }
select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-deep); color: var(--ink); outline: none; }
select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94, 183, 197, .18); }
select:disabled { color: var(--muted); opacity: .72; }
.room-actions { display: flex; gap: 8px; margin-top: 16px; }
.button { min-height: 44px; padding: 10px 15px; border: 1px solid transparent; border-radius: 8px; background: var(--teal); color: #fff; font-weight: var(--weight-semibold); }
.button.secondary { border-color: var(--line); background: var(--panel); color: var(--teal-dark); }
.button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.button.danger { color: #8e3d2d; border-color: rgba(222, 111, 103, .38); }
.button:hover { filter: brightness(1.08); }
.app:has(.lobby-grid.invite-only) { display: flex; align-items: center; }
.app:has(.lobby-grid.invite-only) .lobby-grid.invite-only { min-height: auto; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.prejoin-preview-column { display: grid; gap: 12px; min-width: 0; }
.prejoin-card { width: 100%; max-width: 480px; align-self: center; gap: 16px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.prejoin-heading { display: block; }
.prejoin-heading h2 { margin: 0; font-size: clamp(30px, 3.5vw, 40px); font-weight: 500; line-height: 1.05; letter-spacing: -.04em; }
.prejoin-heading .kicker { margin-bottom: 6px; }
.prejoin-room { display: block; max-width: none; margin-top: 10px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.prejoin-copy { margin: 0; max-width: 32ch; color: var(--muted); }
.prejoin-name { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: var(--weight-medium); }
.preview-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-deep); }
.preview-frame video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px; color: var(--muted); text-align: center; }
.preview-placeholder strong { color: var(--ink); font-size: 16px; }
.preview-placeholder-mark { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(94, 183, 197, .42); border-radius: 50%; color: var(--teal); font-size: 29px; }
.preview-name { position: absolute; left: 12px; bottom: 12px; padding: 5px 8px; border-radius: 5px; background: rgba(11, 29, 36, .78); color: #fff; font-size: 12px; font-weight: var(--weight-medium); }
.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.device-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: var(--weight-medium); }
.device-label { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-dark); }
.device-label svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.preview-overlay-controls { position: absolute; left: 50%; bottom: 14px; display: flex; gap: 6px; transform: translateX(-50%); padding: 5px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; background: rgba(23, 50, 60, .86); color: #fff; box-shadow: 0 8px 24px rgba(18, 52, 64, .2); }
.preview-device-toggle { display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; }
.preview-device-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.preview-device-toggle:hover, .preview-device-toggle:focus-visible { background: rgba(94, 183, 197, .2); outline: none; }
.preview-device-toggle:disabled { cursor: not-allowed; opacity: .45; }
.preview-device-toggle.is-off { background: rgba(222, 111, 103, .18); color: #ffb8b2; }
.prejoin-enable { width: 100%; border-color: rgba(46, 163, 242, .42); color: var(--teal-dark); }
.prejoin-primary { width: 100%; min-height: 50px; font-size: 15px; }
.prejoin-primary:disabled { cursor: not-allowed; filter: none; opacity: .46; }
.meeting { position: relative; width: 100%; max-width: none; height: 100%; min-height: 0; margin: 0; display: block; }
.meeting-header { position: absolute; inset: 0 0 auto; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 0 clamp(24px, 3vw, 36px); pointer-events: none; }
.meeting-header .room-badge { pointer-events: auto; }
.meeting-header .brand-lockup { gap: 14px; }
.meeting-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
@media (min-width: 901px) {
  .meeting:has(> .meeting-body > .chat-panel:not([hidden])) .meeting-header,
  .meeting:has(> .meeting-body > .details-panel:not([hidden])) .meeting-header { padding-right: calc(clamp(24px, 3vw, 36px) + 372px); }
}
.room-badge { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: min(360px, 100%); padding: 7px 10px 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.room-badge span { flex: 0 0 auto; letter-spacing: .13em; }
.room-badge strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; letter-spacing: .03em; }
.room-badge button { flex: 0 0 auto; }
.icon-button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--teal); }
.icon-button svg, .utility-button svg, .panel-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.meeting-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0px, 0px); width: 100%; min-height: 0; height: 100%; gap: 12px; transition: grid-template-columns .32s cubic-bezier(.22, 1, .36, 1); }
.meeting-body:has(> .chat-panel:not([hidden])), .meeting-body:has(> .details-panel:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
.stage { position: relative; grid-column: 1; grid-row: 1; width: 100%; min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; padding: clamp(18px, 3vw, 30px); border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.stage-heading { display: none; }
.stage-heading > div:first-child { display: none; }
.stage-tools { pointer-events: auto; }
.stage-heading h1 { margin-bottom: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.04em; }
.stage-tools { display: flex; align-items: center; gap: 12px; }
.connection-state { color: var(--muted); font-size: 12px; line-height: 1.2; }
.connection-state[data-tone="good"] { color: #9fdbb3; }
.connection-state[data-tone="bad"] { color: #ffada8; }
.layout-controls { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.layout-button { padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: var(--weight-medium); }
.layout-button:hover, .layout-button.is-active { background: rgba(94, 183, 197, .18); color: var(--teal-dark); }
.video-grid { container-type: size; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); grid-auto-rows: minmax(0, 1fr); place-items: center; align-content: stretch; flex: 1 1 auto; gap: 10px; min-height: 0; height: auto; padding-top: clamp(58px, 8vh, 76px); padding-bottom: 52px; overflow: hidden; }
.video-tile { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; align-self: center; justify-self: center; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-deep); }
.video-tile { max-width: min(100%, 160cqh); }
.video-grid:not(.layout-focus) .video-tile { max-width: min(100%, calc((100cqh - (var(--grid-rows, 1) - 1) * 10px) / var(--grid-rows, 1) * 16 / 9)); }
.video-tile video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.local-tile video { transform: scaleX(-1); }
.video-tile.is-speaking { border-color: rgba(94, 183, 197, .84); box-shadow: 0 0 0 2px rgba(94, 183, 197, .18); }
.tile-pin { position: absolute; top: 10px; right: 10px; padding: 5px 8px; border: 1px solid rgba(209, 237, 242, .24); border-radius: 6px; background: rgba(11, 29, 36, .8); color: var(--ink); font-size: 11px; opacity: 0; transition: opacity .16s ease, background .16s ease; }
.video-tile:hover .tile-pin, .video-tile:focus-within .tile-pin, .tile-pin[aria-pressed="true"] { opacity: 1; }
.tile-pin[aria-pressed="true"] { border-color: rgba(94, 183, 197, .72); background: rgba(94, 183, 197, .22); color: #b9f1f4; }
.tile-label, .tile-status { position: absolute; bottom: 12px; padding: 5px 8px; border-radius: 5px; background: rgba(11, 29, 36, .76); color: #fff; font-size: 12px; }
.tile-label { left: 12px; font-weight: var(--weight-medium); }
.tile-status { right: 12px; color: var(--muted); }
.video-tile.is-speaking .tile-status { color: #b9f1f4; }
.video-grid.layout-focus { grid-template-columns: minmax(0, 1fr) repeat(4, minmax(92px, 150px)); grid-auto-rows: minmax(90px, 150px); align-items: start; }
.video-grid.layout-focus .video-tile.is-spotlight { grid-column: 1; grid-row: 1 / span 4; }
.video-grid.layout-focus .video-tile:not(.is-spotlight), .video-grid.layout-focus .video-tile:not(.is-spotlight) video { min-height: 0; }
.presentation-tile video { object-fit: contain; transform: none; }
.video-grid.has-presentation { grid-template-columns: minmax(0, 1fr) minmax(120px, 200px); grid-template-rows: repeat(var(--presentation-rows, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.video-grid.has-presentation .is-spotlight { grid-column: 1; grid-row: 1 / -1; max-width: min(100%, calc(100cqh * 16 / 9)); }
.video-grid.has-presentation .video-tile:not(.is-spotlight) { grid-column: 2; max-width: min(100%, calc((100cqh - (var(--presentation-rows, 1) - 1) * 10px) / var(--presentation-rows, 1) * 16 / 9)); }
.video-grid.has-presentation .video-tile:not(.is-spotlight) .tile-status { display: none; }
.video-grid.has-presentation .tile-label { left: 8px; bottom: 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.meeting-meta { position: absolute; left: 16px; bottom: 18px; z-index: 4; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.meeting-meta-separator { color: rgba(209, 237, 242, .38); }
.control-bar { position: absolute; left: 50%; bottom: 24px; z-index: 4; display: flex; justify-content: center; gap: 7px; transform: translateX(-50%); padding: 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: 0 14px 36px rgba(18, 52, 64, .18); }
.app:has(.meeting:not([hidden])) .control-bar { border-color: rgba(209, 237, 242, .18); background: rgba(11, 29, 36, .88); box-shadow: 0 14px 36px rgba(3, 14, 18, .3); }
.control-button { display: grid; place-items: center; width: 48px; height: 48px; min-width: 48px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--ink); }
.control-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.control-button:hover, .control-button:focus-visible { border-color: var(--line); background: rgba(94, 183, 197, .16); outline: none; }
.control-button small { display: none; }
.control-button.is-off { border-color: rgba(222, 111, 103, .5); background: rgba(222, 111, 103, .14); color: #ffb8b2; }
.control-button.leave-control { margin-left: 8px; background: var(--danger); color: #fff; }
.control-button.leave-control:hover, .control-button.leave-control:focus-visible { border-color: rgba(255, 216, 212, .8); background: #ee8279; }
.control-button.is-off { border-color: rgba(222, 111, 103, .5); color: #ffb8b2; }
.control-button.accent { border-color: rgba(239, 139, 57, .42); color: #ffc18d; }
.screen-share-button.is-sharing { border-color: rgba(94, 183, 197, .72); background: rgba(94, 183, 197, .16); color: #b9f1f4; }
.meeting-utility { position: absolute; right: 24px; bottom: 28px; z-index: 4; display: flex; gap: 7px; }
.utility-button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--muted); font-size: 12px; }
.app:has(.meeting:not([hidden])) .utility-button { background: rgba(11, 29, 36, .78); }
.utility-button:hover, .utility-button:focus-visible, .utility-button.is-active { border-color: var(--teal); background: rgba(94, 183, 197, .16); color: var(--teal-dark); outline: none; }
.utility-button { min-width: 44px; min-height: 44px; justify-content: center; }
.utility-button:disabled { opacity: .45; cursor: not-allowed; }
.utility-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.chat-panel, .details-panel { position: absolute; top: 16px; right: 16px; bottom: 16px; z-index: 5; display: grid; grid-template-rows: auto 1fr auto; width: min(360px, calc(100% - 32px)); min-height: 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .97); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.app:has(.meeting:not([hidden])) .chat-panel, .app:has(.meeting:not([hidden])) .details-panel { background: rgba(23, 54, 64, .96); }
.meeting-body > .chat-panel, .meeting-body > .details-panel { position: relative; grid-column: 2; grid-row: 1; inset: auto; width: auto; height: 100%; transition: opacity .24s ease-out, transform .32s cubic-bezier(.22, 1, .36, 1); }
@starting-style {
  .meeting-body > .chat-panel:not([hidden]), .meeting-body > .details-panel:not([hidden]) { opacity: 0; transform: translateX(18px); }
}
.chat-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 22px 20px 17px; border-bottom: 1px solid var(--line); }
.panel-close { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; }
.panel-close:hover, .panel-close:focus-visible { border-color: var(--teal); color: var(--ink); outline: none; }
.chat-heading .kicker { margin-bottom: 7px; }
.chat-heading h2 { margin-bottom: 4px; font-size: 21px; }
.chat-heading span { color: var(--muted); font-size: 12px; }
.chat-messages { display: grid; align-content: start; gap: 12px; overflow: auto; padding: 18px 20px; }
.chat-message { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.chat-message strong { color: var(--teal-dark); font-size: 12px; }
.chat-message time { color: var(--muted); font-size: 10px; }
.chat-message p { grid-column: 1 / -1; margin: 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.chat-message.own p { color: #a45a2f; }
.app:has(.meeting:not([hidden])) .chat-message.own p { color: #ffd0a5; }
.chat-system { margin: 0; color: var(--muted); font-size: 12px; }
.details-panel { grid-template-rows: auto 1fr; }
.details-content { display: grid; align-content: start; gap: 22px; overflow: auto; padding: 22px 20px; }
.details-content > div { display: grid; gap: 8px; }
.details-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: var(--weight-medium); }
.details-value { padding: 11px 12px; border-radius: 9px; background: var(--panel-deep); color: var(--ink); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.details-copy { display: inline-flex; align-items: center; justify-self: start; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--teal-dark); font-size: 13px; }
.app:has(.meeting:not([hidden])) .details-copy { color: #b7b6ff; }
.details-copy:hover, .details-copy:focus-visible { color: var(--ink); outline: none; }
.details-copy svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.details-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.details-status { display: flex !important; align-items: start; gap: 10px !important; }
.details-status-dot { width: 9px; height: 9px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #74d29a; box-shadow: 0 0 0 4px rgba(116, 210, 154, .12); }
.details-status div { display: grid; gap: 2px; }
.details-status strong { color: var(--ink); font-size: 13px; }
.details-status span { color: #9fdbb3; font-size: 12px; }
.details-status small { color: var(--muted); font-size: 11px; }
.chat-form { display: flex; gap: 7px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form input { min-height: 42px; }
.chat-form button { flex: 0 0 42px; border: 0; border-radius: 8px; background: var(--teal); color: #fff; font-size: 18px; font-weight: var(--weight-semibold); }
.app:has(.meeting:not([hidden])) .chat-form button { color: var(--panel-deep); }
.global-error { position: fixed; right: 20px; bottom: 20px; max-width: 380px; margin: 0; padding: 13px 16px; border: 1px solid rgba(222, 111, 103, .5); border-radius: 10px; background: #fff0ed; color: #8e3d2d; box-shadow: var(--shadow); }
.device-dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); color-scheme: dark; box-shadow: var(--shadow); }
.device-dialog::backdrop { background: rgba(3, 14, 18, .55); }
.panel-sheet { position: fixed; inset: auto 0 var(--sheet-keyboard-offset, 0px); width: min(100%, 640px); max-width: none; height: min(78dvh, calc(var(--sheet-viewport-height, 100dvh) - 12px)); max-height: none; margin: 0 auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--panel); color: var(--ink); color-scheme: dark; box-shadow: var(--shadow); }
.panel-sheet[open] { display: grid; grid-template-rows: minmax(0, 1fr); animation: sheet-enter .26s cubic-bezier(.22, 1, .36, 1); }
.panel-sheet::backdrop { background: rgba(3, 14, 18, .55); }
.panel-sheet > .chat-panel, .panel-sheet > .details-panel { position: relative; inset: auto; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.panel-sheet .chat-heading { position: relative; padding-top: 28px; }
.panel-sheet .chat-heading::before { content: ''; position: absolute; top: 10px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 2px; background: var(--muted); opacity: .6; }
.panel-sheet .panel-close { width: 44px; height: 44px; flex: 0 0 44px; }
.panel-sheet :is(button, input) { min-height: 44px; }
.panel-sheet :is(button, input):focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.panel-sheet .chat-form { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.panel-sheet .chat-form input { font-size: 16px; }
.panel-sheet .details-content { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
.panel-sheet :is(.chat-messages, .details-content) { overscroll-behavior: contain; }
@keyframes sheet-enter { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
.device-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.device-dialog-heading h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.device-dialog .panel-close { width: 44px; height: 44px; flex: 0 0 44px; }
.device-dialog-copy, .device-dialog-status { color: var(--muted); font-size: 14px; line-height: 1.45; }
.device-dialog-copy { margin: 16px 0 24px; }
.device-dialog .device-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.device-dialog select { min-height: 44px; font: inherit; }
.device-dialog-status { min-height: 42px; margin: 20px 0; }
.device-dialog-status[data-tone="bad"] { color: #ffb8b2; }
.device-dialog-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.device-dialog .button:focus-visible, .device-dialog .panel-close:focus-visible, [data-device-settings]:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.control-button:disabled { opacity: .5; cursor: wait; }
.control-button.is-raised { border-color: var(--orange); background: rgba(239, 139, 57, .2); color: #ffd0a5; }
[data-raise-hand]:focus-visible, [data-reactions-toggle]:focus-visible, .reaction-options button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.tile-hand { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 84px); padding: 6px 9px; border-radius: 8px; background: #372b20; color: #ffd0a5; font-size: 12px; }
.tile-hand svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.meeting-feedback { position: absolute; top: 88px; left: 24px; z-index: 3; display: grid; gap: 8px; width: min(260px, calc(100% - 48px)); pointer-events: none; }
.interaction-notice { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-deep); color: #ffd0a5; font-size: 13px; }
.raised-hands { max-height: 25dvh; overflow: auto; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-deep); pointer-events: auto; }
.raised-hands h2 { margin: 0 0 8px; color: #ffd0a5; font-size: 13px; font-weight: var(--weight-medium); }
.raised-hands ol { margin: 0; padding-left: 20px; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.raised-hands li + li { margin-top: 4px; }
.reaction-feed { display: grid; gap: 8px; }
.meeting-reaction { display: inline-flex; align-items: center; justify-self: start; gap: 10px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-deep); color: var(--ink); font-size: 13px; animation: reaction-enter .2s cubic-bezier(.22, 1, .36, 1); }
.meeting-reaction span:first-child { font-size: 24px; line-height: 1; }
.meeting-reaction span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reaction-picker { position: fixed; inset: auto; width: min(288px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: 0; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.reaction-picker-title { margin: 0 0 12px; font-size: 14px; font-weight: var(--weight-medium); }
.reaction-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.reaction-options button { display: grid; justify-items: center; gap: 6px; min-height: 64px; padding: 8px 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); }
.reaction-options button:hover { border-color: var(--line); background: var(--panel-deep); }
.reaction-options button span { font-size: 26px; line-height: 1; }
.reaction-options small { font-size: 11px; }
.interaction-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes reaction-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 1400px) {
  .control-bar { bottom: 72px; }
  .video-grid { padding-bottom: 116px; }
}
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .app:has(.lobby-grid.invite-only) { display: block; }
  .lobby-grid { grid-template-columns: 1fr; }
  .lobby-grid { min-height: auto; padding: 12vh 0 6vh; }
  .lobby-grid.invite-only { grid-template-columns: 1fr; gap: 28px; min-height: auto; padding: 28px 0 48px; }
  .lobby > .brand-lockup { margin-bottom: 0; }
  .prejoin-preview-column, .prejoin-card { width: 100%; max-width: none; }
  .meeting-body, .stage { min-height: 0; }
  .meeting-header { flex-wrap: wrap; }
  .meeting-toolbar { flex-wrap: wrap; }
  .meeting-body, .meeting-body:has(> .chat-panel:not([hidden])), .meeting-body:has(> .details-panel:not([hidden])) { display: block; }
  .chat-panel, .details-panel { top: 12px; right: 12px; bottom: 12px; width: min(380px, calc(100% - 24px)); }
  .meeting-body > .chat-panel, .meeting-body > .details-panel { position: absolute; grid-column: auto; grid-row: auto; inset: 12px 12px 12px auto; width: min(380px, calc(100% - 24px)); height: auto; }
  .video-grid.layout-focus { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 110px; }
  .video-grid.layout-focus .video-tile.is-spotlight { grid-column: 1 / -1; grid-row: auto; }
  .video-grid.has-presentation { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 3fr) minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
  .video-grid.has-presentation .video-tile.is-spotlight { grid-column: 1 / -1; grid-row: 1; max-width: min(100%, 120cqh); }
  .video-grid.has-presentation .video-tile:not(.is-spotlight) { grid-column: auto; max-width: min(100%, 40cqh); }
}
@media (max-width: 560px) {
  .app { padding: 16px; }
  .meeting-header { align-items: flex-start; padding: 0 16px; }
  .meeting-toolbar { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .room-badge { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .room-actions { flex-wrap: wrap; }
  .control-bar { display: grid; grid-template-columns: repeat(4, 44px); bottom: 64px; gap: 4px; padding: 8px; border-radius: 24px; }
  .control-button.leave-control { margin-left: 0; }
  .control-button { width: 44px; height: 44px; min-width: 44px; }
  .meeting-meta { left: 12px; bottom: 14px; font-size: 11px; }
  .meeting-utility { right: 16px; bottom: 18px; }
  .utility-button span { display: none; }
  .lobby-copy h1 { font-size: 48px; }
  .prejoin-heading { display: block; }
  .prejoin-room { max-width: none; }
  .device-grid { grid-template-columns: 1fr; }
  .device-grid label:first-child { grid-column: auto; }
  .video-grid { padding-top: 118px; padding-bottom: 180px; }
  .meeting-feedback { top: 148px; left: 16px; width: min(220px, calc(100% - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  .meeting-body, .meeting-body > .chat-panel, .meeting-body > .details-panel { transition: none; }
  .meeting-reaction { animation: none; }
  .panel-sheet[open] { animation: none; }
}
