/* ============================================================
   Manos Plásticos — tema cyberpunk roxo/preto (paleta do logo)
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --bg-2: #101018;
  --bg-3: #16121f;
  --surface: #14101d;
  --surface-2: #1b1526;

  --p-100: #efdcff;
  --p-200: #dcb5ff;
  --p-300: #c77dff;
  --p-400: #a855f7;
  --p-500: #9333ea;
  --p-600: #7a22c4;
  --p-800: #4c1d95;
  --p-900: #37135f;

  --border: #2b2140;
  --border-strong: #3d2c5e;
  --glow: rgba(168, 85, 247, 0.28);

  --text: #ece7f5;
  --text-dim: #9d94b3;
  --danger: #f4415f;
  --danger-dim: #7a1f30;
  --ok: #3ddc84;
  --busy: #f0b429;

  --grad: linear-gradient(135deg, var(--p-300), var(--p-600));
  --font-head: "Rajdhani", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --chamfer: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

.chamfered, .btn, .tile, .auth__card, .field__input {
  clip-path: polygon(
    var(--chamfer) 0, 100% 0,
    100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%,
    0 100%, 0 var(--chamfer)
  );
}

/* ============================================================
   Campos e botões
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }

.field__label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-300);
}

.field__input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: 500 15px var(--font-body);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input:focus { border-color: var(--p-400); box-shadow: 0 0 0 2px var(--glow); }

select.field__input { cursor: pointer; }

.btn {
  border: 1px solid var(--p-500);
  background: var(--grad);
  color: #fff;
  font: 700 15px var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  transition: filter 0.15s, box-shadow 0.15s;
}

.btn:hover { filter: brightness(1.12); box-shadow: 0 0 22px var(--glow); }
.btn:disabled { filter: saturate(0.3) brightness(0.7); cursor: wait; }

.btn--ghost {
  background: var(--bg-2);
  border-color: var(--border-strong);
  color: var(--p-200);
}

/* ============================================================
   Avatares (foto ou iniciais coloridas)
   ============================================================ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font: 700 15px var(--font-head);
  color: #fff;
  flex-shrink: 0;
  background: var(--grad);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   TELA DE LOGIN
   ============================================================ */
.auth {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 45% at 50% -5%, rgba(147, 51, 234, 0.16), transparent),
    radial-gradient(ellipse 45% 35% at 85% 105%, rgba(124, 34, 196, 0.1), transparent),
    var(--bg);
}

.auth__card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 34px 32px 30px;
  box-shadow: 0 0 42px var(--glow), 0 24px 60px rgba(0, 0, 0, 0.55);
}

.auth__logo {
  display: block;
  width: 72%;
  margin: 0 auto 26px;
  filter: drop-shadow(0 6px 18px rgba(168, 85, 247, 0.35));
}

.auth__tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.auth__tab {
  flex: 1;
  padding: 10px 0;
  font: 700 14px var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.auth__tab:hover { color: var(--text); }
.auth__tab.selected { color: var(--p-200); border-bottom-color: var(--p-400); }

.auth__form { display: flex; flex-direction: column; gap: 16px; }
.auth__error { color: var(--danger); font-size: 14px; text-align: center; }

/* ============================================================
   APP SHELL: rail | centro | chat
   ============================================================ */
.app {
  height: 100%;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
}

.app.chat-hidden { grid-template-columns: 250px minmax(0, 1fr) 0; }
.app.chat-hidden .chat { display: none; }

/* ------------------------------------------------ rail (coluna esquerda) */
.rail {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  min-height: 0;
}

.rail__home {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.rail__home img { width: 100%; max-height: 74px; object-fit: contain; }
.rail__home:hover { background: var(--surface-2); }

.rail__section { padding: 12px 0 6px; min-height: 0; }
.rail__section--grow { flex: 1; overflow-y: auto; }

.rail__title {
  font: 700 12px var(--font-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--p-300);
  padding: 0 14px 8px;
}

/* canais */
.channel {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px 14px;
  gap: 4px;
  text-align: left;
  transition: background 0.13s;
}

.channel:hover { background: var(--surface-2); }
.channel.active { background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), transparent); }

.channel__row { display: flex; align-items: center; gap: 8px; }

.channel__icon { color: var(--p-500); font-size: 12px; }
.channel.active .channel__icon { color: var(--p-300); }

.channel__name {
  font: 600 15px var(--font-head);
  letter-spacing: 0.04em;
  color: var(--text-dim);
  flex: 1;
}
.channel:hover .channel__name, .channel.active .channel__name { color: var(--text); }

.channel__occupants {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 20px;
}

.channel__occ {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.channel__occ .avatar { width: 18px; height: 18px; font-size: 9px; }

/* membros */
.members { list-style: none; }

.member {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  font-size: 14px;
  position: relative;
}

.member .avatar { width: 28px; height: 28px; font-size: 12px; }
.member--offline { opacity: 0.42; }

.member__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.member__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.member__sub { font-size: 11.5px; color: var(--text-dim); }

.member__crown { font-size: 11px; color: var(--busy); }
.member__muted-icon { font-size: 11px; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.dot--online { background: var(--ok); }
.dot--busy { background: var(--busy); }
.dot--offline { background: #4a4458; }

/* botões de admin (aparecem no hover de um membro) */
.member__actions { display: none; gap: 4px; }
.member:hover .member__actions { display: flex; }

.mini-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: border-color 0.13s, background 0.13s;
}
.mini-btn:hover { border-color: var(--p-400); background: var(--surface-2); }
.mini-btn--danger:hover { border-color: var(--danger); }

/* selfbar (rodapé da rail) */
.selfbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-3);
}

.selfbar__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font: 700 15px var(--font-head);
  color: #fff;
  background: var(--grad);
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.selfbar__avatar:hover { border-color: var(--p-300); }
.selfbar__avatar img { width: 100%; height: 100%; object-fit: cover; }

.selfbar__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.selfbar__name {
  font: 600 14px var(--font-head);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selfbar__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  width: fit-content;
}
.selfbar__status:hover { color: var(--text); }

.selfbar__gear { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; }
.selfbar__gear svg { width: 19px; height: 19px; fill: var(--text-dim); transition: fill 0.15s, transform 0.3s; }
.selfbar__gear:hover svg { fill: var(--p-200); transform: rotate(45deg); }

/* ------------------------------------------------ centro */
.center { min-width: 0; display: flex; flex-direction: column; }

.home {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background:
    radial-gradient(ellipse 55% 45% at 50% 30%, rgba(147, 51, 234, 0.10), transparent),
    var(--bg);
}

.home__logo { width: min(380px, 70%); filter: drop-shadow(0 8px 24px rgba(168, 85, 247, 0.3)); }
.home__hint { color: var(--text-dim); font-size: 15px; }

/* botão de baixar o app desktop (só aparece se houver instalador no servidor) */
.download {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 11px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.download:hover {
  border-color: var(--p-400);
  color: var(--text);
  box-shadow: 0 0 18px var(--glow);
}

.download__icon { width: 22px; height: 22px; fill: var(--p-300); flex-shrink: 0; }
.download__text { display: flex; flex-direction: column; line-height: 1.3; }
.download__text b { font: 600 14px var(--font-head); letter-spacing: 0.05em; color: var(--p-200); }
.download__text small { font-size: 11.5px; color: var(--text-dim); }

.callview { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.callview__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.callview__room { font: 700 17px var(--font-head); letter-spacing: 0.06em; color: var(--p-200); }
.callview__count { font-size: 12.5px; color: var(--text-dim); }

/* ------------------------------------------------ tiles */
.tiles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 0;
}

/* palco das telas compartilhadas — vazio (e escondido) quando ninguém compartilha */
.stage { display: none; flex: 1; gap: 12px; min-height: 0; }
.tiles.has-screen .stage { display: flex; }

/* grade normal dos participantes */
.people {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-rows: minmax(170px, 1fr);
  gap: 14px;
  overflow-y: auto;
  align-content: center;
}

/* ---- modo "alguém está compartilhando a tela" ----
   A tela ocupa a área toda e os participantes viram uma faixa pequena
   embaixo, só com o avatar/nome — o foco é o que está sendo mostrado. */
.tiles.has-screen .people {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.tiles.has-screen .people .tile {
  flex: 0 0 auto;
  width: 180px;
  height: 108px;
  min-height: 0;
}

.tiles.has-screen .people .tile__avatar .avatar {
  width: 46px;
  height: 46px;
  font-size: 19px;
  box-shadow: 0 0 14px var(--glow);
}

.tiles.has-screen .people .tile__name {
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  font-size: 11px;
  gap: 5px;
}

/* controles ainda cabem na faixa, só que compactos */
.tiles.has-screen .people .tile__volume { padding: 3px 7px; gap: 5px; right: 6px; bottom: 6px; }
.tiles.has-screen .people .tile__volume input[type="range"] { width: 62px; }
.tiles.has-screen .people .tile__volume-label { font-size: 10px; min-width: 28px; }
.tiles.has-screen .people .tile__admin { top: 5px; right: 5px; gap: 4px; }
.tiles.has-screen .people .mini-btn { width: 20px; height: 20px; font-size: 10px; }

.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 170px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.tile.speaking {
  border-color: var(--p-400);
  box-shadow: 0 0 0 1px var(--p-400), 0 0 18px var(--glow);
}

.tile.connecting { opacity: 0.55; }

/* tela compartilhada: ocupa todo o palco */
.tile--screen { flex: 1; min-height: 0; }

.tile__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.tile--screen .tile__video { object-fit: contain; }

.tile__avatar { position: absolute; inset: 0; display: grid; place-items: center; }

.tile__avatar .avatar { width: 84px; height: 84px; font-size: 34px; box-shadow: 0 0 26px var(--glow); }

.tile__name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 10, 15, 0.72);
  border: 1px solid var(--border);
  padding: 4px 10px;
  font: 600 13px var(--font-head);
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

.tile__badge { font-size: 12px; line-height: 1; }
.tile__badge--muted { color: var(--danger); }
.tile__badge--screen { color: var(--p-300); }

/* volume individual: aparece ao passar o mouse no tile */
.tile__volume {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border);
  padding: 5px 10px;
  backdrop-filter: blur(4px);
}

.tile:hover .tile__volume { display: flex; }

.tile__volume-label { font-size: 11px; color: var(--p-200); min-width: 34px; text-align: right; }

input[type="range"] {
  -webkit-appearance: none;
  width: 90px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--p-300);
  box-shadow: 0 0 6px var(--glow);
}

/* botões de admin no tile */
.tile__admin {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 5px;
}
.tile:hover .tile__admin { display: flex; }

/* ------------------------------------------------ barra de controles */
.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.ctl {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 72px;
  padding: 9px 0 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color 0.13s, color 0.13s, background 0.13s, box-shadow 0.13s;
}

.ctl:hover { border-color: var(--p-500); color: var(--text); }

.ctl__icon { width: 22px; height: 22px; fill: currentColor; }

.ctl__label {
  font: 600 11px var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ctl.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(122, 34, 196, 0.1));
  border-color: var(--p-400);
  color: var(--p-200);
  box-shadow: 0 0 14px var(--glow);
}

.ctl__icon--off { display: none; }
.ctl.off { color: var(--danger); border-color: var(--danger-dim); }
.ctl.off .ctl__icon--on { display: none; }
.ctl.off .ctl__icon--off { display: block; }

.ctl.locked { color: var(--danger); border-color: var(--danger); cursor: not-allowed; }

.ctl--danger { color: var(--danger); }
.ctl--danger:hover { border-color: var(--danger); background: rgba(244, 65, 95, 0.1); color: var(--danger); }

.ctl__badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--p-400);
  color: #fff;
  font: 700 11px var(--font-body);
  display: grid;
  place-items: center;
}

/* ------------------------------------------------ chat */
.chat {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  min-height: 0;
}

.chat__header { padding: 13px 16px; border-bottom: 1px solid var(--border); }

.chat__room {
  font: 700 14px var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-300);
}

.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg { display: flex; gap: 9px; font-size: 14px; line-height: 1.4; }

.msg .avatar { width: 30px; height: 30px; font-size: 12px; margin-top: 2px; }

.msg__body { min-width: 0; flex: 1; }

.msg__head { display: flex; align-items: baseline; gap: 8px; }

.msg__author {
  font: 600 13px var(--font-head);
  letter-spacing: 0.05em;
  color: var(--p-300);
}
.msg--own .msg__author { color: var(--p-100); }

.msg__time { font-size: 11px; color: var(--text-dim); }

.msg__text { color: var(--text); overflow-wrap: break-word; }

.msg__media {
  max-width: 100%;
  max-height: 260px;
  border: 1px solid var(--border);
  margin-top: 4px;
  display: block;
  cursor: pointer;
}

video.msg__media { cursor: default; }

.msg--system {
  font-size: 12.5px;
  color: var(--text-dim);
  font-style: italic;
  justify-content: center;
}

.chat__form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.chat__attach {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  font-size: 19px;
  color: var(--p-300);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.15s, color 0.15s;
}
.chat__attach:hover { border-color: var(--p-400); color: var(--p-100); }

.chat__input {
  flex: 1;
  min-width: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font: 400 14px var(--font-body);
  padding: 9px 12px;
  outline: none;
}

.chat__input:focus { border-color: var(--p-400); }

.chat__send {
  background: var(--grad);
  border: none;
  color: #fff;
  width: 38px;
  height: 34px;
  flex-shrink: 0;
  font-size: 15px;
  transition: filter 0.15s;
}
.chat__send:hover { filter: brightness(1.15); }

/* ------------------------------------------------ toasts */
.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--p-400);
  padding: 10px 16px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.25s ease;
  max-width: 320px;
}

.toast--danger { border-left-color: var(--danger); }
.toast--ok { border-left-color: var(--ok); }

@keyframes toast-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.toast.hide { transition: opacity 0.3s; opacity: 0; }

/* ------------------------------------------------ modal de configurações */
.modal {
  margin: auto; /* o reset global zera margens; devolve a centralização do <dialog> */
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 26px 28px;
  width: min(420px, 92vw);
  box-shadow: 0 0 50px var(--glow);
}

.modal::backdrop { background: rgba(5, 5, 10, 0.7); backdrop-filter: blur(3px); }

.modal__title {
  font: 700 18px var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-200);
  margin-bottom: 20px;
}

.modal .field { margin-bottom: 16px; }

.modal__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  cursor: pointer;
  font-size: 14.5px;
}

.modal__toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--p-400);
  cursor: pointer;
}

.modal__row { display: flex; gap: 8px; align-items: stretch; }
.modal__row .field__input { flex: 1; min-width: 0; }

.btn--small { padding: 8px 12px; font-size: 12px; white-space: nowrap; }

input[type="range"].modal__slider { width: 100%; }

.modal__hint { font-size: 12px; color: var(--text-dim); }

/* medidor de microfone */
.micmeter {
  position: relative;
  height: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.micmeter__bar {
  height: 100%;
  width: 0%;
  background: var(--border-strong);
  transition: width 0.08s linear, background 0.15s;
}

.micmeter__bar.transmitting { background: var(--grad); }

.micmeter__threshold {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: var(--danger);
  opacity: 0.8;
}

.modal__avatar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.modal__actions { display: flex; justify-content: flex-end; }

/* ------------------------------------------------ scrollbar + responsivo */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--p-600); }

@media (max-width: 900px) {
  .app { grid-template-columns: 210px minmax(0, 1fr); }
  .chat {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 20;
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.5);
  }
  .app.chat-hidden .chat { display: none; }
  .people { grid-template-columns: 1fr; align-content: start; }
  .tiles.has-screen .people .tile { width: 132px; height: 80px; }
  .ctl { width: 58px; }
  .ctl__label { display: none; }
}
