* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #111; color: #eee; font: 16px/1.4 system-ui, sans-serif; }

#grid { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 4px; height: 100vh; padding: 4px; }
.tile { position: relative; background: #222; border-radius: 6px; overflow: hidden; }
.tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.self video { transform: scaleX(-1); }
.label { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px; background: rgb(0 0 0 / .65); }
.label:empty { display: none; }
.self.alone .label { background: #a00; }
.status { position: absolute; inset: 0; display: grid; place-items: center; padding: 1em; text-align: center; color: #ddd; background: rgb(0 0 0 / .45); pointer-events: none; }
.status:empty { display: none; }

#logout { position: absolute; top: 8px; right: 8px; padding: 4px 10px; border: 0; border-radius: 4px; background: rgb(0 0 0 / .5); color: #ccc; font: inherit; font-size: 13px; cursor: pointer; }
#banner { position: fixed; inset: 0 0 auto; padding: 8px; text-align: center; font-weight: 600; background: #b00; color: #fff; }

#login { display: grid; gap: 12px; max-width: 22rem; margin: 10vh auto; padding: 1rem; }
#login label { display: grid; gap: 4px; }
#login input, #login button { width: 100%; padding: 10px; border: 1px solid #555; border-radius: 4px; background: #1b1b1b; color: inherit; font: inherit; }
#login button { border: 0; background: #3c7; color: #000; font-weight: 600; cursor: pointer; }
#login-error { min-height: 1.4em; margin: 0; color: #f77; }
