:root {
  --bg: #f5f6f8; --bg2: #ffffff; --bg3: #f1f3f6; --bg4: #e6e9ee; --line: #e0e3e9;
  --text: #1b1d24; --muted: #6a7180; --accent: #0e6bff; --accent2: #0958d9; --accent-soft: rgba(14, 107, 255, .14);
  --danger: #e02d33; --danger2: #c4242a; --ok: #10a36c; --warn: #f5a524; --tile: #d6dbe4; --stage: #eceef2;
  --radius: 14px; --shadow: 0 12px 36px rgba(24, 34, 64, .16); --shadow-sm: 0 1px 3px rgba(24, 34, 64, .08);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; overflow: hidden; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.view { height: 100dvh; display: flex; flex-direction: column; animation: fade .25s ease; overflow: auto; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- shared controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: 10px; background: var(--bg4); color: var(--text); font-weight: 600; transition: background .15s, transform .08s, opacity .15s; white-space: nowrap; }
.btn:hover { background: #d9dde4; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger2); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg3); color: var(--text); }
.btn.big { padding: 13px 22px; font-size: 16px; width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--accent); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--bg4); color: var(--text); }
.icon-btn svg.ic { width: 18px; height: 18px; }
.field { display: block; margin: 14px 0; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input, select, textarea { background: #fff; border: 1px solid #cfd4dc; border-radius: 10px; padding: 11px 13px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; text-overflow: ellipsis; }
.form-error { background: rgba(224, 45, 51, .1); color: #c4242a; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex: none; font-size: 14px; text-transform: uppercase; user-select: none; }
.avatar.big { width: 96px; height: 96px; font-size: 36px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--bg4); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.switch { position: relative; width: 38px; height: 22px; border-radius: 22px; background: #c5cad3; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }

/* ---------- home ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 19px; font-weight: 500; letter-spacing: -.2px; }
.brand b { color: var(--accent); font-weight: 700; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #3d8bff, #0b56d6); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.brand-mark svg.ic { width: 20px; height: 20px; fill: #fff; stroke: none; }
.home-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; text-transform: uppercase; }
.home-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 48px; align-items: center; max-width: 1180px; width: 100%; margin: 0 auto; padding: 24px 28px 48px; }
.home-left h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.08; letter-spacing: -1.2px; margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 17px; max-width: 520px; margin: 0 0 34px; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 520px; }
.action { text-align: left; background: var(--bg2); box-shadow: var(--shadow-sm); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, border-color .15s, background .15s; }
.action:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 22px rgba(14, 107, 255, .14); }
.action b { font-size: 16px; margin-top: 12px; }
.action small { color: var(--muted); font-size: 13px; }
.action-ic { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); }
.action.a1 .action-ic { background: linear-gradient(135deg, #ff8a4c, #f0562e); }
.action-ic svg.ic { width: 26px; height: 26px; }
.download-card { display: flex; align-items: center; gap: 14px; max-width: 520px; margin-top: 16px; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.download-card img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.download-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.download-text small { color: var(--muted); font-size: 13px; }
.download-card .btn svg.ic { width: 18px; height: 18px; }
.download-buttons { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }
.download-card { flex-wrap: wrap; } .download-card .download-text { flex: 1; min-width: 0; } .download-buttons { width: 100%; } .download-buttons .btn { flex: 1; justify-content: center; }
.download-buttons .btn { padding: 9px 14px; }
@media (max-width: 480px) { .download-card { flex-wrap: wrap; } .download-buttons { width: 100%; } .download-buttons .btn { flex: 1; } }
.home-right { display: flex; flex-direction: column; gap: 16px; align-self: stretch; justify-content: center; }
.clock-card { border-radius: 18px; padding: 28px; background: radial-gradient(120% 140% at 0% 0%, #4f9bff 0%, #0e6bff 50%, #0a48b8 100%); color: #fff; box-shadow: var(--shadow-sm); }
.clock { font-size: 46px; font-weight: 700; letter-spacing: -1px; }
.clock-date { color: rgba(255, 255, 255, .78); }
.upcoming { background: var(--bg2); box-shadow: var(--shadow-sm); border: 1px solid var(--line); border-radius: 18px; padding: 18px; min-height: 180px; max-height: 340px; overflow: auto; }
.upcoming h3 { margin: 0 0 10px; font-size: 15px; }
.up-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.up-item:first-child { border-top: 0; }
.up-main { flex: 1; min-width: 0; }
.up-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-main small { color: var(--muted); }
.up-empty { color: var(--muted); font-size: 14px; padding: 22px 0; text-align: center; }

/* ---------- sign in ---------- */
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 16px 56px; }
.auth-card { width: 100%; max-width: 400px; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-sm); }
.auth-card img { border-radius: 14px; display: block; margin-bottom: 14px; }
.auth-card h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.3px; }
.auth-card p { margin: 0 0 6px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.form-ok { background: rgba(16, 163, 108, .12); color: #0b7449; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }

/* ---------- prejoin ---------- */
.prejoin { flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 40px; align-items: center; max-width: 1080px; width: 100%; margin: 0 auto; padding: 16px 28px 40px; }
.preview { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-off { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: #e3e7ee; color: var(--muted); }
.preview-controls { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; gap: 14px; justify-content: center; }
.round { width: 52px; height: 52px; border-radius: 50%; background: rgba(40, 44, 54, .82); backdrop-filter: blur(6px); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .14); transition: background .15s, transform .1s; }
.round:hover { background: rgba(60, 66, 80, .95); }
.round:active { transform: scale(.94); }
.round.off { background: var(--danger); border-color: transparent; }
.preview-meter { position: absolute; left: 16px; bottom: 22px; width: 6px; height: 40px; border-radius: 6px; background: rgba(255, 255, 255, .18); overflow: hidden; display: flex; align-items: flex-end; }
.preview-meter span { display: block; width: 100%; height: 0%; background: var(--ok); transition: height .08s; }
.device-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.device-row label { display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.device-row select { padding: 8px 30px 8px 10px; font-size: 13px; min-width: 0; }
.prejoin-form h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.4px; overflow-wrap: anywhere; }
.prejoin-form .btn.ghost { width: 100%; margin-top: 8px; }

/* ---------- centered cards ---------- */
.center-card { margin: auto; text-align: center; padding: 40px 28px; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.center-card h2 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.3px; }
.ended-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }

/* ---------- room ---------- */
.room { background: var(--stage); overflow: hidden; }
.topbar { background: var(--bg2); border-bottom: 1px solid var(--line); flex: none; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; gap: 10px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; background: var(--bg3); font-size: 13px; font-weight: 600; color: var(--text); max-width: 46vw; transition: background .15s; }
button.chip:hover { background: var(--bg4); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip svg.ic { width: 16px; height: 16px; }
.chip #room-topic { max-width: 30vw; }
#btn-info svg.ic { color: var(--ok); }
.chip.rec { background: rgba(224, 45, 51, .1); color: #c4242a; }
.chip.warn { background: rgba(245, 165, 36, .18); color: #8f5b00; }
.chip.icon-only { padding: 6px 8px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s infinite; flex: none; }
.rec-dot.green { background: var(--ok); }
@keyframes pulse { 50% { opacity: .35; } }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; padding: 0 4px; }

.room-body { flex: 1; min-height: 0; display: flex; }
.stage-wrap { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; padding: 8px 10px 8px; gap: 8px; }
.stage { flex: 1; min-height: 0; position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; }
.strip { flex: none; display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.strip .tile { width: 168px; height: 95px; flex: none; }
.strip .tile .avatar { width: 40px; height: 40px; font-size: 16px; }
.tile { position: relative; background: var(--tile); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: box-shadow .15s; animation: tile-in .25s ease; }
@keyframes tile-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.contain video { object-fit: contain; }
.tile.mirror video { transform: scaleX(-1); }
.tile.novideo video { visibility: hidden; }
/* the person's camera is on but no picture is arriving: initials and a note instead of a black box */
.tile.stalled video { visibility: hidden; }
.tile.stalled::after { content: 'Video is not arriving'; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tile .avatar { width: 22%; height: auto; aspect-ratio: 1; max-width: 140px; min-width: 40px; font-size: clamp(16px, 4vw, 48px); }
.tile.speaking { box-shadow: 0 0 0 3px var(--ok); }
.tile-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 7px; background: rgba(0, 0, 0, .58); color: #fff; font-size: 13px; font-weight: 500; z-index: 2; }
.tile-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-name svg.ic { width: 14px; height: 14px; color: #ff6b70; }
.tile-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 2; }
.tile-badge { background: rgba(0, 0, 0, .58); border-radius: 8px; padding: 3px 7px; font-size: 16px; line-height: 1.2; }
.tile-badge.hand { background: var(--warn); animation: wave 1s ease-in-out infinite alternate; }
@keyframes wave { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.tile-react { position: absolute; right: 10px; top: 8px; font-size: clamp(28px, 5vw, 46px); z-index: 3; animation: pop 4s ease forwards; pointer-events: none; }
@keyframes pop { 0% { transform: scale(0) translateY(10px); opacity: 0; } 8% { transform: scale(1.25); opacity: 1; } 14% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.tile-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; z-index: 4; }
.tile:hover .tile-actions, .tile.pinned .tile-actions { opacity: 1; }
.tile-actions button { width: 30px; height: 30px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.tile-actions button:hover { background: var(--accent); }
.tile-actions svg.ic { width: 16px; height: 16px; }
.tile.pinned .tile-actions .pin-btn { background: var(--accent); }
.tile-conn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .72); font-size: 13px; color: var(--text); z-index: 1; gap: 8px; }
.banner { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: #e6f8ee; border: 1px solid #a9e2c5; color: #0b7449; box-shadow: var(--shadow-sm); padding: 6px 8px 6px 14px; border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; z-index: 6; white-space: nowrap; }
.reconnect { position: absolute; inset: 0; background: rgba(245, 246, 248, .86); display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; z-index: 9; font-weight: 600; }

.chip.accent { background: var(--accent-soft); color: var(--accent); }
button.chip.accent:hover { background: rgba(14, 107, 255, .22); }
.tile.wb { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.wb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; touch-action: none; cursor: crosshair; }
.wb-bar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); max-width: calc(100% - 16px); overflow-x: auto; }
.wb-color { width: 24px; height: 24px; border-radius: 50%; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.wb-color.on { box-shadow: 0 0 0 2px var(--accent); }
.wb-size { width: auto; padding: 4px 26px 4px 8px; font-size: 13px; border-radius: 8px; flex: none; }
.wb-btn { padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; background: var(--bg3); color: var(--text); white-space: nowrap; flex: none; }
.wb-btn:hover { background: var(--bg4); }
.wb-btn.on { background: var(--accent); color: #fff; }
.wb-btn.danger { color: var(--danger); }
.strip .tile.wb .wb-bar { display: none; }
/* drawing on a shared screen */
.ann-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.tile.annotating .ann-canvas { pointer-events: auto; cursor: crosshair; touch-action: none; }
.ann-toggle, .ann-hide { position: absolute; top: 10px; left: 10px; z-index: 6; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(20, 22, 28, .78); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.ann-toggle:hover, .ann-hide:hover { background: rgba(20, 22, 28, .92); }
.ann-hide { left: auto; right: 52px; }
.ann-toggle[hidden] { display: none; }
.ann-bar { top: auto; bottom: 44px; flex-wrap: nowrap; }
.strip .ann-toggle, .strip .ann-bar, .strip .ann-hide { display: none; }
.tile.annotating { box-shadow: 0 0 0 3px var(--accent); }
.bo-room { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 10px 0; }
.bo-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; min-height: 34px; }
.bo-head small { color: var(--muted); font-weight: 500; }
.bo-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.bo-row b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-row select { width: auto; max-width: 160px; padding: 5px 28px 5px 10px; font-size: 13px; border-radius: 8px; }
.bo-empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
.bo-broadcast { display: flex; gap: 8px; margin-top: 12px; }
.bo-broadcast input { padding: 7px 10px; font-size: 14px; }

.room:not(.is-mod) .mod-only { display: none !important; }
.captions { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 7; display: flex; flex-direction: column; gap: 4px; align-items: center; width: min(760px, calc(100% - 32px)); pointer-events: none; }
.cc-line { background: rgba(0, 0, 0, .78); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 17px; line-height: 1.35; max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.cc-line b { color: #9cc4ff; font-weight: 600; }
.file-card { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 2px 0; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); max-width: 250px; }
.file-card:hover { border-color: var(--accent); }
.file-card svg.ic { width: 18px; height: 18px; color: var(--accent); }
.file-card .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.file-card small { color: var(--muted); flex: none; }
.msg.me .msg-body .file-card { color: var(--text); text-decoration: none; }
.icon-btn.attach { width: 42px; height: 42px; flex: none; }
.poll-q { color: var(--text) !important; font-size: 17px; font-weight: 600; }
.poll-choice { display: block; width: 100%; text-align: left; padding: 11px 14px; margin: 8px 0; border-radius: 10px; border: 1px solid #cfd4dc; background: #fff; font-weight: 500; }
.poll-choice:hover { border-color: var(--accent); }
.poll-choice.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.poll-opt { margin: 10px 0; }
.poll-opt-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 4px; }
.poll-bar { height: 8px; border-radius: 8px; background: var(--bg4); overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .3s; }

.chip.live { background: var(--danger); color: #fff; }
.chip.live .rec-dot { background: #fff; }
.live-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.live-box.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.live-head { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.live-head small { color: var(--muted); font-weight: 500; margin-left: auto; text-align: right; }
.live-body { margin-top: 10px; }
.live-body .field { margin: 8px 0; }
.live-logo { width: 26px; height: 26px; border-radius: 7px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }

.brand img { height: 44px; width: auto; display: block; }
.watermark { position: absolute; top: 16px; right: 20px; width: 112px; height: auto; opacity: .93; pointer-events: none; z-index: 5; border-radius: 9px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); user-select: none; }
@media (max-width: 760px) { .watermark { width: 78px; top: 8px; right: 10px; } }

.stage-wrap.paged { padding-bottom: 58px; }
.pager { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 4px; background: rgba(20, 24, 38, .82); color: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.pager button { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 24px; line-height: 1; display: flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.pager button:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { font-size: 13px; font-weight: 700; min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- side panel ---------- */
.panel { width: 340px; flex: none; background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: slide .2s ease; min-height: 0; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel-section + .panel-section { border-top: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 16px; flex: none; }
.panel-head h3 { margin: 0; font-size: 15px; }
.people-list { flex: 1; overflow: auto; padding: 0 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; min-height: 48px; }
.person:hover { background: var(--bg3); }
.person-name { flex: 1; min-width: 0; }
.person-name b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-name small { color: var(--muted); font-size: 12px; }
.person-icons { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.person-icons svg.ic { width: 17px; height: 17px; }
.person-icons .off { color: var(--danger); }
.person-icons .hand { font-size: 16px; }
.person-actions { display: none; gap: 6px; }
.person:hover .person-actions { display: flex; }
@media (hover: none) { .person-actions { display: flex; } .person-icons.hide-on-hover { display: none; } }
.tile-actions button[hidden] { display: none; }
.person:hover .person-icons.hide-on-hover { display: none; }
.panel-foot { flex: none; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.waiting-box { margin: 0 12px 8px; background: var(--bg3); border-radius: 12px; padding: 10px 12px; flex: none; max-height: 40%; overflow: auto; }
.waiting-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.waiting-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.waiting-item b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list { flex: 1; overflow: auto; padding: 4px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; padding: 20px; }
.msg { max-width: 100%; animation: fade .2s ease; }
.msg-head { font-size: 12px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.msg-head b { color: var(--text); font-weight: 600; }
.msg-head .dm { color: #d4500f; }
.msg-body { background: var(--bg3); border-radius: 4px 12px 12px 12px; padding: 8px 11px; display: inline-block; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.msg.me { align-self: flex-end; text-align: right; }
.msg.me .msg-head { justify-content: flex-end; }
.msg.me .msg-body { background: var(--accent); color: #fff; border-radius: 12px 4px 12px 12px; text-align: left; }
.msg.me .msg-body a { color: #fff; text-decoration: underline; }
.chat-form { flex: none; border-top: 1px solid var(--line); padding: 8px 12px 12px; }
.chat-to { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chat-to select { width: auto; max-width: 220px; padding: 4px 28px 4px 10px; font-size: 13px; border-radius: 8px; color: var(--text); }
.chat-input { display: flex; gap: 6px; align-items: flex-end; }
.chat-input textarea { resize: none; max-height: 120px; }
.icon-btn.send { background: var(--accent); color: #fff; width: 42px; height: 42px; border-radius: 10px; }
.icon-btn.send:hover { background: var(--accent2); color: #fff; }

/* ---------- toolbar ---------- */
.toolbar { box-shadow: 0 -1px 0 var(--line); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--bg2); border-top: 1px solid var(--line); }
.tb-group { display: flex; align-items: center; gap: 2px; }
.tb-group.center { flex: 1; justify-content: center; min-width: 0; }
.tb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; padding: 7px 8px 5px; border-radius: 10px; color: #3a4050; font-size: 11.5px; font-weight: 500; transition: background .15s, color .15s; }
.tb:hover { background: var(--bg3); color: var(--text); }
.tb:active svg.ic { transform: scale(.9); }
.tb svg.ic { width: 23px; height: 23px; transition: transform .1s; }
.tb.off { color: var(--danger); }
.tb.active { color: var(--accent); }
.tb.share { color: var(--ok); }
.tb.share.active { color: var(--danger); }
.tb.recording { color: var(--danger); }
.tb .count { position: absolute; top: 3px; left: calc(50% + 10px); font-style: normal; font-size: 11px; color: var(--muted); }
.tb .badge { position: absolute; top: 2px; right: 14px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.tb-split { display: flex; align-items: stretch; }
.tb-caret { width: 20px; border-radius: 8px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.tb-caret:hover { background: var(--bg3); color: var(--text); }
.tb-caret svg.ic { width: 13px; height: 13px; }
.room:not(.is-host) .host-only { display: none !important; }

/* ---------- menus / modals / toasts ---------- */
#menu-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.menu { position: absolute; pointer-events: auto; min-width: 230px; max-width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); animation: menu-in .14s ease; }
@keyframes menu-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 10px 4px; font-weight: 700; }
.menu-item { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-item .check { width: 16px; flex: none; color: var(--ok); font-weight: 700; }
.menu-item:hover .check { color: #fff; }
.menu-item span.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger); color: #fff; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-info { padding: 8px 10px; font-size: 13px; }
.menu-info dt { color: var(--muted); font-size: 12px; margin-top: 8px; }
.menu-info dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; user-select: all; }
.react-row { display: flex; gap: 4px; padding: 4px; }
.react-row button { font-size: 26px; width: 44px; height: 44px; border-radius: 10px; transition: transform .1s, background .15s; }
.react-row button:hover { background: var(--bg4); transform: scale(1.18); }

#modal-layer:empty { display: none; }
#modal-layer { position: fixed; inset: 0; z-index: 60; background: rgba(22, 27, 40, .42); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease; backdrop-filter: blur(3px); }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 24px; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto; box-shadow: var(--shadow); animation: menu-in .18s ease; }
.modal h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.2px; }
.modal p { color: var(--muted); margin: 0 0 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; cursor: pointer; }
.invite-box { background: var(--bg3); border-radius: 12px; padding: 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; margin: 12px 0; }
input[type="date"], input[type="time"] { color-scheme: light; }

#toasts { position: fixed; left: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; max-width: min(380px, calc(100vw - 28px)); }
.toast { background: #23272f; color: #fff; border: 1px solid #23272f; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: toast-in .22s ease; max-width: 100%; }
.toast.out { opacity: 0; transform: translateX(-10px); transition: all .25s; }
.toast b { font-weight: 600; }
.toast .t-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Google sign-in and the email code ---------- */
.auth-card .btn.google { width: 100%; background: #fff; border: 1px solid var(--line); color: var(--text); margin-top: 12px; gap: 10px; }
.auth-card .btn.google:hover { background: var(--bg3); }
.auth-card .btn.google[hidden], .auth-or[hidden] { display: none; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 14px 0 2px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#auth-code { font-size: 22px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- landing page ---------- */
.lp { display: block; background: #fff; scroll-behavior: smooth; }
.lp a { color: inherit; }
.lp-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 12px max(20px, calc((100% - 1180px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-nav { display: flex; gap: 26px; margin-left: 18px; font-weight: 600; color: var(--muted); }
.lp-nav a:hover { color: var(--text); }
.lp-head-cta { margin-left: auto; display: flex; gap: 10px; }
.lp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 64px 20px 72px; }
.lp-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.lp-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -1.5px; margin: 18px 0 16px; }
.lp-lead { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 26px; line-height: 1.55; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp .btn.big { display: inline-flex; width: auto; margin: 0; padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.lp .btn svg.ic { width: 18px; height: 18px; }
.lp-small { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.lp-small a, .lp-foot a { color: var(--accent); font-weight: 600; }
.lp-shot { min-width: 0; }
.lp-win { background: #1c1f27; border-radius: 18px; padding: 12px; box-shadow: 0 30px 70px rgba(16, 24, 40, .22); }
.lp-win-bar { display: flex; align-items: center; gap: 6px; color: #c9cfdb; font-size: 12.5px; padding: 2px 4px 10px; }
.lp-win-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a4050; }
.lp-win-bar b { margin-left: 10px; font-weight: 600; } .lp-win-bar em { margin-left: auto; font-style: normal; opacity: .7; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lp-tile { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lp-tile i { width: 34%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .22); color: #fff; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: clamp(11px, 1.5vw, 18px); }
.lp-tile u { position: absolute; left: 6px; bottom: 6px; text-decoration: none; color: #fff; background: rgba(0, 0, 0, .45); border-radius: 6px; padding: 2px 7px; font-size: 11px; }
.lp-tile.on { outline: 2.5px solid #19c37d; outline-offset: -2.5px; }
.lp-tile.t1 { background: linear-gradient(135deg, #4f7cff, #2b4fc7); } .lp-tile.t2 { background: linear-gradient(135deg, #12b886, #0b7a5a); } .lp-tile.t3 { background: linear-gradient(135deg, #f76707, #c2410c); }
.lp-tile.t4 { background: linear-gradient(135deg, #ae3ec9, #7b2a94); } .lp-tile.t5 { background: linear-gradient(135deg, #e64980, #a61e4d); } .lp-tile.t6 { background: linear-gradient(135deg, #1098ad, #0b6b7a); }
.lp-win-tools { display: flex; justify-content: center; gap: 10px; padding: 12px 0 2px; }
.lp-win-tools span { width: 38px; height: 34px; border-radius: 9px; background: #2a2e39; color: #dfe3ea; display: flex; align-items: center; justify-content: center; }
.lp-win-tools svg.ic { width: 17px; height: 17px; }
.lp-win-tools .end { width: auto; padding: 0 14px; background: var(--danger); color: #fff; font-size: 12.5px; font-weight: 700; }
.lp-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.lp-strip div { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.lp-strip b { font-size: 28px; letter-spacing: -.6px; color: var(--accent); }
.lp-strip span { color: var(--muted); }
.lp-about { padding-top: 24px; }
.lp-about .lp-sub { margin-bottom: 0; } .lp-about .lp-sub b { color: var(--text); }
@media (max-width: 760px) { .lp-strip { grid-template-columns: 1fr; } }
.lp-sec { max-width: 1180px; margin: 0 auto; padding: 64px 20px; text-align: center; }
.lp-sec.lp-alt { max-width: none; background: var(--bg); }
.lp-sec h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.8px; margin: 0 0 8px; }
.lp-sub { color: var(--muted); font-size: 17px; margin: 0 auto 34px; max-width: 620px; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.lp-f { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #fff; }
.lp-f span { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.lp-f span svg.ic { width: 21px; height: 21px; }
.lp-f b { font-size: 16.5px; } .lp-f p { margin: 5px 0 0; color: var(--muted); }
.lp-downloads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1180px; margin: 0 auto; }
.lp-d { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lp-d b { font-size: 18px; } .lp-d p { margin: 0 0 12px; color: var(--muted); } .lp-d small { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.lp-d .btn { width: 100%; }
.lp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 18px; justify-content: center; text-align: left; }
.lp-plan { border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; background: #fff; }
.lp-plan.pro { border: 2px solid var(--accent); box-shadow: 0 16px 40px rgba(14, 107, 255, .12); }
.lp-plan > b { font-size: 17px; } .lp-price { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 6px 0 0; } .lp-price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.lp-year { margin: 0; color: var(--muted); }
.lp-plan ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 9px; flex: 1; }
.lp-plan li { padding-left: 24px; position: relative; } .lp-plan li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.lp-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 26px max(20px, calc((100% - 1180px) / 2)); border-top: 1px solid var(--line); color: var(--muted); }
.lp-foot-links { margin-left: auto; display: flex; gap: 18px; }
@media (max-width: 900px) {
  .lp-nav { display: none; }
  .lp-hero { grid-template-columns: 1fr; padding: 36px 20px 48px; gap: 32px; }
  .lp-features { grid-template-columns: 1fr 1fr; } .lp-downloads { grid-template-columns: 1fr 1fr; }
  .lp-sec { padding: 48px 20px; }
}
@media (max-width: 560px) {
  .lp-head { gap: 10px; } .lp-head-cta .btn:first-child { display: none; }
  .lp-features, .lp-downloads, .lp-plans { grid-template-columns: 1fr; }
  .lp-cta .btn { width: 100%; }
  .lp-foot-links { margin-left: 0; }
}

/* ---------- upgrade ---------- */
.ao-upgrade { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.ao-upgrade[hidden] { display: none; }
.ao-upgrade h3 { margin: 0 0 4px; font-size: 17px; }
.up-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.up-plan { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg2); cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, background .15s; }
.up-plan:hover { border-color: var(--accent); background: var(--accent-soft); }
.up-plan.best { border-color: var(--accent); }
.up-plan b { font-size: 20px; }
.up-plan span { font-size: 12.5px; color: var(--muted); }
.up-plan em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ok); }
.up-plan[disabled] { opacity: .6; cursor: default; }
.up-dialog p { margin: 0 0 6px; }
@media (max-width: 480px) { .up-plans { grid-template-columns: 1fr; } }

/* ---------- debug panel ---------- */
.debug { width: 264px; flex: none; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; font-size: 12.5px; }
.debug-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 14px; }
.dbg-modes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.dbg-modes .btn { justify-content: center; border: 1px solid var(--line); background: var(--bg3); }
.dbg-modes .btn.on { background: var(--warn); border-color: var(--warn); color: #3d2700; }
.dbg-modes .btn.on::after { content: ' · ON'; font-weight: 700; }
.dbg-sec { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.dbg-sec h4 { margin: 0 0 6px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dbg-sec dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.dbg-sec dt { color: var(--muted); white-space: nowrap; }
.dbg-sec dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.grade { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg4); color: var(--text); white-space: nowrap; }
.grade:empty { display: none; }
.grade.g0 { background: var(--danger); color: #fff; }
.grade.g1 { background: var(--warn); color: #3d2700; }
.grade.g2 { background: #cfe9dc; color: #0a5f40; }
.grade.g3 { background: var(--ok); color: #fff; }
.dbg-meter { height: 6px; border-radius: 3px; background: var(--bg4); overflow: hidden; margin-bottom: 6px; }
.dbg-meter i { display: block; height: 100%; width: 0; background: var(--ok); }
.dbg-row { display: flex; gap: 6px; margin-bottom: 6px; }
.dbg-row select { flex: 1; min-width: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg2); color: var(--text); font: inherit; }
.dbg-sec > .btn { margin-top: 6px; border: 1px solid var(--line); }
.dbg-note { margin: 6px 0 0; color: var(--muted); }
.dbg-note:empty { display: none; }
.dbg-peer { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; background: var(--bg3); margin-top: 6px; }
.dbg-peer span { color: var(--muted); overflow-wrap: anywhere; }
.dbg-peer em { font-style: normal; font-weight: 600; color: #8f5b00; }
.dbg-peer.weak { background: rgba(224, 45, 51, .09); }
#btn-debug.active { background: var(--accent-soft); color: var(--accent); }
/* slow computer mode: no animations anywhere */
.lowcpu *, .lowcpu *::before, .lowcpu *::after { animation: none !important; transition: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .debug { position: absolute; left: 0; top: 48px; bottom: 62px; z-index: 19; width: min(290px, 86vw); border-right: 1px solid var(--line); box-shadow: 4px 0 18px rgba(0, 0, 0, .12); }
  #toasts { bottom: auto; top: 56px; }
  .home-main, .prejoin { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .home-right { order: 2; }
  .panel { position: absolute; inset: 48px 0 0 0; width: auto; z-index: 20; border-left: 0; bottom: 62px; }
  .room-body { position: static; }
  .room { position: relative; }
}
.in-app #download-card { display: none !important; }
.store-app #auth-google, .store-app #auth-or, .store-app #home-pro, .store-app #home-upgrade, .store-app #ao-upgrade { display: none !important; }
.no-share #btn-share-home, .no-share #tb-share { display: none !important; }
@media (max-width: 760px) {
  /* narrow top bar: the meeting name gives way, the buttons on the right always fit */
  .topbar { padding: 0 8px; gap: 6px; }
  .topbar-left { flex: 1 1 0; overflow: hidden; }
  .topbar-left .chip { max-width: 100%; }
  .topbar-right { flex: none; gap: 6px; }
  #btn-full, #view-label { display: none; }
  #mode-chip { max-width: 30vw; padding: 6px 8px; }
  .pager { bottom: 8px; }
  .stage-wrap.paged { padding-bottom: 52px; }
  .tb { min-width: 46px; padding: 9px 6px; }
  .tb > span { display: none; }
  .tb .count { top: 1px; }
  .tb .badge { right: 2px; }
  .toolbar { padding-left: 6px; padding-right: 6px; gap: 2px; }
  .tb-group.center { overflow: visible; justify-content: space-around; }
  /* phone bar: mute, video, people, chat, More. The rest is inside More. */
  #tb-security, #tb-share, #tb-record, #tb-breakout, #tb-react { display: none !important; }
  #tb-leave { padding: 8px 12px; }
  .home-head { padding: 12px 16px; }
  .home-main, .prejoin { padding: 12px 16px 32px; }
  #home-date { display: none; }
  .strip .tile { width: 120px; height: 68px; }
  .stage-wrap { padding: 2px 6px 6px; }
  .actions { gap: 12px; }
  .action { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* free accounts: continue in the app */
#view-apponly { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; background: linear-gradient(160deg, #eef4ff, #f7f8fb 55%); }
#view-apponly[hidden] { display: none; }
.apponly { width: 100%; max-width: 560px; background: #fff; border: 1px solid #e4e7ec; border-radius: 22px; padding: 34px 30px; text-align: center; box-shadow: 0 18px 50px rgba(16, 24, 40, .08); }
.apponly h1 { font-size: 26px; margin: 18px 0 8px; }
.apponly .lead { margin: 0 auto 20px; max-width: 440px; }
.apponly .btn.big { display: flex; justify-content: center; padding: 14px 18px; font-size: 16px; margin-bottom: 14px; }
.ao-downloads { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ao-downloads .btn { justify-content: center; padding: 12px 16px; }
.ao-downloads .btn[hidden], .apponly .btn[hidden] { display: none; }
.apponly .muted { font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
.social-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.social-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.social-info small { color: var(--muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#audio-modal .field small { display: block; margin-top: 4px; font-size: 12px; }
#audio-modal select { width: 100%; }
/* social accounts page */
#view-accounts { overflow-y: auto; }
.acc-main { max-width: 920px; width: 100%; margin: 0 auto; padding: 16px 28px 56px; }
.acc-main h1 { font-size: 34px; margin: 8px 0 6px; }
.acc-main h2 { font-size: 22px; margin: 40px 0 14px; }
.acc-main .lead { color: var(--muted); margin: 0 0 22px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.acc-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.acc-tile:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.acc-tile small { font-weight: 500; color: var(--muted); font-size: 12px; }
.acc-tile.on small { color: #16a34a; }
.plat { width: 44px; height: 44px; display: inline-flex; flex: none; }
.plat svg { width: 100%; height: 100%; display: block; }
.plat.sm { width: 26px; height: 26px; }
.acc-list { display: flex; flex-direction: column; gap: 10px; }
.acc-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.acc-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-row small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
@media (max-width: 760px) { .acc-main { padding: 8px 16px 40px; } .acc-main h1 { font-size: 26px; } .acc-grid { grid-template-columns: repeat(2, 1fr); } .acc-row { flex-wrap: wrap; } }
/* microphone button level: fills with green while you speak */
#tb-mic .mic-lvl { position: absolute; top: 10px; left: 50%; width: 5px; height: 10px; margin-left: -2.5px; border-radius: 3px; overflow: hidden; pointer-events: none; }
#tb-mic .mic-lvl i { position: absolute; inset: 0; background: var(--ok); transform: scaleY(0); transform-origin: bottom; transition: transform .09s linear; }
#tb-mic.off .mic-lvl { display: none; }
.live-keylinks { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
#live-desc { resize: vertical; min-height: 54px; font: inherit; }
/* participants chip next to Recording */
#people-chip { cursor: pointer; }
#people-chip svg.ic { width: 16px; height: 16px; }
/* video buttons: a click / tap on a video shows them (hover too on a computer) */
.tile.show-actions .tile-actions { opacity: 1; }
.tile-actions .mute-btn svg.ic { color: #ff8a8d; }
.tile-actions .small-btn { display: none; }
.tile.pinned .tile-actions .small-btn, .tile:fullscreen .tile-actions .small-btn { display: inline-flex; }
.tile:fullscreen .tile-actions .big-btn { display: none; }
.tile:fullscreen { border-radius: 0; width: 100vw !important; height: 100vh !important; }
.tile:fullscreen video { object-fit: contain; }
.strip .tile-actions .big-btn, .strip .tile-actions .small-btn { display: none; }
.tile.spotlit { box-shadow: 0 0 0 3px #f5b100; }
/* Go live: tick every profile / Page / channel */
.live-picks { display: flex; flex-direction: column; gap: 2px; max-height: 230px; overflow: auto; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.live-acct { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.live-acct + .live-acct { border-top: 1px solid var(--line); }
.live-acct > b { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 2px 0; }
.live-pick { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.live-pick:hover { background: var(--bg3); }
.live-pick input { width: 17px; height: 17px; flex: none; margin: 0; }
.live-pick small { color: var(--muted); margin-left: auto; font-size: 12px; }
.live-search { margin: 4px 0 2px; padding: 8px 10px; }
.live-head .live-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.live-box.on .live-head .live-count { color: var(--ok); font-weight: 600; }
/* Social accounts: list every Page */
.acc-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.acc-page { background: var(--bg3); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--text); }
/* one person's debug numbers */
.pd-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pd-row span { color: var(--muted); }
/* host: mute / ask to unmute, always on each video */
.host-mic { position: absolute; right: 8px; bottom: 8px; z-index: 5; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; }
.host-mic[hidden] { display: none; }
.host-mic svg.ic { width: 15px; height: 15px; }
.host-mic.live { background: rgba(220, 38, 38, .88); }
.host-mic:hover { filter: brightness(1.15); }
.strip .host-mic span, .tile.small-tile .host-mic span { display: none; }
.strip .host-mic { padding: 4px 6px; right: 5px; bottom: 5px; }
.people-search { margin: 6px 12px 8px; width: calc(100% - 24px); padding: 9px 12px; }
.people-noresult { padding: 8px 14px; font-size: 13px; }
.tile.has-hostmic .tile-name { max-width: calc(100% - 130px); }
.tile.has-hostmic.small-tile .tile-name, .strip .tile.has-hostmic .tile-name { max-width: calc(100% - 52px); }
.tile.small-tile .host-mic { padding: 4px 6px; }
/* shared screen: Full screen button always visible, for everyone */
.screen-full { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(20, 22, 28, .78); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.screen-full:hover { background: rgba(20, 22, 28, .95); }
.strip .screen-full { display: none; }
.tile.contain:fullscreen { background: #000; }
