/* Phygo HQ design system: tokens. Ver DESIGN.md.
   Tema escuro (padrão) = noite navy em volta dos painéis de papel pixel; [data-theme="light"] = dia. */
@font-face {
  font-family: "Silkscreen UI";
  src: url("assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen UI";
  src: url("assets/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* marca */
  --navy-950: #080c22;
  --navy-900: #0d1330;
  --navy-800: #151d47;
  --navy-700: #1f2a5c; /* marca */
  --navy-600: #2c3a78;
  --navy-500: #3b4c8e;
  --navy-400: #6d80c9;
  --navy-200: #c3cbef;
  --green-700: #2f5e1c;
  --green-600: #4e9a2a;
  --green-500: #6cbf3c; /* marca */
  --green-300: #a9df84;
  --green-100: #e3f5d6;
  /* papel (preenchimento do kit pixel) */
  --paper-0: #ffffff;
  --paper-50: #f8f7fb;
  --paper-100: #ebe4f2;
  --paper-200: #d8d0e0;
  --paper-300: #b2aecb;
  --paper-400: #8b8bab;
  /* estados */
  --red-500: #e0574a;
  --red-100: #fbe1dd;
  --amber-500: #f2b33d;
  --sky-500: #4fb3e8;

  /* semânticos */
  --bg: var(--navy-950);
  --backdrop: radial-gradient(1200px 700px at 30% -10%, #1b2766 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 110%, #17402a 0%, transparent 55%), var(--navy-950);
  --scrim: rgba(8, 12, 34, 0.62);
  --surface: var(--paper-100);
  --surface-2: var(--paper-50);
  --surface-sunk: var(--paper-200);
  --on-surface: var(--navy-700);
  --on-surface-2: #555c86;
  --on-surface-3: #8186a8;
  --line: var(--navy-700);
  --line-soft: var(--paper-300);
  --accent: var(--green-500);
  --accent-strong: var(--green-600);
  --on-accent: #0f2408;
  --danger: var(--red-500);
  --focus: var(--green-500);
  --on-dark: #eef0fb;
  --on-dark-2: #a3abd6;
  --dock: var(--navy-800);

  /* tipografia */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-pixel: "Silkscreen UI", "Silkscreen", ui-monospace, monospace;
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 28px;
  --fs-3xl: 44px;

  /* espaço (grade de 4; o pixel do kit é 2) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;

  /* raios: só no fallback sem kit (o kit traz a própria quina pixel) */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;

  /* sombras: duras, deslocadas, sem desfoque (linguagem pixel) */
  --shadow-1: 0 2px 0 rgba(8, 12, 34, 0.35);
  --shadow-2: 0 4px 0 rgba(8, 12, 34, 0.32), 0 10px 24px rgba(8, 12, 34, 0.28);
  --shadow-3: 0 6px 0 rgba(8, 12, 34, 0.3), 0 24px 60px rgba(8, 12, 34, 0.45);
  --glass: rgba(13, 19, 48, 0.72);
  --blur: blur(10px) saturate(1.2);

  /* movimento */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 120ms;
  --t-med: 220ms;
  --t-slow: 420ms;

  /* camadas */
  --z-world: 1;
  --z-hud: 20;
  --z-pop: 40;
  --z-modal: 50;
  --z-toast: 60;
  --z-tip: 70;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #dfe6f5;
  --backdrop: radial-gradient(1200px 700px at 30% -10%, #ffffff 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 110%, #d9f0c9 0%, transparent 55%), #dfe6f5;
  --scrim: rgba(31, 42, 92, 0.28);
  --glass: rgba(248, 247, 251, 0.78);
  --on-dark: var(--navy-700);
  --on-dark-2: #555c86;
  --dock: var(--paper-100);
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; }
}

/* Phygo HQ design system: componentes.
   Duas camadas: (1) fallback CSS pixel (borda navy 2px + quinas em degrau) sempre funciona;
   (2) com o kit LimeZu carregado (html.kit, ver ds/kit.js) as peças viram 9-slice do Modern UI.
   Fatias abaixo = ui.json do tools/ui-kit/build.py (escala 2). */

/* ---------- base ---------- */
.ds-root, body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
html.kit, html.kit body { cursor: var(--k-cursor-arrow, auto); }
html.kit button, html.kit a, html.kit [role="button"], html.kit label { cursor: var(--k-cursor-hand, pointer); }
.pi { display: block; width: var(--ic, 20px); height: var(--ic, 20px); flex: 0 0 auto; shape-rendering: crispEdges; }
.ds-label {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-2);
}
.ds-kbd {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  font: 700 10px/1 var(--font-pixel);
  color: var(--on-surface);
  background: var(--paper-50);
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -4px 0 var(--paper-300);
  padding-bottom: 2px;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* quinas em degrau de 2px (pixel) */
.px-corners {
  clip-path: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px,
    calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
}

/* ---------- painel ---------- */
.ds-panel {
  --pad: var(--s-4);
  position: relative;
  color: var(--on-surface);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: inset 0 0 0 2px var(--paper-0), inset 0 0 0 4px var(--paper-200), var(--shadow-2);
  padding: var(--pad);
}
html.kit .ds-panel {
  border-radius: 0;
  border-width: 16px;
  border-image: var(--k-panel) 16 fill / 16px stretch;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 4px 0 rgba(8, 12, 34, 0.35));
  padding: max(0px, calc(var(--pad) - 14px));
}
.ds-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.ds-title {
  margin: 0;
  font: 700 13px/1.1 var(--font-pixel);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-700);
}
.ds-sub { color: var(--on-surface-2); font-size: var(--fs-sm); }

/* ---------- área afundada (input, poço) ---------- */
.ds-inset, .ds-input {
  background: var(--paper-50);
  border: 2px solid var(--paper-400);
  border-radius: var(--r-1);
  box-shadow: inset 0 2px 0 var(--paper-200);
}
html.kit .ds-inset, html.kit .ds-input {
  border-radius: 0; border-width: 6px; border-image: var(--k-inset) 6 fill / 6px stretch;
  background: none; box-shadow: none;
}
.ds-input {
  display: block; width: 100%;
  font: 500 var(--fs-lg)/1.2 var(--font);
  color: var(--navy-700);
  padding: 9px 10px;
  outline: none;
  transition: filter var(--t-fast);
}
html.kit .ds-input { padding: 5px 6px; }
.ds-input::placeholder { color: var(--on-surface-3); }
.ds-input:focus { border-color: var(--green-600); }
html.kit .ds-input:focus { filter: drop-shadow(0 0 0 var(--green-500)) drop-shadow(0 2px 0 var(--green-500)); }

/* ---------- botões ---------- */
.ds-btn {
  --kb: 10px 10px 12px 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 40px;
  padding: 0 14px 2px;
  font: 650 var(--fs-md)/1 var(--font);
  color: var(--navy-700);
  background: var(--paper-100);
  border: 2px solid var(--navy-700);
  border-bottom-width: 5px;
  border-radius: var(--r-2);
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast);
  white-space: nowrap;
}
.ds-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ds-btn:active { transform: translateY(2px); }
.ds-btn:disabled { opacity: 0.5; cursor: default; transform: none; filter: grayscale(0.6); }
.ds-btn.primary { background: var(--green-500); color: #0f2408; }
.ds-btn.navy { background: var(--navy-600); color: var(--on-dark); border-color: var(--navy-900); }
.ds-btn.danger { background: var(--red-500); color: #fff; }
.ds-btn.ghost { background: transparent; border-color: transparent; color: inherit; border-bottom-width: 2px; }
.ds-btn.ghost:hover { background: rgba(31, 42, 92, 0.08); }
.ds-btn.lg { min-height: 52px; font-size: var(--fs-lg); padding: 0 22px 3px; }
.ds-btn.block { width: 100%; }
html.kit .ds-btn:not(.ghost) {
  border-radius: 0; border-style: solid; border-width: var(--kb);
  border-image: var(--k-key) 10 10 12 10 fill / var(--kb) stretch;
  background: none; padding: 0 4px;
}
html.kit .ds-btn.lg:not(.ghost) { padding: 0 12px; }
html.kit .ds-btn.primary { border-image-source: var(--k-key-green); }
html.kit .ds-btn.navy { border-image-source: var(--k-key-navy); }
html.kit .ds-btn.danger { border-image-source: var(--k-key-red); }
html.kit .ds-btn:not(.ghost):active { border-image-source: var(--k-key-down); }
html.kit .ds-btn.primary:active, html.kit .ds-btn.navy:active, html.kit .ds-btn.danger:active { border-image-source: inherit; transform: translateY(2px); }

/* ícone-botão (quadrado) com tooltip + atalho: <button class="ds-ib" data-tip="Microfone" data-kbd="M"> */
.ds-ib {
  --kb: 10px 10px 12px 10px;
  position: relative;
  display: inline-grid; place-items: center;
  width: 44px; height: 46px;
  padding: 0 0 3px;
  color: var(--navy-700);
  background: var(--paper-100);
  border: 2px solid var(--navy-700);
  border-bottom-width: 5px;
  border-radius: var(--r-2);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast);
}
.ds-ib .pi { --ic: 20px; }
.ds-ib:hover { transform: translateY(-2px); filter: brightness(1.06); }
.ds-ib:active { transform: translateY(1px); }
.ds-ib.navy { background: var(--navy-600); color: var(--on-dark); border-color: var(--navy-900); }
.ds-ib.on { background: var(--green-500); color: #0f2408; }
.ds-ib.off { background: var(--red-500); color: #fff; }
.ds-ib.sm { width: 32px; height: 34px; }
.ds-ib.sm .pi { --ic: 16px; }
.ds-ib.flat { background: transparent; border-color: transparent; border-bottom-width: 2px; color: inherit; }
.ds-ib.flat:hover { background: rgba(31, 42, 92, 0.1); transform: none; }
.ds-ib:disabled { opacity: 0.4; cursor: default; transform: none; }
html.kit .ds-ib:not(.flat) {
  border-radius: 0; border-width: var(--kb);
  border-image: var(--k-key) 10 10 12 10 fill / var(--kb) stretch;
  background: none; padding: 0;
}
html.kit .ds-ib.navy { border-image-source: var(--k-key-navy); }
html.kit .ds-ib.on { border-image-source: var(--k-key-green); }
html.kit .ds-ib.off { border-image-source: var(--k-key-red); }
.ds-ib .dot-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  font: 700 10px/1 var(--font-pixel);
  color: #0f2408; background: var(--green-500);
  box-shadow: 0 0 0 2px var(--navy-900);
}

/* tooltip: qualquer elemento com data-tip (data-kbd opcional) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 14px);
  transform: translate(-50%, 4px);
  padding: 6px 9px 7px;
  font: 600 12px/1 var(--font);
  white-space: nowrap;
  color: var(--paper-50);
  background: var(--navy-900);
  box-shadow: 0 0 0 2px var(--navy-500), var(--shadow-1);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out);
  z-index: var(--z-tip);
}
[data-tip][data-kbd]::after { content: attr(data-tip) "  ·  " attr(data-kbd); white-space: pre; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: 250ms; }
[data-tip-pos="bottom"]::after { bottom: auto; top: calc(100% + 10px); }
[data-tip-pos="left"]::after { left: auto; right: calc(100% + 10px); bottom: 50%; transform: translate(4px, 50%); }
[data-tip-pos="left"]:hover::after { transform: translate(0, 50%); }

/* ---------- chip / badge ---------- */
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  font: 600 var(--fs-sm)/1 var(--font);
  color: var(--navy-700);
  background: var(--paper-50);
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -4px 0 var(--paper-300);
  padding-bottom: 2px;
  white-space: nowrap;
}
.ds-chip .pi { --ic: 14px; }
.ds-chip.sel, .ds-chip[aria-selected="true"] { background: var(--green-500); box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -4px 0 var(--green-600); }
.ds-chip.dark { background: var(--navy-800); color: var(--on-dark); box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 var(--navy-900); }
button.ds-chip { border: 0; cursor: pointer; }
button.ds-chip:hover { filter: brightness(1.05); }

.ds-badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 6px 1px;
  font: 700 9.5px/1 var(--font-pixel);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-700);
  background: var(--paper-200);
  vertical-align: 1px;
}
.ds-badge.green { background: var(--green-500); color: #0f2408; }
.ds-badge.red { background: var(--red-500); color: #fff; }
.ds-badge.navy { background: var(--navy-700); color: var(--paper-50); }
.ds-badge.amber { background: var(--amber-500); color: #3b2500; }

/* ---------- avatar + presença ---------- */
.ds-avatar {
  --size: 36px;
  position: relative; flex: 0 0 auto;
  width: var(--size); height: var(--size);
  display: grid; place-items: center;
  font: 700 calc(var(--size) * 0.36)/1 var(--font-pixel);
  color: var(--paper-50);
  background: hsl(var(--h, 225) 42% 38%);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -4px 0 rgba(8, 12, 34, 0.25);
}
.ds-avatar.has-img { color: transparent; background-color: hsl(var(--h, 225) 40% 82%); }
.ds-avatar::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px;
  background: var(--presence, transparent);
  box-shadow: 0 0 0 2px var(--surface);
}
.ds-avatar[data-presence="on"] { --presence: var(--green-500); }
.ds-avatar[data-presence="busy"] { --presence: var(--red-500); }
.ds-avatar[data-presence="away"] { --presence: var(--amber-500); }
.ds-avatar[data-speaking="1"] { box-shadow: inset 0 0 0 2px var(--navy-700), 0 0 0 2px var(--green-500); }

/* ---------- card ---------- */
.ds-card {
  background: var(--paper-50);
  box-shadow: inset 0 0 0 2px var(--paper-300);
  padding: var(--s-3);
}
.ds-card.hover:hover { box-shadow: inset 0 0 0 2px var(--navy-500); }

/* ---------- abas ---------- */
.ds-tabs { display: flex; flex-wrap: wrap; gap: 2px; align-items: flex-end; }
.ds-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  font: 600 var(--fs-sm)/1 var(--font);
  color: var(--on-surface-2);
  background: var(--paper-200);
  border: 2px solid var(--navy-700); border-bottom: 0;
  border-radius: var(--r-1) var(--r-1) 0 0;
  cursor: pointer; white-space: nowrap;
  transition: height var(--t-fast) var(--ease-out), color var(--t-fast);
}
.ds-tab:hover { color: var(--navy-700); }
.ds-tab.sel, .ds-tab[aria-selected="true"] { height: 40px; color: var(--navy-700); background: var(--paper-50); }
html.kit .ds-tab {
  border-radius: 0; border-width: 14px 14px 2px 14px; padding: 0 2px;
  border-image: var(--k-tab-off) 14 14 2 14 fill / 14px 14px 2px 14px stretch;
  background: none;
}
html.kit .ds-tab.sel, html.kit .ds-tab[aria-selected="true"] { border-image-source: var(--k-tab-on); }
.ds-tab .tab-off { width: 6px; height: 6px; background: currentColor; opacity: 0.35; }

/* ---------- lista ---------- */
.ds-list { display: flex; flex-direction: column; gap: 2px; }
.ds-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 6px 8px;
  min-height: 48px;
  transition: background var(--t-fast);
}
.ds-row:hover { background: rgba(31, 42, 92, 0.07); }
.ds-row .row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-row .row-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-row .row-sub { font-size: var(--fs-sm); color: var(--on-surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.ds-row .row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity var(--t-fast); }
.ds-row:hover .row-actions, .ds-row:focus-within .row-actions { opacity: 1; }
.ds-section { font: 700 10px/1 var(--font-pixel); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-surface-3); padding: 10px 8px 6px; display: flex; justify-content: space-between; }

/* ---------- painel lateral ---------- */
.ds-side {
  position: fixed; top: 16px; right: 16px; bottom: 96px;
  width: 300px;
  display: flex; flex-direction: column;
  z-index: var(--z-hud);
  animation: ds-slide-in var(--t-med) var(--ease-out);
}
.ds-side .ds-side-body { flex: 1 1 auto; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
@keyframes ds-slide-in { from { opacity: 0; transform: translateX(24px); } }

/* ---------- popover ---------- */
.ds-pop {
  position: absolute; z-index: var(--z-pop);
  min-width: 200px;
  animation: ds-pop-in var(--t-med) var(--ease-spring);
  transform-origin: bottom center;
}
@keyframes ds-pop-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.ds-menu { display: flex; flex-direction: column; gap: 2px; }
.ds-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 8px; border: 0; background: transparent;
  font: 500 var(--fs-md)/1.2 var(--font); color: var(--navy-700); text-align: left; cursor: pointer;
}
.ds-menu button:hover { background: rgba(31, 42, 92, 0.08); }
.ds-menu button .ds-kbd { margin-left: auto; }
.ds-menu hr { border: 0; height: 2px; background: var(--paper-300); margin: 4px 0; }

/* ---------- toast ---------- */
.ds-toasts {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  pointer-events: none;
}
.ds-toast {
  display: flex; align-items: center; gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px 12px 10px;
  font: 500 var(--fs-md)/1.35 var(--font);
  color: var(--paper-50);
  background: var(--navy-800);
  box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 var(--navy-900), var(--shadow-2);
  pointer-events: auto;
  animation: ds-toast-in var(--t-slow) var(--ease-spring);
}
.ds-toast .pi { --ic: 18px; color: var(--green-500); }
.ds-toast.warn .pi { color: var(--amber-500); }
.ds-toast.out { animation: ds-toast-out var(--t-med) var(--ease-out) forwards; }
@keyframes ds-toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes ds-toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- modal ---------- */
.ds-scrim {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: 16px;
  background: var(--scrim);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  animation: ds-fade var(--t-med) var(--ease-out);
}
.ds-modal { width: min(560px, 100%); animation: ds-pop-in var(--t-slow) var(--ease-spring); }
@keyframes ds-fade { from { opacity: 0; } }

/* ---------- toggle + medidor ---------- */
.ds-toggle {
  position: relative; display: inline-block; width: 44px; height: 22px; flex: 0 0 auto;
  background: var(--paper-300); box-shadow: inset 0 0 0 2px var(--navy-700); border: 0; padding: 0; cursor: pointer;
}
.ds-toggle::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 14px; height: 14px;
  background: var(--paper-50); box-shadow: inset 0 0 0 2px var(--navy-700);
  transition: transform var(--t-fast) var(--ease-out);
}
.ds-toggle[aria-checked="true"] { background: var(--green-500); }
.ds-toggle[aria-checked="true"]::after { transform: translateX(22px); }
html.kit .ds-toggle { box-shadow: none; border-style: solid; border-width: 10px; border-image: var(--k-pill-off) 10 fill / 10px stretch; background: none; }
html.kit .ds-toggle[aria-checked="true"] { border-image-source: var(--k-pill-on); }
html.kit .ds-toggle::after { top: -6px; left: -6px; }

.ds-meter {
  --v: 0;
  position: relative; height: 14px; min-width: 60px;
  background: var(--navy-900); box-shadow: inset 0 0 0 2px var(--navy-700);
}
.ds-meter::before {
  content: ""; position: absolute; left: 3px; top: 3px; bottom: 3px;
  width: calc((100% - 6px) * var(--v));
  background: repeating-linear-gradient(90deg, var(--green-500) 0 6px, var(--green-600) 6px 8px);
  transition: width 80ms linear;
}
html.kit .ds-meter { box-shadow: none; background: none; border-style: solid; border-width: 10px; border-image: var(--k-bar) 10 fill / 10px stretch; height: 26px; }
html.kit .ds-meter::before { left: -4px; top: -2px; bottom: -2px; width: calc((100% + 8px) * var(--v)); }

/* ---------- utilidades ---------- */
.ds-row-gap { display: flex; align-items: center; gap: var(--s-2); }
.ds-sep { width: 2px; align-self: stretch; margin: 6px 4px; background: rgba(195, 203, 239, 0.18); }
.hidden { display: none !important; }

/* Phygo HQ: layouts das telas. Tokens e componentes vêm de ds/tokens.css e ds/components.css
   (o build junta os três em dist/style.css, nessa ordem). */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--on-dark);
  overflow: hidden;
}
#app, #game { position: fixed; inset: 0; }
#game canvas { display: block; }
button { font: inherit; color: inherit; }
.muted { color: var(--on-dark-2); }
img, canvas.av-preview, .mascot-cv, .card .thumb { image-rendering: pixelated; }

/* padrão de pontos pixel do fundo */
.pixel-bg {
  background:
    radial-gradient(circle at 1px 1px, rgba(195, 203, 239, 0.09) 1px, transparent 1.5px) 0 0 / 16px 16px,
    var(--backdrop);
}

/* ---------- carregamento ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(195, 203, 239, 0.09) 1px, transparent 1.5px) 0 0 / 16px 16px,
    var(--backdrop);
  color: var(--on-dark);
  transition: opacity 0.35s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.boot-logo {
  display: grid; place-items: center; width: 84px; height: 84px;
  color: var(--green-500); background: var(--navy-700);
  box-shadow: inset 0 0 0 3px var(--navy-500), 0 6px 0 var(--navy-900);
  animation: boot-hop 1.1s var(--ease-out) infinite;
}
.boot-word { font: 700 22px/1 var(--font-pixel); letter-spacing: 0.06em; text-transform: uppercase; }
.boot-word span, .brand-sub { color: var(--green-500); }
.boot-bar { width: 180px; height: 14px; padding: 3px; box-shadow: inset 0 0 0 2px var(--navy-500); background: var(--navy-900); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(90deg, var(--green-500) 0 8px, var(--green-600) 8px 10px); animation: boot-run 1.2s steps(12) infinite; }
.boot-k { font-size: 13px; color: var(--on-dark-2); }
@keyframes boot-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } 60% { transform: translateY(0); } }
@keyframes boot-run { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: var(--green-500); background: var(--navy-700);
  box-shadow: inset 0 0 0 2px var(--navy-500), 0 3px 0 var(--navy-900);
}
.brand-word, .brand-sub { font: 700 17px/1 var(--font-pixel); letter-spacing: 0.06em; text-transform: uppercase; }
.ds-panel .brand-word { color: var(--navy-700); }
.ds-panel .brand-sub { color: var(--green-600); }

/* ---------- overlays genéricos ---------- */
.overlay { position: fixed; inset: 0; z-index: var(--z-modal); }
.ds-modal.wide { width: min(940px, 100%); }
.fatal-title { margin: 14px 0 6px; }

/* ---------- entrada ---------- */
.overlay.entry {
  overflow-y: auto;
  background:
    radial-gradient(circle at 1px 1px, rgba(195, 203, 239, 0.09) 1px, transparent 1.5px) 0 0 / 16px 16px,
    var(--backdrop);
  animation: ds-fade var(--t-slow) var(--ease-out);
}
.overlay.entry.leaving { opacity: 0; transition: opacity 0.25s ease; }
.entry-page { min-height: 100%; display: flex; flex-direction: column; padding: 18px 28px 22px; }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--on-dark); }
.entry-top-r { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 8px; height: 8px; background: var(--green-500); box-shadow: 0 0 0 2px rgba(108, 191, 60, 0.25); animation: blink 2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.entry-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 540px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  width: 100%; max-width: 1240px;
  margin: 0 auto;
  padding: 12px 0;
}
.entry-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.entry-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* palco do avatar: holofote + tapete pixel + nome flutuando */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stage::before {
  content: ""; position: absolute; left: 50%; top: -10%; width: 360px; height: 120%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(108, 191, 60, 0.16), rgba(109, 128, 201, 0.08) 55%, transparent 75%);
  pointer-events: none;
}
.stage-figure { position: relative; display: flex; flex-direction: column; align-items: center; }
.stage-figure canvas { position: relative; z-index: 1; display: block; }
.stage-floor {
  width: 220px; height: 26px; margin-top: -22px;
  background: var(--navy-600);
  box-shadow: inset 0 4px 0 var(--navy-500), inset 0 -4px 0 var(--navy-800), 0 0 0 2px var(--navy-900), 0 6px 0 var(--navy-900);
  clip-path: polygon(0 8px, 8px 8px, 8px 4px, 16px 4px, 16px 0, calc(100% - 16px) 0, calc(100% - 16px) 4px, calc(100% - 8px) 4px, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) calc(100% - 4px), calc(100% - 16px) calc(100% - 4px), calc(100% - 16px) 100%, 16px 100%, 16px calc(100% - 4px), 8px calc(100% - 4px), 8px calc(100% - 8px), 0 calc(100% - 8px));
}
.stage-name {
  position: relative; z-index: 2;
  padding: 4px 10px 5px;
  font: 600 14px/1 var(--font);
  color: var(--paper-50); background: rgba(13, 19, 48, 0.86);
  box-shadow: inset 0 0 0 2px var(--navy-500);
  margin-bottom: -6px;
  max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: ds-pop-in var(--t-med) var(--ease-spring);
}
.stage.bump .stage-figure canvas { animation: hop 0.36s var(--ease-out); }
@keyframes hop { 40% { transform: translateY(-10px); } }
.stage-controls { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; }
.dir-label { min-width: 72px; text-align: center; font: 700 10px/1 var(--font-pixel); text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-dark-2); }
.stage-controls .ds-btn { margin-left: 8px; }

/* Phyguinho */
.mascot { position: absolute; left: 0; top: 4%; display: flex; align-items: flex-end; gap: 4px; z-index: 3; }
.mascot-cv { width: 96px; height: 192px; margin-bottom: -18px; }
.speech {
  position: relative; align-self: flex-start; margin-top: 14px;
  max-width: 220px; padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; line-height: 1.4; color: var(--navy-700);
  background: var(--paper-100);
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 4px 0 #fff, inset 0 -4px 0 var(--paper-300), 0 4px 0 rgba(8, 12, 34, 0.4);
  animation: ds-pop-in var(--t-slow) var(--ease-spring) 0.4s both;
}
.speech b { font: 700 10px/1 var(--font-pixel); letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-600); }
.speech::after {
  content: ""; position: absolute; left: -8px; bottom: 16px; width: 10px; height: 10px;
  background: var(--paper-100); box-shadow: -2px 2px 0 var(--navy-700);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* teste de câmera e mic */
.devcheck {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: min(460px, 100%);
  padding: 10px 12px 12px 10px;
  color: var(--on-dark);
  background: var(--glass); backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 2px var(--navy-500), 0 4px 0 rgba(8, 12, 34, 0.5);
}
.dev-video { position: relative; width: 96px; height: 72px; background: var(--navy-900); box-shadow: inset 0 0 0 2px var(--navy-600); overflow: hidden; }
.dev-video video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; }
.devcheck.live .dev-video video { display: block; }
.devcheck.live .dev-ph { display: none; }
.dev-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--navy-400); }
.dev-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dev-side .ds-label { color: var(--on-dark-2); }
.dev-status { font-size: 13px; color: var(--on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-mic { display: flex; align-items: center; gap: 8px; color: var(--on-dark-2); }
.dev-mic .ds-meter { flex: 1; }

/* crachá (form) */
.entry-card { --pad: 22px; display: flex; flex-direction: column; gap: 14px; animation: ds-pop-in var(--t-slow) var(--ease-spring); }
.entry-card.shake { animation: shake 0.32s steps(6); }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.entry-title { margin: 6px 0 0; font: 700 26px/1.1 var(--font); letter-spacing: -0.02em; color: var(--navy-700); }
.field { display: flex; flex-direction: column; gap: 6px; }
.entry-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.entry-status { color: var(--on-surface-2); font-size: 13px; min-height: 18px; }
.entry-foot .ds-btn .ds-kbd { background: rgba(255, 255, 255, 0.6); }
.entry-credits {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 6px; font-size: 11.5px; color: var(--on-dark-2);
}
.entry-credits a, .credit-list a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link-btn { background: none; border: 0; padding: 2px 0; font-size: 11.5px; color: var(--on-dark-2); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; cursor: pointer; }
.link-btn:hover, .entry-credits a:hover { color: var(--on-dark); }

/* seletor do editor */
.picker { display: flex; flex-direction: column; min-width: 0; }
.picker .ds-tabs { padding: 0 4px; position: relative; z-index: 1; margin-bottom: -2px; }
.picker-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 0; }
html.kit .picker-body { padding: 6px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.current { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--navy-700); }
.current-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.picker .search { width: 170px; font-size: 13px; padding: 6px 8px; }
html.kit .picker .search { padding: 2px 4px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
  max-height: 228px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  align-content: start;
  scrollbar-width: thin;
}
.card {
  position: relative; aspect-ratio: 1; padding: 0;
  display: grid; place-items: center;
  background: var(--paper-0);
  border: 0;
  box-shadow: inset 0 0 0 2px var(--paper-300), inset 0 -4px 0 var(--paper-200);
  color: var(--on-surface-3);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--navy-400), inset 0 -4px 0 var(--paper-200); }
.card.sel { background: var(--green-100); box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 0 0 4px var(--green-500); }
.card .thumb { width: 100%; height: 100%; }
.card.none .pi { --ic: 18px; }
.card-n { position: absolute; right: 4px; bottom: 5px; font: 700 9px/1 var(--font-pixel); padding: 2px 3px; background: var(--navy-700); color: var(--paper-50); }
.empty { grid-column: 1 / -1; color: var(--on-surface-2); font-size: 13px; padding: 12px 4px; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.variants:empty { display: none; }
.swatch {
  width: 26px; height: 26px; padding: 0; border: 0; cursor: pointer;
  background: var(--sw, #888);
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -5px 0 rgba(0, 0, 0, 0.18), inset 0 4px 0 rgba(255, 255, 255, 0.25);
  transition: transform var(--t-fast) var(--ease-spring);
}
.swatch:hover { transform: translateY(-2px); }
.swatch.sel { outline: 2px solid var(--green-500); outline-offset: 2px; transform: translateY(-2px); }

/* editor dentro do jogo */
.editor-modal { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.editor-modal .stage {
  justify-content: center; padding: 18px 8px 16px;
  background:
    radial-gradient(circle at 1px 1px, rgba(195, 203, 239, 0.1) 1px, transparent 1.5px) 0 0 / 16px 16px,
    radial-gradient(closest-side, #22307a, var(--navy-900));
  box-shadow: inset 0 0 0 2px var(--navy-700);
}
.editor-modal .stage-controls .ds-btn { margin-left: 4px; }
.ds-modal .entry-foot { margin-top: 16px; }

/* ---------- HUD ---------- */
.top-left {
  position: fixed; left: 16px; top: 16px; z-index: var(--z-hud);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.where {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 38px; padding: 6px 12px 8px 8px;
  font: 600 13px/1 var(--font);
  color: var(--on-dark);
  background: var(--glass); backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 rgba(8, 12, 34, 0.5), var(--shadow-1);
}
.where > span { display: inline-flex; align-items: center; gap: 6px; }
.where .map-name { color: var(--on-dark); }
.where .map-name .pi { color: var(--green-500); }
.where .pi { --ic: 14px; }
.where .sep-chev { opacity: 0.45; }
.where .sep-chev .pi { --ic: 9px; }
.area-dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; background: var(--area, #8186a8); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2); }
.where .nook-tag .pi { color: var(--green-300); }
.where .nook-tag.stage .pi { color: #ff9a8c; }
.where .nook-tag.desk .pi { color: #e6cf9a; }
.where .occ { padding: 3px 5px; font: 700 9.5px/1 var(--font-pixel); background: rgba(195, 203, 239, 0.16); }

.live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 9px 10px; font-size: 13px; color: #ffe2dc;
  background: rgba(64, 16, 20, 0.92);
  box-shadow: inset 0 0 0 2px #b8402f, inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}
.live .rec { width: 8px; height: 8px; background: var(--red-500); animation: blink 1.4s steps(2, jump-none) infinite; }
.live-k { font: 700 10px/1 var(--font-pixel); letter-spacing: 0.06em; text-transform: uppercase; color: #ffb4a6; }
.stage-badge { margin-left: 6px; }
.tile-label .stage-badge { margin: 0 2px 0 0; }

/* placa da sala */
.sign-wrap { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 25; pointer-events: none; }
.area-notice { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; transform: translateY(-110%); }
.area-notice.in { animation: sign-in 0.9s var(--ease-out) forwards; }
.area-notice.out { transform: translateY(0); animation: sign-out 0.4s ease-in forwards; }
.sign-chains { width: 140px; height: 26px; background: linear-gradient(90deg, transparent 0 18px, var(--navy-700) 18px 22px, transparent 22px calc(100% - 22px), var(--navy-700) calc(100% - 22px) calc(100% - 18px), transparent calc(100% - 18px)); }
.sign-board { --pad: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 260px; text-align: center; }
.notice-name { font: 700 24px/1.1 var(--font); letter-spacing: -0.01em; color: var(--navy-700); }
.sign-bar { width: 64px; height: 4px; background: var(--area, var(--green-500)); }
@keyframes sign-in {
  0% { transform: translateY(-110%) rotate(0); }
  55% { transform: translateY(0) rotate(2.5deg); }
  75% { transform: translateY(0) rotate(-1.5deg); }
  90% { transform: translateY(0) rotate(0.6deg); }
  100% { transform: translateY(0) rotate(0); }
}
@keyframes sign-out { to { transform: translateY(-110%); } }

/* vídeo dos próximos */
.strip {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 15;
  display: flex; gap: 12px;
  padding: 6px 6px 10px;
  max-width: calc(100vw - 32px - 760px);
  min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
@media (max-width: 1200px) { .strip { top: 66px; max-width: calc(100vw - 32px - 340px); left: 16px; transform: none; } }
.tile {
  position: relative; flex: 0 0 auto;
  width: 192px; height: 144px;
  background: var(--navy-900);
  box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--paper-100), 0 0 0 7px var(--navy-700), 0 10px 0 -3px rgba(8, 12, 34, 0.55);
  margin: 7px;
  opacity: calc(0.5 + var(--vol, 1) * 0.5);
  transition: opacity 0.25s ease, box-shadow var(--t-fast);
  animation: ds-pop-in var(--t-slow) var(--ease-spring);
}
.tile.speaking { box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--green-500), 0 0 0 7px var(--navy-700), 0 10px 0 -3px rgba(8, 12, 34, 0.55); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.self video { transform: scaleX(-1); }
.tile .ph {
  position: absolute; inset: 0; display: none; place-items: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(195, 203, 239, 0.1) 1px, transparent 1.5px) 0 0 / 12px 12px,
    radial-gradient(closest-side, hsl(var(--h) 35% 30%), var(--navy-900));
}
.tile.novideo video { display: none; }
.tile.novideo .ph { display: grid; }
.tile-label {
  position: absolute; left: 6px; bottom: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  max-width: calc(100% - 52px);
  padding: 4px 7px 5px;
  font: 600 12px/1 var(--font);
  color: var(--paper-50); background: rgba(13, 19, 48, 0.82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-label .muted-ic { color: #ff8b7e; display: inline-grid; }
.tile-label .pi { --ic: 12px; }
.tile-vol { position: absolute; right: 7px; bottom: 7px; display: flex; align-items: flex-end; gap: 2px; padding: 3px; background: rgba(13, 19, 48, 0.82); }
.tile-vol i { width: 3px; background: rgba(195, 203, 239, 0.3); }
.tile-vol i:nth-child(1) { height: 4px; } .tile-vol i:nth-child(2) { height: 7px; } .tile-vol i:nth-child(3) { height: 10px; } .tile-vol i:nth-child(4) { height: 13px; }
.tile[data-bars="1"] .tile-vol i:nth-child(-n+1), .tile[data-bars="2"] .tile-vol i:nth-child(-n+2),
.tile[data-bars="3"] .tile-vol i:nth-child(-n+3), .tile[data-bars="4"] .tile-vol i:nth-child(-n+4) { background: var(--green-500); }
.tile.self .tile-vol { display: none; }
.tile.on-stage { box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--red-500), 0 0 0 7px var(--navy-700); }

/* estado da conexão (rtc.js): só aparece quando a chamada NÃO está conectada */
.tile-conn {
  position: absolute; left: 6px; right: 6px; top: 6px;
  padding: 4px 6px 5px;
  font: 600 11px/1.25 var(--font);
  color: var(--paper-50); background: rgba(13, 19, 48, 0.9);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-conn.hidden { display: none; }
.tile.connecting .ph { opacity: 0.65; }
.tile.connecting { box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--amber-500), 0 0 0 7px var(--navy-700), 0 10px 0 -3px rgba(8, 12, 34, 0.55); }
.tile.connecting .tile-conn { color: var(--amber-500); }
.tile.offline { box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--red-500), 0 0 0 7px var(--navy-700), 0 10px 0 -3px rgba(8, 12, 34, 0.55); }
.tile.offline .tile-conn { color: var(--red-500); }
@media (prefers-reduced-motion: no-preference) {
  .tile.connecting .tile-conn { animation: ds-pulse 1.6s ease-in-out infinite; }
}
@keyframes ds-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* dock */
.toolbar.dock {
  --pad: 8px;
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: var(--z-hud);
  display: flex; align-items: center; gap: 6px;
  animation: dock-in var(--t-slow) var(--ease-spring);
}
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 24px); } }
.dock .ds-sep { background: var(--paper-300); margin: 6px 4px; }
.dock-me {
  display: flex; align-items: center; gap: 10px; text-align: left;
  height: 46px; padding: 0 10px 0 6px; border: 0; background: transparent; cursor: pointer;
  max-width: 200px;
}
.dock-me:hover { background: rgba(31, 42, 92, 0.08); }
.me-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
.me-name { font-weight: 700; color: var(--navy-700); max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-sub { font-size: 11.5px; color: var(--green-600); font-weight: 600; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .ds-ib.active { transform: translateY(1px); }

.hint {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: var(--z-hud);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 8px 8px;
  font: 500 13px/1 var(--font); color: var(--on-dark);
  background: var(--glass); backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 rgba(8, 12, 34, 0.5);
  animation: ds-pop-in var(--t-med) var(--ease-spring);
}
.ds-toasts { bottom: 140px; }

/* pessoas */
.people { --pad: 16px; }
.people-search { margin-bottom: 8px; font-size: 13px; padding: 7px 9px; }
html.kit .people-search { padding: 3px 4px; }
.person.near { background: rgba(108, 191, 60, 0.14); }
.person.following { box-shadow: inset 0 0 0 2px var(--green-500); }
.person .area-dot { width: 8px; height: 8px; }
.person-icons { display: flex; gap: 2px; color: var(--red-500); }
.person-icons .pi { --ic: 14px; }
.muted-ic { display: inline-grid; }
.person .row-actions .pi { --ic: 14px; }
.person .ds-avatar { --size: 36px; }

/* popovers do dock */
.pop-k { padding: 2px 8px 8px; }
.reactions { display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; }
.react {
  width: 44px; height: 44px; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1;
  background: var(--paper-0); box-shadow: inset 0 0 0 2px var(--paper-300), inset 0 -4px 0 var(--paper-200);
  transition: transform var(--t-fast) var(--ease-spring);
}
.react:hover { transform: translateY(-3px) scale(1.08); box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 var(--paper-200); }
.react[data-tip]::after { display: none; }
.zoom-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 8px; color: var(--navy-700); }
.zoom-row > span:first-child, .ds-menu button { display: flex; align-items: center; gap: 10px; }
.ds-menu .pi { --ic: 16px; }

/* sobre */
.about { display: flex; flex-direction: column; gap: 16px; color: var(--navy-700); }
.about-hero { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 2px solid var(--paper-300); }
.about-hero p { margin: 0; }
.credit-sec { display: flex; flex-direction: column; gap: 6px; }
.credit-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .entry-main { grid-template-columns: minmax(0, 1fr) minmax(400px, 460px); }
  .mascot { display: none; }
}
@media (max-width: 860px) {
  .entry-main { grid-template-columns: 1fr; }
  .entry-page { padding: 14px 16px; }
  .editor-modal { grid-template-columns: 1fr; }
  .devcheck { display: none; }
}
@media (max-height: 760px) {
  .entry-card { --pad: 18px; gap: 10px; }
  .entry-title { font-size: 22px; }
  .grid { max-height: 168px; }
  .mascot-cv { width: 64px; height: 128px; }
}
@media (max-width: 900px) {
  .people { top: auto; height: 45vh; }
  .dock-me .me-text { display: none; }
}
/* ---------- social (chat, presença, reações, rituais): client/src/social.js — no design system ---------- */
.toolbar { flex-wrap: nowrap; max-width: calc(100vw - 16px); }
.ds-btn.sm { min-height: 32px; padding: 0 10px 2px; font-size: var(--fs-sm); }
html.kit .ds-btn.sm:not(.ghost) { padding: 0 2px; }
.ds-ib .ib-ic { display: inline-grid; }

/* status no dock */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 46px; padding: 0 8px 0 10px; border: 0; background: transparent; cursor: pointer;
  font: 600 var(--fs-sm)/1 var(--font); color: var(--navy-700); white-space: nowrap;
}
.status-pill:hover { background: rgba(31, 42, 92, 0.08); }
.status-pill .st-chev { display: inline-grid; color: var(--on-surface-3); }
.status-pill .st-chev .pi { --ic: 10px; }
.st-dot { display: inline-block; width: 10px; height: 10px; background: var(--st, var(--green-500)); box-shadow: inset 0 0 0 2px rgba(8, 12, 34, 0.25); flex: 0 0 auto; }
.st-hand { font-size: 14px; }
#btn-chat { position: relative; }
.chat-badge { position: absolute; top: -6px; right: -6px; }

/* reações (popover do dock = emotes reais) */
#emote-bar.reactions { grid-template-columns: repeat(6, 44px); }
.react { position: relative; display: grid; place-items: center; padding: 0; }
.react .emo { font-size: 22px; line-height: 1; }
.react kbd { position: absolute; right: 3px; bottom: 5px; font: 700 8px/1 var(--font-pixel); color: var(--on-surface-3); }
.react.sel { box-shadow: inset 0 0 0 2px var(--green-600), inset 0 -4px 0 var(--green-500); background: var(--green-100); }

/* chat */
.chat {
  --pad: 12px;
  position: fixed; left: 16px; bottom: 96px; z-index: var(--z-hud);
  width: min(340px, calc(100vw - 32px)); height: min(400px, 50vh);
  display: flex; flex-direction: column; gap: 8px;
  animation: ds-pop-in var(--t-med) var(--ease-spring); transform-origin: bottom left;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-tabs { display: flex; gap: 4px; }
.chat-tab { gap: 6px; font-weight: 650; }
.chat-tab .tab-n { padding: 2px 4px; font-size: 9px; }
.chat-list {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 8px; background: var(--paper-50); box-shadow: inset 0 0 0 2px var(--paper-300), inset 0 3px 0 var(--paper-200);
  scrollbar-width: thin;
}
html.kit .chat-list { background: none; box-shadow: none; border: 6px solid transparent; border-image: var(--k-inset) 6 fill / 6px stretch; padding: 4px; }
.chat-empty { color: var(--on-surface-3); font-size: var(--fs-sm); padding: 18px 8px; text-align: center; line-height: 1.4; }
.msg { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.msg .ds-avatar { --size: 24px; }
.msg-body { min-width: 0; }
.msg-head { display: flex; gap: 8px; align-items: baseline; font-size: var(--fs-sm); }
.msg-head b { font-weight: 700; color: var(--navy-700); }
.msg time { color: var(--on-surface-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.msg-text { font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--on-surface); }
.msg.mine .msg-head b { color: var(--green-600); }
.msg[data-ch="dm"] .msg-head b { color: var(--navy-500); }
.msg.system { padding: 6px 8px; background: #fff4dc; box-shadow: inset 0 0 0 2px var(--amber-500); }
.msg.system .sys-ic { display: grid; place-items: center; color: #9a6a10; }
.msg.system .sys-ic .pi { --ic: 16px; }
.msg.system .sys-k { font: 700 10px/1 var(--font-pixel); letter-spacing: 0.04em; text-transform: uppercase; color: #8a5a00; }
.chat-form { display: flex; flex-direction: column; gap: 6px; }
.chat-row { display: flex; gap: 6px; align-items: center; }
.chat-row .chat-input { flex: 1; font-size: 13px; padding: 8px 9px; }
html.kit .chat-row .chat-input { padding: 3px 4px; }
.dm-chip { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--on-surface-2); }
.dm-chip select { flex: 1; font-size: 13px; padding: 4px 6px; }
.dm-chip .ds-avatar { --size: 20px; }

/* popovers do social: status, pessoa, rituais */
.pop { --pad: 12px; position: fixed; z-index: var(--z-pop); width: 272px; display: flex; flex-direction: column; gap: 4px; animation: ds-pop-in var(--t-med) var(--ease-spring); }
.pop-k { padding: 6px 4px 4px; }
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: transparent; padding: 8px; font: 500 var(--fs-md)/1.2 var(--font); color: var(--navy-700);
}
.pop-item .pi { --ic: 16px; color: var(--navy-500); }
.pop-item:hover { background: rgba(31, 42, 92, 0.08); }
.pop-item.sel { background: var(--green-100); box-shadow: inset 2px 0 0 var(--green-500); }
.pop-auto { font-size: var(--fs-sm); color: #8a5a00; padding: 2px 8px; }
.pop-foot { font-size: 11.5px; color: var(--on-surface-3); padding: 4px 4px 2px; line-height: 1.35; }
.pop .ds-input { font-size: 13px; padding: 7px 8px; }
html.kit .pop .ds-input { padding: 3px 4px; }
.person-pop .pp-head { display: flex; gap: 10px; align-items: center; padding: 2px 4px 4px; }
.person-pop .pp-head b { font-size: var(--fs-lg); color: var(--navy-700); }
.person-pop .ds-avatar { --size: 40px; }
.pp-note { font-size: var(--fs-sm); color: var(--on-surface-2); padding: 0 6px; font-style: italic; }
.pp-where { padding: 0 6px 6px; border-bottom: 2px solid var(--paper-300); margin-bottom: 2px; }
.muted { color: var(--on-surface-3); }
.small { font-size: var(--fs-sm); }

/* lista de pessoas (social) */
.person { cursor: pointer; position: relative; }
.person .row-actions { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.person .row-actions .ds-ib { box-shadow: var(--shadow-1); }
.person.me { cursor: default; }
.person .st-text { color: color-mix(in srgb, var(--st) 70%, var(--navy-700)); font-weight: 650; }
.person .note { color: var(--on-surface-2); overflow: hidden; text-overflow: ellipsis; }
.person-where { font-size: 11.5px; }
.flag { margin-left: 5px; font-size: 12px; }
.flag-follow { margin-left: 6px; }
.person[data-status="away"] .person-name { color: var(--on-surface-3); }
.people .empty { padding: 16px 8px; color: var(--on-surface-3); font-size: var(--fs-sm); }
.ds-avatar[data-presence]::after { background: var(--presence, var(--green-500)); }

/* toasts (social + sino do mercado): pilha embaixo à direita, acima do dock e à esquerda da lista de pessoas */
.toast-stack {
  position: fixed; bottom: 104px; right: 16px; z-index: var(--z-toast);
  width: min(340px, calc(100vw - 32px)); display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none;
}
.toast-stack .s-toasts { flex-direction: column-reverse; }
body:has(.people:not(.hidden)) .toast-stack { right: 332px; }
@media (max-width: 900px) { body .toast-stack { right: 16px; bottom: 150px; } }
.toast-stack .s-toasts, .toast-stack .mkt-toasts { position: static; width: auto; display: flex; flex-direction: column; gap: 8px; }
.s-toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px 12px 10px; font: 500 13px/1.4 var(--font); color: var(--paper-50);
  background: var(--navy-800);
  box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 var(--navy-900), var(--shadow-2);
  animation: ds-toast-in var(--t-slow) var(--ease-spring);
}
.s-toast .tt-ic { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; background: var(--navy-600); box-shadow: inset 0 0 0 2px var(--navy-500); color: var(--green-500); }
.s-toast .tt-ic .pi { --ic: 16px; }
.s-toast .tt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.s-toast b { color: #fff; }
.s-toast.warn .tt-ic { color: var(--amber-500); }
.s-toast.poke .tt-ic { color: var(--sky-500); }
.s-toast.notice { box-shadow: inset 0 0 0 2px var(--amber-500), inset 0 -4px 0 var(--navy-900), var(--shadow-2); }
.s-toast.notice .tt-ic { color: var(--amber-500); }
.knock-card .tt-ic { color: #e6cf9a; }
.tt-k { font: 700 10px/1.1 var(--font-pixel); letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy-200); }
.s-toast.notice .tt-k { color: #ffd88a; }
.tt-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.s-toast .ds-btn.ghost { color: var(--navy-200); }
.s-toast .ds-btn.ghost:hover { background: rgba(195, 203, 239, 0.12); }

/* acima dos avatares: balão de fala pixel (papel + contorno navy), emotes */
.overhead-layer { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.oh { position: absolute; left: 0; top: 0; width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; will-change: transform; }
.oh > * { transform: translateX(-50%); position: relative; left: 0; }
.oh-bubble {
  max-width: 190px; width: max-content; padding: 5px 9px 6px;
  font: 500 12.5px/1.3 var(--font); color: var(--navy-700); background: var(--paper-50);
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -4px 0 var(--paper-200), 0 3px 0 rgba(8, 12, 34, 0.35);
  transition: opacity var(--t-slow) ease; overflow-wrap: anywhere;
  animation: ds-pop-in var(--t-med) var(--ease-spring); transform-origin: bottom center;
}
.oh-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -4px; width: 8px; height: 6px; background: var(--navy-700); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.oh-bubble.out { opacity: 0; }
.oh-emote { font-size: 26px; line-height: 1; animation: emo 3s ease-out forwards; filter: drop-shadow(0 2px 0 rgba(8, 12, 34, 0.45)); }
@keyframes emo {
  0% { opacity: 0; translate: 0 8px; scale: 0.4; }
  12% { opacity: 1; translate: 0 0; scale: 1.15; }
  22% { scale: 1; }
  80% { opacity: 1; translate: 0 -14px; }
  100% { opacity: 0; translate: 0 -24px; }
}
.oh-hand { font-size: 20px; line-height: 1; animation: wave 1.4s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 2px 0 rgba(8, 12, 34, 0.45)); }
@keyframes wave { 0%, 100% { rotate: -8deg; } 50% { rotate: 10deg; } }
.oh-balloons { font-size: 16px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -4px; } }

/* ritual ao vivo (topo esquerdo, mesma linguagem do selo "Ao vivo") + painel */
.ritual {
  display: inline-flex; align-items: center; gap: 9px; pointer-events: auto;
  padding: 5px 6px 7px 10px; font-size: 13px; color: #fff1d6;
  background: rgba(58, 38, 6, 0.94);
  box-shadow: inset 0 0 0 2px var(--amber-500), inset 0 -4px 0 rgba(0, 0, 0, 0.3), var(--shadow-1);
}
.rit-dot { width: 8px; height: 8px; background: var(--amber-500); animation: blink 1.6s steps(2, jump-none) infinite; flex: 0 0 auto; }
.rit-k { font: 700 10px/1 var(--font-pixel); letter-spacing: 0.06em; text-transform: uppercase; color: #ffd88a; }
.rit-t { font: 700 15px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.rit-where { color: #f4dfb8; }
.ritual .ds-btn.sm { min-height: 28px; }
.rituals-pop { width: 372px; max-height: min(640px, calc(100vh - 120px)); overflow-y: auto; }
.rit-quick, .sch-days { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 2px 4px; }
.rit-row { display: flex; gap: 6px; padding: 2px 0; align-items: center; }
.rit-row > input[type=text], .rit-row > select { flex: 1; }
.rit-row.end { justify-content: flex-end; }
.rituals-pop input, .rituals-pop select {
  font: 500 13px/1.2 var(--font); color: var(--navy-700); padding: 6px 7px;
  background: var(--paper-50); border: 2px solid var(--paper-400); box-shadow: inset 0 2px 0 var(--paper-200); outline: none; min-width: 0;
}
.rituals-pop input:focus, .rituals-pop select:focus { border-color: var(--green-600); }
.rituals-pop > .ds-btn.block { margin: 4px 0 2px; }
.sch-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; background: var(--paper-50); box-shadow: inset 0 0 0 2px var(--paper-300); margin: 2px 0; }
.sch-item.live { box-shadow: inset 0 0 0 2px var(--amber-500); background: #fff4dc; }
.sch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sch-text b { font-size: 13px; color: var(--navy-700); }
.sch-empty { padding: 2px 4px 6px; line-height: 1.4; }
.sch-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--paper-300); }
.dur { display: inline-flex; align-items: center; gap: 4px; }
.dur input { width: 64px; }
@media (max-width: 900px) { .st-label, .status-pill .st-chev { display: none; } }

/* ---------- compartilhar tela: vídeo grande ---------- */
.screen-view {
  --pad: 12px;
  position: fixed; z-index: calc(var(--z-hud) + 1);
  left: 50%; top: 50%; transform: translate(-50%, -54%);
  width: min(960px, calc(100vw - 680px), calc((100vh - 260px) * 16 / 9));
  min-width: min(520px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px;
  animation: ds-pop-in var(--t-slow) var(--ease-spring);
}
.screen-view.min { left: auto; top: 196px; right: 16px; bottom: auto; transform: none; width: 320px; min-width: 0; }
body:has(.people:not(.hidden)) .screen-view.min { right: 332px; }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.screen-head .ds-title { display: flex; align-items: center; gap: 8px; }
.screen-head .rec { width: 8px; height: 8px; background: var(--red-500); animation: blink 1.4s steps(2, jump-none) infinite; }
.screen-video { position: relative; aspect-ratio: 16 / 9; background: var(--navy-950); box-shadow: inset 0 0 0 2px var(--navy-700); overflow: hidden; }
.screen-video video { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; background: #000; }
.screen-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 1100px) { .screen-view { width: calc(100vw - 32px); } }
/* compartilhando tela (lista de pessoas) */
.screen-flag, .screen-ic { display: inline-flex; vertical-align: -2px; color: var(--green, #3fae4a); }
.screen-flag svg, .screen-ic svg { width: 14px; height: 14px; }

/* menu "Mais" do dock (ui.js addMore): linhas com ícone, nome e atalho */
.more-menu { position: fixed; z-index: calc(var(--z-hud) + 2); width: 260px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.more-menu.hidden { display: none; }
.more-row {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 10px;
  border: 0; border-radius: 6px; background: transparent; color: var(--navy-700); cursor: pointer; text-align: left;
  font: inherit;
}
.more-row:hover, .more-row:focus-visible { background: rgba(31, 42, 92, 0.09); outline: none; }
.more-row.hidden { display: none; }
.more-row .pi, .more-row .ib-ic .pi { width: 18px; height: 18px; flex: none; }
.more-row .ib-ic { display: inline-flex; }
.more-label { font-weight: 600; font-size: 14px; flex: 1; white-space: nowrap; }
.more-kbd { font: 700 11px/1 var(--font-mono, monospace); color: var(--navy-500, #556); border: 1px solid var(--paper-300); border-bottom-width: 2px; border-radius: 4px; padding: 3px 6px; background: #fff; }
.more-row .dot-badge { position: static; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber-500, #e8a33c); color: #241400; font-size: 11px; font-weight: 700; }
.more-row .dot-badge.hidden { display: none; }
#btn-more { position: relative; }
/* status com prazo ("Ocupado até 15h") */
.until-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 4px; }
.until-chips .ds-chip { font-size: var(--fs-sm); }
.status-pill .st-until { font-size: 11.5px; color: var(--on-surface-3); margin-left: 4px; white-space: nowrap; }
@media (max-width: 900px) { .status-pill .st-until { display: none; } }
/* login da Phygo na entrada */
.login-fields { display: flex; flex-direction: column; gap: 12px; }
.login-hint { font-size: 12px; margin-top: -2px; }
.who-row { display: flex; align-items: center; gap: 8px; }
.who-row .ds-input { flex: 1; min-width: 0; }
.ds-input.locked { cursor: default; opacity: 0.95; }
/* ações de admin */
.pop-item.danger { color: var(--red-500); }
.admin-confirm .ds-modal { max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
/* tela de erro/saída: centrada, com fundo escurecido (cobre o jogo) */
.overlay.fatal { background: var(--backdrop); }
.overlay.fatal .ds-modal { max-width: 460px; display: flex; flex-direction: column; gap: 6px; }
/* aba Empresa (painel do coordenador) */
.board-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; margin: 2px 0 10px; }
.board-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--surface-2, rgba(255,255,255,0.04)); border: 1px solid var(--line, rgba(195,203,239,0.14)); }
.board-stat b { font-size: 18px; color: var(--on-surface); line-height: 1.1; }
.board-stat span { font-size: 11px; color: var(--on-surface-3); line-height: 1.2; }
.board-stat.on b, .board-stat.green b { color: var(--green-500); }
.board-stat.amber b { color: var(--amber-500); }
.board-stat.red b { color: var(--red-500); }
.board-dept { --pad: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.board-dept-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 4px; }
.board-ai { display: flex; gap: 8px; align-items: center; padding: 5px 4px; cursor: pointer; border-radius: 2px; }
.board-ai:hover, .board-ai:focus-visible { background: rgba(108, 191, 60, 0.08); outline: none; }
.board-ai.busy { background: rgba(108, 191, 60, 0.10); }
.board-ai .ds-avatar { --size: 30px; }
.board-ai-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.board-ai-name { display: flex; gap: 5px; align-items: center; font-weight: 600; font-size: 13px; }
.board-ai-name .ds-badge { font-size: 10px; }
.board-st { margin-left: auto; text-transform: lowercase; }
.board-ai-task { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 290px; }
.board-out { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; border-bottom: 1px solid var(--line, rgba(195,203,239,0.10)); }
.board-out-ic { color: var(--green-500); padding-top: 2px; }
.board-out-main { display: flex; flex-direction: column; min-width: 0; }
.board-out-name { font-weight: 600; font-size: 13px; color: var(--on-surface); text-decoration: none; word-break: break-all; }
.board-out-name:hover { color: var(--green-500); text-decoration: underline; }
.board-del { padding: 3px 4px; }
.board-ai-main { flex: 1; }
.board-ai-name { width: 100%; }
.board-del { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* celular: abas do painel de IAs rolam na horizontal; números da Empresa em faixa compacta */
@media (max-width: 560px) {
  .ai-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ai-tabs::-webkit-scrollbar { display: none; }
  .ai-tabs .ds-tab { flex: 0 0 auto; }
  .board-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .board-stat { padding: 5px 4px; align-items: center; text-align: center; }
  .board-stat b { font-size: 15px; }
  .board-stat span { font-size: 9.5px; }
  .board-ai-task { max-width: 200px; }
}
/* microfone da conversa com a IA */
.ai-mic { touch-action: none; user-select: none; -webkit-user-select: none; }
.ai-mic.rec { background: var(--red-500, #d9443f); color: #fff; animation: mic-pulse 1s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 5px rgba(217, 68, 63, 0.35); } }
/* reunião transcrita/gravada: aviso 🔴 para todos da sala + legenda ao vivo */
.meet-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; gap: 10px; align-items: center;
  background: #5a1f2a; color: #fff; padding: 8px 10px 8px 12px; box-shadow: 0 4px 0 rgba(0,0,0,.25); font-size: 13px; max-width: calc(100vw - 24px); }
.meet-banner .meet-t { flex: 1; min-width: 0; }
.meet-banner .meet-out { color: #ffd166; font-weight: 600; }
.rec-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; flex: 0 0 auto; }
.rec-dot.live { animation: blink 1s steps(2, jump-none) infinite; box-shadow: 0 0 0 3px rgba(229,72,77,.35); }
.meet-captions { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: var(--z-hud); width: min(720px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.meet-cap { background: rgba(8,12,34,.82); color: #fff; padding: 5px 10px; font-size: 14px; line-height: 1.35; }
.meet-cap b { color: var(--green-500); }
@media (max-width: 560px) { .meet-banner { top: 56px; font-size: 12px; } .meet-captions { bottom: 120px; } }
/* falar com IA sem botão: selo "🎙️ Rita te ouve · é só falar" */
.vc-badge { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: var(--z-hud); background: rgba(31,42,92,.92); color: #fff;
  padding: 6px 12px; font-size: 13px; border-top: 2px solid var(--green-500); pointer-events: none; white-space: nowrap; }
.vc-badge.live { background: #1d4b2a; box-shadow: 0 0 0 3px rgba(108,191,60,.35); }
@media (max-width: 560px) { .vc-badge { bottom: 170px; font-size: 12px; } }
/* aba Tarefas: quadro da empresa + rotinas */
.tb-seg { margin-bottom: 8px; }
.tb-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.tb-filters .ds-chip.on { background: var(--green-500); color: #0f1428; }
.tb-filters .ds-chip.red { border-color: var(--red-500, #e5484d); }
.tb-card { --pad: 8px; margin-bottom: 6px; display: flex; flex-direction: column; gap: 4px; }
.tb-card.late { border-left: 3px solid var(--red-500, #e5484d); }
.tb-card.off { opacity: .55; }
.tb-top { display: flex; gap: 8px; align-items: center; }
.tb-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tb-title { font-size: 13px; line-height: 1.25; }
.tb-st { width: auto; padding: 3px 4px; font-size: 11px; height: auto; flex: 0 0 auto; }
.tb-due { font-size: 11.5px; color: var(--on-surface-3); display: flex; gap: 4px; align-items: center; }
.tb-due.late { color: var(--red-500, #e5484d); font-weight: 600; }
.tb-result { color: var(--on-surface-2, #c3cbef); line-height: 1.35; max-height: 3.9em; overflow: hidden; }
.tb-files { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-file { font-size: 12px; color: var(--green-500); text-decoration: none; display: inline-flex; gap: 3px; align-items: center; }
.tb-col span:first-child { font-weight: 700; }
.tb-col.tb-bloqueado span:first-child { color: var(--amber-500); }
/* aba Empresa · reorganização 20/10: responsável + líder, fontes, indicadores, arquivadas */
.ai-body > * { flex-shrink: 0; } /* painel é coluna flex com rolagem: nada pode ser espremido (linhas sumiam com 6px) */
.board-dept-h { gap: 8px; align-items: flex-start; }
.board-dept-h b { font-size: 14px; line-height: 1.25; }
.board-dept-n { flex: 0 0 auto; font-size: 11px; color: var(--on-surface-3); white-space: nowrap; padding-top: 2px; }
.board-who { display: grid; gap: 3px; margin: 2px 4px 6px; padding: 6px 8px; background: var(--paper-50); border-left: 3px solid var(--green-500); }
.board-who-row { display: grid; grid-template-columns: 82px 1fr; gap: 6px; align-items: baseline; font-size: 12px; min-width: 0; }
.board-who-k { color: var(--on-surface-3); font-size: 11px; }
.board-who-v { font-weight: 600; color: var(--on-surface); min-width: 0; overflow-wrap: anywhere; }
.board-who-v em { font-style: normal; font-weight: 400; color: var(--on-surface-3); margin-left: 5px; font-size: 11px; }
.board-ai-name .ds-badge.navy { font-size: 8.5px; }
.board-card { --pad: 6px 10px; display: flex; flex-direction: column; margin-bottom: 6px; }
.board-src { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.board-src:last-child { border-bottom: 0; }
.board-dot { flex: 0 0 8px; height: 8px; margin-top: 5px; background: var(--paper-300); }
.board-dot.ok { background: var(--green-500); } .board-dot.warn { background: var(--amber-500); } .board-dot.bad { background: var(--red-500); }
.board-src-main { flex: 1; min-width: 0; }
.board-src-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.board-st-txt { font-size: 11px; white-space: nowrap; color: var(--on-surface-3); }
.board-st-txt.ok { color: #3f7d22; } .board-st-txt.bad { color: var(--red-500); } .board-st-txt.warn { color: #9a6200; }
.board-src-d { font-size: 11px; color: var(--on-surface-3); line-height: 1.35; overflow-wrap: anywhere; }
.board-kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 12px; border-bottom: 1px solid var(--line-soft); color: var(--on-surface-2); }
.board-kv:last-child { border-bottom: 0; }
.board-kv b { color: var(--on-surface); }
.board-nd { color: var(--on-surface-3); font-size: 11px; text-align: right; }
.board-nm { padding-top: 4px; font-size: 11.5px; color: var(--on-surface-3); }
.board-nm summary { cursor: pointer; padding: 3px 0; }
.board-del { flex-shrink: 0; }
/* quadro de tarefas · reorganização 20/10 */
.tb-filters { margin-bottom: 6px; }
.tb-filters .ds-chip { height: 26px; font-size: 12px; padding: 0 9px; }
.tb-area { width: 100%; margin: 0 0 8px; height: 30px; padding: 0 8px; font-size: 12.5px; }
.tb-card { gap: 5px; }
.tb-title { font-size: 13px; line-height: 1.3; }
.tb-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-left: 34px; }
.tb-meta .tb-st { width: auto; height: 26px; padding: 0 6px; font-size: 11.5px; flex: 0 0 auto; }
.tb-who { font-size: 11px; color: var(--on-surface-3); min-width: 0; }
.tb-card .tb-fields, .tb-card .tb-result, .tb-card .tb-due, .tb-card > .muted.small { margin-left: 34px; }
.tb-fields summary { cursor: pointer; color: var(--on-surface-2); font-size: 11.5px; padding: 2px 0; }
.tb-fields[open] { background: var(--paper-50); padding: 4px 8px 6px; border-left: 3px solid var(--paper-300); }
.tb-fields[open] summary { margin-bottom: 4px; }
.tb-fields > div { font-size: 11.5px; line-height: 1.4; padding: 1px 0; color: var(--on-surface-2); }
.tb-fields > div b { color: var(--on-surface); font-weight: 600; }
.tb-card.st-bloqueado { border-left: 3px solid var(--amber-500); }
.tb-card.st-backlog { opacity: .92; }
.tb-why { color: #8a5a00; }
.tb-why::before { content: 'Falta: '; font-weight: 700; }
/* select compacto: a borda pixel de 6px do kit engolia o texto (select aparecia vazio) */
select.tb-st, select.tb-area, html.kit select.tb-st, html.kit select.tb-area {
  border-image: none; border: 2px solid var(--navy-700); border-radius: 0; background: var(--paper-50);
  box-shadow: inset 0 -3px 0 var(--paper-300); font: 600 12px/1 var(--font); color: var(--navy-700); cursor: pointer;
}
select.tb-st { height: 26px; padding: 0 6px; min-width: 120px; }
select.tb-area { height: 30px; padding: 0 8px; }
select.tb-st, select.tb-area { line-height: normal; padding-top: 0; padding-bottom: 0; }
html.mobile select.tb-st, html.mobile select.tb-area { font-size: 16px; height: 34px; } /* 16px: iOS não dá zoom no foco */
.ai-side select.tb-st, .ai-side select.tb-area { padding-top: 0 !important; padding-bottom: 0 !important; height: 30px; }
html.mobile .ai-side select.tb-st, html.mobile .ai-side select.tb-area { height: 36px; }

/* ---------- Escritório (office.js): barra de contexto, quem te ouve, chamada, mesas, reuniões, vídeo ---------- */

/* barra de contexto: aparece só perto de mesa, porta de reunião, dentro da sala */
.ctx-bar {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: var(--z-hud);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 10px 8px;
  max-width: calc(100vw - 32px);
  background: var(--paper-50);
  color: var(--navy-800);
  box-shadow: inset 0 0 0 2px var(--navy-700), inset 0 -5px 0 var(--paper-300), 0 6px 0 -2px rgba(8, 12, 34, 0.45);
  animation: ds-pop-in var(--t-med) var(--ease-spring);
}
html.kit .ctx-bar { border: 12px solid transparent; border-image: var(--k-panel) 12 fill / 12px stretch; padding: 0 2px; box-shadow: 0 6px 0 -2px rgba(8, 12, 34, 0.45); background: none; }
.ctx-bar.hidden { display: none; }
.ctx-ic { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; color: var(--paper-50); background: var(--navy-600); box-shadow: inset 0 0 0 2px var(--navy-800), inset 0 -3px 0 var(--navy-800); }
.ctx-bar[data-kind="desk"] .ctx-ic { background: #a9743d; box-shadow: inset 0 0 0 2px #5c3a1c, inset 0 -3px 0 #5c3a1c; }
.ctx-bar[data-kind="door"] .ctx-ic, .ctx-bar[data-kind="meeting"] .ctx-ic { background: var(--green-600, #4e9a2a); box-shadow: inset 0 0 0 2px var(--green-700), inset 0 -3px 0 var(--green-700); }
.ctx-bar[data-kind="guest"] .ctx-ic { background: var(--amber-500); color: var(--navy-900); }
.ctx-bar.talking .ctx-ic { background: var(--green-500); }
.ctx-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; margin-right: 4px; }
.ctx-text b { font: 700 13px/1.1 var(--font); white-space: nowrap; }
.ctx-text span { font: 500 11.5px/1.1 var(--font); color: var(--on-surface-2, #55607f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:has(.ctx-bar:not(.hidden)) .hint { bottom: 156px; }

/* quem te ouve (privacidade sempre visível) */
.priv-pill {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 5px 12px 7px 6px; cursor: pointer;
  font: 600 12.5px/1 var(--font); color: var(--on-dark);
  background: var(--glass); backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 2px var(--green-700, #3d7a20), inset 0 -4px 0 rgba(8, 12, 34, 0.5), var(--shadow-1);
  border: 0;
}
.priv-pill:hover { filter: brightness(1.08); }
.priv-pill:focus-visible { outline: 2px solid var(--green-300); outline-offset: 2px; }
.priv-ic { display: grid; place-items: center; width: 22px; height: 22px; background: var(--green-500); color: var(--navy-900); }
.priv-pill.closed { box-shadow: inset 0 0 0 2px #c48a1e, inset 0 -4px 0 rgba(8, 12, 34, 0.5), var(--shadow-1); }
.priv-pill.closed .priv-ic { background: var(--amber-500); }
.priv-pill[data-kind="call"] .priv-ic { background: var(--sky-500); }
.priv-pill[data-kind="announce"] .priv-ic, .priv-pill[data-kind="stage"] .priv-ic { background: var(--red-500); color: #fff; }
.priv-k { font: 700 10px/1 var(--font-pixel); letter-spacing: 0.04em; text-transform: uppercase; }
.priv-sep { width: 2px; height: 16px; background: rgba(195, 203, 239, 0.25); }
.priv-faces { display: inline-flex; }
.priv-faces .ds-avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--navy-800); }
.priv-faces .ds-avatar:first-child { margin-left: 0; }
.priv-who { color: var(--on-dark-2, #c3cbef); font-weight: 500; }
.pop-below { transform-origin: top left; }
.priv-pop { width: 300px; display: flex; flex-direction: column; gap: 6px; }
.priv-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.priv-head .pi { color: var(--green-600, #4e9a2a); }
.priv-head[data-kind="room"] .pi, .priv-head[data-kind="desk"] .pi { color: #b8781a; }
.priv-explain { margin: 0 0 4px; font: 500 12.5px/1.45 var(--font); color: var(--on-surface-2, #55607f); }
.priv-row { align-items: center; }
.vol-bar { width: 48px; height: 6px; background: var(--paper-300); box-shadow: inset 0 0 0 1px rgba(31, 42, 92, 0.2); }
.vol-bar i { display: block; height: 100%; background: var(--green-500); }
.priv-pop .ds-btn.block { margin-top: 6px; }

/* anúncio para o andar */
.announce-pill {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 8px 12px; font-size: 13px; color: #ffe2dc;
  background: rgba(64, 16, 20, 0.92);
  box-shadow: inset 0 0 0 2px #b8402f, inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}
.announce-pill.hidden { display: none; }

/* chamada em andamento */
.call-bar {
  --pad: 8px;
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: calc(var(--z-hud) + 1);
  display: flex; align-items: center; gap: 10px;
}
body:has(.call-bar:not(.hidden)) .ctx-bar { bottom: 156px; }
.call-bar.hidden { display: none; }
.call-bar .rec { width: 8px; height: 8px; background: var(--sky-500); animation: blink 1.4s steps(2, jump-none) infinite; }
.call-faces { display: inline-flex; }
.call-faces .ds-avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--paper-50); }
.call-faces .ds-avatar:first-child { margin-left: 0; }
.call-text { display: flex; flex-direction: column; gap: 3px; }
.call-text b { font: 700 13px/1.1 var(--font); color: var(--navy-800); }
.call-t { font: 700 10px/1 var(--font-pixel); color: var(--navy-500); }

/* toque de chamada */
.ring-wrap { position: fixed; top: 196px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.ring-card {
  --pad: 14px;
  pointer-events: auto; position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 10px 14px;
  width: min(380px, calc(100vw - 32px));
  animation: ring-in 0.42s var(--ease-spring);
}
.ring-card:not(.out) { animation: ring-in 0.42s var(--ease-spring), ring-shake 2s 0.5s infinite; }
.ring-card.out-anim { animation: ds-toast-out var(--t-med) var(--ease-out) forwards; }
.ring-face { grid-row: span 2; display: grid; place-items: center; }
.ring-face .ds-avatar { box-shadow: 0 0 0 3px var(--green-500), 0 0 0 6px rgba(108, 191, 60, 0.25); animation: ring-pulse 1.2s ease-out infinite; }
.ring-card.out .ring-face .ds-avatar { box-shadow: 0 0 0 3px var(--sky-500), 0 0 0 6px rgba(79, 179, 232, 0.25); }
.ring-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ring-text b { font: 700 15px/1.2 var(--font); color: var(--navy-800); }
.ring-text span { font: 500 12px/1.3 var(--font); color: var(--on-surface-2, #55607f); }
.ring-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ring-time { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--green-500); transform-origin: left; animation: ring-time var(--ms) linear forwards; }
.ring-card.out .ring-time { background: var(--sky-500); }
@keyframes ring-in { from { opacity: 0; transform: translateY(-24px) scale(0.96); } }
@keyframes ring-shake { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-1.2deg); } 78% { transform: rotate(1.2deg); } 82% { transform: rotate(-0.8deg); } 86% { transform: rotate(0.6deg); } }
@keyframes ring-pulse { 0% { box-shadow: 0 0 0 3px var(--green-500), 0 0 0 4px rgba(108, 191, 60, 0.5); } 100% { box-shadow: 0 0 0 3px var(--green-500), 0 0 0 14px rgba(108, 191, 60, 0); } }
@keyframes ring-time { to { transform: scaleX(0); } }

/* no mapa: plaquinha da mesa e placa "Em reunião" */
.office-layer { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.desk-plate {
  position: absolute; left: 0; top: 0; will-change: transform;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px 3px; white-space: nowrap;
  font: 700 9.5px/1 var(--font-pixel); letter-spacing: 0.02em;
  color: #fff4e0; background: #6b4423;
  box-shadow: inset 0 0 0 1px #3d2410, inset 0 -2px 0 #3d2410, 0 2px 0 rgba(8, 12, 34, 0.35);
}
.desk-plate.mine { background: var(--green-700, #3d7a20); box-shadow: inset 0 0 0 1px #234d10, inset 0 -2px 0 #234d10, 0 2px 0 rgba(8, 12, 34, 0.35); }
.desk-plate.free { background: rgba(13, 19, 48, 0.55); color: var(--on-dark-2, #c3cbef); box-shadow: inset 0 0 0 1px rgba(195, 203, 239, 0.35); font-weight: 400; }
.plate-decor { font-size: 11px; letter-spacing: 0; }
.plate-lock { display: inline-grid; color: var(--amber-500); }
.plate-lock .pi { --ic: 10px; }
.plate-on { width: 5px; height: 5px; background: var(--green-500); box-shadow: 0 0 0 1px #234d10; }
.door-badge {
  position: absolute; left: 0; top: 0; will-change: transform;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 5px;
  font: 700 10px/1 var(--font-pixel); text-transform: uppercase; letter-spacing: 0.04em;
  color: #ffe2dc; background: rgba(64, 16, 20, 0.9); box-shadow: inset 0 0 0 2px #b8402f;
}
.door-badge .rec { width: 6px; height: 6px; background: var(--red-500); animation: blink 1.4s steps(2, jump-none) infinite; }

.guest-tag {
  position: absolute; left: 0; top: 0; will-change: transform; white-space: nowrap;
  padding: 3px 6px 4px; font: 700 9px/1 var(--font-pixel); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--navy-900); background: var(--amber-500); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 2px 0 rgba(8, 12, 34, 0.35);
}

/* localizar: seta na borda / marcador */
.locate-arrow { position: fixed; left: 0; top: 0; z-index: calc(var(--z-hud) - 1); pointer-events: none; will-change: transform; }
.locate-arrow.hidden { display: none; }
.locate-arrow .arr {
  position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; background: var(--amber-500);
  clip-path: polygon(0 20%, 60% 20%, 60% 0, 100% 50%, 60% 100%, 60% 80%, 0 80%);
  transform: rotate(var(--a)); filter: drop-shadow(0 2px 0 var(--navy-900));
}
.locate-arrow.inside .arr { transform: rotate(90deg) translateX(-14px); animation: locate-bob 0.7s ease-in-out infinite alternate; }
.locate-arrow span {
  position: absolute; left: 0; top: 18px; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 6px 4px; font: 700 10px/1 var(--font-pixel); color: var(--navy-900); background: var(--amber-500); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}
.locate-arrow.inside span { top: -48px; }
@keyframes locate-bob { to { transform: rotate(90deg) translateX(-6px); } }

/* menus */
.meet-pop { width: 340px; display: flex; flex-direction: column; gap: 4px; }
.meet-row { align-items: center; }
.meet-ic { display: grid; place-items: center; width: 28px; height: 28px; color: var(--paper-50); background: var(--green-600, #4e9a2a); box-shadow: inset 0 -3px 0 var(--green-700, #3d7a20); }
.meet-ic.busy { background: #b8402f; box-shadow: inset 0 -3px 0 #7a2318; }
.meet-pop .pop-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; text-align: left; font: 600 13px/1.2 var(--font); color: var(--navy-800); background: none; border: 0; cursor: pointer; }
.meet-pop .pop-item:hover { background: rgba(31, 42, 92, 0.08); }
.view-pop { width: 280px; }
.view-pop .pop-item { display: flex; align-items: flex-start; gap: 10px; }
.view-pop .pop-item b { display: block; font: 700 13px/1.2 var(--font); }
.view-pop .pop-item small { display: block; margin-top: 2px; font: 500 11.5px/1.2 var(--font); color: var(--on-surface-2, #55607f); }
.view-dot { width: 10px; height: 10px; margin-top: 3px; flex: 0 0 auto; box-shadow: inset 0 0 0 2px var(--navy-500); }
.view-pop .pop-item.sel .view-dot { background: var(--green-500); box-shadow: inset 0 0 0 2px var(--green-700, #3d7a20); }
.decor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.decor-grid .react.sel { background: var(--green-100); box-shadow: inset 0 0 0 2px var(--green-500); }

/* Configurações: Áudio, vídeo e avisos */
.av-modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.av-settings { display: flex; flex-direction: column; gap: 10px; }
.set-field { display: flex; flex-direction: column; gap: 6px; }
.set-field select { width: 100%; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-row b { display: block; font: 600 13.5px/1.2 var(--font); color: var(--navy-800); }
.set-row small { display: block; margin-top: 2px; font: 500 12px/1.3 var(--font); color: var(--on-surface-2, #55607f); }
.range-chips { flex-wrap: wrap; }

/* vídeo: grupo de conversa, foco, grade */
.tile.grp { box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--green-300, #a6dc85), 0 0 0 7px var(--navy-700), 0 10px 0 -3px rgba(8, 12, 34, 0.55); }
.tile.grp.speaking { box-shadow: 0 0 0 2px var(--navy-700), 0 0 0 5px var(--green-500), 0 0 0 7px var(--navy-700), 0 10px 0 -3px rgba(8, 12, 34, 0.55); }
.strip.spot .tile.main { order: -1; width: 384px; height: 288px; }
.strip.spot { align-items: flex-start; }
.strip.gallery {
  position: fixed; inset: 64px 24px 96px; transform: none; max-width: none; left: 24px;
  z-index: calc(var(--z-hud) + 2);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-auto-rows: minmax(200px, 1fr);
  gap: 18px; padding: 18px; overflow: auto;
  background: rgba(8, 12, 34, 0.92);
  box-shadow: inset 0 0 0 2px var(--navy-500);
}
.strip.gallery .tile { width: auto; height: auto; min-height: 200px; opacity: 1; }
.strip.gallery .tile.main { grid-column: span 2; grid-row: span 2; }
.gallery-head {
  position: fixed; top: 16px; left: 24px; right: 24px; height: 48px; padding: 0 8px 0 16px; z-index: calc(var(--z-hud) + 3);
  display: flex; justify-content: space-between; align-items: center; color: var(--on-dark);
  background: var(--navy-900); box-shadow: inset 0 0 0 2px var(--navy-500), inset 0 -4px 0 rgba(0, 0, 0, 0.35);
}
.gallery-head .ds-label { color: var(--on-dark); }
body.view-gallery .people, body.view-gallery .top-left { visibility: hidden; }
.guest-badge { margin-left: 6px; }
.flag.fav { color: var(--amber-500); }
.gallery-head.hidden { display: none; }
body.view-gallery .ctx-bar, body.view-gallery .office-layer { display: none; }

@media (max-width: 720px) {
  .ctx-bar { bottom: 150px; flex-wrap: wrap; justify-content: center; }
  .priv-who { display: none; }
  .strip.gallery { inset: 64px 8px 150px; grid-template-columns: 1fr; }
  .strip.gallery .tile.main { grid-column: auto; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-card, .ring-card:not(.out), .ring-face .ds-avatar, .locate-arrow .arr { animation: none !important; }
}

/* ===== sala de espera do convidado (guestlobby.js) + ficha do cliente na reunião (meetclient.js) ===== */

/* cartão "Fulano quer entrar": o mesmo desenho das chamadas, em âmbar (é portaria, não telefone) */
.ring-card.guest-wait:not(.out) { animation: ring-in 0.42s var(--ease-spring); } /* sem tremer: ninguém está chamando */
.ring-card.guest-wait .ring-face { color: var(--amber-500, #e0a33c); }
.ring-card.guest-wait .ring-face svg { width: 34px; height: 34px; }
.ring-card.guest-wait .ring-time { background: var(--amber-500, #e0a33c); }

/* tela de espera do visitante */
.overlay.lobby { display: grid; place-items: center; }
.lobby-card { max-width: 420px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.lobby-card .ds-title { margin: 0; }
.lobby-clock { color: var(--on-surface-2, #55607f); letter-spacing: 0.04em; min-height: 16px; }
.lobby-spin { display: flex; gap: 7px; padding: 6px 0; }
.lobby-spin.hidden { display: none; }
.lobby-spin i { width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); animation: lobby-bounce 1.1s infinite ease-in-out; }
.lobby-spin i:nth-child(2) { animation-delay: 0.16s; }
.lobby-spin i:nth-child(3) { animation-delay: 0.32s; }
@keyframes lobby-bounce { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-6px); } }
.lobby-card[data-state="denied"] .ds-title, .lobby-card[data-state="timeout"] .ds-title { color: var(--amber-600, #b57d1c); }
.lobby-card[data-state="admitted"] .ds-title { color: var(--green-600, #4e9a2a); }

/* painel lateral da ficha do cliente */
.meetc { width: 320px; }
.meetc .meetc-name { margin: 0; line-height: 1.15; }
.meetc .meetc-sub { margin: 2px 0 0; }
.meetc-body { display: grid; gap: 12px; align-content: start; padding-top: 8px; }
.meetc-block { display: grid; gap: 6px; }
.meetc-rows { display: grid; gap: 4px; }
.meetc-row { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.meetc-k { flex: 0 0 auto; }
.meetc-v { font: 600 12.5px/1.3 var(--font); color: var(--navy-800); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.meetc-empty { margin: 0; font-style: italic; }
.meetc-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.meetc-tasks li { display: grid; gap: 1px; padding-left: 8px; border-left: 2px solid var(--green-500); }
.meetc-tasks li.late { border-left-color: var(--red-500, #d2553f); }
.meetc-tasks b { font: 600 12.5px/1.25 var(--font); color: var(--navy-800); }
.meetc-pick { display: grid; gap: 6px; margin: 6px 0 10px; }
.meetc-pick-item { display: grid; gap: 1px; text-align: left; justify-items: start; }
.meetc-fonte { margin: 4px 0 0; font-size: 11px; }
.meetc-warn { margin: 0; font-size: 11px; opacity: 0.8; }
@media (max-width: 900px) {
  .meetc { width: min(320px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .lobby-spin i { animation: none !important; }
}

/* ============================================================================================================
   Phygo Metaverso no CELULAR — v2 (14→15/10, "a UI ficou ruim no celular").
   Princípio: o MAPA é a tela. Pouca coisa por cima; um painel por vez, de baixo para cima; nada de atalho de teclado.
   Dock enxuto (5 botões fixos: você · mic · câmera · chat · IAs · ⋯); o resto vai para o "⋯".
   Vale para <= 640px ou toque sem mouse até 900px (classe html.mobile, ligada em main.js).
   ============================================================================================================ */
html.mobile, html.mobile body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
html.mobile body { --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --dock-h: 60px; }
html.mobile canvas { touch-action: none; }
html.mobile input, html.mobile textarea, html.mobile select, html.mobile .ds-input { font-size: 16px !important; }
html.mobile kbd, html.mobile .ds-kbd, html.mobile .more-kbd { display: none !important; }

/* ---------- dock: 6 alvos grandes, centralizados, sem rolagem ---------- */
html.mobile .toolbar.dock {
  left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-width: none;
  border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
  padding: 6px 6px calc(6px + var(--safe-b)); gap: 4px;
  justify-content: space-around; overflow: hidden; animation: none;
}
html.mobile .toolbar.dock > * { flex: 0 0 auto; }
html.mobile .toolbar.dock .ds-sep,
html.mobile .toolbar.dock .status-pill,
html.mobile #btn-screen, html.mobile #btn-react, html.mobile #btn-people, html.mobile #btn-settings, html.mobile #btn-rituals,
html.mobile #btn-market, html.mobile #btn-approvals, html.mobile .dock .mob-hide { display: none !important; }
html.mobile .toolbar.dock .ds-ib { width: 48px; height: 48px; }
html.mobile .dock-me { padding: 0; }
html.mobile .dock-me .me-text { display: none; }

/* ---------- topo: só "onde estou", pequeno; o resto some ---------- */
html.mobile .top-left { top: calc(6px + var(--safe-t)); left: 6px; right: auto; max-width: calc(100vw - 12px); gap: 4px; }
html.mobile .top-left .where { font-size: 12px; padding: 4px 8px; }
/* só a sala/área atual (sem "Phygo · Sede >") */
html.mobile .where .map-name, html.mobile .where .sep-chev:first-of-type { display: none; }
html.mobile .where:not(:has(.area-tag)):not(:has(.nook-tag)) .map-name { display: inline-flex; }
/* "quem te ouve" (privacidade) e "ao vivo" saem: no celular o selo de voz já diz quem ouve */
html.mobile .top-left > .priv-pill, html.mobile .top-left > .live { display: none !important; }
/* barra da sala (Ata, Transcrever, Gravar): fica, compacta e rolável */
html.mobile .ai-room { max-width: calc(100vw - 12px); overflow-x: auto; scrollbar-width: none; font-size: 12px; gap: 4px; }
html.mobile .ai-room .ai-room-t span { display: none; }
html.mobile .ai-room .ds-btn.sm { min-height: 34px; padding: 0 8px; }

/* ---------- vídeos: miniaturas pequenas no canto direito do topo, sem tapar o centro ---------- */
html.mobile .strip { top: calc(6px + var(--safe-t)) !important; right: 6px !important; left: auto !important; max-width: 50vw !important;
  transform: none !important; padding: 0; gap: 4px; flex-direction: row-reverse; }
html.mobile .strip .tile { width: 72px; height: 54px; margin: 3px; box-shadow: 0 0 0 2px var(--navy-700); }
html.mobile .strip .tile.self { display: none; } /* você não precisa se ver no celular: o avatar já é você */
html.mobile .strip .tile-label { font-size: 9px; }

/* ---------- painéis (IAs, Tarefas, Pessoas, Agenda): folha de baixo ---------- */
html.mobile .ds-side, html.mobile .people, html.mobile .ai-side {
  top: calc(40px + var(--safe-t)) !important; left: 0 !important; right: 0 !important;
  bottom: calc(var(--dock-h) + var(--safe-b)) !important;
  width: auto !important; height: auto !important; max-height: none !important;
  border-radius: 10px 10px 0 0; animation: mob-sheet-in .18s ease-out;
}
@keyframes mob-sheet-in { from { transform: translateY(30px); opacity: 0; } }
html.mobile .ai-side .ds-tabs.ai-tabs { overflow-x: auto; overflow-y: hidden; flex: 0 0 auto; height: auto; min-height: 42px;
  flex-wrap: nowrap; scrollbar-width: none; gap: 2px; align-items: flex-end; }
html.mobile .ai-side .ds-tabs.ai-tabs::-webkit-scrollbar { display: none; }
html.mobile .ai-side .ai-tabs .ds-tab { flex: 0 0 auto; height: 38px; min-height: 38px; padding: 0 12px; font-size: 13.5px; }
html.mobile .ai-head .ds-title { font-size: 14px; }
/* Empresa: números em faixa compacta (2 linhas de texto, não meia tela) */
html.mobile .ai-side .board-stats { display: flex !important; flex: 0 0 auto; height: auto; min-height: 52px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
html.mobile .board-stat { flex: 0 0 auto; min-width: 72px; padding: 4px 6px !important; }
html.mobile .board-stat b { font-size: 16px; }
html.mobile .board-stat span { font-size: 10.5px; line-height: 1.15; }
/* Conversa: cartão da IA enxuto (nome + cargo), ferramentas escondidas (ficam em Colegas) */
html.mobile .ai-side .ai-badge-card { padding: 6px 8px; gap: 8px; flex: 0 0 auto; }
html.mobile .ai-side .ai-badge-card .ai-card-av canvas, html.mobile .ai-side .ai-badge-card .ai-card-av img,
html.mobile .ai-side .ai-badge-card .ai-card-av svg, html.mobile .ai-side .ai-badge-card .ds-avatar { width: 36px !important; height: 36px !important; }
html.mobile .ai-side .ai-badge-card .ai-tools { display: none !important; }
html.mobile .ai-side .ai-badge-card .ai-card-main .muted { font-size: 12px; }
html.mobile .ai-pick { display: none; } /* troca de IA pela aba Colegas / Empresa */
html.mobile .ai-tip { display: none; }
html.mobile .ai-compose { gap: 4px; }
html.mobile .ai-compose .ds-ib.sm, html.mobile #ai-mic, html.mobile #ai-send, html.mobile #ai-attach { width: 44px; height: 44px; flex: 0 0 auto; }
html.mobile .ai-input { min-height: 44px; }

/* ---------- chat: folha de baixo (60% da tela), acima do dock ---------- */
html.mobile .chat { left: 0; right: 0; width: auto; bottom: calc(var(--dock-h) + var(--safe-b)); height: 60dvh;
  border-radius: 10px 10px 0 0; border-left: 0; border-right: 0; }
html.mobile .chat-tab { min-height: 38px; }

/* ---------- menus (Mais, reações, status): folha de baixo em largura total ---------- */
html.mobile .more-menu, html.mobile .ds-pop {
  left: 0 !important; right: 0 !important; width: auto !important; bottom: calc(var(--dock-h) + var(--safe-b)) !important;
  border-radius: 10px 10px 0 0; max-height: 70dvh; overflow-y: auto;
}
html.mobile .more-row { min-height: 48px; font-size: 16px; }

/* ---------- dica de ação: pílula verde acima do dock (não uma barra larga) ---------- */
html.mobile .hint { bottom: calc(var(--dock-h) + 10px + var(--safe-b)) !important; left: 50% !important; right: auto;
  transform: translateX(-50%) !important; max-width: calc(100vw - 24px);
  min-height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 16px; font-size: 14.5px; cursor: pointer;
  background: var(--green-500); color: #0f1428; font-weight: 700; border-radius: 22px; pointer-events: auto; white-space: nowrap; }
html.mobile .hint.hidden { display: none; }
/* selo de voz: pequeno, logo abaixo do topo */
html.mobile .vc-badge { top: calc(44px + var(--safe-t)); bottom: auto; left: 6px; transform: none; font-size: 11.5px; padding: 4px 8px;
  max-width: calc(100vw - 90px); overflow: hidden; text-overflow: ellipsis; border-top: 0; border-left: 2px solid var(--green-500); }

/* ---------- avisos ---------- */
html.mobile body .toast-stack { left: 8px; right: 8px; bottom: calc(var(--dock-h) + 60px + var(--safe-b)); }
html.mobile .meet-banner { top: calc(40px + var(--safe-t)); left: 6px; right: 6px; transform: none; max-width: none; flex-wrap: wrap; font-size: 12px; }
html.mobile .meet-captions { bottom: calc(var(--dock-h) + 64px + var(--safe-b)); }
html.mobile .screen-view { width: calc(100vw - 12px) !important; left: 6px !important; transform: none !important; }
html.mobile .ds-modal { width: calc(100vw - 16px) !important; max-height: calc(100dvh - 32px); overflow-y: auto; }

/* ---------- tela de entrada ---------- */
html.mobile .entry-page { padding: calc(8px + var(--safe-t)) 12px calc(80px + var(--safe-b)); }
html.mobile .entry-top-r .ds-chip { display: none; }
html.mobile .entry-main { display: flex !important; flex-direction: column; gap: 6px; }
html.mobile .entry-stage { gap: 4px; }
html.mobile .stage { gap: 4px; }
html.mobile .stage::before { display: none; }
html.mobile .stage-figure canvas { width: 96px !important; height: auto !important; }
html.mobile .stage-name { font-size: 13px; }
html.mobile .stage-controls { transform: scale(.85); }
html.mobile .entry-card { --pad: 12px; gap: 8px; animation: none !important; filter: none !important; }
html.mobile .overlay.entry { animation: none !important; }
html.mobile .entry-title { font-size: 19px; }
html.mobile .greet, html.mobile .entry-greet { display: none; }
html.mobile .devcheck { display: none; }
html.mobile #join-btn { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: calc(var(--z-hud) + 5);
  min-height: 52px; font-size: 17px; justify-content: center; box-shadow: 0 -10px 18px 6px rgba(11, 13, 30, .85); }
html.mobile .tap-hint { display: block; }

/* marcador do toque: dica de primeira vez */
.tap-hint { display: none; position: fixed; left: 50%; bottom: calc(132px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: var(--z-hud); background: rgba(31,42,92,.94); color: #fff; padding: 8px 14px; font-size: 13px; border-radius: 18px;
  pointer-events: none; white-space: nowrap; }
html.mobile .mob-extras .more-row { display: flex; align-items: center; gap: 12px; }
html.mobile .mob-ic { width: 22px; display: inline-grid; place-items: center; }
html.mobile .mob-ic svg { width: 18px; height: 18px; }
.mob-extras.hidden { display: none; }

/* dica de 1ª vez só com o mapa livre (some sob painéis) */
html.mobile body:has(.ai-side:not(.hidden)) .tap-hint, html.mobile body:has(.chat:not(.hidden)) .tap-hint,
html.mobile body:has(.people:not(.hidden)) .tap-hint { display: none; }
/* onde estou: sem a setinha antes da sala */
html.mobile .where .sep-chev { display: none; }
html.mobile .toolbar.dock .dock-me { width: 48px; height: 48px; min-width: 48px; display: grid; place-items: center; }

/* ---------- v3 (27/10): sala recolhida + mesa só no toque, painéis de baixo ---------- */
.ai-room-chev, .ai-room-lbl, .ctx-x { display: none; }
html.mobile .ai-room { cursor: pointer; }
html.mobile .ai-room-chev { display: inline; font-style: normal; margin-left: 6px; color: var(--navy-200); }
html.mobile .ai-room:not(.open) > .ds-btn { display: none !important; }
html.mobile .ai-room.open {
  position: fixed; left: 0; right: 0; bottom: calc(var(--dock-h) + var(--safe-b)); top: auto; max-width: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 16px; overflow: visible;
  background: var(--paper-100); color: var(--navy-700); box-shadow: inset 0 2px 0 var(--navy-700), 0 -10px 30px rgba(0,0,0,.45);
  z-index: calc(var(--z-hud) + 3); animation: mob-sheet-in .18s ease-out;
}
html.mobile .ai-room.open .ai-room-ic { display: none; }
html.mobile .ai-room.open .ai-room-t { grid-column: 1 / -1; font-size: 16px; }
html.mobile .ai-room.open .ai-room-t b { color: var(--navy-700); }
html.mobile .ai-room.open .ai-room-chev { color: var(--navy-700); }
html.mobile .ai-room.open .ai-room-lbl { display: block; grid-column: 1 / -1; font: 10px var(--font-pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-2); }
html.mobile .ai-room.open .ds-btn.sm { min-height: 46px; font-size: 14px; justify-content: center; }
html.mobile .ai-room.open #ai-minutes { grid-column: 1 / -1; }

/* card da mesa = folha de baixo, botões grandes */
html.mobile .ctx-bar:not(.hidden) {
  left: 0; right: 0; transform: none; max-width: none; bottom: calc(var(--dock-h) + var(--safe-b));
  flex-wrap: wrap; gap: 8px; padding: 12px 14px 16px; border-radius: 10px 10px 0 0; animation: mob-sheet-in .18s ease-out;
}
html.mobile .ctx-bar .ctx-text { flex: 1; }
html.mobile .ctx-bar .ctx-text b { font-size: 15px; }
html.mobile .ctx-bar > .ds-btn { flex: 1 1 40%; min-height: 46px; font-size: 14px; justify-content: center; }
html.mobile .ctx-bar .ctx-x { display: grid; place-items: center; order: 3; width: 36px; height: 36px; background: none; border: 0; font-size: 18px; color: var(--navy-700); margin-left: auto; }
html.mobile .ctx-bar .ctx-ic { order: 1; } html.mobile .ctx-bar .ctx-text { order: 2; }
html.mobile .ctx-bar > .ds-btn { order: 4; }
html.mobile .ctx-bar #ctx-close.primary, html.mobile .ctx-bar #ctx-claim { flex-basis: 100%; }
/* etiquetas "Livre" fixas nas mesas somem no celular */
html.mobile .desk-plate.free { display: none !important; }
