:root {
  --blue: #0b57d0; --blue-hover: #0842a0; --blue-d: #8ab4f8; --red: #ea4335; --text: #1f1f1f; --muted: #444746;
  --call-bg: #202124; --tile: #3c4043; --ctl: #333537; --ctl-hover: #434649; --panel: #fff;
  font-family: 'Google Sans', 'Roboto', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #fff; color: var(--text); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; }
.hidden { display: none !important; }
.ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; user-select: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
.screen.light { background: #fff; }
.screen.dark { background: var(--call-bg); color: #e3e3e3; }

/* top bar */
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; flex: none; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 22px; color: #5f6368; }
.logo { width: 40px; height: 32px; position: relative; }
.logo::before { content: ''; position: absolute; left: 0; top: 4px; width: 27px; height: 24px; border-radius: 3px;
  background: conic-gradient(from 225deg at 50% 50%, #00832d 0 25%, #0066da 25% 50%, #e94235 50% 62%, #2684fc 62% 75%, #00ac47 75% 100%); }
.logo::after { content: ''; position: absolute; left: 25px; top: 8px; border-left: 0 solid transparent; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 13px solid #00ac47; }
.brand-name { font-weight: 400; color: #444746; }
.topbar-right { display: flex; align-items: center; gap: 20px; color: #444746; font-size: 18px; }
.topbar-right .ms { font-size: 24px; }
.me-chip { width: 32px; height: 32px; border-radius: 50%; background: #7b1fa2; color: #fff; display: grid; place-items: center; font-size: 15px; }

/* buttons */
.btn-filled { background: var(--blue); color: #fff; border-radius: 100px; height: 48px; padding: 0 24px 0 16px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; letter-spacing: .1px; }
.btn-filled:hover { background: var(--blue-hover); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.btn-filled:disabled { background: rgba(31,31,31,.12); color: rgba(31,31,31,.38); cursor: default; box-shadow: none; }
.btn-filled.big { height: 56px; padding: 0 32px; font-size: 16px; }
.btn-text { color: var(--blue); font-weight: 500; padding: 0 12px; height: 40px; border-radius: 100px; display: inline-flex; align-items: center; gap: 6px; }
.btn-text:disabled { color: rgba(31,31,31,.38); }
.btn-text .ms { font-size: 18px; }
.btn-outline { border: 1px solid #747775; color: var(--blue); border-radius: 100px; height: 40px; padding: 0 20px; font-weight: 500; }

/* landing */
.landing-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 48px; padding: 0 64px; flex-wrap: wrap; overflow: auto; }
.landing-copy { max-width: 600px; }
.landing-copy h1 { font-size: 44px; line-height: 52px; font-weight: 400; margin: 0 0 16px; }
.landing-copy > p { font-size: 18px; line-height: 26px; color: var(--muted); margin: 0 0 40px; max-width: 520px; }
.landing-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.code-field { display: flex; align-items: center; gap: 8px; border: 1px solid #747775; border-radius: 4px; height: 48px; padding: 0 4px 0 12px; }
.code-field:focus-within { border: 2px solid var(--blue); padding-left: 11px; }
.code-field .ms { color: var(--muted); }
.code-field input { border: 0; outline: 0; width: 190px; font-size: 16px; }
.landing-copy hr { border: 0; border-top: 1px solid #c4c7c5; margin: 32px 0 16px; }
.landing-art { width: 360px; text-align: center; }
.art-circle { width: 300px; height: 300px; border-radius: 50%; background: #e8f0fe; margin: 0 auto 24px; display: grid; place-items: center; }
.art-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 190px; }
.art-tiles i { aspect-ratio: 4/3; border-radius: 8px; background: #a8c7fa; }
.art-tiles i:nth-child(2) { background: #7fcfff; }
.art-tiles i:nth-child(4) { background: #c2e7ff; }
.art-tiles i.ai { background: #0b57d0; position: relative; }
.art-tiles i.ai::after { content: ''; position: absolute; inset: 30% 38%; border-radius: 50%; background: #fff; opacity: .9; }
.landing-art h2 { font-weight: 400; font-size: 24px; margin: 0 0 8px; }

/* green room */
.green-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 0 48px 40px; flex-wrap: wrap; overflow: auto; }
.preview-col { width: min(740px, 100%); }
.preview { position: relative; aspect-ratio: 16/9; background: #202124; border-radius: 8px; overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-off { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 24px; }
.preview-name { position: absolute; top: 16px; left: 16px; color: #fff; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.preview-more { position: absolute; top: 12px; right: 12px; color: #fff; }
.preview-controls { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 24px; }
.round-ctl { width: 56px; height: 56px; border-radius: 50%; border: 1px solid #fff; color: #fff; display: grid; place-items: center; background: transparent; }
.round-ctl:hover { background: rgba(255,255,255,.15); }
.round-ctl.off { background: var(--red); border-color: var(--red); }
.round-ctl.ghost { border-color: transparent; background: rgba(255,255,255,.12); }
.device-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dev { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c4c7c5; border-radius: 100px; padding: 6px 12px; font-size: 13px; color: var(--muted); max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dev .ms { font-size: 18px; }
.join-col { width: 340px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.join-col h2 { font-size: 36px; font-weight: 400; margin: 0 0 8px; }
.join-col > p { margin: 0 0 16px; }
.lobby-list { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-bottom: 16px; max-height: 260px; overflow: auto; }
.lob { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 12px; background: #f0f4f9; text-align: left; }
.lob .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 14px; flex: none; }
.lob .nm { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lob .pts { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.lob .pts .ms { font-size: 16px; color: #e37400; font-variation-settings: 'FILL' 1; }
.lob .st { font-size: 12px; color: var(--muted); width: 74px; text-align: right; }
.lob .st.ok { color: #146c2e; font-weight: 500; }
.lob.off { opacity: .45; }
.name-field { width: 100%; margin-bottom: 16px; }
.name-field input { width: 100%; height: 56px; border: 1px solid #747775; border-radius: 4px; padding: 0 16px; font-size: 16px; outline: 0; }
.name-field input:focus { border: 2px solid var(--blue); padding: 0 15px; }
.join-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.other-ways { margin-top: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.countdown { font-size: 15px; color: var(--blue); font-weight: 500; }

/* call */
.call-body { flex: 1; display: flex; min-height: 0; padding: 16px 16px 0; gap: 16px; }
.stage-wrap { flex: 1; position: relative; min-width: 0; }
.stage { position: absolute; inset: 0; }
.tile { position: absolute; background: var(--tile); border-radius: 12px; overflow: hidden; transition: left .35s, top .35s, width .35s, height .35s, opacity .4s; }
.tile video, .tile canvas.ai-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.self video { transform: none; }
.tile .camoff { position: absolute; inset: 0; display: none; place-items: center; background: var(--tile); }
.tile .camoff span { width: min(28%, 140px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: clamp(24px, 4vw, 56px); }
.tile.cam-off .camoff { display: grid; }
.tile.cam-off video { visibility: hidden; }
.tile .label { position: absolute; left: 12px; bottom: 10px; font-size: 14px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); z-index: 4; display: flex; gap: 6px; align-items: center; max-width: 80%; }
.tile .label .ms { font-size: 18px; color: #ffd75e; font-variation-settings: 'FILL' 1; }
.tile .mic { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(32,33,36,.55); display: none; place-items: center; z-index: 4; }
.tile .mic .ms { font-size: 16px; color: #fff; }
.tile.muted .mic { display: grid; }
.tile .talk { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-d); display: none; align-items: center; justify-content: center; gap: 2px; z-index: 4; }
.tile .talk i { width: 3px; border-radius: 2px; background: #062e6f; height: 4px; transition: height .08s; }
.tile.speaking .talk { display: flex; }
.tile.muted .talk { display: none !important; }
.tile::after { content: ''; position: absolute; inset: 0; border-radius: 12px; border: 3px solid var(--blue-d); opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 5; }
.tile.speaking::after { opacity: 1; }
.tile .fx-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.fx-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: transparent; }
.stage-wrap > .fx-frame { z-index: 20; }
.tile .hand { position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: #e8f0fe; color: #0b57d0; display: none; place-items: center; z-index: 4; }
.tile.hand-up .hand { display: grid; }
.tile .hand .ms { font-size: 20px; }
.tile.gone { opacity: 0; pointer-events: none; }
.tile.ghost { filter: grayscale(1) brightness(.6); }
.tile .ai-chip { position: absolute; right: 10px; bottom: 10px; z-index: 4; font-size: 11px; padding: 2px 8px; border-radius: 100px; background: rgba(32,33,36,.6); color: #c4c7c5; }

/* tile styles from the AI */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%,100% { transform: translate(0,0) } 20% { transform: translate(-14px,6px) rotate(-2deg) } 40% { transform: translate(12px,-8px) rotate(2deg) } 60% { transform: translate(-10px,-4px) } 80% { transform: translate(9px,7px) rotate(1deg) } }
@keyframes bounce { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14%) } }
@keyframes float { 0%,100% { transform: translate(0,0) rotate(-3deg) } 50% { transform: translate(4%,-8%) rotate(3deg) } }
@keyframes wobble { 0%,100% { transform: skewX(0) } 25% { transform: skewX(12deg) scaleY(.95) } 75% { transform: skewX(-12deg) scaleY(1.05) } }
@keyframes hue { to { filter: hue-rotate(360deg) saturate(2); } }
.st-spin { animation: spin 1.6s linear infinite; }
.st-shake { animation: shake .35s linear infinite; }
.st-bounce { animation: bounce .6s ease-in-out infinite; }
.st-float { animation: float 3s ease-in-out infinite; }
.st-wobble { animation: wobble .8s ease-in-out infinite; }
.st-flip > * { transform: scaleX(-1); }
.st-upside_down { transform: rotate(180deg); }
.st-shrink { transform: scale(.55); }
.st-grow { transform: scale(1.18); z-index: 10; }
.st-tiny { transform: scale(.25); }
.st-grayscale { filter: grayscale(1); }
.st-invert { filter: invert(1); }
.st-blur { filter: blur(10px); }
.st-hue { animation: hue 2s linear infinite; }

/* bottom bar */
.bar { height: 80px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 24px; }
.bar-left { width: 260px; font-size: 16px; color: #e3e3e3; display: flex; gap: 12px; align-items: center; white-space: nowrap; overflow: hidden; }
.bar-left .sep { color: #5f6368; }
.bar-mid { display: flex; gap: 10px; align-items: center; position: relative; }
.bar-right { width: 260px; display: flex; justify-content: flex-end; gap: 4px; }
.ctl { width: 48px; height: 48px; border-radius: 100px; background: var(--ctl); color: #e3e3e3; display: grid; place-items: center; position: relative; transition: background .15s, border-radius .2s; }
.ctl:hover { background: var(--ctl-hover); }
.ctl .ms { font-size: 22px; }
.ctl.off { background: #f9dedc; color: #410e0b; border-radius: 16px; width: 56px; }
.ctl.off:hover { background: #f2b8b5; }
.ctl.on { background: #a8c7fa; color: #062e6f; }
.ctl.end { background: #dc362e; width: 68px; color: #fff; }
.ctl.end:hover { background: #e2564f; }
.ctl.flat { background: transparent; }
.ctl.flat:hover { background: rgba(255,255,255,.08); }
.ctl.flat.active { color: #a8c7fa; }
.ctl.flat.active .ms { font-variation-settings: 'FILL' 1; }
.ctl.locked { opacity: .5; pointer-events: none; }
.badge { position: absolute; top: 4px; right: 2px; font-size: 11px; background: #5f6368; color: #fff; border-radius: 100px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #8ab4f8; }
.emoji-tray { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); background: #2d2e30; border-radius: 100px; padding: 6px 10px; display: flex; gap: 2px; box-shadow: 0 4px 12px rgba(0,0,0,.4); z-index: 30; }
.emoji-tray button { font-size: 26px; width: 44px; height: 44px; border-radius: 50%; }
.emoji-tray button:hover { background: #3c4043; }

/* side panel */
.panel { width: 360px; flex: none; background: var(--panel); color: var(--text); border-radius: 12px; display: flex; flex-direction: column; margin-bottom: 0; overflow: hidden; }
.panel-head { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 24px; flex: none; }
.panel-head h3 { font-size: 18px; font-weight: 400; margin: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.icon-btn:hover { background: #f1f3f4; }
.panel-body { flex: 1; overflow: auto; padding: 0 24px 16px; display: flex; flex-direction: column; min-height: 0; }
.panel-note { background: #f0f4f9; border-radius: 8px; padding: 12px; font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 18px; }
.people-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.people-row .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.people-row .nm { flex: 1; font-size: 14px; }
.people-row .nm small { display: block; color: var(--muted); font-size: 12px; }
.people-row .ms { color: var(--muted); font-size: 20px; }
.chat-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.msg .who { font-size: 13px; font-weight: 500; }
.msg .who span { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12px; }
.msg .txt { font-size: 14px; margin-top: 4px; line-height: 20px; word-wrap: break-word; }
.msg.dead .who { color: #8e24aa; }
.chat-input { display: flex; align-items: center; background: #f1f3f4; border-radius: 100px; padding: 4px 4px 4px 16px; margin-top: 8px; flex: none; }
.chat-input input { flex: 1; border: 0; background: transparent; outline: 0; font-size: 14px; height: 40px; }
.chat-input button { width: 40px; height: 40px; border-radius: 50%; color: var(--blue); display: grid; place-items: center; }
.act-card { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 8px; cursor: pointer; }
.act-card:hover { background: #f1f3f4; }
.act-card .ic { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: #e8f0fe; color: #0b57d0; flex: none; }
.act-card b { font-weight: 500; font-size: 14px; display: block; }
.act-card span { font-size: 12px; color: var(--muted); }

/* poll */
.poll h4 { font-size: 16px; font-weight: 500; margin: 4px 0 4px; }
.poll .sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.poll label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #c4c7c5; border-radius: 8px; margin-bottom: 8px; cursor: pointer; font-size: 14px; }
.poll label:hover { background: #f8f9fa; }
.poll label.sel { border-color: var(--blue); background: #e8f0fe; }
.poll label .v { margin-left: auto; color: #146c2e; font-size: 12px; }
.poll input { accent-color: var(--blue); width: 18px; height: 18px; }
.poll .btn-filled { width: 100%; justify-content: center; margin-top: 8px; height: 44px; }

/* controller panel */
.ctrl { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ctrl .killrow { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 10px 12px; border-radius: 8px; background: #fce8e6; color: #8c1d18; margin-bottom: 12px; }
.ctrl .killrow.ready { background: #e6f4ea; color: #0d652d; }
.ctrl .killrow .ms { font-size: 18px; }
.ctrl .ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ctrl .ideas button { font-size: 12px; border: 1px solid #c4c7c5; border-radius: 8px; padding: 6px 10px; color: var(--muted); }
.ctrl .ideas button:hover { background: #f1f3f4; }
.cmd-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.cmd { border-radius: 8px; padding: 10px 12px; background: #f8f9fa; font-size: 13px; }
.cmd .q { font-weight: 500; font-size: 14px; }
.cmd .s { color: var(--muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.cmd .s.err { color: #b3261e; }
.cmd .s.ok { color: #146c2e; }
.spin { width: 12px; height: 12px; border: 2px solid #c4c7c5; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.ctrl textarea { width: 100%; resize: none; border: 1px solid #747775; border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 14px; outline: 0; height: 84px; }
.ctrl textarea:focus { border: 2px solid var(--blue); padding: 11px 13px; }
.ctrl .send { margin-top: 8px; width: 100%; justify-content: center; height: 44px; }
.ctrl .tiny { font-size: 11px; color: var(--muted); margin-top: 6px; text-align: center; }

/* captions, toasts, reactions */
.captions { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(820px, 92%); background: rgba(32,33,36,.82); border-radius: 12px; padding: 12px 16px; z-index: 25; display: flex; gap: 14px; align-items: flex-start; pointer-events: none; }
.cap-who { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #c4c7c5; flex: none; width: 48px; }
.cap-av { width: 32px; height: 32px; border-radius: 50%; background: #0b57d0; color: #fff; display: grid; place-items: center; font-size: 12px; }
.cap-text { font-size: 18px; line-height: 26px; color: #fff; max-height: 52px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.toasts { position: absolute; left: 0; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 26; pointer-events: none; }
.toast { background: #e3e3e3; color: #1f1f1f; border-radius: 4px; padding: 12px 16px; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.35); animation: tin .25s ease-out; max-width: 360px; display: flex; align-items: center; gap: 10px; }
.toast .ms { font-size: 20px; }
@keyframes tin { from { transform: translateY(12px); opacity: 0; } }
.reactions { position: absolute; inset: 0; pointer-events: none; z-index: 27; overflow: hidden; }
.rx { position: absolute; bottom: 0; font-size: 44px; animation: rise 3.2s ease-out forwards; display: flex; flex-direction: column; align-items: center; }
.rx small { font-size: 11px; background: rgba(32,33,36,.8); color: #fff; padding: 2px 8px; border-radius: 100px; margin-top: 2px; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0 } 10% { opacity: 1 } 80% { opacity: 1 } 100% { transform: translateY(-70vh) translateX(20px); opacity: 0 } }

.meeting-banner { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 28; background: #f9dedc; color: #410e0b; border-radius: 0 0 12px 12px; padding: 10px 20px; font-size: 15px; display: flex; gap: 10px; align-items: center; font-weight: 500; }
.meeting-banner.dead { background: #e9ddff; color: #22005d; }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.78); animation: fade .3s; text-align: center; color: #fff; }
@keyframes fade { from { opacity: 0; } }
.ov-card { max-width: 640px; padding: 24px; }
.ov-kicker { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: #a8c7fa; margin-bottom: 12px; }
.ov-title { font-size: 48px; line-height: 56px; margin: 0 0 12px; font-weight: 500; }
.ov-sub { font-size: 18px; color: #c4c7c5; line-height: 26px; }
.ov-red .ov-kicker { color: #f2b8b5; }
.ov-winners { display: flex; gap: 16px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.ov-w { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ov-w .av { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: #fff; position: relative; }
.ov-w .plus { position: absolute; right: -8px; top: -6px; background: #fbbc04; color: #202124; font-size: 13px; font-weight: 700; padding: 2px 7px; border-radius: 100px; }
.ov-w b { font-weight: 500; }

/* Meet-style hover bar on a tile; the skull only shows for the controller */
.tile .hoverbar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 2px; background: rgba(32,33,36,.72); border-radius: 100px; padding: 4px; z-index: 7; opacity: 0; transition: opacity .15s; pointer-events: none; }
@media (hover: hover) { .tile:hover .hoverbar { opacity: 1; pointer-events: auto; } }
.tile .hb { width: 40px; height: 40px; border-radius: 50%; color: #e3e3e3; font-size: 22px; }
.tile .hb:hover { background: rgba(255,255,255,.12); }
.tile .hb.kill { display: none; color: #f2b8b5; }
.tile.killable .hb.kill { display: block; }
.tile .hb.kill:hover { background: rgba(234,67,53,.3); color: #fff; }
.kill-pop { position: absolute; z-index: 30; width: 300px; background: #fff; color: #1f1f1f; border-radius: 12px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 10px; }
.kp-title { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.kp-title .ms { color: #b3261e; font-size: 20px; }
.kill-pop input { border: 1px solid #747775; border-radius: 8px; height: 40px; padding: 0 12px; font-size: 14px; outline: 0; }
.kill-pop input:focus { border: 2px solid #b3261e; padding: 0 11px; }
.kp-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.kp-ideas button { font-size: 12px; border: 1px solid #c4c7c5; border-radius: 8px; padding: 5px 8px; color: #444746; }
.kp-ideas button:hover { background: #f1f3f4; }
.kp-go { background: #b3261e; color: #fff; border-radius: 100px; height: 40px; font-weight: 500; }
.kp-go:hover { background: #8c1d18; }
.kp-wait { font-size: 13px; color: #444746; }

/* control panel layout: poll and controls stack with clear spacing; the text box never shrinks */
.panel-body > .poll { flex: none; }
.poll .btn-filled { margin-bottom: 4px; }
.poll + .ctrl { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e3e3e3; }
.ctrl { flex: 1 0 auto; min-height: 260px; }
.ctrl .cmd-log { min-height: 40px; }
.ctrl textarea, .ctrl .send, .ctrl .killrow, .ctrl .ideas { flex: none; }

.tile.pinned .hb[title="Pin"] { color: #a8c7fa; font-variation-settings: 'FILL' 1; }

/* role reveal: full-screen red (imposter) or green (human) */
.overlay.reveal { background: radial-gradient(ellipse at center, var(--rv1) 0%, var(--rv2) 55%, #000 100%); animation: rvIn .5s ease-out; }
.overlay.reveal.imposter { --rv1: #e53935; --rv2: #5c0a0a; }
.overlay.reveal.human { --rv1: #2fbf71; --rv2: #0a3d22; }
@keyframes rvIn { 0% { opacity: 0; } 15% { opacity: 1; filter: brightness(2.2); } 100% { filter: brightness(1); } }
.rv-kicker { font-size: 16px; letter-spacing: 6px; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 8px; animation: rvUp .6s .15s both; }
.rv-title { font-size: clamp(64px, 12vw, 150px); line-height: 1; margin: 0 0 20px; font-weight: 700; letter-spacing: -2px; color: #fff; text-shadow: 0 0 40px rgba(255,255,255,.35), 0 8px 30px rgba(0,0,0,.5); animation: rvSlam .7s .25s cubic-bezier(.2,1.4,.4,1) both; }
.rv-sub { font-size: 20px; line-height: 28px; color: rgba(255,255,255,.9); animation: rvUp .6s .7s both; }
.rv-names { margin-top: 18px; font-size: 16px; color: rgba(255,255,255,.7); animation: rvUp .6s 1s both; }
@keyframes rvSlam { 0% { transform: scale(2.6); opacity: 0; filter: blur(12px); } 100% { transform: scale(1); opacity: 1; filter: blur(0); } }
@keyframes rvUp { from { transform: translateY(14px); opacity: 0; } }

/* removed from the meeting by the AI */
.rejoin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; background: #fff; color: #1f1f1f; border-radius: 16px; padding: 24px; width: 340px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.5); text-align: center; }
.rejoin b { display: block; font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.rejoin span { font-size: 14px; color: #444746; }
.rejoin .btn-filled { justify-content: center; }
/* soundboard */
.sb { margin-top: 16px; border-top: 1px solid #e3e3e3; padding-top: 14px; flex: none; }
.sb-head { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin-bottom: 10px; }
.sb-head .ms { font-size: 20px; color: #0b57d0; }
.sb-make { display: flex; gap: 6px; align-items: center; }
.sb-make input { flex: 1; min-width: 0; height: 38px; border: 1px solid #747775; border-radius: 8px; padding: 0 10px; font-size: 13px; outline: 0; }
.sb-make input:focus { border: 2px solid var(--blue); padding: 0 9px; }
.sb-make select { height: 38px; border: 1px solid #c4c7c5; border-radius: 8px; font: inherit; font-size: 13px; padding: 0 6px; background: #fff; }
.sb-make button { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 22px; flex: none; }
.sb-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 220px; overflow: auto; }
.sb-pad { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 8px; background: #f0f4f9; font-size: 13px; }
.sb-pad.on { background: #d3e3fd; }
.sb-pad > .ms { font-size: 18px; color: #444746; }
.sb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pad button { width: 32px; height: 32px; border-radius: 50%; color: #444746; font-size: 20px; flex: none; }
.sb-pad button:hover { background: rgba(0,0,0,.06); }
.sb-pad .sb-play { color: #0b57d0; }
.sb-pad .sb-loop.on { color: #0b57d0; font-variation-settings: 'FILL' 1; background: #d3e3fd; }
.sb-err { color: #b3261e; font-size: 12px; }
.sb-empty { font-size: 12px; color: #444746; }

.overlay.reveal.neutral { --rv1: #5f6368; --rv2: #202124; }
.rv-tiles, .rv-winners { display: flex; gap: 22px; justify-content: center; margin-top: 26px; flex-wrap: wrap; animation: rvUp .6s .9s both; }
.rv-tile { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 10px 30px rgba(0,0,0,.4); }
.rv-w { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rv-w b { font-weight: 500; font-size: 17px; }
.rv-w .plus { position: absolute; right: -6px; top: -6px; background: #fbbc04; color: #202124; font-size: 15px; font-weight: 700; padding: 3px 9px; border-radius: 100px; animation: rvSlam .5s 1.3s cubic-bezier(.2,1.4,.4,1) both; }

/* Stacks: the Stacks bar sits above our own header; it hides during the call */
.topbar { margin-top: var(--stacks-bar, 0px); }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: #ea4335; color: #fff; display: grid; place-items: center; font-size: 22px; font-variation-settings: 'FILL' 1; }
.brand-name { font-weight: 500; color: #1f1f1f; letter-spacing: -.2px; }
body.in-call #stacks-bar, body.in-call #stacks-bar-me { display: none !important; }

/* relayed players: their frames are drawn on a canvas instead of a video */
.tile .relay-view { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.relayed video { visibility: hidden; }
.tile.cam-off .relay-view { visibility: hidden; }

/* ---------- phones: modeled on the Meet mobile app ---------- */
.m-top { display: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.sheet { width: 100%; background: #2d2e30; border-radius: 20px 20px 0 0; padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; animation: sheetUp .22s ease-out; }
.sheet::before { content: ''; width: 36px; height: 4px; border-radius: 4px; background: #5f6368; margin: 0 auto 10px; }
.sheet button { display: flex; align-items: center; gap: 18px; padding: 15px 24px; font-size: 16px; color: #e3e3e3; text-align: left; }
.sheet button .ms { color: #c4c7c5; }
.sheet button:active { background: rgba(255,255,255,.08); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.tile.show-bar .hoverbar { opacity: 1; pointer-events: auto; }

@media (max-width: 720px) {
  /* landing + lobby */
  .landing-main { padding: 24px 20px; gap: 24px; align-items: flex-start; }
  .landing-copy h1 { font-size: 32px; line-height: 40px; }
  .landing-copy > p { font-size: 16px; margin-bottom: 24px; }
  .landing-actions { flex-direction: column; align-items: stretch; }
  .code-field input { width: auto; flex: 1; }
  .landing-art { display: none; }
  .topbar-right .clock { display: none; }
  .green-main { padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px)); gap: 20px; align-items: stretch; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; }
  .preview-col { width: 100%; }
  .preview { aspect-ratio: 3 / 4; max-height: 52vh; border-radius: 16px; margin: 0 auto; width: 100%; }
  .device-row { display: none; }
  .join-col { width: 100%; }
  .join-col h2 { font-size: 26px; }
  .join-actions, .join-actions .btn-filled { width: 100%; justify-content: center; }
  /* call */
  .screen.dark { background: #000; }
  .m-top { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: env(safe-area-inset-top, 0px) 10px 0 18px; flex: none; color: #e3e3e3; }
  .m-code { font-size: 17px; font-weight: 500; }
  .m-icon { width: 44px; height: 44px; border-radius: 50%; color: #e3e3e3; font-size: 24px; }
  .call-body { padding: 0 6px; }
  .tile { border-radius: 14px; }
  .tile::after { border-radius: 14px; }
  .tile.pip { z-index: 30; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.6); }
  .tile.pip .label { display: none; }
  .tile.pip .hoverbar { display: none; }
  .tile .label { left: 10px; bottom: 8px; font-size: 13px; }
  .bar { height: auto; padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px)); justify-content: center; }
  .bar-left, .bar-right, #ccBtn, .bar-mid > [title="Present now"] { display: none; }
  .bar-mid { gap: 10px; width: 100%; justify-content: space-evenly; }
  .ctl { width: 52px; height: 52px; }
  .ctl.off { width: 52px; border-radius: 50%; }
  .ctl.end { width: 64px; border-radius: 100px; }
  .ctl .ms { font-size: 24px; }
  .emoji-tray { bottom: 72px; max-width: calc(100vw - 20px); overflow-x: auto; }
  /* panels become full-screen sheets */
  .panel { position: fixed; inset: 0; width: auto; z-index: 80; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); animation: sheetUp .22s ease-out; }
  .panel-body { padding: 0 18px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .captions { bottom: 8px; left: 8px; transform: none; width: calc(100% - 150px); padding: 10px 12px; }
  .cap-text { font-size: 15px; line-height: 21px; max-height: 42px; }
  .toasts { left: 8px; bottom: 8px; right: 8px; }
  .toast { max-width: none; }
  .meeting-banner { width: calc(100% - 16px); border-radius: 12px; top: 6px; font-size: 13px; padding: 8px 12px; }
  .kill-pop { width: calc(100% - 32px); max-width: 340px; }
  .rejoin { width: calc(100% - 40px); }
  .rv-sub { font-size: 16px; line-height: 23px; padding: 0 12px; }
  .rv-tile { width: 72px; height: 72px; font-size: 30px; }
}

.net-down { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 200; background: #fce8e6; color: #8c1d18; border-radius: 100px; padding: 10px 18px; font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); }

.tile.portrait video, .tile.portrait .relay-view { object-position: 50% 20%; }

.brand .logo-img { height: 30px; width: auto; display: block; }
@media (max-width: 720px) { .brand .logo-img { height: 26px; } }

.landing-art { width: auto; flex: 0 1 520px; min-width: 280px; }
.landing-main { flex-wrap: nowrap; }
.art-img { width: 100%; height: auto; display: block; margin-bottom: 24px; mix-blend-mode: multiply; }
@media (max-width: 960px) { .landing-main { flex-wrap: wrap; } }

/* device chips under the preview: open a menu of real devices */
.dev { position: relative; cursor: pointer; font: inherit; background: #fff; max-width: 240px; overflow: visible; }
.dev:hover { background: #f1f3f4; }
.dev .dev-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dev .dev-caret { margin-left: -2px; margin-right: -4px; }
.dev-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; min-width: 260px; max-width: 360px; background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.18); padding: 8px 0; text-align: left; }
.dev-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px 10px 12px; font-size: 14px; color: #1f1f1f; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-menu button .ms { width: 20px; font-size: 20px; color: #0b57d0; flex: none; }
.dev-menu button:hover { background: #f1f3f4; }
.dev-menu button.on { color: #0b57d0; font-weight: 500; }
.dev-note { padding: 10px 16px; font-size: 13px; color: #444746; white-space: normal; }
