/* O que é só do app de verdade: a janela ocupa a tela, os campos são campos e as listas rolam.
   Cores e medidas vêm dos tokens da Hypercube UI e das peças aprovadas (proposal.css). */

/* Cores da janela, conferidas no app de referência (tokens do tema escuro e do claro, 24/11/2026).
   Só os valores foram medidos; a marca (verde, fonte, bonecos) é a nossa.
   Moldura = faixa de ícones e barra de cima. Tela = o painel arredondado com a lista e a conversa. */
:root:not([data-theme='light']) {
  --hb-tk-comment: #7d8590;
  --hb-tk-string: #8bd49c;
  --hb-tk-number: #f0b072;
  --hb-tk-keyword: #7fb2ff;
  --hb-tk-tag: #e58fb0;
  --hb-file: #42a0ff;
  --hb-file-soft: rgba(0, 124, 247, 0.14);
  --hb-file-doc: #ff6069;
  --hb-media-text: #ffffff;
  --hb-media-muted: rgba(255, 255, 255, 0.78);
  --hb-media-track: rgba(255, 255, 255, 0.3);
  --hb-media-hover: rgba(255, 255, 255, 0.16);
  --hb-media-surface: rgba(0, 0, 0, 0.5);
  --hb-media-surface-hover: rgba(0, 0, 0, 0.64);
  --hb-media-scrim: rgba(0, 0, 0, 0.55);
  --hb-stop-bg: rgba(0, 124, 247, 0.34);
  --hb-stop-edge: rgba(0, 124, 247, 0.16);
  --hb-stop-fg: #42a0ff;
  --hb-stop-btn-bg: #f0f0f0;
  --hb-stop-btn-fg: #141414;
  --hb-stop-btn-edge: rgba(20, 20, 20, 0.36);
  --hb-badge-bg: #4c8dff;
  --hb-badge-fg: #ffffff;
  --hb-warn: #ff9412;
  --hb-warn-text: #ff9412;
  --hb-warn-soft: rgba(255, 148, 18, 0.12);
  --hb-ring-ok: #31cf76;
  --hb-ring-warn: #ff9412;
  --hb-ring-crit: #fd2f3b;
  --hb-drop-text: #42a0ff;
  --hb-drop-soft: rgba(0, 124, 247, 0.16);
  --hb-drop-edge: rgba(0, 124, 247, 0.34);
  --hb-frame: #0d0d0d;
  --hb-hover: rgba(255, 255, 255, 0.06);
  --hb-readable: rgba(255, 255, 255, 0.52);
  --hb-selected: #212121;
  --hb-field: rgba(0, 0, 0, 0.1);
  --hb-ctl-hover: #242424;
  --hb-grouped-line: #333335;
  --hb-card-line: rgba(255, 255, 255, 0.035);
  --hb-tile: rgba(255, 255, 255, 0.035);
  --hb-dialog-ring: rgba(255, 255, 255, 0.1);
  --hb-dialog-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  --hb-qr-paper: #ffffff;
  --hb-qr-ink: #141414;
  --hb-danger-soft: rgba(253, 47, 59, 0.16);
  --hb-danger: #fd2f3b;
  --hb-danger-text: #ff6069;
  --hb-ctx-ambient: rgba(0, 0, 0, 0.1);
  --hb-raised: #242424;
  --hb-quit-veil: rgba(0, 0, 0, 0.1);
  --hb-quit-edge: rgba(255, 255, 255, 0.045);
  --hb-new-bg: #f0f0f0;
  --hb-ctl-active: #2a2a2a;
  --hb-mp-bg: rgba(26, 26, 26, 0.92);
  --hb-mp-edge: rgba(255, 255, 255, 0.035);
  --hb-mp-edge-strong: rgba(255, 255, 255, 0.045);
  --hb-new-bg-hover: #dcdcdc;
  --hb-new-fg: #141414;
  --hb-send-bg: #ffffff;
  --hb-send-fg: #1a1a1a;
  --hb-pick-bg: #212121;
  --hb-pick-edge: rgba(255, 255, 255, 0.045);
  --hb-pick-hover: rgba(255, 255, 255, 0.06);
  --hb-chip-bg: rgba(255, 255, 255, 0.035);
  --hb-chip-hover: rgba(255, 255, 255, 0.045);
  --hb-chip-skill-bg: rgba(0, 124, 247, 0.16);
  --hb-chip-skill-fg: #42a0ff;
  --bg: #0d0d0d;
  --bg-side: #0d0d0d;
  --sunken: #0d0d0d;
  --surface: #1a1a1a;
  --surface-2: #212121;
  --surface-3: #2a2a2a;
  --divider: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.045);
  --border-strong: #6a6a6a;
  --text: #ffffff;
  --text-2: #dcdcdc;
  --text-3: #979797;
  --text-4: #6a6a6a;
  --green: #31cf76;
  --amber: #ff9412;
  --red: #ff6069;
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --hb-tk-comment: #6a737d;
  --hb-tk-string: #1a7f37;
  --hb-tk-number: #b35900;
  --hb-tk-keyword: #0a5ccf;
  --hb-tk-tag: #b4235a;
  --hb-file: #0064c8;
  --hb-file-soft: rgba(0, 124, 247, 0.12);
  --hb-file-doc: #c0141d;
  --hb-media-text: #ffffff;
  --hb-media-muted: rgba(255, 255, 255, 0.78);
  --hb-media-track: rgba(255, 255, 255, 0.3);
  --hb-media-hover: rgba(255, 255, 255, 0.16);
  --hb-media-surface: rgba(0, 0, 0, 0.5);
  --hb-media-surface-hover: rgba(0, 0, 0, 0.64);
  --hb-media-scrim: rgba(0, 0, 0, 0.55);
  --hb-stop-bg: rgba(0, 124, 247, 0.26);
  --hb-stop-edge: rgba(0, 124, 247, 0.12);
  --hb-stop-fg: #0064c8;
  --hb-stop-btn-bg: #1c1c1e;
  --hb-stop-btn-fg: #ffffff;
  --hb-stop-btn-edge: rgba(255, 255, 255, 0.4);
  --hb-badge-bg: #2563eb;
  --hb-badge-fg: #ffffff;
  --hb-warn: #f08a00;
  --hb-warn-text: #9c5200;
  --hb-warn-soft: rgba(240, 138, 0, 0.14);
  --hb-ring-ok: #32a85d;
  --hb-ring-warn: #c58a23;
  --hb-ring-crit: #d85f58;
  --hb-drop-text: #0064c8;
  --hb-drop-soft: rgba(0, 124, 247, 0.12);
  --hb-drop-edge: rgba(0, 124, 247, 0.26);
  --hb-frame: #e8e8eb;
  --hb-hover: rgba(20, 20, 20, 0.05);
  --hb-readable: rgba(20, 20, 20, 0.6);
  --hb-selected: color-mix(in srgb, #141414 10%, #f5f5f6);
  --hb-field: transparent;
  --hb-ctl-hover: #f0f0f2;
  --hb-grouped-line: #e3e3e6;
  --hb-card-line: rgba(20, 20, 20, 0.1);
  --hb-tile: rgba(20, 20, 20, 0.07);
  --hb-dialog-ring: rgba(20, 20, 20, 0.1);
  --hb-dialog-shadow: 0 12px 32px transparent;
  --hb-qr-paper: #ffffff;
  --hb-qr-ink: #141414;
  --hb-danger-soft: rgba(232, 34, 45, 0.12);
  --hb-danger: #e8222d;
  --hb-danger-text: #c0141d;
  --hb-ctx-ambient: transparent;
  --hb-raised: #fcfcfc;
  --hb-quit-veil: rgba(20, 20, 20, 0.12);
  --hb-quit-edge: rgba(20, 20, 20, 0.1);
  --hb-new-bg: #141414;
  --hb-ctl-active: #e8e8eb;
  --hb-mp-bg: rgba(245, 245, 246, 0.92);
  --hb-mp-edge: rgba(20, 20, 20, 0.07);
  --hb-mp-edge-strong: rgba(20, 20, 20, 0.1);
  --hb-new-bg-hover: #3a3a3c;
  --hb-new-fg: #f2f2f2;
  --hb-send-bg: #141414;
  --hb-send-fg: #f5f5f6;
  --hb-pick-bg: #ffffff;
  --hb-pick-edge: rgba(20, 20, 20, 0.1);
  --hb-pick-hover: rgba(20, 20, 20, 0.05);
  --hb-chip-bg: rgba(20, 20, 20, 0.07);
  --hb-chip-hover: rgba(20, 20, 20, 0.1);
  --hb-chip-skill-bg: rgba(0, 124, 247, 0.12);
  --hb-chip-skill-fg: #0064c8;
  --bg: #e8e8eb;
  --bg-side: #e8e8eb;
  --sunken: #e8e8eb;
  --surface: #f5f5f6;
  --surface-2: #ffffff;
  --surface-3: #e8e8eb;
  --divider: rgba(20, 20, 20, 0.07);
  --border: rgba(20, 20, 20, 0.1);
  --border-strong: #8e8e93;
  --text: #141414;
  --text-2: #3a3a3c;
  --text-3: #6b6b70;
  --text-4: #8e8e93;
  --green: #187a41;
  --amber: #9c5200;
  --red: #c0141d;
  --shadow-pop: 0 0 0 1px rgba(20, 20, 20, 0.1);
  color-scheme: light;
}
html,
body {
  height: 100%;
  margin: 0;
  background: var(--hb-frame);
}
.hb.app {
  --hb-side: var(--surface);
  --hb-line: var(--divider);
  --hb-rail-w: 52px;
  --hb-top-h: 38px;
  position: fixed;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: var(--hb-frame);
}
.app-boot,
.app-full {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.app-full h1 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 600;
}
.app-full p {
  margin: 0;
  max-width: 440px;
  color: var(--hb-muted);
}
.app-full img {
  width: 96px;
  height: 96px;
}
/* Tela de erro da leitura inicial: logo de 80 px, título, frase, o motivo e "Tentar de novo" (44 px). Medidas do
   app de referência (auth.css, 26/11/2026): coluna de 360 px, título de 24 px, texto de 15 px. */
.ent {
  display: grid;
  height: 100%;
  overflow-y: auto;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 32px 24px;
}
.ent-shell {
  display: flex;
  width: min(100%, 360px);
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.ent-logo {
  display: block;
  width: 80px;
  height: 80px;
}
.ent-card {
  width: 100%;
}
.ent-card h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 580;
  letter-spacing: -0.035em;
  line-height: 30px;
}
.ent-desc {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 21px;
}
.ent-why {
  margin: 16px 0 0;
  color: var(--text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 17px;
  overflow-wrap: anywhere;
}
.hb.app .ent-go {
  width: 100%;
  height: auto;
  min-height: 44px;
  margin-top: 30px;
  gap: 8px;
  border-radius: 8px;
}
.hb.app .ent-go .hc-loader {
  flex: none;
}
/* O aviso de queda da conexão (connection.js): uma faixa no alto (as medidas do aviso do app de referência: 12 de
   respiro, fundo da tela, linha embaixo) e o quadro de situação (passos de 4 de vão, 12 de raio, ícone de 20). */
.hb.app[data-conn] .hb-win {
  margin-top: var(--cn-h);
  height: calc(100% - var(--cn-h));
}
.hb.app {
  --cn-h: 57px;
}
.hb.app #conn:empty {
  display: none;
}
.hb.app .cn-bar {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: var(--cn-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}
.hb.app .cn-text {
  min-width: 0;
}
.hb.app .cn-text p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.hb.app .cn-title {
  color: var(--text);
  font-weight: 500;
}
.hb.app .cn-detail {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb.app .cn-acts {
  flex: none;
  display: flex;
  gap: 8px;
}
.hb.app .cn-steps {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  list-style: none;
}
.hb.app .cn-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding-block: 6px;
}
.hb.app .cn-step-i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--text-4);
}
.hb.app .cn-step[data-status='done'] .cn-step-i {
  color: var(--green);
}
.hb.app .cn-step[data-status='failed'] .cn-step-i {
  color: var(--red);
}
.hb.app .cn-step-t {
  display: grid;
  min-width: 0;
}
.hb.app .cn-step-l {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.hb.app .cn-step[data-status='pending'] .cn-step-l {
  color: var(--text-3);
}
.hb.app .cn-step-d {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.hb.app .cn-step-a {
  margin-top: 8px;
}
.hb.app .cf-text .cn-meta {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .hb.app {
    --cn-h: 92px;
  }
  .hb.app .cn-bar {
    flex-wrap: wrap;
    align-content: center;
    gap: 6px;
  }
}
@media (max-width: 480px) {
  .ent {
    padding: 40px 20px;
  }
  .ent-shell {
    gap: 24px;
  }
}
.app-noscript {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  padding: 12px 16px;
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
}

/* a barra de cima da lateral não tem os botões da janela: quem desenha a janela é o sistema */
.hb.app .hb-top-side {
  padding: 0 8px;
}
.hb.app .hb-msgs {
  overflow-y: auto;
  scrollbar-width: thin;
}
.app-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hb.app button.hb-row {
  text-align: left;
}

/* lista de bots como no app de referência: bonecos grandes e largura que a pessoa escolhe */
.hb.app .hb-win {
  position: relative;
  isolation: isolate;
  --side-w: 280px;
  --side-col: min(var(--side-w), 42vw);
  grid-template-columns: var(--hb-rail-w) var(--side-col) minmax(0, 1fr);
  grid-template-rows: var(--hb-top-h) minmax(0, 1fr);
  padding: 0 5px 5px 0;
  background: var(--hb-frame);
}
/* o painel arredondado onde ficam a lista e a conversa, um tom acima da moldura */
.hb.app .hb-win::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: calc(var(--hb-top-h) - 1px);
  left: var(--hb-rail-w);
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--surface);
  pointer-events: none;
}
.hb.app .hb-top-side,
.hb.app .hb-rail,
.hb.app .hb-top-main,
.hb.app .hb-side,
.hb.app .hb-main {
  background: transparent;
}
.hb.app .hb-top-main {
  grid-column: 3 / -1;
  border-left: 0;
  gap: 8px;
  padding: 2px 12px 0 8px;
}

/* O botão do alto da lateral: esconde a coluna dos bots e traz de volta. Fica preso à borda da lateral, ou ao lado
   da faixa de ícones quando a coluna está escondida; a conversa cede o lugar dele. */
.hb.app .app-side-toggle {
  position: absolute;
  z-index: 6;
  top: 6px;
  left: calc(var(--hb-rail-w) + var(--side-col) - 40px);
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-3);
}
/* Voltar e avançar pelas conversas: dois botões de 28 no alto da lateral, a 24 da faixa de ícones (como lá, fora dos
   três botões da janela do Mac). Com a lateral escondida, ficam depois do botão dela. */
.hb.app .app-hist {
  position: absolute;
  z-index: 6;
  top: 6px;
  left: calc(var(--hb-rail-w) + 24px);
  display: flex;
  gap: 2px;
}
.hb.app .app-hist-b {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-3);
}
.hb.app .app-hist-b:hover:not(:disabled) {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .app-hist-b:disabled {
  opacity: 0.4;
}
.hb.app .app-hist-b:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
@media (min-width: 761px) {
  .hb.app .hb-win[data-view='bots'][data-closed] .app-hist {
    left: calc(var(--hb-rail-w) + 42px);
  }
  .hb.app .hb-win[data-view='bots'][data-closed] .hb-top-main.window-drag {
    padding-left: 114px;
  }
  html.is-mac-shell .hb.app .hb-win[data-view='bots'][data-closed] .app-hist {
    left: calc(var(--hb-rail-w) + 56px);
  }
  html.is-mac-shell .hb.app .hb-win[data-view='bots'][data-closed] .hb-top-main.window-drag {
    padding-left: 128px;
  }
}
@media (max-width: 760px) {
  .hb.app .app-hist {
    display: none;
  }
}
.hb.app .app-side-toggle:hover {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .app-side-toggle:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.hb.app .hb-win:not([data-view='bots']) .app-side-toggle {
  display: none;
}
@media (min-width: 761px) {
  .hb.app .hb-win[data-view='bots'][data-closed] {
    --side-col: 0px;
  }
  .hb.app .hb-win[data-view='bots'][data-closed] .hb-side {
    padding: 0;
    overflow: hidden;
    visibility: hidden;
  }
  .hb.app .hb-win[data-view='bots'][data-closed] .app-resizer {
    display: none;
  }
  .hb.app .hb-win[data-view='bots'][data-closed] .app-side-toggle {
    left: calc(var(--hb-rail-w) + 10px);
  }
  .hb.app .hb-win[data-view='bots'][data-closed] .hb-top-main {
    padding-left: 54px;
  }
}
/* Dentro da janela nativa do Mac (a casca põe is-mac-shell no html) os três botões da janela ficam por cima da
   página, de x=12 a x=66 e de y=13 a y=27. Como no app de referência, ali não há logo (a faixa de ícones já nasce
   com a barra de cima vazia para eles) e o botão da lateral recolhida começa 24 px depois da faixa, fora dos botões.
   A janela do Mac tem largura mínima de 960 px, então nada disso vale para a tela estreita. */
html.is-mac-shell .hb.app .hb-top-side .app-logo {
  display: none;
}
@media (min-width: 761px) {
  html.is-mac-shell .hb.app .hb-win[data-view='bots'][data-closed] .app-side-toggle {
    left: calc(var(--hb-rail-w) + 24px);
  }
  html.is-mac-shell .hb.app .hb-win[data-view='bots'][data-closed] .hb-top-main {
    padding-left: 68px;
  }
}
/* O aviso do ⌘Q (quithint.js): por cima de tudo, no meio, sem pegar clique. Medidas conferidas no app de referência. */
.quit-hint-back {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--hb-quit-veil);
  backdrop-filter: blur(8px);
  pointer-events: none;
  animation: quit-hint-in 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.quit-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 12px 32px 12px 12px;
  border: 1px solid var(--hb-quit-edge);
  border-radius: 999px;
  background: var(--hb-raised);
  color: var(--text);
}
.quit-hint-f {
  display: flex;
  flex: none;
  align-items: center;
}
.quit-hint-f > .hc-bot + .hc-bot {
  margin-inline-start: -8px;
}
.quit-hint-t {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.quit-hint-w {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  text-wrap: balance;
}
.quit-hint-i {
  font-size: 15px;
  line-height: 22px;
  white-space: nowrap;
}
@keyframes quit-hint-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quit-hint-back {
    animation: none;
  }
}

@media (max-width: 760px) {
  .hb.app .app-side-toggle {
    display: none;
  }
  /* Em tela estreita o nome do bot (que já abre a ficha) leva o espaço; o papel e o botão da ficha ficam de fora. */
  .hb.app .hb-top-main {
    gap: 4px;
    padding-right: 8px;
  }
  .hb.app .app-who-r,
  .hb.app .app-new-chat,
  .hb.app .hb-top-main .mp-name {
    display: none;
  }
  .hb.app button.app-who {
    flex: 1 1 auto;
  }
  .hb.app .hb-top-main .hb-sp {
    flex: 0 0 0;
  }
}

/* Menus pequenos presos a um botão (o "+" da lista e o "+" da caixa de mensagem). */
.app-menu {
  position: fixed;
  display: flex;
  min-width: 176px;
  flex-direction: column;
  padding: 6px;
  border-radius: 12px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  pointer-events: auto;
  animation: mp-in 120ms ease;
}
.hb.app button.app-menu-i {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
}
.hb.app button.app-menu-i svg {
  flex: none;
  color: var(--text-3);
}
.hb.app button.app-menu-i:hover,
.hb.app button.app-menu-i:focus-visible {
  background: var(--hb-menu-hover);
  outline: 0;
}
/* Anéis de limite do plano na faixa (rings.js): anel de 34 com traço de 2,25 no botão de 36, o símbolo de 12 no meio;
   o quadro abre à direita, com 8 de vão (medidas do app de referência, conferidas em 27/11/2026). */
.hb.app .app-rail-rings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hb.app .app-rail-rings:empty {
  display: none;
}
/* O realce do anel é redondo como o anel (lá: raio 999); sem o .hb-nav no seletor, o canto de 12 da faixa ganhava. */
.hb.app .hb-nav.ring-btn {
  position: relative;
  border-radius: 999px;
}
.hb.app .ring-svg {
  position: absolute;
  inset: 1px;
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
}
.hb.app .ring-logo {
  display: grid;
  place-items: center;
}
.ring-track {
  stroke: currentcolor;
  opacity: 0.15;
}
.ring-arc {
  stroke: var(--hb-ring-ok);
}
.ring-arc[data-tone='warn'] {
  stroke: var(--hb-ring-warn);
}
.ring-arc[data-tone='critical'] {
  stroke: var(--hb-ring-crit);
}
#ring-pop .ring-card {
  position: fixed;
  z-index: 70;
  display: flex;
  width: min(340px, calc(100vw - 16px));
  max-height: min(60vh, 420px);
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 8px;
  border-radius: 12px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  font-size: 13px;
  line-height: 18px;
}
.ring-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline-start: 4px;
}
.ring-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.ring-list {
  display: grid;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  grid-template-columns: auto minmax(0, max-content) minmax(32px, 1fr) max-content max-content;
  column-gap: 8px;
  row-gap: 4px;
  list-style: none;
  scrollbar-width: none;
}
.ring-prov {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  padding: 4px;
  row-gap: 4px;
}
.ring-prov > .ring-prov-n {
  grid-column: 2 / -1;
}
.ring-prov-ic {
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.ring-prov-n {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ring-copy {
  display: grid;
  min-width: 0;
  grid-column: 2 / 4;
}
.ring-meta {
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ring-na {
  grid-column: 4 / -1;
  justify-self: end;
  white-space: nowrap;
}
.ring-wins,
.ring-win {
  display: grid;
  min-width: 0;
  grid-template-columns: subgrid;
}
.ring-wins {
  grid-column: 2 / -1;
  row-gap: 4px;
}
.ring-win {
  --ring-tone: var(--text-2);
  align-items: center;
  grid-column: 1 / -1;
}
.ring-win[data-tone='warn'] {
  --ring-tone: var(--hb-ring-warn);
}
.ring-win[data-tone='critical'] {
  --ring-tone: var(--hb-ring-crit);
}
.ring-win-l,
.ring-win-r {
  color: var(--text-3);
  white-space: nowrap;
}
.ring-win-l {
  overflow: hidden;
  text-overflow: ellipsis;
}
.ring-win-r {
  text-align: end;
}
.ring-bar {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--hb-line);
}
.ring-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ring-tone);
}
.ring-pace {
  position: absolute;
  inset-block: -2px;
  width: 2px;
  margin-inline-start: -1px;
  border-radius: 999px;
  background: var(--text);
}
.ring-win-v {
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.ring-win:not([data-tone='ok']) .ring-win-v {
  color: var(--ring-tone);
}
/* O botão do servidor na faixa de ícones: um filete e a marca do servidor (24 px) no botão de 36 px, abaixo dos
   Ajustes; o menu abre à direita, com a base na base do botão (conferido no app de referência em 26/11/2026). */
.hb.app .app-rail-server {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 47px;
}
.hb.app .srv-line {
  width: 24px;
  height: 1px;
  margin-block: 2px;
  background: var(--hb-line);
}
.hb.app .srv-btn[aria-expanded='true'] {
  background: var(--hb-menu-hover);
  color: var(--text);
}
.srv-mark {
  position: relative;
  display: grid;
  width: var(--srv, 20px);
  height: var(--srv, 20px);
  flex: none;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
}
.srv-mark::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
  content: '';
}
.srv-mark > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.srv-mark.srv-plush {
  overflow: visible;
  border-radius: 0;
}
.srv-mark.srv-plush::after {
  content: none;
}
#srv .app-menu {
  z-index: 70;
}
.app-menu.srv-menu {
  min-width: 240px;
  max-width: 300px;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
}
.app-menu.srv-menu.srv-sub {
  min-width: 280px;
}
.srv-label {
  padding: 6px 10px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
}
.hb.app button.srv-item {
  width: 100%;
  gap: 8px;
  text-align: left;
}
.hb.app button.srv-item.srv-has-detail {
  height: auto;
  min-height: 32px;
  padding-block: 4px;
}
.srv-two {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.srv-detail {
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
}
.srv-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.srv-chev {
  display: inline-flex;
  margin-left: auto;
  color: var(--text-3);
}
.hb.app button.srv-item .srv-chev svg {
  color: var(--text-3);
}
.srv-name + .srv-chev,
.srv-muted + .srv-chev {
  margin-left: 0;
}
.srv-muted {
  display: inline-flex;
  flex: none;
  color: var(--text-3);
}
.hb.app button.srv-item .srv-muted svg {
  color: var(--text-3);
}
.srv-check {
  display: grid;
  width: 16px;
  height: 16px;
  flex: none;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 50%;
}
.srv-check[data-checked] {
  border-color: transparent;
  background: var(--text);
}
.hb.app button.srv-item .srv-check svg {
  color: var(--hb-sheet);
}

/* Servidores de outros computadores (servermenu.js e servers.js). Medidas do app de referência conferidas no código da
   0.79 em 28/11/2026: marca de 20, bolinha de estado de 7, a linha "Adicionar" com o círculo tracejado, e a janela de 420
   (`join-server-dialog.css`: raio 20, respiro de 32, marca de 64, título de 24, campo de 40, botões de 40). */
.srv-mark.srv-generic {
  background: var(--surface-3);
  color: var(--text-2);
}
.srv-mark.srv-generic > svg {
  width: 12px;
  height: 12px;
}
.srv-state {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--text-3);
}
.srv-state[data-state='online'] {
  background: var(--green);
}
.srv-state[data-state='connecting'] {
  background: var(--accent, var(--text));
  animation: srv-state-wait 1200ms ease-in-out infinite;
}
.srv-state[data-state='removed'] {
  background: var(--red);
}
.srv-state-t {
  flex: none;
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
}
@keyframes srv-state-wait {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .srv-state[data-state='connecting'] {
    animation: none;
  }
}
.hb.app button.srv-item.srv-add {
  color: var(--text-2);
}
.hb.app button.srv-item.srv-add:hover,
.hb.app button.srv-item.srv-add:focus-visible {
  color: var(--text);
}
.srv-add-circle {
  display: grid;
  width: 16px;
  height: 16px;
  flex: none;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--text) 30%, transparent);
  border-radius: 50%;
}
.hb.app button.srv-item.srv-add:is(:hover, :focus-visible) .srv-add-circle {
  border-color: transparent;
  background: var(--text);
}
.hb.app button.srv-item.srv-add:is(:hover, :focus-visible) .srv-add-circle svg {
  color: var(--hb-sheet);
}
.hb.app button.srv-item.srv-danger,
.hb.app button.srv-item.srv-danger svg {
  color: var(--red);
}
.hb.app .as-dlg {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  overflow-y: auto;
  border: 1px solid var(--hb-dialog-ring);
  border-radius: 20px;
  background: var(--surface);
}
.as-x {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 32px;
  height: 32px;
  color: var(--text-3);
}
.as-h {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-inline: 12px;
  text-align: center;
}
.as-logo {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-2);
}
.hb.app .as-h h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.01em;
}
.hb.app .as-h p {
  max-width: 296px;
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.as-field {
  display: grid;
  gap: 8px;
}
.as-field label {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.as-in {
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--hb-card, var(--surface-2));
  color: var(--text);
  font: 13px/20px ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.as-in:focus-visible {
  outline: 2px solid var(--accent, var(--text));
  outline-offset: 0;
}
.as-in.is-error {
  border-color: var(--red);
}
.as-hint,
.as-err {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}
.as-hint {
  color: var(--text-3);
}
.as-err {
  color: var(--red);
}
.as-f {
  display: grid;
  gap: 4px;
}
.hb.app .as-f .hb-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}
.as-go .hc-loader {
  margin-right: 8px;
}
@media (max-width: 560px) {
  .hb.app .as-dlg {
    padding: 24px;
  }
}

/* A faixa de ícones: as áreas fixadas ficam no próprio fluxo da faixa, e o menu "Mais" traz todas, cada uma com
   o alfinete (linha com o item e, à direita, o alfinete de 32 px; ele só aparece na área fixada, com o ponteiro em
   cima ou com o foco dentro; comportamento conferido no app de referência em 25/11/2026). */
.hb.app .app-rail-pins {
  display: contents;
}
.app-menu.app-menu-rail {
  min-width: 212px;
}
.app-menu .app-menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  border-radius: 8px;
}
.app-menu .app-menu-row:hover,
.app-menu .app-menu-row:focus-within {
  background: var(--hb-menu-hover);
}
.hb.app .app-menu-row button.app-menu-i:hover,
.hb.app .app-menu-row button.app-menu-i:focus-visible {
  background: transparent;
}
.hb.app .app-menu-row:hover button.app-menu-i svg {
  color: var(--text);
}
.hb.app button.app-menu-pin {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-3);
  opacity: 0;
}
.hb.app .app-menu-row.on button.app-menu-pin {
  color: var(--text);
}
.hb.app .app-menu-row:is(.on, :hover, :focus-within) button.app-menu-pin {
  opacity: 1;
}
@media (hover: none) {
  .hb.app button.app-menu-pin {
    opacity: 1;
  }
}
/* O menu da seta do alto da conversa: "Novo tópico" e os tópicos do bot, cada um com a hora à direita. */
.app-menu.app-menu-topics {
  width: 288px;
  max-height: min(420px, calc(100dvh - 64px));
  overflow-y: auto;
}
.app-menu .app-menu-sep {
  height: 1px;
  flex: none;
  margin: 4px 0;
  background: var(--divider);
}
.hb.app button.app-menu-topic .app-tab-n {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}
.hb.app button.app-menu-topic time {
  flex: none;
  color: var(--text-3);
  font-size: 12px;
}
.hb.app button.app-menu-topic[aria-current='true'] {
  background: var(--hb-menu-hover);
}
.hb.app .hb-side {
  padding: 0 0 12px;
  gap: 0;
  container-type: inline-size;
}
/* faixa de ícones: o cubo no alto, as áreas embaixo dele e os Ajustes no pé (medidas do app de referência) */
.app-logo {
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px 0 0 8px;
}
.hb.app .hb-rail {
  gap: 6px;
  padding: 4px 0 8px;
}
.hb.app .hb-nav {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--text-3);
}
.hb.app .hb-nav:hover {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .hb-nav[aria-current='page'] {
  background: var(--surface-3);
  color: var(--text);
}
/* A busca e o "+": medidas do app de referência. A pílula não tem borda; o "+" é um círculo claro. */
.hb.app .hb-side-h {
  gap: 6px;
  padding: 11px 8px 10px;
}
/* Na versão 0.79 a faixa é 8 / 8 / 10; só o quadro da janela de computador (largura acima de 720) põe 11 em cima. */
@media (max-width: 720px) {
  .hb.app .hb-side-h {
    padding-top: 8px;
  }
}
.hb.app .hb-search:hover {
  background: var(--hb-ctl-active);
}
.hb.app .hb-search:hover input::placeholder {
  color: var(--text-2);
}
.hb.app .hb-search {
  height: 32px;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  min-width: 0;
  font-size: 14px;
  line-height: 18px;
}
.hb.app .hb-search input {
  font-size: 14px;
  line-height: 18px;
}
.hb.app .hb-search input::placeholder {
  color: var(--text-3);
}
.hb.app .hb-search:focus-within {
  box-shadow: inset 0 0 0 1px var(--text-4);
}
.hb.app .hb-side-h [data-do='new'] {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hb-new-bg);
  color: var(--hb-new-fg);
}
.hb.app .hb-side-h [data-do='new']:hover {
  background: var(--hb-new-bg-hover);
  color: var(--hb-new-fg);
}
.hb.app .hb-search input {
  min-width: 0;
  width: 100%;
}
.hb.app .hb-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  column-gap: 8px;
  row-gap: 0;
  height: 62px;
  padding: 8px;
  border-radius: 8px;
}
.hb.app .hb-row:hover {
  background: var(--hb-hover);
}
.hb.app .hb-row[aria-current='true'] {
  background: var(--hb-selected);
}
.hb.app .hb-row-av {
  width: 46px;
  height: 46px;
}
.hb.app .hb-row-n {
  font-size: 15px;
  line-height: 20px;
  overflow: hidden;
}
.hb.app .hb-row-n > span:first-child {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .hb-row .hb-role {
  height: 20px;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--hb-hover);
  color: var(--hb-readable);
  font-size: 13px;
  line-height: 16px;
}
.hb.app .hb-row time {
  color: var(--hb-readable);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}
.hb.app .hb-row-n,
.hb.app .hb-row time {
  align-self: end;
}
.hb.app .hb-row-s {
  align-self: start;
  font-size: 14px;
  line-height: 18px;
}
@container (max-width: 210px) {
  .hb.app .hb-row time {
    display: none;
  }
}
.app-list {
  gap: 4px;
  padding: 4px 4px 0;
}
/* conversa: balões e campo de escrever nas medidas do app de referência */
/* Balões do app de referência: o do bot à esquerda e o da pessoa à direita, até 70% da conversa, com o canto
   de quem fala mais fechado. Texto 15/20, recuo 8 12. */
/* Embaixo, 24 px entre a última fala e o campo de escrever, como no app de referência (timeline.css: espaço 6). */
.hb.app .hb-msgs {
  gap: 12px;
  padding: 12px 12px 24px;
}
.hb.app .hb-me,
.hb.app .hb-answer {
  max-width: 70%;
  padding: 8px 12px;
  font-size: 15px;
  line-height: 20px;
}
.hb.app .hb-answer {
  align-self: flex-start;
  max-width: min(100%, max(720px, 70%), 1200px);
  border-radius: 22px;
}
.hb.app .hb-me {
  border-radius: 22px;
}
/* Falas seguidas de quem fala (a mesma pessoa ou o mesmo bot, até 5 min uma da outra, sem dia no meio) ficam juntas,
   como no app de referência (chat-grouping.ts, messages.css): 4 px entre elas em vez de 12, e o canto que encosta na
   vizinha cai para 6. Fala sozinha tem os quatro cantos redondos. Quem marca é groupRuns() no app.js. */
.hb.app .hb-msgs > [data-grouped] {
  margin-top: -8px;
}
.hb.app .app-mine[data-grouped] .hb-me {
  border-top-right-radius: 6px;
}
.hb.app .app-mine[data-next-grouped] .hb-me {
  border-bottom-right-radius: 6px;
}
.hb.app .hb-answer[data-grouped] {
  border-top-left-radius: 6px;
}
.hb.app .hb-answer[data-next-grouped] {
  border-bottom-left-radius: 6px;
}
.hb.app .hb-day {
  /* Como a linha de hora da referência (time-marker): 20 px acima e 16 px até a fala de baixo. */
  margin: 8px 0 4px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 16px;
  color: var(--text-3);
}
@media (max-width: 760px) {
  .hb.app .hb-me,
  .hb.app .hb-answer {
    max-width: 88%;
  }
}
.app-find {
  display: none;
}
.app-resizer {
  position: absolute;
  top: calc(var(--hb-top-h) + 8px);
  bottom: 13px;
  left: calc(var(--hb-rail-w) + var(--side-col) - 4px);
  width: 9px;
  z-index: 4;
  cursor: col-resize;
  touch-action: none;
  outline: 0;
}
.app-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: transparent;
  transition: background var(--dur) ease;
}
.app-resizer:hover::after,
.hb-win[data-resizing] .app-resizer::after {
  background: var(--border-strong);
}
.app-resizer:focus-visible::after {
  background: var(--text-3);
}
.hb-win[data-resizing] {
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}

/* lista estreita: só a lupa e a coluna de bonecos */
@media (min-width: 761px) {
  .hb.app .hb-win[data-side='mini'] .hb-side {
    padding: 6px 0 12px;
    align-items: center;
  }
  .hb.app .hb-win[data-side='mini'] .hb-side-h {
    height: 32px;
    justify-content: center;
    padding: 0;
  }
  .hb.app .hb-win[data-side='mini'] .hb-search,
  .hb.app .hb-win[data-side='mini'] [data-do='new'],
  .hb.app .hb-win[data-side='mini'] .hb-row-n,
  .hb.app .hb-win[data-side='mini'] .hb-row time,
  .hb.app .hb-win[data-side='mini'] .hb-row-s,
  .hb.app .hb-win[data-side='mini'] .app-none {
    display: none;
  }
  .hb.app .hb-win[data-side='mini'] .app-find {
    display: inline-flex;
  }
  .hb.app .hb-win[data-side='mini'] .app-list {
    width: 100%;
    align-items: center;
    scrollbar-width: none;
  }
  .hb.app .hb-win[data-side='mini'] .hb-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 62px;
    height: 62px;
    padding: 0;
  }
}
.app-none {
  padding: 18px 8px;
  color: var(--hb-muted);
  font-size: 13.5px;
  text-align: center;
}

/* busca: o campo de verdade dentro da peça da proposta */
.hb-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--hb-text);
  font: inherit;
}
.hb-search input::placeholder {
  color: var(--hb-muted);
}
.hb-search:focus-within {
  border-color: var(--border-strong);
}

/* ---------------------------------------------------------------- escolha do modelo
   O botão (pílula no alto da conversa, linha inteira na ficha) e o quadro com os modelos do provedor.
   Medidas e cores conferidas no app de referência (25/11/2026). */
:root:not([data-theme='light']) {
  --hb-sheet: #141414;
  --hb-menu-drop: rgba(0, 0, 0, 0.45);
  --mp-rail: var(--sunken);
  --mp-dot-mute: #979797;
  --mp-dot-warn: #f08a00;
}
:root[data-theme='light'] {
  --hb-sheet: #ffffff;
  --hb-menu-drop: transparent;
  --mp-rail: var(--surface);
  --mp-dot-mute: #6b6b70;
  --mp-dot-warn: #f08a00;
}
.hb.app {
  --hb-menu-edge: color-mix(in srgb, var(--text) 11%, transparent);
  --hb-menu-hover: color-mix(in srgb, var(--text) 6%, transparent);
  --hb-menu-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent), 0 0 0 1px var(--hb-menu-edge), 0 4px 6px -1px var(--hb-menu-drop),
    0 2px 4px -2px var(--hb-menu-drop);
}
.hb.app button.mp-trigger {
  display: flex;
  flex: none;
  width: max-content;
  min-width: 0;
  max-width: 240px;
  height: 28px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hb-menu-edge);
  border-radius: 999px;
  background: transparent;
  padding: 0 9px 0 8px;
  color: var(--text-2);
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    transform 100ms cubic-bezier(0.23, 1, 0.32, 1);
}
.hb.app button.mp-trigger:hover,
.hb.app button.mp-trigger[aria-expanded='true'] {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app button.mp-trigger:active {
  transform: scale(0.97);
}
/* O botão do alto da conversa, nas cores da 0.79: fundo de cobertura, borda de 1 px, brilho fino em cima e, ao passar o mouse, o fundo da superfície. */
.hb.app button.mp-trigger:not(.mp-field):not(.mp-input) {
  border-color: var(--hb-mp-edge);
  background: var(--hb-mp-bg);
  box-shadow: inset 0 1px var(--hb-hover);
  color: var(--text);
}
.hb.app button.mp-trigger:not(.mp-field):not(.mp-input):hover,
.hb.app button.mp-trigger:not(.mp-field):not(.mp-input)[aria-expanded='true'] {
  border-color: var(--hb-mp-edge-strong);
  background: var(--surface-2);
}
.hb.app button.mp-trigger:focus-visible,
.hb.app button.mp-opt:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.mp-value {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
/* o texto que sai no botão (modelo, esforço, velocidade, conta) fica por cima do novo enquanto some */
.mp-ghost {
  position: absolute;
  pointer-events: none;
  white-space: nowrap;
}
/* A marca de um terceiro (marks.js): o arquivo de `logos/` entra como máscara e toma a cor do texto em volta. */
.hb-logo {
  display: inline-block;
  flex: none;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.mp-mark {
  display: flex;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  align-items: center;
  justify-content: center;
  object-fit: contain;
}
.mp-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 470;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-chev {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}
.mp-trigger[aria-expanded='true'] .mp-chev {
  transform: rotate(180deg);
}
/* na ficha: uma linha do grupo como as outras, com o nome do campo à esquerda e o modelo à direita */
.hb.app button.mp-trigger.mp-field {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 40px;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px;
  box-shadow: none;
}
.hb.app button.mp-trigger.mp-field:hover,
.hb.app button.mp-trigger.mp-field[aria-expanded='true'] {
  background: var(--hb-hover);
}
.hb.app button.mp-trigger.mp-field:active {
  transform: none;
}
.hb.app button.mp-trigger.mp-field:focus-visible {
  outline: 0;
  background: var(--hb-hover);
  box-shadow: inset 0 0 0 1px var(--text-3);
}
/* na tela de criar um bot: o campo "Modelo", com a altura e a borda dos outros campos (44 px, borda forte, canto de 8) */
.hb.app button.mp-trigger.mp-input {
  width: 100%;
  max-width: none;
  height: 44px;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--hb-card);
  padding: 0 11px 0 12px;
  color: var(--hb-text);
}
.hb.app button.mp-trigger.mp-input:hover,
.hb.app button.mp-trigger.mp-input[aria-expanded='true'] {
  background: var(--hb-card-2);
}
.hb.app button.mp-trigger.mp-input:active {
  transform: none;
}
.mp-input .mp-value {
  flex: 1 1 auto;
  gap: 8px;
}
.mp-input .mp-name {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.mp-label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-align: left;
}
.mp-field .mp-value {
  max-width: calc(100% - 84px);
  justify-content: flex-end;
}
.mp-field .mp-name {
  color: var(--text-3);
  font-weight: 400;
}
@media (hover: hover) and (pointer: fine) {
  .mp-field:hover .mp-name {
    color: var(--text-2);
  }
}

/* o quadro: por cima de tudo, preso ao botão que o abriu */
#pop,
#menu {
  position: fixed;
  z-index: 25;
  inset: 0;
  pointer-events: none;
}
#pop[hidden],
#menu[hidden] {
  display: none;
}
#access-pop {
  min-height: 0;
}
.mp-pop {
  position: fixed;
  display: flex;
  box-sizing: border-box;
  min-height: min(226px, var(--mp-max, 520px));
  max-height: var(--mp-max, 520px);
  overflow: hidden;
  border-radius: 14px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  pointer-events: auto;
  outline: 0;
  transform-origin: 100% 0;
  animation: mp-in 150ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mp-pop[data-side='top'] {
  transform-origin: 100% 100%;
}
@keyframes mp-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
.mp-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 6px;
}
/* a dica de um provedor da coluna: nome e situação à esquerda do botão (medidas do quadro de dica da referência) */
.mp-tip {
  position: fixed;
  z-index: 60;
  display: flex;
  max-width: min(240px, calc(100vw - 16px));
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--hb-sheet);
  box-shadow: var(--hb-menu-shadow);
  padding: 6px 8px;
  color: var(--text);
  pointer-events: none;
  overflow-wrap: anywhere;
}
.mp-tip[hidden] {
  display: none;
}
.mp-tip strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}
.mp-tip small {
  color: var(--text-3);
  font-size: 12px;
  line-height: 16px;
}
/* a coluna dos provedores, à esquerda do painel */
.mp-rail {
  display: flex;
  width: 52px;
  flex: 0 0 52px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--mp-rail);
  padding: 9px 7px;
  scrollbar-width: none;
}
.hb.app button.mp-prov {
  position: relative;
  display: flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text);
  transition: background-color 120ms ease;
}
.mp-rail-mark {
  width: 19px;
  height: 19px;
  object-fit: contain;
  opacity: 0.48;
  transition: opacity 120ms ease;
}
.mp-rail-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hb.app button.mp-prov.mp-off .mp-rail-mark {
  opacity: 0.28;
}
.hb.app button.mp-prov.mp-off:hover .mp-rail-mark,
.hb.app button.mp-prov.mp-off[aria-selected='true'] .mp-rail-mark {
  opacity: 0.6;
}
.hb.app button.mp-prov:hover .mp-rail-mark,
.hb.app button.mp-prov:focus-visible .mp-rail-mark {
  opacity: 0.8;
}
.hb.app button.mp-prov[aria-selected='true'] {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent);
}
.hb.app button.mp-prov[aria-selected='true'] .mp-rail-mark {
  opacity: 1;
}
.hb.app button.mp-prov:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: -1px;
}
.mp-add {
  color: var(--text-3);
}
.hb.app button.mp-add:hover {
  background: var(--hb-hover);
  color: var(--text);
}
.mp-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mp-dot-mute);
  box-shadow: 0 0 0 2px var(--mp-rail);
}
.mp-dot.warn {
  background: var(--mp-dot-warn);
}
/* o número da conta na entrada da coluna (provedor com mais de uma conta): 16 de altura, sobre o canto de baixo */
.mp-acct {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  min-width: 16px;
  height: 16px;
  box-sizing: border-box;
  place-items: center;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--mp-rail);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.mp-group {
  padding: 8px 10px 4px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.mp-none {
  margin: 0;
  padding: 8px 10px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.mp-head {
  display: grid;
  flex-shrink: 0;
  padding: 6px 4px 8px 10px;
}
/* Cada provedor é um grupo dentro do quadro; do segundo em diante, um fio fino separa um do outro. */
.mp-list + .mp-head,
.mp-empty + .mp-head,
.mp-wait + .mp-head {
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
/* limite do plano atingido: o selo fica ao lado do nome e a situação desce para a linha de baixo */
.mp-head-limited {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
}
.mp-head-limited > span {
  grid-column: 1 / -1;
}
.mp-head small.mp-limit {
  display: block;
  max-width: 100%;
  overflow: hidden;
  justify-self: start;
  border-radius: 999px;
  background: var(--red-soft);
  padding: 1px 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-head strong {
  font-size: 15px;
  font-weight: 620;
  line-height: 20px;
}
.mp-head span {
  margin-top: 1px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
}
.hb.app input.mp-search {
  width: 100%;
  height: 32px;
  flex-shrink: 0;
  margin-bottom: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--hb-menu-hover);
  padding: 0 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: 0;
}
.hb.app input.mp-search::placeholder {
  color: var(--text-3);
}
.hb.app input.mp-search:focus-visible {
  border-color: var(--hb-menu-edge);
}
.mp-search::-webkit-search-cancel-button {
  display: none;
}
/* a linha Esforço no fim do quadro do modelo (medidas da linha da referência: faixa de 1px, nome à esquerda, escolha de 128 à direita) */
.mp-effort {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 6px -6px 0;
  border-top: 1px solid var(--hb-menu-edge);
  padding: 6px 6px 0 14px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 17px;
}
.mp-effort > span:first-child {
  display: flex;
  min-height: 32px;
  align-items: center;
}
.mp-effort .ps {
  width: 128px;
}
.hb.app .mp-effort .mp-effort-b {
  width: 100%;
  height: 32px;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--hb-menu-hover);
  padding: 0 8px 0 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.hb.app .mp-effort .mp-effort-b:hover,
.hb.app .mp-effort .mp-effort-b[aria-expanded='true'] {
  background: color-mix(in srgb, var(--text) 10%, transparent);
}
/* o esforço ao lado do nome do modelo, no botão do alto e na linha da ficha */
.mp-effort-t {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}
.mp-effort-t::before {
  margin-inline-end: 6px;
  content: '·';
}
/* o nome da conta cede antes de tudo: até 160 e encolhe primeiro, como na referência */
.mp-acct-t {
  min-width: 0;
  max-width: 160px;
  flex-shrink: 100000;
  overflow: hidden;
}
/* o cabeçalho apertou: o botão do alto mostra só marca e modelo, ou só a marca (a medida é feita em picker.js) */
.hb.app #top[data-model-fit] button.mp-trigger .mp-effort-t {
  display: none;
}
.hb.app #top[data-model-fit='icon'] button.mp-trigger .mp-name {
  display: none;
}
/* a velocidade rápida no botão: o raio de 12 px e o nome, depois do esforço; o botão da conversa passa a 296 de largura máxima */
.mp-speed-t .mp-zap {
  width: 12px;
  height: 12px;
  margin-inline-end: 2px;
  flex: none;
}
.hb.app button.mp-trigger.mp-quick:not(.mp-field):not(.mp-input) {
  max-width: 296px;
}
/* a segunda linha do fim do quadro (Velocidade) fica junto da primeira: sem faixa, só 4px de respiro */
.mp-effort + .mp-effort {
  margin-top: 0;
  border-top: 0;
  padding-top: 4px;
}
/* "Modelos anteriores": uma linha como as de modelo, sem o círculo, em cor mais fraca, com a contagem e a seta que gira */
.hb.app button.mp-opt.mp-older {
  color: var(--text-2);
}
.mp-opt.mp-older::before {
  content: none;
}
.mp-older-chev {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}
.mp-older[aria-expanded='true'] .mp-older-chev {
  transform: rotate(180deg);
}
@media (max-width: 720px) {
  .hb.app button.mp-trigger:not(.mp-field):not(.mp-input) .mp-effort-t {
    display: none;
  }
}
.mp-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mp-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.hb.app button.mp-opt {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 10px;
  padding: 6px 10px 6px 34px;
  text-align: left;
  transition: background-color 120ms ease;
}
.mp-opt::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 999px;
  translate: 0 -50%;
  transition:
    background-color 150ms ease-out,
    border-color 150ms ease-out;
}
.mp-opt[aria-selected='true']::before {
  border-color: transparent;
  background: var(--text);
}
.hb.app button.mp-opt:hover:not(:disabled),
.hb.app button.mp-opt:focus-visible {
  background: var(--hb-menu-hover);
}
.hb.app button.mp-opt:disabled {
  color: var(--text-4);
  cursor: not-allowed;
}
.mp-opt-n {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}
.mp-opt-n > span {
  overflow-wrap: anywhere;
  text-wrap: pretty;
  font-size: 14px;
  line-height: 18px;
}
.mp-opt-n small {
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  padding: 1px 6px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 15px;
}
.mp-check {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--hb-sheet);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  translate: 0 -50%;
}
.mp-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: var(--hb-menu-hover);
  padding: 8px 10px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
/* o botão da caixa de estado é pequeno (24): fundo de item e, no hover, 10% do texto, como no app de referência */
.hb.app .mp-empty .hb-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--hb-menu-hover) !important;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .mp-empty .hb-btn:hover {
  background: color-mix(in srgb, var(--text) 10%, transparent) !important;
}
.mp-wait {
  display: grid;
  min-height: 96px;
  place-items: center;
}
.mp-err {
  margin: 6px 4px 4px;
}
@media (max-width: 720px) {
  .hb.app button.mp-trigger:not(.mp-field) {
    max-width: 148px;
  }
}
@media (pointer: coarse) {
  .hb.app input.mp-search {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mp-pop {
    animation: none;
  }
  .hb.app button.mp-trigger,
  .mp-chev {
    transition: none;
  }
}
.app-back {
  display: none;
}

/* conversa */
/* A fala da pessoa pode estar solta ou dentro da sua fileira (com arquivos, ou com as ações embaixo). */
.hb-msgs .hb-me {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hb-answer {
  overflow-wrap: anywhere;
}
.hb-answer > :first-child {
  margin-top: 0;
}
.hb-answer h3,
.hb-answer h4 {
  margin: 0;
  font-weight: 600;
}
.hb-answer h4 {
  font-size: 14.5px;
}
.hb-answer ul,
.hb-answer ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* Imagem dentro do texto da resposta (a da pasta do bot): abre no visualizador. Medidas da referência: canto de 8 (token md); solta no texto vai de 360 a 640 de altura (55% da janela, entre os dois); dentro de lista 360 e de tabela 240. */
.hb-answer .hb-md-img {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 8px;
  cursor: zoom-in;
  line-height: 0;
}
.hb-answer .hb-md-img img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: clamp(360px, 55vh, 640px);
  border-radius: 8px;
  object-fit: contain;
}
.hb-answer li .hb-md-img {
  max-width: min(100%, 360px);
}
.hb-answer li .hb-md-img img {
  max-height: 360px;
}
.hb-answer :is(td, th) .hb-md-img,
.hb-answer :is(td, th) .hb-md-img img {
  max-width: min(100%, 240px);
  max-height: 240px;
}
.hb-answer .hb-md-img:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}
.hb-answer .hb-md-gone {
  display: block;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb-answer a {
  color: var(--blue);
  text-decoration: underline;
}
.hb-answer code {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--hb-card-2);
}
.hb-answer pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hb-canvas);
  overflow-x: auto;
}
.hb-answer pre code {
  padding: 0;
  background: none;
}
.app-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hb-muted);
  font-size: 13px;
}
.app-state.err {
  color: var(--red);
}
/* O rodapé da resposta: copiar e, quando ela não terminou bem, tentar de novo. */
.app-acts {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: -6px;
}
.hb.app .app-acts button {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-acts button:hover,
.hb.app .app-acts button:focus-visible {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .app-acts button:disabled {
  opacity: 0.5;
}
.app-acts svg {
  flex: none;
}
/* Do lado da pessoa a fileira acompanha o balão dela, encostada à direita. */
.hb.app .app-mine .app-acts {
  margin-inline: 0 -6px;
  justify-content: flex-end;
}
.hb.app .app-act-t {
  padding-inline-start: 6px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
/* Ações compactas (o padrão): a fileira só aparece com o mouse em cima da resposta, e sem a hora. Nada muda
   de tamanho entre os dois estados, por isso ela some pela opacidade e não pelo display. */
.hb.app[data-acts='compact'] .app-act-t {
  display: none;
}
.hb.app[data-acts='compact'] .app-acts {
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.hb.app[data-acts='compact'] .app-turn:hover .app-acts,
.hb.app[data-acts='compact'] .hb-answer:hover .app-acts,
.hb.app[data-acts='compact'] .app-acts:focus-within {
  opacity: 1;
}
/* Em tela de toque não existe passar o mouse por cima: a fileira fica sempre à mostra. */
@media (hover: none) {
  .hb.app[data-acts='compact'] .app-acts {
    opacity: 1;
  }
}
.app-notice {
  flex: none;
  margin: 12px 16px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--hb-card);
  color: var(--hb-muted);
  font-size: 13.5px;
}
.app-notice b {
  color: var(--hb-text);
  font-weight: 500;
}
.app-hello {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--hb-muted);
  text-align: center;
  padding: 24px;
}
.app-hello strong {
  color: var(--hb-text);
  font-size: 16px;
  font-weight: 600;
}

/* Conversa vazia de um bot, medida no app de referência (AgentChatEmptyState 0.79): boneco de 64, título de 32
   em duas linhas (a primeira apagada), 8 entre as peças, descrição de 16 até 480 de largura; abaixo de 520 de
   largura, título de 24 e descrição de 15. A palavra à mão é 1,2 vez o título, inclinada 2 graus, e se escreve
   da esquerda para a direita em 560 ms depois de 500 ms. Diferença nossa: a palavra tem a cor do bot. */
.app-hello.hb-hello {
  --hb-hello-size: 32px;
  gap: 8px;
  container-type: inline-size;
}
.hb-hello > .hc-bot {
  margin-bottom: 8px;
}
.hb-hello-t {
  margin: 0;
  color: var(--hb-text);
  font-size: var(--hb-hello-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.hb-hello-t > span {
  display: block;
}
.hb-hello-ready,
.hb-hello-about {
  color: var(--hb-muted);
}
.hb-hello-about {
  max-width: 480px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  text-wrap: balance;
}
.hb-hello-hand {
  display: inline-block;
  color: var(--hb-hello-c);
  font-family: "Noteworthy", "Marker Felt", "Segoe Print", "Comic Neue", cursive;
  font-size: calc(var(--hb-hello-size) * 1.2);
  font-weight: 700;
  line-height: 1;
  transform: rotate(-2deg);
}
:root[data-theme='light'] .hb-hello-hand {
  color: var(--hb-hello-c-side);
}
@container (max-width: 520px) {
  .hb-hello-t {
    --hb-hello-size: 24px;
  }
  .hb-hello-about {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hb-hello-hand {
    clip-path: inset(-0.4em 100% -0.4em -0.2em);
    animation: hb-hello-write 560ms linear 500ms forwards;
  }
}
@keyframes hb-hello-write {
  to {
    clip-path: inset(-0.4em -0.2em -0.4em -0.2em);
  }
}

/* Conversa carregando: boneco grande, três bolinhas felpudas (pelo e luz da bola dos bonecos, nas cores
   violeta, lima e rosa) e o nome embaixo. Tudo entra depois de 150 ms, para uma conversa rápida não piscar. */
.app-hello.hb-loadconv {
  gap: 0;
}
.hb-loadconv-face {
  display: grid;
  place-items: center;
}
.hb-loadconv-dots {
  display: flex;
  gap: 10px;
  margin-top: 38px;
}
.hb-loadconv-dots i {
  --c: var(--bot-violet);
  display: block;
  width: 26px;
  height: 26px;
  background: url("bots/bot-bolinha-luz.png") center / 100% 100% no-repeat,
    url("bots/bot-bolinha-pelo.png") center / 100% 100% no-repeat, var(--c);
  background-blend-mode: normal, multiply, normal;
  -webkit-mask: url("bots/bot-bolinha-pelo.png") center / 100% 100% no-repeat;
  mask: url("bots/bot-bolinha-pelo.png") center / 100% 100% no-repeat;
  transform-origin: 50% 100%;
}
.hb-loadconv-dots i:nth-child(2) {
  --c: var(--bot-lime);
}
.hb-loadconv-dots i:nth-child(3) {
  --c: var(--bot-pink);
}
.hb-loadconv-t {
  margin-top: 26px;
  min-height: 20px;
  font-size: 14px;
}
@media (prefers-reduced-motion: no-preference) {
  .hb-loadconv > * {
    animation: hb-loadconv-in 240ms var(--ease) 150ms both;
  }
  .hb-loadconv-dots i {
    animation: hb-loadconv-pop 320ms var(--ease) 420ms both, hb-loadconv-hop 1.1s ease-in-out 800ms infinite;
  }
  .hb-loadconv-dots i:nth-child(2) {
    animation-delay: 500ms, 940ms;
  }
  .hb-loadconv-dots i:nth-child(3) {
    animation-delay: 580ms, 1080ms;
  }
}
@keyframes hb-loadconv-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes hb-loadconv-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}
@keyframes hb-loadconv-hop {
  0%,
  56%,
  100% {
    transform: translateY(0) scale(1);
  }
  20% {
    transform: translateY(-85%) scale(0.94, 1.07);
  }
  38% {
    transform: translateY(0) scale(1.12, 0.86);
  }
  46% {
    transform: translateY(0) scale(0.98, 1.02);
  }
}

/* caixa de mensagem */
/* Caixa de mensagem do app de referência: pílula de 48, "+" redondo à esquerda e envio redondo e claro à direita. */
.hb.app .hb-composer {
  align-items: flex-end;
  gap: 8px;
  margin: 0 6px 6px;
  padding: 8px 10px;
  min-height: 48px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--hb-raised);
  transition: border-color 120ms ease;
}
.hb.app .hb-composer:focus-within {
  border-color: var(--text-4);
}
.hb.app .hb-composer .hb-round {
  width: 28px;
  height: 28px;
}
.hb.app .hb-composer .hb-round.hb-go {
  background: var(--hb-send-bg);
  color: var(--hb-send-fg);
}
/* Como no app de referência, o envio vazio continua claro; só não faz nada. */
.hb.app .hb-composer .hb-round.hb-go:disabled {
  opacity: 1;
}
.hb-composer textarea {
  flex: 1;
  min-width: 0;
  max-height: 180px;
  min-height: 28px;
  padding: 4px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: none;
  color: var(--hb-text);
  font: inherit;
  line-height: 20px;
}
.hb-composer textarea::placeholder {
  color: var(--hb-muted);
}
.hb.app .hb-round.hb-stop {
  background: var(--hb-text);
  color: var(--hb-canvas);
}
.hb.app .hb-round:disabled {
  opacity: 0.4;
  cursor: default;
}

/* O medidor de contexto ao lado do envio. Medidas do app de referência (26/11/2026): botão redondo de 28 como o
   "+", anel de 16 com traço de 2 (6 de 48), quadro de 280 com raio 8, janela de 8 de altura na barra. */
.hb.app .app-ctx:focus {
  outline: none;
}
.hb.app .app-ctx {
  display: inline-flex;
  flex: none;
  align-self: flex-end;
  margin-right: -2px;
}
.hb.app .app-ctx[hidden] {
  display: none;
}
.hb.app button.app-ctx-btn {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--hb-hover);
  color: var(--text-3);
  cursor: pointer;
}
.hb.app button.app-ctx-btn:hover,
.hb.app button.app-ctx-btn[aria-expanded='true'] {
  background: var(--border);
  color: var(--text);
}
.app-ctx-ring {
  display: block;
  width: 16px;
  height: 16px;
  color: var(--text-4);
}
.app-ctx-ring svg {
  display: block;
  overflow: visible;
}
.app-ctx-ring[data-level='normal'] {
  color: var(--text-2);
}
.app-ctx-ring[data-level='warning'],
.app-ctx-ring[data-level='busy'] {
  color: var(--hb-warn);
}
.app-ctx-ring[data-level='danger'] {
  color: var(--hb-danger);
}
.app-ctx-track,
.app-ctx-fill {
  fill: none;
  stroke-width: 6;
}
.app-ctx-track {
  stroke: var(--border);
}
.app-ctx-fill {
  stroke: currentcolor;
  stroke-linecap: butt;
  transition:
    stroke-dasharray 200ms ease,
    stroke-dashoffset 200ms ease;
}
.app-ctx-fill[data-cap='round'] {
  stroke-linecap: round;
}
.app-ctx-ring[data-level='busy'] svg {
  animation: app-ctx-spin 900ms linear infinite;
}
@keyframes app-ctx-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-ctx-ring[data-level='busy'] svg {
    animation: none;
  }
  .app-ctx-fill {
    transition: none;
  }
}
.app-ctx-pop {
  position: fixed;
  z-index: 60;
  display: flex;
  box-sizing: border-box;
  width: 280px;
  max-width: calc(100vw - 16px);
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  border-radius: 8px;
  background: var(--hb-pick-bg);
  color: var(--text);
  box-shadow:
    0 0 0 1px var(--divider),
    0 4px 6px -1px var(--hb-ctx-ambient),
    0 2px 4px -2px var(--hb-ctx-ambient);
  font-size: 14px;
  line-height: 20px;
  outline: 0;
  pointer-events: auto;
  animation: mp-in 120ms ease;
}
.app-ctx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.app-ctx-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.app-ctx-pct {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.app-ctx-pct[data-level='warning'] {
  color: var(--hb-warn-text);
}
.app-ctx-pct[data-level='danger'] {
  color: var(--hb-danger-text);
}
.app-ctx-bar {
  display: flex;
  height: 8px;
  gap: 2px;
  direction: ltr;
}
.app-ctx-seg {
  min-width: 4px;
  flex-basis: 0;
  border-radius: 4px;
  background: var(--text-2);
}
.app-ctx-seg[data-level='warning'] {
  background: var(--hb-warn);
}
.app-ctx-seg[data-level='danger'] {
  background: var(--hb-danger);
}
.app-ctx-seg.app-ctx-free {
  min-width: 0;
  background: var(--divider);
}
.app-ctx-tokens,
.app-ctx-note {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.app-ctx-tokens {
  margin-top: -8px;
  font-variant-numeric: tabular-nums;
}
.app-ctx-seg[data-category] {
  background: var(--ctx-c);
}
.app-ctx-pop [data-category='system'] {
  --ctx-c: var(--blue);
}
.app-ctx-pop [data-category='memory'] {
  --ctx-c: var(--green);
}
.app-ctx-pop [data-category='tools'] {
  --ctx-c: var(--violet);
}
.app-ctx-pop [data-category='skills'] {
  --ctx-c: var(--amber);
}
.app-ctx-pop [data-category='tool_results'] {
  --ctx-c: var(--orange);
}
.app-ctx-pop [data-category='messages'] {
  --ctx-c: var(--text-2);
}
.app-ctx-pop [data-category='other'] {
  --ctx-c: var(--text-3);
}
.app-ctx-pop .app-ctx-cat[data-category='free'] {
  --ctx-c: var(--divider);
}
.app-ctx-load {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.app-ctx-fail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.hb.app button.app-ctx-retry {
  height: 28px;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  background: var(--hb-menu-hover);
}
.app-ctx-cats {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-ctx-cat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  font-size: 13px;
  line-height: 18px;
}
.app-ctx-dot {
  width: 8px;
  height: 8px;
  align-self: center;
  border-radius: 999px;
  background: var(--ctx-c);
}
.app-ctx-cat-n {
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-ctx-cat-t {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.app-ctx-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 -16px -16px;
  border-top: 1px solid var(--divider);
  padding: 6px;
}
.hb.app button.app-ctx-act {
  display: flex;
  width: 100%;
  height: 32px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}
.hb.app button.app-ctx-act svg {
  flex: none;
  color: var(--text-2);
}
.hb.app button.app-ctx-act:hover:not(:disabled),
.hb.app button.app-ctx-act:focus-visible {
  background: var(--hb-menu-hover);
  outline: 0;
}
.hb.app button.app-ctx-act:disabled {
  opacity: 0.4;
  cursor: default;
}

/* criar um bot */
.app-new {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  gap: 16px;
}
.app-new-form {
  width: min(420px, calc(100% - 48px));
  justify-self: center;
  align-self: center;
  display: grid;
  gap: 12px;
  padding: 16px 0;
}
.app-new-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-new-count {
  display: block;
  margin: 6px 0 0 8px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.app-new-count[hidden] {
  display: none;
}
.app-new-colors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.app-new-faces {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 0 -12px;
}
@media (max-width: 480px) {
  .app-new-faces {
    flex-wrap: wrap;
    margin: 0;
  }
  /* um chapéu passa do corpo do boneco: no celular ele precisa de folga para não encostar no alto */
  .app-new #new-face {
    margin-top: 14px;
  }
}
.app-new .hb-field {
  color: var(--text-2);
  line-height: 18px;
}
.app-new .hb-input {
  border-radius: 8px;
  border-color: var(--border);
  color: var(--hb-text);
}
.app-new .nb-c i {
  border-color: var(--border);
}
.app-new .nb-c[aria-pressed='true'] i {
  outline-color: var(--accent-ink);
}
.app-new .nb-f {
  border: 1px solid transparent;
  border-radius: 8px;
}
.hb.app button.nb-f:hover {
  background: var(--hb-hover);
}
.app-new .nb-f[aria-pressed='true'] {
  border-color: var(--accent-ink);
  background: transparent;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.app-new-go {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.app-new-go .hb-btn {
  min-width: 132px;
  border-radius: 8px;
}
.hb-field input,
.hb-field textarea {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--hb-card);
  padding: 0 12px;
  color: var(--hb-text);
  font: inherit;
  font-weight: 400;
  font-size: 14px;
  outline: 0;
}
.hb-field textarea {
  min-height: 64px;
  max-height: 240px;
  padding: 8px 12px;
  line-height: 20px;
  resize: none;
  field-sizing: content;
  overflow-y: auto;
}
.hb-field input:focus-visible,
.hb-field textarea:focus-visible {
  border-color: var(--text-3);
}
.hb-field input::placeholder,
.hb-field textarea::placeholder {
  color: var(--hb-muted);
}
.app-err {
  color: var(--red);
  font-size: 13px;
}
.app-sugs {
  min-width: 0;
  padding: 0 24px 16px;
}
.app-sugs-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 1px 1px 4px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.app-sugs-row::-webkit-scrollbar {
  display: none;
}
.app-sugs-row[data-dragging] {
  cursor: grabbing;
}
.hb.app button.nb-s {
  flex: 0 0 256px;
  height: 112px;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--hb-line);
  background: transparent;
  text-align: left;
  cursor: inherit;
}
.hb.app button.nb-s:hover {
  border-color: var(--border);
  background: var(--hb-hover);
}
.nb-s-t {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.nb-s-t strong {
  color: var(--hb-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}
.hb.app .hb-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* alto da conversa: o nome do bot abre a ficha */
.hb.app button.app-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px 0 6px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  min-width: 0;
  flex: 0 1 auto;
}
.hb.app button.app-who .app-who-n {
  color: var(--text);
  white-space: nowrap;
}
.hb.app button.app-who .app-who-r {
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* O papel vem depois de um ponto no meio, como no app de referência. */
.hb.app button.app-who .app-who-r::before {
  content: '·' / '';
  margin-right: 6px;
}
/* A aba do bot aberto: uma forma de aba que se junta ao quadro da conversa (medida no app de referência em
   25/11/2026: do alto do botão até a base do cabeçalho, 32 px, cantos de cima de 8 px e a curva de 9 px nos pés). */
@media (min-width: 761px) {
  .hb.app .hb-top-main button.app-who,
  .hb.app .hb-top-main .app-htab,
  .hb.app .app-pbar .app-htab {
    position: relative;
    z-index: 0;
  }
  .hb.app .hb-top-main button.app-who:not(.off)::before,
  .hb.app .hb-top-main .app-htab[aria-selected='true']::before,
  .hb.app .app-pbar .app-htab[aria-selected='true']::before {
    position: absolute;
    z-index: -1;
    inset: 0 0 -4px;
    border: 1px solid var(--divider);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--hb-canvas);
    content: '';
  }
  .hb.app .hb-top-main button.app-who:not(.off)::after,
  .hb.app .hb-top-main .app-htab[aria-selected='true']::after,
  .hb.app .app-pbar .app-htab[aria-selected='true']::after {
    position: absolute;
    z-index: -1;
    right: -9px;
    bottom: -4px;
    left: -9px;
    height: 9px;
    background:
      radial-gradient(circle at 0 0, transparent 8.5px, var(--hb-canvas) 9px) left bottom / 9px 9px no-repeat,
      radial-gradient(circle at 100% 0, transparent 8.5px, var(--hb-canvas) 9px) right bottom / 9px 9px no-repeat;
    content: '';
    pointer-events: none;
  }
}
.hb.app .app-new-chat,
.hb.app .app-all-topics {
  flex: none;
  margin-left: -1px;
  border-radius: 6px;
}
/* As abas dos tópicos, no alto, logo depois da aba do bot (medidas no app de referência em 25/11/2026: 28 px de
   altura, 140 de largura, 4 px entre elas, letra 13/18; o ícone do tópico vira o "x" de fechar quando o ponteiro
   passa). O "+" abre um tópico novo e a seta mostra todos. */
.hb.app .app-htabs {
  display: contents;
}
.hb.app .app-tab.app-htab {
  flex: 0 1 140px;
  min-width: 56px;
  max-width: 140px;
  height: 28px;
  gap: 6px;
  padding: 0 8px 0 6px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
}
.hb.app .app-tab.app-htab:hover,
.hb.app .app-tab.app-htab[aria-selected='true'] {
  background: transparent;
}
.hb.app .app-tab.app-htab:not([aria-selected='true']):hover {
  background: var(--hb-card);
}
.hb.app .app-htab-i {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-3);
}
.hb.app .app-htab-i .app-tab-x {
  position: absolute;
  inset: -1px;
  width: auto;
  height: auto;
  border-radius: 50%;
  background: var(--hb-hover);
  color: var(--text);
  opacity: 0;
}
.hb.app .app-htab:hover .app-htab-i .app-tab-x,
.hb.app .app-htab-i .app-tab-x:focus-visible {
  opacity: 1;
}
.hb.app .app-htab:hover .app-htab-i > svg {
  visibility: hidden;
}
/* Com abas de tópico abertas, a aba do bot mostra só o nome, como no app de referência. */
.hb.app button.app-who.off .app-who-r,
.hb.app button.app-who:has(+ .app-htabs .app-htab) .app-who-r {
  display: none;
}
@media (min-width: 761px) {
  /* Em tela larga as abas ficam no alto; a fileira de dentro da conversa é só do celular. */
  .hb.app .hb-main > .app-tabs {
    display: none;
  }
  /* 4 px entre a aba do bot, as abas dos tópicos, o "+" e a seta. */
  .hb.app .hb-top-main button.app-who,
  .hb.app .hb-top-main .app-htabs > * {
    margin-right: -4px;
  }
}
/* A fileira das abas de tópico rola de lado (a roda também) e esmaece nas pontas, como no app de referência;
   cada aba tem 140 px e encolhe até 96. O respiro de 9 px dos lados e 4 de baixo guarda os pés da aba marcada. */
@media (min-width: 761px) {
  .hb.app .hb-top-main .app-htabs > .app-htabs-s {
    position: relative;
    display: flex;
    min-width: 0;
    flex: 0 1 auto;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 9px 4px;
    margin: 0 -13px -4px -9px;
  }
  .hb.app .app-htabs-s::-webkit-scrollbar {
    display: none;
  }
  .hb.app .app-htabs-s > .app-tab.app-htab {
    min-width: 96px;
  }
  /* Com a fileira rolando, quem cede lugar é ela, não o nome do bot. */
  .hb.app .hb-top-main button.app-who:has(+ .app-htabs .app-htab) {
    max-width: 180px;
    flex-shrink: 0;
  }
  .hb.app .app-htabs-s[data-fade-start] {
    mask-image: linear-gradient(to right, transparent, #000 48px);
  }
  .hb.app .app-htabs-s[data-fade-end] {
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }
  .hb.app .app-htabs-s[data-fade-start][data-fade-end] {
    mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  }
  .hb.app .app-htabs-s > .app-tab:focus-visible {
    outline: 1px solid var(--text-3);
    outline-offset: 1px;
  }
}
@media (max-width: 760px) {
  .hb.app .app-htabs {
    display: none;
  }
}
.hb.app .app-panel-b {
  margin-left: 0;
}
/* Com o painel aberto, quem o fecha é a barra dele: o botão do cabeçalho some. */
.hb.app .hb-win[data-card] .app-panel-b {
  display: none;
}
.hb.app button.app-who:hover,
.hb.app .hb-win[data-card] button.app-who {
  background: var(--hb-card);
}
.app-who > .app-who-n {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* O que a revisão mudou nas memórias, dentro da conversa. Medidas conferidas no app de referência (25/11/2026). */
.app-steps {
  display: grid;
  justify-items: start;
  max-width: 100%;
}
.app-steps[hidden] {
  display: none;
}
.hb.app button.app-steps-h {
  height: 24px;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  border-radius: 6px;
  color: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
}
.hb.app button.app-steps-h:hover,
.hb.app button.app-steps-h:focus-visible {
  background: var(--hb-ctl-hover);
}
.app-steps-h > span {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-steps-h > svg {
  flex: none;
  color: var(--text-3);
  transition: rotate 120ms ease-out;
}
.app-steps-h[aria-expanded='true'] > svg {
  rotate: 90deg;
}
.app-steps-p {
  max-height: 220px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: thin;
}
.app-steps-l {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
}
.app-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.app-step > svg {
  flex: none;
  margin-top: 3px;
  color: var(--text-3);
}
.app-step-m {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 8px;
  color: var(--text);
}
.app-step-a,
.app-step-m s {
  color: var(--text-3);
}

/* passos de uma resposta: o que o bot leu, mudou e rodou (medidas do app de referência, 25/11/2026) */
.hb-answer .app-steps-l {
  display: grid;
  padding: 6px 0;
}
.app-work {
  margin: -2px 0 -2px -6px;
}
.app-steps-h > .app-steps-f {
  flex: none;
  font-weight: 400;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.app-step-w {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  justify-items: start;
}
.app-step-m {
  align-items: baseline;
}
.hb-answer .app-step-m code {
  padding: 0;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  white-space: pre-wrap;
}
.app-step-n {
  color: var(--text-3);
}
.app-step-n.err {
  color: var(--red);
}
.app-step-m > .hc-loader {
  align-self: center;
}
.hb.app button.app-step-x {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  margin-left: -4px;
  border-radius: 4px;
  color: var(--text-3);
  font-size: inherit;
  line-height: inherit;
}
.hb.app button.app-step-x.err {
  color: var(--red);
}
.hb.app button.app-step-x:hover,
.hb.app button.app-step-x:focus-visible {
  background: var(--hb-ctl-hover);
}
.app-step-x > svg {
  flex: none;
  transition: rotate 120ms ease-out;
}
.app-step-x[aria-expanded='true'] > svg {
  rotate: 90deg;
}
.hb-answer pre.app-step-o {
  max-height: 160px;
  justify-self: stretch;
  margin: 4px 0 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--hb-raised);
  padding: 6px 8px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}
/* o que o segundo leitor pediu para mudar: texto corrido debaixo do passo */
.hb-answer p.app-step-r {
  justify-self: stretch;
  margin: 2px 0 4px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* cartão de aprovação: um passo que espera a pessoa */
.app-turn {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.app-turn > .hb-answer {
  max-width: 100%;
}
.app-ask {
  container: app-ask / inline-size;
  width: min(540px, 100%);
  margin: 12px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 12px;
  border-radius: 22px;
  background: var(--hb-card);
  animation: app-ask-in 200ms ease-out both;
}
@keyframes app-ask-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.99);
  }
}
.app-ask-h {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
}
.app-ask-h h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.app-ask-h p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.app-ask-s {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  color: var(--amber);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.app-ask-cmd,
.app-ask-row {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-raised);
}
.app-ask-cmd code {
  display: block;
  overflow-x: auto;
  padding: 12px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.app-ask-cwd {
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.app-ask-row {
  display: grid;
  gap: 4px;
  padding: 12px;
}
.app-ask-row span {
  color: var(--text-3);
  font-size: 13px;
}
.app-ask-row strong {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
/* O que o bot pede à pessoa é uma frase, não um caminho: vai na letra do texto. */
.app-ask-say strong {
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
}
.app-ask-sure {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.app-ask-f {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.hb.app .hb-btn.app-ask-b {
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.hb.app .hb-btn.app-ask-b:disabled {
  opacity: 0.5;
}
@container app-ask (width < 360px) {
  .hb.app .hb-btn.app-ask-b {
    flex: 1 1 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-ask {
    animation: none;
  }
}

/* permissões do bot (página da ficha) */
.perm-top {
  display: grid;
  gap: 8px;
}
.card-note {
  margin: 0;
  padding: 0 4px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-wrap: pretty;
}
.card-sec > .card-note {
  margin-top: 2px;
}
.card-note.card-note-warn {
  color: var(--hb-warn-text);
}
.card-page .hb-lrow.perm-grant {
  padding: 0 4px 0 12px;
}
.perm-grant-t {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 0;
}
.perm-grant-t span {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.perm-grant-t code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.hb.app button.mp-trigger.mp-field:disabled {
  opacity: 0.5;
}

/* ficha do bot (prancha 17): painel à direita */
.hb.app .hb-win[data-card] {
  --side-col: min(var(--side-w), 30vw);
  grid-template-columns: var(--hb-rail-w) var(--side-col) minmax(0, 1fr) 360px;
}
.hb.app .hb-panel[hidden] {
  display: none;
}
.hb.app .hb-panel {
  grid-row: 2;
  padding-top: 0;
  background: transparent;
}
.hb.app .hb-panel-b {
  background: transparent;
  border-radius: 0;
}
.card-b {
  border-radius: 0;
  gap: 10px;
  padding: 0 15px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.card-b > .hb-panel-h {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 39px;
  margin: 0 -15px 14px;
  padding: 0 10px;
  grid-template-columns: 32px 1fr 32px;
  border-bottom: 1px solid var(--hb-line);
  background: var(--surface);
  font-size: 14px;
  line-height: 18px;
}
.card-home {
  display: grid;
}
.card-field {
  display: block;
  margin: 0 0 17px;
}
.card-field > span {
  display: block;
  margin: 0 0 6px 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 18px;
}
.card-field .card-in {
  height: 38px;
  border-radius: 8px;
  border-color: var(--border);
  background: var(--hb-field);
  padding: 10px 11px;
  font-size: 15px;
  line-height: 19px;
}
.card-field .card-in:focus-visible {
  border-color: var(--text-3);
}
.card-field textarea.card-in {
  display: block;
  height: 72px;
  min-height: 72px;
  max-height: 240px;
  field-sizing: fixed;
  overflow-y: auto;
  resize: none;
}
.card-sec {
  display: grid;
  gap: 6px;
  margin: 8px 0 17px;
}
.card-sec > .hb-sub {
  padding: 0;
  margin-left: 4px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.card-sec > .hb-group {
  border-radius: 8px;
}
.card-sec .hb-lrow {
  min-height: 40px;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.card-sec .hb-lrow .hb-note {
  font-weight: 400;
}
.card-b > * {
  flex: none;
}

/* Página principal da ficha do bot: sem título, grupos e linhas com as medidas do app de referência
   (conferido em 26/11/2026): miolo com 24 px em cima, 16 px entre campos, grupos e cartões, 6 px do título ao cartão. */
.card-b.card-b-main {
  padding-top: 24px;
}
.card-main {
  gap: 16px;
}
.card-main .card-id {
  margin: 8px 0 16px;
}
.card-main .card-field {
  margin: 0;
}
.card-main .card-field textarea.card-in {
  resize: vertical;
}
.card-main .card-sec {
  gap: 16px;
  margin: 0;
}
.card-main .card-sec > .hb-sub {
  margin-bottom: -10px;
}
.card-main .card-sec > .card-note {
  margin-top: 0;
}
.card-main .hb-group {
  border-color: var(--hb-card-line);
  border-radius: 8px;
  background: var(--surface-2);
}
.card-main .hb-group > * + * {
  border-top-color: var(--hb-card-line);
}
.card-main .hb-lrow {
  min-height: 40px;
  color: var(--text);
}
.card-main .hb-lrow .card-l {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.card-main .hb-lrow .hb-note {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-weight: 500;
  line-height: 18px;
}
.card-main .hb-lrow .card-v {
  flex: 0 1 auto;
  max-width: 55%;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-main .hb-lrow .card-v:empty {
  display: none;
}
.card-main .hb-lrow .card-v .tint-dot {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.card-ic {
  display: inline-flex;
  flex: none;
  color: var(--text-2);
}
.hb-lrow {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-size: 13.5px;
  width: 100%;
  text-align: left;
}
.hb.app button.hb-lrow {
  padding: 0 12px;
}
.hb.app button.hb-lrow:hover {
  background: var(--hb-card-2);
}
.card-l {
  flex: 1;
  min-width: 0;
}
.card-chev {
  display: inline-flex;
  color: var(--hb-muted);
}
.card-id {
  display: grid;
  place-items: center;
  margin: 8px 0 16px;
}
.card-face {
  position: relative;
  display: inline-flex;
}
.hb.app .card-pencil {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: var(--hb-card);
  color: var(--hb-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-in {
  width: 100%;
  min-height: 30px;
  border-radius: 9px;
  border: 1px solid var(--hb-line);
  background: var(--hb-card);
  padding: 0 12px;
  color: var(--hb-text);
  font: inherit;
  font-size: 14px;
  outline: 0;
}
.card-in:focus-visible {
  border-color: var(--border-strong);
}
.card-in::placeholder {
  color: var(--hb-muted);
}

/* Boneco: um quadro embaixo dele (formas, cores, sorteio). Medidas conferidas no app de referência (25/11/2026). */
:root:not([data-theme='light']) {
  --hb-pop: rgba(26, 26, 26, 0.92);
}
:root[data-theme='light'] {
  --hb-pop: rgba(245, 245, 246, 0.92);
}
.card-id {
  position: relative;
}
.hb.app button.card-face {
  border-radius: 999px;
}
.look-pop {
  position: absolute;
  z-index: 1;
  top: calc(100% + 11px);
  left: 50%;
  width: min(284px, 100%);
  translate: -50% 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-pop);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-pop);
  /* O quadro cabe na janela: numa janela baixa ele rola por dentro, em vez de esconder a última fileira de acessórios. */
  max-height: max(220px, calc(100dvh - 192px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.look-in {
  animation: look-in 160ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: 50% 0;
}
@keyframes look-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.97);
  }
}
@media (prefers-reduced-motion: reduce) {
  .look-in {
    animation: none;
  }
}
.look-h {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 7px 10px 3px 13px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.look-shapes,
.look-colors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px 10px 12px;
}
.look-colors {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 2px;
}
/* as formas: cinco por fileira (a fila de acessórios continua com quatro) */
.look-shapes.look-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* o sorteio é um ícone no fim do cabeçalho das formas, de 40 por 40 */
.look-h.look-hs {
  justify-content: space-between;
  gap: 10px;
}
.hb.app button.look-ic {
  width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  color: var(--text-2);
}
.hb.app button.look-ic:hover {
  background: var(--hb-hover);
  color: var(--text);
}
/* acessório do boneco: uma camada por cima do corpo e dos olhos, feita para a forma dele; a imagem cobre
   160 unidades da forma (de -30 a 130), e a caixa do boneco põe cada unidade em 0,92% a partir de 4% */
.hc-bot > .hb-wear {
  position: absolute;
  z-index: 1;
  left: -23.6%;
  top: -23.6%;
  width: 147.2%;
  height: 147.2%;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
}
/* o nome do acessório escolhido fica na linha de baixo do título, sempre: os nomes são frases e não cabem ao lado */
.look-h.look-hn {
  flex-wrap: wrap;
  padding-bottom: 5px;
}
.look-n {
  flex: 0 0 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.hb.app button.look-c {
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.hb.app button.look-color {
  height: 32px;
}
.hb.app button.look-c:hover {
  background: var(--hb-hover);
}
.hb.app button.look-c[aria-pressed='true'] {
  background: var(--border);
  box-shadow: inset 0 0 0 1px var(--text-3);
}
.look-color i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.look-line {
  height: 1px;
  background: var(--border);
}

/* Páginas da ficha (Instruções e Memórias). Medidas conferidas no app de referência (25/11/2026). */
.card-h-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-page {
  width: min(100%, 680px);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  align-content: start;
}
.card-page .card-sec {
  margin: 0;
}
.card-page .hb-group {
  border-radius: 8px;
  background: var(--surface-2);
}
.card-page .hb-lrow {
  min-height: 40px;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .card-page button.hb-lrow:hover {
  background: var(--hb-hover);
}
.hb.app .card-page button.hb-lrow:disabled {
  opacity: 0.5;
}
.card-page label.hb-lrow {
  cursor: pointer;
}
.card-one {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-acts[hidden] {
  display: none;
}
/* Botões das páginas da ficha: 32 de altura, como na tela real (medido ao vivo em 25/11/2026). */
.hb.app .hb-btn.hb-sm.card-b32 {
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
}
.hb.app .hb-btn.hb-sm.card-b24 {
  height: 24px;
  padding: 0 8px;
  background: transparent !important;
  color: var(--text-3) !important;
  font-size: 13px;
  font-weight: 500;
}
.hb.app .hb-btn.hb-sm.card-b24:hover {
  background: var(--hb-ctl-hover) !important;
  color: var(--text) !important;
}
.hb.app .hb-btn.hb-sm.card-outline {
  border: 1px solid var(--border);
  background: var(--surface-2) !important;
  color: var(--text-2) !important;
}
.hb.app .hb-btn.hb-sm.card-outline:hover:not(:disabled) {
  background: var(--hb-ctl-hover) !important;
  color: var(--text) !important;
}
.hb.app .hb-btn.hb-sm.card-b32.hb-quiet,
.hb.app .card-tile .hb-btn.hb-sm.hb-quiet {
  background: var(--hb-ctl-hover) !important;
}
.hb.app .hb-btn.card-ghost {
  background: none !important;
  color: var(--text-2) !important;
  font-weight: 500;
}
.hb.app .hb-btn.card-ghost:hover {
  background: var(--hb-hover) !important;
  color: var(--text) !important;
}
.hb.app .hb-btn.card-danger {
  color: var(--text-3) !important;
}
.hb.app .hb-btn.card-danger:hover {
  color: var(--red) !important;
}
.hb.app .card-page .hb-btn:disabled {
  opacity: 0.5;
}
.card-state {
  min-height: 160px;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.card-warn {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}
.card-error {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
}
.card-error.mem-error {
  background: var(--hb-danger-soft);
  color: var(--hb-danger);
}
/* O aviso de teto de memórias: caixa de superfície com texto secundário e as mesmas medidas do erro. */
.mem-limit {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.card-warn {
  background: none;
  color: var(--red);
}
.card-edit {
  display: grid;
  gap: 8px;
}
.card-edit-in {
  display: block;
  width: 100%;
  min-height: 60px;
  max-height: 320px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  outline: 0;
  resize: none;
  field-sizing: content;
  overflow-y: auto;
}
.card-edit-in:focus-visible {
  border-color: var(--text-3);
}
.card-edit-in::placeholder {
  color: var(--text-3);
}
.card-edit-a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.card-count[hidden] {
  display: none;
}
.card-count {
  margin-right: auto;
  font-variant-numeric: tabular-nums;
}

.mem-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-3);
}
.mem-search:focus-within {
  border-color: var(--text-3);
}
.mem-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: 0;
}
.mem-search input::placeholder {
  color: var(--text-3);
}
.mem-groups {
  display: grid;
  gap: 24px;
}
.mem-groups:empty {
  display: none;
}
.mem-read {
  display: grid;
  gap: 12px;
}
.mem-text {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mem-meta {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.mem-none {
  min-height: 456px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.mem-none h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
/* Botão do vazio: tamanho padrão (36) do app de referência, não o pequeno das linhas. */
.hb.app .mem-none .mem-none-go {
  height: 36px;
  gap: 6px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}
.mem-none p {
  max-width: 300px;
  margin: 0 0 12px;
  color: var(--text-3);
  font-size: 15px;
  line-height: 22px;
}

.instr-bar {
  position: sticky;
  z-index: 1;
  top: 39px;
  margin-top: -24px;
  padding: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
}
.instr-ic {
  display: inline-flex;
  color: var(--text-3);
}
.instr-t {
  flex: 1;
  min-width: 0;
  display: grid;
}
.instr-t strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.instr-t strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.instr .card-edit-in {
  max-height: none;
  min-height: 160px;
  font-size: 14px;
}
.instr-none {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 22px;
}
.instr-md {
  color: var(--text-2);
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.instr-md > :first-child {
  margin-top: 0;
}
.instr-md > :last-child {
  margin-bottom: 0;
}
.instr-md > * {
  margin: 0;
}
.instr-md > * + * {
  margin-top: 12px;
}
.instr-md h3,
.instr-md h4 {
  margin: 24px 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.instr-md [data-l='1'] {
  font-size: 16px;
  line-height: 24px;
}
.instr-md ul,
.instr-md ol {
  padding-left: 16px;
}
.instr-md li + li {
  margin-top: 4px;
}
.instr-md code {
  font-size: 13px;
}
.instr-md pre {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow-x: auto;
}

/* A pergunta antes de apagar tudo: por cima da janela inteira. */
#dialog {
  position: fixed;
  z-index: 30;
  inset: 0;
}
#dialog[hidden] {
  display: none;
}
.app-dlg {
  width: min(380px, calc(100vw - 32px));
}
/* O começo da mensagem que vai sumir, para a pessoa ver qual é antes de confirmar. */
.hb.app .app-dlg-q {
  margin: 0;
  padding: 8px 10px;
  border-inline-start: 2px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
  background: var(--hb-hover);
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

/* janela média: a ficha ocupa o lugar da conversa */
@media (max-width: 1100px) {
  .hb.app .hb-win[data-card] {
    --side-col: min(var(--side-w), 42vw);
    grid-template-columns: var(--hb-rail-w) var(--side-col) minmax(0, 1fr);
  }
  .hb.app .hb-win[data-card] .hb-panel {
    grid-column: 3;
  }
  .hb.app .hb-win[data-card] .hb-main {
    display: none;
  }
}

/* telas estreitas (navegador do celular): uma coluna por vez */
@media (max-width: 760px) {
  .hb.app .hb-win {
    grid-template-columns: var(--hb-rail-w) minmax(0, 1fr);
    padding: 0;
    background: var(--surface);
  }
  .hb.app .hb-win::before {
    display: none;
  }
  .hb.app .hb-top-side,
  .hb.app .hb-rail {
    background: var(--hb-frame);
  }
  .hb.app .hb-top-main {
    grid-column: auto;
  }
  .hb.app .hb-panel {
    grid-row: 1 / 3;
  }
  .hb.app .hb-top-side {
    grid-column: 1 / 3;
  }
  .hb.app[data-pane='list'] .hb-top-main,
  .hb.app[data-pane='list'] .hb-main {
    display: none;
  }
  .hb.app[data-pane='main'] .hb-top-side,
  .hb.app[data-pane='main'] .hb-rail,
  .hb.app[data-pane='main'] .hb-side {
    display: none;
  }
  .hb.app[data-pane='main'] .hb-top-main,
  .hb.app[data-pane='main'] .hb-main {
    grid-column: 1 / 3;
    border-left: 0;
  }
  .app-back {
    display: inline-flex;
  }
  .app-resizer {
    display: none;
  }
  .hb-composer textarea,
  .hb-editor,
  .hb-search input,
  .hb-field input,
  .hb-field textarea {
    font-size: 16px;
  }
  .hb.app .hb-composer {
    margin-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .hb.app[data-pane='card'] .hb-top-side,
  .hb.app[data-pane='card'] .hb-rail,
  .hb.app[data-pane='card'] .hb-side {
    display: none;
  }
  .hb.app .hb-win[data-card] {
    grid-template-columns: var(--hb-rail-w) minmax(0, 1fr);
  }
  .hb.app .hb-win[data-card] .hb-panel {
    grid-column: 1 / 3;
    border-left: 0;
  }
  .card-in,
  .card-edit-in,
  .instr .card-edit-in,
  .mem-search input {
    font-size: 16px;
  }
  .card-b {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

/* ---------------------------------------------------------------- Ajustes
   Uma página da janela: as seções na coluna da esquerda, o conteúdo à direita e o caminho na barra de cima.
   Estrutura e medidas conferidas no app de referência (25/11/2026). */
.app-side-set {
  display: none;
}
.hb.app .hb-win[data-view='settings'] {
  --side-col: min(max(var(--side-w), 220px), 42vw);
}
.hb.app .hb-win[data-view='settings'] .hb-side {
  padding: 16px 8px 0;
  align-items: stretch;
}
.hb-win[data-view='settings'] .hb-side-h,
.hb-win[data-view='settings'] .app-list,
.hb-win[data-view='settings'] .app-resizer {
  display: none;
}
.hb-win[data-view='settings'] .app-side-set {
  display: flex;
  flex: 1;
  min-height: 0;
}
.set-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.set-title {
  margin: 0 0 12px;
  padding: 0 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}
.hb.app .set-search {
  height: 32px;
  margin-bottom: 12px;
  padding: 0 12px;
  gap: 8px;
  border-radius: 999px;
  font-size: 14px;
}
.set-sections {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.set-heading {
  margin: 16px 0 4px;
  padding: 0 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.set-heading:first-child {
  margin-top: 0;
}
.hb.app button.set-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex: none;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}
.set-item > svg {
  color: var(--text-3);
  stroke-width: 1.5;
}
.set-item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app button.set-item:hover {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app button.set-item[aria-current='page'] {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.set-item:hover > svg,
.set-item[aria-current='page'] > svg {
  color: var(--text);
}
.set-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.hb.app button.set-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text);
  text-align: left;
}
.hb.app button.set-result:hover {
  background: var(--hb-ctl-hover);
}
.set-result-s {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.set-result-s svg {
  stroke-width: 1.5;
}
.set-result-t {
  overflow: hidden;
  padding-left: 22px;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-empty {
  margin: 16px 0 4px;
  padding: 0 8px;
  color: var(--text-3);
  font-size: 13px;
}

/* a barra de cima dos Ajustes: o caminho e o botão de fechar */
.hb.app .hb-win[data-view='settings'] .hb-top-main {
  padding: 0 0 0 7px;
  gap: 4px;
}
.set-path {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.set-path > span {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app button.set-crumb {
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  color: var(--text-3);
}
.hb.app button.set-crumb:hover {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app .set-close {
  border-radius: 999px;
}

/* o conteúdo: uma coluna de até 960 px, com cartões */
.set-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
.set-content {
  display: grid;
  align-content: start;
  gap: 24px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 24px 24px;
}
.set-h {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}
.set-h-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.set-h-mark > img,
.set-h-mark > svg {
  flex: none;
}
.set-sec {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.set-lists {
  display: grid;
  gap: 24px;
  margin-top: -16px;
}
.set-lists:empty {
  display: none;
}
.set-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 4px;
}
.set-sec-h h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.set-card {
  display: grid;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}
.set-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
}
.set-card > :not(:first-child)::before {
  content: '';
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 1px;
  background: var(--divider);
  pointer-events: none;
}
.set-media {
  display: inline-flex;
  flex: none;
  color: var(--text-2);
}
.set-media svg {
  stroke-width: 1.5;
}
.set-copy {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.set-copy > strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}
.set-copy > span {
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.set-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.set-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 22px;
}
.set-chev {
  color: var(--text-3);
}
.set-none .set-copy > span {
  color: var(--text-3);
}
.set-ok {
  color: var(--green);
}
/* linha que abre outra página: a linha toda é o botão */
.set-open {
  border-radius: 8px;
}
.hb.app button.set-hit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.set-open:hover {
  background: var(--hb-hover);
}
.hb.app button.set-hit:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: -2px;
}
/* botões e campos dos Ajustes: texto de 15 px, botão pequeno de 32 px */
.hb.app .set-page .hb-btn.hb-sm {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}
.hb.app .set-page .hb-btn.hb-quiet {
  background: var(--hb-raised) !important;
  box-shadow: inset 0 0 0 1px var(--border);
}
.hb.app .set-page .hb-btn.hb-red {
  box-shadow: none;
}
/* Opção mais comprida que a medida do seletor ("A cada 10 respostas") não pode ficar cortada. */
.set-select {
  position: relative;
  display: inline-flex;
  width: auto;
  min-width: 168px;
  max-width: 100%;
}
.set-select select {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-raised);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  appearance: none;
  -webkit-appearance: none;
  outline: 0;
  cursor: pointer;
}
.set-page:is([data-page='general'], [data-page='appearance'], [data-page='notifications'], [data-page='memory']) .set-select select {
  height: 32px;
  font-size: 13px;
}
.set-page .set-search-match {
  border-radius: 8px;
  background-color: var(--surface-3);
}
.set-select select:focus-visible {
  border-color: var(--text-3);
}
.set-select > svg {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.set-find {
  position: relative;
  display: inline-flex;
  width: 188px;
  max-width: 50%;
}
.set-find > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.set-find input,
.set-field input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: 0;
}
.set-find input {
  padding-left: 32px;
}
.set-find input::placeholder,
.set-field input::placeholder {
  color: var(--text-3);
}
.set-find input:focus-visible,
.set-field input:focus-visible {
  border-color: var(--text-3);
}
.set-keyform {
  gap: 12px;
  padding: 16px;
}
.set-field {
  display: grid;
  gap: 6px;
}
.set-field > span {
  color: var(--text-2);
  font-size: 14px;
  line-height: 18px;
}
.set-field input {
  height: 38px;
  padding: 0 11px;
}
/* As teclas de um atalho, lado a lado no fim da linha. */
.set-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.set-keys .kbd {
  height: 22px;
  min-width: 22px;
  font-size: 12px;
}
/* Trocar o atalho: o botão com as teclas, como no app de referência. Ele fica do tamanho das teclas e não
   muda de tamanho ao escutar a próxima combinação. */
.hb.app .set-keys-b {
  min-height: 30px;
  min-width: 112px;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hb.app .set-keys-b:hover {
  border-color: var(--border-strong);
  background: var(--hb-hover);
}
.hb.app .set-keys-b[aria-pressed='true'] {
  border-color: var(--accent-ink);
  background: var(--hb-hover);
}
.hb.app .set-keys-b[data-no='true'] {
  border-color: var(--danger);
}
.hb.app .set-keys-ask {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}
/* O "voltar aos de fábrica" fica no fim da página, depois da frase, como no app de referência. */
.hb.app .set-foot {
  display: flex;
  justify-content: flex-start;
}
.hb.app .set-keys-no {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  text-align: end;
}
.set-note {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.set-keyform .app-err,
.set-keyform .set-ok,
.set-row .app-err {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
/* Num formulário do cartão não há linhas entre os campos; o que é caminho de arquivo quebra em vez de vazar. */
.set-keyform > :not(:first-child)::before {
  content: none;
}
.set-copy > span {
  overflow-wrap: anywhere;
}
.set-form-a {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.app-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 760px) {
  .hb.app .hb-win[data-view='settings'] {
    --side-col: 1fr;
  }
  .set-content {
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  }
  .set-row {
    flex-wrap: wrap;
  }
  .set-copy {
    flex-basis: 60%;
  }
  .set-actions {
    margin-left: 0;
  }
  .set-select {
    width: 100%;
  }
  .set-select select,
  .set-find input,
  .set-field input {
    font-size: 16px;
  }
  .app-notice {
    flex-wrap: wrap;
  }
}

/* ---------------------------------------------------------------- Primeiro uso (prancha 3)
   Tela cheia, por cima de tudo. Medidas conferidas no app de referência (25/11/2026). */
.fu {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
}
.fu-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 680px);
  padding: 52px 24px;
}
.fu[data-step='choose'] .fu-shell {
  width: min(100%, 960px);
}
.fu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}
.fu-team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.fu-face {
  display: grid;
  flex: none;
  animation: fu-rise 240ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.fu-face:nth-child(1),
.fu-face:nth-child(7) {
  transform: translateY(24px);
}
.fu-face:nth-child(2),
.fu-face:nth-child(6) {
  transform: translateY(8px);
}
.fu-face:nth-child(4) {
  transform: translateY(-12px);
}
.fu-face:nth-child(2) {
  animation-delay: 120ms;
}
.fu-face:nth-child(3) {
  animation-delay: 240ms;
}
.fu-face:nth-child(4) {
  animation-delay: 360ms;
}
.fu-face:nth-child(5) {
  animation-delay: 480ms;
}
.fu-face:nth-child(6) {
  animation-delay: 600ms;
}
.fu-face:nth-child(7) {
  animation-delay: 720ms;
}
@keyframes fu-rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}
.fu-hero {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
  text-wrap: balance;
}
.fu-h {
  max-width: 620px;
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.12;
}
.fu-lead {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.45;
}
.fu-lead-sm {
  margin-top: 10px;
}
.fu-dots {
  margin-bottom: 20px;
}
.fu-rows {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(100%, 440px);
  margin-top: 32px;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: left;
}
.fu-rows-wide {
  width: min(100%, 480px);
  margin-top: 26px;
  border-radius: 8px;
}
.fu-rows > * + * {
  border-top: 1px solid var(--hb-grouped-line);
}
/* A lista de programas e o passo da Tess: linhas de 44 como o seletor de provedores da referência (medido em 26/11/2026:
   linha mínima de 44, 8 em cima e embaixo, 12 de lado, 10 entre as partes, nome em 14 e apoio em 13 com 15 de linha). */
.fu-rows-wide .fu-row,
.hb.app .fu-rows-wide button.fu-row {
  min-height: 44px;
  gap: 10px;
  padding: 8px 8px 8px 12px;
}
/* Botão da linha como o xs do seletor da referência: mínimo 58x28, canto 8, respiro de 9 (auth.css:845-851). */
.hb.app .fu-rows-wide .fu-row > .hb-btn.hb-sm {
  min-width: 58px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
}
.fu-rows-wide .fu-row-t {
  gap: 0;
}
.fu-rows-wide .fu-row-t strong {
  font-weight: 530;
  line-height: 18px;
}
.fu-rows-wide .fu-row-t > span {
  line-height: 15px;
}
.fu-row,
.hb.app button.fu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  text-align: left;
}
.hb.app button.fu-row:hover {
  background: var(--hb-ctl-hover);
}
.fu-mark {
  flex: none;
}
.fu-row-t {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.fu-row-t strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.fu-chev {
  display: inline-flex;
  flex: none;
  color: var(--text-4);
}
.fu-ok {
  display: inline-flex;
  flex: none;
  color: var(--green);
}
.fu-glyph {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 22px;
  color: var(--text-3);
}
.fu-row[tabindex='-1']:focus {
  outline: none;
}
.fu-load {
  flex: none;
}
.fu-bad {
  color: var(--red);
}
/* Guia de erro de um programa de IA que falhou na conferência: os passos abrem na própria linha. */
.fu-guide-t {
  align-self: flex-start;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  text-decoration: underline;
  cursor: pointer;
}
.fu-guide-t:hover {
  color: var(--text);
}
.fu-guide {
  padding: 0 12px 12px 42px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
}
.fu-guide ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}
/* Resultado da conferência de um programa: cor de aviso, como o aviso de verificação da linha na referência. */
.fu-warn {
  color: var(--hb-warn-text);
}
.fu-err {
  width: min(100%, 480px);
  margin: 12px 0 0;
  text-align: left;
}
.fu-empty {
  display: grid;
  gap: 6px;
  width: min(100%, 480px);
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
}
.fu-empty strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.fu-empty p {
  margin: 0;
}
.fu-key {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.fu-key .hb-btn.hb-sm {
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.hb.app a.fu-link {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hb.app a.fu-link:hover {
  color: var(--text);
}
.fu-acts {
  display: grid;
  gap: 8px;
  width: min(100%, 288px);
  margin-top: 22px;
}
.hb.app .fu-acts .hb-btn {
  width: 100%;
  height: auto;
  min-height: 44px;
  border-radius: 999px;
}
.hb.app .fu-acts .fu-out {
  background: none !important;
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.hb.app .fu-acts .fu-out:hover {
  background: var(--hb-hover) !important;
}
.hb.app .fu-acts .fu-ghost {
  background: none !important;
  color: var(--text-3) !important;
  font-weight: 500;
}
.hb.app .fu-acts .fu-ghost:hover {
  color: var(--text) !important;
}
.fu-reason {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
/* J3: escolha do provedor padrão no primeiro uso (ProviderPicker da referência, auth.css:744-761, 835-839, 1093-1111):
   rótulo de 13/560 a 7 acima da lista, rádio de 14 na primeira coluna de 16, dica de 13/16 a 7 abaixo. */
.fu-pick {
  width: min(100%, 480px);
  margin-top: 26px;
  text-align: left;
}
.fu-pick .fu-rows {
  width: 100%;
  margin-top: 0;
}
.fu-label {
  margin-bottom: 7px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 560;
  line-height: 18px;
}
.fu-hint {
  margin: 7px 0 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
}
/* "Outros programas" do primeiro uso (referência: MoreProvidersDialog e o rodapé do ProviderPicker, auth.css:1100-1225):
   rodapé a 7 da lista com a dica à esquerda e o botão fantasma de 25 à direita; a caixa usa as medidas do quadro de
   pastas (400 de largura, canto 14, respiro 8), linhas de 18 + 12 com respiro 8 e 12 e canto 8. */
.fu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.fu-foot .fu-hint {
  margin: 0;
}
.fu-empty .fu-foot {
  justify-content: flex-end;
  margin-top: 2px;
}
.hb.app button.fu-more {
  flex: none;
  min-height: 25px;
  margin-right: -8px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.hb.app button.fu-more:hover:not(:disabled) {
  background: var(--hb-hover);
  color: var(--text);
}
.hb-scrim.fu-more-scrim {
  box-sizing: border-box;
  padding-inline: 16px;
}
.hb.app .fu-more-dlg input.fu-more-q {
  flex-shrink: 0;
  width: 100%;
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  margin: 4px 0 8px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
}
.fu-more-q::-webkit-search-cancel-button {
  appearance: none;
}
.fu-more-list {
  min-height: 0;
  overflow-y: auto;
}
.hb.app button.fu-more-row {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hb.app button.fu-more-row:hover {
  background: var(--hb-hover);
}
.hb.app button.fu-more-row:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: -2px;
}
.fu-more-row .fu-glyph {
  width: 18px;
}
.fu-more-id {
  display: grid;
  min-width: 0;
}
.fu-more-id strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.fu-more-id small {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.fu-more-none {
  margin: 0;
  padding: 8px 12px;
  color: var(--text-3);
  font-size: 13px;
}
.fu-radio {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0 2px 0 0;
  accent-color: var(--text);
}
.fu-radio:disabled {
  opacity: 0.45;
}
/* fim J3 */
/* Escolha do idioma: roda de cinco linhas de 44 px com a do meio marcada, título de 14 px, botões de subir e descer ao
   lado e "Concluir" em pílula de 288 × 44 px (languagewheel do app de referência, 26/11/2026). */
.ls {
  width: 100%;
  display: grid;
  min-height: 100%;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 32px 24px;
}
.ls-shell {
  display: flex;
  width: min(100%, 360px);
  padding-inline: 16px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ls-logo {
  display: block;
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}
.ls-title {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
}
.ls-frame {
  position: relative;
  width: 100%;
}
.ls-wheel {
  --row: 44px;
  position: relative;
  width: 100%;
  height: calc(var(--row) * 5);
  overflow: clip;
  cursor: grab;
  touch-action: none;
  user-select: none;
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.ls-wheel[data-dragging] {
  cursor: grabbing;
}
.ls-wheel::before {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--row) * 2);
  height: var(--row);
  border-radius: 12px;
  background: var(--hb-menu-hover);
  content: '';
}
.ls-wheel:has(:focus-visible)::before {
  box-shadow: inset 0 0 0 1px var(--text-3), 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent);
}
.ls-track {
  position: relative;
  height: 100%;
}
.ls-item {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--row) * 2);
  height: var(--row);
  translate: 0 calc(var(--offset, 0) * var(--row));
  opacity: max(0, 1 - var(--distance, 0) * 0.35);
  transition: translate 200ms cubic-bezier(0.23, 1, 0.32, 1), opacity 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.ls-label {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  cursor: inherit;
}
.ls-name {
  display: flex;
  align-items: center;
  gap: 0.4em;
  scale: max(0.6, 1 - var(--distance, 0) * 0.2);
  transition: scale 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.ls-wheel[data-dragging] :is(.ls-item, .ls-name) {
  transition: none;
}
.ls-flag {
  scale: 0.9;
  letter-spacing: 0;
}
.ls-arrows {
  position: absolute;
  top: 50%;
  inset-inline-start: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  translate: 0 -50%;
}
@media (max-width: 480px) {
  .ls {
    padding-inline: 20px;
  }
  /* Em 360 px a coluna dos botões não cabe ao lado da roda: eles ficam numa fila embaixo dela. */
  .ls-arrows {
    position: static;
    flex-direction: row;
    justify-content: center;
    translate: none;
    margin-top: 4px;
  }
}
.hb.app .ls-go {
  width: min(100%, 288px);
  height: auto;
  min-height: 44px;
  margin-top: 8px;
  gap: 8px;
  border-radius: 999px;
}
.ls-go svg {
  transition: translate 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.ls-go:is(:hover, :focus-visible) svg {
  translate: 4px 0;
}
@media (prefers-reduced-motion: reduce) {
  .ls-item,
  .ls-name,
  .ls-go svg {
    transition: none;
  }
}

@media (max-width: 760px) {
  .fu-team {
    gap: 6px;
  }
  .fu-face:nth-child(1),
  .fu-face:nth-child(7) {
    display: none;
  }
  .fu-key input {
    font-size: 16px;
  }
}
@media (max-width: 400px) {
  /* cinco bonecos não cabem em 360 px no tamanho cheio: o time encolhe inteiro */
  .fu-team {
    zoom: 0.85;
  }
}
@media (max-width: 620px) {
  .fu-shell {
    padding: 48px 18px;
  }
  .fu-h {
    font-size: 24px;
  }
  .fu-lead {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fu-face {
    animation: none;
  }
}

/* modelos reserva (página da ficha): medidas do app de referência, conferidas no código (26/11/2026) */
.card-note.bk-intro {
  margin-top: -4px;
  padding: 0 4px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
}
.bk-ask {
  justify-content: space-between;
}
/* A chave da linha "Perguntar antes de trocar" tem a medida da referência (24x14; a cor continua a da marca). */
.bk-ask .toggle {
  width: 24px;
  height: 14px;
  border-radius: 7px;
}
.bk-ask .toggle::after {
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
}
.bk-ask .toggle:checked::after {
  transform: translateX(10px);
}
.bk-list {
  display: grid;
}
.bk-list + .bk-add {
  border-top: 1px solid var(--border);
}
.card-page .hb-lrow.bk-row {
  min-height: 40px;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  font-weight: 400;
}
.bk-n {
  flex: none;
  width: 14px;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.bk-logo {
  flex: none;
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}
.bk-logo .mp-mark {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.bk-row:not([data-state='ready']) .bk-logo {
  opacity: 0.44;
}
.bk-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bk-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.bk-s {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.bk-row:not([data-state='ready']) .bk-name {
  color: var(--text-3);
  text-decoration: line-through;
}
.bk-acts {
  flex: none;
  display: inline-flex;
}
.hb.app .hb-ic.bk-ic {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-3);
}
.hb.app .hb-ic.bk-ic:hover:not(:disabled),
.hb.app .hb-ic.bk-ic:focus-visible {
  color: var(--text);
}
.hb.app .hb-ic.bk-ic:disabled {
  opacity: 0.4;
}
.hb.app button.hb-lrow.bk-add {
  min-height: 42px;
  color: var(--text-2);
}
.bk-plus {
  flex: none;
  display: inline-flex;
  color: var(--text-3);
}
/* O menu de adicionar modelo de reserva: o menu de busca da referência (primitives.css:741-860), canto 8 com anel de 1,
   no máximo 320 de altura, busca com lupa de 14 e fio embaixo, itens de 13/18 com canto 6 e sem bolinha. */
.bk-pop {
  position: fixed;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-height: var(--bk-max, 320px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--hb-raised);
  color: var(--text);
  box-shadow: 0 4px 6px -1px var(--hb-menu-drop), 0 2px 4px -2px var(--hb-menu-drop), 0 0 0 1px var(--border);
  pointer-events: auto;
  outline: 0;
  transform-origin: 50% 0;
  animation: mp-in 150ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bk-pop[data-side='top'] {
  transform-origin: 50% 100%;
}
.bk-find {
  position: relative;
  flex: none;
  padding: 4px;
  border-bottom: 1px solid var(--border);
}
.bk-find > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
  translate: 0 -50%;
}
.hb.app input.bk-search {
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 12px 0 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: 0;
}
.hb.app input.bk-search::placeholder {
  color: var(--text-3);
}
.hb.app input.bk-search:focus-visible {
  border-color: var(--text-3);
}
.bk-search::-webkit-search-cancel-button {
  display: none;
}
.bk-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: thin;
}
.bk-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 4px;
}
.hb.app button.bk-opt {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 6px 32px 6px 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
}
.hb.app button.bk-opt > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app button.bk-opt:hover,
.hb.app button.bk-opt:focus-visible {
  background: var(--hb-hover);
  outline: 0;
}
.hb.app .bk-empty {
  margin: 0;
  padding: 8px 12px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.card-note.bk-empty {
  padding: 8px 12px;
  font-size: 14px;
  line-height: 20px;
}

/* limite de uso: o cartão da conversa e a linha da troca de modelo */
.bk-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
.bk-f {
  justify-content: space-between;
  align-items: center;
}
.bk-f-b {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.set-select.bk-sel {
  width: auto;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 160px;
}
.set-select.bk-sel select {
  height: 32px;
  border-radius: 999px;
  font-size: 14px;
}
@container app-ask (width < 360px) {
  .bk-f {
    display: grid;
  }
  .set-select.bk-sel {
    width: 100%;
  }
}
.app-switch {
  gap: 6px;
  padding: 0 6px;
  color: var(--text-3);
}
.app-switch > svg {
  margin-top: 3px;
  flex: none;
}

/* pastas do bot (página da ficha) */
.fd-wide,
.card-page .hb-lrow.fd-row {
  min-height: 42px;
  gap: 10px;
  padding: 0 6px 0 12px;
  font-weight: 400;
}
.fd-wide {
  display: flex;
  align-items: center;
}
.fd-i {
  flex: none;
  display: inline-flex;
  color: var(--text-3);
}
.fd-row[data-state='missing'] .fd-i {
  color: var(--amber);
}
.fd-t {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 7px 0;
  text-align: left;
}
.fd-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fd-path {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: left;
}
.fd-row[data-state='missing'] .fd-path {
  /* A frase é lida do começo: só o caminho sozinho é cortado pela esquerda. */
  direction: ltr;
  color: var(--amber);
}
.hb.app .hb-btn.fd-locate {
  flex: none;
}
.hb.app .hb-ic.fd-ic {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text-3);
}
.hb.app .hb-ic.fd-ic:hover:not(:disabled),
.hb.app .hb-ic.fd-ic:focus-visible {
  color: var(--text);
}
.hb.app button.hb-lrow.fd-add {
  min-height: 42px;
  gap: 10px;
  color: var(--text-2);
}
.fd-empty {
  padding: 10px 12px;
}

/* A página Pastas com as medidas do app de referência (26/11/2026): linha de 48 com 6 em cima e embaixo, 12 e 6 dos lados,
   ícone de 14 a 8 do texto, nome e caminho de 13 por 18, "tirar" de 32, "Adicionar pasta" de 40 e a faixa de acesso amplo
   com o botão de 32. O quadro que percorre as pastas (abaixo) tem as suas. */
.card-page.fd .hb-lrow.fd-row {
  box-sizing: border-box;
  min-height: 48px;
  gap: 8px;
  padding: 6px 6px 6px 12px;
}
.card-page.fd .fd-t {
  gap: 0;
  padding: 0;
}
.card-page.fd .fd-name {
  font-size: 13px;
  line-height: 18px;
}
.card-page.fd .fd-i {
  color: var(--text-2);
}
.card-page.fd .fd-row[data-state='missing'] .fd-i {
  color: var(--amber);
}
.card-page.fd {
  gap: 16px;
}
.card-page.fd .fd-wide {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
}
.card-page.fd .fd-wide-t {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  text-wrap: pretty;
}
.hb.app .card-page.fd .hb-ic.fd-ic {
  width: 32px;
  height: 32px;
}
.hb.app .card-page.fd button.hb-lrow.fd-add {
  box-sizing: border-box;
  min-height: 40px;
  gap: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
}
.card-page.fd .fd-empty {
  padding: 8px 12px;
}

/* o "+" da linha Pastas da página principal, dentro do espaço que a linha deixa no fim do valor */
.fd-entry {
  position: relative;
}
.fd-slot {
  display: inline-block;
  width: 24px;
  vertical-align: middle;
}
.hb.app button.fd-entry-add {
  position: absolute;
  top: 50%;
  inset-inline-end: 34px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  color: var(--text-3);
  translate: 0 -50%;
}
.hb.app button.fd-entry-add:hover {
  background: var(--hb-hover);
  color: var(--text);
}

/* o quadro que percorre as pastas do computador */
.hb-scrim.fd-scrim {
  align-items: start;
  padding-top: min(14vh, 120px);
}
.app-dlg.fd-dlg {
  width: min(400px, 100%);
  max-height: min(600px, calc(100dvh - min(14vh, 120px) - 24px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px;
  border-radius: 14px;
}
.fd-dlg-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 4px 4px 12px;
}
.fd-dlg-h h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.fd-places {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 8px;
}
.hb.app .fd-places .hb-btn {
  gap: 4px;
}
.fd-path {
  margin: 0;
  padding: 0 12px 8px;
}
.hb.app .fd-path input.fd-path-in {
  width: 100%;
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
  direction: ltr;
  text-overflow: ellipsis;
}
.fd-list {
  flex: 1 1 auto;
  min-height: 160px;
  overflow-y: auto;
  display: block;
}
.hb.app .fd-list .hb-lrow.fd-row {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
}
.fd-up .fd-name {
  color: var(--text-2);
}
.fd-note {
  margin: 0;
  padding: 8px 12px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.fd-dlg .hb-foot {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 4px 4px;
}
.hb.app .fd-dlg .hb-foot .hb-btn {
  height: 36px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
}

/* Habilidades: a janela no centro da tela. Medidas do app de referência (conferido em 26/11/2026): caixa de
   560 x 456 (máximo), cabeçalho de 48 com borda, corpo com 8, linhas de 56 com ícone de 40. */
.app-dlg.sk-dlg {
  width: min(560px, calc(100vw - 48px));
  height: min(456px, calc(100dvh - 48px));
  min-height: 320px;
  padding: 0;
  gap: 0;
  border-radius: 18px;
  background: var(--surface-2);
  overflow: hidden;
}
.sk-h {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hb-card-line);
}
.hb-dlg.sk-dlg .sk-h h2 {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 20px;
}
.sk-h .hb-ic {
  width: 32px;
  height: 32px;
}
.sk-b {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sk-tabs {
  display: flex;
  flex: none;
  gap: 2px;
}
.hb.app .sk-tab {
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .sk-tab:hover {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app .sk-tab[aria-pressed='true'] {
  background: var(--hb-card-2);
  color: var(--text);
}
.sk-list {
  display: grid;
  gap: 2px;
}
.sk-item {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  border-radius: 12px;
}
.sk-item:hover {
  background: var(--hb-hover);
}
.sk-ic {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--hb-card-line);
  border-radius: 12px;
  color: var(--text-2);
}
.sk-t {
  flex: 1;
  min-width: 0;
  display: grid;
}
.sk-n {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sk-off .sk-n {
  color: var(--text-3);
}
.sk-d {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sk-state {
  min-height: 160px;
  display: grid;
  flex: 1;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.sk-state.sk-empty {
  gap: 16px;
}
.sk-state p,
.sk-none {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.sk-none {
  padding: 12px 8px;
}
.sk-err {
  margin: 0;
  padding: 4px 8px;
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
}
.sk-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sk-limit {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--hb-card-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.sk-more-w {
  position: relative;
  flex: none;
}
.hb.app .sk-more {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--hb-hover);
  opacity: 0;
}
.sk-item:hover .sk-more,
.sk-item:focus-within .sk-more,
.hb.app .sk-more[aria-expanded='true'] {
  opacity: 1;
}
@media (hover: none) {
  .hb.app .sk-more {
    opacity: 1;
  }
}
.hb.app .sk-update {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--hb-card-2);
  color: var(--text);
  font-size: 13px;
}
.sk-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 5;
  min-width: 160px;
  display: grid;
  padding: 4px;
  border: 1px solid var(--hb-card-line);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.hb.app .sk-mi {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  text-align: left;
}
.hb.app .sk-mi:hover,
.hb.app .sk-mi:focus-visible {
  background: var(--hb-hover);
  outline: 0;
}
.hb.app .sk-mi-red {
  color: var(--red);
}
/* Detalhe da habilidade: a caixa cresce (760 x 640 no app de referência, conferido em 26/11/2026), o título vira
   "Habilidades > Nome" e a página mostra o ícone, a descrição, o pedido de exemplo com Experimentar e as instruções. */
.app-dlg.sk-dlg.sk-wide {
  width: min(760px, calc(100vw - 32px));
  height: min(640px, calc(100dvh - 48px));
}
.sk-row-b {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.hb.app .sk-crumb {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.hb.app .sk-crumb:hover {
  color: var(--text);
}
.sk-h > svg {
  flex: none;
  color: var(--text-3);
}
.sk-h .toggle {
  flex: none;
  margin-inline: 8px 4px;
}
.sk-h .sk-more-on {
  opacity: 1;
}
.sk-detail {
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 12px;
}
.sk-dh {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.sk-dh h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 30px;
  overflow-wrap: anywhere;
}
.sk-dh p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-3);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.sk-ic-l {
  width: 48px;
  height: 48px;
}
.sk-try {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 38%, transparent), color-mix(in srgb, var(--c) 8%, transparent));
}
.sk-req {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.5;
}
.sk-req p {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.hb.app .sk-req .sk-go {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--hb-card-line);
}
.sk-note {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}
.sk-md {
  color: var(--text-3);
  font-size: 16px;
  line-height: 1.6;
}
@media (max-width: 520px) {
  .app-dlg.sk-dlg {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
  }
}

/* Tabelas: a janela no centro (a mesma caixa das Habilidades). Medidas do app de referência (26/11/2026): linha com
   8 e 12 de respiro, canto de 8, nome 14/600, meta 13/18; pergunta de apagar num bloco de fundo suave, 12 de respiro. */
.tb-list {
  display: grid;
  align-content: start;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
}
.tb-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.tb-name {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.tb-meta {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .tb-del {
  align-self: center;
  color: var(--text-3) !important;
}
.hb.app .tb-del:hover {
  color: var(--red) !important;
}
.tb-confirm {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--hb-card-2);
}
.tb-confirm p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.tb-confirm-acts {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.hb.app .hb-btn.hb-sm.tb-no,
.hb.app .hb-btn.hb-sm.tb-yes {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
}
.tb-err,
.hb-dlg .tb-err {
  margin: 4px;
  padding: 12px;
  border-radius: 8px;
  background: var(--hb-danger-soft);
  color: var(--hb-danger);
  font-size: 13px;
}

/* ---- rotinas: a página da ficha, o quadro de uma rotina e a linha dela na conversa */

.rt-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: start;
}
.rt-t {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.rt-n {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-s {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Sem rotinas, ou abrindo: só a frase, sem caixa (como no app de referência, medido em 26/11/2026). */
.rt-empty {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}

/* Rotinas vazia ou abrindo: a frase começa 14 abaixo da barra de título (.agent-routines-body, padding 14 15 28);
   o miolo da ficha põe 10 de vão e a barra deixa mais 14, então tira-se o vão dos 10. */
.card-b > .card-page.rt:has(> .rt-empty:only-child) {
  margin-top: -10px;
}

/* o quadro de uma rotina: medidas do app de referência (conferidas em 26/11/2026) */

.card-page.rt-edit {
  gap: 14px;
}
.rt-edit .card-field {
  margin: 0;
}
.rt-edit .card-field textarea.card-in {
  height: 158px;
  min-height: 158px;
  max-height: 158px;
  resize: none;
}
.rt-edit .card-field select.card-in {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 16px,
    calc(100% - 11px) 16px;
  background-repeat: no-repeat;
  background-size:
    5px 5px,
    5px 5px;
}
.rt-edit .card-field select.card-in option {
  background: var(--surface);
  color: var(--text);
}
.rt-edit .card-field .card-in[aria-invalid='true'] {
  border-color: var(--red);
}
.rt-field-err {
  display: block;
  margin: 6px 0 0 8px;
  color: var(--red);
  font-size: 13px;
  font-style: normal;
  line-height: 18px;
}
.rt-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-height: 34px;
}
.rt-active {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.rt-edit .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
}
.rt-edit .toggle::after {
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
}
.rt-edit .toggle:checked::after {
  transform: translateX(16px);
}
.rt-place {
  padding-inline-start: 8px;
}
.rt-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.hb.app .hb-btn.rt-btn {
  flex: 1 1 auto;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.hb.app .hb-btn.rt-btn.hb-quiet {
  background: var(--hb-ctl-hover) !important;
}
.hb.app .hb-btn.rt-btn:disabled {
  opacity: 0.42;
}
.rt-h3 {
  margin: 0 0 6px 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.rt-sec .rt-empty {
  margin-left: 8px;
}
.rt-save-error {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
}

/* a hora marcada (os campos são os mesmos do gatilho de um Fluxo) */
.rt-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--hb-line);
  background: var(--hb-side);
}
.rt-i {
  flex: none;
  display: inline-flex;
  color: var(--text-3);
}
.rt-when .hb-input {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--hb-card);
  font-size: 13.5px;
}
.rt-when select.hb-input {
  max-width: 100%;
}
.rt-when .rt-num {
  min-width: 56px;
}
.rt-when .rt-sel {
  min-width: 108px;
}
.rt-when .rt-cron {
  flex: 1;
  min-width: 140px;
  font-family: var(--mono, ui-monospace, monospace);
}
.rt-word {
  color: var(--text-3);
  font-size: 13px;
}
.rt-week {
  display: inline-flex;
  gap: 3px;
}
.rt-wd {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--hb-line);
  background: var(--hb-card);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.rt-wd[aria-pressed='true'] {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* só no quadro da rotina: a faixa com o relógio e as pastilhas do seletor do app de referência (raio 8, margem 4, relógio de 28,
   pastilhas de 28, texto de 15) */
.rt-edit .rt-when {
  align-items: flex-start;
  gap: 8px;
  padding: 4px;
  border-color: var(--border);
  border-radius: 8px;
  background: var(--hb-field);
}
.rt-edit .rt-i {
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
}
.rt-edit .rt-when .hb-input {
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--surface-3);
  font-size: 15px;
}
.rt-edit .rt-word {
  align-self: center;
  font-size: 15px;
  line-height: 22px;
}

/* o histórico: cada vez que a rotina rodou, uma linha de 32 com o estado só em ícone (a linha toda abre a conversa) */
.rt-runs {
  display: grid;
}
.hb.app .rt-run-row {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: start;
}
.hb.app button.rt-run-link {
  cursor: pointer;
}
.hb.app button.rt-run-link:hover {
  background: var(--hb-hover);
}
.rt-run-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  white-space: nowrap;
}
.rt-run-note {
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-run-ic {
  flex: none;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.rt-run-ic[data-state='done'] {
  color: var(--green);
}
.rt-run-ic[data-state='failed'] {
  color: var(--red);
}
.rt-run-ic[data-state='waiting'] {
  color: var(--amber);
}
/* a entrega da resposta para a conversa de fora: uma linha de 28 embaixo da vez, como na referência */
.rt-run-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.rt-delivery {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 4px;
  font-size: 13px;
}
.rt-delivery-note {
  min-width: 0;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.rt-delivery-failed {
  color: var(--hb-warn-text);
}

/* a linha da rotina na conversa */

.rt-ask {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.rt-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline-end: 4px;
  color: var(--text-3);
  font-size: 12px;
}
.rt-line svg {
  color: var(--text-3);
}

@media (width <= 560px) {
  .rt-when .rt-sel {
    min-width: 92px;
  }
}

/* ---------------------------------------------------------------- cor da conversa e avisos */

/* A fala da pessoa ganha um fundo suave da cor escolhida; sem cor, fica o fundo normal. */
.hb-msgs[data-tint]:not([data-tint='']),
.set-tint-eg[style] {
  --hb-me-bg: color-mix(in srgb, var(--hb-tint) 26%, var(--hb-card));
}
:root[data-theme='light'] .hb-msgs[data-tint]:not([data-tint='']),
:root[data-theme='light'] .set-tint-eg[style] {
  --hb-me-bg: color-mix(in srgb, var(--hb-tint) 42%, var(--hb-card));
}
.hb-msgs .hb-me,
.set-tint-eg .hb-me {
  background: var(--hb-me-bg, var(--hb-card));
}

/* Estilo "cheia": a fala da pessoa leva a cor do boneco daquele bot, inteira. As nove cores são claras,
   então o texto fica escuro, pela mesma conta de contraste do app de referência. */
.hb-msgs[data-bubble='solid'][data-tint]:not([data-tint='']) .hb-me,
.set-tint-eg[data-bubble='solid'][style] .hb-me {
  background: var(--hb-tint);
  color: var(--hb-tint-ink, var(--bot-dark));
}

/* O ponto da cor na linha da ficha. */
.tint-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-inline-end: 6px;
  border-radius: 999px;
  vertical-align: -1px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* As cores nos Ajustes: a mesma fileira de nove do boneco, com "Sem cor" na frente. */
.set-tint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 16px 12px;
}
.hb.app button.set-tint {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.hb.app button.set-tint:hover {
  background: var(--hb-hover);
}
.hb.app button.set-tint[aria-pressed='true'] {
  background: var(--border);
  box-shadow: inset 0 0 0 1px var(--text-3);
}
.set-tint i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.set-tint-none {
  background: var(--hb-card);
  position: relative;
  overflow: hidden;
}
.set-tint-none::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--text-3) calc(50% - 1px), var(--text-3) calc(50% + 1px), transparent calc(50% + 1px));
}
.set-tint-eg {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}
.set-tint-eg .hb-me {
  max-width: 100%;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 14px;
}

/* A linha com título e explicação (Avançado) e a marca da escolha (Notificar-me). */
.card-t {
  display: grid;
  gap: 2px;
  text-align: start;
}
.card-d {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.35;
}
.card-ck {
  display: inline-grid;
  place-items: center;
  color: var(--text);
}

/* ---------------------------------------------------------------- cartão de perguntas (ask_person) */

/* Mesmo cartão da aprovação, com as opções numeradas; medidas do app de referência (25/11/2026). */
.app-q-opts {
  display: grid;
  gap: 2px;
}
.hb.app .app-q-opt {
  min-height: 40px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  text-align: start;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  transition: background 120ms ease-out;
}
.hb.app .app-q-opt:hover,
.app-q-free:focus-within {
  background: var(--hb-hover);
}
.hb.app .app-q-opt[aria-pressed='true'] {
  background: var(--hb-raised);
}
.app-q-k {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--hb-raised);
  color: var(--text-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}
.app-q-opt[aria-pressed='true'] .app-q-k {
  background: var(--accent);
  color: var(--on-accent);
}
.app-q-t {
  min-width: 0;
  display: grid;
}
.app-q-t > span {
  overflow-wrap: anywhere;
}
.app-q-d {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.app-q-free {
  cursor: text;
}
.app-q-in {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.app-q-in:focus,
.app-q-in:focus-visible {
  outline: 0;
}
.app-q-in::placeholder {
  color: var(--text-3);
}
.app-q-f {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-q-acts {
  display: flex;
  gap: 8px;
  margin-inline-start: auto;
}
.app-q-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-q-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-4);
  opacity: 0.45;
}
.app-q-dot[data-done] {
  opacity: 0.8;
}
.app-q-dot[data-now] {
  width: 16px;
  opacity: 1;
  background: var(--text-3);
}

/* Depois de respondido: a pergunta e o que a pessoa respondeu. */
.app-q-sum {
  gap: 8px;
}
.app-q-done {
  display: grid;
  gap: 2px;
}
.app-q-q {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.app-q-a {
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.app-q-skipped {
  color: var(--text-3);
}

/* plano antes de tarefa longa (rodada I1): o cartão usa a base do .app-ask; aqui só a lista de passos e o resultado */
.app-plan-f {
  display: grid;
  grid-template-columns: minmax(64px, max-content) minmax(min(192px, 50%), 1fr);
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  font-size: 15px;
}
.app-plan-f dt {
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.app-plan-f dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.app-plan-done .app-ask-h {
  display: block;
}
.app-plan-o {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.app-plan-o svg {
  flex: 0 0 auto;
}
.app-plan-done[data-outcome='ok'] .app-plan-o {
  color: var(--text-2);
}
.app-plan-done[data-outcome='ok'] .app-plan-o svg {
  color: var(--green);
}
/* fim do plano antes de tarefa longa */

/* A linha de "daqui começa uma conversa nova": no meio da conversa, discreta, como no app de referência
   (conferida em 25/11/2026: 24 px de altura, texto de 13/18 px apagado, até 680 px de largura). */
.hb.app .app-reset {
  min-height: 24px;
  width: min(680px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

/* A linha de compactação: a mesma faixa da "conversa nova", com o ícone de andamento antes e a hora depois
   (conferida em 26/11/2026: marcador de 24 px, texto de 13/18 px apagado; o estado dá a cor só ao ícone). */
.hb.app .app-compact .hc-loader,
.hb.app .app-compact svg {
  flex: none;
}
.hb.app .app-compact[data-state="done"] svg {
  color: var(--green);
}
.hb.app .app-compact[data-state="failed"] svg,
.hb.app .app-compact[data-state="stopped"] svg {
  color: var(--hb-warn, var(--text-2));
}
.hb.app .app-compact span {
  min-width: 0;
}
.hb.app .app-compact time {
  flex: none;
  color: var(--text-3);
}
.hb.app .app-compact time::before {
  content: "· ";
}
/* O antes e o depois em tokens entram na mesma linha; em tela estreita ela quebra em vez de vazar. */
.hb.app .app-compact {
  flex-wrap: wrap;
}
/* A linha de status do canal traz um nome escrito por bot, de até 120 letras e talvez sem espaço: quebra em qualquer ponto. */
.hb.app .app-note {
  overflow-wrap: anywhere;
}

/* Arquivos do bot. Estrutura conferida no app de referência em 25/11/2026: o total em destaque, quadrinhos
   com cada parte do tamanho e a lista dos arquivos com nome, tamanho e data. */
.hb.app .fl-page {
  grid-template-columns: minmax(0, 1fr);
  padding: 16px 1px 0;
  gap: 24px;
}
.hb.app .fl-sum {
  display: grid;
  gap: 12px;
}
.hb.app .fl-sum p {
  margin: 0;
}
.hb.app .fl-sum-l {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .fl-total {
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  font-variant-numeric: tabular-nums;
}
.hb.app .fl-box {
  border: 1px solid var(--hb-card-line);
  border-radius: 12px;
  background: var(--surface-2);
}
.hb.app .fl-line {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 14px;
}
.hb.app .fl-line .fl-lab {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-size: inherit;
}
.hb.app .fl-line .fl-lab .hb-ic {
  margin-block: -4px;
}
.hb.app .fl-line + .fl-line {
  border-top: 1px solid var(--hb-card-line);
}
.hb.app .fl-line span + span {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hb.app .fl-files {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.hb.app .fl-bar {
  display: flex;
  gap: 8px;
}
.hb.app .fl-bar .mem-search {
  flex: 1;
  min-width: 0;
}
.hb.app .fl-sort {
  flex: none;
  height: 42px;
  max-width: 45%;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.hb.app .fl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hb.app .fl-pill {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--hb-card-line);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .fl-pill span {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.hb.app .fl-pill:hover {
  background: var(--hb-hover);
}
.hb.app .fl-pill[aria-pressed='true'] {
  border-color: transparent;
  background: var(--hb-card-2);
  color: var(--text);
}
.hb.app .fl-res {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.hb.app .fl-count {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .fl-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.hb.app .fl-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
}
.hb.app .fl-row:hover,
.hb.app .fl-row:focus-within {
  background: var(--hb-hover);
}
.hb.app .fl-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: start;
}
.hb.app .fl-i {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--hb-file-soft);
  color: var(--hb-file);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hb.app .fl-i[data-tone='document'] {
  color: var(--hb-file-doc);
}
.hb.app .fl-i b {
  font: inherit;
  line-height: 18px;
}
.hb.app .fl-i img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb.app .fl-t {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.hb.app .fl-name {
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .fl-meta {
  font-size: 13px;
  line-height: 18px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .fl-more {
  width: 28px;
  height: 28px;
  margin-inline-end: 8px;
  opacity: 0;
}
.hb.app .fl-row:hover .fl-more,
.hb.app .fl-more:focus-visible,
.hb.app .fl-more[aria-expanded='true'] {
  opacity: 1;
}
@media (hover: none) {
  .hb.app .fl-more {
    opacity: 1;
  }
}
.hb.app .fl-none {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 8px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}
.hb.app .fl-none p {
  margin: 0;
}
.hb.app .fl-skels {
  display: grid;
  gap: 8px;
}
.hb.app .fl-sk {
  height: 48px;
  border-radius: 8px;
}

/* Anexos. Medidas conferidas no app de referência em 25/11/2026: fileira com 8 px entre os cartões; cartão
   de imagem 52x52 com canto de 12 px; cartão de arquivo 220x52 com o quadrado de 36 px, nome em 13/16 em
   500 e tamanho em 13/14 apagado. */
.hb.app .app-att {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  /* Na mesma largura do campo de escrever, com um dedo de folga para o X do cartão não sair da tela. */
  margin: 2px 22px 2px;
}
/* Fila de falas, em cima da caixa de escrever (queue.js). Medidas do app de referência: linha de 29, recuo 13/8,
   canto de 12, texto de 15 e ações de 26; o quadro entra 14 atrás da caixa. */
.hb.app .app-queue {
  position: relative;
  z-index: 1;
  margin: 0 18px -14px;
}
/* Com anexos esperando na fileira (a fala que se edita os traz de volta), o quadro não os cobre: fica em cima, sem entrar atrás. */
.hb.app .app-queue:has(+ .app-att:not([hidden])) {
  margin-bottom: 6px;
}
.hb.app .app-queue[hidden] {
  display: none;
}
/* Esperas abertas do bot, em cima da caixa de escrever (waits.js). Mesmo cartão da fila: canto de 12, borda e fundo
   iguais; cabeçalho de 29 como as linhas da fila, linhas de duas linhas (motivo 15/20 e detalhe 13/16) e ação de 26. */
.hb.app .app-waits {
  position: relative;
  z-index: 1;
  margin: 0 18px 6px;
}
.hb.app .app-waits[hidden] {
  display: none;
}
.hb.app .app-w {
  box-sizing: border-box;
  padding: 3px 8px 3px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-raised);
  color: var(--text);
}
.hb.app .app-w-h {
  display: grid;
  width: 100%;
  min-height: 29px;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  line-height: 20px;
  text-align: start;
  cursor: pointer;
}
.hb.app .app-w-h:hover,
.hb.app .app-w-h:focus-visible {
  background: var(--hb-hover);
  outline: 0;
}
.hb.app .app-w-h:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.hb.app .app-w-ic {
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.hb.app .app-w-chev {
  display: grid;
  width: 26px;
  place-items: center;
  color: var(--text-3);
  transition: transform 0.15s ease;
}
.hb.app .app-w[data-open='false'] .app-w-chev {
  transform: rotate(-90deg);
}
.hb.app .app-w-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-w-list {
  max-height: 232px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.hb.app .app-w-list[hidden] {
  display: none;
}
.hb.app .app-w-row {
  display: grid;
  min-height: 40px;
  grid-template-columns: 15px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  border-radius: 8px;
}
.hb.app .app-w-row:hover {
  background: var(--hb-hover);
}
.hb.app .app-w-text {
  display: grid;
  min-width: 0;
}
.hb.app .app-w-note {
  overflow: hidden;
  font-size: 15px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-w-meta {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-w-x {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.hb.app .app-w-x:hover:not(:disabled),
.hb.app .app-w-x:focus-visible {
  background: var(--hb-ctl-hover);
  color: var(--text);
  outline: 0;
}
.hb.app .app-w-x:disabled {
  opacity: 0.6;
  cursor: default;
}
.hb.app .app-w-gone {
  margin: 0;
  padding: 2px 0 4px 22px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 16px;
}
/* A fala que espera a vez só aparece no quadro da fila, não na conversa (queue.js). */
.hb.app [data-qwait] {
  display: none !important;
}
.hb.app .app-q {
  box-sizing: border-box;
  max-height: calc(7 * 29px + 10px + 14px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px 8px 19px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-raised);
}
.hb.app .app-q-row {
  display: grid;
  height: 29px;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--text);
}
.hb.app .app-q-ic {
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.hb.app .app-q-text {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-q-row {
  position: relative;
  border-radius: 8px;
  cursor: grab;
  outline: 0;
  transition: transform 0.2s ease, background-color 0.12s ease;
}
.hb.app .app-q-row[draggable='false'] {
  color: var(--text-3);
  cursor: default;
}
.hb.app .app-q-row:hover,
.hb.app .app-q-row:focus-visible {
  background: var(--hb-hover);
}
.hb.app .app-q-row:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.hb.app .app-q-row.is-drag {
  opacity: 0;
}
.hb.app .app-q-acts {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-3);
}
.hb.app .app-q-badge {
  flex: none;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--hb-raised);
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}
.hb.app .app-q-send,
.hb.app .app-q-edit {
  display: inline-flex;
  height: 26px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  line-height: 18px;
  cursor: pointer;
}
.hb.app .app-q-edit {
  width: 26px;
  padding: 0;
}
.hb.app .app-q-send:hover:not(:disabled),
.hb.app .app-q-send:focus-visible,
.hb.app .app-q-edit:hover:not(:disabled),
.hb.app .app-q-edit:focus-visible {
  background: var(--hb-ctl-hover);
  color: var(--text);
  outline: 0;
}
.hb.app .app-q-send:disabled,
.hb.app .app-q-edit:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 620px) {
  .hb.app .app-q-send {
    width: 26px;
    padding: 0;
  }
  .hb.app .app-q-send span {
    display: none;
  }
}
/* O aviso de que uma fala da fila está sendo editada: um cartão como o da fila, também atrás da caixa. */
.hb.app .app-q-note {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding: 6px 8px 6px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-raised);
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-q-note:last-child {
  margin-bottom: 0;
  padding-bottom: 20px;
}
.hb.app .app-q-note .hb-btn {
  flex: none;
}
.hb.app .app-q-del {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.hb.app .app-q-del:hover:not(:disabled),
.hb.app .app-q-del:focus-visible {
  background: var(--hb-danger-soft);
  color: var(--hb-danger);
  outline: 0;
}
.hb.app .app-q-del:disabled {
  opacity: 0.45;
  cursor: default;
}
.hb.app .app-att-sent {
  justify-content: flex-end;
  margin: 0 0 6px;
  width: 100%;
}
/* Os arquivos que o bot mostra ficam do lado dele, alinhados com o texto da resposta. */
.hb.app .hb-answer .app-att-sent {
  justify-content: flex-start;
  margin: 0;
}
.hb.app .app-att-c {
  position: relative;
  display: flex;
  min-width: 0;
  height: 52px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.hb.app .app-att-c[data-kind='image'] {
  width: 52px;
  flex: 0 0 auto;
  padding: 0;
}
.hb.app .app-att-c[data-kind='file'] {
  width: 220px;
  max-width: 100%;
  gap: 10px;
  padding: 7px 12px 7px 8px;
}
.hb.app .app-att-c.app-att-r[data-kind='file'] {
  display: grid;
  width: min(100%, 256px);
  height: auto;
  min-height: 56px;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  gap: 6px;
  padding: 7px;
}
.hb.app .app-att-c.app-att-r2[data-kind='file'] {
  grid-template-columns: minmax(0, 1fr) 40px;
}
.hb.app .app-att-body {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.hb.app .app-att-body:disabled {
  cursor: default;
}
.hb.app .app-att-act {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  color: var(--text-3);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hb.app .app-att-act:hover {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .app-att-p {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: var(--hb-hover);
  color: var(--text-3);
}
.hb.app .app-att-c[data-kind='image'] .app-att-p {
  width: 100%;
  height: 100%;
  border-radius: 11px;
}
.hb.app .app-att-p img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb.app .app-att-t {
  display: block;
  min-width: 0;
  flex: 1;
}
.hb.app .app-att-t strong,
.hb.app .app-att-t small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-att-t strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: var(--text);
}
.hb.app .app-att-t small {
  font-size: 13px;
  line-height: 14px;
  color: var(--text-3);
}
.hb.app .app-att-x {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--hb-raised);
}
/* O cartão de um arquivo já mandado abre ele na página "Arquivos" da ficha, como no app de referência. */
.hb.app button.app-att-c {
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hb.app button.app-att-c:hover {
  border-color: var(--border-strong);
  background: var(--hb-hover);
}
.hb.app .app-plus {
  flex: 0 0 auto;
  background: var(--hb-hover);
  color: var(--text-3);
}
.hb.app .app-plus:hover,
.hb.app .app-plus[aria-expanded='true'] {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .app-mine {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ---------------------------------------------------------------- procurar na conversa
   A barra fica em cima das mensagens, como no app de referência, e some com Esc. O achado da vez tem a cor
   de destaque; os outros ficam só marcados. */
.hb.app .app-fbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.hb.app .app-fbar .hb-search {
  flex: 1;
  min-width: 0;
  max-width: 420px;
}
.hb.app .app-find-n {
  min-width: 72px;
  color: var(--text-3);
  font-size: 13px;
  text-align: end;
}
.hb.app mark.app-hit {
  border-radius: 3px;
  background: var(--accent-soft);
  color: inherit;
}
.hb.app mark.app-hit.on {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------------------------------------------------------------- procurar em tudo
   Um quadro fixo a 112 px do alto da janela: uma linha de controle (lupa, campo e abas), os resultados em grupos
   e o rodapé com as teclas. Medidas conferidas no app de referência; cores são dos tokens do app. */
.hb.app .app-all-scrim {
  position: fixed;
  z-index: 20;
}
.hb.app .app-all {
  position: fixed;
  z-index: 21;
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100dvh - 136px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}
.hb.app .app-all-ctl {
  flex: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 16px;
  box-shadow: inset 0 -1px 0 var(--border);
}
.hb.app .app-all-lens {
  flex: none;
  display: flex;
  color: var(--text-3);
}
.hb.app .app-all-ctl input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  outline: 0;
}
.hb.app .app-all-ctl input::placeholder {
  color: var(--text-3);
}
.hb.app .app-all-tabs {
  flex: none;
  display: flex;
  gap: 2px;
}
.hb.app .app-all-tabs button {
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.hb.app .app-all-tabs button:hover {
  color: var(--text-2);
}
.hb.app .app-all-tabs button.on {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .app-all-list {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(400px, calc(100dvh - 240px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
}
.hb.app .app-all-h {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-all-row ~ .app-all-h {
  height: 34px;
  align-items: flex-end;
  padding-bottom: 4px;
}
.hb.app .app-all-row {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  text-align: start;
}
.hb.app .app-all-row:hover {
  background: var(--hb-hover);
}
.hb.app .app-all-row.on {
  background: var(--hb-ctl-hover);
}
.hb.app .app-all-av {
  flex: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}
.hb.app .app-all-title {
  flex: 0 1 auto;
  max-width: 40%;
  overflow: hidden;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hb.app .app-all-d {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hb.app .app-all-d b {
  font-weight: 500;
}
.hb.app .app-all-row time {
  flex: none;
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .app-all-enter {
  flex: none;
  display: flex;
  color: var(--text-3);
}
.hb.app .app-all-none {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px;
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}
.hb.app .app-all-none[role="alert"] {
  flex-direction: row;
}
.hb.app .app-all-none .app-all-plush {
  flex: none;
}
.hb.app .app-all-more {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px;
  color: var(--text-3);
  font-size: 14px;
}
.hb.app .app-all-foot {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .app-all-foot b {
  color: var(--text-2);
  font-weight: 500;
}
@media (max-width: 639px) {
  .hb.app .app-all {
    width: calc(100vw - 24px);
  }
  .hb.app .app-all-ctl {
    flex-wrap: wrap;
    gap: 0 8px;
    padding-bottom: 6px;
  }
  .hb.app .app-all-ctl input {
    flex: 1 0 0;
  }
  .hb.app .app-all-tabs {
    order: 3;
    flex: 1 0 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hb.app .app-all-foot,
  .hb.app .app-all-enter {
    display: none;
  }
}
/* A fala aberta pela busca pisca uma vez, para a pessoa achar ela com o olho. */
@keyframes app-flash {
  from { background: var(--accent-soft); }
  to { background: transparent; }
}
.hb.app .app-flash {
  border-radius: 12px;
  animation: app-flash 1.4s ease-out 1;
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .app-flash { animation: none; }
}

/* ---------------------------------------------------------------- pedir sobre um trecho marcado */

/* A barrinha segue o trecho marcado: o app escreve a posição, por isso ela é fixa na janela. */
.hb.app .app-sel {
  position: fixed;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.hb.app .app-sel-b {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
}
.hb.app .app-sel-b:hover {
  background: var(--hb-hover);
}
.hb.app .app-sel-own {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  margin-inline-start: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-3);
}
.hb.app .app-sel-own input {
  width: 132px;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--text);
}
@media (max-width: 760px) {
  /* Em tela estreita o pedido escrito não cabe junto: ficam só os pedidos prontos, que rolam de lado. */
  .hb.app .app-sel {
    max-width: calc(100vw - 24px);
    overflow-x: auto;
  }
  .hb.app .app-sel-own {
    display: none;
  }
}

/* O trecho citado no começo da fala da pessoa, de quando ela pede alguma coisa sobre um pedaço da conversa. */
.hb.app .app-quote {
  display: block;
  margin-bottom: 6px;
  padding-inline-start: 8px;
  border-inline-start: 2px solid currentColor;
  opacity: 0.72;
  white-space: pre-wrap;
}

/* Responder e reagir. Medidas conferidas no código do app de referência (versão 0.79): a citação tem no máximo
   360 de largura, barra de 2 px, recuo 8, autor em 13/14 a 550 e trecho em 13/15 com até 60 de altura (quatro
   linhas, esmaecendo no fim); o quadro em cima do campo tem 42 de altura mínima, canto 14, folga de 10 e botão de
   24; a reação é uma pastilha de 20 de altura que desce 75% para fora do balão, com um anel de 3 px; a grade tem
   células de 31 com canto 6, seis na primeira fileira e oito na segunda (separada por um filete). */
.hb.app .app-rq {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: -1px 0 7px;
  padding: 0 0 0 8px;
  border: 0;
  border-inline-start: 2px solid currentColor;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  opacity: 0.78;
  white-space: normal;
}
.hb.app .app-rq:hover {
  border-inline-start-color: var(--accent-ink, currentColor);
  opacity: 1;
}
.hb.app .app-rq:focus-visible {
  outline: 2px solid var(--text-4);
  outline-offset: 2px;
}
.hb.app .app-rq-n {
  display: block;
  margin-bottom: 1px;
  font-size: 13px;
  font-weight: 550;
  line-height: 14px;
}
.hb.app .app-rq-t {
  display: block;
  max-height: 60px;
  overflow: hidden;
  font-size: 13px;
  line-height: 15px;
  overflow-wrap: anywhere;
}
.hb.app .app-rq-t[data-clipped],
.hb.app .app-reply-q[data-clipped] {
  mask-image: linear-gradient(to bottom, #000 45px, transparent 60px);
}
.hb.app .app-reply {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0 16px 6px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--hb-raised);
}
.hb.app .app-reply[hidden] {
  display: none;
}
.hb.app .app-reply-b {
  min-width: 0;
  flex: 1;
}
.hb.app .app-reply-t {
  display: block;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 550;
  line-height: 14px;
}
.hb.app .app-reply-q {
  display: block;
  max-height: 60px;
  overflow: hidden;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 15px;
  overflow-wrap: anywhere;
}
.hb.app :is(.app-rq-t, .app-reply-q) :is(p, ul, ol, pre, blockquote, h1, h2, h3, h4, table) {
  margin: 0;
  font-size: 13px;
  line-height: 15px;
}
.hb.app :is(.app-rq-t, .app-reply-q) :is(ul, ol) {
  padding-left: 18px;
}
.hb.app .app-reply-x {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 999px;
}
.hb.app .app-bub:has(> .app-rx),
.hb.app .hb-answer:has(> .app-rx) {
  position: relative;
  margin-bottom: 10px;
}
.hb.app .app-rx {
  position: absolute;
  z-index: 1;
  bottom: 0;
  translate: 0 75%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--bg);
  color: var(--text);
}
.hb.app .app-bub > .app-rx {
  inset-inline-start: 12px;
}
.hb.app .hb-answer > .app-rx {
  inset-inline-end: 12px;
}
.hb.app .app-rx-flow {
  position: static;
  translate: none;
  align-self: flex-end;
  margin: 0 12px 6px;
}
.hb.app .app-rx[data-count='1'] {
  padding-inline: 2px;
}
.hb.app .app-rx-p {
  display: flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: none;
  padding: 0;
  color: inherit;
  font-size: 15px;
  line-height: 1;
}
.hb.app button.app-rx-p:hover {
  background: var(--hb-menu-hover);
}
.hb.app .rx-grid {
  display: flex;
  flex-direction: column;
}
.hb.app .rx-row {
  display: flex;
  gap: 1px;
}
.hb.app .rx-more {
  display: grid;
  grid-template-columns: repeat(8, 31px);
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid var(--hb-line);
}
.hb.app .rx-b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: none;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}
.hb.app .rx-b:hover,
.hb.app .rx-b:focus-visible,
.hb.app .rx-b[aria-checked='true'] {
  background: var(--hb-menu-hover);
  outline: 0;
  transform: scale(1.08);
}

/* ---------------------------------------------------------------- tópicos
   As abas em cima da conversa e o painel com todos os tópicos. Medidas conferidas na prancha aprovada 18:
   fileira de 50 px, cantos de 10 px e o tópico aberto no fundo do cartão. */
.hb.app .app-tabs {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.hb.app .app-tabs::-webkit-scrollbar {
  display: none;
}
.hb.app .app-tab {
  flex: none;
  height: 30px;
  max-width: 190px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-tab:hover {
  background: var(--hb-card);
}
.hb.app .app-tab[aria-selected='true'] {
  background: var(--hb-card);
  color: var(--hb-text);
}
.hb.app .app-tab-n {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-tab-d {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
}
.hb.app .app-tab-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 6px;
  opacity: 0.6;
}
.hb.app .app-tab-x:hover {
  background: var(--hb-card-2);
  opacity: 1;
}
/* De onde este tópico foi ramificado, logo embaixo das abas. */
.hb.app .app-topic-from {
  flex: none;
  padding: 6px 16px 0;
  color: var(--hb-muted);
  font-size: 12.5px;
}
/* O divisor de ramificação: uma linha com o nome do tópico de origem entre as falas copiadas e as novas. */
.hb.app .app-branch {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 20px;
}
.hb.app .app-branch hr {
  flex: 1;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--hb-line);
}
.hb.app .app-branch-t {
  display: inline-flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
}
.hb.app .app-branch-t svg {
  flex: none;
}
.hb.app .app-branch-t span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-branch-go {
  height: 24px;
  border-radius: 6px;
  padding: 0 6px;
  cursor: pointer;
}
.hb.app .app-branch-go:hover {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app .app-branch-go:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: -2px;
}
/* A marca de que algum tópico espera a pessoa, no botão que abre o painel. */
.hb.app .app-topics-b {
  position: relative;
}
.hb.app .app-trigger-d {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
/* O painel dos tópicos: uma fileira de uma linha por tópico (36 px, 8 de borda, 8 de espaço), sem cabeçalho nem filtros.
   Nome, marca de estado num espaço de 24 px e a hora; o tópico aberto leva o fundo de controle ativo. */
.hb.app .app-topics .hb-panel-b.app-topic-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 8px 32px;
  overflow-y: auto;
}
.hb.app .app-topic {
  display: flex;
  width: 100%;
  height: 36px;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--text);
  text-align: start;
}
.hb.app button.app-topic:hover,
.hb.app button.app-topic:focus-visible {
  background: var(--hb-hover);
}
.hb.app button.app-topic[aria-current='true'] {
  background: var(--hb-selected);
}
.hb.app .app-topic-n {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-topic-m {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}
.hb.app .app-topic-bad-m {
  color: var(--red);
}
.hb.app .app-topic-t {
  min-width: 44px;
  flex: none;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  text-align: end;
}
.hb.app .app-topic-d {
  background: var(--blue);
}
/* trabalhando: três pontos que acendem um depois do outro */
.hb.app .app-tdots {
  display: inline-flex;
  gap: 3px;
}
.hb.app .app-tdots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hb-text);
  animation: app-tdot 1.2s ease-in-out infinite;
}
.hb.app .app-tdots i:nth-child(2) {
  animation-delay: 0.2s;
}
.hb.app .app-tdots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes app-tdot {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .app-tdots i {
    animation: none;
    opacity: 0.7;
  }
}
/* o nome trocado no lugar dele: na linha do painel e na aba */
.hb.app .app-topic-r {
  padding: 0 4px;
}
.hb.app .app-tab-in {
  min-width: 0;
  flex: 1 1 auto;
  height: 24px;
  border: 1px solid var(--text-3);
  border-radius: 6px;
  background: var(--hb-card);
  padding: 0 6px;
  color: var(--hb-text);
  font: inherit;
  font-size: 13px;
  outline: 0;
}
.hb.app .app-tab.app-tab-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hb.app .app-topic-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* Centrado no espaço que sobra embaixo da lista, como o bloco do vazio do app de referência (margin: auto). */
  margin: auto;
  padding: 0;
  text-align: center;
}
.hb.app .app-topic-empty p {
  margin: 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
/* a marca de "há resposta nova" na seta do alto, e o aviso de excluído */
.hb.app .app-all-topics {
  position: relative;
}
.hb.app .app-toast-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .toasts {
  bottom: 84px;
}
.toast .app-toast-x {
  display: inline-flex;
  align-items: center;
  padding: 3px;
}
/* J3: item da faixa escondido e aviso com descrição (o aviso do Sonner da referência leva título e descrição). */
.hb.app .hb-nav[hidden] {
  display: none;
}
.hb.app .app-toast-x2 {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}
.hb.app .app-toast-d {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
/* fim J3 */
.app-menu.app-menu-tab {
  min-width: 220px;
}
.hb.app .app-topic-more {
  align-self: start;
  margin: 8px 0 0 12px;
  color: var(--hb-muted);
  font-size: 13px;
  text-decoration: underline;
}
.hb.app .app-topic-bad {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
  padding: 12px;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}

/* ---------------------------------------------------------------- tarefas
   A tela de Tarefas, nas medidas do app de referência (0.79, 28/11/2026): coluna de até 36rem com 24 dos lados, a caixa
   de pedir presa ao alto, fileira de 36 (16 / texto / situação / rosto de 18, vão de 12, canto de 8, letra 14), título
   da seção em 13 apagado com a conta ao lado, e o painel da tarefa aberta de 420 (mínimo 320) com cabeçalho de 39. */
:root:not([data-theme='light']) {
  --hb-task-attn: #007cf7;
}
:root[data-theme='light'] {
  --hb-task-attn: #0064c8;
}
.hb.app .tk {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--hb-canvas);
  color: var(--hb-text);
}
.hb.app .tk-scroll {
  min-width: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 32px;
}
.hb.app .tk-col {
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hb.app .tk-comp {
  position: sticky;
  z-index: 3;
  top: 0;
  margin-bottom: 8px;
  padding: 16px 0 0;
  background: var(--hb-canvas);
}
.hb.app .tk-composer.hb-composer {
  margin: 0;
  align-items: center;
  padding: 7px 10px 7px 12px;
}
.hb.app .tk-agent {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.hb.app .tk-agent .ps-b {
  max-width: 140px;
  padding: 0 4px;
  color: var(--text-2);
  font-size: 13px;
}
.hb.app .tk-composer textarea {
  align-self: center;
}
.hb.app .tk-bad {
  margin-top: 8px;
}
.hb.app .tk-slot:empty {
  display: none;
}
.hb.app .tk-took {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 13px;
}
.hb.app .tk-took-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.hb.app .tk-took-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .tk-gb {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 13px;
}
.hb.app .tk-gb:hover {
  background: var(--hb-ctl-active);
}
.hb.app .tk-x {
  width: 24px;
  height: 24px;
}
.hb.app .tk-sec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hb.app .tk-sec + .tk-sec {
  margin-top: 16px;
}
.hb.app .tk-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .tk-n {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.hb.app .tk-ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .tk-row {
  width: 100%;
  height: 36px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  text-align: start;
  color: var(--hb-text);
}
.hb.app .tk-row:hover {
  background: var(--hb-hover);
}
.hb.app .tk-row[data-selected] {
  background: var(--hb-ctl-active);
}
.hb.app .tk-sec[data-closed] .tk-row:not([data-selected]) {
  opacity: 0.55;
}
.hb.app .tk-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .tk-status {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .tk-status[data-tone='working'] {
  color: var(--text-2);
}
.hb.app .tk-status[data-tone='attention'] {
  color: var(--hb-task-attn);
}
.hb.app .tk-status[data-tone='danger'] {
  color: var(--red);
}
.hb.app .tk-row .app-face,
.hb.app .tk-row > svg,
.hb.app .tk-row > img {
  flex: none;
}
.hb.app .tk-all {
  align-self: flex-start;
  /* O botão pequeno da referência (ghost, tamanho sm): as medidas dos botões de cartão, medidas ao vivo (32, 14, 14, 500). */
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
}
.hb.app .tk-sec li[data-arrived] > .tk-row {
  animation: tk-arrive 1600ms ease-out;
}
@keyframes tk-arrive {
  from {
    background: var(--hb-ctl-active);
  }
}
/* o sinal da tarefa */
.hb.app .tk-mark {
  --tk-glyph: 14px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
}
.hb.app .tk-ph .tk-mark {
  width: var(--tk-glyph);
}
.hb.app .tk-mark svg {
  width: var(--tk-glyph);
  height: var(--tk-glyph);
  overflow: visible;
}
.hb.app .tk-mark circle,
.hb.app .tk-mark path {
  transition: opacity 160ms ease, transform 160ms ease, stroke-dashoffset 300ms ease;
  transform-box: fill-box;
  transform-origin: center;
}
.hb.app .tk-m-pending {
  opacity: 0;
  stroke: var(--text-4);
  stroke-dasharray: 1.2 2;
  stroke-width: 1.5;
}
.hb.app .tk-m-track {
  opacity: 0;
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.hb.app .tk-m-arc {
  opacity: 0;
  stroke: var(--text);
  stroke-dasharray: 12 100;
  stroke-linecap: round;
  stroke-width: 1.5;
}
.hb.app .tk-m-fill {
  fill: var(--text-4);
  opacity: 0;
  transform: scale(0.4);
}
.hb.app .tk-m-check,
.hb.app .tk-m-cross {
  stroke: var(--hb-canvas);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-width: 1.75;
}
.hb.app .tk-mark svg[data-state='pending'] .tk-m-pending,
.hb.app .tk-mark svg[data-state='active'] .tk-m-track,
.hb.app .tk-mark svg[data-state='active'] .tk-m-arc,
.hb.app .tk-mark svg[data-state='done'] .tk-m-fill,
.hb.app .tk-mark svg[data-state='failed'] .tk-m-fill {
  opacity: 1;
}
.hb.app .tk-mark svg[data-state='active'] {
  animation: tk-turn 0.9s linear infinite;
}
.hb.app .tk-mark svg[data-state='done'] .tk-m-fill,
.hb.app .tk-mark svg[data-state='failed'] .tk-m-fill {
  transform: scale(1);
}
.hb.app .tk-mark svg[data-state='failed'] .tk-m-fill {
  fill: var(--hb-danger);
}
.hb.app .tk-mark svg[data-state='done'] .tk-m-check,
.hb.app .tk-mark svg[data-state='failed'] .tk-m-cross {
  stroke-dashoffset: 0;
}
@keyframes tk-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .tk-mark svg[data-state='active'],
  .hb.app .tk-sec li[data-arrived] > .tk-row {
    animation: none;
  }
}
/* o painel da tarefa aberta */
.hb.app .tk-side {
  position: relative;
  flex: 0 0 var(--tk-side-w, 420px);
  display: flex;
  min-width: 0;
  border-inline-start: 1px solid var(--border);
  background: var(--hb-canvas);
}
.hb.app .tk-side[hidden] {
  display: none;
}
.hb.app .tk-resizer.app-br-rz {
  display: block;
}
.hb.app .tk-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hb.app .tk-ph {
  height: 39px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px 0 11px;
  border-bottom: 1px solid var(--border);
}
.hb.app .tk-ph h2 {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .tk-pb {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-3);
}
.hb.app .tk-pb:hover:not(:disabled) {
  background: var(--border);
  color: var(--text);
}
.hb.app .tk-pb:disabled {
  color: var(--text-4);
  cursor: default;
}
.hb.app .tk-msgs {
  flex: 1;
  min-height: 0;
}
.hb.app .tk-reply.hb-composer {
  flex: none;
  background: var(--surface-2);
}
:root[data-tk-resizing] {
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}
.hb.app .app-task-none {
  padding: 40px 12px;
  text-align: center;
}
/* Em tela estreita o painel cobre a tela toda e a lista perde o que não cabe. */
@media (max-width: 760px) {
  .hb.app .tk-scroll {
    padding: 0 12px 24px;
  }
  .hb.app .tk-side {
    position: absolute;
    inset: 0;
    flex: none;
    width: auto;
    z-index: 5;
    border-inline-start: 0;
  }
  .hb.app .tk-resizer.app-br-rz {
    display: none;
  }
  .hb.app .tk-reply textarea,
  .hb.app .tk-composer textarea {
    font-size: 16px;
  }
  .hb.app .tk-status {
    max-width: 96px;
  }
}

/* ---------------------------------------------------------------- agenda
   O calendário das rotinas. Medidas do app de referência (26/11/2026): painel de 16/24/24, dia de 12rem (7rem no mês)
   com borda de 1, raio 12 e 6 de respiro; vez de 28 de altura e raio 6; "a seguir" de 17rem com raio 12 e 12 de respiro. */
.hb.app .ag {
  container-type: inline-size;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px 24px;
  overflow-y: auto;
  background: var(--hb-canvas);
  color: var(--hb-text);
}
.hb.app .ag-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hb.app .ag-zone,
.hb.app .ag-note {
  margin: 0;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .ag-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.hb.app .ag-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.hb.app .ag-range {
  margin: 0 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hb.app .ag-today:disabled {
  opacity: 0.5;
}
.hb.app .ag-tabs {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--hb-chip-bg);
}
.hb.app .ag-tab {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .ag-tab[aria-selected='true'] {
  background: var(--hb-raised);
  color: var(--hb-text);
  box-shadow: 0 0 0 1px var(--border);
}
.hb.app .ag-clock {
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--hb-warn-soft);
  color: var(--hb-warn-text);
  font-size: 13px;
}
.hb.app .ag-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  align-items: start;
  gap: 16px;
  min-width: 0;
  position: relative;
}
.hb.app .ag-grid {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.hb.app .ag-weekdays,
.hb.app .ag-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .ag-weekdays {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .ag-weekdays > * {
  padding-inline: 7px;
}
.hb.app .ag-day {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 12rem;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-card);
}
.hb.app .ag[data-view='month'] .ag-day {
  min-height: 7rem;
}
.hb.app .ag-day[data-past] {
  background: transparent;
}
.hb.app .ag-day[aria-current='date'] {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
}
.hb.app .ag-day[data-outside] {
  border-color: var(--divider);
  background: transparent;
}
.hb.app .ag-day[data-opens] {
  cursor: pointer;
}
.hb.app .ag-day[data-opens]:hover,
.hb.app .ag-day[data-slot] {
  border-color: var(--text-3);
}
.hb.app .ag-day-h {
  margin: 0;
}
.hb.app .ag-day-b {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .ag-day-b:hover {
  background: var(--hb-hover);
}
.hb.app .ag-day-b strong {
  color: var(--hb-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hb.app .ag-day[aria-current='date'] .ag-day-b strong {
  color: var(--accent-ink);
}
.hb.app .ag-day[data-outside] .ag-day-b strong {
  color: var(--hb-muted);
  font-weight: 400;
}
.hb.app .ag[data-view='month'] .ag-day-b > span {
  display: none;
}
.hb.app .ag-runs,
.hb.app .ag-entries {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .ag-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
}
.hb.app .ag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}
.hb.app .ag-mark[data-status='paused'] {
  color: var(--hb-muted);
}
.hb.app .ag-mark[data-status='skipped'] {
  color: var(--hb-muted);
}
.hb.app .ag-mark[data-status='failed'] {
  color: var(--red);
}
.hb.app .ag-mark[data-status='completed'] {
  color: var(--green);
}
.hb.app .ag-faces {
  display: flex;
}
.hb.app .ag-run {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'mark time faces' 'name name name';
  align-items: center;
  gap: 2px 4px;
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--hb-card);
  font-size: 13px;
  text-align: start;
}
.hb.app .ag-run:hover {
  background: var(--hb-hover);
}
.hb.app .ag-run .ag-mark {
  grid-area: mark;
}
.hb.app .ag-run-time {
  grid-area: time;
  color: var(--hb-muted);
  font-variant-numeric: tabular-nums;
}
.hb.app .ag-run-name {
  grid-area: name;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.hb.app .ag-run .ag-faces {
  grid-area: faces;
}
.hb.app .ag-run[data-status='paused'],
.hb.app .ag-entry[data-status='paused'] {
  opacity: 0.6;
}
.hb.app .ag-run[data-status='paused'] {
  outline: 1px dashed var(--hb-grouped-line);
  outline-offset: -1px;
  background: transparent;
}
.hb.app .ag-run[data-status='failed'] {
  background: var(--hb-danger-soft);
}
.hb.app .ag-run[data-status='completed'] .ag-run-name,
.hb.app .ag-run[data-status='skipped'] .ag-run-name {
  color: var(--hb-muted);
}
.hb.app .ag[data-view='month'] .ag-run {
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-areas: 'mark time name';
}
.hb.app .ag[data-view='month'] .ag-run-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .ag[data-view='month'] .ag-run .ag-faces {
  display: none;
}
.hb.app .ag-more {
  justify-self: start;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .ag-more:hover {
  background: var(--hb-hover);
}
.hb.app .ag-add {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--hb-muted);
  opacity: 0;
}
.hb.app .ag-day:hover .ag-add,
.hb.app .ag-day[data-slot] .ag-add,
.hb.app .ag-add:focus-visible {
  opacity: 1;
}
.hb.app .ag-add:hover {
  background: var(--hb-hover);
}
.hb.app .ag-upcoming,
.hb.app .ag-dayview {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.hb.app .ag-upcoming {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.hb.app .ag-upcoming h3,
.hb.app .ag-hour h3 {
  margin: 0;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .ag-hour {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.hb.app .ag-hour h3 {
  padding-top: 8px;
  font-variant-numeric: tabular-nums;
}
.hb.app .ag-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.hb.app .ag-entry-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: start;
}
.hb.app .ag-entry-main:hover,
.hb.app .ag-entry-bot:hover {
  background: var(--hb-hover);
}
.hb.app .ag-entry-text {
  display: grid;
  min-width: 0;
}
.hb.app .ag-entry-name,
.hb.app .ag-entry-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .ag-entry-name {
  font-size: 14px;
}
.hb.app .ag-entry-meta {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .ag-entry[data-status='failed'] .ag-entry-meta {
  color: var(--red);
}
.hb.app .ag-entry-bot {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.hb.app .ag-day-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
}
.hb.app .ag-day-add:hover {
  background: var(--hb-hover);
}
.hb.app .ag-dayview[data-opens] .ag-hour {
  cursor: pointer;
}
.hb.app .ag-cut {
  margin-top: -8px;
}
.hb.app .ag-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.hb.app .ag-sk {
  display: block;
  border-radius: 6px;
  background: var(--hb-chip-bg);
}
.hb.app .ag-sk-h {
  height: 24px;
}
.hb.app .ag-sk-r {
  height: 32px;
}
/* O cartão da rotina nova, ao lado de onde a pessoa tocou: 360 de largura, raio 12 e 12 de respiro. */
.hb.app .ag-card {
  position: fixed;
  z-index: 40;
  width: 360px;
  max-width: calc(100vw - 16px);
  max-height: min(680px, calc(100vh - 32px));
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: var(--hb-pick-bg);
  box-shadow: var(--shadow-pop);
}
.hb.app .ag-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.hb.app .ag-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.hb.app .ag-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}
.hb.app .ag-field > span {
  margin-inline-start: 8px;
  color: var(--text-2);
  font-weight: 500;
}
.hb.app .ag-field .hb-input {
  width: 100%;
}
.hb.app .ag-field textarea {
  min-height: 72px;
  resize: vertical;
}
.hb.app .ag-field .rt-when {
  margin: 0;
}
.hb.app .ag-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.hb.app .ag-err {
  margin: 0;
  color: var(--red);
  font-size: 12.5px;
  font-style: normal;
}
.hb.app .ag-card-acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
/* O calendário vazio: o mês apagado no fundo e o convite no meio. */
.hb.app .ag-empty {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 320px;
}
.hb.app .ag-empty > * {
  grid-area: 1 / 1;
}
.hb.app .ag-empty-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  mask-image:
    radial-gradient(ellipse 38% 40% at 50% 50%, transparent 62%, #000 100%),
    radial-gradient(ellipse 72% 78% at 50% 50%, #000 50%, transparent 100%);
  mask-composite: intersect;
}
.hb.app .ag-empty-cell {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  border-inline-start: 1px solid var(--border);
  color: var(--hb-muted);
  font-size: 14px;
}
.hb.app .ag-empty-cell[data-outside] {
  opacity: 0.45;
}
.hb.app .ag-empty-cell[data-today] {
  color: var(--hb-text);
  font-weight: 600;
}
.hb.app .ag-empty-pitch {
  position: relative;
  z-index: 1;
  display: grid;
  place-self: center;
  justify-items: center;
  gap: 12px;
  max-width: 34rem;
  padding: 24px;
  text-align: center;
}
.hb.app .ag-empty-pitch h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hb.app .ag-empty-pitch p {
  margin: 0;
  color: var(--hb-muted);
  font-size: 15px;
  line-height: 1.5;
}
.hb.app .ag-empty-go {
  width: 100%;
  max-width: 22rem;
  height: 36px;
  margin-top: 4px;
}
.hb.app .ag-pick {
  display: grid;
  gap: 2px;
  min-width: 14rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: var(--hb-pick-bg);
  box-shadow: var(--shadow-pop);
}
.hb.app .ag-pick-i {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13.5px;
  text-align: start;
}
.hb.app .ag-pick-i:hover {
  background: var(--hb-hover);
}
@container (max-width: 1160px) {
  .hb.app .ag-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container (max-width: 920px) {
  .hb.app .ag-week {
    grid-template-columns: minmax(0, 1fr);
  }
  .hb.app .ag-day,
  .hb.app .ag[data-view='month'] .ag-day {
    min-height: 0;
    grid-template-columns: 5rem minmax(0, 1fr);
    align-items: start;
  }
  .hb.app .ag-day > :not(.ag-day-h) {
    grid-column: 2;
  }
  .hb.app .ag-week-sk .ag-day {
    grid-template-columns: minmax(0, 1fr);
  }
  .hb.app .ag-week-sk .ag-day > * {
    grid-column: 1;
  }
  .hb.app .ag-weekdays,
  .hb.app .ag-day[data-outside] {
    display: none;
  }
  .hb.app .ag[data-view='month'] .ag-day-b > span {
    display: inline;
  }
  .hb.app .ag-empty-cells {
    display: none;
  }
  .hb.app .ag-empty-pitch h3 {
    font-size: 20px;
  }
}
@media (max-width: 760px) {
  .hb.app .ag {
    padding: 12px 12px 16px;
  }
}

/* ---------------------------------------------------------------- biblioteca de arquivos
   A tela de Arquivos, da prancha 21: a coluna da esquerda com os bots, em cima o nome, a busca e os três
   jeitos de ver, embaixo os tipos com a conta de cada um, e então os arquivos. Medidas conferidas no app de
   referência em 25/11/2026: nome em 18/24 em 600; busca em min(320px, 40vw); fileira da esquerda com 30 px
   de altura e canto de 8 px; filtros em pílula com 4 px entre eles; fileira da lista com quadrado de 36 px,
   12 px de vão, nome em 14/20 e o resto em 13/18; blocos pequenos em colunas de 168 px com a miniatura em
   4 por 3; blocos grandes em até 4 colunas de 220 px, a imagem na proporção dela e o cartão com 12 px. */
.hb.app .hb-win[data-view='library'] {
  --side-col: min(max(var(--side-w), 220px), 42vw);
}
.hb.app .hb-win[data-view='library'] .hb-side {
  padding: 16px 8px 0;
  align-items: stretch;
}
.hb-win[data-view='library'] .hb-side-h,
.hb-win[data-view='library'] .app-list,
.hb-win[data-view='library'] .app-resizer {
  display: none;
}
.hb-win[data-view='library'] .app-side-set {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* o miolo: a página que rola (cartões das pastas, tipos e arquivos) e, por cima, a barra da seleção */
.hb.app .app-lib {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hb.app .app-lib-views {
  display: flex;
  align-items: center;
  gap: 2px;
}
.hb.app .app-lib-ks {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.hb.app .app-lib-k {
  flex: none;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-lib-k:hover {
  background: var(--hb-card-2);
}
.hb.app .app-lib-k[aria-pressed='true'] {
  background: var(--hb-card);
  color: var(--hb-text);
}
.hb.app .app-lib-k b {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--hb-muted);
}
.hb.app .app-lib-day {
  margin: 8px 0 4px;
  padding: 0 4px;
  font-weight: 500;
}
.hb.app .app-lib-day:first-child {
  margin-top: 0;
}
.hb.app .app-lib-cut {
  padding: 16px 4px 0;
  color: var(--hb-muted);
  font-size: 13px;
}

/* a lista: uma fileira por arquivo */
.hb.app .app-lib-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hb.app .app-lib-rows .app-lib-f {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: start;
}
.hb.app .app-lib-rows .app-lib-f:hover {
  background: var(--hb-card-2);
}
.hb.app .app-lib-sq {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--hb-card);
  color: var(--hb-muted);
}
.hb.app img.app-lib-img {
  object-fit: cover;
}
.hb.app .app-lib-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hb.app .app-lib-n {
  min-width: 0;
  overflow: hidden;
  color: var(--hb-text);
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-lib-m {
  min-width: 0;
  overflow: hidden;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* blocos pequenos: a miniatura em 4 por 3 e o nome embaixo */
.hb.app .app-lib-cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px 8px;
}
.hb.app .app-lib-cells .app-lib-f {
  display: flex;
  min-width: 0;
  flex-direction: column;
  text-align: start;
}
.hb.app .app-lib-th {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
  color: var(--hb-muted);
}
.hb.app .app-lib-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb.app .app-lib-cells .app-lib-n {
  margin-top: 6px;
  padding: 0 4px;
  font-weight: 500;
}
.hb.app .app-lib-cells .app-lib-m {
  padding: 0 4px;
}
.hb.app .app-lib-cells .app-lib-f:hover .app-lib-th {
  border-color: var(--hb-muted);
}

/* blocos grandes: as colunas se enchem sozinhas, e a imagem fica na proporção dela */
.hb.app .app-lib-tiles {
  columns: 220px 4;
  column-gap: 8px;
}
/* Com JavaScript, cada bloco vai para a coluna mais baixa (conta em library.js, como no app de referência);
   sem ele ficam as colunas do CSS acima. */
.hb.app .app-lib-tiles[data-placed] {
  position: relative;
  height: var(--lib-mosaic-h, auto);
  columns: auto;
}
.hb.app .app-lib-tiles[data-placed] > .lib-item {
  position: absolute;
  top: var(--lib-tile-y, 0);
  inset-inline-start: var(--lib-tile-x, 0);
  width: var(--lib-tile-w, 100%);
  margin-bottom: 0;
}
.hb.app .app-lib-tiles .app-lib-f {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  break-inside: avoid;
  text-align: start;
}
.hb.app .app-lib-pic,
.hb.app .app-lib-card {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
}
.hb.app .app-lib-pic {
  height: auto;
}
.hb.app .app-lib-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.hb.app .app-lib-card .app-lib-n {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.hb.app .app-lib-card .app-lib-n svg {
  flex: none;
  color: var(--hb-muted);
}
.hb.app .app-lib-tiles .app-lib-f:hover :is(.app-lib-pic, .app-lib-card) {
  border-color: var(--hb-muted);
}

/* ---- biblioteca: coluna da esquerda (medidas do app de referência, 26/11/2026): busca de 32 px com borda e
   canto de 8 px; fileiras de 30 px com canto de 12 px, 18 px de recuo por nível e a conta à direita; títulos de
   seção de 28 px; ações da fileira de 24 px que aparecem sob o ponteiro e trocam de lugar com a conta. */
.hb-win[data-view='library'] .app-side-set {
  padding: 0;
}
.hb.app .lib-side {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hb.app .lib-side-search {
  flex: none;
  padding: 11px 11px 6px;
}
.hb.app .lib-side-field {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  background: var(--hb-card);
  color: var(--hb-muted);
}
.hb.app .lib-side-field:focus-within {
  border-color: var(--border-strong);
  background: var(--hb-raised);
}
.hb.app .lib-side-field svg {
  flex: none;
}
.hb.app .lib-side-field input {
  min-width: 0;
  flex: 1;
  height: auto;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hb-text);
  font-size: 14px;
  line-height: 18px;
}
.hb.app .lib-side-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 4px 8px 16px;
}
.hb.app .lib-side-list,
.hb.app .lib-branch {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .lib-trunc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .lib-row {
  --lib-start: 8px;
  --lib-end: 8px;
  position: relative;
  display: flex;
  min-width: 0;
}
.hb.app .lib-row[data-count] {
  --lib-end: 36px;
}
html:not(.lib-dragging) .hb.app .lib-row[data-actions]:is(:hover, :focus-within) {
  --lib-end: 60px;
}
.hb.app .lib-row-main {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 30px;
  align-items: center;
  gap: 8px;
  padding-inline: calc(var(--lib-start) + var(--d, 0) * 18px) var(--lib-end);
  border-radius: 12px;
  color: var(--hb-muted);
  font-size: 14px;
  font-weight: 400;
  text-align: start;
}
.hb.app .lib-row-main:hover {
  background: var(--hb-card-2);
  color: var(--hb-text);
}
.hb.app .lib-row-main[aria-current='page'] {
  background: var(--hb-card);
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .lib-row-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--hb-muted);
}
.hb.app .lib-row-main[aria-current='page'] .lib-row-icon {
  color: var(--hb-text);
}
.hb.app .lib-row .hc-bot {
  flex: none;
}
.hb.app .lib-row-toggle {
  position: absolute;
  z-index: 1;
  top: 5px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  inset-inline-start: calc(var(--lib-start) + var(--d, 0) * 18px + 1px);
  background: var(--hb-raised);
  color: var(--hb-muted);
  opacity: 0;
}
.hb.app .lib-row:is(:hover, :focus-within) .lib-row-toggle,
.hb.app .lib-row-toggle:focus-visible {
  opacity: 1;
}
.hb.app .lib-row-toggle svg {
  transition: transform 120ms ease-out;
}
.hb.app .lib-row-toggle[aria-expanded='true'] svg {
  transform: rotate(90deg);
}
.hb.app .lib-row-count {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 10px;
  display: flex;
  align-items: center;
  color: var(--hb-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.hb.app .lib-row-actions {
  position: absolute;
  top: 3px;
  inset-inline-end: 4px;
  display: flex;
  gap: 2px;
  opacity: 0;
}
.hb.app .lib-row:is(:hover, :focus-within) .lib-row-actions {
  opacity: 1;
}
html:not(.lib-dragging) .hb.app .lib-row:is(:hover, :focus-within):has(.lib-row-actions) .lib-row-count {
  opacity: 0;
}
.hb.app .lib-row-actions > .hc-bot {
  margin: 3px;
}
.hb.app .lib-row-action {
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--hb-muted);
}
.hb.app .lib-row-action:is(:hover, :focus-visible, [aria-expanded='true'], [aria-pressed='true']) {
  color: var(--hb-text);
}
.hb.app .lib-row-edit {
  display: flex;
  min-width: 0;
  height: 28px;
  flex: 1;
  align-items: center;
  gap: 8px;
  margin-block: 1px;
  margin-inline-start: calc(var(--d, 0) * 18px);
  padding-inline: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--hb-card);
  color: var(--hb-muted);
}
.hb.app .lib-row-edit:focus-within {
  border-color: var(--hb-text);
}
.hb.app .lib-row-input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--hb-text);
  font: inherit;
  font-size: 14px;
}
.hb.app .lib-branch {
  position: relative;
  padding-top: 1px;
}
.hb.app .lib-viewer {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hb-canvas);
  outline: none;
}
.hb.app .lib-viewer > .fp {
  min-height: 0;
  flex: 1;
}
.hb.app .lib-collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 120ms ease-out;
}
.hb.app .lib-collapse[data-collapsed] {
  grid-template-rows: 0fr;
  opacity: 0;
}
.hb.app .lib-collapse > * {
  min-height: 0;
  overflow: hidden;
}
.hb.app .lib-branch::before {
  position: absolute;
  top: 2px;
  bottom: 4px;
  width: 1px;
  background: var(--hb-line);
  content: '';
  inset-inline-start: calc(8px + (var(--d, 1) - 1) * 18px + 10px);
}
.hb.app .lib-section {
  display: flex;
  flex-direction: column;
}
.hb.app .lib-section-head {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 4px;
}
.hb.app .lib-section-toggle {
  display: inline-flex;
  height: 24px;
  align-items: center;
  gap: 4px;
  padding-inline: 4px 6px;
  border-radius: 8px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .lib-section-toggle:hover {
  color: var(--hb-text);
}
.hb.app .lib-section-toggle svg {
  opacity: 0;
  transition: transform 120ms ease-out, opacity 120ms ease;
}
.hb.app .lib-section-head:hover svg,
.hb.app .lib-section-toggle:focus-visible svg,
.hb.app .lib-section-toggle[aria-expanded='false'] svg {
  opacity: 1;
}
.hb.app .lib-section-toggle[aria-expanded='false'] svg {
  transform: rotate(-90deg);
}
.hb.app .lib-section-action {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  color: var(--hb-muted);
}
.hb.app .lib-section-action:is(:hover, :focus-visible, [aria-expanded='true']) {
  background: var(--hb-card);
  color: var(--hb-text);
}
.hb.app .lib-side-more {
  display: flex;
  width: 100%;
  height: 30px;
  align-items: center;
  gap: 8px;
  margin-top: 1px;
  padding-inline: 8px;
  border-radius: 12px;
  color: var(--hb-muted);
  font-size: 14px;
  text-align: start;
}
.hb.app .lib-side-more svg {
  width: 20px;
  flex: none;
}
.hb.app .lib-side-more:is(:hover, :focus-visible, [aria-expanded='true']) {
  background: var(--hb-card);
  color: var(--hb-text);
}

/* ---- em cima: o caminho (nível, nome) e as ferramentas */
.hb.app .lib-path,
.hb.app .lib-tools {
  display: flex;
  min-width: 0;
  align-items: center;
}
.hb.app .lib-path {
  gap: 2px;
}
.hb.app .lib-tools {
  flex: none;
  gap: 6px;
}
.hb.app .lib-crumb,
.hb.app .lib-path-cur {
  display: flex;
  min-width: 0;
  height: 28px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 18px;
}
.hb.app .lib-crumb {
  flex: 0 1 auto;
  color: var(--hb-muted);
}
.hb.app .lib-crumb:hover {
  background: var(--hb-card-2);
  color: var(--hb-text);
}
.hb.app .lib-path-cur {
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .lib-path-cur > svg {
  flex: none;
  color: var(--hb-muted);
}
.hb.app .lib-path > svg {
  flex: none;
  color: var(--hb-muted);
}

/* ---- o miolo: a página, com 11 px em cima e 16 dos lados e 12 de vão (a medida com pastas) */
.hb.app .lib-page {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 11px 16px calc(24px + env(safe-area-inset-bottom));
}
.hb.app .lib-page[data-pill] {
  padding-bottom: 96px;
}
.hb.app .lib-page > * {
  flex: none;
}
.hb.app .lib-page .app-lib-ks {
  min-height: 32px;
}
.hb.app .app-lib-views .hb-ic[aria-pressed='true'] {
  background: var(--hb-card-2);
  color: var(--hb-text);
}
.hb.app .lib-empty {
  margin: 0;
  color: var(--hb-muted);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .file-list-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
}

/* ---- cartões das pastas: 164 px de altura, a frente de 60 px por cima de até três folhas */
.hb.app .lib-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 16px 12px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.hb.app .lib-card {
  --lib-back: var(--hb-card);
  --lib-front: var(--hb-raised);
  position: relative;
  min-width: 0;
  transition: opacity 120ms ease;
}
.hb.app .lib-card-main,
.hb.app .lib-card-edit {
  position: relative;
  display: flex;
  width: 100%;
  height: 164px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  padding: 14px 0 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: start;
  white-space: normal;
}
.hb.app .lib-card-edit {
  border: 1px solid transparent;
}
.hb.app .lib-card-main::before,
.hb.app .lib-card-main::after,
.hb.app .lib-card-edit::before,
.hb.app .lib-card-edit::after {
  position: absolute;
  background: var(--lib-back);
  content: '';
  transition: background-color 120ms ease;
}
.hb.app .lib-card-main::before,
.hb.app .lib-card-edit::before {
  inset: 14px 0 0;
  border-radius: 0 14px 14px;
}
.hb.app .lib-card-main::after,
.hb.app .lib-card-edit::after {
  top: 0;
  width: 42%;
  height: 22px;
  border-radius: 14px 14px 0 0;
  inset-inline-start: 0;
}
.hb.app .lib-card-art {
  position: absolute;
  z-index: 1;
  height: 96px;
  inset: 30px 12px auto;
  color: var(--hb-muted);
}
.hb.app .lib-sheet {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: grid;
  width: 56%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--bg-side);
  border-radius: 12px;
  background: var(--hb-card-2);
  color: var(--hb-muted);
  transform: translateX(-50%);
  transition: transform 200ms ease-out;
}
.hb.app .lib-sheet:first-child {
  z-index: 2;
}
.hb.app .lib-sheet:nth-child(2) {
  transform: translateX(-88%) rotate(-7deg);
}
.hb.app .lib-sheet:nth-child(3) {
  transform: translateX(-12%) rotate(7deg);
}
.hb.app .lib-sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb.app .lib-card-front {
  position: relative;
  z-index: 3;
  display: flex;
  min-width: 0;
  height: 60px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-top: 2px solid var(--bg-side);
  border-radius: 14px;
  background: var(--lib-front);
  transition: background-color 120ms ease;
}
.hb.app .lib-card-front:not(:has(.hc-bot)) {
  padding-inline-end: 36px;
}
.hb.app .lib-card-text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.hb.app .lib-card-name {
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .lib-card-detail {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .lib-card-input {
  width: calc(100% + 14px);
  min-width: 0;
  height: 28px;
  margin-inline-start: -7px;
  padding-inline: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--hb-card);
  color: var(--hb-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
.hb.app .lib-card-front:has(.lib-card-input):not(:has(.hc-bot)) {
  padding-inline-end: 12px;
}
.hb.app .lib-card-menu {
  position: absolute;
  z-index: 4;
  bottom: 16px;
  inset-inline-end: 8px;
  color: var(--hb-muted);
  opacity: 0;
}
html:not(.lib-dragging) .hb.app .lib-card:is(:hover, :focus-within) .lib-card-menu,
.hb.app .lib-card-menu[aria-expanded='true'] {
  opacity: 1;
}
.hb.app .lib-card:has(.lib-card-menu[aria-expanded='true']) .hc-bot,
html:not(.lib-dragging) .hb.app .lib-card:is(:hover, :focus-within) .hc-bot {
  opacity: 0;
}
.hb.app .lib-card:not(.lib-card-new)[data-drop='into'],
.hb.app .lib-card [data-drop='into'] {
  --lib-back: color-mix(in srgb, var(--hb-drop-text) 14%, var(--hb-card));
  --lib-front: color-mix(in srgb, var(--hb-drop-text) 18%, var(--hb-raised));
}
.hb.app .lib-card-new {
  --lib-front: transparent;
}
.hb.app .lib-card-new .lib-card-edit::before {
  border: 1px dashed var(--border-strong);
  background: transparent;
}
.hb.app .lib-card-new .lib-card-edit::after {
  display: none;
}
.hb.app .lib-card-new .lib-card-art {
  display: grid;
  place-items: center;
}
.hb.app .lib-card-new .lib-card-front {
  justify-content: center;
  border-top: 0;
  padding-inline-end: 12px;
}
.hb.app .lib-card-new .lib-card-name {
  color: var(--hb-muted);
}
.hb.app .lib-card-new[data-drop='into'] .lib-card-edit::before {
  border-style: solid;
  border-color: var(--hb-drop-edge);
  background: var(--hb-drop-soft);
}
.hb.app .lib-card-new[data-drop='into'] :is(.lib-card-art, .lib-card-name) {
  color: var(--hb-drop-text);
}
html:not(.lib-dragging) .hb.app .lib-card-main:hover .lib-sheet:first-child,
.hb.app .lib-card[data-drop='into'] .lib-sheet:first-child {
  transform: translate(-50%, -8px);
}
html:not(.lib-dragging) .hb.app .lib-card-main:hover .lib-sheet:nth-child(2),
.hb.app .lib-card[data-drop='into'] .lib-sheet:nth-child(2) {
  transform: translate(-96%, -4px) rotate(-10deg);
}
html:not(.lib-dragging) .hb.app .lib-card-main:hover .lib-sheet:nth-child(3),
.hb.app .lib-card[data-drop='into'] .lib-sheet:nth-child(3) {
  transform: translate(-4%, -4px) rotate(10deg);
}
html:not(.lib-dragging) .hb.app .lib-card:not(.lib-card-new):hover {
  --lib-front: var(--hb-card-2);
}

/* ---- arquivos: o invólucro de cada um leva a marca de seleção e o menu */
.hb.app .lib-item {
  position: relative;
  min-width: 0;
}
.hb.app .lib-item[data-dragging=''] {
  opacity: 0.4;
}
.hb.app .app-lib-tiles .lib-item {
  break-inside: avoid;
  margin-bottom: 8px;
}
.hb.app .app-lib-tiles .lib-item > .app-lib-f {
  margin-bottom: 0;
}
.hb.app .app-lib-cells .lib-item > .app-lib-f {
  width: 100%;
}
.hb.app .app-lib-rows .lib-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline-end: 4px;
  border-radius: 8px;
}
.hb.app .app-lib-rows .lib-item:is(:hover, :focus-within) {
  background: var(--hb-card-2);
}
.hb.app .app-lib-rows .lib-item > .app-lib-f {
  flex: 1;
  min-width: 0;
}
.hb.app .app-lib-rows .lib-item > .app-lib-f:hover {
  background: transparent;
}
.hb.app .lib-item-menu {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  color: var(--hb-text);
  opacity: 0;
}
.hb.app .lib-item-menu-row {
  position: static;
  flex: none;
  color: var(--hb-muted);
}
.hb.app .lib-item:is(:hover, :focus-within) .lib-item-menu,
.hb.app .lib-item-menu[aria-expanded='true'] {
  opacity: 1;
}
.hb.app .lib-over,
.hb.app .lib-item[data-kind='image'] .lib-item-menu {
  background: var(--hb-sheet);
}
.hb.app .lib-mark {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--hb-card);
  color: transparent;
  pointer-events: none;
}
.hb.app .lib-mark[data-on='true'] {
  border-color: var(--hb-drop-text);
  background: var(--hb-drop-text);
  color: var(--hb-badge-fg);
}
.hb.app .lib-mark-tile {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
}
.hb.app .app-lib-rows .lib-item > .app-lib-f .lib-mark {
  margin-inline-end: -4px;
}
.hb.app .lib-item[data-selected='true'] {
  background: var(--hb-drop-soft);
}
.hb.app .app-lib-tiles .lib-item[data-selected='true'],
.hb.app .app-lib-cells .lib-item[data-selected='true'] {
  background: transparent;
}
.hb.app .app-lib-tiles .lib-item[data-selected='true'] :is(.app-lib-pic, .app-lib-card),
.hb.app .app-lib-cells .lib-item[data-selected='true'] .app-lib-th {
  border-color: var(--hb-drop-text);
  outline: 1px solid var(--hb-drop-text);
  outline-offset: -2px;
}
.hb.app .lib-source {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hb.app .lib-source svg {
  flex: none;
}
.hb.app .app-lib-cells .app-lib-f {
  width: 100%;
}

/* ---- a barra da seleção: 44 px, em pílula, no pé da página */
.hb.app .lib-pill-wrap {
  position: absolute;
  z-index: 5;
  bottom: 24px;
  left: 50%;
  translate: -50% 0;
  max-width: calc(100% - 24px);
}
.hb.app .lib-pill {
  position: relative;
  display: flex;
  box-sizing: border-box;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-inline: 6px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--hb-raised);
  box-shadow: inset 0 0 0 1px var(--hb-line);
  color: var(--hb-text);
  white-space: nowrap;
}
.hb.app .lib-pill[data-tone='danger'] {
  border-color: var(--hb-danger);
  background: linear-gradient(var(--hb-danger-soft), var(--hb-danger-soft)), var(--hb-raised);
}
.hb.app .lib-pill-progress {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  background: var(--hb-drop-soft);
  transition: width 200ms ease-out;
}
.hb.app .lib-pill-count,
.hb.app .lib-pill-text {
  position: relative;
  padding-inline: 8px;
  font-size: 14px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.hb.app .lib-pill-status {
  padding-inline: 12px;
}
.hb.app .lib-pill-rule {
  width: 1px;
  height: 18px;
  margin-inline: 2px;
  background: var(--hb-line);
}
.hb.app .lib-pill-b {
  gap: 6px;
  border-radius: 999px;
}
.hb.app .lib-pill-del {
  color: var(--red) !important;
}

/* ---- menus da biblioteca */
.hb.app .lib-pop {
  z-index: 60;
}
.hb.app .lib-mi-wrap {
  position: relative;
}
.hb.app .lib-mi-wrap > button.app-menu-i {
  width: 100%;
  padding-inline-start: calc(10px + var(--d, 0) * 16px);
}
.hb.app .lib-menu-end {
  margin-inline-start: auto;
  color: var(--hb-muted);
  display: inline-flex;
}
.hb.app .lib-danger,
.hb.app .lib-danger svg {
  color: var(--red) !important;
}
.hb.app .lib-sub {
  position: absolute;
  top: -6px;
  left: calc(100% + 4px);
  max-height: min(360px, calc(100dvh - 64px));
  overflow-y: auto;
}
.hb.app .lib-sub.lib-sub-left {
  left: auto;
  right: calc(100% + 4px);
}
.hb.app .lib-sub[hidden] {
  display: none;
}

/* ---- arrastar */
html.lib-dragging body * {
  cursor: grabbing;
  user-select: none;
}
.hb.app [data-drop-off] {
  opacity: 0.4;
}
.hb.app .lib-row [data-drop='into'] {
  background: var(--hb-drop-soft);
  color: var(--hb-text);
  outline: 1px solid var(--hb-drop-edge);
  outline-offset: -1px;
}
.hb.app .lib-crumb[data-drop='into'] {
  background: var(--hb-drop-soft);
  outline: 1px solid var(--hb-drop-edge);
}
/* A linha de posição: soltar uma pasta na faixa de cima ou de baixo de uma linha da coluna a põe antes ou depois dela. */
.hb.app .lib-row[data-drop='before'],
.hb.app .lib-row[data-drop='after'] {
  position: relative;
}
.hb.app .lib-row[data-drop='before']::before,
.hb.app .lib-row[data-drop='after']::after {
  content: '';
  position: absolute;
  inset-inline: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--blue);
  pointer-events: none;
}
.hb.app .lib-row[data-drop='before']::before {
  top: -1px;
}
.hb.app .lib-row[data-drop='after']::after {
  bottom: -1px;
}
/* Depois de esperar sobre um cartão ou o caminho, a página mostra a pasta e vira o lugar de soltura. */
.hb.app .lib-page[data-drop='into'] {
  outline: 1px solid var(--hb-drop-edge);
  outline-offset: -1px;
  background: var(--hb-drop-soft);
}
/* O retângulo de marcar arquivos e a página enquanto ele é arrastado. */
.hb.app .lib-page[data-marquee] {
  cursor: default;
  user-select: none;
}
.lib-marquee {
  position: fixed;
  z-index: 3;
  border: 1px solid var(--hb-drop-edge);
  border-radius: 4px;
  background: var(--hb-drop-soft);
  pointer-events: none;
}
.lib-chip {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: flex;
  max-width: 280px;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--hb-raised);
  color: var(--hb-text);
  font-size: 13px;
  pointer-events: none;
}
.lib-chip[data-drop=''] {
  border-color: var(--hb-drop-edge);
}
.lib-chip[data-blocked=''] {
  border-color: var(--hb-danger);
}
.lib-chip-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
.lib-chip-line > svg {
  flex: none;
  color: var(--hb-muted);
}
.lib-chip-line > .lib-trunc,
.lib-chip-line > span {
  min-width: 0;
}
.lib-chip-to,
.lib-chip-to > svg {
  color: var(--hb-drop-text);
}
.lib-chip-why {
  color: var(--hb-muted);
}
.lib-chip-why > svg {
  color: var(--hb-danger);
}
.lib-trunc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Em tela estreita a coluna da esquerda vira a tela inteira, como nos Ajustes. */
@media (max-width: 760px) {
  .hb.app .hb-win[data-view='library'] {
    --side-col: 1fr;
  }
  .hb.app .lib-page {
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
  }
  .hb.app .lib-tools {
    gap: 2px;
  }
  .hb.app .lib-crumb:not(:last-of-type) {
    display: none;
  }
  .hb.app .lib-page .app-lib-ks {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hb.app .lib-item-menu {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .lib-sheet,
  .hb.app .lib-card,
  .hb.app .lib-pill-progress,
  .hb.app .lib-collapse,
  .hb.app .lib-section-toggle svg,
  .hb.app .lib-row-toggle svg {
    transition: none;
  }
}

/* ---------------------------------------------------------------- uso
   A tela de Uso: em cima o título e os controles (medidor do computador, bot, período, atualizar); embaixo o total com a
   parte de cada provedor, o gráfico por dia, os totais e as quebras. Medidas conferidas no app de referência em
   26/11/2026: cabeça com 16 px de cima e de baixo e 24 dos lados, fio embaixo; corpo em até 1200 px com 24 de respiro e
   32 entre as partes (a partir de 850 px de largura: 32 e 48, e o resumo ao lado do gráfico em 0,8fr e 1,5fr); total em
   clamp(32px, 3,5cqi, 44px) peso 600; controles de 32 px com canto de 8, 14 px peso 500; gráfico de 280 px; tabelas em
   15 px com 8 e 12 de respiro. Séries por provedor em `--hb-series-*` (escuro e claro). */
:root:not([data-theme='light']) {
  --hb-series-tess: #42a0ff;
  --hb-series-claude: #ff9a5c;
  --hb-series-codex: #c7a2f2;
  --hb-series-other: var(--text-3);
  --hb-series-x1: #d55181;
  --hb-series-x2: #199e70;
  --hb-series-x3: #c98500;
  --hb-series-x4: #3987e5;
  --hb-series-single: var(--accent);
}
:root[data-theme='light'] {
  --hb-series-tess: #0064c8;
  --hb-series-claude: #c2561a;
  --hb-series-codex: #7c45c0;
  --hb-series-other: var(--text-3);
  --hb-series-x1: #c4336b;
  --hb-series-x2: #148a61;
  --hb-series-x3: #a86f00;
  --hb-series-x4: #2f74c9;
  --hb-series-single: var(--accent);
}
.hb.app .hb-win[data-view='usage'] {
  --side-col: 0px;
}
.hb.app .hb-win[data-view='usage'] .hb-side {
  visibility: hidden;
  padding: 0;
}
.hb-win[data-view='usage'] .hb-side > *,
.hb-win[data-view='usage'] .app-resizer {
  display: none;
}
.hb.app .us {
  container-type: inline-size;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.hb.app .us [data-s='tess'] {
  --c: var(--hb-series-tess);
}
.hb.app .us [data-s='claude'] {
  --c: var(--hb-series-claude);
}
.hb.app .us [data-s='codex'] {
  --c: var(--hb-series-codex);
}
.hb.app .us [data-s='other'] {
  --c: var(--hb-series-other);
}
.hb.app .us [data-s='x1'] {
  --c: var(--hb-series-x1);
}
.hb.app .us [data-s='x2'] {
  --c: var(--hb-series-x2);
}
.hb.app .us [data-s='x3'] {
  --c: var(--hb-series-x3);
}
.hb.app .us [data-s='x4'] {
  --c: var(--hb-series-x4);
}
.hb.app .us [data-s='single'] {
  --c: var(--hb-series-single);
}
.hb.app .us-head {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--divider);
}
.hb.app .us-title {
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.hb.app .us-ctl {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-inline-start: auto;
}
.hb.app .us-sel {
  height: 32px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
.hb.app .us-sel:hover,
.hb.app .us-sel[aria-expanded='true'] {
  background: var(--hb-ctl-hover);
}
.hb.app .us-ref {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
}
.hb.app .us-ref:hover:not(:disabled) {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
.hb.app .us-ref:disabled {
  opacity: 0.42;
}
.hb.app .us-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.hb.app .us-body > * {
  flex: none;
}
.hb.app .us h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 550;
}
.hb.app .us-notice {
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--hb-card);
  color: var(--text-2);
  font-size: 14px;
}
.hb.app .us-notice .hb-btn {
  margin-top: 12px;
}
.hb.app .us-loading {
  color: var(--text-3);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hb.app .us-ph {
  flex: 0 0 100%;
  height: 300px;
  margin-top: 16px;
  border-radius: 8px;
  background: var(--hb-card);
}
.hb.app .us-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.hb.app .us-summary {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.hb.app .us-hero {
  margin: 0 0 4px;
  font-size: clamp(2rem, 3.5cqi, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}
.hb.app .us-sub,
.hb.app .us-foot {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .us-provs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hb.app .us-prov-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}
.hb.app .us-prov-n {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
.hb.app .us-prov-n .mp-mark {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}
.hb.app .us-prov-h strong {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.hb.app .us-prov p {
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .us-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--c, var(--text-3));
}
.hb.app .us-trend {
  min-width: 0;
}
.hb.app .us-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.hb.app .us-daily-b {
  height: 24px;
}
.hb.app .us-chart {
  position: relative;
  height: 300px;
  min-width: 0;
  border-radius: 8px;
}
.hb.app .us-chart:focus-visible {
  outline: 2px solid var(--hb-ring, var(--text-3));
  outline-offset: 2px;
}
.hb.app .us-svg {
  display: block;
  max-width: 100%;
  overflow: visible;
}
.hb.app .us-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.hb.app .us-ytick,
.hb.app .us-xtick {
  fill: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.hb.app .us-seg {
  fill: var(--c);
}
.hb.app .us-col {
  fill: var(--hb-ctl-hover);
}
.hb.app .us-col[hidden] {
  display: none;
}
.hb.app .us-nochart {
  height: 300px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .us-body {
  transition: opacity 0.12s ease;
}
.hb.app .us-body[data-stale='true'] {
  opacity: 0.5;
}
.hb.app .us-tip {
  position: absolute;
  z-index: 2;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--hb-mp-edge-strong);
  border-radius: 8px;
  background: var(--hb-raised);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  line-height: 18px;
  pointer-events: none;
}
.hb.app .us-tip[hidden] {
  display: none;
}
.hb.app .us-tip-d {
  margin-bottom: 4px;
  color: var(--text-3);
}
.hb.app .us-tip-r {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb.app .us-tip-r .mp-mark {
  width: 14px;
  height: 14px;
  flex: none;
  fill: currentColor;
}
.hb.app .us-tip-n {
  flex: 1;
}
.hb.app .us-tip-v {
  font-variant-numeric: tabular-nums;
}
.hb.app .us-tip-sum {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--divider);
  font-weight: 550;
}
.hb.app .us-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 16px 24px;
  margin: 16px 0 0;
}
.hb.app .us-totals dt {
  margin-bottom: 4px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .us-totals dd {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hb.app .us-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--hb-tile);
}
.hb.app .us-tab {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .us-tab:hover {
  color: var(--text);
}
.hb.app .us-tab[aria-selected='true'] {
  background: var(--hb-card-2);
  color: var(--text);
}
/* O destaque que desliza (250 ms, a curva do app de referência): com ele na barra, a aba marcada não pinta o próprio fundo. */
.hb.app .us-tabs {
  position: relative;
}
.hb.app .us-tabs[data-pill] .us-tab {
  position: relative;
  z-index: 1;
  background: transparent;
}
.hb.app .us-pill {
  position: absolute;
  top: 2px;
  left: 0;
  z-index: 0;
  width: 0;
  height: 28px;
  border-radius: 6px;
  background: var(--hb-card-2);
  pointer-events: none;
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1), width 250ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hb.app .us-pill[data-still] {
  transition: none;
}
.hb.app .us-table-in {
  animation: us-table-in 150ms ease-in-out both;
}
@keyframes us-table-in {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .us-pill {
    transition: none;
  }
  .hb.app .us-table-in {
    animation: none;
  }
}
.hb.app .us-table {
  overflow-x: auto;
}
.hb.app .us-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.hb.app .us-table th,
.hb.app .us-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-strong);
  border-bottom-color: color-mix(in srgb, var(--border-strong) 35%, transparent);
  text-align: end;
  white-space: nowrap;
  font-weight: 400;
}
.hb.app .us-table th:first-child {
  padding-inline-start: 0;
  text-align: start;
  white-space: normal;
}
.hb.app .us-table td:last-child,
.hb.app .us-table th:last-child {
  padding-inline-end: 0;
}
.hb.app .us-table thead th {
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .us-table td {
  color: var(--text-2);
}
.hb.app .us-table td.us-t-empty {
  padding-inline: 0;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  white-space: normal;
}
.hb.app .us-table table:focus {
  outline: none;
}
.hb.app .us-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 10rem;
  overflow-wrap: anywhere;
}
.hb.app .us-name .mp-mark {
  width: 16px;
  height: 16px;
  flex: none;
}
.hb.app .us-wf {
  width: 16px;
  height: 16px;
  display: inline-flex;
  flex: none;
  color: var(--text-3);
}
.hb.app .us-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}
.hb.app .us-foot summary {
  width: fit-content;
  cursor: pointer;
}
.hb.app .us-foot details p {
  max-width: 72ch;
  margin: 12px 0 0;
  line-height: 1.6;
}
/* o medidor do computador */
.hb.app .us-mach {
  position: relative;
  display: inline-flex;
}
.hb.app .us-mtrig {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 14px;
}
.hb.app .us-mtrig:hover,
.hb.app .us-mtrig[aria-expanded='true'] {
  background: var(--hb-ctl-hover);
}
.hb.app .us-mi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hb.app .us-mv {
  font-variant-numeric: tabular-nums;
}
.hb.app .us-mi[data-tone='warning'] {
  color: var(--hb-warn-text);
}
.hb.app .us-mi[data-tone='danger'] {
  color: var(--red);
}
.hb.app .us-ring {
  width: 16px;
  height: 16px;
  flex: none;
}
.hb.app .us-ring circle {
  fill: none;
  stroke-width: 6;
}
.hb.app .us-ring-t {
  stroke: var(--text-4);
  stroke-opacity: 0.35;
}
.hb.app .us-ring-i {
  stroke: var(--text-2);
}
.hb.app .us-ring-i[data-tone='warning'] {
  stroke: var(--hb-warn);
}
.hb.app .us-ring-i[data-tone='danger'] {
  stroke: var(--hb-danger);
}
.hb.app .us-mpop {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 50%;
  width: 280px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  transform: translateX(-50%);
  border: 1px solid var(--hb-mp-edge-strong);
  border-radius: 8px;
  background: var(--hb-raised);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .us-mpop-t {
  font-size: 15px;
  font-weight: 600;
}
.hb.app .us-mpop-f {
  margin: 0 -16px -16px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--divider);
}
.hb.app button.us-mstore {
  display: block;
  width: calc(100% + 32px);
  text-align: left;
  background: transparent;
  border-width: 1px 0 0;
  border-radius: 0 0 8px 8px;
  color: inherit;
  cursor: pointer;
}
.hb.app button.us-mstore:hover {
  background: var(--hb-card-2);
}
.hb.app .us-md-v svg {
  margin-left: 4px;
  vertical-align: -2px;
  color: var(--text-3);
}
.hb.app .us-md {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hb.app .us-md-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hb.app .us-md-n {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.hb.app .us-md-n svg {
  color: var(--text-2);
}
.hb.app .us-md-v {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.hb.app .us-md[data-tone='warning'] .us-md-v {
  color: var(--hb-warn-text);
}
.hb.app .us-md[data-tone='danger'] .us-md-v {
  color: var(--red);
}
.hb.app .us-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--hb-tile);
  overflow: hidden;
}
.hb.app .us-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--text-2);
}
.hb.app .us-md[data-tone='warning'] .us-bar i {
  background: var(--hb-warn);
}
.hb.app .us-md[data-tone='danger'] .us-bar i {
  background: var(--hb-danger);
}
.hb.app .us-md-s {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
@container (min-width: 850px) {
  .hb.app .us-overview {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.5fr);
    gap: 48px;
  }
  .hb.app .us-body {
    padding: 32px 48px;
    gap: 48px;
  }
}
@container (max-width: 480px) {
  .hb.app .us-hero {
    font-size: 32px;
  }
  .hb.app .us-body {
    padding: 16px;
  }
  .hb.app .us-head {
    padding: 12px;
  }
  .hb.app .us-ctl {
    margin-inline-start: 0;
    justify-content: flex-start;
  }
  .hb.app .us-sec-h {
    flex-wrap: wrap;
  }
  .hb.app .us-mpop {
    left: 0;
    transform: none;
  }
}

/* ------------------------------------------------------------------ canais (pranchas 6 e 14)
   Medidas conferidas no app de referência (25/11/2026): quadrante de quatro casas com passo de 38% e cara
   de 54% do tamanho, quadro de 440px com 16px de folga, lista de quem entra com teto de 352px, linha de
   8px por 16px, busca de 36px e pé com fio em cima. */
.app-chan-f {
  --pit: calc(var(--sz) * 0.38);
  display: grid;
  grid-template: repeat(2, var(--pit)) / repeat(2, var(--pit));
  place-content: center;
  place-items: center;
  width: var(--sz);
  min-width: var(--sz);
  height: var(--sz);
  flex: none;
}
.app-chan-f > :only-child {
  grid-area: 1 / 1 / 3 / 3;
}
/* Dois lado a lado ocupam as duas linhas; o terceiro fica centrado embaixo. */
.app-chan-f[data-n='2'] > * {
  grid-row: 1 / span 2;
}
.app-chan-f[data-n='3'] > :last-child {
  grid-column: 1 / span 2;
}
.app-chan-more {
  display: grid;
  box-sizing: border-box;
  min-width: calc(var(--sz) * 0.46);
  height: calc(var(--sz) * 0.46);
  padding-inline: 4px;
  place-items: center;
  border: 1px solid var(--hb-line);
  border-radius: 999px;
  background: var(--hb-card-2);
  color: var(--hb-muted);
  font-size: max(10px, calc(var(--sz) * 0.24));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* o alto da conversa de um canal: nome e assunto na mesma linha de base */
.app-chan-hd {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}
.app-chan-hn {
  overflow: hidden;
  flex: 0 1 auto;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chan-sub {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chan-bar {
  margin: 0;
  padding: 8px 16px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
/* Em cima do campo do canal (conferido no código do app de referência): a faixa de quem trabalha agora e a
   barra das respostas paradas. */
.app-chan-live {
  flex: none;
}
.app-chan-live:empty {
  display: none;
}
.app-chan-act {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 0 8px 10px;
}
/* A faixa mora no fim da rolagem das mensagens: ela só passa a largura da coluna, sem deixar o quadro das falas encolher. */
.app-chan-act-w {
  flex: none;
}
.app-chan-act-f {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}
/* Os bonecos se sobrepõem em 8 e entram um por um */
.app-chan-act-f > .hc-bot + .hc-bot {
  margin-inline-start: -8px;
}
.app-chan-act-t {
  flex: 0 1 auto;
  min-width: 0;
  margin-inline-start: 8px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chan-act-l {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
}
/* O verbo tem um brilho que passa por cima do texto: uma faixa mais apagada que anda da direita para a esquerda. */
@media (prefers-reduced-motion: no-preference) {
  .app-chan-act-s {
    background: linear-gradient(90deg, var(--text) 0 38%, var(--text-3) 50%, var(--text) 62% 100%) 100% 0 / 260% 100% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: app-chan-shine 2.25s linear infinite;
  }
}
@keyframes app-chan-shine {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .app-chan-act {
    animation: app-chan-act-in 280ms cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
  }
}
@keyframes app-chan-act-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* A barra das respostas paradas: encosta por baixo do campo, com os cantos de cima mais redondos */
.app-chan-stop {
  position: relative;
  max-height: 35dvh;
  margin: -24px 12px -12px;
  padding-bottom: 12px;
  overflow-y: auto;
  border-radius: 12px 12px 8px 8px;
  background: var(--hb-stop-bg);
  box-shadow: 0 0 0 1px var(--hb-stop-edge);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--hb-stop-fg);
}
.hb.app .app-chan-live ~ .hb-composer {
  position: relative;
  z-index: 1;
}
.app-chan-stop-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
}
.app-chan-stop-r + .app-chan-stop-r {
  border-top: 1px solid var(--hb-stop-edge);
}
.app-chan-stop-t {
  flex: 1 1 24ch;
  min-width: 0;
}
.app-chan-stop-s,
.app-chan-stop-w {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}
.app-chan-stop-s {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chan-stop-w {
  overflow-wrap: anywhere;
}
.app-chan-stop-a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hb.app .hb-btn.hb-sm.card-b24.app-chan-stop-b {
  padding: 0 8px;
  background: var(--hb-stop-btn-bg) !important;
  color: var(--hb-stop-btn-fg) !important;
  font-size: 14px;
}
.hb.app .hb-btn.hb-sm.card-b24.app-chan-stop-b:hover {
  background: var(--hb-stop-btn-bg) !important;
  color: var(--hb-stop-btn-fg) !important;
  box-shadow: 0 0 0 1px var(--hb-stop-btn-edge);
}

/* o assunto do canal na conversa vazia, antes das instruções */
.app-hello-t {
  color: var(--hb-text);
}

/* quadro de canal novo (prancha 14) */
.hb.app .app-chan-dlg {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  gap: 16px;
  padding: 0;
  overflow: hidden;
}
.app-chan-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
}
.app-chan-h strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.01em;
}
.app-chan-fld {
  display: grid;
  gap: 6px;
  margin-inline: 16px;
}
.app-chan-l {
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .app-chan-bad {
  margin-inline: 16px;
}
.app-chan-who {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}
.app-chan-add {
  margin: 0 16px 8px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .app-chan-q {
  height: 36px;
  margin-inline: 16px;
  gap: 8px;
  padding-inline: 12px;
  border-radius: 8px;
}
.app-chan-list {
  min-height: 0;
  max-height: 352px;
  margin-top: 8px;
  overflow-y: auto;
  scrollbar-width: none;
}
.app-chan-list::-webkit-scrollbar {
  display: none;
}
/* Criar canal: a altura da lista de bots anda quando a busca muda o que aparece (300 ms, como no app de referência). */
.app-chan-resize {
  transition: height 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .app-chan-resize {
    transition: none;
  }
}
.app-chan-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}
.app-chan-pick:hover {
  background: var(--hb-card);
}
.app-chan-pick:has(.check:checked) {
  background: var(--accent-soft);
}
.app-chan-nm {
  display: flex;
  overflow: hidden;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}
.app-chan-n {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 20px;
}
.app-chan-r {
  overflow: hidden;
  min-width: 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chan-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 12px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}
.app-chan-none > svg {
  margin-bottom: 4px;
  color: var(--hb-muted);
}
.app-chan-none p {
  margin: 0;
  color: var(--hb-text);
  font-size: 14px;
  line-height: 20px;
}
.app-chan-foot {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  border-top: 1px solid var(--hb-line);
}
/* O Criar é o botão de tamanho normal do app de referência: 36 de altura, 16 de lado, 15 médio. */
.hb.app .app-chan-foot .hb-btn {
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}
.hb.app .app-chan-h .hb-ic {
  width: 32px;
  height: 32px;
}
.app-chan-pick .check {
  width: 16px;
  height: 16px;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .app-chan-pick {
    transition: none;
  }
}

/* Fala assinada, dentro de um canal: o nome em cima e o boneco à esquerda, encostado embaixo na fala.
   Medidas conferidas no app de referência (25/11/2026): coluna de 36px para um boneco de 32px, 8px até a
   fala, 4px entre o nome e ela, e o nome com 12px de folga. */
.app-turn.app-signed {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 4px;
  align-items: end;
}
.app-signed > .app-said-n {
  grid-area: 1 / 2;
  min-width: 0;
  padding-inline: 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.app-signed > .app-said-f {
  display: inline-flex;
  grid-area: 2 / 1;
  align-self: end;
  justify-content: center;
}
.app-signed > .hb-answer {
  grid-area: 2 / 2;
  max-width: 100%;
}
.app-signed > .app-ask {
  grid-area: 3 / 2;
}

/* O alto da conversa de um canal não é botão (ainda não há ficha de canal para abrir), então repete as
   medidas do nome do bot: a mesma altura e a mesma folga. */
.hb.app .app-chan-who-t {
  display: inline-flex;
  min-width: 0;
  height: 28px;
  align-items: center;
  gap: 10px;
  margin-left: -6px;
  padding: 0 8px 0 6px;
  font-weight: 500;
}

/* A ficha do canal. Medidas do app de referência (conferido em 26/11/2026): instruções com 120 de altura, as
   ações num grupo de linhas de 64, e os membros por último, em linhas de 36 com a coroa e o "Remover" que só
   aparecem com o mouse em cima (ou com o foco). */
.hb.app .chan-close {
  width: 28px;
  height: 28px;
  justify-self: end;
  color: var(--text-2);
}
.hb.app .chan-close:hover {
  color: var(--text);
}
/* A cara do canal quando é um ícone (o app de referência: quadrado de canto 12 numa linha, 20 na ficha, 55% de
   desenho, fundo de 26% da cor sobre o fundo de controle) e o quadro que a escolhe. */
.app-chan-pic {
  display: grid;
  box-sizing: border-box;
  width: var(--sz);
  min-width: var(--sz);
  height: var(--sz);
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in oklab, var(--pic) 26%, var(--hb-card-2));
  color: color-mix(in oklab, var(--pic) 78%, var(--text));
}
.app-chan-pic > svg {
  width: 55%;
  height: 55%;
}
.card-id .app-chan-pic {
  border-radius: 20px;
}
.hb.app .look-c .app-chan-pic-bare {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 12px;
}
.hb.app .look-c .app-chan-pic-bare > svg {
  width: 18px;
  height: 18px;
}
.hb.app button.chan-face {
  border-radius: 20px;
}
.look-pop .look-h.look-hs {
  min-height: 40px;
}
.chan-icons {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* A foto do bot: redonda, no lugar e no tamanho do boneco, sem corpo nem olhos desenhados por cima. */
.hc-bot.hb-photo {
  overflow: hidden;
  border-radius: 50%;
  background: var(--hb-card-2);
  filter: none;
}
.hc-bot.hb-photo::before,
.hc-bot.hb-photo::after {
  content: none;
}
.hc-bot.hb-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.look-pop .look-up-p.look-up-round {
  border-radius: 50%;
}
.look-pop .look-up:disabled {
  cursor: wait;
  opacity: 0.58;
}
/* A foto do canal: a imagem enche o quadrado da cara; no quadro do lápis, a linha de enviar mostra a de agora. */
.app-chan-img > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.look-pop .look-up {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 20px);
  margin: 2px 10px 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.look-pop .look-up:hover {
  background: var(--hb-card-2);
}
.look-pop .look-up-p {
  display: grid;
  flex: none;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--hb-card-2);
  color: var(--text-2);
}
.look-pop .look-up-p > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.look-pop .look-up-t {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.look-pop .look-up-t strong {
  font-size: 14px;
  font-weight: 500;
}
.look-pop .look-up-t small {
  color: var(--text-2);
  font-size: 12px;
  line-height: 16px;
}
.chan-count.chan-count-over {
  color: var(--red);
}
.chan-count-err {
  display: block;
  margin: 2px 0 0 8px;
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
}
.card-field textarea.card-in.chan-instr[aria-invalid='true'] {
  border-color: var(--red);
}
.card-field textarea.card-in.chan-instr {
  height: 120px;
  min-height: 120px;
}
.chan-count {
  display: block;
  margin: 6px 0 0 8px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.chan-count[hidden] {
  display: none;
}
/* Rodada J1: navegador, chave das memórias e linha Memórias do canal (SwitchField e SettingsLinkGroup da referência: texto 14/20 médio, nota 13/18, linhas de 42, margem 7 em cima e 22 embaixo). */
.chan-card > .card-field:has(.ps) {
  margin: 0 0 17px;
}
.chan-keep {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.chan-keep-t {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.chan-keep-l {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.chan-keep-d {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .chan-links.hb-group {
  margin: 7px 0 22px;
  border-width: 1px 0;
  border-radius: 0;
  background: transparent;
}
.chan-links .hb-lrow {
  min-height: 42px;
}
.chan-ctx {
  display: grid;
  margin: 0 0 25px;
  overflow: hidden;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
}
.chan-item {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.chan-item + .chan-item {
  border-top: 1px solid var(--hb-line);
}
.chan-it {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 2px;
}
.chan-it > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.chan-it > span {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .chan-item .hb-btn.hb-sm {
  flex: none;
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
}
.chan-sec {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.chan-h {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.chan-list {
  display: flex;
  flex-direction: column;
}
.chan-row,
.hb.app .chan-add {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
}
.chan-row:hover,
.hb.app .chan-add:hover:not(:disabled) {
  background: var(--hb-hover);
}
.chan-nm {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chan-acts {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.hb.app .chan-crown {
  width: 24px;
  height: 24px;
  color: var(--hb-muted);
}
.hb.app .chan-crown[aria-pressed='true'] {
  color: var(--text);
}
.hb.app .chan-out.hb-btn.hb-sm {
  height: 24px;
  padding: 0 8px;
  font-size: 15px;
}
.hb.app .chan-out.hb-btn,
.hb.app .chan-danger.hb-btn {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}
.hb.app .chan-item .hb-btn.hb-quiet {
  border: 1px solid var(--hb-line);
  background: var(--hb-card-2) !important;
  color: var(--text-2) !important;
}
.hb.app .chan-item .hb-btn,
.hb.app .chan-out.hb-btn {
  font-weight: 500;
}
.hb.app .chan-add {
  justify-content: flex-start;
  color: var(--hb-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  text-align: start;
  cursor: pointer;
}
.hb.app .chan-add > svg {
  flex: none;
  margin-inline: 4px;
}
.hb.app .chan-add:disabled {
  cursor: default;
  opacity: 0.42;
}
@media (hover: hover) and (pointer: fine) {
  .hb.app .chan-out,
  .hb.app .chan-crown[aria-pressed='false'] {
    opacity: 0;
    transition: opacity 120ms ease-out;
  }
  .hb.app .chan-row:hover :is(.chan-out, .chan-crown),
  .hb.app .chan-row:focus-within :is(.chan-out, .chan-crown) {
    opacity: 1;
  }
}

/* O menu "Adicionar membro": busca em cima e, embaixo, quem ainda não está no canal. */
.app-menu.chan-pop {
  width: max-content;
  min-width: 220px;
  max-width: min(288px, calc(100vw - 16px));
  gap: 4px;
}
.hb.app .chan-pop-q {
  height: 36px;
  flex: none;
  gap: 8px;
  padding-inline: 12px;
  border-radius: 8px;
}
.chan-pop-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.chan-pop-list::-webkit-scrollbar {
  display: none;
}
.hb.app button.chan-pop-o {
  display: flex;
  min-height: 32px;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
  text-align: start;
  white-space: nowrap;
}
.hb.app button.chan-pop-o:hover,
.hb.app button.chan-pop-o:focus-visible {
  background: var(--hb-menu-hover);
}
.chan-pop-none {
  margin: 0;
  padding: 12px 10px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}

/* ---------------------------------------------------------------- a Loja
   Pranchas 10 e 15. À esquerda os três tipos de coisa da loja (só bots funciona); em cima a busca; no miolo
   os bots por categoria e, abrindo um, a página dele. Medidas conferidas no app de referência em 25/11/2026:
   coluna da esquerda em max(280px, 220px) com borda de 1 px; miolo com 24 px de vão e o conteúdo em
   min(100%, 880px) centrado; fileira com boneco de 40 px, 12 px de vão, nome em 15 px médio, linha de baixo
   em 14 px apagado, canto de 12 px e fundo no passar o mouse; fileiras em colunas de no mínimo 320 px, com
   24 px entre colunas e 4 px entre linhas; a página de um bot com o cartão em canto de 14 px. */
.hb.app .hb-win[data-view='store'] {
  --side-col: min(max(var(--side-w), 220px), 42vw);
}
.hb.app .hb-win[data-view='store'] .hb-side {
  padding: 16px 8px 0;
  align-items: stretch;
}
.hb-win[data-view='store'] .hb-side-h,
.hb-win[data-view='store'] .app-list,
.hb-win[data-view='store'] .app-resizer {
  display: none;
}
.hb-win[data-view='store'] .app-side-set {
  display: flex;
  flex: 1;
  min-height: 0;
}
.hb.app .app-store-side {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  padding-bottom: 16px;
}
.hb.app .app-store-side-title {
  margin: 0 0 12px;
  padding: 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.hb.app .hb-lrow.app-store-nav {
  min-height: 30px;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--hb-muted);
  font-size: 14px;
}
.hb.app .app-store-nav[aria-current='page'] {
  background: var(--hb-card);
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .app-store-nav[aria-disabled='true'] {
  opacity: 0.55;
}
.hb.app .app-store-nav > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-store-nav b {
  flex: none;
  color: var(--hb-muted);
  font-size: 12.5px;
  font-weight: 400;
}
.hb.app .app-store-browse-head {
  display: grid;
  gap: 24px;
}
.hb.app .app-store-browse-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.hb.app .app-store-browse-head p {
  margin: 4px 0 0;
  color: var(--text-2);
}
.hb.app .app-store-browse-head .app-store-q {
  width: 100%;
}

/* o miolo */
.hb.app .app-store {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  padding: 40px 24px 32px;
}
.hb.app .app-store > * {
  width: min(100%, 880px);
  margin-inline: auto;
}
.hb.app .app-store-none {
  padding-top: 40px;
  text-align: center;
}
.hb.app .app-store-g {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hb.app .app-store-gt {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}
.hb.app .app-store-gt span {
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.hb.app .app-store-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  column-gap: 24px;
  row-gap: 4px;
}
.hb.app .app-store-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
}
.hb.app .app-store-row:hover {
  background: var(--hb-card-2);
}
.hb.app .app-store-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
}
.hb.app .app-store-face,
.hb.app .app-store-copy {
  pointer-events: none;
}
.hb.app .app-store-face {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}
.hb.app .app-store-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.hb.app .app-store-n {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.hb.app .app-store-n b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-store-by {
  flex: none;
  color: var(--hb-muted);
  font-size: 12.5px;
}
.hb.app .app-store-l {
  overflow: hidden;
  color: var(--hb-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-store-act {
  position: relative;
  z-index: 2;
  flex: none;
}
.hb.app .app-store-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hb-muted);
  font-size: 13.5px;
}
.hb.app .app-store-done svg {
  color: var(--green);
}

/* a página de um bot da loja (prancha 15) */
.hb.app .app-store-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hb.app .app-store-crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-store-crumbs svg {
  flex: none;
  opacity: 0.7;
}
.hb.app .app-store-crumbs > span {
  color: var(--hb-text);
}
.hb.app .app-store-crumb {
  border: 0;
  padding: 2px 4px;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.hb.app .app-store-crumb:hover {
  background: var(--hb-card-2);
  color: var(--hb-text);
}
.hb.app .app-store-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hb.app .app-store-hn {
  flex: 1;
  min-width: 0;
}
.hb.app .app-store-hn h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}
.hb.app .app-store-hn p {
  margin: 4px 0 0;
  color: var(--hb-muted);
  font-size: 14px;
}
.hb.app .app-store-ha {
  flex: none;
}
.hb.app .app-store-err {
  margin: 0;
  color: var(--red);
  font-size: 13.5px;
}
.hb.app .app-store-box {
  padding: 16px;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
}
.hb.app .app-store-box h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.hb.app .app-store-box p {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-store-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 12px 0 0;
}
.hb.app .app-store-facts dt {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-store-facts dd {
  margin: 0;
  font-size: 13px;
}
@media (max-width: 760px) {
  .hb.app .app-store {
    padding: 16px 16px 24px;
    gap: 20px;
  }
  .hb.app .app-store-rows {
    grid-template-columns: 1fr;
  }
  .hb.app .app-store-head {
    flex-wrap: wrap;
  }
  .hb.app .app-store-ha {
    flex: 1 0 100%;
  }
  .hb.app .app-store-ha .hb-btn {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ importar (prancha 16)
   As três origens seguem a prancha: linha de no mínimo 76px, canto de 14px, 12px por 16px de respiro, 10px
   entre elas, ícone de 18px, texto de 13.5px e seta de 15px. A conferência e o resultado seguem as medidas
   conferidas no app de referência (25/11/2026): 32px entre os blocos, número grande de 32px/600, legenda de
   13px, lista com fio de 1px e canto de 12px, linha de no mínimo 52px com 12px por 16px de respiro e 12px de
   vão, boneco de 28px, título de 14px/500, linha de baixo de 13px, selo de 22px e rodapé à direita. */
.hb.app .app-store-tabs {
  display: none;
}
.hb.app button.app-store-nav {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.hb.app button.app-store-nav:hover {
  background: var(--hb-card);
  color: var(--hb-text);
}
.hb.app .app-imp {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}
.hb.app .app-imp.app-imp-review {
  gap: 32px;
  max-width: 880px;
}
.hb.app .app-imp-h h3 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 600;
}
.hb.app .app-imp-h h4,
.hb.app .app-imp-none h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.hb.app .app-imp-h p,
.hb.app .app-imp-none p {
  margin: 6px 0 0;
  color: var(--hb-muted);
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-imp-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hb.app .app-imp-opt {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
  color: var(--hb-text);
  font: inherit;
  text-align: left;
}
.hb.app button.app-imp-opt {
  cursor: pointer;
}
.hb.app button.app-imp-opt:hover {
  background: var(--hb-card-2);
}
.hb.app .app-imp-opt[aria-disabled='true'] {
  opacity: 0.55;
}
.hb.app .app-imp-opt > svg,
.hb.app .app-imp-opt > b {
  flex: none;
  color: var(--hb-muted);
  font-size: 12.5px;
  font-weight: 400;
}
.hb.app .app-imp-opt .hb-opt-t {
  font-size: 13.5px;
  line-height: 19px;
}
.hb.app .app-imp-oi {
  flex: none;
  display: inline-flex;
  color: var(--hb-muted);
}
.hb.app .app-imp-wait {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hb-muted);
  font-size: 14px;
}
.hb.app .app-imp-none {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
}
.hb.app .app-imp-l {
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-imp-path {
  display: flex;
  gap: 8px;
}
.hb.app .app-imp-path + .app-imp-path {
  margin-top: 10px;
}
.hb.app .app-imp-path .hb-input {
  flex: 1;
  min-width: 0;
  background: var(--hb-canvas);
  color: var(--hb-text);
  font: inherit;
  font-size: 14px;
}

/* a conferência */
.hb.app .app-imp-sum strong {
  display: block;
  font-size: 32px;
  font-weight: 600;
  line-height: 38px;
}
.hb.app .app-imp-sum p {
  margin: 6px 0 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-imp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hb.app .app-imp-prof {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  background: var(--hb-card);
  overflow: hidden;
}
.hb.app .app-imp-prof > * + * {
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-imp-prof[data-on='false'] > .app-imp-row,
.hb.app .app-imp-prof[data-on='false'] > .app-imp-items {
  opacity: 0.5;
}
.hb.app .app-imp-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.hb.app .app-imp-face {
  flex: none;
  display: inline-flex;
}
.hb.app .app-imp-it {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hb.app .app-imp-it > b {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.hb.app .app-imp-it > span {
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.hb.app .app-imp-row > .app-imp-it > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-imp-badge {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--hb-card-2);
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.hb.app .hb-btn.app-imp-tg {
  flex: none;
  height: 28px;
  gap: 4px;
  padding: 0 8px;
  font-size: 13px;
}
.hb.app .app-imp-again {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 16px;
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-imp-items {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .app-imp-items > * + * {
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-imp-item {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.hb.app .app-imp-item[data-state='skip'] .app-imp-it > b {
  color: var(--hb-muted);
}
.hb.app .app-imp-st {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hb-muted);
  font-size: 13px;
  white-space: nowrap;
}
.hb.app .app-imp-st[data-state='import'] svg {
  color: var(--green);
}
.hb.app .app-imp-allow {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.hb.app .app-imp-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.hb.app .app-imp-go {
  gap: 8px;
}

/* o resultado */
.hb.app .app-imp-end-h {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hb.app .app-imp-end-h strong {
  font-size: 20px;
  line-height: 26px;
}
.hb.app .app-imp-ok {
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--hb-card-2);
  color: var(--green);
}
.hb.app .app-imp-ok[data-state='none'] {
  color: var(--hb-muted);
}
.hb.app button.app-imp-bot {
  width: 100%;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hb.app button.app-imp-bot:hover {
  background: var(--hb-card-2);
}
.hb.app button.app-imp-bot > svg {
  flex: none;
  color: var(--hb-muted);
}
.hb.app .app-imp-st-h {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.hb.app .app-imp-warn p {
  margin: 12px 0 0;
}
.hb.app .app-imp-warn ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
@media (max-width: 760px) {
  /* No celular a coluna da esquerda não aparece: as páginas que funcionam vêm em cima do miolo. */
  /* As páginas da loja numa fileira só: o que não couber rola de lado dentro da fileira, nunca a página. */
  .hb.app .app-store-tabs {
    display: flex;
    flex: none;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hb.app .app-store-tabs::-webkit-scrollbar {
    display: none;
  }
  .hb.app .app-store-tabs button.app-store-nav {
    flex: none;
    width: auto;
    padding: 0 12px;
  }
  .hb.app .app-store-tabs .app-store-nav[aria-current='page'] {
    background: var(--hb-card);
  }
  .hb.app .app-imp-item,
  .hb.app .app-imp-row {
    flex-wrap: wrap;
  }
  .hb.app .app-imp-path {
    flex-direction: column;
  }
  .hb.app .app-imp-foot .hb-btn {
    flex: 1;
  }
}

/* transferência (prancha 16, "Outro computador com o Hyper Bots"): usa as peças da conferência do Importar.
   Só é daqui a linha inteira que marca a caixa, o botão que é um endereço e o aviso de que o download saiu. */
.hb.app label.app-trf-opt {
  cursor: pointer;
}
.hb.app label.app-trf-opt > .check {
  flex: none;
}
/* A linha de baixo conta o que vai ou o que vem: cabe inteira, em vez de cortar com reticências. */
.hb.app .app-trf-opt > .app-imp-it > span,
.hb.app .app-trf-row > .app-imp-it > span {
  overflow: visible;
  white-space: normal;
}
.hb.app a.app-imp-go {
  text-decoration: none;
}
.hb.app .app-trf-took svg {
  flex: none;
  color: var(--green);
}

/* apps (prancha 26): os servidores de ferramentas (MCP) na loja.
   Medidas conferidas no app de referência: quadro de 40 px na fileira, 24 px entre as partes, linhas de ajuste
   com no mínimo 64 px e 16 px de vão, listas do formulário em grade com 8 px de vão, comando em letra de código
   de 13 px, servidor desligado a 55% e caixas de pergunta com min(440px, tela menos 48px). */
.hb.app .app-apps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hb.app .app-apps-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.hb.app .app-apps-h h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
}
.hb.app .app-apps-h p {
  margin: 4px 0 0;
  max-width: 620px;
  color: var(--hb-muted);
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-apps-h .hb-btn {
  flex: none;
}
.hb.app .app-apps-wait {
  display: grid;
  place-items: center;
  min-height: 120px;
}
.hb.app .app-apps-none {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 40px 16px;
  border: 1px dashed var(--hb-line);
  border-radius: 14px;
  color: var(--hb-muted);
  text-align: center;
}
.hb.app .app-apps-none h4 {
  margin: 6px 0 0;
  color: var(--hb-text);
  font-size: 15px;
  font-weight: 600;
}
.hb.app .app-apps-none p {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-apps-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--hb-card-2);
  color: var(--hb-text);
}
.hb.app .app-apps-tile.lg {
  width: 48px;
  height: 48px;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
}
.hb.app .app-apps-item .app-store-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hb-muted);
  pointer-events: none;
}
.hb.app .app-apps-item[data-off='true'] .app-store-face,
.hb.app .app-apps-item[data-off='true'] .app-store-copy,
.hb.app .app-apps-page[data-off='true'] .app-store-head > :not(.app-store-ha),
.hb.app .app-apps-page[data-off='true'] .app-apps-code {
  opacity: 0.55;
}
.hb.app .app-apps-st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.hb.app .app-apps-st[data-tone='muted'] {
  color: var(--hb-muted);
}
.hb.app .app-apps-st[data-tone='plain'] {
  color: var(--hb-text);
}
.hb.app .app-apps-st[data-tone='good'] {
  color: var(--green);
}
.hb.app .app-apps-st[data-tone='warn'] {
  color: var(--amber);
}
.hb.app .app-apps-st[data-tone='bad'] {
  color: var(--red);
}
.hb.app .app-apps-page,
.hb.app .app-apps-form {
  gap: 24px;
}
.hb.app .app-apps-code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hb-side);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.hb.app .app-store-box .app-apps-sub {
  margin-top: 8px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
}
.hb.app .app-apps-set {
  padding-bottom: 0;
}
.hb.app .app-apps-set h4 {
  margin-bottom: 0;
}
.hb.app .app-apps-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 0;
}
.hb.app .app-apps-row + .app-apps-row,
.hb.app .app-apps-detail + .app-apps-row {
  border-top: 1px solid var(--hb-line);
}
.hb.app label.app-apps-row {
  cursor: pointer;
}
.hb.app .app-apps-rc {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.hb.app .app-apps-rc > strong {
  font-size: 14px;
  font-weight: 500;
}
.hb.app .app-apps-rc > span {
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-apps-ra {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hb.app .app-apps-faces {
  display: inline-flex;
}
.hb.app .app-apps-faces > * + * {
  margin-left: -6px;
}
.hb.app .app-apps-sum {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-apps-row.app-apps-choice {
  justify-content: flex-end;
  gap: 8px;
  min-height: 0;
  padding: 0 0 14px;
  border-top: 0;
}
.hb.app .app-apps-detail {
  max-height: 180px;
  margin: 0 0 12px;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 10px;
  background: var(--hb-side);
  color: var(--hb-text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 19px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hb.app .hb-btn.app-apps-rm {
  color: var(--red) !important;
}

/* o formulário de um servidor */
.hb.app .app-apps-fh h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}
.hb.app .app-apps-fh p {
  margin: 4px 0 0;
  color: var(--hb-muted);
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-apps-fs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-card);
}
.hb.app .app-apps-fs.app-apps-test {
  gap: 0;
  padding-top: 6px;
  padding-bottom: 6px;
}
.hb.app .app-apps-f input.hb-input {
  width: 100%;
  min-width: 0;
  background: var(--hb-side);
  color: var(--hb-text);
}
.hb.app .app-apps-f input.app-apps-mono {
  font-family: var(--mono);
  font-size: 13px;
}
.hb.app .app-apps-fn {
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 19px;
}
.hb.app .app-apps-kinds {
  align-self: flex-start;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  background: var(--hb-side);
}
.hb.app .app-apps-kind {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--hb-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}
.hb.app .app-apps-kind[aria-checked='true'] {
  background: var(--hb-card-2);
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .app-apps-rep {
  display: grid;
  gap: 8px;
}
.hb.app .app-apps-one,
.hb.app .app-apps-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.hb.app .app-apps-pair {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}
.hb.app .hb-ic.app-apps-del {
  width: 36px;
  height: 36px;
  color: var(--hb-muted);
}
.hb.app .hb-btn.app-apps-more {
  width: 100%;
  justify-content: center;
  font-weight: 400;
}
.hb.app .app-apps-tn {
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-apps-tr {
  display: grid;
  gap: 2px;
}
.hb.app .app-apps-ff {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb.app .app-apps-ff > :first-child {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.hb.app .app-apps-dlg {
  width: min(440px, calc(100vw - 48px));
}
@media (max-width: 760px) {
  .hb.app .app-apps-h {
    flex-direction: column;
  }
  .hb.app .app-apps-rows {
    grid-template-columns: minmax(0, 1fr);
  }
  .hb.app .app-apps-item .app-store-act {
    max-width: 44%;
  }
  .hb.app .app-apps-item .app-apps-st {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hb.app .app-apps-row {
    flex-wrap: wrap;
  }
  /* Dois botões lado a lado (abrir a página de entrada e cancelar) descem um para baixo do outro quando não cabem. */
  .hb.app .app-apps-ra {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .hb.app .app-apps-pair {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hb.app .app-apps-pair > .app-apps-del {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .hb.app .app-apps-kinds {
    align-self: stretch;
  }
  .hb.app .app-apps-kind {
    flex: 1;
    padding: 0 8px;
  }
  .hb.app .app-apps-ff {
    flex-wrap: wrap;
  }
  .hb.app .app-apps-ff > :first-child {
    flex-basis: 100%;
  }
}

/* navegador do bot (prancha 22): o painel à direita, mais largo que a ficha */
@media (width > 1100px) {
  .hb.app .hb-win[data-card='browser'] {
    grid-template-columns: var(--hb-rail-w) var(--side-col) minmax(0, 1fr) var(--br-w, 470px);
  }
}
.hb.app .app-browser-b {
  position: relative;
}
.hb.app .app-browser {
  background: var(--hb-side);
}
.hb.app .app-br-tabs {
  /* Faixa de abas com as medidas da referência (vista inteira, medido em 26/11/2026): 38 de altura, abas de 28 entre 120 e 200
     de largura, com 6 e 8 de folga, 6 entre o globo e o nome, canto 8; o + de 32 com ícone de 14. */
  height: 38px;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 8px;
}
.hb.app .app-br-tabs .hb-ic {
  width: 32px;
  height: 32px;
  flex: none;
}
.hb.app .app-br-chips {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hb.app .app-br-chips::-webkit-scrollbar {
  display: none;
}
/* "Voltar para a conversa": o botão em pílula no canto direito da faixa, com a seta e o texto (referência: secundário
   pequeno, pílula, margem de 8 do lado). */
.hb.app .hb-btn.app-br-back {
  flex: none;
  gap: 6px;
  margin-inline-end: 4px;
  border-radius: 999px;
  color: var(--hb-text) !important;
}
.hb.app .app-br-tabs > .hb-sp {
  flex: 1 1 0;
  min-width: 0;
}
/* Arrastando uma aba: as outras abrem lugar e a que vai junto fica acima delas. */
.hb.app .app-br-chips[data-dragging] .app-br-tab {
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.3, 1);
}
.hb.app .app-br-chips[data-dragging] .app-br-tab[data-dragging] {
  z-index: 1;
  transition: none;
  box-shadow: var(--shadow-pop);
  cursor: grabbing;
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .app-br-chips[data-dragging] .app-br-tab {
    transition: none;
  }
}
/* O boneco do bot na barra do endereço, quando ele está agindo na aba (referência: 16 de largura, no começo da cápsula). */
.hb.app .app-br-agent {
  display: inline-flex;
  flex: none;
  align-items: center;
}
.hb.app .app-br-agent[hidden] {
  display: none;
}
.hb.app .app-br-tab {
  position: relative;
  flex: 0 1 200px;
  min-width: 120px;
  max-width: 200px;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 6px;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-br-tab:hover {
  background: var(--hb-ctl-hover);
  color: var(--hb-text);
}
.hb.app .app-br-tab.on {
  background: var(--surface-3);
  color: var(--hb-text);
}
/* O traço de 1 px entre duas abas, que some junto da aba ativa e da que está sob o mouse. */
.hb.app .app-br-tab + .app-br-tab::before {
  position: absolute;
  top: 50%;
  inset-inline-start: -2.5px;
  width: 1px;
  height: 20px;
  translate: 0 -50%;
  background: var(--border-strong);
  content: '';
  pointer-events: none;
}
.hb.app .app-br-tab:is(.on, :hover)::before,
.hb.app .app-br-tab:is(.on, :hover) + .app-br-tab::before {
  opacity: 0;
}
.hb.app .app-br-tab-t {
  min-width: 0;
  flex: 1;
  height: 100%;
  margin-inline-start: 22px;
  padding: 0;
  overflow: hidden;
  display: block;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-tab-x {
  position: absolute;
  top: 50%;
  inset-inline-start: 6px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: inherit;
  translate: 0 -50%;
}
.hb.app .app-br-tab-g,
.hb.app .app-br-tab-c {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
}
.hb.app .app-br-tab-g {
  opacity: 0.7;
}
.hb.app .app-br-tab-c {
  opacity: 0;
}
.hb.app .app-br-tab:is(:hover, :has(:focus-visible)) .app-br-tab-x {
  background: var(--surface-3);
}
.hb.app .app-br-tab:is(:hover, :has(:focus-visible)) .app-br-tab-g {
  opacity: 0;
}
.hb.app .app-br-tab:is(:hover, :has(:focus-visible)) .app-br-tab-c {
  opacity: 1;
}
.hb.app .app-browser .hb-panel-b.app-br-b {
  gap: 10px;
  padding: 0 0 12px;
  background: var(--hb-canvas);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.hb.app .app-br-b > :not(.app-br-bar) {
  margin-inline: 12px;
}
/* A linha do endereço: 44 de altura, 8 dos lados e fio de 1 px embaixo; os botões de 32 com ícone de 14. */
.hb.app .app-br-bar {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
}
.hb.app .app-br-bar .hb-ic {
  width: 32px;
  height: 32px;
}
.hb.app .app-br-bar .hb-ic:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.hb.app .app-br-url {
  flex: 1;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  margin-inline: 4px;
  padding: 0 4px 0 8px;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
}
.hb.app .app-br-lock {
  flex: none;
  display: inline-flex;
  color: var(--hb-muted);
}
.hb.app .app-br-url-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-url input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
}
.hb.app .app-br-url:focus-within {
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--hb-grouped-line);
}
.hb.app .app-br-view {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 10px;
  border: 1px solid var(--hb-line);
  background: var(--hb-card);
  overflow: hidden;
}
.hb.app .app-br-page {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  display: block;
  line-height: 0;
  cursor: default;
}
.hb.app .app-br-page.held:focus-visible {
  outline: 2px solid var(--hb-text);
  outline-offset: -2px;
}
.hb.app .app-br-page img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.hb.app .app-br-none {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}
.hb.app .app-br-none strong {
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 600;
}
.hb.app .app-br-b > .app-br-none {
  position: static;
  flex: 1;
}
/* A caixa de diálogo da página (referência: BrowserLiveView): véu sobre a imagem, cartão de até 460 alinhado em cima com
   24 de folga em cima e 16 dos lados, 16 de respiro, 12 entre as partes, fundo levantado com anel e sombra.
   A ilha de atividade fica por cima do véu: "Assumir" continua ao alcance. */
.hb.app .app-br-dlg {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 0;
  background: var(--hb-mp-bg);
}
.hb.app .app-br-dlg-c {
  display: grid;
  width: min(460px, 100%);
  box-sizing: border-box;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--hb-raised);
  box-shadow: 0 0 0 1px var(--hb-dialog-ring), var(--hb-dialog-shadow);
  outline: 0;
}
.hb.app .app-br-dlg-t {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 400;
}
.hb.app .app-br-dlg-t svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.hb.app .app-br-dlg-t span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-dlg-m {
  max-height: 240px;
  overflow-y: auto;
  color: var(--hb-text);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.hb.app .app-br-dlg-a {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.hb.app .app-br-dlg-a .hb-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-br-dlg-in {
  width: 100%;
  box-sizing: border-box;
}
/* O cartão de usuário e senha que um site pede (referência: BrowserHttpSignInPopover, versão do painel): preso à linha do
   endereço, a 8 abaixo dela e a 8 da borda, de até 320, com 12 de respiro, 8 entre as partes, canto de 12, fundo
   levantado com fio e sombra, campos de 28 e o botão à direita. Fica por cima da página e da ilha. */
.hb.app .app-br-bar {
  position: relative;
}
.hb.app .app-br-si {
  position: absolute;
  z-index: 6;
  top: calc(100% + 8px);
  left: 8px;
  display: flex;
  width: min(320px, calc(100% - 16px));
  box-sizing: border-box;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  background: var(--hb-raised);
  color: var(--hb-text);
  box-shadow: var(--hb-menu-shadow);
  font-size: 13px;
  animation: mp-in 120ms ease;
}
.hb.app .app-br-si-h {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hb.app .app-br-si-h > svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--text-2);
}
.hb.app .app-br-si-hd {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  overflow-wrap: anywhere;
}
.hb.app .app-br-si-hd strong {
  font-weight: 600;
}
.hb.app .app-br-si-hd span {
  color: var(--text-2);
}
.hb.app .app-br-si-x {
  flex: none;
  width: 24px;
  height: 24px;
  margin: -2px -4px 0 0;
}
.hb.app .app-br-si-f {
  display: grid;
  gap: 6px;
}
.hb.app .app-br-si-f > span:first-child {
  color: var(--text-2);
  font-weight: 500;
}
.hb.app .app-br-si-in {
  width: 100%;
  height: 28px;
  box-sizing: border-box;
  padding: 0 8px;
  font-size: 13px;
}
.hb.app .app-br-si-p {
  position: relative;
  display: block;
}
.hb.app .app-br-si-p .app-br-si-in {
  padding-inline-end: 32px;
}
.hb.app .app-br-si-e {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 2px;
  width: 24px;
  height: 24px;
  margin-block: auto;
}
.hb.app .app-br-si-err {
  color: var(--hb-danger);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-br-si-go {
  align-self: flex-end;
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-br-si.busy {
  opacity: 0.7;
}
/* Aviso de janela bloqueada (rodada I2; referência: alerta de aviso com X na tela cheia do navegador): grade de três colunas
   (auto, 1fr, auto) como lá, 12 de espaço entre as partes, 12 e 16 de respiro, 12 de raio, fio e fundo do aviso, 8 de margem. */
.hb.app .app-br-b > .app-br-pop {
  margin: -2px 8px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--hb-warn-soft);
  border-radius: 12px;
  background: var(--hb-warn-soft);
  color: var(--hb-warn);
}
.hb.app .app-br-pop-c {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.hb.app .app-br-pop-c strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.hb.app .app-br-pop-c span {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-br-pop-x {
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--text-2);
}
/* fim do aviso de janela bloqueada */
/* Cartão de localização na conversa (rodada I2; referência: BrowserLocationCard, o mesmo cartão de "sua vez" com três botões). */
.hb.app .app-loc-box {
  display: contents;
}
.hb.app .app-loc {
  margin: 0;
  align-self: flex-start;
}
.hb.app .app-loc-note {
  align-self: flex-start;
}
/* fim do cartão de localização */

/* As sugestões do endereço (referência: browser-full-suggest): debaixo do campo, a 4 dele e da largura dele, 4 de respiro,
   linhas de 32 com ícone de 14, o título, o endereço em cinza e, nas abas abertas, a etiqueta "Ir para a aba". */
.hb.app .app-br-url {
  position: relative;
}
.hb.app .app-br-sg {
  position: absolute;
  z-index: 7;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border-radius: 12px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  animation: mp-in 120ms ease;
}
.hb.app .app-br-sg[hidden] {
  display: none;
}
.hb.app .app-br-sg-r {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 32px;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
  text-align: start;
  cursor: default;
}
.hb.app .app-br-sg-r:hover,
.hb.app .app-br-sg-r[aria-selected='true'] {
  background: var(--hb-menu-hover);
}
.hb.app .app-br-sg-g {
  display: grid;
  width: 14px;
  flex: none;
  place-items: center;
  color: var(--text-3);
}
.hb.app .app-br-sg-t {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-sg-d {
  min-width: 0;
  flex: 0 100 auto;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-sg-s {
  flex: none;
  margin-inline-start: auto;
  padding: 0 8px;
  border: 1px solid var(--hb-line);
  border-radius: 999px;
  color: var(--text-3);
}
/* A ilha em cima da página, no pé dela (referência: BrowserDock, ilha de atividade): pílula de vidro a 16 do fundo,
   centrada, com giro ou seta, o que acontece (13, uma linha) e o botão de passar o controle (pequeno, em pílula). */
.hb.app .app-br-st {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  max-width: calc(100% - 24px);
  padding: 4px 4px 4px 8px;
  translate: -50% 0;
  border: 1px solid var(--hb-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hb-canvas) 82%, transparent);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}
.hb.app .app-br-s {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.hb.app .app-br-s > svg,
.hb.app .app-br-s > .hc-loader {
  flex: none;
  color: var(--hb-muted);
}
.hb.app .app-br-s > span:not(.hc-loader) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb.app .app-br-st .hb-btn.app-br-hold {
  flex: none;
  margin-inline-start: 6px;
  border-radius: 999px;
  color: var(--text-2) !important;
}
/* A barra do modo ensinar (referência: BrowserTeachBar): entre a linha do endereço e a página, de fora a fora, com o fio
   da linha do endereço em cima. 8 de respiro em cima e embaixo, 12 à esquerda e 8 à direita, 8 entre as partes, letra de
   13; o botão principal tem 32 de altura, 12 dos lados, 6 entre a marca e o texto, canto 8, no vermelho suave com a letra
   vermelha; o X é um botão de 32 com ícone de 14. Gravando: degradê do vermelho a 16%, de baixo para cima, e um fio de
   1 px do vermelho a 45% no pé; a página ganha a borda do vermelho a 28% e um brilho de 20 px (3 de expansão) a 38%. */
.hb.app .app-br-b > .app-br-teach {
  flex: none;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -10px 0 0;
  padding: 8px 8px 8px 12px;
  color: var(--hb-text);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-br-teach[data-recording],
.hb.app .app-br-teach[data-failed] {
  background: linear-gradient(to top, color-mix(in srgb, var(--hb-danger) 16%, transparent), transparent);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--hb-danger) 45%, transparent);
}
.hb.app .app-br-teach-t {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.hb.app .app-br-teach-n {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hb.app .app-br-teach-c {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.hb.app .hb-btn.hb-sm.app-br-teach-go {
  flex: none;
  height: 32px;
  gap: 6px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--hb-danger-soft) !important;
  color: var(--hb-danger) !important;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.hb.app .hb-btn.hb-sm.app-br-teach-go:hover:not(:disabled) {
  background: linear-gradient(var(--hb-danger-soft), var(--hb-danger-soft)), var(--hb-danger-soft) !important;
}
.hb.app .app-br-teach-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}
.hb.app .app-br-teach-sq {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 2px;
  background: currentColor;
}
.hb.app .app-br-teach .hb-ic {
  width: 32px;
  height: 32px;
}
.hb.app .app-br-teach :is(.hb-btn, .hb-ic):disabled {
  opacity: 0.42;
  pointer-events: none;
}
.hb.app .app-br-view[data-teach] {
  border-color: color-mix(in srgb, var(--hb-danger) 28%, transparent);
  box-shadow: 0 0 20px 3px color-mix(in srgb, var(--hb-danger) 38%, transparent);
}
/* fim da barra do modo ensinar */

/* A lista de prévias (referência: BrowserPreviewSidebar): rolagem própria, com 8 em cima, 16 dos lados e 16 embaixo; cada
   cartão tem 16 de margem, botão de 4 de folga, imagem 16:10 de canto 6 com fio de 1 px e o título de 13 numa linha só. */
.hb.app .app-browser {
  position: relative;
}
.hb.app .app-browser[data-mode='list'] {
  display: flex;
  flex-direction: column;
}
.hb.app .app-br-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 8px 16px 16px;
}
.hb.app .app-br-card {
  position: relative;
  margin-bottom: 16px;
}
.hb.app .app-br-card-b {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  text-align: start;
  cursor: pointer;
}
.hb.app .app-br-card-b:hover {
  background: var(--hb-ctl-hover);
}
.hb.app .app-br-card-b:active {
  background: var(--surface-3);
  color: var(--hb-text);
}
.hb.app .app-br-card-b:focus-visible,
.hb.app .app-br-card-x:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.hb.app .app-br-card-i {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--hb-line);
  border-radius: 6px;
  background: var(--hb-card);
}
.hb.app .app-br-card-i > svg {
  color: var(--hb-muted);
}
.hb.app .app-br-card-i > img,
.hb.app .app-br-card-sk {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb.app .app-br-card-sk {
  background: var(--hb-ctl-hover);
  animation: app-br-sk 1.4s ease-in-out infinite;
}
@keyframes app-br-sk {
  50% {
    opacity: 0.5;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .app-br-card-sk {
    animation: none;
  }
}
.hb.app .app-br-card-t {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* O selo "Abrir" aparece com o mouse em cima do cartão: pílula no meio da imagem, 8 e 12 de folga, letra de 13. */
.hb.app .app-br-card-o {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--hb-canvas);
  color: var(--hb-text);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
}
.hb.app .app-br-card-b:hover .app-br-card-o {
  opacity: 1;
}
/* O X de cada cartão: 24, canto 6, a 8 das bordas; só aparece com o mouse em cima do cartão ou com o foco. */
.hb.app .app-br-card-x {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--hb-line);
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--hb-text);
  opacity: 0;
  cursor: pointer;
}
.hb.app .app-br-card:hover .app-br-card-x,
.hb.app .app-br-card:focus-within .app-br-card-x {
  opacity: 1;
}
.hb.app .app-br-card-x:disabled {
  cursor: default;
  opacity: 0.4;
}
.hb.app .app-br-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
}
.hb.app .app-br-empty > svg {
  margin-bottom: 4px;
  color: var(--hb-muted);
}
.hb.app .app-br-empty > strong {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .app-br-empty > .hb-btn {
  margin-top: 4px;
}

/* A alça da largura (referência: PanelResizer): 16 de largura, no fio da esquerda do painel, com um traço de 1 px que
   aparece com o mouse, o foco ou o arrasto. Só existe com o painel ao lado da conversa. */
.hb.app .app-br-rz {
  position: absolute;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  transform: translateX(-50%);
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  outline: 0;
}
.hb.app .app-br-rz::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--text-3) 50%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}
.hb.app .app-br-rz:hover::after,
.hb.app .app-br-rz:focus-visible::after,
:root[data-br-resizing] .hb.app .app-br-rz::after {
  opacity: 1;
}
.hb.app .app-br-rz:focus-visible {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
:root[data-br-resizing] {
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}
@media (max-width: 1100px) {
  .hb.app .app-br-rz {
    display: none;
  }
}
.hb.app .hb-win[data-max] .app-br-rz {
  display: none;
}

/* Abas escondidas e seletor da janela estreita (referência: o menu das escondidas e o BrowserTabSwitcher). */
.hb.app .app-br-more[hidden] {
  display: none;
}
.hb.app .hb-btn.app-br-switch {
  min-width: 0;
  max-width: calc(100% - 190px);
  gap: 6px;
  padding: 0 8px;
}
.hb.app .app-br-switch-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-switch-n {
  flex: none;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--hb-muted);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}
.hb.app .app-br-mi > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-sw {
  width: min(320px, calc(100vw - 32px));
}
.hb.app .app-br-sw-row {
  display: flex;
  align-items: center;
  gap: 2px;
}
.hb.app button.app-menu-i.app-br-sw-b {
  flex: 1;
  min-width: 0;
  height: auto;
  min-height: 40px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-block: 4px;
  text-align: start;
}
.hb.app .app-br-sw-t {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app button.app-menu-i.app-br-sw-b[aria-current='true'] {
  background: var(--surface-3);
}
.hb.app .app-br-sw-u {
  max-width: 100%;
  overflow: hidden;
  color: var(--hb-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-br-sw-x {
  flex: none;
  width: 28px;
  height: 28px;
}

/* ---------------------------------------------------------------- Cofre (prancha 24)
   A página do Cofre nos Ajustes: a busca e o "Novo item", os tipos, os itens salvos e a nota. Os tipos de item e
   os campos foram conferidos no app de referência; as medidas são da prancha. */
.hb.app .app-vault {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hb.app .app-vault > * {
  flex: none;
}
.hb.app .app-vault-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb.app .app-vault-q,
.hb.app .app-vault-top .hb-sp {
  flex: 1;
}
.hb.app .app-vault-top .hb-btn {
  flex: none;
  gap: 6px;
  white-space: nowrap;
}
.hb.app .app-vault-seg {
  align-self: flex-start;
  max-width: 100%;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  background: var(--hb-card);
  overflow-x: auto;
  scrollbar-width: none;
}
.hb.app .app-vault-seg::-webkit-scrollbar {
  display: none;
}
.hb.app .app-vault-seg button {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--hb-muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.hb.app .app-vault-seg button:hover {
  color: var(--hb-text);
}
.hb.app .app-vault-seg button[aria-pressed='true'] {
  background: var(--hb-card-2);
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .hb-lrow.app-vault-row {
  min-height: 54px;
  gap: 2px;
  padding: 0 6px 0 0;
}
.hb.app .hb-lrow.app-vault-row:hover {
  background: var(--hb-card-2);
}
.hb.app button.app-vault-o {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  color: inherit;
  font: inherit;
  text-align: start;
}
.hb.app .app-vault-ic {
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--hb-card-2);
  color: var(--hb-text);
}
.hb.app .app-vault-row:hover .app-vault-ic {
  background: var(--hb-canvas);
}
.hb.app .app-vault-o .hb-opt-t strong {
  font-size: 13.5px;
}
.hb.app .app-vault-o .hb-opt-t strong,
.hb.app .app-vault-o .hb-opt-t span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-vault-who {
  flex: none;
  max-width: 34%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-vault-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
  text-align: center;
}
.hb.app .app-vault-none p,
.hb.app .app-vault-note,
.hb.app .app-vault-said {
  margin: 0;
}
.hb.app .app-vault-note {
  line-height: 19px;
  text-wrap: pretty;
}
.hb.app .app-vault-said {
  min-height: 18px;
  color: var(--hb-text);
}
.hb.app .app-vault-off {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  background: var(--hb-card);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-vault-off svg {
  flex: none;
  margin-top: 2px;
  color: var(--amber);
}
.hb.app .app-vault-off p {
  margin: 0;
  overflow-wrap: anywhere;
}
.hb.app .app-vault-off-f {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* Os menus do Cofre são de ações, não de escolha: sem a bolinha, e tão altos quanto o que têm dentro. */
#vault-pop {
  min-height: 0;
}
.hb.app #vault-pop button.mp-opt {
  padding: 7px 10px;
}
#vault-pop .mp-opt::before {
  display: none;
}
#vault-pop .mp-opt-n svg {
  flex: none;
  color: var(--hb-muted);
}
.hb.app #vault-pop button.app-vault-del,
#vault-pop .app-vault-del .mp-opt-n svg {
  color: var(--red);
}

/* O formulário de um item: duas colunas, como no app de referência (até 520 px; folgas de 12 e 16). */
.hb.app .app-vault-dlg {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  gap: 0;
  padding: 0;
  overflow: hidden;
  /* Medidas do ItemDialog do app de referência (medido em 26/11/2026): canto 20, anel de 1 px, cabeçalho 16 / 16 / 0 / 24,
     corpo 16 24 24, campos de 32, rodapé de 16 24 com fio em cima e botões de 36. */
  border: 1px solid var(--hb-dialog-ring);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: none;
}
.hb.app .app-vault-dlg .app-chan-h {
  padding: 16px 16px 0 24px;
}
.hb.app .app-vault-dlg .app-chan-h { gap: 12px; }
.hb.app .app-vault-logo {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--hb-card-2); color: var(--hb-text);
}
.hb.app .app-vault-logo .app-vault-letter { color: var(--text-2); font-size: 15px; font-weight: 600; line-height: 1; }
.hb.app .app-vault-logo .app-vault-initials { font-size: 13px; font-weight: 600; line-height: 1; }
.hb.app .app-vault-logo[data-kind="contact"] { border-radius: 50%; }
.hb.app .app-vault-dlg .app-chan-h strong { flex: 1; }
.hb.app .app-vault-dlg .app-chan-h strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.hb.app .app-vault-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 16px 24px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.hb.app .app-vault-wide {
  grid-column: 1 / -1;
}
.hb.app .app-vault-dlg .hb-field {
  min-width: 0;
  color: var(--text-2);
  line-height: 18px;
}
.hb.app .app-vault-dlg input.hb-input,
.hb.app .app-vault-dlg textarea.hb-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-color: var(--border);
  background: var(--hb-side);
  color: var(--hb-text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}
.hb.app .app-vault-dlg input.hb-input {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
}
.hb.app .app-vault-dlg .ps { display: flex; width: 100%; min-width: 0; }
.hb.app .app-vault-dlg .card-in.ps-field {
  width: 100%; height: 32px; min-height: 32px; padding: 0 10px 0 12px; box-sizing: border-box; border-radius: 8px;
  background: var(--hb-side); font-size: 14px; font-weight: 400; overflow: hidden;
}
.hb.app .app-vault-dlg .card-in.ps-field .ps-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb.app .app-vault-dlg textarea.hb-input {
  display: block;
  min-height: 64px;
  resize: vertical;
  line-height: 20px;
}
.hb.app .app-vault-dlg .hb-input:focus-visible {
  border-color: var(--border-strong);
  outline: 0;
}
.hb.app .app-vault-dlg .hb-input::placeholder {
  color: var(--hb-muted);
}
.hb.app .app-vault-hint {
  color: var(--hb-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 18px;
}
.hb.app .app-vault-secret {
  position: relative;
  display: block;
}
.hb.app .app-vault-secret input.hb-input {
  padding-inline-end: 40px;
  font-family: var(--mono);
  font-size: 13px;
}
.hb.app .app-vault-secret input.hb-input::placeholder {
  font-family: var(--font, inherit);
}
.hb.app .app-vault-secret .hb-ic {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  width: 24px;
  height: 24px;
}
.hb.app .app-vault-secret input.hb-input {
  padding-inline-end: 36px;
}
.hb.app .app-vault-whoset {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.hb.app .app-vault-whoset legend {
  padding: 0 0 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .app-vault-bots {
  max-height: 208px;
  margin-top: 0;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
}
.hb.app .app-vault-bots .app-chan-pick {
  padding: 8px 12px;
}
.hb.app .app-vault-dlg .hb-lrow.perm-grant {
  padding: 0 4px 0 12px;
}
.hb.app .app-vault-dlg .hb-lrow.perm-grant .hb-ic {
  width: 32px;
  height: 32px;
}
.hb.app .app-vault-dlg .cf-foot .hb-sp {
  flex: 1;
}
/* No telefone os três botões da conferência não cabem numa linha: "escolher outro arquivo" sobe para a linha de cima. */
@media (max-width: 640px) {
  .hb.app .app-vault-dlg[data-form="vault-import"] .cf-foot {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .hb.app .app-vault-dlg[data-form="vault-import"] .cf-foot [data-do="vault-import-again"] {
    flex: 1 0 100%;
  }
  .hb.app .app-vault-dlg[data-form="vault-import"] .cf-foot .hb-sp {
    flex: 1 0 0;
  }
}
.hb.app .hb-btn.app-vault-rm,
.hb.app .hb-btn.card-ghost.app-vault-rm {
  color: var(--red) !important;
}
/* A chave de dois fatores e "quem pode usar": um rótulo e, ao lado, o estado e os botões de 32. */
.hb.app .app-vault-2fa-l,
.hb.app .app-vault-whoset > .app-vault-2fa-l {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .app-vault-2fa-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hb.app .app-vault-2fa-s {
  min-width: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-wrap: pretty;
}
.hb.app .app-vault-2fa-b {
  flex: none;
  display: inline-flex;
  gap: 8px;
}
.hb.app .app-vault-whoset {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.hb.app .app-vault-who-b {
  display: flex;
}
.hb.app .app-vault-who-b .hb-btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-vault-step {
  display: grid;
  gap: 12px;
}
.hb.app .app-vault-lead {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-vault-keyin {
  font-family: var(--mono);
  font-size: 13px;
}
.hb.app .app-vault-bad {
  color: var(--red);
}
.hb.app .app-vault-qr {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.hb.app .app-vault-qr .app-vault-bad:empty {
  display: none;
}
.hb.app .app-vault-check {
  text-align: center;
}
.hb.app .app-vault-code-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}
.hb.app .app-vault-digits {
  color: var(--text);
  font-family: var(--mono);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 36px;
}
.hb.app .app-vault-left {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* A janela da escolha dos bots (abre por cima do formulário). */
.hb.app .va-dlg {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hb-dialog-ring);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: none;
}
.hb.app .va-h {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0 24px;
}
.hb.app .va-h h2 {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.hb.app .va-h .hb-ic {
  width: 32px;
  height: 32px;
}
.hb.app .va-b {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 16px 16px;
}
.hb.app .va-q {
  flex: none;
  height: 32px;
  margin: 0 0 4px;
}
.hb.app .va-body {
  min-height: 0;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}
.hb.app .va-list {
  display: flex;
  flex-direction: column;
}
.hb.app .va-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  cursor: pointer;
}
.hb.app .va-row:hover {
  background: var(--hb-hover);
}
.hb.app .va-row .check {
  width: 16px;
  height: 16px;
  flex: none;
}
.hb.app .va-all {
  border-bottom: 1px solid var(--hb-line);
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
.hb.app .va-n {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hb.app .va-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .va-role,
.hb.app .va-count {
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .va-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .va-count {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.hb.app .va-none {
  margin: 0;
  padding: 8px;
  color: var(--text-3);
  font-size: 14px;
}
/* A entrada "Importar de um arquivo" do menu Novo item, separada dos quatro tipos. */
.hb.app .app-vault-msep {
  height: 1px;
  margin: 4px 6px;
  background: var(--hb-line);
}
/* "Tirar a chave de dois fatores" e "Manter": um botão discreto embaixo do campo, sem esticar. */
.hb.app .app-vault-dlg .hb-btn.app-vault-code {
  align-self: flex-start;
  margin-top: 4px;
}
/* A conferência da importação: o resumo, o que fica de fora (número e motivo) e as linhas, sem senha. */
.hb.app .app-vault-imp-sum {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.hb.app .app-vault-imp-sum strong {
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.hb.app .app-vault-imp-why,
.hb.app .app-vault-imp-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
}
.hb.app .app-vault-imp-why li,
.hb.app .app-vault-imp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
  padding: 8px 12px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-vault-imp-why li + li,
.hb.app .app-vault-imp-row + .app-vault-imp-row {
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-vault-imp-why b {
  min-width: 2ch;
  color: var(--hb-text);
  font-weight: 600;
}
.hb.app .app-vault-imp-row .hb-opt-t {
  flex: 1 1 100%;
  min-width: 0;
}
.hb.app .app-vault-imp-row .hb-opt-t strong,
.hb.app .app-vault-imp-row .hb-opt-t span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-vault-imp-row[data-skip] .hb-opt-t {
  color: var(--hb-muted);
}
.hb.app .app-vault-imp-row[data-skip] .hb-opt-t strong {
  color: inherit;
}
.hb.app .app-vault-imp-row .hb-note {
  flex: 1 1 100%;
  margin: 0;
}
.hb.app .app-vault-dlg input[type='file'].hb-input {
  height: auto;
  padding: 8px 10px;
}
/* O cartão "o bot quer guardar um login": as linhas do site, do usuário e do nome, e a nota sobre a senha. */
.app-vask-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
}
.app-vask-rows .app-ask-row {
  margin: 0;
}

/* O cartão "o bot pede um login" (prancha 24): até 430 px, o cadeado, o site e os logins guardados para ele. */
.app-ask.app-vask {
  width: min(430px, 100%);
  padding: 12px 14px;
  border-radius: 16px;
}
.app-vask-h {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-vask-h svg {
  flex: none;
}
.app-vask-h h3 {
  margin: 0;
  min-width: 0;
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.app-vask-p {
  margin: 0;
  color: var(--hb-muted);
  font-size: 13.5px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.app-vask-p b {
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .app-vask-l {
  background: var(--hb-canvas);
}
.hb.app label.hb-lrow.app-vask-opt {
  min-height: 46px;
  gap: 10px;
  padding: 6px 12px;
  cursor: pointer;
}
.hb.app .app-vask-opt .radio {
  flex: none;
  margin: 0;
}
.hb.app .app-vask-opt .hb-opt-t strong {
  font-size: 13.5px;
}
.hb.app .app-vask-opt .hb-opt-t strong,
.hb.app .app-vask-opt .hb-opt-t span {
  overflow-wrap: anywhere;
}
/* O cartão "o bot pede um item do Cofre" (rodada S1, conferido na referência em 26/11/2026: `UiBlockCard`, `VaultRequestCard`
   e `ui-blocks.css`): o cartão de bloco comum (canto 22, 16 e 12 de respiro, vão de 12), com no máximo 520 px; o ícone num
   quadro de 36 px (canto 8), a frase do bot em 15/22 peso 600 e a nota embaixo em 14/20 apagada; login, cartão e contato
   levam os botões na mesma linha, à direita; a chave de API leva o campo no corpo e os botões embaixo. */
.app-ask.app-vreq {
  width: min(520px, 100%);
}
.app-vq-h {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}
.app-vq-ic {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-raised);
  color: var(--text);
}
.app-vq-t {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}
.app-vq-t h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.app-vq-t p {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.app-vq[data-inline] {
  flex-flow: row wrap;
  align-items: center;
  column-gap: 16px;
  padding-block: 12px;
}
.app-vq[data-inline] > .app-vq-h {
  flex: 1 1 240px;
  min-height: 44px;
}
.app-vq[data-inline] > .app-vq-f {
  flex: none;
  margin-inline-start: auto;
}
.app-vq[data-inline] > .app-vq-err {
  flex-basis: 100%;
  order: 1;
}
.app-vq-form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}
.app-vq-fld {
  display: grid;
  min-width: 0;
  gap: 6px;
}
.app-vq-fld > label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.hb.app .app-vq-fld input.hb-input {
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
}
.hb.app .app-vq-fld .app-vault-secret input.hb-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
}
.hb.app .app-vq-fld .app-vault-secret .hb-ic {
  top: 6px;
}
.hb.app .app-vq-fld .ps-b {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}
.app-vq-err {
  min-width: 0;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.app-vq-f {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.app-vq-a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-inline-start: auto;
}
.app-vq-sending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
/* O pedido já resolvido: o selo do resultado à direita do cabeçalho (32 de altura, pílula). */
.app-vq[data-status='expired'],
.app-vq[data-status='closed'] {
  color: var(--text-3);
}
.app-vq-h:has(> .app-vq-badge) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
}
.app-vq-badge {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.app-vq[data-status='answered'] .app-vq-badge {
  border-color: transparent;
  background: var(--green);
  color: #141414;
}
:root[data-theme='light'] .app-vq[data-status='answered'] .app-vq-badge {
  color: #ffffff;
}
@container app-ask (width < 360px) {
  .app-vq-h:has(> .app-vq-badge) {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .app-vq-h:has(> .app-vq-badge) > .app-vq-badge {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
  .app-vq-h:has(> .app-vq-badge) > .app-vq-ic {
    grid-row: 1 / span 2;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .app-vq[data-state] .app-vq-badge {
    animation: app-ask-in 200ms ease-out both;
  }
}
/* As chaves do Cofre que um comando recebeu, embaixo do passo: só os nomes. */
.app-step-k {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 18px;
}
.app-step-k svg {
  flex: none;
}
.app-ask-say > span + strong + span {
  color: var(--text-3);
  font-size: 13px;
}
@media (max-width: 760px) {
  .hb.app .app-vault-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hb.app .app-vault-seg button {
    padding: 0 9px;
  }
}

/* ---------------------------------------------------------------- Fluxos (prancha 20)
   Uma página da janela inteira: no alto, "Fluxos › nome", o "Salvo", o Histórico e o Rodar; embaixo, o quadro
   pontilhado com os passos e a barra dos tipos. Medidas da prancha: alto com 10 px entre as peças; pontos a
   cada 22 px; passo com 216 px (a condição, 196), folga 10/12/12, canto de 12 px, texto em 13,5 px; o tipo em
   11,5 px em maiúsculas; bolinhas de 10 px; ligações com traço de 1,6 px; barra a 14 px do pé. Conferido no
   app de referência em 25/11/2026: o quadro vai de 25% a 200%, os passos andam de 8 em 8 px e o painel do
   passo é nosso (lá os campos ficam dentro do cartão). */
.hb.app .hb-win[data-view='workflows'] {
  --side-col: 0px;
}
/* A coluna dos bots fica na grade (é ela que põe a página na coluna certa), mas sem largura e sem nada dentro. */
.hb.app .hb-win[data-view='workflows'] .hb-side {
  visibility: hidden;
  padding: 0;
}
.hb-win[data-view='workflows'] .hb-side > *,
.hb-win[data-view='workflows'] .app-resizer {
  display: none;
}
.hb.app .hb-win[data-view='workflows'] .hb-top-main {
  gap: 10px;
  padding: 0 12px 0 20px;
  min-width: 0;
}
.hb.app .hb-nav[data-badge] {
  position: relative;
}
.hb.app .hb-nav[data-badge]::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px var(--hb-frame);
}

/* o alto */
.hb.app .app-wf-crumb {
  flex: none;
  margin: 0 -6px;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--hb-muted);
  font: inherit;
}
.hb.app button.app-wf-crumb:hover,
.hb.app button.app-wf-name:hover {
  background: var(--hb-ctl-hover);
  color: var(--hb-text);
}
.app-wf-sep {
  display: inline-flex;
  flex: none;
  color: var(--hb-muted);
}
.hb.app button.app-wf-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0 -6px;
  padding: 4px 6px;
  border-radius: 6px;
  font: inherit;
}
.app-wf-name b {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-name svg {
  flex: none;
  color: var(--hb-muted);
}
.hb.app input.app-wf-rename {
  width: min(320px, 40vw);
  min-height: 28px;
  height: 28px;
  font-size: 13.5px;
  font-weight: 600;
}
.app-wf-paused {
  flex: none;
}
.app-wf-saved {
  flex: none;
  white-space: nowrap;
}
.app-wf-saved[data-state='error'] {
  color: var(--red);
}
.app-wf-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--hb-line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.app-wf-chip[data-state='running'] {
  color: var(--blue);
}
.app-wf-chip[data-state='approval'] {
  border-color: transparent;
  background: var(--amber-soft);
  color: var(--amber);
}
.app-wf-chip[data-state='done'] {
  color: var(--green);
}
.app-wf-chip[data-state='failed'] {
  color: var(--red);
}
.app-wf-chip .hc-loader,
.app-wf-st .hc-loader {
  width: 11px;
  height: 11px;
}
.hb.app button.app-wf-chip-x {
  display: inline-flex;
  margin-right: -4px;
  padding: 2px;
  border-radius: 50%;
  color: var(--hb-muted);
}
.hb.app button.app-wf-chip-x:hover {
  color: var(--hb-text);
}
.app-wf-count {
  color: var(--hb-muted);
  font-weight: 400;
}
.hb.app .app-wf-hist,
.hb.app .app-wf-go {
  flex: none;
}

/* o quadro */
.app-wf {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 0;
  overflow: hidden;
  border-top: 1px solid var(--hb-line);
  border-radius: 0 0 13px 13px;
}
.app-wf[data-side='open'] {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.wf-c {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
}
.app-wf-n .wf-inline { box-sizing: border-box; width: 100%; min-height: 50px; resize: none; }
.app-wf-n[data-kind="note"] .wf-inline { flex: 1; }
.app-wf-empty button { pointer-events: auto; }
.app-wf-c[data-hidden-controls] :is(.wf-switcher, .wf-bar, .app-wf-zoom, #wf-map) { display: none; }
.wf-show { position: absolute; bottom: 16px; inset-inline-end: 16px; }
.wf-switcher {
  position: absolute;
  z-index: 2;
  top: 16px;
  inset-inline-start: 16px;
}
.wf-tabs { display: flex; max-width: 720px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.wf-tab { display: inline-flex; min-width: 0; align-items: center; border-radius: 8px; }
.wf-tab:has([aria-selected="true"]) { background: var(--hb-card-2); }
.wf-tab button { display: inline-flex; align-items: center; gap: 6px; padding: 4px; color: var(--hb-text); }
.wf-tab [role="tab"] { min-width: 2em; max-width: 190px; }
.wf-tab [role="tab"] span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-wf-c {
  outline: 0;
  touch-action: none;
  user-select: none;
}
.app-wf-c[data-panning] {
  cursor: grabbing;
}
.app-wf-c:not([data-tool='select']):not([data-past]) {
  cursor: copy;
}
.app-wf-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}
.app-wf-wires {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  color: var(--border-strong);
  pointer-events: none;
}
.app-wf-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.app-wf-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  cursor: pointer;
  pointer-events: stroke;
}
.app-wf-c[data-past] .app-wf-hit {
  pointer-events: none;
}
.app-wf-w text {
  fill: var(--hb-muted);
  font-size: 11px;
}
.app-wf-w[data-done] .app-wf-line {
  stroke: var(--green);
}
.app-wf-w[data-on] .app-wf-line {
  stroke: var(--hb-text);
  stroke-width: 2;
}
.app-wf-new {
  stroke: var(--hb-muted);
  stroke-dasharray: 5 4;
}
.wf-n {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  background: var(--hb-card);
  font-size: 13.5px;
}
.wf-n b {
  font-weight: 600;
}
.wf-h {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--hb-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wf-p {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 2px solid var(--hb-muted);
  border-radius: 50%;
  background: var(--hb-canvas);
}
.wf-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
}
.app-wf-n {
  cursor: grab;
}
.app-wf-c[data-past] .app-wf-n {
  cursor: pointer;
}
.app-wf-n[data-moving] {
  z-index: 2;
  cursor: grabbing;
}
.app-wf-n[data-kind='note'] {
  border-style: dashed;
  background: var(--surface);
}
.app-wf-n[data-state='running'] {
  border-color: var(--blue);
}
.app-wf-n[data-state='approval'] {
  border-color: var(--amber);
}
.app-wf-n[data-state='done'] {
  border-color: var(--green);
}
.app-wf-n[data-state='failed'] {
  border-color: var(--red);
}
.app-wf-n[data-state='skipped'] > .app-wf-pick {
  opacity: 0.55;
}
.app-wf-n[data-on] {
  border-color: var(--hb-text);
  box-shadow: 0 0 0 1px var(--hb-text);
}
.hb.app button.app-wf-pick {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  text-align: left;
  font: inherit;
  cursor: inherit;
}
/* o foco do teclado contorna o cartão inteiro, não o botão de dentro */
.hb.app button.app-wf-pick:focus-visible {
  outline: 0;
}
.app-wf-n:has(> .app-wf-pick:focus-visible) {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}
.app-wf-pick b {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.app-wf-pick b > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-face {
  display: inline-flex;
  flex: none;
}
.app-wf-pick .hb-note {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.38;
  overflow-wrap: anywhere;
}
.app-wf-ki {
  display: inline-flex;
  flex: none;
}
.app-wf-st {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--hb-muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.app-wf-st[data-state='running'] {
  color: var(--blue);
}
.app-wf-st[data-state='approval'] {
  color: var(--amber);
}
.app-wf-st[data-state='done'] {
  color: var(--green);
}
.app-wf-st[data-state='failed'] {
  color: var(--red);
}
.app-wf-ask {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.wf-p[data-in] {
  pointer-events: none;
}
.app-wf-out {
  cursor: crosshair;
}
.app-wf-out::after {
  content: '';
  position: absolute;
  inset: -9px;
}
.app-wf-c[data-past] .app-wf-out {
  pointer-events: none;
}
.hb.app button.app-wf-cut {
  position: absolute;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--hb-line);
  border-radius: 50%;
  background: var(--hb-card-2);
  color: var(--hb-text);
  transform: translate(-50%, -50%);
}
.app-wf .hb-seg > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--hb-muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}
/* a prancha desenha cada opção com um span; aqui a opção é o botão, e o nome dentro dele não ganha a folga de novo */
.app-wf .hb-seg > button > span {
  height: auto;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}
.app-wf .hb-seg > button:hover {
  color: var(--hb-text);
}
.app-wf .hb-seg > button.on {
  background: var(--hb-card-2);
  color: var(--hb-text);
  font-weight: 500;
}
.app-wf-zoom {
  position: absolute;
  inset-inline-start: 16px;
  bottom: 16px;
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  background: var(--hb-card);
}
.hb.app .app-wf-zoom button.hb-kbd {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--hb-text);
  font: inherit;
  font-size: 13px;
}
.hb.app .app-wf-zoom button.hb-kbd:is(:hover, [aria-pressed="true"]):not(:disabled) {
  background: var(--hb-card-2);
}
.hb.app .app-wf-zoom button:disabled { opacity: .45; }
.app-wf .wf-bar { bottom: 16px; }
.app-wf .wf-bar .hb-seg { display: flex; align-items: center; gap: 6px; padding: 6px; }
.app-wf .wf-bar .hb-seg > button { width: 40px; height: 40px; padding: 0; justify-content: center; }
.hb.app .wf-switcher { background: var(--hb-card); color: var(--hb-text); }
.hb.app .app-wf .wf-bar .hb-seg > #wf-add-b { width: auto; padding-inline: 12px; color: var(--hb-canvas); background: var(--hb-text); }
.app-wf .wf-bar button[aria-pressed="true"] { background: var(--hb-card-2); color: var(--hb-text); }
.app-wf-c[data-tool="pan"] :is(.app-wf-n, .app-wf-pick), .app-wf-c[data-tool="pan"]:not([data-panning]) { cursor: grab; }
.app-wf-c[data-panning], .app-wf-c[data-panning] * { cursor: grabbing; }
.app-wf-n[data-kind="note"] { min-height: 240px; }
#wf-map {
  position: absolute;
  inset-inline-start: 16px;
  bottom: 68px;
  width: 200px;
  height: 128px;
  border-radius: 10px;
  background: var(--hb-card);
  box-shadow: 0 0 0 1px var(--hb-line);
  cursor: crosshair;
  touch-action: none;
}
#wf-map rect:last-child { stroke: var(--hb-muted); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.app-wf-picker input { width: 100%; }
.app-wf-picker p, .app-wf-picker-group small { margin: 6px; color: var(--hb-muted); }
.app-wf-picker .mp-opt { gap: 8px; }
.app-wf-picker .mp-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-wf-levels { display: grid; grid-template-columns: repeat(3, 1fr); }
.app-wf-levels button[aria-pressed="true"] { background: var(--hb-card-2); }
.app-wf-said,
.app-wf-hint,
.app-wf-past {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 3;
  box-sizing: border-box;
  max-width: calc(100% - 28px);
  padding: 7px 12px;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  background: var(--hb-card);
  font-size: 13px;
  transform: translateX(-50%);
}
.app-wf-past {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 12px;
}
.app-wf-hint {
  color: var(--hb-muted);
}
.app-wf-past ~ .app-wf-said,
.app-wf-hint ~ .app-wf-said {
  top: 62px;
}
.app-wf-said[data-kind='problem'] {
  border-color: var(--red);
  color: var(--red);
}
.app-wf-said[hidden] {
  display: none;
}
.app-wf-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--hb-muted);
  font-size: 13.5px;
  text-align: center;
  pointer-events: none;
}

/* o painel do passo */
.app-wf-side {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-left: 1px solid var(--hb-line);
  background: var(--surface);
}
.app-wf-side[hidden] {
  display: none;
}
.app-wf-side-h {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px 16px;
}
.app-wf-side-h h2 {
  overflow: hidden;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-side-h .hb-sp {
  flex: 1;
}
.app-wf-side-b {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding: 4px 16px 16px;
}
.app-wf-side-f {
  display: flex;
  flex: none;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-wf-del,
.hb.app #wf-pop button.app-wf-danger,
#wf-pop .app-wf-danger .mp-opt-n svg {
  color: var(--red) !important;
}
.hb.app .app-wf-side :is(input, select, textarea).hb-input {
  box-sizing: border-box;
  width: 100%;
  color: var(--hb-text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}
.hb.app .app-wf-side textarea.hb-area {
  line-height: 1.45;
  resize: vertical;
}
.app-wf-note {
  margin: -8px 0 0;
  color: var(--hb-muted);
  font-size: 12.5px;
  line-height: 1.4;
}
.app-wf-pickrow {
  flex-wrap: wrap;
  align-self: flex-start;
}
.app-wf-when {
  flex-wrap: wrap;
  font-weight: 400;
}
.hb.app .app-wf-side .app-wf-when .hb-input {
  width: auto;
}
.app-wf-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  font-weight: 400;
  list-style: none;
}
.app-wf-links li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
.app-wf-links li > span {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.app-wf-links li > span > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-links svg {
  flex: none;
  color: var(--hb-muted);
}
.app-wf-res {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  background: var(--hb-card);
}
.app-wf-res-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-wf-res-h .app-wf-st {
  margin-left: 0;
  font-size: 13px;
}
.app-wf-res .app-err,
.app-wf-res .app-wf-note {
  margin: 0;
}
.app-wf-res > .hb-btn {
  align-self: flex-start;
}
.app-wf-out-t {
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.app-wf-asked {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.app-wf-given {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  font-size: 13px;
}
.app-wf-given dt {
  color: var(--hb-muted);
}
.app-wf-given dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.app-wf-read {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}
.app-wf-read dd {
  margin-bottom: 10px;
}

/* os menus do alto */
#wf-pop {
  min-height: 0;
}
#wf-pop .mp-panel {
  overflow: auto;
}
.hb.app #wf-pop .app-wf-acts button.mp-opt,
.hb.app #wf-pop .app-wf-runs button.mp-opt {
  padding: 7px 10px;
}
#wf-pop .app-wf-acts .mp-opt::before,
#wf-pop .app-wf-runs .mp-opt::before {
  display: none;
}
#wf-pop .app-wf-acts .mp-opt-n svg {
  flex: none;
  color: var(--hb-muted);
}
#wf-pop .app-wf-rows .mp-opt-n {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
#wf-pop .app-wf-rows .mp-opt-n small {
  padding: 0;
  background: none;
  font-weight: 400;
}
#wf-pop .app-wf-runs .mp-opt[aria-selected='true'] {
  background: var(--hb-menu-hover);
}
.app-wf-menu-f {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--hb-line);
}
.app-wf-menu-e {
  display: flex;
  justify-content: center;
  padding: 16px 12px;
  color: var(--hb-muted);
  font-size: 13px;
}
.app-wf-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
}
.app-wf-dot[data-state='running'] {
  background: var(--blue);
}
.app-wf-dot[data-state='approval'] {
  background: var(--amber);
}
.app-wf-dot[data-state='done'] {
  background: var(--green);
}
.app-wf-dot[data-state='failed'] {
  background: var(--red);
}

/* Até 1100 px o painel do passo fica por cima do quadro, à direita. */
@media (max-width: 1100px) {
  .app-wf[data-side='open'] {
    grid-template-columns: minmax(0, 1fr) 0;
  }
  .app-wf-side {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: min(340px, 100%);
    box-shadow: var(--hb-menu-shadow);
  }
  /* a barra e o tamanho ficam na parte do quadro que o painel não cobre */
  .app-wf[data-side='open'] .wf-bar {
    left: calc((100% - 340px) / 2);
    max-width: calc(100% - 340px - 24px);
  }
  .app-wf[data-side='open'] .app-wf-zoom { bottom: 76px; }
  .app-wf[data-side='open'] #wf-map { bottom: 128px; }
}

/* "Todos os fluxos" no menu do fluxo é só do celular: na janela larga a lista abre do caminho, no alto. */
@media (min-width: 761px) {
  .hb.app #wf-pop .mp-opt.app-wf-phone {
    display: none;
  }
}

/* No celular o alto fica só com o nome e os botões, a barra perde os nomes e o painel sobe do pé da tela. */
@media (max-width: 760px) {
  .hb.app .hb-win[data-view='workflows'] .hb-top-main {
    gap: 6px;
    padding: 0 8px;
  }
  .app-wf-crumb,
  .app-wf-sep,
  .app-wf-saved,
  .app-wf-x,
  .app-wf-count,
  .app-wf-hist > span,
  .app-wf-go > span,
  .app-wf-chip > span {
    display: none;
  }
  .app-wf-chip:not([data-state='running']) {
    display: none;
  }
  .hb.app .app-wf-hist,
  .hb.app .app-wf-go {
    width: 36px;
    height: 30px;
    justify-content: center;
    padding: 0;
  }
  .app-wf[data-side='open'] .wf-bar {
    left: 50%;
    max-width: calc(100% - 24px);
  }

  .app-wf {
    border-radius: 0;
  }
  .wf-bar {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .app-wf .wf-bar .hb-seg > button {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }
  .app-wf .wf-bar .hb-seg > button > span {
    display: none;
  }
  #wf-map { bottom: calc(118px + env(safe-area-inset-bottom)); }
  .app-wf-zoom {
    inset-inline-start: 10px;
    bottom: calc(66px + env(safe-area-inset-bottom));
  }
  .app-wf-side {
    top: auto;
    left: 0;
    width: auto;
    max-height: 68%;
    border-top: 1px solid var(--hb-line);
    border-left: 0;
    border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .app-wf-past {
    flex-wrap: wrap;
    justify-content: center;
    width: calc(100% - 20px);
  }
}

/* Mensagens (pranchas 25 e 26): a seção da lista de Apps, a página do Telegram e as caixas de conectar e de
   ligar uma conversa. Os blocos da página são os mesmos das outras páginas de Apps. */
.hb.app .app-apps-part {
  min-width: 0;
}
.hb.app .app-msg-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hb.app .app-msg-sec .hb-sub {
  margin: 0;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .app-msg-go {
  pointer-events: none;
}
.hb.app .app-msg-conn {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hb.app .app-msg-conn + .app-msg-conn {
  padding-top: 24px;
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-msg-ch,
.hb.app .app-msg-sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hb.app .app-msg-sh.app-msg-req {
  padding-top: 16px;
}
.hb.app .app-msg-ch h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}
.hb.app .app-msg-ch p {
  margin: 2px 0 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-msg-sh h4 {
  margin: 0;
}
.hb.app .app-msg-sh .hb-btn {
  flex: none;
}
.hb.app .app-store-box .app-msg-note {
  margin: 0;
  padding-top: 8px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-store-box .app-msg-note:last-child {
  padding-bottom: 16px;
}
.hb.app .app-apps-rc.app-msg-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hb.app .app-msg-who > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.hb.app .app-msg-who > span > strong {
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .app-msg-chat[data-off='true'] .app-apps-rc {
  opacity: 0.55;
}
.hb.app .app-msg-why {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--hb-card);
  color: var(--hb-muted);
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-msg-dlg {
  width: min(460px, calc(100vw - 32px));
  gap: 14px;
  overflow-y: auto;
}
.hb.app .app-msg-dlg .app-chan-h {
  padding-bottom: 2px;
}
.hb.app .app-msg-stepn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-msg-dots {
  display: inline-flex;
  gap: 4px;
}
.hb.app .app-msg-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}
.hb.app .app-msg-dots i.on {
  background: var(--hb-text);
}
.hb.app .app-msg-steps {
  display: grid;
  gap: 8px;
  margin: 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--hb-card);
  list-style: none;
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-msg-steps li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hb.app .app-msg-dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.hb.app .app-msg-dlg input.app-msg-in {
  width: 100%;
  min-width: 0;
  background: var(--hb-side);
  color: var(--hb-text);
  font-family: var(--mono);
  font-size: 13px;
}
.hb.app .app-msg-fine,
.hb.app .app-msg-lead {
  margin: 0 16px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-msg-lead {
  font-size: 14px;
  line-height: 21px;
}
.hb.app .app-msg-dlg .app-msg-err {
  margin: 0 16px;
}
.hb.app .app-msg-foot {
  gap: 8px;
}
.hb.app .app-msg-bots {
  max-height: 264px;
  margin-top: 0;
}
.hb.app .app-msg-seg {
  align-self: flex-start;
  margin: 0 16px;
}
.hb.app .app-msg-seg > button {
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.hb.app .app-msg-seg > button:disabled {
  cursor: default;
}
.hb.app .app-msg-url {
  margin: 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  background: var(--hb-side);
  overflow-wrap: anywhere;
}
.hb.app .app-msg-url code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 18px;
}
.hb.app .app-msg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 16px;
}
.hb.app .app-msg-acts a.hb-btn {
  text-decoration: none;
}
.hb.app .app-msg-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 28px;
  margin: 0 16px;
  color: var(--hb-muted);
  font-size: 14px;
}
.hb.app .app-msg-done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--hb-card);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-msg-done svg {
  flex: none;
  color: var(--green);
}
@media (max-width: 760px) {
  .hb.app .app-msg-chat,
  .hb.app .app-msg-conn .app-apps-row:has(.app-msg-who) {
    flex-wrap: wrap;
  }
  .hb.app .app-msg-chat .app-apps-rc {
    flex-basis: 100%;
  }
  .hb.app .app-msg-chat .app-apps-ra {
    flex-wrap: wrap;
  }
}

/* Loja › Habilidades (prancha 10): a lista usa as fileiras da loja; aqui fica só o que é desta página. */
.hb.app .app-sks {
  gap: 24px;
}
.hb.app .app-sks .app-apps-tile:not(.lg) {
  border-radius: 8px;
}
.hb.app .app-sks-note,
.hb.app .app-store-box .app-sks-none {
  margin: 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-sks-on {
  gap: 8px;
}
.hb.app .app-sks-faces {
  display: inline-flex;
  align-items: center;
}
.hb.app .app-sks-faces > * + * {
  margin-left: -6px;
}
.hb.app .app-sks-page .app-store-hn .app-apps-st {
  margin-top: 6px;
}
.hb.app .app-sks-page .app-store-ha {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb.app .app-sks-bot {
  min-height: 52px;
  padding: 8px 0;
}
.hb.app .app-sks-md {
  padding: 16px 24px;
  border: 1px solid var(--hb-line);
  border-radius: 12px;
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.hb.app .app-sks-page .app-store-facts {
  margin-top: 0;
}
.hb.app .app-sks-page .app-store-facts + .app-apps-row {
  margin-top: 12px;
  border-top: 1px solid var(--hb-line);
  min-height: 0;
  padding: 12px 0 0;
}
.hb.app .app-store-sk {
  display: grid;
  gap: 4px;
  margin: 8px -8px -8px;
  padding: 0;
  list-style: none;
}
.hb.app .app-store-skb {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hb.app .app-store-skb:hover {
  background: var(--hb-card-2);
}
.hb.app .app-store-skb > span {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.hb.app .app-store-skb b {
  font-size: 14px;
  font-weight: 500;
}
.hb.app .app-store-skb span span {
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 19px;
}
.hb.app .app-store-skb > svg {
  flex: none;
  color: var(--hb-muted);
}
@media (max-width: 760px) {
  .hb.app .app-sks-md {
    padding: 12px 14px;
  }
  .hb.app .app-sks-page .app-store-ha {
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  /* Com quatro páginas, no celular estreito a fileira fica só com os nomes. */
  .hb.app .app-store-tabs .app-store-nav > svg {
    display: none;
  }
  .hb.app .app-store-tabs button.app-store-nav {
    padding: 0 10px;
  }
}
@media (max-width: 480px) {
  /* Habilidades no celular estreito: o nome inteiro (em até duas linhas) vale mais que o criador e que a palavra do botão. */
  .hb.app .app-sks .app-store-by {
    display: none;
  }
  .hb.app .app-sks .app-store-n b,
  .hb.app .app-sks .app-store-l {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
  }
  .hb.app .app-sks .app-store-row {
    align-items: flex-start;
  }
  .hb.app .app-sks .app-store-go:not(.app-sks-on) > span {
    display: none;
  }
}

/* ---------------------------------------------------------------- controle do computador (prancha 23) */
.app-dlg.cc-dlg {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100% - 32px);
  overflow-y: auto;
}
.hb .cc-opt {
  min-height: 56px;
  cursor: default;
}
.hb .cc-opt:hover {
  background: none;
}
.cc-opt .hb-btn {
  flex: none;
}
.cc-ok,
.hb.app .card-l.cc-ok {
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  flex: none;
}
.cc-busy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--hb-muted);
  font-size: 13px;
}
.cc-wait {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}
.cc-dlg .hb-foot .hb-btn {
  gap: 8px;
}
.cc-detail {
  margin: 0;
  padding: 10px 12px;
  max-height: 140px;
  overflow: auto;
  border-radius: 10px;
  background: var(--hb-card);
  color: var(--hb-muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cc-row > .card-t {
  flex: 1;
  min-width: 0;
}


/* ---------------------------------------------------------------- lista: abas, fixados, pastas e menus
   Medidas do app de referência (26/11/2026, tema escuro, janela de 1512): abas de 32 px com texto 13/18 peso 500 e
   recuo 4 6, o selecionado com uma linha de 2 px embaixo; o botão das opções de 28x28; fixados em peças de 72x102
   (recuo 4 2, canto 8) com o boneco de 56; título da pasta 13 peso 600 com a pasta à direita. */
.hb.app .app-tabs {
  display: flex;
  height: 32px;
  flex: none;
  align-items: stretch;
  gap: 4px;
  padding: 0 8px;
  border-bottom: 1px solid var(--divider);
}
.hb-win:not([data-view='bots']) .app-tabs {
  display: none;
}
.hb.app .app-tabs-r {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
}
.hb.app button.app-tab {
  position: relative;
  padding: 4px 6px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}
.hb.app button.app-tab:hover {
  color: var(--text-2);
}
.hb.app button.app-tab[aria-selected='true'] {
  color: var(--text);
}
.hb.app button.app-tab[aria-selected='true']::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.hb.app button.app-opts {
  position: relative;
  align-self: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  color: var(--text-3);
}
.hb.app button.app-opts:hover,
.hb.app button.app-opts[aria-expanded='true'] {
  background: var(--surface-3);
  color: var(--text);
}
.hb.app .app-opts-d {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hb-badge-bg);
}
.hb.app .hb-win[data-side='mini'] .app-tabs,
.hb.app .hb-win[data-side='mini'] .app-fold-h,
.hb.app .hb-win[data-side='mini'] .app-pin-n,
.hb.app .hb-win[data-side='mini'] .app-pin .hb-role {
  display: none;
}
.hb.app .app-pins,
.hb.app .app-fold {
  flex: none;
}
.hb.app .app-pins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px 0 8px;
}
.hb.app button.app-pin {
  display: flex;
  width: 72px;
  height: 102px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  border-radius: 8px;
  text-align: center;
}
.hb.app button.app-pin:hover {
  background: var(--hb-hover);
}
.hb.app button.app-pin[aria-current='true'] {
  background: var(--hb-selected);
}
.hb.app .app-pin-av {
  position: relative;
  display: flex;
  width: 56px;
  height: 56px;
  flex: none;
  align-items: center;
  justify-content: center;
}
.hb.app .app-pin-n {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-pin .hb-role {
  max-width: 100%;
  height: 20px;
  overflow: hidden;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--hb-hover);
  color: var(--hb-readable);
  font-size: 13px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .hb-row-av {
  position: relative;
}
.hb.app .app-badge {
  position: absolute;
  z-index: 1;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--hb-badge-bg);
  box-shadow: 0 0 0 2px var(--surface);
  color: var(--hb-badge-fg);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.hb.app .app-badge-dot,
.hb.app .app-badge-wait {
  min-width: 0;
  width: 12px;
  height: 12px;
  padding: 0;
}
.hb.app .app-badge-wait {
  right: auto;
  left: -2px;
  background: var(--amber);
}
.hb.app .app-badge-fold {
  position: static;
  box-shadow: none;
}
.hb.app .hb-row[data-unread] .hb-row-n > span:first-child {
  font-weight: 600;
}
.hb.app .app-muted {
  display: inline-flex;
  flex: none;
  margin-left: 4px;
  color: var(--text-4);
}
.hb.app .app-fold {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hb.app .app-fold-b {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hb.app .app-fold-b[hidden] {
  display: none;
}
.hb.app button.app-fold-h {
  display: flex;
  width: 100%;
  height: 32px;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 0 8px;
  border-radius: 8px;
  text-align: left;
}
.hb.app button.app-fold-h:hover {
  background: var(--hb-hover);
}
.hb.app .app-fold-n {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-fold-c {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}
.hb.app .app-fold-e {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--text-3);
}
.hb.app .app-fold-hidden .app-fold-n {
  color: var(--text-3);
}
/* Pasta dentro de pasta: o nome da de fora vem antes, mais claro ("Clientes / 2026"). */
.hb.app .app-fold-p {
  color: var(--text-3);
  font-weight: 500;
}
.hb.app .app-fold .app-fold > button.app-fold-h {
  margin-top: 2px;
}
#ctx .app-menu {
  z-index: 80;
}
.hb.app .app-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--hb-menu-edge);
}
.hb.app button.app-menu-i[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.hb.app button.app-menu-danger,
.hb.app button.app-menu-danger svg {
  color: var(--red);
}
.hb.app .app-menu-n,
.hb.app .app-menu-go {
  display: inline-flex;
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
}
.hb.app .app-opts-m {
  min-width: 230px;
}
.hb.app .app-mk {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--text-4);
  border-radius: 50%;
  color: var(--hb-sheet);
}
.hb.app .app-mk[data-on='true'],
.hb.app .app-mk[data-on='mixed'] {
  border-color: var(--text);
  background: var(--text);
}
.hb.app button.app-menu-i[aria-expanded='true'] {
  background: var(--hb-menu-hover);
}
/* O nome da pasta editado na própria lista (renomear e criar): 36 de altura, letra 13, recuo 8 e 32 à direita
   para a seta de 16, como o editor de seção da referência (app-shell.css:1943-1970). */
.hb.app .app-fold-ed {
  position: relative;
  height: 36px;
  margin-top: 4px;
}
.hb.app .app-fold-in {
  display: block;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 32px 0 8px;
  border: 1px solid var(--text-3);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: 0;
}
.hb.app .app-fold-in[aria-invalid='true'] {
  border-color: var(--red);
}
.hb.app .app-fold-in::placeholder {
  color: var(--text-3);
}
.hb.app .app-fold-ed > svg {
  position: absolute;
  top: 50%;
  right: 9px;
  color: var(--text-3);
  pointer-events: none;
  transform: translateY(-50%);
}
.hb.app .app-fold-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* O painel "o que abrir": uma coluna de botões no meio, sem cabeçalho (na tela estreita ele tem o fechar). */
.hb.app .app-launcher {
  background: var(--hb-side);
}
.hb.app .app-launch {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0;
}
.hb.app .app-launch-l {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 48px;
}
.hb.app button.app-launch-b {
  display: flex;
  width: min(272px, 100%);
  height: 34px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--hb-hover);
  color: var(--text-2);
  font-size: 14px;
  line-height: 18px;
  text-align: left;
}
.hb.app button.app-launch-b svg {
  flex: none;
  color: var(--text-3);
}
.hb.app button.app-launch-b:hover,
.hb.app button.app-launch-b:focus-visible {
  background: var(--hb-ctl-hover);
  color: var(--text);
}
@media (min-width: 761px) {
  /* Medida do app de referência: botões de 190 x 24 em coluna centrada. */
  .hb.app button.app-launch-b {
    width: auto;
    min-width: min(190px, 100%);
    height: 24px;
    white-space: nowrap;
    gap: 8px;
    padding: 0 8px;
    background: transparent;
    font-size: 13px;
  }
  .hb.app button.app-launch-b:hover,
  .hb.app button.app-launch-b:focus-visible {
    background: var(--hb-hover);
  }
  .hb.app .app-launch-l {
    padding-bottom: 0;
  }
}

/* Ações da mensagem: ao lado do balão, na mesma fileira, só com o ícone (3 botões de 24 = 76 de largura). Somem
   pela opacidade e o balão não reserva lugar embaixo. Em tela estreita não há lugar ao lado: ficam embaixo. */
.hb.app .app-acts button {
  width: 24px;
  justify-content: center;
  padding: 0;
}
.hb.app .app-acts button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.hb.app .app-acts button svg {
  width: 14px;
  height: 14px;
}
.hb.app .app-bub {
  display: flex;
  position: relative;
  align-self: flex-end;
  max-width: min(80%, 720px);
}
.hb.app .app-bub > .hb-me {
  max-width: 100%;
}
@media (max-width: 760px) {
  .hb.app .app-bub {
    flex-direction: column;
    align-items: flex-end;
    max-width: 88%;
  }
}
@media (min-width: 761px) {
  .hb.app .hb-answer {
    position: relative;
  }
  .hb.app .hb-answer > .app-acts,
  .hb.app .app-bub > .app-acts {
    position: absolute;
    z-index: 2;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
  }
  .hb.app .hb-answer > .app-acts {
    left: calc(100% + 6px);
  }
  .hb.app .app-bub > .app-acts {
    right: calc(100% + 6px);
  }
  /* A ponte entre o balão e as ações: o mouse passa de um para o outro sem perder o "em cima". */
  .hb.app .app-acts::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -8px;
    width: 8px;
  }
  .hb.app .app-bub > .app-acts::before {
    right: -8px;
    left: auto;
  }
  .hb.app[data-acts='compact'] .app-bub:hover .app-acts {
    opacity: 1;
  }
  .hb.app .app-turn > .hb-answer,
  .hb.app .app-signed > .hb-answer {
    max-width: calc(100% - 96px);
  }
  .hb.app .hb-answer > .app-acts .app-act-t,
  .hb.app .app-bub > .app-acts .app-act-t {
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------- a barra do painel da direita
   Medidas do app de referência (25/11/2026, janela de 1512 px): no alto da coluna do painel, a 6 px do topo, com os
   mesmos 28 px de controle do cabeçalho da conversa. As abas são as mesmas do cabeçalho (.app-htab); à direita,
   "Adicionar painel", "Maximizar" e "Fechar o painel". Com o painel aberto, o cabeçalho da conversa acaba onde
   ele começa. */
.hb.app .app-pbar[hidden] {
  display: none;
}
.hb.app .app-pbar {
  grid-row: 1;
  grid-column: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 2px 8px 0 8px;
}
.hb.app .app-ptabs {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.hb.app .app-pbar-r {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.hb.app .hb-win[data-card] .hb-top-main {
  grid-column: 3;
}
/* Maximizar só existe com o painel ao lado da conversa (acima de 1100 px, o complemento exato do bloco de até 1100); abaixo disso o botão some e a marca antiga não vale. */
@media (width > 1100px) {
  .hb.app .hb-win[data-card][data-max] .hb-top-main,
  .hb.app .hb-win[data-card][data-max] .hb-main {
    display: none;
  }
  .hb.app .hb-win[data-card][data-max] .app-pbar,
  .hb.app .hb-win[data-card][data-max] .hb-panel {
    grid-column: 3 / -1;
  }
}
@media (max-width: 1100px) {
  /* O painel toma o lugar do corpo da conversa, mas o cabeçalho dela fica em cima, com os controles dele. Abaixo vem
     a barra do painel e, no resto da altura, o painel. Por isso a janela ganha uma linha a mais. */
  .hb.app .hb-win[data-card] {
    grid-template-rows: var(--hb-top-h) var(--hb-top-h) minmax(0, 1fr);
  }
  .hb.app .hb-win[data-card] .hb-top-main {
    grid-row: 1;
    grid-column: 3;
  }
  .hb.app .hb-win[data-card] .hb-rail {
    grid-row: 2 / 4;
    grid-column: 1;
  }
  .hb.app .hb-win[data-card] .hb-side {
    grid-row: 2 / 4;
    grid-column: 2;
  }
  .hb.app .hb-win[data-card] .app-pbar {
    grid-row: 2;
    grid-column: 3;
  }
  .hb.app .hb-win[data-card] .hb-panel,
  .hb.app .hb-win[data-card] .app-splits {
    grid-row: 3;
  }
  .hb.app .app-pbar [data-do='pmax'] {
    display: none;
  }
  /* Com o corpo coberto, o que age sobre ele não tem o que mostrar: a fileira de tópicos (com o "+" e a seta) e as
     fixadas (o "ir até a mensagem" rolaria o corpo escondido). Nome do bot, modelo e recolher a lista seguem. */
  .hb.app .hb-win[data-card] .hb-top-main .app-htabs,
  .hb.app .hb-win[data-card] .hb-top-main .app-pin-b {
    display: none;
  }
}
@media (max-width: 760px) {
  .hb.app:is([data-pane='main'], [data-pane='card']) .hb-win[data-card] .hb-top-main {
    grid-column: 1 / 3;
  }
  /* Na lista (a seta "voltar" do cabeçalho), a lista fica inteira; o painel continua aberto e volta com a conversa. */
  .hb.app[data-pane='list'] .hb-win[data-card] :is(.hb-panel, .app-pbar, .app-splits) {
    display: none;
  }
  .hb.app .hb-win[data-card] .app-pbar {
    grid-column: 1 / 3;
    background: var(--hb-frame);
  }
  .hb.app .hb-win[data-card] .hb-panel,
  .hb.app .hb-win[data-card][data-split] > .hb-panel {
    grid-row: 3;
  }
}

/* ---------------------------------------------------------------- os grupos do painel da direita (rodada C2)
   Lido no app de referência (SidePanel.tsx, side-panel.css, side-split-layout.ts): até 2 grupos novos EMPILHADOS embaixo
   do principal, cada um com a fileira de abas de 38 px; o divisor tem 16 px de área de pegar (a linha de 1 px aparece
   com o ponteiro ou o foco), cursor de linha; mínimos de 120 px por grupo novo e 160 px para o principal. */
.hb.app .app-splits[hidden] {
  display: none;
}
.hb.app .app-splits {
  position: relative;
  z-index: 14;
  grid-row: 2;
  grid-column: 4;
  align-self: end;
  display: flex;
  min-height: 0;
  height: calc(var(--split-share, 0.5) * 100%);
  flex-direction: column;
  border-left: 1px solid var(--hb-line);
  background: var(--hb-side);
}
.hb.app .hb-win[data-split] > .hb-panel {
  align-self: start;
  height: calc((1 - var(--split-share, 0.5)) * 100%);
  min-height: 0;
}
.hb.app .app-split {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-split:has(+ .app-split) {
  flex-grow: calc(1 - var(--split-lower, 0.5));
}
.hb.app .app-split + .app-split {
  flex-grow: var(--split-lower, 0.5);
}
.hb.app .app-split-h {
  display: flex;
  height: 38px;
  flex: none;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 8px;
}
.hb.app .app-split-b {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.hb.app .app-split-b > .hb-panel {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  margin: 0;
  border: 0;
  animation: none;
}
.hb.app .app-split-rz {
  position: absolute;
  z-index: 40;
  inset-inline: 0;
  top: 0;
  display: flex;
  height: 16px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: row-resize;
  touch-action: none;
  transform: translateY(-50%);
  user-select: none;
}
.hb.app .app-split-rz::after {
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-3) 50%, transparent);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}
.hb.app .app-split-rz:hover::after,
.hb.app .app-split-rz:focus-visible::after,
.hb.app .app-split-rz[data-active]::after {
  opacity: 1;
}
.hb.app .app-split-rz:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--hb-line-2, var(--hb-line));
}
html.hb-rowing {
  cursor: row-resize;
  user-select: none;
}
/* As abas dos grupos de baixo: o mesmo desenho da barra de cima, sem a forma que se junta ao quadro. */
.hb.app .app-split-h .app-tab.app-htab[aria-selected='true'] {
  background: var(--hb-card);
}
.hb.app .app-split-h button.app-tab[aria-selected='true']::after {
  display: none;
}
/* A fileira de abas rola para o lado (a roda do mouse também) e esmaece nas pontas, como no app de referência;
   cada aba tem 140 px e encolhe até 96. */
.hb.app .app-pbar .app-ptabs,
.hb.app .app-split-h .app-ptabs {
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 9px 4px;
  margin: 0 -9px -4px;
}
.hb.app .app-ptabs::-webkit-scrollbar {
  display: none;
}
.hb.app .app-pbar .app-ptabs > .app-tab.app-htab,
.hb.app .app-split-h .app-ptabs > .app-tab.app-htab {
  min-width: 96px;
}
.hb.app .app-pbar-r:not([data-crowded]) > [data-do='pg-all'],
.hb.app .app-pbar-r[data-crowded] > :is([data-do='ptab-add'], [data-do='pg-add'], [data-do='pg-more'], [data-do='pmax']) {
  display: none;
}
.hb.app .app-ptabs[data-fade-start] {
  mask-image: linear-gradient(to right, transparent, #000 48px);
}
.hb.app .app-ptabs[data-fade-end] {
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
.hb.app .app-ptabs[data-fade-start][data-fade-end] {
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.hb.app .app-ptabs[data-frozen] > .app-tab {
  flex: 0 0 var(--ptab-frozen);
  max-width: none;
  min-width: 0;
}
.hb.app .app-ptabs > .app-tab:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.hb.app .app-menu-i .pg-ic {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
  align-items: center;
  justify-content: center;
}
.hb.app .app-menu-i[aria-current='true'] {
  background: var(--hb-hover);
}
@media (width > 1100px) {
  .hb.app .hb-win[data-card][data-max] .app-splits {
    grid-column: 3 / -1;
  }
}
@media (max-width: 1100px) {
  .hb.app .hb-win[data-card] .app-splits {
    grid-column: 3;
  }
}
@media (max-width: 760px) {
  .hb.app .hb-win[data-card] .app-splits {
    grid-row: 3;
    grid-column: 1 / 3;
    border-left: 0;
  }
}

/* ---------------------------------------------------------------- o funil da busca (rodada 3)
   Medidas do app de referência: um botão de 28 px no fim da pílula da busca, com uma bolinha quando há filtro
   ligado. O menu tem as conversas (rádio), não lidas e trabalhando, as pastas e a ordem; os números ficam à direita. */
.hb.app .app-fbtn {
  position: relative;
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  margin-right: -10px;
  border-radius: 999px;
  color: var(--text-3);
}
.hb.app .app-fbtn:hover,
.hb.app .app-fbtn[aria-expanded='true'],
.hb.app .app-fbtn[data-on] {
  background: var(--hb-ctl-active);
  color: var(--text);
}
.hb.app .app-fbtn[data-on]::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
}
.hb.app .app-filter-m {
  min-width: 220px;
}
.hb.app .app-filter-m .app-menu-n {
  font-variant-numeric: tabular-nums;
}
.hb.app .app-fbadge {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  margin-left: auto;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hb-hover);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.hb.app .app-fbadge + .app-menu-go {
  margin-left: 0;
}
.hb.app .app-none p {
  margin: 0 0 10px;
}
/* O grupo "Não lidas" da ordem "não lidas num grupo": um título com o número e uma linha embaixo. */
.hb.app .app-grp {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hb-line);
}
.hb.app .app-grp-h {
  display: flex;
  box-sizing: border-box;
  height: 32px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}
.hb.app .app-grp-c {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hb-hover);
  font-size: 13px;
  font-weight: 650;
}

/* O grupo "Precisa de você": o mesmo título do grupo das não lidas, com o número em âmbar, e a linha de quem espera. */
.hb.app .app-grp-wait .app-grp-c {
  background: var(--hb-warn);
  color: var(--hb-side);
}
.hb.app .hb-row .app-wait {
  display: inline-flex;
  align-self: end;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 5px;
  border-radius: 999px;
  background: var(--hb-warn-soft);
  color: var(--hb-warn-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.hb.app .hb-row .app-wait svg {
  width: 11px;
  height: 11px;
}
@container (max-width: 300px) {
  .hb.app .hb-row .app-wait {
    width: 18px;
    height: 18px;
    justify-content: center;
    padding: 0;
  }
  .hb.app .hb-row .app-wait svg {
    width: 12px;
    height: 12px;
  }
  .hb.app .hb-row .app-wait-l {
    display: none;
  }
}
/* O selo de quem espera: uma pílula âmbar com o ícone do pedido, no canto de baixo do boneco, com um anel da cor do fundo. */
.hb.app .app-badge-need {
  top: auto;
  right: -6px;
  bottom: -4px;
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: var(--hb-warn);
  box-shadow: none;
  color: var(--surface);
}
.hb.app .app-badge-need svg {
  width: 12px;
  height: 12px;
}

/* Canais apagados (lista da esquerda, ligada pelo menu do espaço livre): o título de 13/400 sem respiro e, embaixo, as
   linhas de sempre ou uma frase; a prévia de um canal apagado só avisa que não se escreve nele. Medidas do app de referência. */
.hb.app .app-gone {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.hb.app .app-gone-h {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}
.hb.app .app-gone-none {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-chan-gone {
  flex: none;
  border-top: 1px solid var(--hb-line);
}

.hb.app .app-free {
  flex: 1 0 76px;
  min-height: 76px;
}
/* A ordem manual: as linhas se arrastam. As soltas ficam numa caixa só delas (para a pasta de destino poder acender). */
.hb.app .app-loose {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  border-radius: 8px;
}
.hb.app .hb-row[data-drag] {
  cursor: grab;
}
.hb.app .app-list[data-dragging],
.hb.app .app-list[data-dragging] .hb-row,
.hb.app .app-list[data-dragging] .app-fold-h {
  cursor: grabbing;
}
.hb.app .app-list[data-dragging] .hb-row {
  transition: none;
  will-change: transform;
}
.hb.app .app-list[data-dragging] .hb-row:hover:not([aria-current='true']) {
  background: transparent;
}
.hb.app .app-row-drag {
  z-index: 1;
  opacity: 0;
}
.hb.app .app-loose.app-drop,
.hb.app .app-fold.app-drop {
  background: var(--hb-drop-soft);
  box-shadow: inset 0 0 0 1px var(--hb-drop-edge);
}
.hb.app button.app-pin.app-drag-card {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  margin: 0;
  background: var(--hb-raised);
  box-shadow: var(--shadow-pop);
  contain: layout paint style;
  opacity: 0.96;
  pointer-events: none;
  will-change: transform;
}

/* ---------------------------------------------------------------- Pergunta à parte
   O painel da direita com a conversa só entre a pessoa e o bot. Medidas do app de referência (26/11/2026): o vazio
   fica no meio, com ícone de 24 px, título de 14 px e uma linha de até 320 px; embaixo, a mesma caixa de mensagem
   da conversa, só com o botão de enviar. */
.hb.app .app-side {
  background: var(--hb-side);
}
.hb.app .app-sq {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.hb.app .app-sq-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}
.hb.app .app-sq-msgs {
  flex: none;
  overflow: visible;
}
.hb.app .app-sq-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 16px;
  text-align: center;
}
.hb.app .app-sq-empty svg {
  margin-bottom: 4px;
  color: var(--hb-muted);
}
.hb.app .app-sq-empty strong {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .app-sq-empty p {
  max-width: 320px;
  margin: 0;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-sq-note:empty {
  display: none;
}
/* A faixa de erro (medidas do app de referência, composer-stack.css e notices.css): um cartão de canto 14 e
   borda de 1 px que entra 24 px por baixo da caixa de escrever, com o ícone, o título e a frase na mesma linha
   (15/20) e o botão de 24 de altura à direita. */
.hb.app .app-sq-note:not(:empty) {
  position: relative;
  z-index: 1;
  margin: 0 12px -24px;
  padding-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.hb.app .app-sq-note .app-notice {
  min-height: 37px;
  margin: 0;
  padding: 6px 6px 6px 13px;
  gap: 7px;
  border-radius: 0;
  background: var(--hb-danger-soft);
  color: var(--red);
  font-size: 15px;
  line-height: 20px;
}
.hb.app .app-sq-note .app-notice > svg {
  flex: none;
}
.hb.app .app-sq-copy {
  min-width: 0;
  flex: 1;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.hb.app .app-sq-note .app-notice b {
  margin-inline-end: 6px;
  color: var(--red);
  font-weight: 600;
}
.hb.app .app-sq-retry {
  flex: none;
  height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}
.hb.app .app-sq-retry:hover:not(:disabled) {
  background: color-mix(in srgb, var(--red) 24%, transparent);
}
.hb.app .app-sq-retry:disabled {
  opacity: 0.5;
}
.hb.app .app-sq-composer {
  position: relative;
  z-index: 2;
  flex: none;
  /* o fundo de superfície do app de referência (#212121 no escuro, branco no claro) */
  background: var(--surface-2);
}
/* A pergunta "conversa nova?" aberta pelo "+": o rosto do bot em cima, como no app de referência. */
.hb.app .app-dlg-face {
  display: flex;
  margin-bottom: 12px;
}
.hb.app .app-dlg-err {
  color: var(--red);
}
@media (max-width: 760px) {
  .hb.app .app-sq-composer textarea {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------- cartões da ficha (Avançado, Permissões, Rotinas) */

/* Medidas do app de referência (conferido em 26/11/2026): um cartão por ação ou chave, 16 de vão entre eles. */
.card-page.card-main {
  gap: 16px;
}
.card-tiles {
  display: grid;
  gap: 8px;
}
.card-tile {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--hb-tile);
  color: var(--text);
}
label.card-tile {
  cursor: pointer;
}
.card-tile.card-tile-s {
  min-height: 52px;
  padding-block: 8px;
}
.card-tile > .card-t {
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.card-tile .card-l {
  flex: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.card-tile .card-d {
  max-width: 194px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 15px;
}
.hb.app .card-tile .hb-btn.hb-sm {
  flex: none;
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
}
/* O botão que apaga, nos cartões e nas janelas de confirmação: vermelho suave, não cheio. */
.hb.app .hb-btn.card-soft-red,
.hb.app .hb-btn.card-soft-red:hover {
  background: var(--hb-danger-soft) !important;
  color: var(--red) !important;
}
.card-tile .toggle {
  width: 24px;
  height: 14px;
  border-radius: 7px;
}
.card-tile .toggle::after {
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
}
.card-tile .toggle:checked::after {
  transform: translateX(10px);
}

/* A linha com escolha (select sem borda, valor à direita) e o caminho da pasta, dentro do grupo. */
.card-pick {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  color: var(--text-3);
}
.card-pick select {
  max-width: 100%;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-align: right;
  text-align-last: right;
  appearance: none;
  -webkit-appearance: none;
  outline: 0;
  cursor: pointer;
}
.card-pick select:focus-visible {
  color: var(--text);
}
.card-pick select option {
  background: var(--surface);
  color: var(--text);
}
.card-pick > svg {
  position: absolute;
  right: 0;
  pointer-events: none;
}
.card-main .card-path {
  padding: 11px 12px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
  user-select: text;
}

/* Rotinas: um cartão por rotina, no lugar do grupo de linhas. Medidas do app de referência (26/11/2026): cartão de
   raio 14 com borda de 1, mínimo de 52, ícone de 16 a 12 do texto, chave de 36 por 20 a 16 da borda. */
.card-page.rt-lista {
  gap: 8px;
}
.rt-list {
  display: grid;
  gap: 8px;
}
.rt-card {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 0;
  border: 1px solid var(--hb-card-line);
  border-radius: 14px;
  background: var(--surface-2);
}
.rt-card .rt-open {
  align-self: stretch;
  padding: 8px 0 8px 16px;
}
.rt-card .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
}
.rt-card .toggle::after {
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
}
.rt-card .toggle:checked::after {
  transform: translateX(16px);
}
.rt-ic {
  display: inline-flex;
  flex: none;
  color: var(--text-3);
}
.rt-ic.rt-ic-on {
  color: var(--green);
}
.rt-card-off .rt-n {
  color: var(--text-2);
}

/* ---------------------------------------------------------------- cor da conversa do bot
   A linha da ficha leva uma bolinha de 14 px; a caixa abre presa à linha. As cores da área e da faixa
   (gradientes de matiz, saturação e brilho) são do próprio seletor. */
.cc-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-inline-start: 8px;
  border-radius: 999px;
  vertical-align: -3px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.cc-none {
  position: relative;
  overflow: hidden;
  background: var(--hb-card);
}
.cc-none::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--text-3) calc(50% - 1px), var(--text-3) calc(50% + 1px), transparent calc(50% + 1px));
}
.cc-pop {
  position: fixed;
  z-index: 30;
  box-sizing: border-box;
  width: 288px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  --cc-h: 160;
  animation: mp-in 120ms ease;
}
.cc-sv {
  position: relative;
  box-sizing: border-box;
  width: 264px;
  height: 160px;
  border-radius: 12px;
  touch-action: none;
  cursor: crosshair;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--cc-h) 100% 50%));
}
.cc-knob {
  position: absolute;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  translate: -50% -50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.cc-hue .cc-knob {
  top: 50%;
}
/* A lupa do arrasto (rodada I3): gota de 40 acima do ponto, com a cor de agora. Medidas da referência. */
.cc-loupe {
  position: absolute;
  z-index: 1;
  bottom: calc(100% + 14px); /* 12 acima do ponto: o ponto daqui tem borda de 2, e a medida corre pela caixa de dentro */
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  pointer-events: none;
  transform: rotate(var(--cc-tilt, 0deg));
  transform-origin: 50% 130%;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
  animation: cc-loupe-lift var(--cc-lift-ms, 213ms) var(--cc-lift-ease, ease-out) both;
}
.cc-loupe-drop {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 3px solid #fff;
  border-radius: 999px 999px 999px 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  rotate: -45deg;
}
@keyframes cc-loupe-lift {
  from {
    opacity: 0;
    translate: 0 16px;
    scale: 0.3;
  }
}
.cc-line {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 264px;
}
.cc-hue {
  position: relative;
  flex: 1;
  height: 14px;
  border-radius: 999px;
  touch-action: none;
  cursor: pointer;
  background: linear-gradient(to right, hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%), hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%));
}
.cc-sv:focus-visible,
.cc-hue:focus-visible,
.hb.app .cc-btn:focus-visible,
.hb.app .cc-pre:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: 2px;
}
.hb.app button.cc-btn {
  flex: none;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  background: var(--hb-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.hb.app button.cc-btn:hover {
  background: var(--hb-hover);
}
.cc-eye {
  width: 36px;
}
/* O conta-gotas da referência: fundo transparente, ícone apagado e borda com 11% do texto (chat-color-picker.css:54,196-212). */
.hb.app button.cc-btn.cc-eye {
  border-color: color-mix(in srgb, var(--text) 11%, transparent);
  background: transparent;
  color: var(--text-3);
}
.hb.app button.cc-btn.cc-eye:hover {
  background: transparent;
  color: var(--text);
}
.cc-fmt {
  width: 48px;
}
.cc-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
}
.cc-in {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  background: var(--hb-card);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: 0;
}
.cc-in:focus-visible {
  border-color: var(--border-strong);
}
.cc-num {
  padding: 0 4px 0 8px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.cc-num::-webkit-inner-spin-button,
.cc-num::-webkit-outer-spin-button {
  display: none;
}
.cc-sample {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.cc-pres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 264px;
}
.hb.app button.cc-pre {
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: none;
}
.cc-pre i {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.cc-pre[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--hb-sheet), 0 0 0 4px var(--text);
}

/* ---------------------------------------------------------------- janela de confirmação da ficha (confirm.js) */

/* Medidas do ConfirmDialog do app de referência (conferido em 26/11/2026): largura 460, raio 20, anel de 1 px,
   corpo de 24 com o rosto de 44 à esquerda e 16 de vão, rodapé com linha em cima e botões de 36. */
.hb.app .app-dlg.cf-dlg {
  width: min(460px, 100%);
  max-height: calc(100dvh - 48px);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hb-dialog-ring);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: none;
}
.cf-main {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
}
.cf-media {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.cf-media.cf-ic {
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
}
.cf-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}
.cf-media.cf-ic.cf-ic-red {
  width: 40px;
  height: 40px;
  background: var(--hb-danger-soft);
  color: var(--red);
}
.cf-media.cf-ic.cf-ic-red svg {
  width: 20px;
  height: 20px;
}
.hb.app .cf-text h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.hb.app .cf-text p {
  margin: 0;
  color: var(--text-3);
  font-size: 15px;
  line-height: 22px;
}
.hb.app .cf-text .app-dlg-err {
  color: var(--red);
  font-size: 14px;
  line-height: 20px;
}
.cf-err {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--hb-danger-soft);
  border-radius: 12px;
  background: var(--hb-danger-soft);
  color: var(--hb-readable);
  font-size: 13px;
  line-height: 18px;
}
.cf-err-i {
  display: inline-flex;
  color: var(--hb-danger);
}
.cf-foot .hc-loader {
  margin-right: 8px;
}
.cf-foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--hb-dialog-ring);
}
.hb.app .cf-foot .hb-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.cf-foot .hb-btn svg {
  width: 16px;
  height: 16px;
}

/* O aviso de bot apagado: cartão com o rosto, o nome e o papel, o botão Desfazer e a barra do tempo que resta. */
.hb.app .toast.undo-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 12px 12px 14px 16px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--hb-raised);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-pop);
  color: var(--text);
}
.undo-face {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.undo-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.undo-name,
.undo-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.undo-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.undo-detail {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .toast.undo-card .ta {
  color: var(--text);
  font-size: 14px;
  padding: 6px 10px;
}
/* a faixa do aviso de fuso: canto de cima à direita, a 24 das bordas (16 e de ponta a ponta em tela estreita). */
.hb.app .toasts.tz-region {
  top: max(24px, env(safe-area-inset-top));
  right: 24px;
  bottom: auto;
  left: auto;
  align-items: flex-end;
}
@media (max-width: 600px) {
  .hb.app .toasts.tz-region {
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    left: 16px;
    align-items: stretch;
  }
}
/* nesta faixa o aviso entra descendo de cima e sai subindo (os outros avisos entram de baixo) */
.hb.app .toasts.tz-region .toast {
  animation-name: tzIn;
}
.hb.app .toasts.tz-region .toast.out {
  animation-name: tzOut;
}
@keyframes tzIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes tzOut {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}
/* O aviso de fuso, nas medidas do aviso do app de referência (grade de 4 colunas: quadro 12/16/8, canto 14, 356 de largura;
   título 14/500/20 e frase 13/18 com 4 de vão; os botões de 28, canto 6, respiro 12 e letra 13/500, à direita, "Manter" e
   depois "Mover"; o X de 20 no canto de cima, a 6 para fora). */
.hb.app .toast.tz-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: start;
  row-gap: 12px;
  width: 356px;
  max-width: calc(100vw - 32px);
  min-height: 40px;
  box-sizing: border-box;
  padding: 12px 16px 8px;
  border-radius: 14px;
  background: var(--hb-raised);
  box-shadow: 0 0 0 1px var(--border);
  color: var(--text);
}
.tz-content {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tz-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-wrap: balance;
}
.tz-text {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  text-wrap: pretty;
}
.hb.app .toast.tz-card .hb-btn.tz-b {
  grid-row: 2;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}
.hb.app .toast.tz-card .tz-keep {
  grid-column: 2;
  justify-self: end;
}
.hb.app .toast.tz-card .hb-btn.tz-move {
  grid-column: 3;
  margin-inline: 4px -8px;
}
.hb.app .toast.tz-card .tz-x {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hb-raised);
  box-shadow: 0 0 0 1px var(--border);
  color: var(--text-3);
  cursor: pointer;
}
.hb.app .toast.tz-card .tz-x:hover {
  color: var(--text);
}
.hb.app .toast.tz-card .tz-x:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: 1px;
}
@media (hover: hover) and (pointer: fine) {
  .hb.app .toast.tz-card .tz-x {
    opacity: 0;
    pointer-events: none;
  }
  .hb.app .toast.tz-card:hover .tz-x,
  .hb.app .toast.tz-card:focus-within .tz-x {
    opacity: 1;
    pointer-events: auto;
  }
}
.undo-bar {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
}
.undo-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transition: transform 100ms linear;
}

/* Arquivos da conversa (aba "Arquivos" do painel da direita). Estrutura e medidas lidas no código do app de
   referência (versão 0.79): cabeçalho de 39 px só com o resumo à direita (o título e o fechar ficam na barra do
   painel), conteúdo com 12 px de respiro, linha da pasta de trabalho, busca e ordem, filtros em uma fileira que
   rola, arquivos agrupados por dia. A tela ao vivo não foi medida. */
.hb.app .card-b.card-b-files {
  padding: 0 12px 12px;
  gap: 0;
}
.hb.app .card-b-files > .cf-h {
  display: flex;
  margin: 0 -12px 12px;
  padding: 0 7px 0 11px;
  align-items: center;
  justify-content: flex-end;
}
.hb.app .cf-sum {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.hb.app .cf-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}
.hb.app .cf-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.hb.app .cf-ws {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.hb.app .cf-ws-b {
  display: grid;
  width: 100%;
  height: 36px;
  min-height: 36px;
  font-weight: 500;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  text-align: start;
}
.hb.app .cf-ws-b[data-do='cf-pick'] {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.hb.app .cf-ws-b svg {
  color: var(--text-3);
}
.hb.app .cf-ws-b:hover,
.hb.app .cf-ws-b:focus-visible {
  background: var(--hb-hover);
}
.hb.app .cf-res {
  gap: 12px;
}
.hb.app .cf-pills {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.hb.app .cf-pills .fl-pill {
  flex: none;
}
.hb.app .cf-group {
  display: grid;
  gap: 4px;
}
.hb.app .cf-group + .cf-group {
  margin-top: 8px;
}
.hb.app .cf-day {
  margin: 0;
  padding: 0 4px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .cf-rows {
  margin: 0;
  padding: 0;
  gap: 2px;
  list-style: none;
}
.hb.app .cf-row[data-status='missing'] .fl-name {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--text-4);
}
.hb.app .cf-row[data-status='missing'] .fl-i {
  opacity: 0.5;
}
.hb.app .cf-badge {
  flex: none;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--hb-warn-soft);
  color: var(--hb-warn-text);
  font-size: 12px;
  line-height: 20px;
}
.hb.app .cf-list .fl-none {
  padding: 32px 16px;
}
.hb.app .cf-list .fl-none p {
  max-width: 320px;
}
.hb.app .cf-list .fl-none svg {
  color: var(--red);
}
.hb.app .cf-list .fl-none .cf-t {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

/* Mensagens fixadas: o botão do cabeçalho, a lista que ele abre e o menu de uma mensagem. Lido no código do app de
   referência (versão 0.79): lista de 420 px de largura e até 560 de altura, cada fixada com autor, hora, citação em
   até quatro linhas e, embaixo, de onde veio; soltar aparece com o ponteiro em cima. A tela ao vivo não foi medida. */
.hb.app .app-pin-b {
  margin-left: 0;
}
.hb.app .app-pin-b[aria-expanded='true'] {
  background: var(--hb-card);
  color: var(--hb-text);
}
.hb.app .app-menu.pins-pop {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 16px));
  max-height: min(560px, 76vh);
  padding: 0;
  overflow: hidden;
}
.hb.app .pins-title {
  flex: none;
  margin: 0;
  padding: 12px 12px 4px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}
.hb.app .pins-list {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 0;
  padding: 4px;
  overflow: hidden auto;
  list-style: none;
  overscroll-behavior: contain;
}
.hb.app .pins-item {
  position: relative;
  min-width: 0;
}
.hb.app .pins-item > .pins-jump {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 8px;
}
.hb.app .pins-item > .pins-jump:hover {
  background: var(--hb-hover);
}
.hb.app .pins-item > .pins-jump:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 1px var(--text-3);
}
.hb.app .pins-content {
  position: relative;
  min-width: 0;
  padding: 8px;
  pointer-events: none;
}
.hb.app .pins-ctx {
  margin: 0;
  padding-inline-start: 8px;
  border-inline-start: 2px solid var(--text-4);
  color: var(--text-2);
}
.hb.app .pins-head {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  padding-inline-end: 24px;
}
.hb.app .pins-author {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .pins-time {
  flex: none;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.hb.app .pins-quote {
  max-height: 60px;
  overflow: hidden;
  font-size: 13px;
  line-height: 15px;
  overflow-wrap: anywhere;
}
/* A citação usa a formatação da conversa, apertada: sem os respiros de uma mensagem inteira. */
.hb.app .pins-quote :is(p, ul, ol, pre, blockquote, h1, h2, h3, h4, table) {
  margin: 0;
  font-size: 13px;
  line-height: 15px;
}
.hb.app .pins-quote :is(ul, ol) {
  padding-left: 18px;
}
.hb.app .pins-quote[data-clipped] {
  mask-image: linear-gradient(to bottom, var(--text) 45px, transparent 60px);
}
.hb.app .pins-meta {
  min-width: 0;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .pins-item > .pins-unpin {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 24px;
  height: 24px;
  color: var(--text-3);
  opacity: 0;
}
.hb.app .pins-item:is(:hover, :focus-within) > .pins-unpin {
  opacity: 1;
}
@media (hover: none) {
  .hb.app .pins-item > .pins-unpin {
    opacity: 1;
  }
}
.hb.app .pins-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 24px 24px 32px;
  text-align: center;
}
.hb.app .pins-empty-mark {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 999px;
  background: var(--hb-ctl-hover);
  color: var(--text-2);
}
.hb.app .pins-empty p {
  margin: 0;
}
.hb.app .pins-empty-t {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.hb.app .pins-empty-b {
  max-width: 260px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-wrap: balance;
}

/* ---------------------------------------------------------------- Rascunho, tópico ao lado, traço de ramificação
   Disposição lida no código do app de referência (26/11/2026; tela real não aberta): o botão de abrir ao lado fica
   por cima da hora, a 6 px da borda, e só aparece com o ponteiro, o foco ou quando o tópico já está ao lado. */
.hb.app .app-topic-item {
  position: relative;
  flex: none;
}
.hb.app .app-topic-side {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text);
  opacity: 0;
  translate: 0 -50%;
}
.hb.app .app-topic-side:hover,
.hb.app .app-topic-side:focus-visible {
  background: var(--hb-hover);
}
.hb.app .app-topic-item:is(:hover, :focus-within, [data-beside]) .app-topic-side {
  opacity: 1;
}
.hb.app .app-topic-item:is(:hover, :focus-within, [data-beside]) .app-topic-t {
  visibility: hidden;
}
.hb.app .app-topic-item[data-beside] .app-topic-side:not(:hover) {
  color: var(--hb-muted);
}
@media (hover: none) {
  .hb.app .app-topic-side {
    opacity: 1;
  }
  .hb.app .app-topic-item .app-topic-t {
    visibility: hidden;
  }
}
/* o traço que liga o tópico ramificado ao de origem */
.hb.app .app-stem {
  display: flex;
  flex: none;
  align-self: stretch;
}
.hb.app .app-menu-topic .app-stem {
  margin-block: -6px;
}
.hb.app .app-stem-rail,
.hb.app .app-stem-elbow {
  position: relative;
  width: 16px;
}
.hb.app .app-stem-line::before,
.hb.app .app-stem-elbow::before,
.hb.app .app-stem-elbow::after {
  position: absolute;
  inset-inline-start: 7px;
  border: 0 solid color-mix(in srgb, var(--hb-muted) 60%, transparent);
  content: '';
}
.hb.app .app-stem-line::before,
.hb.app .app-stem-elbow::before {
  inset-block: 0;
  border-inline-start-width: 1px;
}
.hb.app .app-stem-elbow::after {
  top: 50%;
  inset-inline-end: 0;
  border-top-width: 1px;
}
.hb.app .app-stem-last::before {
  inset-inline-end: 0;
  bottom: 50%;
  border-bottom-width: 1px;
  border-end-start-radius: 6px;
}
.hb.app .app-stem-last::after {
  content: none;
}
/* quantos tópicos esperam a pessoa: na aba, no lançador e no menu "Adicionar painel" */
.hb.app .app-count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hb-warn-soft);
  color: var(--hb-warn-text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1;
}
.hb.app .app-launch-b .app-count,
.hb.app .app-menu-i .app-count {
  margin-inline-start: auto;
}
/* arrastar uma aba para mudar de lugar */
.hb.app [data-dragging] {
  cursor: grabbing;
  user-select: none;
}
.hb.app [data-dragging] .app-htab {
  cursor: grabbing;
}
.hb.app .app-htab[data-dragged] {
  z-index: 2;
  background: var(--hb-selected);
}
.hb.app [data-dragging] .app-tab-x {
  opacity: 0;
}
/* a aba que passou para o outro lado do arrasto: a original fica a 40% e uma cópia segue o ponteiro (lido em
   ThreadTabs.tsx e side-panel.css do app de referência: 140 de largura no máximo, borda de 1, centrada no ponteiro) */
.hb.app .app-htab[data-dragged='away'] {
  opacity: 0.4;
}
.hb.app .app-tab.app-tab-ghost {
  position: fixed;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  max-width: 140px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background: var(--hb-selected);
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  translate: -50% -50%;
}
/* o quadro tracejado que acende em cima do painel quando uma aba do chat está por cima dele */
.hb.app .app-tab-drop {
  position: fixed;
  z-index: 999;
  display: grid;
  place-items: start center;
  box-sizing: border-box;
  padding-top: 24px;
  border: 1px dashed var(--text-3);
  border-radius: 12px;
  /* o fundo do painel com o tom de passar o mouse por cima: opaco, para a lista de baixo não aparecer pelo texto */
  background: linear-gradient(var(--hb-hover), var(--hb-hover)), var(--hb-side);
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  pointer-events: none;
}
/* o tópico aberto ao lado da conversa */
.hb.app .app-beside {
  background: var(--hb-side);
}
.hb.app .app-bs {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.hb.app .app-bs-msgs {
  flex: 1;
  min-height: 0;
}
.hb.app .app-bs-composer {
  flex: none;
  background: var(--surface-2);
}
@media (max-width: 760px) {
  .hb.app .app-bs-composer textarea {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------- visualizador de imagem (rodada O)
   A imagem ampliada em cima da tela toda. Medidas lidas no app de referência (versão 0.79, 27/11/2026): barra com
   12 px em cima e 16 dos lados; nome em 500 e a posição apagada, tabulada; botões de ícone de 32 px; o número do
   zoom é um botão de 32 px com 12 de recuo e no mínimo 56 de largura; a imagem tem canto de 8 e nunca passa do
   tamanho real dela; as setas são círculos de 36 px a 16 px da borda e somem até 640 px; a fila de baixo tem
   miniaturas de 40 px com canto de 6, 8 de vão, a atual com anel de 2 px e as outras a meia opacidade. */
:root:not([data-theme='light']) {
  --hb-lightbox: rgba(26, 26, 26, 0.92);
  --hb-page: #ffffff;
}
:root[data-theme='light'] {
  --hb-lightbox: rgba(245, 245, 246, 0.92);
  --hb-page: #ffffff;
}
.hb.app .vw-root[hidden] {
  display: none;
}
.hb.app .vw-root {
  position: fixed;
  z-index: 60;
  inset: 0;
}
/* O fundo é uma camada própria: ele entra e sai por conta dele, enquanto a imagem cresce da miniatura. */
.hb.app .vw-back {
  position: absolute;
  inset: 0;
  background: var(--hb-lightbox);
}
.hb.app .vw[data-closing] .vw-chrome {
  opacity: 0;
}
.hb.app .vw-ghost {
  grid-area: 1 / 1;
  pointer-events: none;
}
.hb.app .vw {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: var(--text);
  outline: none;
}
.hb.app .vw-chrome {
  animation: vw-in 150ms ease-out;
}
@keyframes vw-in {
  from {
    opacity: 0;
  }
}
.hb.app .vw-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.hb.app .vw-cap {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}
.hb.app .vw-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .vw-pos {
  flex: none;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hb.app .vw-acts {
  display: flex;
  flex: none;
  gap: 4px;
}
.hb.app .vw-zoom {
  display: flex;
  align-items: center;
}
.hb.app .vw-b {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-3);
  text-decoration: none;
}
.hb.app .vw-b:hover:not(:disabled) {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app .vw-b:disabled {
  opacity: 0.4;
  cursor: default;
}
.hb.app .vw-lvl {
  width: auto;
  min-width: 56px;
  padding: 0 12px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hb.app .vw-stage {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 0 64px;
  touch-action: none;
}
.hb.app .vw-stage[data-zoomed] {
  overflow: hidden;
}
.hb.app .vw-img {
  grid-area: 1 / 1;
  max-width: min(100%, var(--vw-w, 100%));
  max-height: min(100%, var(--vw-h, 100%));
  border-radius: 8px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.hb.app .vw-img[data-zoomed] {
  cursor: grab;
}
.hb.app .vw-stage[data-dragging] .vw-img {
  cursor: grabbing;
}
.hb.app .vw-img[data-settling] {
  transition:
    scale 240ms ease-out,
    translate 240ms ease-out;
}
.hb.app .vw-pending {
  opacity: 0;
}
.hb.app .vw-error {
  margin: 0;
  color: var(--text-3);
  grid-area: 1 / 1;
}
.hb.app .vw-step {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--hb-card);
  color: var(--text-3);
}
.hb.app .vw-step:hover {
  color: var(--text);
}
.hb.app .vw-prev {
  left: 16px;
}
.hb.app .vw-next {
  right: 16px;
}
.hb.app .vw-strip {
  display: flex;
  overflow-x: auto;
  justify-content: safe center;
  gap: 8px;
  padding: 12px 16px 16px;
  scrollbar-width: none;
}
.hb.app .vw-thumb {
  width: 40px;
  height: 40px;
  flex: none;
  overflow: hidden;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity 150ms ease-out;
}
.hb.app .vw-thumb[aria-current='true'] {
  box-shadow: 0 0 0 2px var(--text);
  opacity: 1;
}
.hb.app .vw-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb.app .vw-thumb:focus-visible,
.hb.app .vw-step:focus-visible,
.hb.app .vw-b:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .hb.app .vw-thumb:hover {
    opacity: 1;
  }
}
@media (max-width: 640px) {
  .hb.app .vw-stage {
    padding: 0;
  }
  .hb.app .vw-step {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.app .vw-chrome,
  .hb.app .vw-thumb {
    animation: none;
    transition: none;
  }
}
/* A imagem de um cartão da fileira em cima do campo abre ampliada. */
.hb.app .app-att-v {
  cursor: zoom-in;
}

/* ---------------------------------------------------------------- prévia de arquivo (rodada O)
   Cada arquivo aberto é uma aba do painel da direita. Medidas lidas no app de referência (versão 0.79,
   27/11/2026): cabeçalho de 39 px com linha embaixo, 8 de vão e recuo 11 / 7; botões de 25 px com ícone de 15 e
   canto de 6; nome em 13 com peso 600; texto em mono 13/1,55 com recuo 18 20 48 e SEM quebra de linha (o botão
   liga a quebra); markdown em coluna de até 760 px; faixa de "cortado" colada embaixo, com borda em cima, fundo de
   controle e recuo 7 12; aviso de "sem prévia" com ícone de 28, título forte e texto de até 260 px. */
.hb.app .app-fpreview {
  background: var(--hb-side);
}
.hb.app .fp {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.hb.app .fp-h {
  display: flex;
  height: 39px;
  flex: none;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--hb-line);
  padding: 0 7px 0 11px;
  color: var(--text-3);
}
.hb.app .fp-h > svg {
  flex: none;
}
.hb.app .fp-h h2 {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .fp-b {
  display: inline-flex;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-3);
  text-decoration: none;
}
.hb.app .fp-b:hover,
.hb.app .fp-b[aria-pressed='true'] {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app .fp-b:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: -2px;
}
.hb.app .fp-c {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: var(--hb-canvas);
  scrollbar-width: thin;
}
.hb.app .fp-state {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.hb.app .fp-err {
  margin: 0;
  color: var(--hb-danger);
}
.hb.app .fp-text {
  min-width: min-content;
  min-height: 100%;
  margin: 0;
  padding: 18px 20px 48px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}
.hb.app .fp-text.fp-wrap {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.hb.app .fp-md {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 26px 48px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.hb.app .fp-md .instr-md {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.hb.app .fp-doc img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border-radius: 8px;
}
.hb.app .fp-doc h1,
.hb.app .fp-doc h2,
.hb.app .fp-doc h3,
.hb.app .fp-doc h4,
.hb.app .fp-doc h5,
.hb.app .fp-doc h6 {
  margin: 20px 0 8px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}
.hb.app .fp-doc h1 {
  font-size: 22px;
}
.hb.app .fp-doc h2 {
  font-size: 18px;
}
.hb.app .fp-doc h3 {
  font-size: 16px;
}
.hb.app .fp-doc h4,
.hb.app .fp-doc h5,
.hb.app .fp-doc h6 {
  font-size: 14px;
}
.hb.app .fp-doc p {
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.hb.app .fp-doc ul,
.hb.app .fp-doc ol {
  margin: 0 0 10px;
  padding-inline-start: 22px;
}
.hb.app .fp-doc-table {
  margin: 0 0 12px;
  overflow-x: auto;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  scrollbar-width: thin;
}
.hb.app .fp-doc-table table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hb.app .fp-doc-table th,
.hb.app .fp-doc-table td {
  border-top: 1px solid var(--hb-line);
  border-inline-end: 1px solid var(--hb-line);
  padding: 6px 10px;
  text-align: start;
  vertical-align: top;
}
.hb.app .fp-doc-table tr:first-child > * {
  border-top: 0;
}
.hb.app .fp-doc-table th {
  background: var(--surface-2);
  font-weight: 600;
}
.hb.app .fp-doc-table tr > :last-child {
  border-inline-end: 0;
}
.hb.app .fp-sheet {
  min-width: 0;
  padding: 16px;
}
.hb.app .fp-sheet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.hb.app .fp-sheet-tab {
  flex: 0 0 auto;
  height: 28px;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  background: transparent;
  padding: 0 10px;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.hb.app .fp-sheet-tab:hover {
  background: var(--hb-hover);
}
.hb.app .fp-sheet-tab[aria-pressed='true'] {
  background: var(--hb-hover);
  color: var(--text);
}
.hb.app .fp-sheet-tab:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: -2px;
}
.hb.app .fp-sheet-wrap {
  overflow: auto;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  background: var(--surface-2);
  scrollbar-width: thin;
}
.hb.app .fp-sheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
}
.hb.app .fp-sheet-table caption {
  padding: 8px 12px;
  color: var(--text-3);
  text-align: start;
}
.hb.app .fp-sheet-table th,
.hb.app .fp-sheet-table td {
  border-top: 1px solid var(--hb-line);
  border-inline-end: 1px solid var(--hb-line);
  padding: 8px 12px;
  text-align: start;
  white-space: pre;
}
.hb.app .fp-sheet-table th {
  background: var(--hb-hover);
  font-weight: 600;
}
.hb.app .fp-sheet-table tr > :last-child {
  border-inline-end: 0;
}
.hb.app .fp-page {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--hb-page);
}
.hb.app .fp-imgwrap {
  display: grid;
  min-height: 100%;
  padding: 20px;
  place-items: center;
}
.hb.app .fp-text .tk-c {
  color: var(--hb-tk-comment);
  font-style: italic;
}
.hb.app .fp-text .tk-s {
  color: var(--hb-tk-string);
}
.hb.app .fp-text .tk-n {
  color: var(--hb-tk-number);
}
.hb.app .fp-text .tk-k {
  color: var(--hb-tk-keyword);
}
.hb.app .fp-text .tk-t {
  color: var(--hb-tk-tag);
}
.hb.app .fp-media {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 20px;
}
.hb.app .fp-audio {
  display: block;
  width: 100%;
}
.hb.app .vp {
  position: relative;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  aspect-ratio: var(--vp-ratio, 16 / 9);
  background: var(--hb-canvas);
  isolation: isolate;
}
.hb.app .vp[popover]:not(:popover-open) {
  display: block;
  inset: auto;
  height: auto;
  margin: 0;
  border: 0;
  padding: 0;
  color: inherit;
}
.hb.app .vp:popover-open {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  overflow: hidden;
  border: 0;
  padding: 0;
  aspect-ratio: auto;
  color: inherit;
}
.hb.app .vp:popover-open::backdrop {
  background: transparent;
}
.hb.app .vp-v {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--hb-canvas);
}
.hb.app .vp-big {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  translate: -50% -50%;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hb-media-surface);
  color: var(--hb-media-text);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.hb.app .vp-big[hidden] {
  display: none;
}
.hb.app .vp-big:hover {
  background: var(--hb-media-surface-hover);
}
.hb.app .vp-big svg {
  width: 22px;
  height: 22px;
  margin-inline-start: 2px;
  fill: currentColor;
}
.hb.app .vp[data-waiting='true'][data-playing='true']::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid var(--hb-media-track);
  border-top-color: var(--hb-media-text);
  border-radius: 50%;
  animation: vp-spin 0.8s linear infinite;
}
@keyframes vp-spin {
  to {
    rotate: 360deg;
  }
}
.hb.app .vp-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 28px 8px 6px;
  background: linear-gradient(to top, var(--hb-media-scrim), transparent);
  color: var(--hb-media-text);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.hb.app .vp:is(:hover, :focus-within) .vp-bar,
.hb.app .vp[data-playing='false'] .vp-bar:focus-within {
  opacity: 1;
}
.hb.app .vp-b {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hb-media-text);
  cursor: pointer;
}
.hb.app .vp-b:hover {
  background: var(--hb-media-hover);
}
.hb.app .vp-b svg {
  width: 16px;
  height: 16px;
}
.hb.app .vp-play svg {
  fill: currentColor;
}
.hb.app .vp-seek {
  flex: 1;
  min-width: 0;
  height: 16px;
  margin: 0 4px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.hb.app .vp-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hb-media-text) var(--vp-seek), var(--hb-media-track) var(--vp-seek));
}
.hb.app .vp-seek::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hb-media-text) var(--vp-seek), var(--hb-media-track) var(--vp-seek));
}
.hb.app .vp-seek::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--hb-media-text);
}
.hb.app .vp-seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--hb-media-text);
}
.hb.app .vp-seek:disabled {
  cursor: default;
  opacity: 0.6;
}
.hb.app .vp-time {
  margin-inline-end: 4px;
  color: var(--hb-media-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hb.app .fp-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.hb.app .fp-trunc {
  position: sticky;
  bottom: 0;
  margin: 0;
  border-top: 1px solid var(--hb-line);
  background: var(--surface-2);
  padding: 7px 12px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.hb.app .fp-unsup {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-3);
  text-align: center;
}
.hb.app .fp-unsup > svg {
  margin-bottom: 4px;
}
.hb.app .fp-unsup strong {
  color: var(--text);
  font-size: 14px;
}
.hb.app .fp-unsup span {
  max-width: 260px;
  font-size: 13px;
  line-height: 1.45;
}
/* O botão de abrir no programa padrão: como o do app de referência (36 de altura, texto 15, 6 de folga em cima). */
.hb.app .fp-unsup .hb-btn.hb-sm.card-b32 {
  margin-top: 6px;
  padding: 0 16px;
  font-size: 15px;
}
.hb.app .fp-folder {
  display: grid;
  margin: 0;
  padding: 8px;
  list-style: none;
}
.hb.app .fp-entry {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 13px;
  text-align: start;
}
.hb.app .fp-entry:hover,
.hb.app .fp-entry:focus-visible {
  background: var(--hb-hover);
}
.hb.app .fp-ename {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .fp-emeta {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hb.app .fp-empty {
  margin: 0;
  padding: 24px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}

/* campo de mensagem com pastilhas: "$" escolhe habilidade, "@" cita bot, arquivo, aba ou tópico */
.hb.app .hb-composer {
  position: relative;
  z-index: 2;
}
.hb-editor {
  flex: 1;
  min-width: 0;
  max-height: 180px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 4px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  outline: 0;
  background: none;
  color: var(--hb-text);
  font: inherit;
  line-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  caret-color: var(--text);
  position: relative;
}
.hb-editor:has(.hb-chip) {
  padding-block: 2px;
  line-height: 24px;
}
.hb-editor.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 4px auto auto 0;
  color: var(--hb-muted);
  pointer-events: none;
  white-space: nowrap;
}
.hb-editor.is-empty:has(.hb-chip)::before {
  top: 2px;
}
.hb-chip {
  display: inline-flex;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  height: 24px;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 6px 4px 4px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--hb-chip-bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
}
.hb-chip[data-kind='skill'] {
  background: var(--hb-chip-skill-bg);
  color: var(--hb-chip-skill-fg);
}
.hb-chip:is([data-kind='tab'], [data-kind='topic']) {
  max-width: min(260px, 100%);
}
button.hb-chip {
  cursor: pointer;
}
.hb-chip[data-kind='bot']:hover,
button.hb-chip:is([data-kind='tab'], [data-kind='topic']):hover {
  background: var(--hb-chip-hover);
  color: var(--text);
}
.hb-chip.hb-gone {
  border: 1px dashed var(--hb-pick-edge);
  background: transparent;
  padding-inline-start: 6px;
  color: var(--hb-muted);
}
.hb-chip-i {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  color: inherit;
}
.hb-chip-i svg {
  width: 12px;
  height: 12px;
}
.hb-chip-i .hc-bot {
  --sz: 16px;
}
.hb-chip-n {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-me .hb-chip-m {
  display: inline-block;
  max-width: 100%;
  height: auto;
  line-height: 16px;
  vertical-align: baseline;
  user-select: text;
}
.hb-me .hb-chip-m .hb-chip-i {
  display: inline-block;
  margin-inline-end: 4px;
  vertical-align: top;
  text-align: center;
}
.hb-me .hb-chip-m .hb-chip-i svg {
  display: inline;
  margin-top: 2px;
  vertical-align: top;
}
.hb-me .hb-chip-m .hb-chip-n {
  display: inline;
}

.hb-pickhost {
  position: relative;
}

/* Moldura de soltar arquivo: cobre a conversa e o tópico ao lado enquanto se arrasta (como a referência: recuo 12, tracejado
   no acento misturado ao texto, fundo a 38%, desfoque 3, letra 16/650). */
.hb-drop {
  position: fixed;
  z-index: 60;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--accent) 70%, var(--text));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 38%, transparent);
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  backdrop-filter: blur(3px);
  pointer-events: none;
}
.hb-pick {
  --pick-row: 29px;
  --pick-gutter: 5px;
  --pick-title: 24px;
  position: absolute;
  z-index: 1;
  right: var(--pick-right, 18px);
  bottom: var(--pick-bottom, 0);
  left: var(--pick-left, 18px);
  padding-bottom: 24px;
  border: 1px solid var(--hb-pick-edge);
  border-radius: 14px;
  background: var(--hb-pick-bg);
  color: var(--text);
  transform-origin: bottom center;
  animation: hb-pick-in 160ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.hb-pick[data-below] {
  top: var(--pick-top, 100%);
  bottom: auto;
  padding: 24px 0 0;
  transform-origin: top center;
}
.hb-pick[data-leaving] {
  pointer-events: none;
  animation: hb-pick-out 120ms ease-out both;
}
.hb-pick[data-leaving] * {
  animation: none;
}
@keyframes hb-pick-in {
  from {
    opacity: 0;
    transform: translateY(5px) scaleY(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes hb-pick-out {
  to {
    opacity: 0;
    transform: translateY(4px) scaleY(0.96);
  }
}
.hb-pick-list {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: calc(var(--pick-rows, 0) * var(--pick-row) + var(--pick-sections, 0) * var(--pick-title) + max(var(--pick-sections, 0) - 1, 0) * 4px + 2 * var(--pick-gutter));
  max-height: calc(7 * var(--pick-row) + 2 * var(--pick-gutter));
  padding: var(--pick-gutter);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.hb-pick-list::-webkit-scrollbar {
  display: none;
}
.hb-pick-sec {
  display: flex;
  height: var(--pick-title);
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 8px 4px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
}
.hb-pick-cnt {
  font-variant-numeric: tabular-nums;
}
.hb-pick-o + .hb-pick-sec {
  margin-top: 4px;
}
.hb-pick-hl {
  position: absolute;
  top: 0;
  right: var(--pick-gutter);
  left: var(--pick-gutter);
  border-radius: 8px;
  background: var(--hb-pick-hover);
  pointer-events: none;
  transition: transform 120ms ease-out, height 120ms ease-out;
}
.hb-pick-hl[data-instant] {
  transition: none;
}
.hb-pick-o {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: var(--pick-row);
  box-sizing: border-box;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-radius: 8px;
  cursor: default;
  text-align: start;
}
.hb-pick-o[data-entering] {
  animation: hb-pick-row 120ms ease-out both;
}
@keyframes hb-pick-row {
  from {
    opacity: 0;
  }
}
.hb-pick-o .hc-bot {
  --sz: 16px;
  flex: none;
  margin-inline: -1px;
}
.hb-pick-ico {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  margin-inline: -1px;
  color: var(--hb-muted);
}
.hb-pick-ico svg {
  width: 15px;
  height: 15px;
}
.hb-pick-o > strong {
  min-width: 0;
  max-width: 50%;
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-pick-o[data-filtering] > strong {
  color: var(--hb-muted);
}
.hb-pick-d {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-pick-slug {
  flex: 0 0 auto;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}
.hb-pick-m {
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.hb-pick-b {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb-pick-b svg {
  width: 12px;
  height: 12px;
}
.hb-pick-status {
  display: flex;
  height: calc(var(--pick-row) + 10px);
  align-items: center;
  margin: 0;
  padding: 0 13px;
  color: var(--hb-muted);
  font-size: 13px;
  line-height: 18px;
}
@media (prefers-reduced-motion: reduce) {
  .hb-pick,
  .hb-pick-hl,
  .hb-pick-o[data-entering] {
    animation: none;
    transition: none;
  }
}
/* Na fala colorida da pessoa a pastilha usa a cor do texto do balão, como no app de referência. */
.hb.app .hb-me .hb-chip[data-kind='skill'] {
  background: color-mix(in srgb, currentColor 16%, transparent);
  color: inherit;
}
.hb.app .hb-me .hb-chip {
  color: inherit;
}
.hb.app .hb-me .hb-chip.hb-gone {
  border-color: color-mix(in srgb, currentColor 40%, transparent);
  color: inherit;
  opacity: 0.8;
}

/* ---------------------------------------------------------------- escolha em lista própria (popselect.js)
   No lugar do <select> do navegador: um botão e um quadro com as opções. Medidas do app de referência (conferidas
   no código dele em 26/11/2026): quadro de canto 8 com 4 de respiro, no máximo 320 de altura; opção de 6 por 8 com
   canto de 6, 13/18 (15/22 nas pastilhas da hora); a escolhida leva o visto à direita. */
.ps {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
}
.ps-rowwrap {
  display: flex;
  width: 100%;
}
.ps-native {
  display: none;
}
:where(.ps-b) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
  text-align: start;
  white-space: nowrap;
}
.ps-b .ps-v {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-b svg {
  flex: none;
}
.ps-pop {
  position: fixed;
  z-index: 200;
  display: flex;
  min-width: 144px;
  max-height: 320px;
  flex-direction: column;
  gap: 1px;
  padding: 4px;
  overflow: hidden auto;
  border-radius: 8px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  scrollbar-width: thin;
  animation: mp-in 120ms ease;
}
.hb.app .ps-o {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  text-align: start;
  white-space: nowrap;
}
.hb.app .ps-o svg {
  flex: none;
  color: var(--text);
}
.hb.app .ps-o:hover,
.hb.app .ps-o:focus-visible {
  background: var(--hb-menu-hover);
  outline: 0;
}
/* a anotação de uma opção (o proxy de um perfil do navegador): ícone e endereço apagados, que encolhem com reticências */
.ps-l,
.ps-v:has(.ps-px),
.ps-v:has(.ps-dot) {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
/* a bolinha de cor do perfil do navegador: 8 de lado, redonda; o compartilhado é cinza. O matiz vem de --ps-hue. */
:root:not([data-theme='light']) {
  --hb-pdot-s: 62%;
  --hb-pdot-l: 62%;
}
:root[data-theme='light'] {
  --hb-pdot-s: 66%;
  --hb-pdot-l: 44%;
}
.ps-dot {
  display: block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 999px;
  background: hsl(var(--ps-hue, 0) var(--hb-pdot-s) var(--hb-pdot-l));
}
.ps-dot[data-shared] {
  background: var(--text-3);
}
.ps-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-px {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: var(--text-3);
}
.ps-px > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* a opção com frase embaixo do nome (a escolha de Velocidade): nome em cima, a frase apagada em 13/18 */
.ps-l.ps-ld {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.ps-ld .ps-t {
  font-size: 14px;
}
.ps-pop[data-desc] {
  width: 300px;
}
.hb.app .ps-pop[data-desc] .ps-o {
  white-space: normal;
}
.ps-d {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}

.hb.app .ps-pop[data-chip] .ps-o {
  font-size: 15px;
  line-height: 22px;
}

/* a linha inteira (Avançado: "Durante o trabalho"): nome à esquerda, valor e setas à direita */
.card-main .hb-lrow.ps-lrow {
  display: block;
  padding: 0;
}
.hb.app .ps-row {
  width: 100%;
  min-height: 40px;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-radius: inherit;
  color: var(--text);
}
.hb.app .ps-row .ps-n {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .ps-row:has(.ps-px) .ps-n {
  flex: none;
}
.hb.app .ps-row .ps-v {
  flex: 0 1 auto;
  max-width: 60%;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.hb.app .ps-row svg {
  color: var(--text-3);
}
.hb.app .ps-row:hover .ps-v {
  color: var(--text-2);
}

/* As opções do agente de fora na ficha (sessionsettings.js): linha de 40, notas de 14/20 apagadas com 8 de respiro. */
.sess-one > .hb-lrow.ps-lrow {
  display: block;
  padding: 0;
}
.sess-sw {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
}
.sess-sw .sess-n {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.sess-notes {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.sess-notes p {
  margin: 0;
  text-wrap: pretty;
}
.sess-one > .sess-notes {
  padding-top: 0;
}
.hb.app .ps-row:hover,
.hb.app .ps-row[aria-expanded='true'] {
  background: var(--hb-hover);
}
.hb.app .ps-row:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* Avançado: o campo do perfil novo, embaixo das linhas de escolha */
.hb.app .adv-new {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hb.app .adv-new .card-in {
  flex: 1 1 auto;
  min-width: 0;
}

/* a ordem dos arquivos: lista pequena (32 de altura, 13 de letra, borda forte, setas de 16) */
.hb.app .fl-sort-b {
  flex: none;
  height: 32px;
  max-width: 45%;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .fl-sort-b svg {
  width: 16px;
  height: 16px;
  color: var(--text-3);
}
.hb.app .fl-sort-b:hover,
.hb.app .fl-sort-b[aria-expanded='true'] {
  background: var(--hb-hover);
}
.hb.app .fl-sort-b:focus-visible {
  outline: 0;
  border-color: var(--text-3);
}
.hb.app .fl-bar {
  align-items: center;
}
.hb.app .fl-bar .ps {
  flex: none;
  max-width: 45%;
}
.hb.app .fl-sort-b {
  max-width: 100%;
}

/* a lista de dentro de um campo da rotina (limite de uso, app fechado) */
.hb.app .card-field > .ps {
  display: flex;
  width: 100%;
  margin: 0;
  color: inherit;
  font: inherit;
}
.hb.app .card-in.ps-field {
  display: flex;
  border: 1px solid var(--border);
  background: var(--hb-field);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  text-align: start;
}
.hb.app .card-in.ps-field svg {
  width: 16px;
  height: 16px;
  color: var(--text-3);
}
.hb.app .card-in.ps-field[aria-expanded='true'] {
  border-color: var(--text-3);
}

/* a hora marcada: as pastilhas abrem a lista, sem as setas (como no app de referência) */
.rt-when .ps-b {
  gap: 0;
  color: var(--text);
  white-space: nowrap;
}
.rt-when .ps-b svg {
  display: none;
}
.rt-when .ps-b:hover,
.rt-when .ps-b[aria-expanded='true'] {
  background: var(--hb-hover);
}

/* a hora e a data da hora marcada: pastilhas que abrem um quadro pequeno (clockpick.js), como no app de referência
   (relógio: campos de 48 por 36, calendário de 7 colunas de 32, quadro com raio 12 e 8 de respiro) */
.cp {
  display: inline-flex;
}
.rt-when .cp-b {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  text-align: start;
}
.rt-when .cp-b:hover,
.rt-when .cp-b[aria-expanded='true'] {
  background: var(--hb-hover);
}
.cp-pop {
  position: fixed;
  z-index: 200;
  padding: 8px;
  border-radius: 12px;
  background: var(--hb-sheet);
  color: var(--text);
  box-shadow: var(--hb-menu-shadow);
  font-size: 14px;
  animation: mp-in 120ms ease;
}
.cp-clock {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cp-pop .cp-seg {
  width: 48px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.cp-pop .cp-seg:focus-visible,
.cp-pop button:focus-visible {
  outline: 2px solid var(--text-3);
  outline-offset: 0;
}
.cp-sep {
  color: var(--text-3);
}
.cp-ampm {
  display: flex;
  margin-inline-start: 4px;
  padding: 2px;
  border-radius: 8px;
  background: var(--surface-3);
}
.cp-am {
  min-width: 44px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.cp-am[aria-pressed='true'] {
  background: var(--text);
  color: var(--hb-sheet);
}
.cp-cal {
  display: grid;
  gap: 4px;
  width: calc(7 * 32px + 6 * 2px);
}
.cp-cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}
.cp-cal-t {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.cp-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.cp-nav:hover:not(:disabled) {
  background: var(--hb-hover);
}
.cp-nav:disabled {
  opacity: 0.32;
  cursor: default;
}
.cp-cal-w,
.cp-cal-d {
  display: grid;
  grid-template-columns: repeat(7, 32px);
  gap: 2px;
}
.cp-cal-w span {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}
.cp-day {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.cp-day:hover:not(:disabled, .cp-day-on) {
  background: var(--hb-hover);
  color: var(--text);
}
.cp-day[aria-current='date']:not(.cp-day-on) {
  color: var(--accent-ink);
}
.cp-day:disabled {
  opacity: 0.32;
  cursor: default;
}
.cp-day.cp-day-on {
  background: var(--text);
  color: var(--hb-sheet);
}

/* Habilidades: a chave de cada linha tem 36 por 20, como a da lista de rotinas */
.sk-item .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  flex: none;
}
.sk-item .toggle::after {
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
}
.sk-item .toggle:checked::after {
  transform: translateX(16px);
}

/* Arquivos: as conversas que mais ocupam, e as telas de vazio, erro e sem resultado da lista */
.hb.app .fl-chats {
  display: grid;
  gap: 8px;
}
.hb.app .fl-h3 {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.hb.app .fl-chat-rows {
  display: grid;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hb-card-line);
  border-radius: 12px;
  background: var(--surface-2);
  list-style: none;
}
.hb.app .fl-chat-rows > li + li {
  border-top: 1px solid var(--hb-card-line);
}
.hb.app .fl-chat {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  text-align: start;
}
.hb.app .fl-chat:hover,
.hb.app .fl-chat:focus-visible {
  background: var(--hb-hover);
  outline: 0;
}
.hb.app .fl-chat-t {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}
.hb.app .fl-chat-n {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .fl-chat-m {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .fl-chat-s {
  flex: none;
  min-width: 72px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.hb.app .fl-page .fl-none {
  gap: 8px;
  padding: 32px 16px;
}
.hb.app .fl-page .fl-none > svg {
  color: var(--red);
}
.hb.app .fl-page .fl-none .fl-none-t {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.hb.app .fl-page .fl-none .fl-none-d {
  max-width: 320px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .fl-page .fl-none .hb-btn {
  gap: 6px;
}

/* ---------------------------------------------------------------- rodada U: arrastar fixados e pastas, e a dica de quem espera
   Os fixados se reordenam (os azulejos andam para abrir o lugar); uma linha solta sobre eles vira fixada; sem fixados,
   uma caixa tracejada de 112 de altura abre no alto da lista durante o arrasto. A pasta arrastada deixa uma linha de 2 px
   antes ou depois da pasta alvo. */
.hb.app button.app-pin[data-pindrag] {
  cursor: grab;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.3, 1);
}
.hb.app .app-list[data-dragging='pin'],
.hb.app .app-list[data-dragging='pin'] .app-pin,
.hb.app .app-list[data-dragging='folder'],
.hb.app .app-list[data-dragging='folder'] .app-fold-h {
  cursor: grabbing;
}
.hb.app .app-list[data-dragging='pin'] .app-pin {
  will-change: transform;
}
.hb.app .app-list[data-dragging='pin'] .app-pin:hover:not([aria-current='true']) {
  background: transparent;
}
.hb.app .app-pins.app-drop,
.hb.app .app-pins-empty.app-drop .app-pins-drop {
  border-radius: 8px;
  background: var(--hb-drop-soft);
  box-shadow: inset 0 0 0 1px var(--hb-drop-edge);
}
.hb.app .app-pins-empty {
  display: block;
  padding: 4px 0 2px;
}
.hb.app .app-pins-empty.app-drop {
  background: transparent;
  box-shadow: none;
}
.hb.app .app-pins-drop {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 112px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--hb-card-line);
  border-radius: 12px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 20px;
}
.hb.app .app-fold {
  position: relative;
}
.hb.app .app-fold.app-fold-before::before,
.hb.app .app-fold.app-fold-after::after {
  position: absolute;
  z-index: 3;
  right: 7px;
  left: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--hb-drop-edge);
  box-shadow: 0 0 0 1px var(--hb-side);
  content: '';
  pointer-events: none;
}
.hb.app .app-fold.app-fold-into > .app-fold-h {
  background: var(--hb-drop-soft);
  box-shadow: inset 0 0 0 1px var(--hb-drop-edge);
}
.hb.app .app-fold.app-fold-before::before {
  top: -4px;
}
.hb.app .app-fold.app-fold-after::after {
  bottom: -4px;
}
.hb.app .app-fold-card {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  display: flex;
  box-sizing: border-box;
  max-width: 240px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--hb-raised);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-size: 13px;
  line-height: 16px;
  opacity: 0.96;
  pointer-events: none;
  will-change: transform;
}
.hb.app .app-fold-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb.app .app-need-tip {
  position: fixed;
  z-index: 95;
  display: grid;
  box-sizing: border-box;
  max-width: min(260px, calc(100vw - 16px));
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--hb-pick-edge);
  border-radius: 6px;
  background: var(--hb-raised);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  pointer-events: none;
}
.hb.app .app-need-tip-t {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--hb-warn-text);
  font-weight: 600;
}
.hb.app .app-need-tip-t svg {
  width: 14px;
  height: 14px;
}
.hb.app .app-need-tip-d {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.hb.app .app-need-tip-h {
  color: var(--text-3);
  font-size: 13px;
}
.hb.app button.app-pin.app-drag-card[data-pindrag] {
  cursor: grabbing;
  transition: none;
}

@media (min-width: 761px) {
  .hb.app .wf-tab {
    position: relative;
    z-index: 0;
  }
  .hb.app .wf-tabs:not([data-dragging]) .wf-tab:has([aria-selected='true'])::before {
    position: absolute;
    z-index: -1;
    inset: 0 0 -4px;
    border: 1px solid var(--divider);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--hb-canvas);
    content: '';
  }
  .hb.app .wf-tabs:not([data-dragging]) .wf-tab:has([aria-selected='true'])::after {
    position: absolute;
    z-index: -1;
    right: -9px;
    bottom: -4px;
    left: -9px;
    height: 9px;
    background:
      radial-gradient(circle at 0 0, transparent 8.5px, var(--hb-canvas) 9px) left bottom / 9px 9px no-repeat,
      radial-gradient(circle at 100% 0, transparent 8.5px, var(--hb-canvas) 9px) right bottom / 9px 9px no-repeat;
    content: '';
    pointer-events: none;
  }
}
.wf-switcher {
  position: absolute;
  z-index: 2;
  top: 8px;
  inset-inline-start: 8px;
}
.wf-tabs {
  display: flex;
  gap: 4px;
  max-width: 720px;
  min-width: 0;
  padding: 0 4px 5px;
  margin: 0 -4px -5px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-y;
}
.wf-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 140px;
  width: 140px;
  min-width: 96px;
  height: 28px;
  padding-inline: 6px 8px;
  border-radius: 8px;
  box-sizing: border-box;
}
.wf-tab:not(:has([aria-selected="true"])):hover { background-color: var(--wf-panel-raised); }
.wf-tab:not([data-dragged]) { transition: translate 180ms ease-out, background-color 150ms ease-out; }
.wf-tab[data-dragged] { z-index: 2; background-color: var(--hb-card-2); }
.wf-tabs[data-dragging], .wf-tabs[data-dragging] .wf-tab button { cursor: grabbing; user-select: none; }
@media (max-width: 760px) {
  .wf-tab:has([aria-selected="true"]):not([data-dragged]) { background: var(--wf-window-frame); }
}
.wf-tab button { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--hb-text); }
.wf-tab [role="tab"] { width: 100%; min-width: 0; min-height: 100%; font-size: 13px; }
.wf-tab [role="tab"] svg { flex: none; opacity: .7; }
.wf-tab button[data-do="wf-tab-close"] {
  position: absolute;
  inset-inline-start: 5px;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0;
}
.wf-tab:has(button[data-do="wf-tab-close"]):is(:hover, :focus-within) [role="tab"] svg { opacity: 0; }
.wf-tab:is(:hover, :focus-within) button[data-do="wf-tab-close"] { opacity: 1; background: var(--wf-panel-raised); }
.wf-tab button[data-do="wf-tab-close"]:hover { background: var(--hb-card-2); }
.wf-tabs[data-dragging] .wf-tab:is(:hover, :focus-within) button[data-do="wf-tab-close"] { opacity: 0; pointer-events: none; }
.wf-tabs[data-dragging] .wf-tab:is(:hover, :focus-within) [role="tab"] svg { opacity: .7; }
.hb.app .wf-tab-new { flex: none; width: 28px; height: 28px; }
.app-wf-n[data-locked] { cursor: default; }
.app-wf-n[data-locked]::after { content: '•'; position: absolute; top: 4px; right: 7px; color: var(--hb-muted); }
.app-wf-resize { position: absolute; right: -5px; bottom: -5px; z-index: 3; width: 12px; height: 12px; border: 2px solid var(--hb-card); border-radius: 3px; background: var(--hb-text); cursor: nwse-resize; }
.app-wf-marquee { position: absolute; z-index: 4; box-sizing: border-box; border: 1px solid var(--accent-ink); background: color-mix(in srgb, var(--accent-ink) 12%, transparent); pointer-events: none; }
.app-wf-guide { position: absolute; z-index: 3; background: var(--accent-ink); opacity: .7; pointer-events: none; }
.app-wf-guide-x { top: -100000px; bottom: -100000px; width: 1px; }
.app-wf-guide-y { left: -100000px; right: -100000px; height: 1px; }
.app-wf-group { position: absolute; z-index: -1; box-sizing: border-box; border: 1px solid var(--hb-line); border-radius: 12px; background: color-mix(in srgb, var(--hb-card-2) 42%, transparent); pointer-events: none; }
.hb.app .app-wf-group-title { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 28px; padding: 0 8px; border-radius: 9px 9px 6px 0; color: var(--hb-text); font: inherit; font-size: 12px; pointer-events: auto; }
.app-wf-group-port { position: absolute; top: 50%; right: -6px; width: 10px; height: 10px; border: 2px solid var(--hb-card); border-radius: 50%; background: var(--accent-ink); transform: translateY(-50%); cursor: crosshair; pointer-events: auto; }
.hb.app .app-wf-del {
  color: var(--red) !important;
}
.app-wf-answer-fields {
  display: grid;
  gap: 6px;
  margin: 6px 0 8px;
}
.app-wf-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, .75fr) auto 28px;
  align-items: center;
  gap: 6px;
}
.app-wf-answer-row .hb-input {
  min-width: 0;
}
.app-wf-answer-optional {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--hb-muted);
}
@media (max-width: 500px) {
  .app-wf-answer-row { grid-template-columns: minmax(0, 1fr) minmax(92px, .7fr) 28px; }
  .app-wf-answer-optional { grid-column: 1 / -1; grid-row: 2; }
}
/* Anotações do quadro de fluxos */
.app-wf-c {
  --wf-art-ink: #fff;
  --wf-art-yellow: #ff9412;
  --wf-art-orange: #f0a06a;
  --wf-art-red: #fd2f3b;
  --wf-art-pink: #d98ac9;
  --wf-art-blue: #74b9ff;
  --wf-art-teal: #6bc7d9;
  --wf-art-green: #31cf76;
}
:root[data-theme='light'] .app-wf-c {
  --wf-art-ink: #141414;
  --wf-art-yellow: #9c5200;
  --wf-art-orange: #a8521a;
  --wf-art-red: #c0141d;
  --wf-art-pink: #a3478f;
  --wf-art-blue: #1a66c4;
  --wf-art-teal: #127589;
  --wf-art-green: #187a41;
}
.wf-art-glyph { font: 600 20px/1 system-ui; }
.app-wf .wf-bar .wf-art-options, .wf-art-format {
  display: flex; position: absolute; width: max-content; align-items: center; gap: 4px;
  bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 6;
  border-radius: 12px; background: var(--hb-card); color: var(--hb-text); padding: 4px;
  box-shadow: 0 0 0 1px var(--hb-line);
}
.app-wf .wf-bar .wf-art-options > button, .wf-art-format button {
  display: grid; width: 32px; height: 32px; place-content: center; border: 0;
  padding: 0; border-radius: 8px; background: transparent; color: inherit;
}
.wf-art-format select, .wf-art-options select {
  max-width: 8ch; height: 28px; border: 0; background: var(--hb-card);
  color: var(--hb-text); border-radius: 6px; font: inherit; font-size: 12px;
}
.wf-art-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px #80808060; }
.wf-art-indicator { position: relative; display:block; width:16px; height:16px; --art-ink:currentColor; }
.wf-art-format [aria-pressed=true] { background: var(--hb-card-2); }
.app-wf .app-wf-n.wf-art-node { display: grid; overflow: visible; padding: 0; min-width: 0; min-height: 0; border: 0; box-shadow: none; background: transparent; isolation: isolate; }
.app-wf .wf-art-node[data-on] { z-index: 3; }
.wf-art-node:not([data-on]) .wf-art-format { display:none; }
.app-wf .wf-art-node .wf-art-handle {
  display:block; position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0;
  border:0; background:transparent; color:inherit; border-radius:inherit; cursor:grab;
}
.app-wf .wf-art-node[data-on] .wf-art-handle { outline: 1px solid var(--hb-muted); outline-offset: 2px; }
.app-wf .wf-art-node .wf-art-input {
  display:block; position:relative; align-self:center; width:100%; height:auto; min-height:0; max-height:100%;
  padding:4px 6px; margin:0; border:0; border-radius:4px; color:var(--art-ink); background:transparent;
  box-shadow:none; outline:none; resize:none; font:inherit; line-height:1.4; field-sizing:content;
}
.app-wf .wf-art-node[data-art=paper] {
  grid-template-rows:minmax(0,1fr) auto; padding:16px 16px 12px;
  background:oklch(from var(--art-paper) .88 calc(c * .5) h);
  box-shadow:0 0 0 1px oklch(from var(--art-paper) .76 calc(c * .6) h);
}
.app-wf .wf-art-node[data-art=paper] textarea {
  height:100%; padding:0; font-weight:500; line-height:1.35; scrollbar-width:none;
}
.app-wf .wf-art-node[data-art=paper] textarea::placeholder { color:rgb(20 20 20 / .36); }
.wf-art-node small { color:rgb(20 20 20 / .52); font-size:13px; font-weight:500; line-height:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.app-wf .wf-art-node[data-art=shape] { place-content:center stretch; padding:12px; }
.app-wf .wf-art-node[data-art=shape] textarea { text-align:center; }
.wf-art-surface { width:100%; height:100%; inset:0; position:absolute; pointer-events:none; }
span.wf-art-surface { border-radius:12px; background:color-mix(in srgb,var(--art-ink) 16%,transparent); box-shadow:inset 0 0 0 2px var(--art-ink); }
:is([data-shape=oval],[data-shape=circle]) > span.wf-art-surface { border-radius:50%; }
svg.wf-art-surface { overflow:visible; fill:color-mix(in srgb,var(--art-ink) 16%,transparent); stroke:var(--art-ink); stroke-width:2; }
:root[data-theme=light] [data-ink=ink] > span.wf-art-surface { background:color-mix(in srgb,var(--art-ink) 5%,transparent); box-shadow:inset 0 0 0 1.5px var(--art-ink); }
:root[data-theme=light] [data-ink=ink] > svg.wf-art-surface { fill:color-mix(in srgb,var(--art-ink) 5%,transparent); stroke-width:1.5; }
.app-wf .wf-art-node[data-art=ink], #wf-art-preview { position:absolute; pointer-events:none; }
.wf-art-stroke { position:absolute; left:0; top:0; width:1px; height:1px; overflow:visible; pointer-events:none; }
.wf-art-stroke path { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.wf-art-node[data-erasing] { opacity:.25; }
#wf-art-preview { left:0; top:0; }
#wf-art-preview[data-box] { border:1px dashed var(--hb-text); background:color-mix(in srgb,var(--hb-text) 6%,transparent); }
.app-wf-c:is([data-tool=draw],[data-tool=shape],[data-tool=note]) { cursor:crosshair; }


.app-wf .wf-bar > .hb-seg:first-child { height:48px; gap:6px; padding:6px; }
.app-wf .wf-bar > .hb-seg:first-child > button { width:36px; height:36px; }
.app-wf .wf-bar > .hb-seg:first-child > [data-do="wf-art-tool"][data-value=draw] { width:44px; }
.app-wf .wf-bar > .hb-seg:first-child > :is([data-do="wf-art-tool"][data-value=shape],[data-do="wf-tool"][data-value=note]) { width:52px; }
.app-wf .wf-bar > .hb-seg:first-child > :is([data-do=wf-art-tool],[data-do=wf-tool][data-value=note])[aria-pressed=true],
.app-wf .wf-bar .wf-art-options > button:has(.wf-art-dot)[aria-pressed=true] { background:transparent; }
.app-wf .wf-bar .wf-art-options { height:40px; padding:4px; gap:4px; }
.wf-art-options [aria-pressed=true] .wf-art-dot { outline:1.5px solid var(--wf-art-ink); outline-offset:2px; }
.wf-art-format { bottom:calc(100% + 12px / var(--wf-scale,1)); gap:2px; border-radius:999px; transform:translateX(-50%) scale(calc(1 / var(--wf-scale,1))); transform-origin:bottom center; }
.app-wf .wf-art-node[data-art=text] { min-width:120px; }
.app-wf .wf-art-node[data-art=text] textarea { min-width:120px; width:auto; max-width:100%; }
.app-wf .wf-art-node[data-art=shape] textarea { font-weight:500; line-height:20px; }
.app-wf-c[data-tool=draw][data-art-eraser] { cursor:none; }
.app-wf-c[data-tool=draw][data-art-eraser]::after { content:""; position:absolute; pointer-events:none; z-index:3; left:var(--wf-eraser-x); top:var(--wf-eraser-y); width:16px; height:16px; translate:-50% -50%; border-radius:50%; background:color-mix(in srgb,var(--wf-art-ink) 8%,transparent); box-shadow:inset 0 0 0 1px var(--wf-art-ink); }
.hb.app .app-wf-folder { margin: 0; padding: 4px 0; }
.hb.app .app-wf-folder + .app-wf-folder { border-top: 1px solid var(--hb-line); }
.hb.app .app-wf-folder h3 { display: flex; justify-content: space-between; margin: 0; padding: 7px 12px 3px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.hb.app .app-wf-folder h3 span { font-variant-numeric: tabular-nums; font-weight: 500; }
.hb.app .app-wf-undo { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--hb-line); border-radius: 12px; background: var(--surface-2); box-shadow: var(--hb-shadow); color: var(--text); font-size: 13px; }

#wf-run-tools { position:absolute; z-index:4; top:16px; right:16px; display:flex; align-items:flex-start; gap:8px; max-width:calc(100% - 32px); }
.app-wf-c[data-hidden-controls] #wf-run-tools { visibility:hidden; }
.wf-run-actions, .wf-current-step { display:flex; align-items:center; height:40px; border-radius:12px; background:var(--hb-card); box-shadow:0 0 0 1px var(--hb-line); }
.wf-run-actions { gap:2px; padding:4px; }
.wf-run-actions .hb-btn, .wf-current-step { justify-content:center; gap:6px; }
.wf-run-actions .hb-btn { height:32px; padding-inline:12px; }
.wf-current-step { max-width:360px; padding-inline:10px; }
.wf-current-step b { overflow:hidden; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.wf-current-step small, .wf-run-meter { font-variant-numeric:tabular-nums; }
.wf-run-meter { display:flex; align-items:center; gap:8px; padding-inline:8px; color:var(--hb-muted); }
.wf-run-meter circle { fill:none; stroke-width:2; stroke:var(--hb-line); }
.wf-run-meter circle + circle { stroke:var(--wf-art-ink); }
@media(max-width:680px) {
  #wf-run-tools { top:8px; right:8px; }
  .wf-run-actions .app-wf-hist span:not(.app-wf-count), .wf-current-step b { display:none; }
}

/* Fluxos: seletor, modelos iniciais e escolhas de importação. */
:root { --wf-window-frame: #0d0d0d; --wf-panel-raised: #242424; --wf-panel: #212121; --wf-danger: #fd2f3b; }
:root[data-theme="light"] { --wf-window-frame: #e8e8eb; --wf-panel-raised: #fcfcfc; --wf-panel: #fff; --wf-danger: #e8222d; }
.hb.app .wf-switcher {
  box-sizing: border-box;
  min-height: 28px;
  height: 28px;
  gap: 6px;
  padding-inline: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--wf-panel-raised) 75%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent);
  backdrop-filter: blur(40px) saturate(1.4);
  font-size: 13px;
}
.hb.app input.wf-switcher { field-sizing: content; min-width: 8ch; max-width: 40ch; font-size: 14px; }
.wf-switcher svg, .wf-switcher-count { color: var(--text-3); }
.wf-switcher-count { font-variant-numeric: tabular-nums; }
.hb.app .app-wf-switch-menu {
  min-height: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 14px;
  scrollbar-width: thin;
}
.app-wf-switch-menu .mp-panel { min-height: 0; padding: 0; }
.app-wf-list-section { padding: 6px; }
.app-wf-list-section + .app-wf-list-section { border-top: 1px solid var(--hb-line); }
.wf-menu-caption { padding: 6px 10px; color: var(--text-3); font-size: 13px; }
.hb.app .app-wf-switch-menu .mp-opt { min-height: 32px; padding: 4px 10px; border-radius: 10px; gap: 8px; font-size: 15px; }
.app-wf-switch-menu .mp-opt::before { display: none; }
.app-wf-switch-menu :is(small, svg) { flex: none; color: var(--text-3); }
.hb.app .app-wf-switch-menu .mp-opt.app-wf-danger, .app-wf-switch-menu .mp-opt.app-wf-danger :is(span, svg) { color: var(--wf-danger); }
.app-wf-switch-menu small { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.wf-menu-name { flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wf-menu-mark { display: grid; place-items: center; flex: none; width: 16px; height: 16px; border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: 50%; }
.mp-opt[aria-checked="true"] .wf-menu-mark { background: var(--text); border-color: transparent; }
.mp-opt[aria-checked="true"] .wf-menu-mark svg { color: var(--hb-sheet); }
.wf-start {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 60rem);
  justify-content: center;
  align-content: safe center;
  overflow: auto;
  gap: 24px;
  padding: 24px;
}
.wf-start h2 { margin: 0; font-size: 24px; font-weight: 500; text-align: center; }
.wf-start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hb.app .wf-start-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 8px;
  color: var(--text);
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--wf-panel);
  text-align: start;
}
.hb.app .wf-start-card:is(:hover, :focus-visible) { background: var(--hb-card-2); }
.wf-start-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 12 / 5;
  border-radius: 8px;
  background-color: var(--wf-window-frame);
  background-image: radial-gradient(color-mix(in srgb, var(--text) 12%, transparent) 1px, transparent 1px);
  background-size: 10px 10px;
}
.wf-start-graph { width: 100%; height: 100%; }
.wf-start-graph path { fill: none; stroke: color-mix(in srgb, var(--text) 32%, transparent); vector-effect: non-scaling-stroke; stroke-width: 1.25px; }
.wf-start-graph rect { fill: color-mix(in srgb, var(--wf-kind) 28%, var(--wf-window-frame)); stroke: var(--wf-kind); vector-effect: non-scaling-stroke; }
.wf-start-text { display: grid; gap: 4px; padding: 0 6px 6px; }
.wf-start-text strong { font-size: 14px; font-weight: 550; }
.wf-start-text small { font-size: 13px; color: var(--text-3); }
.wf-dialog { max-height: calc(100vh - 32px); overflow: auto; }
.wf-dialog h3 { margin-block: 12px 6px; font-size: 13px; }
.wf-binding { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px; margin: 8px 0; }
.wf-binding small { display: block; color: var(--text-3); }
#wf-dialog-error:not(:empty) { margin-block: 8px; color: var(--red); }
.hb.app .app-wf-undo {
  top: 24px;
  bottom: auto;
  inset-inline-end: 24px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  width: min(356px, calc(100vw - 32px));
  box-sizing: border-box;
  gap: 12px;
  padding: 12px 16px 10px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--wf-panel-raised);
}
.app-wf-undo > svg { box-sizing: border-box; width: 32px; height: 32px; padding: 8px; border-radius: 6px; background: var(--hb-card-2); }
.app-wf-undo > strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 500; }
.app-wf-undo > button { grid-column: 1 / -1; justify-self: end; }
.hb.app .wf-version-view {
  top: auto;
  bottom: 8px;
  height: 40px;
  padding: 4px;
  gap: 6px;
  background: color-mix(in srgb, var(--wf-panel-raised) 75%, transparent);
  backdrop-filter: blur(40px) saturate(1.4);
  font-variant-numeric: tabular-nums;
}
.wf-version-view :is(.wf-version-icon, .wf-version-lock) { display: inline-flex; align-items: center; gap: 4px; }
.wf-version-icon { align-self: stretch; justify-content: center; width: 30px; background: var(--hb-card-2); border-radius: 8px; }
.wf-version-view :is(time, .wf-version-lock) { color: var(--text-3); }
.wf-version-view .wf-version-lock { padding-inline: 6px; border-inline-start: 1px solid var(--hb-line); }
.wf-version-view ~ .app-wf-said { top: 14px; }
.hb.app .app-wf-paused { display: inline-flex; gap: 6px; align-items: center; }
.app-wf-export-problem {
  position: fixed;
  inset-inline-end: 24px;
  top: 24px;
  z-index: 20;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 8px;
  box-sizing: border-box;
  width: min(356px, calc(100vw - 32px));
  min-height: 40px;
  padding: 12px 16px;
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--wf-panel-raised);
  color: var(--text);
}
.app-wf-export-problem > span { color: var(--wf-danger); }
.app-wf-export-problem strong { font-size: 14px; font-weight: 500; }
.app-wf-export-problem p { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.app-wf-undo progress { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 3px; appearance: none; }
.app-wf-undo progress::-webkit-progress-bar { background: var(--hb-line); }
.app-wf-undo progress::-webkit-progress-value { background: var(--hb-accent); }
@media (max-width: 620px) {
  .wf-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* O quadro ocupa a janela do desktop abaixo das abas. */
.app-wf-c {
  --wf-glass:rgb(36 36 36 / .75); --wf-page:#0d0d0d;
  --wf-ring:color-mix(in srgb,var(--wf-art-ink) 10%,transparent);
}
:root[data-theme=light] .app-wf-c { --wf-glass:rgb(252 252 252 / .75); --wf-page:#e8e8eb; }
.app-wf .app-wf-c { background:var(--wf-page); }
.wf-dot-field {
  position:absolute; inset:0; pointer-events:none;
  --wf-dot:color-mix(in srgb,var(--wf-art-ink) 15%,transparent);
  --wf-half:calc(var(--wf-grid-step) / 2);
  background:radial-gradient(circle at 1px 1px,var(--wf-dot) 1px,transparent 1px);
  background-size:var(--wf-grid-step) var(--wf-grid-step);
  background-position:calc(var(--wf-grid-x) - 1px) calc(var(--wf-grid-y) - 1px);
  mask-image:radial-gradient(ellipse 85% 75% at center,black 45%,transparent);
}
.wf-dot-field::before {
  content:""; position:absolute; inset:0; opacity:var(--wf-grid-blend);
  background-image:inherit; background-position:inherit; background-size:var(--wf-half) var(--wf-half);
}
.app-wf .app-wf-c .wf-bar { bottom:8px; }
.app-wf .app-wf-c .app-wf-zoom { left:8px; bottom:8px; height:40px; border:0; }
.app-wf .app-wf-c #wf-map { left:8px; bottom:56px; cursor:pointer; border-radius:12px; }
.app-wf .app-wf-c #wf-map rect:last-child { stroke:color-mix(in srgb,var(--wf-art-ink) 64%,transparent); stroke-width:1.5px; }
.app-wf .app-wf-c :is(.wf-bar .hb-seg,.app-wf-zoom,#wf-map,.wf-art-format) { background:var(--wf-glass); box-shadow:0 0 0 1px var(--wf-ring); backdrop-filter:blur(40px) saturate(1.4); }
.app-wf-c .app-wf-marquee { border:0; border-radius:4px; background:color-mix(in srgb,var(--wf-art-ink) 4%,transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wf-art-ink) 32%,transparent); }
.app-wf-c .app-wf-guide { background:color-mix(in srgb,var(--wf-art-ink) 22%,transparent); opacity:1; }
#app-top #wf-run-tools, #wf-run-tools { position:static; height:100%; align-items:center; margin-inline-end:4px; max-width:none; }
#wf-run-tools[hidden] { display:none; }
#wf-run-tools :is(.wf-run-actions,.wf-current-step) { height:auto; padding:0; background:none; box-shadow:none; }
#wf-run-tools :is(.wf-run-actions button,.wf-current-step) { height:24px; padding-inline:8px; font-size:15px; }
#wf-run-tools :is(.wf-run-actions button,.wf-current-step) > svg { width:12px; height:12px; }
#wf-pop[data-wf-menu=search] .mp-panel { padding:4px; }
#wf-pop[data-wf-menu=search] .app-wf-picker { display:grid; gap:4px; padding:0; }
#wf-pop[data-wf-menu=search] #wf-query { height:32px; min-height:32px; padding:0 4px; border:0; font-size:13px; background:transparent; }

/* Arquivos e modelos no quadro */
.app-wf-model-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 10px 4px;
}
.app-wf-model-tools .app-wf-node-picker {
  min-width: 0;
  max-width: 100%;
}
.app-wf-node-picker > span,
.app-wf-picker-option .mp-opt-n > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-agent-removed {
  color: var(--amber);
}
.app-wf-n .app-wf-asset-empty {
  display: flex;
  width: calc(100% - 20px);
  min-height: 72px;
  margin: 4px 10px 8px;
  justify-content: center;
  border: 1px dashed var(--hb-line);
  border-radius: 8px;
}
.app-wf-asset {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 10px 8px;
}
.app-wf-asset-current {
  flex: 1;
  padding: 2px;
  height: auto;
  min-width: 0;
}
.app-wf-asset-preview {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}
.app-wf-asset-preview[data-kind="image"] {
  grid-template-columns: minmax(0, 1fr);
}
.app-wf-asset-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 6px;
}
.app-wf-asset-preview > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-asset[data-kind="video"],
.app-wf-asset[data-kind="audio"] {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.app-wf-clip {
  display: block;
  width: 100%;
  max-height: 180px;
  border-radius: 6px;
  background: var(--hb-card);
}
audio.app-wf-clip {
  height: 40px;
}
.app-wf-clip-name {
  display: grid;
  min-width: 0;
}
.app-wf-clip-name :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-clip-name small {
  color: var(--hb-muted);
}
.app-wf-pending {
  position: absolute;
  z-index: 1;
  display: flex;
  width: 240px;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--hb-line);
  border-radius: 12px;
  background: var(--hb-card);
  font-size: 13.5px;
}
.app-wf-pending > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-prompt-copy {
  position: absolute;
  top: 7px;
  right: 7px;
}
.app-wf-n .wf-p[data-port="file"] {
  background: var(--blue);
}
.app-wf-n .wf-p[data-port="image"] {
  background: var(--violet);
}
.app-wf-n .wf-p:is([data-port="video"], [data-port="audio"]) {
  background: var(--blue);
}
.app-wf-w:is([data-port="video"], [data-port="audio"]) .app-wf-line {
  stroke: var(--blue);
}
.app-wf-w[data-port="file"] .app-wf-line {
  stroke: var(--blue);
}
.app-wf-w[data-port="image"] .app-wf-line {
  stroke: var(--violet);
}
.app-wf-local-picker {
  padding: 8px;
}
.app-wf-local-picker > input[type="search"] {
  width: 100%;
}
.app-wf-picker-tabs {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}
.app-wf-picker-tabs > button[aria-pressed="true"] {
  background: var(--hb-hover);
  color: var(--hb-text);
}
#wf-node-options {
  max-height: min(36vh, 260px);
  overflow: auto;
  margin-top: 5px;
}
#wf-node-options[data-kind="asset"]:has(.app-wf-picker-option) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.app-wf-picker-option {
  min-width: 0;
}
#wf-node-options[data-kind="asset"] .app-wf-picker-option {
  display: grid;
  align-content: start;
  text-align: left;
}
.app-wf-picker-thumb {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  color: var(--hb-muted);
  background: var(--hb-hover);
}
.app-wf-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#wf-run-tools .app-wf-paused { display:inline-flex; align-items:center; gap:6px; }
#wf-run-tools .app-wf-paused button { width:24px; height:24px; }

.wf-result-shelf { position:absolute; top:calc(100% + 8px / var(--wf-scale,1)); left:50%; z-index:2; width:max-content; max-width:360px; display:flex; align-items:center; gap:6px; padding:4px; transform:translateX(-50%) scale(calc(1 / var(--wf-scale,1))); transform-origin:top center; }
.wf-result-shelf > div { display:flex; gap:6px; align-items:center; overflow:auto; padding:2px; }
.wf-result-tile { display:grid; place-items:center; flex:none; width:48px; height:48px; border:0; border-radius:8px; background:var(--wf-glass); color:var(--wf-art-ink); box-shadow:0 0 0 1px var(--wf-ring); }
.wf-result-tile[aria-pressed=true] { width:58px; height:58px; box-shadow:0 0 0 2px var(--hb-muted); }
/* Os avisos ficam por cima do quadro sem bloquear os controles fora do próprio cartão. */
#dialog:has(> :is(#wf-undo, .app-wf-export-problem)) { pointer-events: none; }
#dialog > :is(#wf-undo, .app-wf-export-problem) { pointer-events: auto; }

/* O diagrama de orientação aparece enquanto a exclusão ainda pode ser desfeita. */
.wf-deletion { display: grid; place-items: center; }
.wf-deletion-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 15%, transparent) 1px, transparent 0) 0 0 / 24px 24px;
  mask-image: radial-gradient(ellipse at center, transparent 13%, #000 52%, transparent 92%);
}
.wf-deletion-board {
  width: min(1280px, calc(100% - 96px));
  height: min(620px, calc(100% - 96px));
  overflow: visible;
}
.wf-deletion-board > :is(g, path) { opacity: 0; animation: wf-preview-appear .7s ease-out calc(1.1s * (var(--phase) + 1)) both; }
.wf-deletion-board > path { fill: none; stroke: color-mix(in srgb, var(--text) 32%, transparent); stroke-width: 3; }
.wf-deletion-board g circle { fill: var(--node-color); }
.wf-deletion-board g path { fill: none; stroke: var(--hb-line); stroke-width: 6; stroke-linecap: round; }
.wf-preview-card {
  fill: var(--wf-panel);
  stroke: var(--hb-line);
  animation: wf-preview-run 1.1s ease-out calc(6.6s + var(--phase) * 1.1s) both;
}
@keyframes wf-preview-appear { from { opacity: 0; filter: blur(5px); } to { opacity: .82; filter: none; } }
@keyframes wf-preview-run { 50% { stroke: var(--node-color); stroke-width: 2; } }
.wf-deletion-actions {
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  max-width: min(34rem, calc(100% - 32px));
  text-align: center;
}
.wf-deletion-actions h2 { margin: 0; font-size: clamp(24px, 4vw, 36px); font-weight: 600; }
.wf-deletion-actions p { margin: 0; font-size: 16px; color: var(--text-3); }
.hb.app .wf-deletion-actions button { min-height: 36px; max-width: 22rem; }
.hb.app .wf-deletion-actions button[data-do="wf-delete-create"] { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .wf-tab:not([data-dragged]) { transition: none; }
  .wf-deletion-board > :is(g, path) { opacity: .82; animation: none; }
  .wf-preview-card { animation: none; }
}
/* Composição dos passos no quadro */
.app-wf-c {
  --wf-card-bg: #1a1a1a;
  --wf-field-bg: #242424;
  --wf-card-ink: #fff;
  --wf-card-muted: #979797;
  --wf-card-ring: color-mix(in srgb, var(--wf-card-ink) 10%, transparent);
}
:root[data-theme="light"] .app-wf-c {
  --wf-card-bg: #fff;
  --wf-field-bg: #f0f0f2;
  --wf-card-ink: #141414;
  --wf-card-muted: #6b6b70;
}
.app-wf-c .wf-n.app-wf-n {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.app-wf-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 18px;
}
.app-wf-card-header .wf-h {
  width: 100%;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--wf-card-muted);
}
.app-wf-card-header .wf-h > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-card-actions {
  display: flex;
  flex: none;
  gap: 4px;
}
.hb.app :is(button, a).app-wf-card-icon {
  display: grid;
  width: 24px;
  height: 24px;
  min-height: 0;
  min-width: 0;
  padding: 0;
  place-items: center;
  border-radius: 7px;
}
.app-wf-card-icon > span { display: none; }
.app-wf-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border-radius: 16px;
  color: var(--wf-card-ink);
  background: var(--wf-card-bg);
  box-shadow: 0 0 0 1px var(--wf-card-ring);
}
.app-wf-n[data-on] .app-wf-card,
.app-wf-n:has(.app-wf-pick:focus-visible) .app-wf-card {
  outline: 1px solid var(--wf-card-muted);
  outline-offset: 4px;
}
.app-wf-n[data-state="running"] .app-wf-card { --wf-card-ring: var(--blue); }
.app-wf-n[data-state="approval"] .app-wf-card { --wf-card-ring: var(--amber); }
.app-wf-n[data-state="done"] .app-wf-card { --wf-card-ring: var(--green); }
.app-wf-n[data-state="failed"] .app-wf-card { --wf-card-ring: var(--red); }
.app-wf-card-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--wf-field-bg);
}
.app-wf-card-field > .hb-note { color: var(--wf-card-muted); }
.hb.app .app-wf-card .wf-inline {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--wf-card-ink);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-wf-card .wf-inline::placeholder { color: var(--wf-card-muted); }
.hb.app .app-wf-card :is(.wf-inline, .app-wf-output-row select):focus-visible {
  outline: 1px solid var(--wf-card-ring);
  outline-offset: 3px;
}
.app-wf-n[data-kind="prompt"] .app-wf-card {
  min-height: 151px;
  align-content: stretch;
}
.app-wf-n[data-kind="note"] .app-wf-card {
  height: 240px;
  align-content: stretch;
  padding: 16px 16px 12px;
  background: #fae6a5;
}
.app-wf-n[data-kind="note"] .app-wf-card-field {
  padding: 0;
  background: transparent;
}
.hb.app .app-wf-n[data-kind="note"] .wf-inline {
  color: #211b10;
  font-size: 20px;
  line-height: 1.35;
}
.hb.app .app-wf-n[data-kind="note"] .wf-inline::placeholder { color: #665928; }
.app-wf-card-field .app-wf-model-tools {
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.hb.app .app-wf-model-tools .app-wf-node-picker {
  gap: 6px;
  height: 20px;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--wf-card-ink);
  font-size: 13px;
}
.hb.app .app-wf-model-tools .app-wf-node-picker:is(:hover, [aria-expanded="true"]) { background: var(--wf-card-ring); }
.hb.app .app-wf-model-tools .app-wf-agent-removed { color: var(--amber); }
.app-wf-output-fields {
  gap: 0;
  padding: 0 12px;
}
.app-wf-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--wf-card-muted);
  font-size: 13px;
}
.app-wf-output-row + .app-wf-output-row { border-top: 1px solid var(--wf-card-ring); }
.hb.app .app-wf-output-row :is(select, input) {
  min-width: 0;
  min-height: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--wf-card-ink);
  font: inherit;
}
.hb.app .app-wf-output-row select option { background: var(--wf-card-bg); }
.hb.app .app-wf-card .app-wf-asset-empty {
  display: grid;
  width: 100%;
  min-height: 120px;
  gap: 8px;
  margin: 0;
  place-content: center;
  justify-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--wf-field-bg);
  color: var(--wf-card-ink);
  font-size: 13px;
}
.app-wf-asset-placeholder {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--wf-card-ring);
}
.app-wf-card .app-wf-asset {
  display: grid;
  min-width: 0;
  margin: 0;
}
.hb.app .app-wf-card .app-wf-asset-current {
  width: 100%;
  min-height: 120px;
  height: auto;
  padding: 0;
  border-radius: 8px;
  text-align: start;
  background: var(--wf-field-bg);
}
.app-wf-card .app-wf-asset-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.app-wf-asset-preview[data-kind="file"] { padding: 12px; }
.app-wf-asset-preview[data-kind="file"] > span:last-child {
  display: grid;
  min-width: 0;
}
.app-wf-asset-preview :is(strong, small) {
  overflow: hidden;
  color: var(--wf-card-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-asset-preview small {
  color: var(--wf-card-muted);
  font-size: 12px;
}
.app-wf-file-glyph {
  display: grid;
  width: 40px;
  height: 48px;
  flex: none;
  align-content: center;
  justify-items: center;
  border-radius: 6px;
  background: var(--wf-card-ring, var(--hb-hover));
  color: var(--wf-card-muted, var(--hb-muted));
}
.app-wf-file-glyph small { font-size: 9px; font-weight: 700; }
.app-wf-card[data-media="image"] {
  padding: 0;
  aspect-ratio: 4 / 3;
}
.app-wf-card[data-media="image"] :is(.app-wf-asset, .app-wf-asset-current, .app-wf-asset-preview) {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.app-wf-card .app-wf-asset-preview[data-kind="image"] > img {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: inherit;
  object-fit: cover;
}
.app-wf-asset-preview[data-kind="image"] > span {
  position: absolute;
  inset: auto auto 8px 8px;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--wf-card-bg) 88%, transparent);
  color: var(--wf-card-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-wf-ports {
  --wf-port-gap: calc(12px * var(--app-wf-port-scale, 1));
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  gap: calc(10px * var(--app-wf-port-scale, 1));
  transform: translateY(calc(-50% + 11px * var(--app-wf-port-scale, 1)));
}
.app-wf-ports[data-side="in"] { right: calc(100% + var(--wf-port-gap)); }
.app-wf-ports[data-side="out"] { left: calc(100% + var(--wf-port-gap)); }
.app-wf-ports::before {
  position: absolute;
  inset-block: 0;
  width: var(--wf-port-gap);
  content: "";
}
.app-wf-ports[data-side="in"]::before { left: 100%; }
.app-wf-ports[data-side="out"]::before { right: 100%; }
.app-wf-port-slot { position: relative; display: grid; }
.app-wf-n .app-wf-port-slot > .wf-p {
  position: relative;
  display: grid;
  width: calc(28px * var(--app-wf-port-scale, 1));
  height: calc(28px * var(--app-wf-port-scale, 1));
  margin: 0;
  top: auto;
  place-items: center;
  border: 0;
  background: var(--wf-field-bg);
  box-shadow: 0 0 0 1px var(--wf-card-ring);
  color: var(--wf-card-ink);
  opacity: 0;
}
.app-wf-port-slot > .wf-p svg {
  width: calc(14px * var(--app-wf-port-scale, 1));
  height: calc(14px * var(--app-wf-port-scale, 1));
}
.app-wf-n:is(:hover, :focus-within, [data-on]) .app-wf-port-slot > .wf-p { opacity: 1; }
.app-wf-n .app-wf-port-slot > .wf-p:hover {
  background: var(--wf-card-ink);
  color: var(--wf-card-bg);
}
.app-wf-port-chip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--wf-card-bg);
  box-shadow: 0 0 0 1px var(--wf-card-ring);
  color: var(--wf-card-ink);
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.app-wf-ports[data-side="in"] .app-wf-port-chip { right: calc(100% + 8px); }
.app-wf-ports[data-side="out"] .app-wf-port-chip { left: calc(100% + 8px); }
.app-wf-port-slot:has(.wf-p:hover) .app-wf-port-chip { opacity: 1; }

#wf-pop[data-wf-node-menu] { border-radius: 16px; }
.app-wf-local-picker {
  display: grid;
  gap: 8px;
  padding: 8px;
}
.app-wf-local-picker[data-kind="asset"] { gap: 12px; padding: 12px; }
.app-wf-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.app-wf-local-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--hb-hover);
  color: var(--hb-muted);
}
.app-wf-local-search svg { flex: none; }
.hb.app .app-wf-local-search > input[type="search"] {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
}
.app-wf-picker-tabs { margin-top: 0; }
.hb.app .app-wf-picker-tabs > button { border-radius: 99px; font-size: 13px; }
#wf-node-options {
  max-height: min(52vh, 360px);
  margin: 0;
  overscroll-behavior: contain;
}
#wf-node-options[data-kind="asset"] { max-height: 280px; }
#wf-node-options[data-kind="asset"]:has(.app-wf-picker-option) { gap: 8px; }
.app-wf-picker-option {
  min-height: 36px;
  gap: 8px;
}
.app-wf-picker-option[aria-pressed="true"] { background: var(--hb-hover); }
#wf-node-options[data-kind="asset"] .app-wf-picker-option {
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
}
.app-wf-picker-thumb { aspect-ratio: 1; }
#wf-node-options[data-kind="fields"] { max-height: 324px; }
#wf-node-options[data-kind="fields"] .app-wf-answer-row { min-height: 36px; gap: 8px; }
.app-wf-card[data-media="image"] > .app-wf-asset {
  position: absolute;
  inset: 0;
}
.hb.app .app-wf-card[data-media="image"] .app-wf-asset-current {
  display: block;
  height: 100%;
  min-height: 0;
}
.app-wf-card[data-media="image"] .app-wf-asset-preview > img {
  position: absolute;
  inset: 0;
}
.app-wf-local-picker:not([data-kind="asset"]) .app-wf-local-search { height: 36px; }
#wf-node-options:is([data-kind="agent"], [data-kind="model"]) .app-wf-picker-option { min-height: 40px; }
.hb.app .app-wf-n[data-kind="note"] .wf-inline { font-size: 18px; }
#wf-pop[data-wf-node-menu] { max-width: calc(100vw - 24px); }
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row > :is(input, select) {
  height: 28px;
  min-height: 28px;
  padding-block: 0;
}
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row .hb-ic {
  width: 24px;
  height: 24px;
  min-height: 0;
}
.app-wf-n .app-wf-port-slot > .wf-p {
  background: color-mix(in srgb, var(--wf-card-ink) 10%, var(--wf-card-bg));
}
.app-wf-n .app-wf-port-slot > .wf-p:hover { background: var(--wf-card-ink); }
#wf-pop[data-wf-node-menu] {
  background: color-mix(in srgb, #242424 75%, transparent);
  backdrop-filter: blur(40px) saturate(1.4);
}
:root[data-theme="light"] #wf-pop[data-wf-node-menu] {
  background: color-mix(in srgb, #fcfcfc 75%, transparent);
}
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-optional input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
}
#wf-node-options[data-kind="fields"] [data-wf-answer="choices"] {
  grid-column: 1 / -1;
  grid-row: 2;
}
#wf-node-options[data-kind="fields"] .app-wf-answer-optional { grid-area: 1 / 3; }
#wf-node-options[data-kind="fields"] [data-do="wf-answer-remove"] { grid-area: 1 / 4; }
@media (max-width: 500px) {
  #wf-node-options[data-kind="fields"] .app-wf-answer-row {
    grid-template-columns: minmax(0, 1fr) minmax(88px, .75fr) auto 24px;
  }
}

/* As áreas de arrasto conservam o tamanho na tela quando o quadro muda de escala. */
.app-wf-n .app-wf-resize {
  --corner:calc(18px / var(--wf-scale,1)); --band:calc(12px / var(--wf-scale,1));
  --out:calc(-5px / var(--wf-scale,1));
  inset:auto; width:var(--corner); height:var(--corner); border:0; border-radius:0; background:transparent; z-index:2;
}
.app-wf-n [data-resize^=n] { top:var(--out); }
.app-wf-n [data-resize^=s] { bottom:var(--out); }
.app-wf-n [data-resize$=w] { left:var(--out); }
.app-wf-n [data-resize$=e] { right:var(--out); }
.app-wf-n :is([data-resize=w],[data-resize=e]) { top:var(--corner); bottom:var(--corner); width:var(--band); height:auto; }
.app-wf-n :is([data-resize=n],[data-resize=s]) { left:var(--corner); right:var(--corner); height:var(--band); width:auto; }
.app-wf-n .app-wf-resize:hover { background:color-mix(in srgb,var(--wf-art-ink) 20%,transparent); border-radius:4px; }

.wf-decision { margin:0; display:flex; align-items:center; gap:8px; padding:6px 8px 6px 12px; border-radius:8px; font:inherit; font-size:13px; line-height:18px; }
.wf-decision svg { flex:none; width:14px; height:14px; }
.wf-decision[data-decision=approved] { color:#31cf76; background:rgb(49 207 118 / .12); }
.wf-decision[data-decision=rejected] { color:#ff6069; background:rgb(253 47 59 / .16); }
[data-theme=light] .wf-decision[data-decision=approved] { color:#187a41; background:rgb(31 168 90 / .12); }
[data-theme=light] .wf-decision[data-decision=rejected] { color:#c0141d; background:rgb(232 34 45 / .12); }

.app-wf-guide { opacity:1; background:color-mix(in srgb,var(--wf-art-ink) 22%,transparent); }
.app-wf-guide-x { width:calc(1px / var(--wf-scale,1)); }
.app-wf-guide-y { height:calc(1px / var(--wf-scale,1)); }
.app-wf-marquee { border:0; border-radius:4px; background:color-mix(in srgb,var(--wf-art-ink) 4%,transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wf-art-ink) 32%,transparent); }
.app-wf-group { outline:calc(1px / var(--wf-scale,1)) dashed color-mix(in srgb,var(--wf-art-ink) 24%,transparent); border:0; background:transparent; border-radius:16px; }

@media (min-width:761px) {
  .wf-tabs .wf-tab:has([aria-selected=true]):not([data-dragged]) { background:transparent; }
}
.hb.app #wf-pop.app-wf-switch-menu button.app-wf-danger { color:var(--wf-danger) !important; }

/* Provedores: cartões, grupos, busca e detalhe no mesmo painel de Ajustes. */
.set-page[data-page='providers'] {
  --provider-muted: rgba(255, 255, 255, 0.59);
  --provider-placeholder: #bfbfbf;
  --provider-success-bg: rgba(49, 207, 118, 0.15);
}
[data-theme='light'] .set-page[data-page='providers'] {
  --provider-muted: rgba(20, 20, 20, 0.6);
  --provider-placeholder: #5c5c61;
  --provider-success-bg: rgba(31, 168, 90, 0.12);
}
.set-page[data-page='providers'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='providers'] .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-page[data-page='providers'] .set-row {
  min-height: 48px;
  padding-block: 10px;
}
.set-page[data-page='providers'] .set-copy > strong {
  font-weight: 400;
}
.set-page[data-page='providers'] .set-prov-status {
  line-height: 18px;
}
.set-page[data-page='providers'] :is(.set-copy > span, .set-note, .set-find > svg, .set-chev) {
  color: var(--provider-muted);
}
.set-page[data-page='providers'] .set-sec-h {
  align-items: end;
  min-height: 22px;
  padding-inline: 0;
}
.set-page[data-page='providers'] .set-none .set-copy {
  text-align: center;
}
.set-prov-lists {
  display: grid;
  gap: 24px;
}
.set-prov-lists > :empty {
  display: none;
}
.set-page[data-page='providers'] .set-find input {
  height: 28px;
  background: var(--surface-2);
  font-size: 14px;
}
.set-page[data-page='providers'] .set-find input::placeholder,
.set-page[data-page='providers'] .set-prov-model-find::placeholder {
  color: var(--provider-placeholder);
}
.set-prov-default .set-select {
  width: 168px;
  min-width: 0;
}
.set-prov-default .set-select select {
  height: 32px;
  padding-inline-start: 36px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
}
.set-prov-default-icon {
  position: absolute;
  z-index: 1;
  inset-inline-start: 10px;
  top: 50%;
  display: flex;
  transform: translateY(-50%);
  pointer-events: none;
}
.set-prov-default .set-select select:disabled {
  cursor: default;
}
.set-page[data-page='providers'] .set-chev {
  margin-inline-end: 6px;
}
.set-page[data-page='providers'] .set-chev > svg {
  width: 14px;
  height: 14px;
}
.set-prov-found .set-sec-h h2 {
  color: var(--provider-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.set-prov-found .set-row {
  min-height: 52px;
}
.set-page[data-page='providers'] .set-note {
  overflow-wrap: anywhere;
}
.set-page[data-page='providers'] .set-card > .app-err {
  margin: 0;
  padding: 0 16px 10px;
}
.hb.app .set-page[data-page='providers'] .hb-btn.hb-sm {
  height: 28px;
  font-size: 14px;
  line-height: 20px;
}
.hb.app .set-page[data-page='providers'] .hb-btn.prov-ghost,
.hb.app .set-page[data-page='providers'] .hb-btn.prov-danger {
  background: transparent !important;
}
.hb.app .set-page[data-page='providers'] .hb-btn.prov-ghost {
  height: 24px;
  padding-inline: 8px;
  color: var(--text-2) !important;
  font-size: 13px;
}
.hb.app .set-page[data-page='providers'] .hb-btn.prov-acp-scan {
  gap: 6px;
  white-space: nowrap;
}
.hb.app .set-page[data-page='providers'] .hb-btn.prov-danger {
  color: var(--red) !important;
}
.hb.app .set-page[data-page='providers'] .hb-btn:is(.prov-ghost, .prov-danger):hover:not(:disabled) {
  background: var(--hb-hover) !important;
}
.set-prov-detail {
  display: flex;
  align-items: center;
  column-gap: 12px;
}
.set-prov-logo {
  display: grid;
  flex: 0 0 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background-color: var(--hb-raised);
}
.set-prov-detail-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.set-prov-detail-title .set-h {
  font-size: 16px;
  line-height: 22px;
}
.set-prov-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2) !important;
  font-size: 13px;
  line-height: 18px;
}
.set-prov-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}
.set-prov-pill[data-tone='connected'] {
  color: var(--green);
  background: var(--provider-success-bg);
}
.set-prov-pill[data-tone='attention'] {
  color: var(--hb-warn-text);
  background: var(--hb-warn-soft);
}
.set-prov-model-find {
  width: 100%;
  height: 32px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.set-prov-model-count {
  margin-top: -4px;
}
.set-page[data-page='providers'] .set-prov-models {
  max-height: 360px;
  padding-block: 4px;
  overflow-y: auto;
}
.set-prov-model-row {
  display: flex;
  min-height: 32px;
  align-items: center;
  column-gap: 8px;
  padding-inline: 12px;
  font-size: 14px;
}
.set-prov-model-row:hover {
  background: var(--hb-ctl-hover);
}
.set-prov-model-name {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.set-prov-model-name > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-prov-model-name > span {
  flex: none;
  max-width: 70%;
}
.set-prov-model-name > code {
  color: var(--provider-muted);
  font-size: 13px;
}
.set-prov-model-empty {
  padding: 12px;
}
.set-prov-dialog {
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}
.set-prov-dialog::backdrop {
  background: rgba(0, 0, 0, 0.1);
}
[data-theme='light'] .set-prov-dialog::backdrop {
  background: rgba(20, 20, 20, 0.12);
}
.set-prov-dialog .set-keyform {
  display: grid;
}
.set-prov-dialog h2 {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}
.set-prov-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.set-prov-dialog-head > svg {
  flex: none;
}
@media (max-width: 570px) {
  .set-prov-default .set-select {
    width: 112px;
  }
}
@media (min-width: 721px) {
  .hb-win[data-view='settings'] .set-path:has([data-do='set-provider-back']) {
    margin-inline-start: calc(max(0px, (100cqw - 960px) / 2) + 11px);
  }
  .hb-win[data-view='settings'] .hb-top-main:has([data-do='set-provider-back']) {
    container-type: inline-size;
  }
}

/* Resultado da conferência de um agente na lista de provedores. */
.set-prov-attention {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(238, 163, 47, 0.15);
  color: #ffbe60;
  font-size: 12px;
  line-height: 18px;
}
[data-theme='light'] .set-prov-attention {
  background: rgba(146, 87, 0, 0.10);
  color: #87510a;
}

/* Importação do servidor, dentro da coluna de Ajustes. */
.set-page[data-page='import'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='import'] {
  --import-muted: rgba(255, 255, 255, 0.59);
}
[data-theme='light'] .set-page[data-page='import'] {
  --import-muted: rgba(20, 20, 20, 0.6);
}
.hb.app .set-page[data-page='import'] .app-imp:not(.app-imp-review) {
  gap: 24px;
}
.hb.app .set-page[data-page='import'] .app-imp-review {
  max-width: none;
}
.hb.app .set-page[data-page='import'] :is(.app-imp-opts, .app-imp-guide-options) {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .set-page[data-page='import'] :is(.app-imp-opt, .app-imp-message, .app-imp-items, .app-imp-plain, .app-imp-warn) {
  border-color: var(--hb-grouped-line);
  background: var(--surface-2);
}
.hb.app .set-page[data-page='import'] .app-imp-opt {
  min-height: 64px;
  border-radius: 12px;
}
.hb.app .set-page[data-page='import'] .app-imp-opt:hover {
  border-color: var(--border);
  background: var(--hb-ctl-hover);
}
.hb.app .set-page[data-page='import'] .app-imp-opt .hb-opt-t > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.hb.app .set-page[data-page='import'] .app-imp-opt .hb-opt-t > span {
  color: var(--import-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .set-page[data-page='import'] :is(.app-imp-h p, .app-imp-wait, .app-imp-sum p, .app-imp-it > span, .app-imp-st) {
  color: var(--import-muted);
}
.hb.app .set-page[data-page='import'] .app-imp-wait {
  font-size: 13px;
}
.hb.app .set-page[data-page='import'] .app-imp-back {
  align-self: flex-start;
  height: 28px;
  padding-inline: 8px;
}
.hb.app .set-page[data-page='import'] .app-imp-message {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
}
.app-imp-message > svg {
  flex: none;
  color: var(--import-muted);
}
.app-imp-message[role='alert'] > svg {
  color: var(--red);
}
.hb.app .set-page[data-page='import'] .app-imp-message h4 {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.hb.app .set-page[data-page='import'] .app-imp-message p {
  margin-top: 2px;
  color: var(--import-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .set-page[data-page='import'] .app-imp-path-form {
  width: 100%;
  max-width: 560px;
}
.hb.app .set-page[data-page='import'] .app-imp-path-form .app-imp-l {
  display: block;
  margin-top: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.hb.app .set-page[data-page='import'] .app-imp-summary h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--import-muted);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .set-page[data-page='import'] .app-imp-summary strong {
  margin-block: 4px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hb.app .set-page[data-page='import'] .app-imp-summary p {
  margin: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-list {
  gap: 32px;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof {
  display: grid;
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof > .app-imp-row {
  min-height: 0;
  padding: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof > * + * {
  border-top: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof[data-on='false'] > .app-imp-row {
  opacity: 1;
}
.hb.app .set-page[data-page='import'] .app-imp-again {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2);
}
.hb.app .set-page[data-page='import'] .app-imp-items {
  overflow: hidden;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 12px;
}
.hb.app .set-page[data-page='import'] .app-imp-items > * + * {
  border-color: var(--hb-grouped-line);
}
.hb.app .set-page[data-page='import'] .app-imp-item {
  align-items: flex-start;
}
.hb.app .set-page[data-page='import'] .app-imp-item .app-imp-oi {
  margin-top: 2px;
  color: var(--text-2);
}
.hb.app .set-page[data-page='import'] .app-imp-st {
  min-height: 22px;
  padding-inline: 8px;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 999px;
}
.hb.app .set-page[data-page='import'] .app-imp-st[data-state='import'] {
  border-color: transparent;
  background: color-mix(in srgb, var(--green) 14%, transparent);
}
.hb.app .set-page[data-page='import'] .app-imp-end-h strong {
  font-size: 32px;
  line-height: 1.1;
}
@media (min-width: 721px) {
  .hb-win[data-view='settings'] .hb-top-main:has(.set-path [data-do='imp-restart']) {
    container-type: inline-size;
  }
  .hb-win[data-view='settings'] .set-path:has([data-do='imp-restart']) {
    margin-inline-start: calc(max(0px, (100cqw - 960px) / 2) + 15px);
  }
}
.hb.app .set-page[data-page='import'] .app-imp-opt .hb-opt-t {
  gap: 2px;
}
.hb.app .set-page[data-page='import'] .app-imp-summary > :first-child {
  flex: 1 1 340px;
  min-width: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-summary p {
  overflow-wrap: anywhere;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof input.check {
  width: 16px;
  height: 16px;
}
.hb.app .set-page[data-page='import'] :is(.app-imp-back, .app-imp-tg) {
  height: 32px;
  font-size: 13px;
}

/* O expansor de itens do perfil Hermes acompanha o botão de retorno. */
.hb.app .set-page[data-page='import'] .hb-btn.app-imp-tg {
  color: var(--text-2);
  padding-inline: 12px;
}

/* Transferência do servidor: opções no topo, checklist e revisão no mesmo painel. */
.set-page[data-page='transfer'] .set-content {
  padding-top: 24px;
}
.app-trf {
  --transfer-muted: rgba(255, 255, 255, 0.59);
}
[data-theme='light'] .app-trf {
  --transfer-muted: rgba(20, 20, 20, 0.6);
}
.hb.app .app-trf:is(.app-imp, .app-imp-review) {
  max-width: 720px;
  gap: 16px;
}
.hb.app .app-trf .app-imp-foot {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.app-trf .app-imp-h h4,
.app-trf-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}
.hb.app .app-trf :is(.app-imp-h p, .app-imp-it > span, .app-imp-wait) {
  color: var(--transfer-muted);
}
.hb.app .app-trf .app-imp-h p {
  margin: 6px 0 0;
}
.app-trf-flow {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 12px;
}
.app-trf-flow li {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}
.app-trf-flow li > svg {
  color: var(--text);
}
.app-trf-flow-next {
  position: absolute;
  inset-inline-end: -25px;
  top: 50%;
  display: flex;
  transform: translateY(-50%);
  color: var(--transfer-muted);
}
.app-trf-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hb.app button.app-trf-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-align: start;
  font: inherit;
  cursor: pointer;
}
.hb.app button.app-trf-tile:hover,
.hb.app .app-trf .app-trf-bots .app-trf-opt:hover {
  background: var(--hb-ctl-hover);
}
.app-trf-tile svg {
  flex: none;
  margin-bottom: 8px;
  color: var(--text-2);
}
.app-trf-tile strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.app-trf-tile span {
  color: var(--transfer-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-trf .hb-btn:is(.app-trf-back, .app-trf-link) {
  align-self: flex-start;
  padding-inline: 0;
  font-size: 13px;
}
.hb.app .app-trf .hb-btn.app-trf-link {
  font-size: 14px;
  color: var(--text) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.app-trf-options-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.app-trf-options-title > span {
  color: var(--transfer-muted);
  font-size: 13px;
}
.hb.app .app-trf .app-trf-options {
  border-color: var(--divider);
  border-radius: 14px;
  background: transparent;
}
.hb.app .app-trf .app-trf-options .app-imp-row {
  position: relative;
  flex-direction: row-reverse;
  justify-content: space-between;
  min-height: 48px;
  padding-block: 10px;
}
.hb.app .app-trf .app-trf-options > * + * {
  border-top: 0;
}
.hb.app .app-trf .app-trf-options > * + *::before {
  content: '';
  position: absolute;
  inset: 0 16px auto;
  height: 1px;
  background: var(--divider);
}
.hb.app .app-trf .app-trf-bots {
  border-color: var(--hb-grouped-line);
  background: var(--surface-2);
}
.app-trf-private {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--transfer-muted);
  font-size: 13px;
  line-height: 19px;
}
.app-trf-private svg {
  flex: none;
  margin-top: 2px;
}
.app-trf-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}
.hb.app .app-trf .app-trf-error {
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 16px;
  border-color: var(--hb-grouped-line);
  border-radius: 12px;
  background: var(--surface-2);
}
.app-trf-error svg {
  flex: none;
  color: var(--red);
}
.hb.app .app-trf .app-imp-end-h strong {
  font-size: 32px;
  line-height: 1.1;
}
.app-trf-confirm {
  width: min(460px, calc(100vw - 48px));
  margin: auto;
  padding: 20px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}
.app-trf-confirm::backdrop {
  background: rgba(0, 0, 0, 0.1);
}
[data-theme='light'] .app-trf-confirm::backdrop {
  background: rgba(20, 20, 20, 0.12);
}
.app-trf-confirm h2 {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}
.app-trf-confirm p {
  margin: 8px 0 16px;
  color: var(--transfer-muted);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-trf-confirm .app-imp-foot {
  justify-content: flex-end;
}
@media (min-width: 721px) {
  .hb-win[data-view='settings'] .hb-top-main:has(.set-path [data-do='trf-home']) {
    container-type: inline-size;
  }
  .hb-win[data-view='settings'] .set-path:has([data-do='trf-home']) {
    margin-inline-start: calc(max(0px, (100cqw - 960px) / 2) + 15px);
  }
}
@media (max-width: 480px) {
  .app-trf-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
}
.hb.app .app-trf .app-trf-checklist {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 12px;
  background: var(--surface-2);
}
.hb.app .app-trf .app-trf-checklist .app-imp-prof {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.hb.app .app-trf .app-trf-checklist .app-imp-prof + .app-imp-prof {
  border-top: 1px solid var(--hb-grouped-line);
}
.hb.app .app-trf :is(.app-trf-bots,.app-trf-checklist) input.check {
  width: 16px;
  height: 16px;
}

/* Cofre do servidor: os filtros e a busca ocupam a mesma faixa abaixo do título da lista. */
.hb.app #vault .app-vault { gap: 12px; }
.app-vault-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.app-vault-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 550; }
.app-vault-head #vault-new { flex: none; gap: 6px; }
.hb.app #vault .app-vault-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.hb.app #vault .app-vault-seg { gap: 3px; padding: 3px; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--hb-line); }
.hb.app #vault .app-vault-seg button { height: 28px; padding-inline: 12px; border-radius: 6px; font-size: 14px; }
.app-vault-count { margin-inline-start: 6px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.hb.app #vault .app-vault-q { flex: 0 1 188px; min-height: 34px; width: 188px; box-sizing: border-box; border-color: transparent; }
.hb.app #vault .app-vault-list { border-radius: 14px; background: transparent; }
.hb.app #vault .app-vault-row { min-height: 48px; gap: 8px; padding: 0 16px 0 0; }
.hb.app #vault button.app-vault-o { min-height: 48px; gap: 12px; padding-inline: 16px 0; }
.hb.app #vault .app-vault-ic { width: 36px; height: 36px; }
.hb.app #vault .app-vault-o .hb-opt-t strong { font-size: 15px; font-weight: 400; }
.hb.app #vault .app-vault-none { min-height: 48px; box-sizing: border-box; justify-content: center; padding: 9px 16px; }
.hb.app #vault .app-vault-off { flex-wrap: wrap; border-radius: 14px; padding: 12px 16px; }
.hb.app #vault .app-vault-off > div:first-of-type { flex: 1 1 220px; }
.hb.app #vault .app-vault-off strong { display: block; margin-bottom: 4px; font-weight: 550; font-size: 15px; }
.hb.app #vault .app-vault-said:empty { display: none; }
.hb.app #vault-pop button.mp-opt { min-height: 32px; padding: 4px 10px; font-size: 15px; }
.hb.app #vault-pop { border-radius: 14px; }
@media (max-width: 560px) {
  .hb.app #vault .app-vault-q { flex: 1 1 100%; }
  .hb.app #vault .app-vault-head .app-vault-note { display: none; }
}

.hb.app .set-vault-scope:not([open]) { display: none; }
.hb.app .set-vault-scope::backdrop { background: rgb(0 0 0 / 40%); }
.hb.app .set-vault-scope > form { display: flex; flex-direction: column; min-height: 0; }
.hb.app .set-vault-scope-status:empty { display: none; }

/* Ajustes > Celular: a lista de celulares pareados, o estado vazio e a janela com o QR. Medidas do app de referência
   (conferido em 26/11/2026): cartão de 12 de raio e 12/16 de respiro, grade de 260 no mínimo, QR de 176. */
.ph { display: grid; gap: 24px; min-width: 0; }
.ph-sec { gap: 8px; }
.ph-sec .set-sec-h { min-height: 32px; }
.ph-desc, .ph-note, .ph-wait { margin: 0; padding: 0 4px; color: var(--text-3); font-size: 14px; line-height: 20px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ph-card {
  display: flex; align-items: flex-start; gap: 12px; min-width: 0;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.ph-ico {
  display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-2);
}
.ph-ico.ph-on { background: color-mix(in srgb, var(--accent, var(--green)) 18%, transparent); color: var(--text); }
.ph-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.ph-copy > strong { color: var(--text); font-size: 14px; font-weight: 600; line-height: 20px; overflow-wrap: anywhere; }
.ph-copy > span { color: var(--text-3); font-size: 13px; line-height: 18px; }
.ph-acts { display: flex; flex: none; align-items: center; gap: 4px; }
.ph-code-card { flex-wrap: wrap; }
.ph-code-card .ph-acts { flex: 1 0 100%; padding-left: 44px; }
.hb.app .set-page .ph .hb-btn.hb-sm.card-b24 { height: 24px; padding: 0 8px; font-size: 13px; line-height: 20px; }
.hb.app .hb-btn.hb-sm.card-b24.ph-off,
.hb.app .hb-btn.hb-sm.card-b32.ph-off { color: var(--red) !important; }
.hb.app .ph-off[aria-busy="true"] { position: relative; pointer-events: none; }
.hb.app .ph-off[aria-busy="true"] .ph-lbl { visibility: hidden; }
.hb.app .ph-off[aria-busy="true"] .hc-loader { position: absolute; inset: 0; margin: auto; color: var(--red); }
.ph-empty {
  grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 32px 24px; text-align: center;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.ph-empty > strong { color: var(--text); font-size: 15px; font-weight: 600; line-height: 22px; }
.ph-empty > span:not(.ph-empty-ico) { max-width: 420px; color: var(--text-3); font-size: 13px; line-height: 18px; }
.ph-empty-ico {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 50%;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-2);
}
.ph-empty .ph-empty-add { margin-top: 8px; }
.hb.app .ph-dlg {
  width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  gap: 0; padding: 0; overflow: hidden; border: 1px solid var(--hb-dialog-ring); border-radius: 20px; background: var(--surface);
}
.ph-dh { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 0 24px; }
.ph-dh h2 { margin: 0; color: var(--text); font-size: 16px; font-weight: 600; line-height: 22px; }
.ph-dh .hb-ic { width: 32px; height: 32px; }
.ph-db {
  display: grid; align-content: center; justify-items: center; gap: 16px; min-height: 300px; min-width: 0; overflow-y: auto;
  padding: 16px 24px 24px; text-align: center;
}
.ph-qrbox { display: grid; justify-items: center; gap: 8px; }
.ph-stage { position: relative; flex: none; }
.ph-qr { width: 176px; height: 176px; overflow: hidden; border-radius: 8px; background: var(--hb-qr-paper); outline: 0; transition: opacity 0.2s ease-out, filter 0.3s ease-out, transform 0.3s ease-out; }
.ph-qr:focus-visible { box-shadow: 0 0 0 2px var(--accent, var(--text)); }
.ph-qr-svg { display: block; width: 100%; height: 100%; }
.ph-qr-paper { fill: var(--hb-qr-paper); }
.ph-qr-ink { fill: var(--hb-qr-ink); }
.ph-stage[data-success] .ph-qr { opacity: 0.18; filter: blur(2px); transform: scale(0.97); }
.ph-ok { position: absolute; inset: 0; display: grid; place-items: center; color: var(--green); }
.ph-ok svg { width: 58px; height: 58px; padding: 12px; border-radius: 50%; background: var(--surface); }
.ph-tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-3); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.ph-tag[data-kind='signin'] { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--text); }
.ph-tag[data-kind='success'] { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.ph-time { font-variant-numeric: tabular-nums; opacity: 0.8; }
.ph-text { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.ph-text-in {
  flex: 1; min-width: 0; height: 24px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--hb-card, var(--surface-2)); color: var(--text-3); font: 12px/16px ui-monospace, 'SF Mono', Menlo, Consolas, monospace; text-overflow: ellipsis;
}
.ph-computer { max-width: 320px; margin: 0; color: var(--text-3); font-size: 13px; line-height: 18px; text-align: start; }
.ph-steps { display: grid; gap: 4px; max-width: 320px; margin: 0; padding: 0 0 0 20px; color: var(--text-3); font-size: 13px; line-height: 18px; text-align: start; }
.ph-slot {
  display: grid; align-content: center; justify-items: center; gap: 8px; width: 176px; height: 176px; padding: 8px;
  border: 1px dashed var(--border-strong, var(--border)); border-radius: 8px; color: var(--text-3); font-size: 13px; line-height: 18px;
}
.ph-df .hb-btn { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.hb.app .ph-df .hb-btn.ph-off { color: var(--red) !important; }
.ph-df { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hb-dialog-ring); }
@media (max-width: 480px) {
  .ph-grid { grid-template-columns: minmax(0, 1fr); }
  .ph-card { flex-wrap: wrap; }
  .ph-db { padding: 16px; }
}

/* Servidores de modelos próprios (Ajustes > Provedores). Medidas do app de referência (conferidas em 27/11/2026):
   janela de 460 de largura e 14 de raio, cabeçalho com 16 de respiro e a marca de 28, corpo com 16 de respiro e
   16 entre campos, rodapé com o botão inteiro de 36 de altura; linha de modelo pronto com ícone de 32. */
.cp-sec .set-note { margin: 0; }
.cp-acts { display: flex; flex: none; align-items: center; gap: 4px; }
.hb.app .cp-dlg {
  width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  gap: 0; padding: 0; overflow: hidden; border: 1px solid var(--hb-dialog-ring); border-radius: 14px; background: var(--surface);
}
.cp-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--divider); }
.cp-head .cp-back { flex: none; width: 32px; height: 32px; margin: -8px 0 -8px -8px; }
.cp-mark {
  display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 8px;
  background: var(--surface-2); color: var(--text-2);
}
.cp-title { flex: 1; min-width: 0; }
.cp-title h2 { margin: 0; color: var(--text); font-size: 16px; font-weight: 600; line-height: 22px; }
.cp-title p { margin: 0; color: var(--text-3); font-size: 13px; line-height: 18px; }
.cp-head .cp-x { flex: none; align-self: flex-start; width: 32px; height: 32px; margin: -8px -8px 0 0; }
.cp-list { display: grid; gap: 16px; min-height: 0; overflow-y: auto; padding: 16px; }
.cp-group { display: grid; gap: 8px; }
.cp-group-t { color: var(--text-3); font-size: 13px; font-weight: 500; line-height: 18px; }
.cp-presets { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hb.app .hb-btn.cp-preset {
  display: flex; width: 100%; height: auto; align-items: center; justify-content: flex-start; gap: 12px;
  padding: 8px 12px; border-radius: 8px; text-align: start; white-space: normal; font-weight: 400;
}
.cp-preset-ic {
  display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 8px;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-2);
}
.cp-preset-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.cp-preset-t { color: var(--text); font-size: 14px; font-weight: 500; line-height: 20px; }
.cp-preset-d { color: var(--text-3); font-size: 13px; line-height: 18px; }
.cp-badge {
  flex: none; display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-3); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.cp-badge[data-on] { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.cp-body { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; gap: 16px; padding: 16px 16px 0; }
.cp-fields { display: grid; gap: 16px; }
.cp-field { display: grid; gap: 6px; min-width: 0; }
.cp-field > span, .cp-field > label > span { color: var(--text-2); font-size: 14px; line-height: 18px; }
.cp-in {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 15px; outline: 0;
}
.cp-in::placeholder { color: var(--text-3); }
.cp-in:focus-visible { border-color: var(--text-3); }
.cp-in:disabled { opacity: 0.6; }
.cp-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; }
.cp-hint { color: var(--text-3); font-size: 13px; line-height: 18px; }
.hb.app .hb-btn.cp-drop { justify-self: start; height: 24px; padding: 0 8px; font-size: 13px; }
.hb.app .hb-btn.cp-drop[aria-pressed='true'] { color: var(--text) !important; background: var(--hb-hover) !important; }
.cp-err { display: block; margin: 0; color: var(--red); font-size: 13px; line-height: 18px; }
.cp-models { display: grid; gap: 8px; min-width: 0; }
.cp-models-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.cp-models-h h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; line-height: 20px; }
.hb.app .cp-models-h .hb-btn, .hb.app .cp-madd { height: 28px; padding: 0 10px; font-size: 13px; }
#cp-models { display: grid; gap: 8px; min-width: 0; }
.cp-mrows { display: grid; gap: 8px; }
.cp-mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.cp-mrow .hb-ic { width: 32px; height: 32px; }
.hb.app .cp-madd { justify-self: start; }
.cp-find-s { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; line-height: 18px; }
.cp-find-n { margin: 0; color: var(--text-3); font-size: 13px; line-height: 18px; }
.cp-found { display: grid; gap: 4px; min-width: 0; }
.cp-select {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.cp-select:focus-visible { outline: 0; border-color: var(--text-3); }
.cp-select svg { flex: none; color: var(--text-3); }
/* A lista dos modelos achados abre num quadro flutuante sob o botão (largura do botão, no mínimo 280, no máximo 380 de altura), como o menu da referência. */
.cp-menu {
  position: fixed; z-index: 300; display: flex; flex-direction: column; box-sizing: border-box; min-width: 0; max-height: 380px; overflow: hidden; padding: 4px;
  border-radius: 8px; background: var(--hb-sheet); color: var(--text); box-shadow: var(--hb-menu-shadow);
}
.cp-menu-s { flex: none; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; color: var(--text-3); }
.cp-menu-s input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.cp-menu-l { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.cp-menu-hr { flex: none; height: 1px; margin: 4px 0; border: 0; background: var(--divider); }
.cp-menu-n { margin: 0; padding: 4px 8px; color: var(--text-3); font-size: 13px; line-height: 18px; }
.cp-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: 14px; text-align: start; cursor: pointer;
}
.cp-opt:hover, .cp-opt:focus-visible { outline: 0; background: var(--hb-hover); }
.cp-opt:disabled { opacity: 0.5; cursor: default; }
.cp-ck { display: grid; flex: 0 0 16px; width: 16px; height: 16px; place-items: center; }
.cp-opt-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-foot {
  position: sticky; bottom: 0; display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0 -16px;
  padding: 16px; border-top: 1px solid var(--divider); background: var(--surface);
}
.hb.app .hb-btn.cp-save { width: 100%; height: 36px; }
@media (max-width: 480px) {
  .cp-head { padding: 12px; }
  .cp-list, .cp-body { padding-left: 12px; padding-right: 12px; }
  .cp-foot { margin: 0 -12px; padding: 12px; }
}

/* Padrões dos agentes: as escolhas individuais usam os mesmos controles dos padrões. */
.set-agent-switches { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: end; }
.set-agent-switches label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }

/* Identidade do servidor. */
.set-server-name { display: grid; gap: 4px; width: min(220px, 40vw); }
.set-server-name .hb-input { min-height: 32px; }
.set-server-name small { color: var(--red); font-size: 12px; }
.set-server-logo-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 8px; }
.set-server-symbol { display: grid; place-items: center; flex: none; width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--hb-card-2); }
.set-server-save { display: flex; justify-content: end; gap: 8px; padding: 12px 0; }
.set-server-save[hidden] { display: none; }

/* Agenda local de rotinas */
.set-feed-card { display: grid; gap: 12px; padding: 16px; }
.set-feed-line, .set-feed-buttons, .set-feed-message { display: flex; align-items: center; gap: 8px; }
.set-feed-line > .set-select { flex: 0 1 auto; min-width: 0; }
.set-feed-line > .set-select > select { max-width: 100%; }
.set-feed-line > .hb-input { flex: 1 1 40%; min-width: 6rem; font-family: var(--hb-mono, monospace); }
.set-feed-buttons { justify-content: flex-end; gap: 4px; }
.set-feed-message { justify-content: space-between; padding-block: 8px; }
.set-feed-dialog { overflow: visible; color: var(--hb-fg); }
.set-feed-dialog::backdrop { background: rgb(0 0 0 / 40%); }
@media (max-width: 580px) {
  .set-feed-line { flex-wrap: wrap; }
  .set-feed-line > .set-select { width: 100%; flex-basis: 100%; }
}

/* Perfis do navegador do servidor */
.set-card.set-profile-list { overflow: visible; }
.set-profile-entry + .set-profile-entry { box-shadow: 0 -1px 0 var(--divider); }
.set-profile-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--text-3); }
.set-profile-dot-1 { background: #76a3d9; }
.set-profile-dot-2 { background: #a986c5; }
.set-profile-dot-3 { background: #679d86; }
.set-profile-form { display: flex; align-items: center; gap: 8px; min-width: 0; }
#set-profile-create { margin-top: 8px; }
.set-profile-form .hb-input { flex: 1 1 auto; min-width: 7rem; }
.set-profile-menu { position: relative; }
.set-profile-menu > summary { list-style: none; }
.set-profile-menu > summary::-webkit-details-marker { display: none; }
.set-profile-options { position: absolute; z-index: 2; inset-inline-end: 0; display: grid; padding: 4px; border: 1px solid var(--border); border-radius: 10px; min-width: 170px; background: var(--surface); }
.set-profile-options .hb-btn { justify-content: flex-start; white-space: nowrap; }
.set-profile-dialog .hb-input { width: 100%; margin-top: 10px; }

/* Armazenamento do servidor */
.set-storage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.set-storage-usage { overflow-x: auto; }
.set-storage-usage table { width: 100%; border-collapse: collapse; font-size: 14px; }
.set-storage-usage :is(td, th) { padding: 12px 16px; text-align: end; overflow-wrap: anywhere; }
.set-storage-usage th:first-child { text-align: start; }
.set-storage-usage :is(thead, tr + tr) { border-bottom: 1px solid var(--divider); }
.set-storage-usage td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.set-storage-alert { color: var(--danger, #bf1625); }

.set-update-version { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Navegação, categorias e catálogo da Loja */
.hb.app .hb-win[data-view="store"] .hb-side {
  padding: 16px 12px 12px;
}
.hb.app .app-store-side {
  gap: 4px;
}
.hb.app .app-store-side-title {
  font-size: 16px;
  outline: 0;
}
.hb.app .app-store-side :is(nav, .app-store-owned) {
  display: grid;
  gap: 4px;
}
.app-store-owned > h3 {
  margin: 16px 0 4px;
  padding: 0 8px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
}
.hb.app .app-store-nav .app-store-attention {
  flex: none;
  color: var(--amber);
}
.hb.app .app-store-nav:is([aria-current="page"], [aria-current="location"]) {
  background: var(--hb-card);
  color: var(--hb-text);
  font-weight: 500;
}
.hb.app .app-store-nav .app-store-count {
  font-size: 13px;
  font-weight: 400;
}
.hb.app .app-store {
  gap: 32px;
}
.app-store-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hb.app .app-store-toolbar .app-store-q {
  flex: 1;
  min-width: 0;
}
.hb.app .app-store-toolbar :is(.hb-btn, .app-store-sort) {
  flex: none;
}
.hb.app .app-store-toolbar .app-store-sort {
  max-width: 46%;
}
.hb.app .app-store :is(.app-store-g, .app-msg-sec) {
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hb-line);
}
.app-store-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hb.app .app-store-group-head .app-store-gt {
  font-size: 16px;
}
.app-store-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .app-store-tiles .hb-btn {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border-radius: 12px;
  text-align: start;
}
.app-store-tiles button > span:last-child {
  display: grid;
  min-width: 0;
}
.app-store-tiles :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-store-tiles small {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .hb-win[data-view="store"] .hb-side {
  border-inline-end: 1px solid var(--hb-line);
}

/* Detalhes locais da Loja */
.hb.app .app-store-page:has(.app-store-detail-section) { gap: 24px; }
.app-store-detail-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.app-store-detail-title h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.app-store-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--hb-muted);
  font-size: 12px;
  line-height: 18px;
}
.app-store-status > i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.app-store-status[data-tone="good"] { color: var(--green); }
.app-store-status[data-tone="warn"] { color: var(--amber); }
.app-store-status[data-tone="bad"] { color: var(--red); }
.app-store-status[data-tone="muted"] > i { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.app-store-detail-section {
  display: grid;
  gap: 12px;
}
.app-store-detail-section > h4 {
  margin: 0;
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 600;
}
.hb.app .app-store-detail-card {
  border-radius: 12px;
}
.hb.app .app-store-detail-card .app-store-facts {
  margin: 0;
}
.hb.app .app-store-detail-card .app-apps-code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hb-text);
}
.hb.app .app-store-app-remove {
  justify-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  text-align: center;
}
.app-store-app-remove .hb-foot {
  justify-self: stretch;
}

/* Informações e habilidades incluídas no modelo de agente */
.hb.app .app-store-agent-facts {
  display: grid;
  gap: 16px;
}
.hb.app .app-store-agent-skills {
  padding: 0;
}
.hb.app .app-store-agent-skills .app-store-sk {
  margin: 0;
}
.hb.app .app-store-agent-skills .app-store-sk > li + li {
  border-top: 1px solid var(--hb-line);
}
.hb.app .app-store-agent-skills .app-store-skb {
  min-height: 52px;
  gap: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.hb.app .app-store-agent-skills .app-store-skb:hover {
  background: var(--hb-hover);
}
.hb.app .app-store-agent-skills .app-apps-tile {
  width: 36px;
  height: 36px;
}
.hb.app .app-store-agent-skills .app-store-skb > .app-apps-tile {
  flex: none;
}

/* Habilidades em uso e prévia de conversa */
.app-store-detail-section .app-store-group-head h4 {
  margin: 0;
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 600;
}
.hb.app .app-sks-page .app-store-ha {
  display: flex;
  gap: 8px;
}
.hb.app .app-sks-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.hb.app .app-sks-example > div {
  display: grid;
  gap: 4px;
}
.hb.app .app-sks-example strong {
  font-size: 14px;
}
.hb.app .app-sks-example p {
  color: var(--hb-muted);
  font-size: 13px;
}
.hb.app .app-sks-agent-q {
  width: min(240px, 48%);
}
.hb.app .app-sks-bot {
  min-height: 56px;
  cursor: pointer;
}

/* Teclado: atalhos editáveis e fixos usam cartões do painel. */
.set-page[data-page='keyboard'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='keyboard'] .set-sec-h {
  min-height: 22px;
  padding-inline: 0;
}
.set-page[data-page='keyboard'] .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-page[data-page='keyboard'] .set-row {
  min-height: 48px;
  padding-block: 10px;
}
.set-page[data-page='keyboard'] .set-copy > strong {
  font-weight: 400;
}
.hb.app .set-page[data-page='keyboard'] .set-keys-b {
  justify-content: flex-end;
  border-color: transparent;
}
.hb.app .set-page[data-page='keyboard'] .set-keys-b:hover {
  background: var(--hb-ctl-hover);
}
.hb.app .set-page[data-page='keyboard'] .set-keys-b[data-no='true'] {
  border-color: var(--red);
}
.set-keys-fixed {
  padding-inline: 12px;
}

/* Aparência: grupos do painel e paleta acionada pela linha da conversa. */
.set-page[data-page='appearance'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='appearance'] .set-sec-h {
  min-height: 22px;
  padding-inline: 0;
}
.set-page[data-page='appearance'] .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-page[data-page='appearance'] .set-row {
  min-height: 48px;
  padding-block: 10px;
}
.set-page[data-page='appearance'] .set-copy > strong {
  font-weight: 400;
}
.hb.app .set-color-trigger {
  display: flex;
  width: 168px;
  height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-raised);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}
.set-color-trigger > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-color-trigger > i {
  flex: 0 0 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--set-tint-color, transparent);
}
.set-color-pop {
  position: fixed;
  inset: auto;
  width: min(248px, calc(100vw - 24px));
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}
.hb.app .set-color-pop :is(.set-tint-row, .set-tint-eg) {
  margin: 0;
  padding: 0;
}
.hb.app .set-color-pop .set-tint-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.hb.app .set-color-pop .set-tint-eg {
  margin-top: 10px;
}

/* Preferências visuais locais aplicadas nas conversas e demais telas. */
:root[data-appearance-font='system'] {
  --font: system-ui, sans-serif;
}
:root[data-appearance-font='sans'] {
  --font: Arial, sans-serif;
}
:root[data-appearance-font='serif'] {
  --font: Georgia, serif;
}
:root[data-appearance-code='menlo'] {
  --mono: Menlo, ui-monospace, monospace;
}
:root[data-appearance-code='consolas'] {
  --mono: Consolas, ui-monospace, monospace;
}
:root[data-appearance-code='courier'] {
  --mono: 'Courier New', ui-monospace, monospace;
}
.hb.app .fp-text {
  font-family: var(--mono);
}
.hb.app #msgs {
  --chat-local-color: var(--chat-local-dark, transparent);
  background-color: var(--chat-local-color);
}
:root[data-theme='light'] .hb.app #msgs {
  --chat-local-color: var(--chat-local-light, transparent);
}
:root[data-appearance-backdrop='soft'] .hb.app #msgs {
  background: linear-gradient(145deg, var(--chat-local-color), transparent 75%);
}
:root[data-appearance-backdrop='blur'] .hb.app #msgs {
  background: radial-gradient(ellipse at 30% 15%, var(--chat-local-color), transparent 70%);
  backdrop-filter: blur(16px);
}
:root[data-appearance-faces='still'] .hc-bot,
:root[data-appearance-faces='still'] .hc-bot::after {
  animation: none;
}
@media (prefers-reduced-motion: no-preference) {
  :root[data-appearance-opening='animated'] .hb.app #msgs {
    animation: hb-conversation-open 160ms ease-out both;
  }
}
@keyframes hb-conversation-open {
  from { opacity: 0; }
  to { opacity: 1; }
}
@supports (color: attr(data-tint type(<color>))) {
  .hb-msgs[data-bubble='classic'][data-tint^='#'] {
    --hb-tint: attr(data-tint type(<color>)) !important;
  }
}
.hb.app .set-color-pop .set-tint-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.set-color-edit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.set-color-edit :is(input[type='color'], #set-color-hex) {
  height: 28px;
  margin: 0;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}
.set-color-edit input[type='color'] {
  width: 38px;
  padding: 2px 4px;
  cursor: pointer;
}
#set-color-hex {
  width: 100%;
  padding-inline: 6px;
  font-family: var(--mono);
}

.hb.app .set-color-pop {
  width: min(288px, calc(100vw - 24px));
  border: 0;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-pop);
}
.set-page[data-page='appearance'] {
  --appearance-switch-on: #f0f0f0;
  --appearance-switch-ink: #141414;
}
[data-theme='light'] .set-page[data-page='appearance'] {
  --appearance-switch-on: #1c1c1e;
  --appearance-switch-ink: #fff;
}
.set-page[data-page='appearance'] .set-row {
  padding-block: 8.5px;
}
.set-page[data-page='appearance'] .set-select {
  width: 168px;
}
.hb.app .set-color-trigger > i {
  width: 14px;
  height: 14px;
}
.set-page[data-page='appearance'] .set-actions .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.set-page[data-page='appearance'] .set-actions .toggle::after {
  width: 16px;
  height: 16px;
  background: var(--text);
}
.set-page[data-page='appearance'] .set-actions .toggle:checked {
  background: var(--appearance-switch-on);
}
.set-page[data-page='appearance'] .set-actions .toggle:checked::after {
  transform: translateX(16px);
  background: var(--appearance-switch-ink);
}
.set-background-native {
  width: 36px;
  height: 32px;
  margin: 0;
  padding: 3px 5px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

/* Notificações agrupadas por bot e por computador. */
.set-page[data-page='notifications'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='notifications'] .set-sec-h {
  min-height: 22px;
  padding-inline: 0;
}
.set-page[data-page='notifications'] .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-page[data-page='notifications'] .set-row {
  min-height: 48px;
  padding-block: 10px;
}
.set-page[data-page='notifications'] .set-copy > strong {
  font-weight: 400;
}
.hb.app .set-page[data-page='notifications'] #set-test {
  color: var(--text) !important;
  background: transparent !important;
  box-shadow: inset 0 0 0 1px var(--border);
}
.hb.app .set-page[data-page='notifications'] #set-test:hover:not(:disabled) {
  background: var(--hb-hover) !important;
}

/* Busca dos Ajustes e realce do resultado no painel de destino. */
.set-search-status {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.hb.app button.set-result:hover {
  background: var(--hb-ctl-hover);
}
.hb.app button.set-result:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: -2px;
}
.set-page .set-search-match {
  background: var(--surface-3);
}

/* Cartões da página Geral no painel de Ajustes. */
.set-page[data-page='general'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='general'] .set-sec-h {
  min-height: 22px;
  padding-inline: 0;
}
.set-page[data-page='general'] .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-page[data-page='general'] .set-row {
  min-height: 48px;
  padding-block: 10px;
  gap: 16px;
}
.set-page[data-page='general'] .set-copy > strong {
  font-weight: 400;
}
.set-page[data-page='general'] .set-select {
  min-width: 168px;
  width: 168px;
}

/* Controle do computador no painel de Ajustes. */
.set-page[data-page='computer'] .set-content {
  padding-top: 24px;
}
.set-page[data-page='computer'] .set-sec-h {
  min-height: 22px;
  padding-inline: 0;
}
.set-page[data-page='computer'] .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-page[data-page='computer'] .set-row {
  min-height: 48px;
  padding-block: 10px;
}
.set-page[data-page='computer'] .set-copy > strong {
  font-weight: 400;
}

/* As portas da moldura representam as saídas do mesmo tipo dos seus membros. */
.hb.app .app-wf-group [data-group-port] {
  top: calc(50% + 16px + var(--wf-group-offset));
  right: -14px;
  display: grid;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  background: var(--wf-field-bg);
  box-shadow: 0 0 0 1px var(--wf-card-ring);
  color: var(--wf-card-ink);
}
.hb.app .app-wf-group [data-group-port]:is(:hover, [aria-pressed="true"]) {
  background: var(--wf-card-ink);
  color: var(--wf-card-bg);
}
.hb.app .app-wf-group[data-folded] [data-group-port] { top: calc(50% + var(--wf-group-offset)); }
.app-wf-group [data-group-in] { position: absolute; top: 50%; left: 0; }
.app-wf-group-title small { color: var(--hb-muted); }
.app-wf-group[data-folded] { background: var(--hb-card); }
.app-wf-group-stack {
  display: grid;
  height: calc(100% - 28px);
  place-items: center;
  color: var(--hb-muted);
}
.app-wf-group-stack img {
  grid-area: 1 / 1;
  width: 76px;
  height: 92px;
  object-fit: cover;
  border: 2px solid var(--hb-card);
  border-radius: 9px;
}
.app-wf-group-stack img:nth-child(2) { transform: translateX(-30px) rotate(-12deg); }
.app-wf-group-stack img:nth-child(3) { transform: translateX(30px) rotate(12deg); }
.app-wf-n button.wf-p[data-in] { pointer-events: auto; }
.app-wf-n button.wf-p[data-in]:focus-visible { opacity: 1; }

/* Menus do quadro e busca usam o mesmo ritmo dos controles do canvas. */
#wf-pop:is([data-wf-menu="levels"], [data-wf-menu="context"], [data-wf-menu="add"], [data-wf-menu="search"]) {
  --wf-menu-ink: #fff;
  --wf-menu-muted: #979797;
  --wf-menu-paper: #141414;
  --wf-menu-danger: #fd2f3b;
  --wf-menu-hover: color-mix(in srgb, var(--wf-menu-ink) 6%, transparent);
  --wf-menu-divider: color-mix(in srgb, var(--wf-menu-ink) 10%, transparent);
  color: var(--wf-menu-ink);
  background: var(--wf-menu-paper);
}
:root[data-theme="light"] #wf-pop:is([data-wf-menu="levels"], [data-wf-menu="context"], [data-wf-menu="add"], [data-wf-menu="search"]) {
  --wf-menu-ink: #141414;
  --wf-menu-muted: #6b6b70;
  --wf-menu-paper: #fff;
  --wf-menu-danger: #e8222d;
}
#wf-pop[data-wf-menu="context"] { min-width: 192px; max-width: min(288px, calc(100vw - 24px)); }
.hb.app #wf-pop :is(.app-wf-action-list, .app-wf-picker) button.mp-opt {
  justify-content: flex-start;
  height: 32px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 10px;
  color: var(--wf-menu-ink);
  font-size: 13px;
  line-height: 18px;
  transition: none;
}
.hb.app #wf-pop :is(.app-wf-action-list, .app-wf-picker) button.mp-opt::before { display: none; }
.hb.app #wf-pop :is(.app-wf-action-list, .app-wf-picker) button.mp-opt:is(:hover, :focus-visible, [aria-checked="true"]) {
  background: var(--wf-menu-hover);
}
.hb.app #wf-pop .app-wf-action-list > button > svg { flex: none; color: var(--wf-menu-muted); }
.hb.app #wf-pop .app-wf-action-list > button.app-wf-danger,
.hb.app #wf-pop .app-wf-action-list > button.app-wf-danger > svg { color: var(--wf-menu-danger); }
#wf-pop .app-wf-action-list > button > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wf-pop .app-wf-action-list hr { height: 1px; margin: 6px -6px; border: 0; background: var(--wf-menu-divider); }
#wf-pop .app-wf-menu-keys { display: inline-flex; flex: none; gap: 2px; align-items: center; margin-inline-start: auto; }
#wf-pop .app-wf-menu-keys kbd {
  display: inline-grid;
  min-width: 16px;
  height: 18px;
  padding-inline: 3px;
  place-items: center;
  border-radius: 4px;
  background: var(--wf-menu-hover);
  color: var(--wf-menu-muted);
  font: inherit;
  font-size: 11px;
}
#wf-pop .app-wf-levels { gap: 2px; }
.hb.app #wf-pop .app-wf-levels .mp-opt { justify-content: center; font-variant-numeric: tabular-nums; }
.hb.app .app-wf-zoom #wf-zoom { min-width: 6ch; padding-inline: 4px; font-variant-numeric: tabular-nums; }
.app-wf-zoom-rule { width: 1px; height: 16px; margin-inline: 4px; background: var(--wf-ring); }

#wf-pop:is([data-wf-menu="add"], [data-wf-menu="search"]) .app-wf-query { display: flex; min-width: 0; align-items: center; }
#wf-pop .app-wf-query > svg { width: 14px; height: 14px; flex: none; color: var(--wf-menu-muted); }
#wf-pop .app-wf-query #wf-query {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--wf-menu-ink);
  font-size: 13px;
  outline: 0;
}
#wf-pop .app-wf-query #wf-query::placeholder { color: var(--wf-menu-muted); }
#wf-pop .app-wf-query #wf-query::-webkit-search-cancel-button { display: none; }
#wf-pop[data-wf-menu="add"] { max-width: 320px; border-radius: 16px; }
#wf-pop[data-wf-menu="add"] .mp-panel { padding: 0; }
#wf-pop[data-wf-menu="add"] .app-wf-query { gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--wf-menu-divider); }
#wf-pop[data-wf-menu="add"] .app-wf-query #wf-query { height: 36px; }
#wf-pop[data-wf-menu="add"] #wf-matches { padding: 6px; }
#wf-pop[data-wf-menu="add"] .app-wf-picker-group + .app-wf-picker-group { margin-top: 6px; }
#wf-pop[data-wf-menu="add"] .app-wf-picker-group > small {
  display: block;
  margin: 0;
  padding: 6px 8px 4px;
  color: var(--wf-menu-muted);
  font-size: 12px;
  font-weight: 500;
}
.hb.app #wf-pop[data-wf-menu="add"] .app-wf-picker button.mp-opt { padding-inline: 8px; border-radius: 8px; }
#wf-pop[data-wf-menu="search"] {
  --wf-menu-paper: rgb(36 36 36 / .75);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--wf-menu-divider);
  backdrop-filter: blur(40px) saturate(1.4);
}
:root[data-theme="light"] #wf-pop[data-wf-menu="search"] { --wf-menu-paper: rgb(252 252 252 / .75); }
#wf-pop[data-wf-menu="search"] .app-wf-query { gap: 4px; padding-inline-start: 8px; border-radius: 8px; }
#wf-pop[data-wf-menu="search"] .app-wf-query:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--wf-menu-divider); }
.hb.app #wf-pop[data-wf-menu="search"] .app-wf-query button { width: 32px; height: 32px; color: var(--wf-menu-muted); }
#wf-pop[data-wf-menu="search"] #wf-matches {
  display: grid;
  gap: 2px;
  max-height: 320px;
  padding-top: 4px;
  overflow-y: auto;
  border-top: 1px solid var(--wf-menu-divider);
}
.hb.app #wf-pop[data-wf-menu="search"] .app-wf-picker button.mp-opt { padding-inline: 8px; }
#wf-pop .app-wf-menu-glyph { display: grid; width: 16px; height: 16px; flex: none; place-items: center; color: var(--wf-kind); }
#wf-pop[data-wf-menu="add"] .app-wf-menu-glyph svg { width: 16px; height: 16px; }
#wf-pop[data-wf-menu="search"] .app-wf-menu-glyph {
  width: 20px;
  height: 20px;
  margin-inline-start: -4px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--wf-kind) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wf-kind) 14%, transparent);
}
#wf-pop .app-wf-picker-title { flex: none; }
#wf-pop .app-wf-picker-snippet { min-width: 0; overflow: hidden; color: var(--wf-menu-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
#wf-pop .app-wf-picker .app-wf-picker-empty { margin: 0; padding: 8px 8px 12px; color: var(--wf-menu-muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  #wf-pop:is([data-wf-menu="levels"], [data-wf-menu="context"], [data-wf-menu="add"], [data-wf-menu="search"]) { animation: none; }
}
#wf-pop[data-wf-drop] .mp-panel { padding: 4px; }
#wf-pop[data-wf-drop] .app-wf-query { gap: 4px; padding-inline: 8px; }
#wf-pop[data-wf-menu="add"][data-wf-drop] .app-wf-query #wf-query { height: 32px; min-height: 32px; }
#wf-pop[data-wf-drop] #wf-matches { padding: 4px 0 0; }
.hb.app #wf-pop[data-wf-drop]:has(#wf-query:focus) .app-wf-picker-group:first-child > button:first-of-type { background: var(--wf-menu-hover); }

/* Transferência: medidor de arquivos e linhas da janela de Ajustes. */
.app-trf {
  --trf-label-muted: #979797;
  --trf-choice-border: #333335;
  --trf-switch-on: #f0f0f0;
  --trf-switch-knob: #141414;
}
[data-theme='light'] .app-trf {
  --trf-label-muted: #6b6b70;
  --trf-choice-border: #e3e3e6;
  --trf-switch-on: #1c1c1e;
  --trf-switch-knob: #ffffff;
}
.app-trf-meter {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.app-trf-meter strong {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}
.app-trf-meter > span {
  color: var(--trf-label-muted);
  font-size: 13px;
  line-height: 18px;
}
.app-trf-options-title .app-vault-seg {
  margin-inline-start: auto;
}
.hb.app .app-trf .app-trf-opt:has(.toggle) {
  gap: 16px;
  min-height: 48px;
  padding: 10px 16px;
}
.hb.app .app-trf .app-trf-opt:has(.toggle) .app-imp-it > b {
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}
.hb.app .app-trf .app-trf-opt:has(.toggle) .app-imp-it > span {
  color: var(--trf-label-muted);
  font-size: 14px;
  line-height: 20px;
}
.hb.app .app-trf .app-trf-opt .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.hb.app .app-trf .app-trf-opt .toggle::after {
  width: 16px;
  height: 16px;
  background: var(--text);
}
.hb.app .app-trf .app-trf-opt .toggle:checked {
  background: var(--trf-switch-on);
}
.hb.app .app-trf .app-trf-opt .toggle:checked::after {
  transform: translateX(16px);
  background: var(--trf-switch-knob);
}
.hb.app .app-trf :is(.app-trf-bots, .app-trf-checklist .app-imp-prof) {
  border-color: var(--trf-choice-border);
}
.hb.app .app-trf-bots .app-trf-opt {
  gap: 12px;
  padding-inline: 16px;
}
.hb.app .app-trf :is(.app-trf-bots,.app-trf-checklist) .app-imp-it > span {
  color: var(--trf-label-muted);
}
.app-trf-bytes {
  min-width: 72px;
  margin-inline-start: auto;
  text-align: end;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.app-trf-flow li,
.app-trf-tile span,
.app-trf-private {
  color: var(--trf-label-muted);
}
.hb.app .app-trf .app-trf-count {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-trf-count > li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
}
.app-trf-count > li > svg {
  flex: none;
  color: var(--trf-label-muted);
}

/* A coluna dos ajustes do servidor mantém as medidas da página desktop. */
.set-server-page {
  --set-secondary: rgb(255 255 255 / 59%);
  --set-button: #f0f0f0;
  --set-button-ink: #141414;
  --set-popover: rgb(26 26 26 / 92%);
}
[data-theme=light] .set-server-page {
  --set-secondary: rgb(20 20 20 / 60%);
  --set-button: #1c1c1e;
  --set-button-ink: #fff;
  --set-popover: rgb(245 245 246 / 92%);
}
.set-server-page .set-content {
  padding-top: 24px;
}
.set-server-page .set-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: transparent;
}
.set-server-page .set-row {
  min-height: 48px;
  padding: 10px 16px;
}
.set-server-page .set-copy {
  gap: 2px;
}
.set-server-page .set-copy strong {
  font-weight: 400;
}
.set-server-page .set-copy > span {
  overflow: hidden;
  color: var(--set-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-server-page .set-sec-h {
  min-height: 22px;
  padding-inline: 0;
}
.set-page:is([data-page=agent-defaults], [data-page=memory], [data-page=personality], [data-page=routine-feed]) .set-select select {
  height: 32px;
  background: transparent;
  font-size: 13px;
}
.set-popover { position: relative; }
.set-popover > summary { list-style: none; cursor: pointer; }
.set-popover > summary::-webkit-details-marker { display: none; }
.set-popover > summary[aria-disabled=true] { opacity: .42; cursor: default; }
.set-popover-card {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 5;
  box-sizing: border-box;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: var(--set-popover);
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
  backdrop-filter: blur(18px);
}
.hb.app .set-page:is([data-page=server-identity], [data-page=agent-defaults]) .set-card { overflow: visible; }
.set-identity-row { position: relative; }
.set-server-name { position: relative; height: 32px; }
.hb.app #set-identity-name { height: 32px; border-color: var(--border); border-radius: 8px; background: var(--surface-2); }
#set-identity-error { position: absolute; inset-inline: 0; top: calc(100% + 2px); }
.set-server-logo-picker { position: relative; }
.hb.app .set-page .set-identity-tile.hb-quiet {
  width: 48px; height: 48px; padding: 0; box-sizing: border-box;
  display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2) !important;
}
.hb.app .set-identity-tile .set-server-symbol { width: 40px; height: 40px; border-radius: 8px; }
.hb.app .set-identity-remove {
  position: absolute; inset-inline-end: -8px; top: -8px; width: 24px; height: 24px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
}
@media (hover:hover) {
  .hb.app .set-identity-remove { opacity: 0; }
  .hb.app .set-server-logo-picker:is(:hover, :focus-within) .set-identity-remove { opacity: 1; }
}
.set-identity-popover > .set-popover-card { width: min(284px, calc(100vw - 32px)); }
.set-identity-options-title {
  display: flex; min-height: 32px; align-items: center; justify-content: space-between;
  padding: 4px 10px 0; color: var(--text); font-weight: 500; font-size: 13px;
}
.set-identity-choices, .set-identity-colors { display: grid; gap: 4px; padding: 4px 10px 12px; }
.set-identity-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.set-identity-colors { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; }
.hb.app .set-page :is(.set-identity-choice,.set-identity-color) {
  width: 100%; height: 44px; min-width: 0; padding: 0; border-radius: 8px;
  background: transparent !important; box-shadow: none;
}
.hb.app .set-page .set-identity-color { height: 32px; }
.hb.app .set-page :is(.set-identity-choice,.set-identity-color)[aria-pressed=true] {
  background: var(--surface-3) !important; box-shadow: inset 0 0 0 1px var(--border);
}
#main:has(.set-page[data-page=server-identity]) { position: relative; }
.set-page[data-page=server-identity]:has(.set-server-save:not([hidden])) { padding-bottom: 60px; }
.hb.app .set-server-save {
  position: absolute; inset: auto 0 0; z-index: 4; min-height: 60px; box-sizing: border-box;
  align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px;
  border-top: 1px solid var(--divider); background: var(--surface-2);
}
.set-server-save-actions { display: flex; align-items: center; gap: 4px; }
.hb.app .set-page .set-server-save-actions button:first-child { background: transparent !important; box-shadow: none; }
.hb.app .set-page .set-server-save-actions #set-identity-save { background: var(--set-button); color: var(--set-button-ink); }

.hb.app .set-page .set-agent-zone > summary.hb-quiet {
  display: flex; align-items: center; justify-content: space-between; width: 220px; height: 32px;
  padding: 0 8px 0 10px; border-radius: 8px; background: transparent !important; font-size: 13px;
}
.set-agent-zone > summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-agent-zone > .set-popover-card { top: calc(100% + 4px); width: min(240px, calc(100vw - 32px)); padding: 4px; border-radius: 8px; background: var(--hb-raised); backdrop-filter: none; }
#set-agent-default-parallel { width: 168px; }
.set-agent-zone .hb-search { margin: 0 0 4px; }
.set-zone-options { display: grid; max-height: min(320px, 40vh); overflow-y: auto; }
.hb.app .set-page .set-zone-options > button {
  display: flex; min-height: 32px; justify-content: flex-start; overflow: hidden;
  background: transparent !important; box-shadow: none;
}
.hb.app .set-page .set-zone-options > button:is(:hover,[aria-pressed=true]) { background: var(--surface-3) !important; }
.hb.app .set-page .set-zone-options > button[hidden] { display: none; }
.set-zone-empty { padding: 8px; }

.set-feed-card { gap: 8px; padding: 10px 16px; }
.hb.app .set-feed-line > .hb-input {
  height: 32px; min-height: 32px; border-radius: 8px; border-color: var(--border); background: var(--surface-2);
}
.hb.app .set-page[data-page=routine-feed] .set-feed-line .set-select { min-width: auto; }
.hb.app .set-page[data-page=routine-feed] .set-feed-buttons > button {
  background: transparent !important; color: var(--set-secondary) !important; box-shadow: none;
}
.hb.app .set-page[data-page=routine-feed] :is([data-do=set-feed-create],[data-do=set-feed-copy]) {
  background: var(--set-button) !important; color: var(--set-button-ink) !important;
}
.set-feed-privacy { color: var(--set-secondary); }
.hb.app .set-routine-confirm { width: min(460px, calc(100vw - 48px)); padding: 0; border-radius: 20px; color: var(--text); }
.set-feed-confirm-main { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 24px; }
.set-feed-confirm-main > div { padding-top: 6px; }
.hb.app .set-feed-confirm-main h2 { margin: 0 0 8px; font-size: 16px; line-height: 22px; }
.hb.app .set-feed-confirm-main p { margin: 0; font-size: 15px; line-height: 22px; }
.set-feed-confirm-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.set-routine-confirm[data-tone=warning] .set-feed-confirm-mark { color: var(--red); }
.hb.app .set-routine-confirm .hb-foot { margin: 0; padding: 16px 24px; border-top: 1px solid var(--hb-dialog-ring); }
@media (max-width: 680px) {
  .hb.app .set-page[data-page=server-identity] .set-row { gap: 8px; }
  .hb.app .set-server-save { padding-inline: 16px; }
  .set-server-name { width: min(220px, 42vw); }
  .set-popover-card { max-width: calc(100vw - 42px); }
}

.set-server-page:has(.set-choice) .set-card { overflow: visible; }
.set-choice { width: 168px; flex: none; }
.set-choice-compact { width: auto; max-width: 230px; }
.hb.app .set-choice-trigger {
  display: flex; min-height: 32px; align-items: center; justify-content: space-between; gap: 6px;
  box-sizing: border-box; padding: 0 8px 0 10px; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13px; line-height: 18px;
}
.set-choice-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-choice-trigger > svg { flex: none; color: var(--text-3); }
.set-choice[open] > .set-choice-trigger { background: var(--hb-hover); }
.set-choice > .set-popover-card {
  box-sizing: border-box; width: max(100%,144px); top: calc(100% + 4px); display: grid;
  padding: 4px; max-height: 320px; overflow: auto; border-radius: 8px;
  background: var(--hb-raised); backdrop-filter: none;
}
.hb.app .set-page .set-choice-option.hb-quiet {
  width: 100%; min-height: 30px; height: auto; padding: 6px 8px; justify-content: space-between; gap: 4px;
  background: transparent !important; box-shadow: none; border-radius: 6px; text-align: start; font-size: 13px; line-height: 18px;
}
.hb.app .set-page .set-choice-option:is(:hover,:focus-visible) { background: var(--hb-hover) !important; }
.set-choice-option > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-choice-option > svg { flex: none; }
.set-choice-option[data-control=set-agent-default-parallel][data-value="0"] { margin-bottom: 4px; border-bottom: 1px solid var(--divider); }
.set-feed-line > .set-choice-compact > .set-popover-card { inset-inline: 0 auto; }
.set-personality-error { color: var(--set-secondary); }
.set-agent-detail-head { display: grid; gap: 8px; justify-items: start; }
.hb.app .set-server-page .set-agent-detail-button { width: 32px; height: 32px; }
.hb.app .set-page[data-page=agent-defaults] .toggle {
  width: 36px; height: 20px; border-radius: 999px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.hb.app .set-page[data-page=agent-defaults] .toggle:checked { background: var(--set-button); }
.hb.app .set-page[data-page=agent-defaults] .toggle::after { width: 16px; height: 16px; top: 2px; left: 2px; }
.hb.app .set-page[data-page=agent-defaults] .toggle:checked::after { transform: translateX(16px); background: var(--set-button-ink); }
.hb.app #set-identity-name[aria-invalid=true] { border-color: var(--red); }
.hb.app #set-profile-create .hb-input { min-height: 32px; height: 32px; border-radius: 8px; }
.hb.app #set-profile-rename .hb-input { min-height: 28px; height: 28px; border-radius: 8px; }
.set-page[data-page=browser-profiles] .set-sec { gap: 12px; }
.hb.app .set-profile-dialog:is([data-profile-action=delete],[data-profile-action=clear]) {
  width: min(460px, calc(100vw - 48px)); border-radius: 20px;
}
@media (max-width: 580px) {
  .set-feed-line > .set-choice-compact { width: 100%; max-width: none; }
}

/* Destaques editoriais do catálogo local. */
.store-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.store-pick {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #333335;
  border-radius: 14px;
  background: #212121;
}
[data-theme="light"] .store-pick { background: #fff; border-color: #e3e3e6; }
.store-pick > .app-store-hit { position: absolute; z-index: 1; inset: 0; border-radius: inherit; }
.store-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.store-pick-head .app-store-go { position: relative; z-index: 2; max-width: 60%; }
.store-pick h5 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.store-pick p { display: -webkit-box; align-self: start; min-height: 2lh; margin: 0; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; color: var(--text-2); }
.store-pick small { display: block; min-height: 16px; color: var(--hb-muted); font-size: 12px; }
.store-pick-skill { padding: 12px; }
.store-pick-skill > :is(.store-pick-head, p, small) { padding-inline: 4px; }
.store-pick-art { display: grid; place-items: center; height: 96px; overflow: hidden; border-radius: 20px; background: linear-gradient(125deg, var(--accent-soft), var(--surface-2)); }
/* Escolha independente para cada habilidade editada do modelo. */
.hb.app .hb-dlg.store-update-prompt { width: min(460px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border-radius: 20px; background: #1a1a1a; }
[data-theme="light"] .hb.app .hb-dlg.store-update-prompt { background: #f5f5f6; }
.store-update-body { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 24px; overflow-y: auto; }
.store-update-icon { display: grid; place-items: center; align-self: start; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); }
.store-update-choices { display: grid; max-height: 224px; overflow-y: auto; border: 1px solid var(--hb-line); border-radius: 12px; }
.store-update-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; }
.store-update-row + .store-update-row { border-top: 1px solid var(--hb-line); }
.store-update-row small { display: block; color: var(--hb-muted); font-size: 12px; }
.store-update-row .store-copy-replace, .store-update-row:has([value=replace]:checked) .store-copy-keep { display: none; }
.store-update-row:has([value=replace]:checked) .store-copy-replace { display: block; color: var(--amber); }
.store-update-switch { display: flex; flex: none; align-items: center; gap: 3px; padding: 3px; border-radius: 8px; background: #212121; }
.store-update-switch label { position: relative; cursor: pointer; }
.store-update-switch input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.store-update-switch span { display: grid; place-items: center; height: 28px; padding-inline: 12px; font-size: 14px; border-radius: 6px; }
.store-update-switch :checked + span { background: #2a2a2a; }
.store-update-switch :focus-visible + span { outline: 2px solid currentColor; }
[data-theme="light"] .store-update-switch { background: #ececee; }
[data-theme="light"] .store-update-switch :checked + span { background: #fff; }
.hb.app .app-store-agent-page .app-store-ha [data-do="store-update"] {
  height: 32px; min-height: 32px; padding-inline: 12px; font-size: 13px;
}

.hb.app .set-feed-confirm-main .set-confirm-extra { margin-top: 8px; font-size: 13px; }
.set-storage-summary { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.set-storage-summary strong { display: block; font-size: 24px; line-height: 30px; font-variant-numeric: tabular-nums; }
.set-resource-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--divider); border-radius: 12px; background: var(--surface-2); }
.set-resource { display: grid; grid-template-columns: 14px minmax(0,1fr) 96px 44px; align-items: center; padding: 12px 16px; gap: 12px; }
.set-resource + .set-resource { border-top: 1px solid var(--divider); }
.set-resource-icon { display: flex; color: var(--text-2); }
.set-resource-copy { display: grid; min-width: 0; gap: 2px; font-size: 13px; line-height: 18px; }
.set-resource-copy strong { font-weight: 500; }
.set-resource-copy > span:not(.set-storage-alert) { color: var(--set-secondary); }
.set-resource-number { justify-self: end; text-align: end; font-size: 13px; font-variant-numeric: tabular-nums; }
.set-resource-number:last-child { grid-column: -2 / -1; }
.set-resource progress { display: block; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 6px; color: var(--text-2); background: var(--surface-3); }
.set-resource progress::-webkit-progress-bar { border-radius: inherit; background: var(--surface-3); }
.set-resource progress::-webkit-progress-value { border-radius: inherit; background: currentColor; }
.set-resource-bar { position: relative; display: flex; align-items: center; min-width: 0; }
.set-resource-limit { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--text-2); pointer-events: none; }
.set-resource[data-tone=warning] :is(.set-resource-icon,progress) { color: var(--amber); }
.set-resource[data-tone=danger] :is(.set-resource-icon,progress) { color: var(--red); }
/* A linha de "Formas" guarda a altura do botão de restaurar mesmo sem ele: o painel não muda de tamanho ao mexer. */
.set-identity-options-title.set-identity-options-head { min-height: 50px; box-sizing: border-box; }
/* Linhas de agente e de conversa: 8 px acima e abaixo, 16 px dos lados (o botão do tema zerava o respiro). */
.hb.app .set-page .set-space-row { padding: 8px 16px; box-sizing: border-box; }
.hb.app .set-page .set-space-name strong { font-size: 14px; line-height: 20px; }
.hb.app .set-page .set-space-row small { font-size: 13px; line-height: 18px; }
.hb.app .set-page .set-space-value { font-size: 14px; line-height: 20px; }
.set-storage-total-sk { display: block; width: 140px; height: 36px; margin: 2px 0; border-radius: 8px; }
.hb.app .set-page .set-storage-scan { display: inline-flex; align-items: center; gap: 6px; }
.hb.app .set-page .set-storage-scan > :is(svg, .hc-loader) { flex: none; width: 14px; height: 14px; }
/* Resumo: rótulo de 14 px médio, total de 32 px semibold com respiro de 2 px e legenda de 13 px. */
.hb.app .set-page .set-storage-summary > div > span.set-note { font-weight: 500; }
.hb.app .set-page .set-storage-summary strong { margin: 2px 0; font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hb.app .set-page .set-storage-summary p.set-note { font-size: 13px; line-height: 18px; }
/* Legenda do gráfico: texto de 14 px, valor sem negrito e porcentagem de 13 px com largura mínima de 4 caracteres. */
.hb.app .set-page .set-space-legend li { font-size: 14px; }
.hb.app .set-page .set-space-legend strong { font-weight: 400; }
.hb.app .set-page .set-space-legend small { min-width: 4ch; font-size: 13px; text-align: end; }
.set-process-about { margin: 0 0 8px; }
.set-process-notice .set-copy > span { color: var(--set-secondary); }
.set-storage-topics .set-space-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 580px) {
  .set-resource { grid-template-columns: 14px minmax(0,1fr) minmax(24px,46px) auto; gap: 8px; }
}

/* Importar: contraste das legendas e selos do cartão de conferência. */
.set-page[data-page='import'] {
  --import-description: #979797;
  --import-ready: #31cf76;
  --import-ready-fill: rgba(49, 207, 118, 0.12);
}
[data-theme='light'] .set-page[data-page='import'] {
  --import-description: #6b6b70;
  --import-ready: #1fa85a;
  --import-ready-fill: rgba(31, 168, 90, 0.12);
}
.hb.app .set-page[data-page='import'] :is(.app-imp-h p, .app-imp-sum p, .app-imp-item .app-imp-it > span, .app-imp-opt .hb-opt-t > span, .app-imp-opt > svg) {
  color: var(--import-description);
}
.hb.app .set-page[data-page='import'] .app-imp-item {
  align-items: center;
}
.hb.app .set-page[data-page='import'] .app-imp-item .app-imp-oi {
  margin-top: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-st {
  height: 22px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.hb.app .set-page[data-page='import'] .app-imp-st[data-state='import'] {
  background: var(--import-ready-fill);
  color: var(--import-ready);
}
.hb.app .set-page[data-page='import'] .app-imp-st[data-state='skip'] {
  border-color: var(--border);
  background: transparent;
  color: var(--text-2);
}

/* Etapas de Transferência e legenda da conferência. */
.app-trf-flow {
  align-items: center;
  gap: 12px;
}
.app-trf-flow > li:not(.app-trf-flow-next) {
  color: var(--text-2);
  line-height: 18px;
}
.app-trf-flow > li.app-trf-flow-next {
  position: static;
  flex: 0 0 14px;
  transform: none;
}
.app-trf-flow > li.app-trf-flow-next > svg {
  color: var(--trf-label-muted);
}
.app-trf-tile > svg {
  color: var(--text-2);
}
.app-trf-private {
  line-height: 1.45;
}
.hb.app .app-trf .app-imp-h p {
  color: var(--trf-label-muted);
}

/* Controles de notificações por bot e os interruptores do computador. */
.set-page[data-page='notifications'] .set-notify-bots .set-row {
  min-height: 48px;
  padding-block: 6px;
}
.set-notify-bots .set-media {
  width: 32px;
  justify-content: center;
}
.set-notify-levels {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: var(--surface-2);
}
.set-notify-levels > label {
  position: relative;
  min-width: 72px;
  cursor: pointer;
}
.set-notify-levels input {
  position: absolute;
  opacity: 0;
  margin: 0;
}
.set-notify-levels span {
  display: grid;
  min-height: 28px;
  place-items: center;
  padding-inline: 8px;
  border-radius: 7px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.set-notify-levels input:checked + span {
  background: var(--hb-raised);
  color: var(--text);
  font-weight: 500;
}
.set-notify-levels input:focus-visible + span {
  outline: 2px solid var(--text-2);
  outline-offset: -2px;
}
.set-notify-levels label:has(input:disabled) {
  cursor: progress;
}
@media (max-width: 600px) {
  .set-notify-levels > label {
    min-width: 0;
  }
  .set-notify-levels span {
    padding-inline: 5px;
  }
}
.set-page[data-page='notifications'] {
  --settings-switch-track: #f0f0f0;
  --settings-switch-knob: #141414;
}
[data-theme='light'] .set-page[data-page='notifications'] {
  --settings-switch-track: #1c1c1e;
  --settings-switch-knob: #fff;
}
.set-page[data-page='notifications'] .set-actions .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.set-page[data-page='notifications'] .set-actions .toggle::after {
  width: 16px;
  height: 16px;
  background: var(--text);
}
.set-page[data-page='notifications'] .set-actions .toggle:checked {
  background: var(--settings-switch-track);
}
.set-page[data-page='notifications'] .set-actions .toggle:checked::after {
  transform: translateX(16px);
  background: var(--settings-switch-knob);
}

/* Geral usa a mesma largura do seletor e o mesmo interruptor da janela de Ajustes. */
.set-page[data-page='general'] {
  --general-switch-track: #f0f0f0;
  --general-switch-knob: #141414;
}
[data-theme='light'] .set-page[data-page='general'] {
  --general-switch-track: #1c1c1e;
  --general-switch-knob: #fff;
}
.set-page[data-page='general'] .set-row {
  padding-block: 8.5px;
}
.set-page[data-page='general'] .set-select select {
  color: var(--text-2);
}
.set-page[data-page='general'] .set-actions .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.set-page[data-page='general'] .set-actions .toggle::after {
  width: 16px;
  height: 16px;
  background: var(--text);
}
.set-page[data-page='general'] .set-actions .toggle:checked {
  background: var(--general-switch-track);
}
.set-page[data-page='general'] .set-actions .toggle:checked::after {
  transform: translateX(16px);
  background: var(--general-switch-knob);
}

/* Página pessoal dentro do quadro desktop */
.set-personal-page { --set-personal-secondary: rgb(255 255 255 / 59%); }
[data-theme=light] .set-personal-page { --set-personal-secondary: rgb(20 20 20 / 60%); }
.set-personal-page .set-content { padding-top: 24px; }
.set-personal-page .set-card { border: 1px solid var(--divider); border-radius: 14px; background: transparent; }
.set-personal-page:has(.set-choice) .set-card { overflow: visible; }
.hb.app .set-personal-page .set-row { min-height: 48px; padding: 10px 16px; }
.set-personal-page .set-copy { gap: 2px; min-width: 0; }
.set-personal-page .set-copy strong { font-weight: 400; line-height: 22px; }
.set-personal-page .set-copy > span { color: var(--set-personal-secondary); font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-personal-page .set-sec-h { min-height: 22px; padding-inline: 0; }
.hb.app .set-personal-page #set-test { font-size: 14px; border: 1px solid var(--divider); background: var(--surface-2) !important; box-shadow: none; }
.hb.app .set-personal-page .set-notify-bots .set-row { min-height: 52px; padding-block: 8px; }

.set-personal-page .set-notify-levels {
  gap: 3px; padding: 3px; border: 0; border-radius: 8px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--divider);
}
[data-theme=light] .set-personal-page .set-notify-levels { background: #ececee; }
.set-personal-page .set-notify-levels span {
  min-height: 28px; padding-inline: 12px; border-radius: 6px; font-size: 14px;
}
.set-personal-page .set-notify-levels input:checked + span { background: var(--surface-3); }
[data-theme=light] .set-personal-page .set-notify-levels input:checked + span { background: var(--surface-2); }
@media (max-width: 600px) {
  .set-personal-page .set-notify-levels span { padding-inline: 6px; }
}

/* O painel de provedores usa os espaçamentos dos controles de Ajustes. */
.set-page[data-page='providers'] {
  --provider-description: #979797;
}
[data-theme='light'] .set-page[data-page='providers'] {
  --provider-description: #6b6b70;
}
.set-page[data-page='providers'] .set-row {
  padding-block: 8.5px;
  gap: 16px;
}
.set-page[data-page='providers'] :is(.set-copy > span, .set-find > svg, .set-chev) {
  color: var(--provider-description);
}
.set-page[data-page='providers'] .set-chev {
  column-gap: 12px;
}
.set-prov-default .set-select select {
  font-size: 13px;
}
.set-prov-attention {
  display: inline-flex;
  align-items: center;
  height: 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 148, 18, 0.12);
  color: #ff9412;
}
[data-theme='light'] .set-prov-attention {
  background: rgba(240, 138, 0, 0.14);
  color: #f08a00;
}
#set-own .set-prov-dialog-head {
  margin: -16px -16px 0;
  padding: 16px;
  border-bottom: 1px solid var(--divider);
}
#set-own .set-prov-dialog-head > div {
  flex: 1;
  min-width: 0;
}
#set-own .set-prov-dialog-head .set-note {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.set-own-mark {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
}
.hb.app .set-own-close {
  align-self: flex-start;
  width: 32px;
  height: 32px;
  margin: -8px -8px 0 0;
}
#set-own .set-field input {
  height: 36px;
  background: var(--surface-2);
}
#set-own .set-form-a {
  margin: 0 -16px -16px;
  padding: 16px;
  border-top: 1px solid var(--divider);
}
#set-own .set-form-a {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
#set-own-go {
  width: 100%;
  height: 36px;
}
.set-own-check {
  display: grid;
  gap: 6px;
}
.set-own-check > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 18px;
}

/* Modelos: descrição na coluna do título e interruptor no fim da linha. */
.set-page[data-page='providers'] {
  --model-toggle-on: #f0f0f0;
  --model-toggle-ink: #141414;
  --model-caption: #979797;
}
[data-theme='light'] .set-page[data-page='providers'] {
  --model-toggle-on: #1c1c1e;
  --model-toggle-ink: #fff;
  --model-caption: #6b6b70;
}
.set-prov-model-section .set-prov-model-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.set-page[data-page='providers'] .set-prov-model-section .set-prov-model-count {
  margin: 0;
  color: var(--model-caption);
  font-size: 13px;
  line-height: 18px;
}
.set-page[data-page='providers'] .set-prov-model-name > code {
  color: var(--model-caption);
}
.set-prov-model-row .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.set-prov-model-row .toggle::after {
  width: 16px;
  height: 16px;
  background: var(--text);
}
.set-prov-model-row .toggle:checked {
  background: var(--model-toggle-on);
}
.set-prov-model-row .toggle:checked::after {
  transform: translateX(16px);
  background: var(--model-toggle-ink);
}

/* Modelos: descrição na coluna do título e interruptor no fim da linha. */
.set-page[data-page='providers'] {
  --model-toggle-on: #f0f0f0;
  --model-toggle-ink: #141414;
  --model-caption: #979797;
}
[data-theme='light'] .set-page[data-page='providers'] {
  --model-toggle-on: #1c1c1e;
  --model-toggle-ink: #fff;
  --model-caption: #6b6b70;
}
.set-prov-model-section .set-prov-model-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.set-page[data-page='providers'] .set-prov-model-section .set-prov-model-count {
  margin: 0;
  color: var(--model-caption);
  font-size: 13px;
  line-height: 18px;
}
.set-page[data-page='providers'] .set-prov-model-name > code {
  color: var(--model-caption);
}
.set-prov-model-row .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.set-prov-model-row .toggle::after {
  width: 16px;
  height: 16px;
  background: var(--text);
}
.set-prov-model-row .toggle:checked {
  background: var(--model-toggle-on);
}
.set-prov-model-row .toggle:checked::after {
  transform: translateX(16px);
  background: var(--model-toggle-ink);
}

.set-prov-own .set-prov-own-actions {
  position: relative;
  z-index: 2;
}

.set-nav, .set-page {
  --set-result-muted: #979797;
  --set-result-hover: #242424;
  --set-result-active: #2a2a2a;
}
[data-theme=light] :is(.set-nav, .set-page) {
  --set-result-muted: #6b6b70;
  --set-result-hover: #f0f0f2;
  --set-result-active: #e8e8eb;
}
.set-result-s { color: var(--set-result-muted); }
.hb.app .set-search #set-find { padding: 0; }
.hb.app button.set-result { align-items: stretch; border: 0; }
.hb.app button.set-result:hover { background: var(--set-result-hover); }
.set-page .set-search-match { border-radius: 8px; background: var(--set-result-active); }

.set-personal-page[data-page=keyboard] {
  --set-key-border: rgb(255 255 255 / 4.5%);
  --set-key-surface: #212121;
  --set-key-refusal: #ff6069;
  --set-key-refusal-border: rgb(253 47 59 / 50%);
}
[data-theme=light] .set-personal-page[data-page=keyboard] {
  --set-key-border: rgb(20 20 20 / 10%);
  --set-key-surface: #fff;
  --set-key-refusal: #c0141d;
  --set-key-refusal-border: rgb(232 34 45 / 45%);
}
.hb.app .set-personal-page[data-page=keyboard] .set-row { padding-block: 8.5px; }
.set-personal-page[data-page=keyboard] .set-row .set-actions { gap: 4px; }
.hb.app .set-personal-page[data-page=keyboard] .set-keys-b {
  min-height: 32px; padding: 0 12px; border: 0; gap: 4px; font-size: 14px; line-height: 20px;
}
.hb.app .set-personal-page[data-page=keyboard] .hb-btn.hb-sm.card-ghost {
  font-size: 14px; line-height: 20px;
}
.hb.app .set-personal-page[data-page=keyboard] .set-keys-b[aria-pressed=true] {
  background: var(--set-result-hover);
}
.hb.app .set-personal-page[data-page=keyboard] .set-keys-b[data-no=true] {
  box-shadow: inset 0 0 0 1px var(--set-key-refusal-border);
}
.set-personal-page[data-page=keyboard] .set-keys .kbd {
  min-width: 20px; height: 20px; padding-inline: 4px; border-radius: 4px;
  background: var(--set-key-surface); border: 1px solid var(--set-key-border);
  color: var(--set-result-muted); font-size: 13px; line-height: 1;
}
.set-personal-page[data-page=keyboard] .set-keys-ask { color: var(--set-result-muted); }
.hb.app .set-personal-page[data-page=keyboard] .set-keys-no {
  display: block; color: var(--set-key-refusal); text-align: start; white-space: normal;
}

.set-personal-page[data-page=computer] {
  --set-computer-accent-icon: #42a0ff;
  --set-computer-accent-soft: rgb(0 124 247 / 16%);
  --set-computer-warning: #ff9412;
  --set-computer-warning-bg: rgb(255 148 18 / 12%);
  --set-computer-success: #31cf76;
  --set-computer-success-border: rgb(49 207 118 / 12%);
  --set-computer-success-bg: rgb(49 207 118 / 4.5%);
  --set-computer-track: #f0f0f0;
  --set-computer-thumb: #141414;
}
[data-theme=light] .set-personal-page[data-page=computer] {
  --set-computer-accent-icon: #0064c8;
  --set-computer-accent-soft: rgb(0 124 247 / 12%);
  --set-computer-warning: #f08a00;
  --set-computer-warning-bg: rgb(240 138 0 / 14%);
  --set-computer-success: #1fa85a;
  --set-computer-success-border: rgb(31 168 90 / 12%);
  --set-computer-success-bg: rgb(31 168 90 / 6%);
  --set-computer-track: #1c1c1e;
  --set-computer-thumb: #fff;
}
.set-computer-status {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--divider); border-radius: 12px;
  background: var(--surface-2); color: var(--set-result-muted);
}
.set-computer-status[data-tone=success] {
  color: var(--set-computer-success); background: var(--set-computer-success-bg); border-color: var(--set-computer-success-border);
}
.set-computer-status[data-tone=warning] {
  color: var(--set-computer-warning); background: var(--set-computer-warning-bg); border-color: var(--set-computer-warning-bg);
}
.set-computer-status-icon { display: grid; place-items: center; width: 16px; height: 16px; }
.set-computer-message { display: grid; gap: 2px; }
.set-computer-message strong { color: var(--text); font-size: 14px; font-weight: 500; line-height: 20px; }
.set-computer-message > span { color: var(--text-2); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.set-computer-permissions .set-media {
  display: grid; place-items: center; width: 30px; height: 30px;
  color: var(--set-computer-accent-icon); background: var(--set-computer-accent-soft); border-radius: 8px;
}
.set-computer-granted {
  display: inline-flex; align-items: center; gap: 4px; padding-inline: 8px; border-radius: 999px;
  background: var(--set-computer-success-border); color: var(--set-computer-success);
  font-size: 13px; line-height: 22px; white-space: nowrap;
}
.hb.app .set-page button.set-computer-button.hb-sm {
  min-height: 32px; gap: 6px; padding-inline: 12px; border: 1px solid var(--divider);
  border-radius: 8px; font-size: 14px; line-height: 20px; box-shadow: none; white-space: nowrap;
}
.hb.app .set-page button.set-computer-button.set-computer-grant {
  border-color: transparent; color: #fff !important; background: #007cf7 !important;
}
.hb.app .set-page button.set-computer-button.set-computer-grant:hover { background: #006fe0 !important; }
.hb.app button.set-computer-button[aria-disabled=true] { cursor: progress; opacity: .6; }
.set-computer-recheck { display: flex; justify-content: flex-end; }
.set-personal-page[data-page=computer] .set-actions .toggle {
  width: 36px; height: 20px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--divider);
}
.set-personal-page[data-page=computer] .set-actions .toggle::after { width: 16px; height: 16px; background: var(--text); }
.set-personal-page[data-page=computer] .set-actions .toggle:checked { background: var(--set-computer-track); }
.set-personal-page[data-page=computer] .set-actions .toggle:checked::after {
  transform: translateX(16px); background: var(--set-computer-thumb);
}
@media (max-width: 640px) {
  .set-computer-status { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .set-computer-status .set-actions { grid-column: 2; margin-left: 0; flex-wrap: wrap; }
  .set-computer-permissions .set-actions { flex-wrap: wrap; justify-content: flex-end; }
}

/* A moldura de grupo e a seleção temporária têm cores e contornos diferentes. */
.app-wf-c .app-wf-group {
  --wf-frame-muted: #979797;
  --wf-frame-secondary: #dcdcdc;
  border-radius: 28px;
  outline: 0;
  background: color-mix(in srgb, var(--wf-art-ink) 3%, transparent);
  box-shadow: 0 0 0 calc(1px / var(--wf-scale, 1)) var(--wf-ring);
}
:root[data-theme="light"] .app-wf-c .app-wf-group { --wf-frame-muted: #6b6b70; --wf-frame-secondary: #3a3a3c; }
.app-wf-c .app-wf-group[data-selected] { box-shadow: 0 0 0 calc(1px / var(--wf-scale, 1)) color-mix(in srgb, var(--wf-art-ink) 40%, transparent); }
.app-wf-c .app-wf-group[data-folded] {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--wf-card-bg);
}
.app-wf-c .app-wf-group[data-folded][data-state="approval"] { box-shadow: 0 0 0 1px color-mix(in srgb,var(--amber) 64%,transparent); }
.app-wf-c .app-wf-group[data-folded][data-state="failed"] { box-shadow: 0 0 0 1px color-mix(in srgb,var(--red) 64%,transparent); }
.hb.app .app-wf-c .app-wf-group-title {
  position: absolute;
  inset: 8px 16px auto;
  display: flex;
  gap: 6px;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  color: var(--wf-frame-muted);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .app-wf-group-title > button.hb-ic {
  flex: none;
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  color: inherit;
}
.hb.app .app-wf-group-title .app-wf-group-name {
  min-width: 2ch;
  max-width: 100%;
  field-sizing: content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wf-frame-secondary);
  font: inherit;
  font-weight: 500;
  text-overflow: ellipsis;
}
.hb.app .app-wf-group-title .app-wf-group-name:focus-visible { outline: 0; color: var(--wf-art-ink); }
.hb.app .app-wf-group-title small { flex: none; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }
.app-wf-c .app-wf-group-stack { position: relative; width: 168px; height: 128px; margin-top: 24px; color: var(--wf-frame-muted); }
.app-wf-c .app-wf-group-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--wf-ring);
}
.app-wf-c .app-wf-group-stack img:nth-child(1) { z-index: 3; }
.app-wf-c .app-wf-group-stack img:nth-child(2) { z-index: 2; transform: translate(-10px, 4px) rotate(-6deg); }
.app-wf-c .app-wf-group-stack img:nth-child(3) { z-index: 1; transform: translate(12px, 6px) rotate(7deg); }
#wf-group-selection {
  position: absolute;
  z-index: 2;
  border-radius: 16px;
  outline: calc(1px / var(--wf-scale, 1)) dashed color-mix(in srgb, var(--wf-art-ink) 24%, transparent);
  outline-offset: calc(12px / var(--wf-scale, 1));
  pointer-events: none;
}
#wf-group-selection[data-whole] { outline: 0; }
.app-wf-group-bar {
  position: absolute;
  bottom: calc(100% + 24px / var(--wf-scale, 1));
  left: 50%;
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: var(--wf-glass);
  box-shadow: 0 0 0 1px var(--wf-ring);
  color: var(--hb-muted);
  font-size: 13px;
  white-space: nowrap;
  pointer-events: auto;
  translate: -50% 0;
  scale: calc(1 / var(--wf-scale, 1));
  transform-origin: bottom center;
  backdrop-filter: blur(40px) saturate(1.4);
}
.app-wf-group-bar > span { padding-inline: 12px 4px; font-variant-numeric: tabular-nums; }
.app-wf-group-bar > i { width: 1px; height: 16px; background: var(--wf-ring); }
.hb.app .app-wf-group-bar > button { width: 32px; height: 32px; color: var(--hb-text); }
.hb.app .app-wf-group-bar > [data-value="delete"] { color: var(--red); }
.app-wf-world:has(.wf-n[data-moving]) .app-wf-group-bar { visibility: hidden; }
.app-wf-guide-x { bottom: auto; translate: calc(-.5px / var(--wf-scale, 1)) 0; }
.app-wf-guide-y { right: auto; translate: 0 calc(-.5px / var(--wf-scale, 1)); }
.app-wf-c .app-wf-guide { transition: opacity 120ms cubic-bezier(.23, 1, .32, 1); }
@starting-style { .app-wf-c .app-wf-guide { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .app-wf-c .app-wf-guide { transition: none; } }
#wf-group-selection[data-below] .app-wf-group-bar {
  top: calc(100% + 24px / var(--wf-scale, 1));
  bottom: auto;
  transform-origin: top center;
}

/* Estado de rodada e histórico no cabeçalho do quadro. */
#wf-run-tools, #wf-pop:is([data-wf-menu="history"], [data-wf-menu="open-runs"]) {
  --wf-run-ink: #fff;
  --wf-run-meta: #979797;
  --wf-run-control: #212121;
  --wf-run-sheet: #141414;
  --wf-run-danger: #ff6069;
  color: var(--wf-run-ink);
}
:root[data-theme="light"] :is(#wf-run-tools, #wf-pop:is([data-wf-menu="history"], [data-wf-menu="open-runs"])) {
  --wf-run-ink: #141414;
  --wf-run-meta: #6b6b70;
  --wf-run-control: #fff;
  --wf-run-sheet: #fff;
  --wf-run-danger: #c0141d;
}
#wf-run-tools .app-wf-paused, #wf-run-tools .app-wf-run-view {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: var(--wf-run-ink);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#wf-run-tools :is(.app-wf-paused, .app-wf-run-view) > svg,
#wf-run-tools .app-wf-run-view time,
#wf-run-tools .wf-current-step :is(span, svg) { color: var(--wf-run-meta); }
#wf-run-tools .app-wf-run-view b { font-weight: 500; white-space: nowrap; }
#wf-run-tools .app-wf-run-view button { width: 24px; height: 24px; color: var(--wf-run-meta); }
#wf-run-tools .wf-run-actions { gap: 2px; }
#wf-run-tools :is(.wf-run-actions button, .wf-current-step) { min-height: 0; border-radius: 8px; }
#wf-run-tools .wf-current-step { gap: 6px; font-variant-numeric: tabular-nums; color: var(--wf-run-ink); }
#wf-run-tools .wf-current-step[data-state="failed"] > svg { color: var(--wf-run-danger); }
#wf-run-tools .hc-loader { width: 12px; height: 12px; flex: none; color: var(--wf-run-meta); }
#wf-run-tools .app-wf-count {
  min-width: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--wf-run-ink) 6%, transparent);
  color: var(--wf-run-meta);
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.app-wf-run-separator { width: 1px; height: 16px; margin-inline: 4px; background: color-mix(in srgb, var(--wf-run-ink) 10%, transparent); }
#wf-run-tools .wf-run-meter { gap: 6px; font-size: 13px; }
#wf-run-tools .wf-run-meter circle { stroke-width: 1.5px; }
#wf-run-tools .wf-run-meter circle + circle { stroke: var(--wf-run-ink); }
.hb.app #wf-run-tools button[data-do="wf-stop"] {
  background: var(--wf-run-control) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wf-run-ink) 10%, transparent);
  color: var(--wf-run-ink) !important;
}
.hb.app #wf-run-tools button[data-do="wf-stop"] svg { fill: currentColor; }
#wf-pop:is([data-wf-menu="history"], [data-wf-menu="open-runs"]) { background: var(--wf-run-sheet); border-radius: 14px; }
.hb.app #wf-pop .app-wf-history-list button.mp-opt {
  height: 32px;
  justify-content: flex-start;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
  color: var(--wf-run-ink);
  font-size: 13px;
}
.hb.app #wf-pop .app-wf-history-list button.mp-opt::before { display: none; }
.hb.app #wf-pop .app-wf-history-list button.mp-opt:is(:hover,:focus-visible) { background: color-mix(in srgb, var(--wf-run-ink) 6%, transparent); }
#wf-pop .app-wf-history-list button > span { margin-inline-end: auto; }
#wf-pop .app-wf-history-list small {
  min-width: 0;
  overflow: hidden;
  color: var(--wf-run-meta);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}
#wf-pop .app-wf-history-mark { display: grid; flex: 0 0 14px; place-items: center; }
#wf-pop .app-wf-history-mark[data-off] { visibility: hidden; }
#wf-pop .app-wf-history-list hr { height: 1px; margin: 6px -6px; border: 0; background: color-mix(in srgb, var(--wf-run-ink) 10%, transparent); }
.app-wf-c { --wf-node-warning: #ff9412; --wf-node-danger: #fd2f3b; }
:root[data-theme="light"] .app-wf-c { --wf-node-warning: #f08a00; --wf-node-danger: #e8222d; }
.app-wf-n[data-state="running"] .app-wf-card { --wf-card-ring: color-mix(in srgb, var(--wf-card-ink) 16%, transparent); }
.app-wf-n[data-state="approval"] .app-wf-card { --wf-card-ring: color-mix(in srgb, var(--wf-node-warning) 64%, transparent); }
.app-wf-n[data-state="failed"] .app-wf-card { --wf-card-ring: color-mix(in srgb, var(--wf-node-danger) 64%, transparent); }
.app-wf-n[data-state="done"] .app-wf-card { --wf-card-ring: color-mix(in srgb, var(--wf-card-ink) 10%, transparent); }
@property --wf-run-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes wf-card-running { to { --wf-run-angle: 360deg; } }
.app-wf-n[data-state="running"] .app-wf-card::after {
  position: absolute;
  inset: -1.5px;
  border-radius: 17.5px;
  padding: 1.5px;
  background: conic-gradient(from var(--wf-run-angle), transparent 52%, color-mix(in srgb,var(--wf-card-ink) 24%,transparent) 74%, var(--wf-card-ink) 98%, transparent);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  content: "";
  animation: wf-card-running 1.6s linear infinite;
}
.app-wf-w .app-wf-line { stroke: color-mix(in srgb, var(--wf-art-ink) 32%, transparent); stroke-width: 1.5px; stroke-dasharray: 5 5; stroke-linecap: round; }
.app-wf-w[data-done] .app-wf-line { stroke: color-mix(in srgb, var(--wf-art-ink) 60%, transparent); stroke-dasharray: none; }
.app-wf-w[data-on] .app-wf-line { stroke: var(--wf-art-ink); stroke-dasharray: none; }
@media (prefers-reduced-motion: reduce) {
  .app-wf-n[data-state="running"] .app-wf-card::after { animation: none; }
}

/* Estado da aba, seletor de fluxos e revisão de importação. */
:root {
  --wf-window-ink: #fff;
  --wf-window-meta: #979797;
  --wf-window-secondary: #dcdcdc;
  --wf-window-edge: rgb(255 255 255 / .035);
  --wf-window-strong-edge: rgb(255 255 255 / .045);
  --wf-window-hover: #242424;
  --wf-window-active: #2a2a2a;
  --wf-window-dialog: #1a1a1a;
  --wf-window-dialog-edge: rgb(255 255 255 / .10);
}
:root[data-theme="light"] {
  --wf-window-ink: #141414;
  --wf-window-meta: #6b6b70;
  --wf-window-secondary: #3a3a3c;
  --wf-window-edge: rgb(20 20 20 / .07);
  --wf-window-strong-edge: rgb(20 20 20 / .10);
  --wf-window-hover: #f0f0f2;
  --wf-window-active: #e8e8eb;
  --wf-window-dialog: #f5f5f6;
  --wf-window-dialog-edge: rgb(20 20 20 / .10);
}
.hb.app .wf-tab:not(:has([aria-selected="true"])):hover { background: var(--wf-window-hover); }
.hb.app .wf-tab[data-dragged] { background: var(--wf-window-active); }
.wf-tab [role="tab"] { color: var(--wf-window-secondary); }
.wf-tab [role="tab"][aria-selected="true"] { color: var(--wf-window-ink); }
.wf-tab:is(:hover, :focus-within) button[data-do="wf-tab-close"] { background: var(--wf-window-hover); }
.wf-tab button[data-do="wf-tab-close"]:hover { background: var(--wf-window-active); color: var(--wf-window-ink); }
@media (min-width: 761px) {
  .hb.app .wf-tabs:not([data-dragging]) .wf-tab:has([aria-selected="true"])::before {
    border-color: var(--wf-window-edge);
    background: var(--wf-window-frame);
  }
  .hb.app .wf-tabs:not([data-dragging]) .wf-tab:has([aria-selected="true"])::after {
    background:
      radial-gradient(circle at 0 0, transparent 8px, var(--wf-window-edge) 8px 9px, var(--wf-window-frame) 9px) left bottom / 9px 9px no-repeat,
      radial-gradient(circle at 100% 0, transparent 8px, var(--wf-window-edge) 8px 9px, var(--wf-window-frame) 9px) right bottom / 9px 9px no-repeat;
  }
}
.hb.app #wf-pop:is([data-wf-menu="list"], [data-wf-menu="more"]) {
  min-width: 260px;
  max-width: min(320px, calc(100vw - 24px));
  box-shadow: inset 0 1px 0 color-mix(in srgb,var(--wf-window-ink) 5%,transparent), 0 0 0 1px color-mix(in srgb,var(--wf-window-ink) 11%,transparent);
}
.hb.app #wf-pop[data-wf-menu="tab"] {
  min-width: 192px;
  max-width: min(288px, calc(100vw - 24px));
  --wf-menu-hover: color-mix(in srgb,var(--wf-window-ink) 6%,transparent);
  --wf-menu-muted: var(--wf-window-meta);
}
.wf-switcher-count { color: var(--wf-window-meta); }
.wf-start h2 { letter-spacing: -.01em; text-wrap: balance; color: var(--wf-window-ink); }
.hb.app .wf-start-card { border-color: var(--wf-window-edge); }
.hb.app .wf-start-card:is(:hover, :focus-visible) { border-color: var(--wf-window-strong-edge); background: var(--wf-panel-raised); }
.wf-start-graph rect { stroke: color-mix(in srgb, var(--wf-kind) 70%, transparent); }
.wf-start-text { padding: 0 8px 8px; }
.wf-start-text strong { font-weight: 500; }
.wf-start-text small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--wf-window-secondary);
}
.app-wf .app-wf-c { border-radius: 13px; }
.wf-deletion-art {
  opacity: .62;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb,var(--wf-window-ink) 15%,transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 30% 30%, transparent 55%, #000 100%), radial-gradient(ellipse 80% 85%, #000 55%, transparent 100%);
  mask-composite: intersect;
}
.wf-deletion-board > path { stroke-width: 1.5px; stroke-dasharray: 5 5; stroke-linecap: round; }
.wf-deletion-actions { max-width: 34rem; gap: 16px; padding: 24px; }
.wf-deletion-actions h2 { font-size: 32px; }
.wf-deletion-actions p { color: var(--wf-window-meta); line-height: 1.5; }

.hb.app .wf-import-dialog {
  display: flex;
  width: min(460px, 100%);
  max-height: calc(100dvh - 48px);
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--wf-window-dialog-edge);
  border-radius: 20px;
  background: var(--wf-window-dialog);
  box-shadow: none;
  color: var(--wf-window-ink);
}
.wf-import-main { display: grid; min-height: 0; grid-template-columns: 40px minmax(0,1fr); gap: 16px; align-items: start; overflow-y: auto; padding: 24px; }
.wf-import-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--wf-window-active);
  color: var(--wf-window-secondary);
}
.wf-import-content { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 6px; }
.hb.app .wf-import-content h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.wf-import-content > p { margin: 0; color: var(--wf-window-meta); font-size: 15px; }
.wf-import-body { margin-top: 4px; color: var(--wf-window-secondary); font-size: 14px; }
.wf-import-links { display: grid; gap: 8px; margin-top: 12px; }
.hb.app .wf-import-links h3 { margin: 0; color: var(--wf-window-meta); font-size: 13px; font-weight: 500; }
.hb.app .wf-import-links .wf-binding { color: inherit; margin: 0; }
.wf-import-links .wf-binding > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-import-choice { position: relative; }
.hb.app .wf-import-choice select {
  appearance: none;
  min-width: 0;
  width: 100%;
  height: 36px;
  border: 1px solid var(--wf-window-strong-edge);
  border-radius: 8px;
  padding: 0 26px 0 10px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .10);
  background: transparent;
  color: var(--wf-window-ink);
  font-size: 14px;
}
.wf-import-choice > svg { position: absolute; right: 8px; top: 50%; translate: 0 -50%; pointer-events: none; }
.hb.app .wf-import-dialog .wf-import-attachments { margin: 12px 0 0; color: var(--wf-window-secondary); font-size: 14px; }
.hb.app .wf-import-dialog .hb-foot { margin: 0; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--wf-window-dialog-edge); }
.hb.app .wf-version-view > .hb-btn {
  height: 32px;
  min-height: 32px;
  gap: 6px;
  border-radius: 8px;
  padding-inline: 12px;
  font-size: 13px;
  font-weight: 500;
}
.hb.app .wf-version-view > .hb-btn.hb-quiet { color: var(--wf-window-secondary); }
.hb.app .wf-tabs { padding-inline: 0; margin-inline: 0; }

/* Acionadores e listas dos cartões do editor. */
.app-wf-node-picker .app-wf-agent-action { color: var(--wf-window-meta); }
.app-wf-model-layout { display: flex; min-height: 0; }
.app-wf-model-rail {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-inline-end: 1px solid var(--wf-ring);
}
.hb.app .app-wf-model-rail > button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border-radius: 8px;
}
.hb.app .app-wf-model-rail > button[aria-selected="true"] { background: var(--hb-hover); box-shadow: inset 0 0 0 1px var(--hb-line); }
.app-wf-provider-symbol { display: inline-grid; width: 20px; height: 20px; flex: none; place-items: center; font-style: normal; }
i.app-wf-provider-symbol { border: 1px solid currentColor; border-radius: 6px; font-size: 12px; font-weight: 600; }
.app-wf-model-rail > button:not([aria-selected="true"]) .app-wf-provider-symbol { opacity: .48; }
.app-wf-model-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.app-wf-model-panel > strong { overflow: hidden; padding: 12px 12px 4px; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#wf-pop[data-wf-node-menu]:has(.app-wf-model-layout) .mp-panel,
#wf-pop[data-wf-node-menu] .app-wf-local-picker[data-kind="model"] { padding: 0; }
.app-wf-model-panel > .app-wf-local-search { margin-inline: 6px; }
#wf-node-options[data-kind="model"] { padding: 6px; }
#wf-node-options[data-kind="model"] .app-wf-picker-option .mp-opt-n { flex: 1; }
#wf-node-options[data-kind="agent"] .app-wf-picker-option .mp-opt-n { flex: 1; gap: 4px; }
.app-wf-agent-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.app-wf-agent-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  max-width: 100%;
  padding-inline: 6px;
  border-radius: 4px;
  background: var(--hb-hover);
  color: var(--wf-window-secondary);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.app-wf-agent-chips .app-wf-provider-symbol { width: 12px; height: 12px; border-radius: 3px; font-size: 8px; }
.app-wf-prompt-tools {
  position: absolute;
  z-index: 3;
  bottom: calc(100% + 12px / var(--wf-scale,1));
  left: 50%;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--wf-glass);
  box-shadow: 0 0 0 1px var(--wf-ring);
  translate: -50% 0;
  scale: calc(1 / var(--wf-scale, 1));
  transform-origin: bottom center;
  backdrop-filter: blur(40px) saturate(1.4);
}
.app-wf-n:not(:hover,:focus-within,[data-on]) .app-wf-prompt-tools { visibility: hidden; }
.hb.app .app-wf-prompt-tools .app-wf-card-icon { width: 32px; height: 32px; border-radius: 50%; min-height: 32px; }

.app-wf-condition-branch {
  position: relative;
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
  padding-inline: 12px;
  border-radius: 8px;
  background: var(--wf-field-bg);
  color: var(--wf-card-ink);
  font-size: 13px;
  font-weight: 500;
}
.app-wf-condition-branch[data-skipped] { opacity: .5; }
.app-wf-condition-branch > svg { margin-inline-start: auto; color: var(--green); }
.app-wf-condition-branch .app-wf-branch-port[data-side="out"] {
  left: calc(100% + 14px);
  transform: translateY(-50%);
}
.app-wf-n .app-wf-condition-branch .app-wf-out { opacity: 1; }
.app-wf-n[data-kind="approval"] .app-wf-ask { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.hb.app .app-wf-n[data-kind="approval"] .app-wf-ask > button { min-height: 32px; height: 32px; border-radius: 8px; font-size: 13px; }
.hb.app .app-wf-n[data-kind="approval"] .app-wf-ask > [data-value="reject"] { box-shadow: inset 0 0 0 1px var(--wf-card-ring); color: var(--wf-card-ink); }

.app-wf-card .app-wf-output-fields { gap: 2px; padding: 4px; }
.app-wf-card .app-wf-output-row {
  display: grid;
  grid-template-columns: 84px minmax(0,1fr);
  gap: 8px;
  min-height: 36px;
  align-items: center;
  padding-inline: 8px;
  border-radius: 10px;
  font-size: 14px;
}
.app-wf-card .app-wf-output-target {
  grid-template-columns: 22px minmax(0,1fr) auto;
  gap: 6px;
  min-height: 40px;
}
.app-wf-output-target > i { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: var(--wf-card-ring); }
.app-wf-card .app-wf-output-fields .hb-input {
  min-width: 0;
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--wf-card-ink);
}
.app-wf-card .app-wf-output-fields select { appearance: none; cursor: pointer; }
.app-wf-card .app-wf-output-target select { font-weight: 600; }
.app-wf-card .app-wf-output-static > span + span { color: var(--wf-card-ink); }
.app-wf-card .app-wf-output-row:focus-within { box-shadow: inset 0 0 0 1px var(--wf-card-ring); }
.app-wf-output-target > svg { pointer-events: none; }

.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row {
  grid-template-columns: 24px minmax(0,.9fr) minmax(0,1.1fr) 16px 24px;
  gap: 4px;
}
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row > .app-wf-answer-optional { grid-area: 1 / 4; }
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row > [data-do="wf-answer-remove"] { grid-area: 1 / 5; }
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row > [data-wf-answer="choices"] { grid-area: 1 / 3; }
.app-wf-answer-kind-icon { display: grid; position: relative; width: 24px; height: 24px; place-items: center; border-radius: 8px; color: var(--wf-window-secondary); }
.app-wf-answer-kind-icon:focus-within { background: var(--hb-hover); }
.app-wf-answer-kind-icon > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.app-wf-answer-kind { overflow: hidden; color: var(--wf-window-meta); text-overflow: ellipsis; white-space: nowrap; }
.hb.app #wf-node-options[data-kind="fields"] .app-wf-answer-row > input:not(:hover,:focus) { border-color: transparent; background: transparent; }
.app-wf-prompt-tools[data-place="below"] { top: calc(100% + 12px / var(--wf-scale,1)); bottom: auto; transform-origin: top center; }
.app-wf-prompt-tools:is([data-place="left"], [data-place="right"]) { top: 0; bottom: auto; translate: 0 0; transform-origin: top right; }
.app-wf-prompt-tools[data-place="left"] { left: auto; right: calc(100% + 12px / var(--wf-scale,1)); }
.app-wf-prompt-tools[data-place="right"] { left: calc(100% + 12px / var(--wf-scale,1)); transform-origin: top left; }
.app-wf-card .app-wf-output-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Resultados do passo no próprio cartão e na faixa de tentativas. */
.app-wf-card-result { display: grid; gap: 8px; min-width: 0; padding: 12px; border-radius: 8px; background: var(--wf-field-bg); }
.app-wf-card-result-head { display: flex; gap: 4px; align-items: center; min-width: 0; color: var(--wf-card-muted); font-size: 13px; }
.app-wf-card-result-head > span { margin-inline-end: auto; }
.hb.app .app-wf-card-result-head > button { height: 20px; min-height: 20px; padding-inline: 4px; color: var(--wf-card-muted); }
.hb.app .app-wf-card-result-head > button:not([data-do="wf-chat"]) { width: 20px; }
.app-wf-card-result p,
.app-wf-card-result dl {
  max-height: 150px;
  margin: 0;
  overflow: auto;
  color: var(--wf-card-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 18px;
}
.app-wf-card-result dl { display: grid; grid-template-columns: minmax(60px,1fr) minmax(0,1.5fr); gap: 4px 8px; }
.app-wf-card-result dt { color: var(--wf-card-muted); }
.app-wf-card-result dd { margin: 0; }
.app-wf-card-failure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 8px;
  background: rgb(253 47 59 / .16);
  color: #ff6069;
  font-size: 13px;
  line-height: 18px;
}
:root[data-theme="light"] .app-wf-card-failure { background: rgb(232 34 45 / .12); color: #c0141d; }
.app-wf-card-failure svg { flex: none; margin-top: 2px; }
.app-wf-card-failure span { display: -webkit-box; min-width: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.app-wf-running-placeholder { display: grid; gap: 4px; }
.app-wf-running-placeholder > i { height: 6px; border-radius: 6px; background: var(--wf-card-ring); }
.app-wf-running-placeholder > i:nth-child(2) { width: 82%; }
.app-wf-running-placeholder > i:nth-child(3) { width: 58%; }
.hb.app .app-wf-card-run { width: 100%; height: 36px; min-height: 36px; gap: 8px; border-radius: 8px; font-weight: 600; }
.app-wf-c .wf-result-shelf { padding: 0; }
.hb.app .wf-result-shelf > button {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px var(--wf-ring);
  color: var(--wf-art-ink);
  backdrop-filter: blur(20px);
}
.hb.app .wf-result-shelf > button:disabled { opacity: .5; }
.app-wf-c .wf-result-shelf > div { height: 68px; scrollbar-width: none; padding-inline: 4px; }
.hb.app .wf-result-shelf .wf-result-tile {
  border: 2px solid color-mix(in srgb, var(--wf-result-kind) 45%, transparent);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--wf-art-ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hb.app .wf-result-shelf .wf-result-tile[aria-pressed="true"] { border-color: color-mix(in srgb, var(--wf-result-kind) 75%, transparent); }
.hb.app .wf-result-shelf .wf-result-tile[data-failed] { color: var(--wf-node-danger); }
.hb.app .app-wf-card .app-wf-trigger-schedule { grid-template-columns: 84px minmax(0,1fr) 12px; text-align: start; }
.app-wf-trigger-schedule > strong { overflow: hidden; color: var(--wf-card-ink); font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.app-wf-trigger-next { display: flex; min-height: 26px; align-items: center; gap: 6px; padding-inline: 8px; color: var(--wf-card-muted); font-size: 12px; }

/* Workflow annotation formatting */
.hb.app .app-wf :is(.wf-art-format,.wf-art-options) button.app-wf-art-choice {
  width: auto;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-inline: 8px;
}
.hb.app #wf-pop[data-wf-menu="art"] {
  border-radius: 16px;
  background: #1a1a1a;
  --wf-art-option: #242424;
  --wf-art-option-ring: rgb(255 255 255 / .08);
  --wf-art-option-active: rgb(255 255 255 / .08);
}
:root[data-theme="light"] .hb.app #wf-pop[data-wf-menu="art"] {
  background: #fff;
  --wf-art-option: #f0f0f2;
  --wf-art-option-ring: rgb(0 0 0 / .08);
  --wf-art-option-active: rgb(0 0 0 / .06);
}
#wf-pop[data-wf-menu="art"] .mp-panel { padding: 0; }
#wf-pop[data-wf-menu="art"] .app-wf-art-picks {
  display: grid;
  max-height: min(440px,calc(100vh - 24px));
  padding: 6px;
  overflow-y: auto;
  scrollbar-width: none;
}
.hb.app #wf-pop[data-wf-menu="art"] .app-wf-art-picks .mp-opt {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 40px;
  height: auto;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  font-size: 13px;
}
.hb.app #wf-pop[data-wf-menu="art"] .mp-opt[aria-checked="true"] { background: var(--wf-art-option-active); }
#wf-pop[data-wf-menu="art"] .app-wf-art-preview {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--wf-art-option);
  box-shadow: inset 0 0 0 1px var(--wf-art-option-ring);
}
#wf-pop[data-wf-menu="art"] .wf-art-dot { width: 16px; height: 16px; }
.app-wf-art-choice .wf-art-dot { width: 14px; height: 14px; }
.wf-art-sample { font-size: 14px; font-weight: 600; line-height: 1; }
.wf-art-sample[data-art-font="mono"] { font-family: var(--hb-mono, monospace); }
.app-wf-art-preview .wf-art-sample { font-size: 18px; }
.wf-art-indicator { position: relative; display: block; width: 16px; height: 16px; color: currentColor; --wf-shape: currentColor; }
.wf-art-indicator .wf-art-surface { position: absolute; inset: 1px; }
.wf-art-align { display: flex; flex-flow: column; gap: 3px; width: 15px; }
.wf-art-align[data-align="center"] { align-items: center; }
.wf-art-align[data-align="end"] { align-items: flex-end; }
.wf-art-align > i { width: 100%; height: 1px; border-radius: 1px; background: currentColor; }
.wf-art-align > i:nth-child(2) { width: 60%; }

/* Schedule controls inside the trigger card */
.app-wf-card .app-wf-trigger-schedule {
  min-height: 36px;
  padding: 4px 8px;
}
.app-wf-card .app-wf-trigger-schedule > p { margin: 4px 0; color: var(--wf-card-muted); }
.app-wf-card .app-wf-trigger-schedule .rt-when {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 6px 8px;
}
.hb.app .app-wf-card .app-wf-trigger-schedule :is(.rt-time,.rt-date,.rt-cron,.ps-b,.rt-wd) {
  height: 28px;
  min-height: 28px;
  padding-inline: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--wf-card-ring);
  color: var(--wf-card-ink);
  font-size: 14px;
}
.hb.app .app-wf-card .app-wf-trigger-schedule .rt-wd { width: 24px; padding: 0; font-size: 12px; }
.hb.app .app-wf-card .app-wf-trigger-schedule .rt-wd[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.app-wf-card .app-wf-trigger-next { display: block; padding: 4px 0 0; border-top: 1px solid var(--wf-card-ring); }
.app-wf-trigger-next time { color: var(--wf-card-ink); font-size: 14px; }

/* A lista de Celular mantém a grade logo abaixo da descrição e o destaque no estado vazio. */
.ph-sec {
  row-gap: 3px;
}
.ph-sec > .ph-desc {
  font-size: 13px;
  line-height: 18px;
}
.ph-empty > strong {
  font-size: 14px;
  line-height: 20px;
}
.ph-empty > span:not(.ph-empty-ico) {
  max-width: none;
}
.ph-empty-ico,
.ph-tag[data-kind='signin'] {
  background: var(--hb-drop-soft);
  color: var(--hb-drop-text);
}
.hb.app #ph-add {
  background: #f0f0f0 !important;
  color: #141414 !important;
}
[data-theme='light'] .hb.app #ph-add {
  background: #1c1c1e !important;
  color: #fff !important;
}

/* Conferência Hermes: o cabeçalho, a seleção e o rodapé do perfil. */
.hb.app .set-page[data-page='import'] .app-imp-item {
  align-items: flex-start;
}
.hb.app .set-page[data-page='import'] .app-imp-item[data-state='skip'] .app-imp-it > b {
  color: var(--text);
}
.hb.app .set-page[data-page='import'] .app-imp-it > .app-imp-reason {
  line-height: 1.4;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof input.check {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof input.check:checked {
  border-color: #007cf7;
  background: #007cf7;
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof input.check:checked::after {
  border-color: var(--text);
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof input.check:focus-visible {
  outline: 2px solid var(--hb-drop-text);
  outline-offset: 2px;
}
.hb.app .set-page[data-page='import'] .app-imp-foot .hb-btn {
  height: 36px;
}
.hb.app .set-page[data-page='import'] .app-imp-foot .app-imp-go:not(:disabled) {
  background: #f0f0f0 !important;
  color: #141414 !important;
}
[data-theme='light'] .hb.app .set-page[data-page='import'] .app-imp-foot .app-imp-go:not(:disabled) {
  background: #1c1c1e !important;
  color: #fff !important;
}

/* O estado no detalhe usa o mesmo selo de atenção da linha e o selo verde quando conectado. */
.set-prov-pill {
  min-height: 22px;
  border: 1px solid transparent;
  font-weight: 500;
}
.set-prov-pill[data-tone='connected'] {
  color: var(--provider-badge-success, #31cf76) !important;
  background: rgba(49, 207, 118, 0.12);
}
.set-prov-pill[data-tone='attention'] {
  color: var(--provider-badge-warning, #ff9412) !important;
}
[data-theme='light'] .set-page[data-page='providers'] {
  --provider-badge-success: #1fa85a;
  --provider-badge-warning: #f08a00;
}
[data-theme='light'] .set-prov-pill[data-tone='connected'] {
  background: rgba(31, 168, 90, 0.12);
}
.set-prov-pill[data-tone='idle'] {
  background: var(--surface-2);
}
.set-prov-logo > svg {
  width: 55%;
  height: 55%;
}

/* Ações, cartões de entrada e seleção do pacote de Transferência. */
.hb.app button.app-trf-tile:not(:hover) {
  background: transparent;
}
.hb.app .app-trf-tile > svg {
  color: var(--text);
}
.hb.app .app-trf .app-imp-foot .hb-btn {
  height: 36px;
}
.hb.app .app-trf .app-imp-foot .app-imp-go:not(:disabled) {
  background: #f0f0f0 !important;
  color: #141414 !important;
}
[data-theme='light'] .hb.app .app-trf .app-imp-foot .app-imp-go:not(:disabled) {
  background: #1c1c1e !important;
  color: #fff !important;
}
.hb.app .app-trf :is(.app-trf-bots, .app-trf-checklist) input.check {
  flex: 0 0 16px;
  margin: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.hb.app .app-trf :is(.app-trf-bots, .app-trf-checklist) input.check:checked {
  border-color: #007cf7;
  background: #007cf7;
}
.hb.app .app-trf :is(.app-trf-bots, .app-trf-checklist) input.check:checked::after {
  border-color: var(--text);
}
.hb.app .app-trf :is(.app-trf-bots, .app-trf-checklist) input.check:focus-visible {
  outline: 2px solid var(--hb-drop-text);
  outline-offset: 2px;
}

/* Cofre dentro da janela de Ajustes e seus diálogos. */
.hb.app {
  --set-vault-rail: #1a1a1a;
  --set-vault-sheet: #141414;
  --set-vault-soft-red: rgb(253 47 59 / 16%);
  --set-vault-deep-red: rgb(253 47 59 / 28%);
  --set-vault-red: #ff6069;
  --set-vault-row-hover: rgb(255 255 255 / 4%);
  --set-vault-muted: #979797;
  --set-vault-primary: #f0f0f0;
  --set-vault-primary-ink: #141414;
}
[data-theme=light] .hb.app {
  --set-vault-rail: #f5f5f6;
  --set-vault-sheet: #fff;
  --set-vault-soft-red: rgb(232 34 45 / 12%);
  --set-vault-deep-red: rgb(232 34 45 / 20%);
  --set-vault-red: #c0141d;
  --set-vault-row-hover: rgb(20 20 20 / 4%);
  --set-vault-muted: #6b6b70;
  --set-vault-primary: #1c1c1e;
  --set-vault-primary-ink: #fff;
}
.hb.app #vault .app-vault-row {
  min-height: 64px; border-radius: 8px;
}
.hb.app #vault .app-vault-row:hover { background: transparent; }
.hb.app #vault .app-vault-row:has(.app-vault-o:hover) { background: var(--set-vault-row-hover); }
.hb.app #vault button.app-vault-o {
  align-self: stretch; min-height: 64px; gap: 16px; padding-block: 8.5px;
}
.hb.app #vault button.app-vault-o .hb-opt-t span {
  color: var(--set-vault-muted); font-size: 14px; line-height: 20px;
}
.hb.app #vault .app-vault-row > .hb-ic { width: 32px; height: 32px; }
.hb.app #vault .app-vault-row .app-vault-who {
  height: 32px; gap: 6px; color: var(--text-2); border-radius: 8px;
  font-size: 14px; line-height: 20px; background: var(--surface-2) !important;
}
.set-vault-stack { display: inline-flex; flex: none; }
.set-vault-stack > :not(:first-child) { margin-inline-start: -4px; }
.set-vault-scope-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hb.app #dialog .app-vault-logo {
  display: inline-grid; flex: none; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-2);
}
.hb.app :is(#dialog .app-vault-logo, #vault .app-vault-ic)[data-kind=card] {
  height: 24px; border-radius: 4px; background: #f0f0f0; color: #141414;
  box-shadow: inset 0 0 0 1px rgb(20 20 20 / 14%);
}
.hb.app :is(#dialog .app-vault-logo, #vault .app-vault-ic)[data-kind=contact] {
  border-radius: 50%; background: rgb(0 124 247 / 16%); color: #42a0ff;
}
[data-theme=light] .hb.app :is(#dialog .app-vault-logo, #vault .app-vault-ic)[data-kind=contact] {
  background: rgb(0 124 247 / 12%); color: #0064c8;
}
.hb.app #dialog .app-vault-dlg[data-form=vault-item] {
  background: var(--set-vault-rail);
}
.hb.app #dialog .app-vault-dlg[data-form=vault-item] .app-chan-h { gap: 12px; }
.hb.app #dialog .app-vault-dlg[data-form=vault-item] .app-chan-h strong { flex: 1; }
.hb.app #dialog .app-vault-dlg[data-form=vault-item] .app-chan-h .hb-ic { width: 32px; height: 32px; }
.hb.app #dialog .app-vault-grid:has(#vault-f-website) .hb-field:has(#vault-f-username, #vault-f-password),
.hb.app #dialog .app-vault-grid .hb-field:has(#vault-f-number, #vault-f-nameOnCard, #vault-f-address2) { grid-column: 1 / -1; }
.hb.app #dialog .app-vault-grid:has(#vault-f-fullName) .hb-field:has(#vault-f-fullName, #vault-f-label, #vault-f-email) { grid-column: auto; }
.hb.app #dialog .app-vault-dlg[data-form=vault-item] textarea.hb-input { min-height: 60px; }
.hb.app :is(#vault-pick-ok, #dialog .app-vault-dlg[data-form=vault-item] .cf-foot button[type=submit]) {
  background: var(--set-vault-primary) !important; color: var(--set-vault-primary-ink) !important;
}

.hb.app dialog.set-vault-scope {
  width: min(440px, calc(100vw - 48px)); padding: 24px; gap: 16px;
  border: 0; background: var(--set-vault-sheet); box-shadow: var(--shadow-pop);
}
.hb.app .set-vault-scope > form { gap: 16px; }
.hb.app .set-vault-scope .va-h { padding: 0; margin: -8px 0 -4px; }
.hb.app .set-vault-scope .va-h h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb.app .set-vault-scope .va-b { gap: 4px; padding: 0; }
.hb.app .set-vault-scope .va-q { margin: 0 0 4px; }
.hb.app .set-vault-scope .va-q input { padding: 0; }
.hb.app .set-vault-scope .va-role {
  max-width: 42%; overflow: hidden; padding-inline: 5px; border-radius: 4px;
  background: var(--surface-2); text-overflow: ellipsis; white-space: nowrap;
}
.hb.app .set-vault-scope .va-n { gap: 4px; align-items: center; }
.hb.app .set-vault-scope .cf-foot { border: 0; padding: 0; }
.hb.app #dialog [data-do=vault-delete-no] > .cf-dlg { background: var(--set-vault-rail); }
.hb.app #dialog [data-do=vault-delete-no] > .cf-dlg .cf-ic-red,
.hb.app #dialog #dlg-yes[data-do=vault-delete-yes] {
  background: var(--set-vault-soft-red) !important; color: var(--set-vault-red) !important;
}
.hb.app #dialog #dlg-yes[data-do=vault-delete-yes]:hover { background: var(--set-vault-deep-red) !important; }
.hb.app #dialog #dlg-yes[data-do=vault-delete-yes] svg { display: none; }

.set-identity-popover > .set-popover-card { max-width: calc(100vw - 24px); }
.set-identity-options-title {
  min-height: 40px; gap: 10px; padding: 7px 10px 3px 13px;
  color: var(--text-2); font-weight: 590; letter-spacing: .02em; text-transform: uppercase;
}
.set-identity-options-title strong { font-weight: inherit; }
.hb.app .set-identity-options-title .hb-ic { width: 40px; height: 40px; }
.set-identity-options-divider { height: 1px; background: var(--divider); }
.set-identity-choices {
  max-height: 108px; grid-auto-rows: 44px; align-content: start;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.hb.app .set-page :is(.set-identity-choice, .set-identity-color)[aria-pressed=true] {
  background: var(--divider) !important;
  box-shadow: inset 0 0 0 1px var(--text-3), 0 1px 3px rgb(0 0 0 / 10%);
}

.set-personality-status {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.hb.app .set-profile-dialog.set-routine-confirm {
  background: var(--surface); color: var(--text);
}
.hb.app .set-profile-dialog.set-routine-confirm .hb-foot .hb-btn {
  height: 36px; padding: 0 16px; border-radius: 8px; font-size: 15px;
}
.hb.app .set-profile-dialog[data-tone=warning] .set-feed-confirm-mark,
.hb.app .set-profile-dialog[data-tone=warning] .hb-foot button[type=submit] {
  background: var(--set-vault-soft-red) !important; color: var(--set-vault-red) !important;
}
.hb.app .set-profile-dialog[data-tone=warning] .hb-foot button[type=submit]:hover {
  background: var(--set-vault-deep-red) !important;
}
.hb.app .set-profile-dialog[data-profile-action=proxy] .hb-foot button[type=submit] {
  background: var(--set-vault-primary) !important; color: var(--set-vault-primary-ink) !important;
}
.set-profile-proxy-field {
  display: grid; gap: 4px; margin-top: 12px;
  color: var(--text-2); font-size: 13px; font-weight: 500; line-height: 18px;
}
.hb.app .set-profile-dialog .set-profile-proxy-field input {
  height: 32px; min-height: 32px; margin: 0; padding: 0 12px;
  border-radius: 8px; background: var(--surface-2); font-size: 14px; line-height: 20px;
}
.hb.app .set-page .set-profile-menu > summary { width: 32px; height: 32px; }
.set-profile-options {
  top: calc(100% + 4px); width: max-content; min-width: 192px; max-width: min(288px, calc(100vw - 16px)); padding: 6px;
  border: 0; border-radius: 14px; background: var(--set-vault-sheet);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-pop);
}
.set-profile-options > hr {
  height: 1px; margin: 6px -6px; border: 0; background: var(--divider);
}
.hb.app .set-page .set-profile-options .hb-btn.hb-sm {
  gap: 8px; padding: 6px 10px; border: 0; border-radius: 10px;
  font-weight: 400; background: transparent !important; box-shadow: none;
}
.set-profile-options button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hb.app .set-page .set-profile-options .hb-btn.hb-sm:is(:hover, :focus-visible) { background: var(--set-vault-row-hover) !important; }
.hb.app .set-page .set-profile-options button[data-do=set-profiles-delete] { color: #fd2f3b !important; }
[data-theme=light] .hb.app .set-page .set-profile-options button[data-do=set-profiles-delete] { color: #e8222d !important; }
.hb.app .set-page .set-profile-options .hb-btn[data-do=set-profiles-delete]:is(:hover, :focus-visible) {
  background: var(--set-vault-soft-red) !important;
}

.set-storage-agent { display: grid; gap: 2px; text-align: start; }
.set-storage-agent,
.set-storage-topics .set-copy button { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.set-storage-agent span { color: var(--text-3); font-size: 12px; font-weight: 400; }
.set-storage-threshold { width: clamp(96px, 22vw, 220px); accent-color: var(--text-2); }
.set-storage-limits output { min-width: 3ch; color: var(--text-2); font-variant-numeric: tabular-nums; }

.hb.app .app-sks-page .app-sks-bot {
  min-height: 64px;
  padding: 12px 16px;
  gap: 16px;
  cursor: auto;
}
.hb.app .app-sks-page .app-sks-agent-q {
  width: min(224px, 48%);
}
.hb.app .app-sks-bot .hb-btn {
  min-height: 32px;
}
.hb.app .app-sks-bot > .hc-bot {
  display: inline-block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.hb.app .app-sks-bot .toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
}
.hb.app .app-sks-bot .toggle::after {
  width: 16px;
  height: 16px;
}
.hb.app .app-sks-bot .toggle:checked::after {
  transform: translateX(16px);
}

/* Configuração e informações de um aplicativo instalado. */
.hb.app .app-apps-page .app-store-detail-card { padding: 0; }
.hb.app .app-apps-page [aria-labelledby="store-app-info"] .app-store-detail-card { padding: 12px 16px; }
.hb.app .app-apps-page .app-store-detail-card > .app-apps-detail { margin-inline: 16px; }
.hb.app .app-apps-page .app-store-detail-card > .app-apps-row {
  position: relative;
  min-height: 64px;
  gap: 16px;
  padding: 12px 16px;
  border-top: 0;
}
.hb.app .app-apps-page .app-store-detail-card > .app-apps-row:not(:first-child)::before {
  position: absolute;
  inset: 0 16px auto;
  height: 1px;
  background: var(--hb-line);
  pointer-events: none;
  content: "";
}
.app-apps-page .app-store-app-setting .app-apps-rc { flex: 1; }
.app-store-app-setting .app-apps-rc > span:empty,
.app-store-app-setting .app-apps-ra:empty { display: none; }
.app-store-app-glyph {
  display: grid;
  flex: none;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: var(--hb-text);
  background: var(--hb-card-2);
}
.hb.app .app-apps-page .app-store-app-setting .app-apps-code {
  margin-block: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.app-apps-page .app-store-detail-card .app-store-facts a { color: var(--accent-ink); }
.hb.app .app-store-app-access .app-apps-ra > .hb-btn { min-height: 32px; }
.hb.app .app-store-app-access #apps-pick-open { gap: 6px; }
.hb.app .app-store-app-pick { width: min(440px,calc(100vw - 48px)); }
.hb.app .app-store-app-pick .app-chan-pick { min-height: 44px; gap: 12px; }

@media (max-width: 640px) {
  .hb.app .app-apps-page .app-store-detail-card > .app-apps-row { gap: 12px; }
  .hb.app .app-store-app-setting { flex-wrap: wrap; }
  .app-store-app-setting .app-apps-ra:not(:empty) { margin-inline-start: auto; }
}
.hb.app .app-apps-page [aria-labelledby="store-app-info"] .app-store-facts {
  grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
  gap: 8px 24px;
}
.hb.app .app-apps-page [aria-labelledby="store-app-info"] .app-store-facts dd { font-size: 14px; }

.hb.app .set-personal-page .set-color-trigger { background: transparent; }
.hb.app .set-color-trigger > i { flex-basis: 14px; height: 14px; }
.hb.app .set-appearance-color-pop {
  width: min(288px, calc(100vw - 24px)); padding: 12px;
  border: 0; border-radius: 14px; background: var(--set-vault-sheet); color: var(--text);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-pop);
}
.hb.app .set-appearance-color-pop:popover-open { display: grid; gap: 12px; }
.hb.app .set-appearance-color-pop .set-color-area {
  position: relative; width: 100%; height: 160px; border: 0; border-radius: 12px;
  background: linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl(var(--color-hue, 160) 100% 50%));
  cursor: crosshair; touch-action: none;
}
.set-color-area > i {
  position: absolute; left: var(--color-s, 0%); top: var(--color-v, 0%);
  width: 18px; height: 18px; transform: translate(-50%, -50%);
  border: 3px solid #fff; border-radius: 50%; background: var(--color-draft);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 32%); pointer-events: none;
}
.set-color-hue input {
  display: block; appearance: none; width: 100%; height: 14px; padding: 0; margin: 0;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  border-radius: 999px; cursor: pointer;
}
.set-color-hue input::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px;
  border: 3px solid #fff; border-radius: 50%;
  background: hsl(var(--color-hue, 160) 100% 50%);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 32%);
}
.set-appearance-color-pop .set-color-value { display: grid; grid-template-columns: 48px minmax(0, 1fr) 36px; gap: 6px; }
.hb.app .set-appearance-color-pop :is(.set-color-format, input[data-color-hex], .set-color-channels input) {
  width: 100%; height: 36px; padding-inline: 12px; border: 1px solid var(--border);
  border-radius: 8px; background: transparent; color: var(--text); font-family: var(--mono); text-transform: uppercase;
}
.hb.app .set-appearance-color-pop .set-color-format { padding: 0; color: var(--text-3); font: inherit; font-size: 13px; }
.set-appearance-color-pop .set-color-channels:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.hb.app .set-appearance-color-pop .set-color-channels input { padding-inline: 4px; text-align: center; appearance: textfield; }
.set-appearance-color-pop .set-color-channels input::-webkit-inner-spin-button { appearance: none; }
.set-appearance-color-pop .set-color-value > i { border: 1px solid var(--border); border-radius: 8px; background: var(--color-draft); }
.hb.app .set-appearance-color-pop .set-tint-row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0; }
.hb.app .set-appearance-color-pop button.set-tint { width: 100%; height: 22px; min-width: 0; padding: 0; }
.hb.app .set-appearance-color-pop button.set-tint > i { width: 16px; height: 16px; background: var(--set-tint-color, transparent); }
.set-appearance-color-pop .set-color-err { margin: 0; }

.hb.app .set-personal-page[data-page=appearance] .set-choice .set-popover-card {
  max-height: min(320px, 48dvh); overflow-y: auto;
}
:root[data-appearance-opening=animated] .hb.app #msgs { animation: none; }
:root[data-appearance-opening=still] .app-boot .hc-loader { --hc-loader: var(--hc-loader-still); }
@media (prefers-reduced-motion: no-preference) {
  :root[data-appearance-opening=animated] .app-boot { animation: hb-startup-enter 380ms ease-out both; }
}
@keyframes hb-startup-enter {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
:root[data-appearance-backdrop=image] .hb.app #msgs {
  background-image: linear-gradient(rgb(20 20 20 / 54%), rgb(20 20 20 / 54%)), var(--hb-backdrop-image);
  background-size: cover; background-position: center;
}
:root[data-theme=light][data-appearance-backdrop=image] .hb.app #msgs {
  background-image: linear-gradient(rgb(255 255 255 / 58%), rgb(255 255 255 / 58%)), var(--hb-backdrop-image);
}

.set-computer-system {
  gap: 8px;
}
.set-computer-system .set-sec-h {
  padding-inline: 4px;
}
.set-computer-system .set-sec-h .set-note {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 18px;
}
.set-computer-system .set-computer-recheck {
  margin-top: 8px;
}
.set-computer-system .set-computer-granted {
  font-weight: 500;
}
.hb.app .set-personal-page[data-page='computer'] button.set-computer-button:not(.set-computer-grant) {
  color: var(--text-2) !important;
}
.hb.app .set-personal-page[data-page='computer'] button.set-computer-button:not(.set-computer-grant):not(:hover) {
  background: var(--surface-2) !important;
}

/* O resumo do resultado usa um glifo de sucesso de 32 px sem placa de fundo. */
.hb.app .app-imp-end-h:has(.app-imp-result-mark) {
  gap: 8px;
}
.hb.app .app-imp-ok.app-imp-result-mark {
  background: transparent;
}

.app-wf-card-result .app-wf-card-result-error { color: #ff6069; }
:root[data-theme="light"] .app-wf-card-result .app-wf-card-result-error { color: #c0141d; }
.app-wf-card-failure-result { padding: 0; gap: 4px; background: transparent; }
.app-wf-card-failure-result .app-wf-card-result-head { justify-content: flex-end; }
.hb.app #wf-pop[data-wf-menu="attempt"] {
  display: flex;
  overflow: hidden;
  color: var(--hb-text);
  background: #1a1a1a;
  border-radius: 16px;
  --wf-attempt-field: #242424;
}
:root[data-theme="light"] .hb.app #wf-pop[data-wf-menu="attempt"] {
  background: #fff;
  --wf-attempt-field: #f0f0f2;
}
#wf-pop[data-wf-menu="attempt"] .mp-panel { display: flex; flex-direction: column; min-height: 0; width: 100%; padding: 0; }
.app-wf-attempt-head {
  display: flex;
  flex: none;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 12px 8px;
  gap: 8px;
}
.app-wf-attempt-head strong { font-size: 14px; }
.app-wf-attempt-head time { font-size: 12px; color: var(--hb-muted); white-space: nowrap; }
.app-wf-attempt-body { display: grid; gap: 12px; min-height: 0; padding: 4px 12px 12px; overflow: auto; overscroll-behavior: contain; }
.app-wf-attempt-loading { justify-self: center; margin: 40px; }
.app-wf-attempt-foot { padding: 8px 12px 12px; border-top: 1px solid var(--hb-line); }
.app-wf-attempt-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 0; }
.app-wf-attempt-facts > div { display: grid; min-width: 0; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--wf-attempt-field); }
.app-wf-attempt-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.app-wf-attempt-facts dt { color: var(--hb-muted); font-size: 11px; }
.app-wf-attempt-facts dd { min-width: 0; overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.app-wf-attempt-block h3,
.app-wf-attempt-sources h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 13px; }
.app-wf-attempt-block pre { max-height: 154px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--wf-attempt-field); font: inherit; }
.app-wf-attempt-sources > ul { display: grid; gap: 10px; list-style: none; padding: 0; margin: 8px 0 0; }
.app-wf-attempt-sources > p { margin: 8px 0 0; font-size: 12px; color: var(--hb-muted); }
.app-wf-attempt-sources img { height: 96px; max-width: 100%; border-radius: 8px; object-fit: cover; }

.set-space-chart { display: grid; gap: 12px; }
.set-space-bar { display: flex; height: 10px; gap: 2px; }
.set-space-bar span { min-width: 4px; flex-basis: 0; border-radius: 4px; background: var(--space-ink); }
.set-space-chart { --work-ink: #3987e5; --file-ink: #d95926; --chat-ink: #199e70; --temp-ink: #9085e9; }
[data-theme=light] .set-space-chart { --work-ink: #2f74c9; --file-ink: #c64d1d; --chat-ink: #148a61; --temp-ink: #6f62d6; }
.set-space-chart [data-space=work] { --space-ink: var(--work-ink); }
.set-space-chart [data-space=attachment] { --space-ink: var(--file-ink); }
.set-space-chart [data-space=chat] { --space-ink: var(--chat-ink); }
.set-space-chart [data-space=temp] { --space-ink: var(--temp-ink); }
.set-space-chart [data-space=system] { --space-ink: var(--text-3); }
.set-space-legend, .set-space-agents { list-style: none; padding: 0; margin: 0; }
.set-space-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 4px 24px; }
.set-space-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px; padding: 4px 0; }
.set-space-legend i { width: 8px; height: 8px; background: var(--space-ink); border-radius: 50%; }
.set-space-legend :is(strong, small), .set-space-value { font-variant-numeric: tabular-nums; }
.set-space-legend strong { font-weight: 500; }
.set-space-chart:has([data-space=work]:hover) [data-space]:not([data-space=work]),
.set-space-chart:has([data-space=attachment]:hover) [data-space]:not([data-space=attachment]),
.set-space-chart:has([data-space=chat]:hover) [data-space]:not([data-space=chat]),
.set-space-chart:has([data-space=temp]:hover) [data-space]:not([data-space=temp]),
.set-space-chart:has([data-space=system]:hover) [data-space]:not([data-space=system]) { opacity: .35; }
.set-space-agents > li + li { border-top: 1px solid var(--divider); }
.set-space-row { display: flex; width: 100%; min-height: 52px; align-items: center; gap: 12px; padding: 8px 16px; text-align: start; }
.set-space-row:hover { background: var(--surface-3); }
.set-space-row progress { width: 96px; height: 6px; accent-color: var(--text-2); }
.set-space-name { flex: 1; min-width: 0; }
.set-space-name, .set-space-value { display: grid; gap: 2px; }
.set-space-name strong { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.set-space-value { min-width: 72px; text-align: end; }
.set-space-row small, .set-space-legend small { color: var(--text-3); }
@media (max-width: 650px) { .set-space-row progress { display: none; } }

/* Os dois destinos de Transferência usam o fundo e a cor de um botão com contorno. */
.hb.app button.app-trf-tile:not(:hover) {
  background: var(--surface-2);
}
.hb.app .app-trf-tile > svg {
  color: var(--text-2);
}
@media (hover: hover) {
  .hb.app .app-trf-tile:hover > svg { color: var(--text); }
}

/* Revisão e resultado Hermes, com a área de leitura no mesmo painel. */
.hb.app .set-page[data-page='import'] .app-imp-detail {
  gap: 32px;
}
.hb.app .set-page[data-page='import'] .app-imp-opt {
  gap: 12px;
  padding: 12px 16px;
}
.hb.app .set-page[data-page='import'] .app-imp-opt .app-imp-oi {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
.hb.app .set-page[data-page='import'] .app-imp-opt .hb-opt-t {
  gap: 2px;
}
.hb.app .set-page[data-page='import'] .app-imp-wait {
  margin: 0;
  color: var(--import-description);
  line-height: 1.45;
}
.hb.app .set-page[data-page='import'] .app-imp-zip-action {
  min-height: 32px;
  height: auto;
  text-align: start;
  white-space: normal;
}
.hb.app .set-page[data-page='import'] .app-imp-group {
  display: grid;
  gap: 8px;
}
.hb.app .set-page[data-page='import'] .app-imp-group h4,
.hb.app .set-page[data-page='import'] .app-imp-result-head h3 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text-2);
}
.hb.app .set-page[data-page='import'] .app-imp-result-head h3 {
  color: var(--import-description);
  font-weight: 500;
}
.hb.app .set-page[data-page='import'] .app-imp-result-head > p,
.hb.app .set-page[data-page='import'] .app-imp-indexed > header > span {
  margin: 0;
  color: var(--import-description);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .set-page[data-page='import'] .app-imp-result-head .app-imp-end-h {
  margin-block: 4px;
}
.hb.app .set-page[data-page='import'] .app-imp-result .app-imp-bot {
  min-height: 52px;
  padding: 8px 16px;
}
.hb.app .set-page[data-page='import'] .app-imp-indexed > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.hb.app .set-page[data-page='import'] .app-imp-indexed .app-imp-list {
  gap: 0;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 12px;
  background: var(--surface-2);
}
.hb.app .set-page[data-page='import'] .app-imp-indexed .app-imp-prof {
  gap: 0;
}
.hb.app .set-page[data-page='import'] .app-imp-indexed .app-imp-prof + .app-imp-prof {
  border-top: 1px solid var(--hb-grouped-line);
}
.hb.app .set-page[data-page='import'] .app-imp-indexed .app-imp-row {
  min-height: 52px;
  padding: 12px 16px;
}
.hb.app .set-page[data-page='import'] .app-imp-indexed .app-imp-items {
  margin: 0 16px 12px;
}
.hb.app .set-page[data-page='import'] .app-imp-name-hint {
  display: inline-flex;
  color: var(--import-description);
}
.hb.app .set-page[data-page='import'] .app-imp-message ul {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding-inline-start: 16px;
  color: var(--import-description);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .set-page[data-page='import'] .app-imp-detail > .app-imp-wait {
  color: var(--import-description);
}
.hb.app .set-page[data-page='import'] .app-imp-hermes-prof .app-imp-badge {
  background: var(--hb-drop-soft);
  color: var(--hb-drop-text);
}
.hb.app .set-page[data-page='import'] .app-imp-indexed label.app-imp-it {
  cursor: pointer;
}
.hb.app .set-page[data-page='import'] .app-imp-indexed .app-imp-row:has(.check:disabled) label.app-imp-it {
  cursor: default;
}
.hb.app .set-page[data-page='import'] .app-imp-result .app-imp-end {
  color: var(--text) !important;
  background: var(--hb-ctl-hover) !important;
}
.hb.app .set-page[data-page='import'] .app-imp-again .seg {
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.hb.app .set-page[data-page='import'] .app-imp-again .seg button {
  height: 28px;
  padding-inline: 12px;
  border-radius: 6px;
  color: var(--import-description);
  font-size: 14px;
  line-height: 18px;
}
.hb.app .set-page[data-page='import'] .app-imp-again .seg button.on {
  background: #2a2a2a;
  color: var(--text);
  box-shadow: none;
}
[data-theme='light'] .hb.app .set-page[data-page='import'] .app-imp-again .seg {
  background: #ececee;
}
[data-theme='light'] .hb.app .set-page[data-page='import'] .app-imp-again .seg button.on {
  background: #fff;
}

.app-trf-upload {
  --transfer-upload-muted: #979797;
  --transfer-upload-track: rgba(255, 255, 255, 0.045);
  display: grid;
  max-width: 320px;
  gap: 6px;
}
[data-theme='light'] .app-trf-upload {
  --transfer-upload-muted: #6b6b70;
  --transfer-upload-track: rgba(20, 20, 20, 0.1);
}
.app-trf-upload p {
  margin: 0;
  color: var(--transfer-upload-muted);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.app-trf-upload progress {
  width: 100%;
  height: 3px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  color: var(--text-2);
  background: var(--transfer-upload-track);
}
.app-trf-upload progress::-webkit-progress-bar {
  background: var(--transfer-upload-track);
}
.app-trf-upload progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--text-2);
}
.app-trf-upload progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--text-2);
}

.set-prov-default .set-choice { width: 168px; }
@media (max-width: 570px) { .set-prov-default .set-choice { width: 112px; } }
.set-prov-default :is(.set-choice-trigger, .set-choice-option) > span { display: inline-flex; align-items: center; gap: 8px; }
.set-prov-default :is(.set-choice-trigger, .set-choice-option) > span > :first-child { flex: none; }
.hb.app .set-prov-default .set-choice-trigger { font-size: 14px; line-height: 20px; }
.set-prov-default .set-popover-card { grid-template-columns: minmax(0, 1fr); border: 0; }
.set-prov-default .set-choice-option, .set-prov-default .set-choice-option > span { min-width: 0; }
.set-prov-default .set-choice-option > span { overflow: hidden; }

.set-color-hue-row { display: flex; align-items: center; gap: 12px; }
.set-color-hue-row .set-color-hue { min-width: 0; flex: 1; }
.hb.app .set-appearance-color-pop .set-color-sample {
  display: grid; flex: 0 0 36px; height: 36px; place-items: center;
  padding: 0; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--text-3); cursor: pointer;
}
.hb.app .set-appearance-color-pop .set-color-sample:is(:hover, :focus-visible) { color: var(--text); }
.hb.app .set-appearance-color-pop .set-tint-row {
  grid-template-columns: repeat(6, 24px); justify-content: space-between; row-gap: 8px;
  padding: 4px 2px 0;
}
.hb.app .set-appearance-color-pop .set-tint-row button.set-tint {
  width: 24px; height: 24px; border: 0; border-radius: 50%;
}
.hb.app .set-appearance-color-pop .set-tint-row button.set-tint > i {
  width: 24px; height: 24px; border-radius: inherit;
}
.hb.app .set-appearance-color-pop .set-tint-row button.set-tint[aria-pressed=true] {
  outline: 2px solid color-mix(in srgb, var(--text) 70%, transparent); outline-offset: 1px;
}

#set-provider-use { width: 36px; height: 20px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
#set-provider-use::after { top: 2px; left: 2px; width: 16px; height: 16px; background: var(--text); }
#set-provider-use:checked { background: var(--set-button); }
#set-provider-use:checked::after { transform: translateX(16px); background: var(--surface-2); }

.set-own-env { display: grid; gap: 8px; }
.set-own-env h3 { margin: 0; font-size: 14px; }
.set-own-env-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; align-items: end; }
.set-own-env-fields label { display: grid; gap: 4px; min-width: 0; }
.set-own-env-fields input { width: 100%; min-width: 0; font-family: var(--font-mono, monospace); }
.set-own-env > button { justify-self: start; }

.set-plan-editor {
  position: fixed; inset: auto; box-sizing: border-box; margin: 0; padding: 12px; width: min(260px, calc(100vw - 16px));
  border: 1px solid var(--divider); border-radius: 8px; background: var(--hb-raised); color: var(--text-1); box-shadow: var(--shadow-pop);
}
.set-plan-editor:popover-open { display: grid; gap: 8px; }
.set-plan-editor > strong { font-size: 14px; font-weight: 500; }
.set-plan-inputs, .set-plan-actions { display: flex; align-items: center; gap: 8px; }
.set-plan-inputs > input { width: 64px; text-align: end; }
.set-plan-inputs fieldset { display: flex; border: 0; padding: 0; margin: 0; gap: 2px; }
.set-plan-inputs label { position: relative; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.set-plan-inputs label:has(:checked) { background: var(--hb-hover); }
.set-plan-inputs label:focus-within { outline: 2px solid var(--accent); }
.set-plan-inputs [type=radio] { position: absolute; opacity: 0; }
.set-plan-editor small { color: var(--text-2); }
.set-plan-editor:has([aria-invalid=true]) small { color: var(--danger); }
.set-plan-actions { justify-content: flex-end; }

.set-row:has(.set-plan-faces) { position: relative; }
.set-row:has(.set-plan-faces) .set-agent-detail-button::after { content: ""; position: absolute; inset: 0; }
.set-plan-faces { display: inline-flex; align-items: center; gap: 2px; }
.set-plan-count { min-width: 72px; color: var(--text-2); font-size: 12px; text-align: end; }

.hb.app .app-trf [data-preset] {
  gap: 3px; padding: 3px; border: 0; border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border); background: #212121;
}
.hb.app .app-trf [data-preset] button {
  height: 28px; padding-inline: 12px; border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 20px;
}
.hb.app .app-trf [data-preset] button[aria-pressed=true] { background: #2a2a2a; }
[data-theme=light] .hb.app .app-trf [data-preset] { background: #ececee; }
[data-theme=light] .hb.app .app-trf [data-preset] button[aria-pressed=true] { background: #fff; }
.hb.app .app-trf-next { margin: 0; color: var(--trf-label-muted); font-size: 14px; line-height: 1.5; }

.hb.app .app-trf-options-title { align-items: baseline; }
.hb.app .app-trf [data-preset] { align-self: baseline; align-items: center; }
.hb.app .app-trf [data-preset] button { padding-block: 4px; color: var(--trf-label-muted); }
.hb.app .app-trf [data-preset] button:is(:hover, [aria-pressed=true]) { color: var(--text); }

.hb.app .app-trf .app-trf-options {
  border-color: var(--hb-grouped-line);
  border-radius: 12px;
  background: var(--surface-2);
}

.app-imp-folders { width: min(480px, 92vw); max-height: 80vh; margin: auto; padding: 20px; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; }
.app-imp-folders h3 { margin: 0 0 16px; }
.app-imp-folders label { display: block; margin-bottom: 6px; }
.app-imp-folders-list { max-height: 40vh; overflow: auto; }
.app-imp-folders-list button { width: 100%; text-align: start; gap: 8px; overflow-wrap: anywhere; }
.app-imp-folders footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.hb.app .app-imp-folder-options { display: grid; gap: 8px; }
.hb.app .app-imp-folder-options .app-imp-folder-choice { display: flex; width: 100%; justify-content: flex-start; }
.hb.app .app-imp-folder-choice strong { font-size: 14px; font-weight: 500; }

.set-site-memory-entry { padding: 0 16px 12px; border-bottom: 1px solid var(--hb-line); }
.set-site-memory-entry:last-child { border-bottom: 0; }
.set-site-memory-entry > p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 20px; margin: 0 0 8px; }

.app-wf-n[data-builder] { outline: 2px solid var(--text); outline-offset: 2px; }
.app-wf-builder { pointer-events: none; position: absolute; z-index: 2; left: 20px; top: -24px; padding: 2px 7px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; color: var(--text); background: var(--surface); border: 1px solid var(--border); font-size: 12px; }

.set-prov-found .set-agent-program {
  max-width: 100%;
  text-overflow: ellipsis;
}
.set-own-env-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; align-items: center; }
.set-own-env-fields label { display: grid; gap: 4px; min-width: 0; }
.set-own-env-fields input:not([type='checkbox']) { width: 100%; min-width: 0; font-family: var(--font-mono, monospace); }
.set-own-env-fields .set-own-env-sensitive { display: flex; align-items: center; gap: 6px; }
.set-own-env-sensitive input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; }
.set-own-env-fields > button { justify-self: end; }

.set-choice:has(.set-font-query) .set-popover-card { max-height: min(350px, 55vh); overflow-y: auto; }
.set-font-query { position: sticky; top: 0; width: 100%; background: var(--surface); }
.set-choice .set-choice-option[hidden], .set-font-no-match[hidden] { display: none; }
.set-font-no-match { margin: 8px; color: var(--text-3); }

/* O seletor pertence ao perfil e mantém a cor ao reordenar a lista. */
.set-profile-color { flex: 0 0 32px; }
.set-profile-color > summary { width: 32px; height: 32px; }
.set-profile-color .set-profile-dot { width: 12px; height: 12px; margin: 0; }
.set-profile-color .set-profile-options { left: 0; right: auto; min-width: 168px; }
.set-profile-color .set-profile-options button { gap: 8px; }
.set-profile-color .set-profile-options button span { flex: 1; text-align: left; }
.set-profile-shared-dot { background: var(--hb-muted); }

/* As escolhas do Telegram funcionam em toda a linha, no cartão e no painel. */
.app-wf-output-row.app-wf-telegram-choice {
  display: block;
  padding: 0;
}
.hb.app .app-wf-telegram-choice .ps-b {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--wf-card-ink, var(--text));
  font-size: inherit;
}
.hb.app .app-wf-telegram-choice .ps-n {
  overflow: hidden;
  color: var(--wf-card-muted, var(--text-2));
  text-overflow: ellipsis;
}
.hb.app .app-wf-telegram-choice .ps-v {
  overflow: hidden;
  justify-content: flex-start;
  text-overflow: ellipsis;
}
.hb.app .app-wf-telegram-choice .ps-b:is(:hover, [aria-expanded="true"]):not(:disabled) {
  background: var(--hb-hover);
}
.hb.app .app-wf-card .app-wf-telegram-filter .wf-inline {
  font-size: inherit;
}

.set-identity-colors { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }

.set-profile-proxy-auth { margin-top: 8px; font-size: 13px; }
.set-profile-proxy-auth > summary { cursor: pointer; }
.set-profile-proxy-auth .set-profile-proxy-field { margin-top: 8px; }
.set-profile-proxy-keep { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

.set-skill-draft-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 20px; }

/* Scripts locais nos padrões dos agentes */
#set-local-scripts {
  display: grid;
  gap: 4px;
}
#set-local-scripts .set-desc { margin: 0; }
.scripts-options { flex-wrap: wrap; }
.scripts-options .set-copy { flex: 1 1 150px; min-width: 0; }
.scripts-options .hb-input { width: 100%; min-width: 0; }
.scripts-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scripts-action { align-self: flex-end; }
.scripts-actions { align-self: flex-end; }
#set-local-scripts .set-choice { width: 128px; }
#set-local-scripts .scripts-quota-up > .set-popover-card { top: auto; bottom: calc(100% + 4px); }

.hb.app .set-prov-found .prov-detect-hide { width: 24px; height: 24px; padding: 0; color: var(--provider-muted); }
.hb.app .set-prov-found [data-do="set-agent-show-hidden"] { margin-inline-start: -8px; }
.hb.app .set-prov-found .prov-acp-scan { margin-inline-end: -8px; }
.hb.app .set-prov-own .set-prov-own-actions { gap: 8px; }
.hb.app .set-page[data-page="providers"] .set-prov-own-actions .hb-btn {
  height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px;
  gap: 6px; background: transparent; font-size: 14px; line-height: 20px; font-weight: 500;
}
.hb.app .set-page[data-page="providers"] .set-prov-own-actions .prov-danger { color: var(--provider-muted) !important; }
.hb.app .set-page[data-page="providers"] .set-prov-own-actions .prov-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--red) 12%, transparent) !important; color: var(--red) !important;
}

.hb.app .set-page[data-page="providers"] .set-prov-own-actions .hb-btn[data-do="set-agent-edit"] {
  background: transparent !important; color: var(--provider-muted) !important;
}
.hb.app .set-page[data-page="providers"] .set-prov-own-actions .hb-btn[data-do="set-agent-edit"]:hover:not(:disabled) {
  background: var(--hb-hover) !important; color: var(--text) !important;
}

/* Métodos locais e avisos da importação do Hermes. */
.hb.app .set-page[data-page='import'] .app-imp-guide-choices {
  display: grid;
  width: min(520px, 100%);
  gap: 12px;
}
.hb.app .set-page[data-page='import'] .app-imp-guide-bar,
.hb.app .set-page[data-page='import'] .app-imp-servers > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hb.app .set-page[data-page='import'] .app-imp-guide-bar .seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 8px;
  background: var(--surface-2);
}
.hb.app .set-page[data-page='import'] .app-imp-guide-bar .seg button {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--import-description);
  font-size: 13px;
  cursor: pointer;
}
.hb.app .set-page[data-page='import'] .app-imp-guide-bar .seg button[aria-selected='true'] {
  background: var(--hb-raised);
  color: var(--text);
}
.hb.app .set-page[data-page='import'] .app-imp-guide-bar .seg button:disabled {
  cursor: default;
}
.hb.app .set-page[data-page='import'] .app-imp-guide-note {
  margin: 8px 0 0;
  color: var(--import-description);
  font-size: 13px;
  line-height: 1.45;
}
.hb.app .set-page[data-page='import'] .app-imp-guide[aria-busy='true'] #imp-zip {
  cursor: progress;
}
.hb.app .set-page[data-page='import'] .app-imp-guide #imp-zip:disabled strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-imp-live {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.hb.app .set-page[data-page='import'] .app-imp-message > svg {
  margin-top: 1px;
}
.hb.app .set-page[data-page='import'] .app-imp-message ul {
  padding: 0;
  list-style: none;
}
.hb.app .set-page[data-page='import'] .app-imp-result .app-imp-failed {
  justify-content: flex-start;
  min-height: 52px;
  padding: 12px 16px;
}
.hb.app .set-page[data-page='import'] .app-imp-failed .app-imp-oi {
  color: var(--hb-warn-text);
}
.hb.app .set-page[data-page='import'] .app-imp-servers .app-imp-row {
  min-height: 52px;
  padding: 8px 16px;
}

.hb.app .set-page[data-page='import'] .app-imp-opt:hover:disabled {
  border-color: var(--hb-grouped-line); background: var(--surface-2);
}

.set-sound-option { position: relative; min-width: 0; }
.hb.app .set-page .set-sound-option .set-choice-option {
  width: 100%; min-height: 36px; padding: 6px 32px 6px 40px; font-size: 13px; line-height: 18px;
}
.hb.app .set-sound-option .set-sound-play {
  position: absolute; inset-inline-start: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; padding: 0; border-radius: 8px; color: var(--sound-preview-ink);
}
.hb.app .set-sound-option .set-sound-play[data-playing] { color: var(--text); background: var(--hb-hover); }
.set-sound-option .set-choice-option > svg { position: absolute; inset-inline-end: 8px; }
.set-page[data-page="notifications"] { --sound-preview-ink: rgba(255, 255, 255, .59); }
[data-theme="light"] .set-page[data-page="notifications"] { --sound-preview-ink: rgba(20, 20, 20, .6); }

/* O editor usa ícones próprios para Telegram e mantém a mesma grade no quadro e no painel. */
.hb.app {
  --wf-tg-plane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 4 9 21 8 13 3 8Z M8 13 21 4'/%3E%3C/svg%3E");
  --wf-tg-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m13 2-9 12h7l-1 8 10-12h-7z'/%3E%3C/svg%3E");
  --wf-tg-reply: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 8-4 4 4 4M5 12h9a5 5 0 0 1 5 5v1'/%3E%3C/svg%3E");
  --wf-tg-post: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10h5l9-5v14l-9-5H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2zm2 4 2 5'/%3E%3C/svg%3E");
  --wf-tg-react: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12h8m-4-4v8'/%3E%3C/svg%3E");
  --wf-tg-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.hb.app .app-wf-telegram-choice .ps-b { position: relative; border-radius: 10px; font-size: 14px; text-align: start; }
.hb.app .app-wf-telegram-choice .ps-b > svg { width: 12px; height: 12px; opacity: 0; }
.app-wf-telegram-choice .ps-b::after {
  position: absolute;
  inset-inline-end: 8px;
  top: calc(50% - 6px);
  width: 12px;
  height: 12px;
  background: var(--wf-card-muted, var(--text-3));
  mask: var(--wf-tg-down) center / contain no-repeat;
  content: "";
  opacity: 0;
  pointer-events: none;
}
.app-wf-telegram-choice .ps-b:is(:hover, :focus-visible, [aria-expanded="true"]):not(:disabled)::after { opacity: 1; }
.hb.app .app-wf-telegram-choice .ps-v,
#app.hb.app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-l {
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.hb.app .app-wf-telegram-choice .ps-v {
  display: flex;
  max-width: none;
  color: var(--wf-card-ink, var(--text));
  font-size: 14px;
  font-weight: 500;
}
.app-wf-telegram-choice[data-tg-head] {
  margin-block-end: 2px;
  border-bottom: 1px solid var(--wf-card-ring);
  padding-block-end: 4px;
}
.hb.app .app-wf-telegram-choice[data-tg-head] .ps-b {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 40px;
}
.app-wf-telegram-choice[data-tg-head] .ps-n { display: none; }
.hb.app .app-wf-telegram-choice[data-tg-head] .ps-v {
  --wf-tg-head-tone: var(--wf-card-muted);
  position: relative;
  font-weight: 600;
}
.hb.app [data-tg-choice="trigger"][data-tg-head] .ps-v { --wf-tg-head-tone: var(--amber); }
[data-tg-head] .ps-v::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 24px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--wf-tg-head-tone) 16%, transparent);
  content: "";
}

.hb.app :is(.app-wf-telegram-source, .app-wf-telegram-filter) {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 12px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  border-top: 0;
  border-radius: 10px;
  color: var(--wf-card-muted, var(--text-2));
  font-size: 14px;
  line-height: 18px;
}
.hb.app .app-wf-output-row.app-wf-telegram-choice:not([data-tg-head]) { border-top: 0; }
.app-wf-telegram-source > span:last-child {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--wf-card-ink, var(--text));
  font-weight: 500;
}
.app-wf-telegram-source svg { flex: none; color: var(--wf-card-muted, var(--text-2)); }
.app-wf-telegram-source > span:last-child span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb.app .app-wf-output-row.app-wf-telegram-filter .wf-inline {
  grid-column: 2 / -1;
  height: auto;
  line-height: 18px;
  font-weight: 500;
}

[data-tg-choice] .ps-native:has(option:checked) + .ps-b .ps-v::before,
#app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-l::before {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: none;
  place-items: center;
  color: var(--wf-card-muted, var(--text-2));
  content: var(--wf-tg-emoji, "");
  background: var(--wf-tg-ink, currentColor);
  mask: var(--wf-tg-icon, none) center / 14px 14px no-repeat;
}
[data-tg-choice="event"], #app:has([data-tg-choice="event"] .ps-b[aria-expanded="true"]) #ps-pop {
  --wf-tg-emoji: "@";
  --wf-tg-ink: transparent;
}
[data-tg-choice="chatRowId"], [data-tg-head] .ps-v,
#app:has([data-tg-choice="chatRowId"] .ps-b[aria-expanded="true"]) #ps-pop .ps-o,
#app:has([data-tg-head] .ps-b[aria-expanded="true"]) #ps-pop [data-v="telegram"] { --wf-tg-icon: var(--wf-tg-plane); }
[data-tg-origin]:has(option[value=""]:checked),
#app:has([data-tg-origin] .ps-b[aria-expanded="true"]) #ps-pop [data-v=""] {
  --wf-tg-icon: var(--wf-tg-bolt);
}
[data-tg-choice="action"]:has(option[value="reply"]:checked),
#app:has([data-tg-choice="action"] .ps-b[aria-expanded="true"]) #ps-pop [data-v="reply"] { --wf-tg-icon: var(--wf-tg-reply); }
[data-tg-choice="action"]:has(option[value="post"]:checked),
#app:has([data-tg-choice="action"] .ps-b[aria-expanded="true"]) #ps-pop [data-v="post"] { --wf-tg-icon: var(--wf-tg-post); }
[data-tg-choice="action"]:has(option[value="react"]:checked),
#app:has([data-tg-choice="action"] .ps-b[aria-expanded="true"]) #ps-pop [data-v="react"] { --wf-tg-icon: var(--wf-tg-react); }
[data-tg-choice="emoji"], #app:has([data-tg-choice="emoji"] .ps-b[aria-expanded="true"]) #ps-pop { --wf-tg-ink: transparent; }
[data-tg-choice="emoji"]:has(option[value="👍"]:checked), #ps-pop [data-v="👍"] { --wf-tg-emoji: "👍"; }
[data-tg-choice="emoji"]:has(option[value="👀"]:checked), #ps-pop [data-v="👀"] { --wf-tg-emoji: "👀"; }
[data-tg-choice="emoji"]:has(option[value="🎉"]:checked), #ps-pop [data-v="🎉"] { --wf-tg-emoji: "🎉"; }
[data-tg-choice="emoji"]:has(option[value="👌"]:checked), #ps-pop [data-v="👌"] { --wf-tg-emoji: "👌"; }
.hb.app [data-tg-head] .ps-native:has(option:checked) + .ps-b .ps-v::before {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  color: var(--wf-tg-head-tone);
}
#app:has([data-tg-head] .ps-b[aria-expanded="true"]) #ps-pop .ps-o:not([data-v="telegram"]) .ps-l::before { display: none; }

#app.hb.app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop {
  gap: 0;
  padding: 6px;
  border-radius: 16px;
}
#app.hb.app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-o {
  min-height: 40px;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
  font-size: 14px;
}
#app.hb.app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-o[aria-selected="true"] { background: var(--hb-hover); }
#app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-l { position: relative; gap: 8px; }
#app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-l::before {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
}
#app:has([data-tg-choice] .ps-b[aria-expanded="true"]) #ps-pop .ps-l::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 32px;
  border-radius: 6px;
  background: var(--hb-hover);
  content: "";
}
#app:has([data-tg-head] .ps-b[aria-expanded="true"]) #ps-pop .ps-o:not([data-v="telegram"]) .ps-l::after { display: none; }

.hb.app .set-page[data-page="providers"] .hb-btn.prov-runtime-action {
  height: 32px; padding: 0 12px; gap: 6px; border: 1px solid var(--divider); border-radius: 8px;
  background: var(--hb-raised) !important; font-size: 14px; line-height: 20px; font-weight: 500;
}
.hb.app .set-page[data-page="providers"] .prov-runtime-action:hover:not(:disabled) { background: var(--hb-hover) !important; }

.hb.app .set-page[data-page="providers"] .set-row:has(> .set-actions > .prov-runtime-action) {
  min-height: 48px; padding: 10px 16px;
}

/* Edição de ambiente de agentes ACP. */
#set-own .set-own-env-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 36px;
}
#set-own .set-own-env-fields > input {
  height: 36px;
  padding-inline: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  outline: 0;
}
#set-own .set-own-env-fields > input::placeholder {
  color: var(--text-3);
}
#set-own .set-own-env-fields > input:focus-visible {
  border-color: var(--text-3);
}
#set-own .set-own-env-sensitive {
  height: 36px;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}
#set-own .set-own-env-sensitive .toggle {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 14px;
  padding: 0;
  border-radius: 7px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
#set-own .set-own-env-sensitive .toggle::after {
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  background: var(--text);
}
#set-own .set-own-env-sensitive .toggle:checked {
  background: var(--set-button, var(--hb-stop-btn-bg));
}
#set-own .set-own-env-sensitive .toggle:checked::after {
  transform: translateX(10px);
  background: var(--surface-2);
}
#set-own .set-own-env-remove {
  width: 36px;
  height: 36px;
  color: var(--text-2);
}
#set-own .set-own-env-remove:hover:not(:disabled) {
  background: var(--hb-hover);
  color: var(--text);
}
#set-own .set-own-env-add {
  gap: 6px;
}
@media (max-width: 430px) {
  #set-own .set-own-env-sensitive span {
    display: none;
  }
}

/* Todos os arquivos em Armazenamento usa os controles da lista sem modo compacto. */
.set-page[data-storage-files] .set-storage-file-search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.set-storage-file-search > span {
  position: absolute;
  inset-inline-start: 8px;
  top: 50%;
  display: flex;
  color: var(--text-3);
  pointer-events: none;
  transform: translateY(-50%);
}
#set-storage-file-search {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding-inline-start: 28px;
}
#set-storage-file-sort-b { width: 120px; }

#set-storage-file-menu {
  inset: auto;
  width: max-content;
  margin: 0;
  border: 0;
  border-radius: 14px;
}
.hb.app #set-storage-file-menu .app-menu-i {
  gap: 8px;
  font-size: 15px;
  line-height: 22px;
}
#set-storage-file-menu .app-menu-i > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.set-page[data-page='providers'] .set-prov-found .set-sec-h {
  min-height: 24px;
  align-items: center;
  gap: 8px;
}
.set-prov-found[aria-busy='true'] .set-sec-h {
  justify-content: flex-start;
}
.prov-scan-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--provider-muted);
  font-size: 13px;
  line-height: 18px;
}
@media (prefers-reduced-motion: no-preference) {
  .prov-scan-progress > svg { animation: app-ctx-spin 900ms linear infinite; }
}

/* Amostras e campos do seletor de cor de Aparência. */
.hb.app .set-personal-page .set-color-trigger {
  border-color: var(--border-strong);
  color: var(--text);
  font-size: 13px;
}
.hb.app .set-personal-page .set-color-trigger:is(:hover, [aria-expanded=true]) {
  background: var(--hb-hover);
}
.hb.app .set-color-trigger > i {
  border: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent);
}
.set-color-trigger[aria-expanded=true] > i {
  outline: 1px solid color-mix(in srgb, var(--text) 40%, transparent);
  outline-offset: 2px;
}
.hb.app .set-appearance-color-pop {
  --set-color-edge: color-mix(in srgb, var(--text) 11%, transparent);
  box-shadow: 0 0 0 1px var(--set-color-edge);
}
.hb.app .set-appearance-color-pop .set-color-value {
  grid-template-columns: 48px minmax(0, 1fr);
}
.hb.app .set-appearance-color-pop .set-color-value[data-hex-format] {
  grid-template-columns: 48px minmax(0, 1fr) 36px;
}
.set-color-field {
  position: relative;
  min-width: 0;
}
.set-color-field > span {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  color: var(--text-3);
  font-size: 13px;
  pointer-events: none;
  translate: 0 -50%;
}
.set-color-field[data-hex-field] > span { font-size: 15px; }
.hb.app .set-appearance-color-pop :is(.set-color-sample, .set-color-format, .set-color-field input) {
  border-color: var(--set-color-edge);
}
.hb.app .set-appearance-color-pop :is(.set-color-sample, .set-color-format, .set-color-field input):focus-visible {
  border-color: color-mix(in srgb, var(--text) 20%, transparent);
}
.hb.app .set-appearance-color-pop :is(#set-color-hex, #set-background-hex),
.hb.app .set-appearance-color-pop .set-color-field input {
  padding-inline: 24px 8px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: start;
}
.hb.app .set-appearance-color-pop .set-color-field input::placeholder {
  color: var(--text-3);
  text-transform: none;
}
.hb.app .set-appearance-color-pop .set-color-channels { gap: 6px; }
.hb.app .set-appearance-color-pop :is(.set-color-preview, .set-tint-row button.set-tint > i) {
  border: 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
}
.hb.app .set-color-trigger > .set-tint-none,
.hb.app .set-appearance-color-pop .set-color-preview.set-tint-none,
.hb.app .set-appearance-color-pop .set-tint-row button.set-tint > .set-tint-none {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 11%, transparent);
}
.hb.app :is(.set-color-trigger, .set-appearance-color-pop) .set-tint-none::after {
  inset: 50% auto auto 50%;
  width: 150%;
  height: 2px;
  background: var(--text-3);
  transform: translate(-50%, -50%) rotate(-45deg);
}
.hb.app .set-appearance-color-pop button.set-tint:is(:hover, [aria-pressed=true]) {
  background: transparent;
  box-shadow: none;
}
.hb.app .set-appearance-color-pop .set-color-area {
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
}
.hb.app .set-appearance-color-pop .set-color-area:focus-visible { outline: 0; }
.hb.app .set-appearance-color-pop .set-color-area:focus-visible > i {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.set-appearance-color-pop .set-color-area > i,
.set-appearance-color-pop .set-color-hue input::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px rgb(0 0 0 / 12%);
}

/* A lente é só visual. O ponteiro continua capturado pelo controle que recebeu o arraste. */
.set-appearance-color-pop .set-color-hue { position: relative; }
.set-color-hue-lens {
  position: absolute;
  inset: 0 9px;
  pointer-events: none;
}
.set-color-lens {
  position: absolute;
  z-index: 1;
  display: none;
  width: 40px;
  height: 40px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 7px;
  background: var(--color-draft);
  box-shadow: 0 1px 4px rgb(0 0 0 / 20%);
  pointer-events: none;
  rotate: calc(-45deg + var(--set-lens-tilt, 0deg));
  translate: -50% 0;
}
.set-color-area > .set-color-lens {
  left: var(--color-s);
  top: calc(var(--color-v) - 61px);
}
.set-color-hue-lens > .set-color-lens {
  left: var(--set-hue-position);
  top: calc(50% - 61px);
  background: hsl(var(--color-hue) 100% 50%);
}
.hb.app .set-appearance-color-pop .set-tint-row { position: relative; }
.set-color-selection-ring {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid color-mix(in srgb, var(--text) 70%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.hb.app .set-appearance-color-pop .set-tint-row button.set-tint[aria-pressed=true]:not(:focus-visible) {
  outline: none;
}
.hb.app .set-appearance-color-pop .set-tint-row button.set-tint:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .set-color-area[data-dragging] > .set-color-lens,
  .set-color-hue[data-dragging] .set-color-lens {
    display: block;
    animation: set-color-lens-show 140ms ease-out both;
    transition: rotate 160ms ease-out;
  }
  .set-color-area[data-dragging] > i { transform: translate(-50%, -50%) scale(.8); }
  .set-color-selection-ring { transition: left 180ms ease-out, top 180ms ease-out; }
}
@keyframes set-color-lens-show {
  from { opacity: 0; transform: scale(.84); }
}

/* Primeiro uso, passo do computador (só no app do Mac). Medidas do passo da referência (onboarding.css e
   computer-use.css da 0.79): ilustração de até 400 (320 no celular) a 20 do título; bloco de 520 a 16; cabeçalho
   14/20 e 13/18; cartão de canto 8 com linhas de 58, respiro 8 12 e ícone de 30 (canto 8) no fundo suave do acento;
   botões a 16 do bloco. O desenho é nosso: uma mesa neutra, a janela e um bot felpudo que a arrasta. */
.fu-cp-visual {
  position: relative;
  width: min(100%, 400px);
  margin-top: 20px;
}
.fu-cp-visual svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.fu-cp-desk {
  fill: var(--surface-2);
  stroke: var(--hb-grouped-line);
}
.fu-cp-shadow {
  fill: var(--text);
  opacity: 0.08;
}
.fu-cp-body {
  fill: var(--surface);
  stroke: var(--hb-grouped-line);
}
.fu-cp-bar {
  fill: var(--surface-3);
}
.fu-cp-dot:nth-of-type(1) {
  fill: var(--red);
}
.fu-cp-dot:nth-of-type(2) {
  fill: var(--amber);
}
.fu-cp-dot:nth-of-type(3) {
  fill: var(--green);
}
.fu-cp-pane {
  fill: var(--accent-soft);
}
.fu-cp-line {
  fill: var(--surface-3);
}
.fu-cp-strong {
  fill: var(--text-4);
  opacity: 0.45;
}
.fu-cp-cursor {
  fill: var(--text);
  stroke: var(--surface);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transform: translate(196px, 58px);
}
.fu-cp-bot {
  position: absolute;
  left: 52%;
  top: 22%;
  width: 40px;
  height: 40px;
}
.fu-cp-window,
.fu-cp-cursor,
.fu-cp-bot {
  animation: fu-cp-drag 4.6s ease-in-out infinite;
}
.fu-cp-cursor {
  animation-name: fu-cp-cursor;
}
@keyframes fu-cp-drag {
  0%, 18% { transform: translate(0, 0); }
  50%, 68% { transform: translate(-36px, 18px); }
  100% { transform: translate(0, 0); }
}
@keyframes fu-cp-cursor {
  0%, 18% { transform: translate(196px, 58px); }
  50%, 68% { transform: translate(160px, 76px); }
  100% { transform: translate(196px, 58px); }
}
@media (prefers-reduced-motion: reduce) {
  .fu-cp-window,
  .fu-cp-cursor,
  .fu-cp-bot {
    animation: none;
  }
}
:root[data-motion='reduce'] .fu-cp-window,
:root[data-motion='reduce'] .fu-cp-cursor,
:root[data-motion='reduce'] .fu-cp-bot {
  animation: none;
}
.fu-cp {
  width: min(100%, 520px);
  margin-top: 16px;
  text-align: left;
}
.fu-cp-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 8px;
}
.fu-cp-h h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.fu-cp-h p {
  margin: 2px 0 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb.app .fu-cp-h > .hb-btn {
  flex: none;
  gap: 6px;
}
.fu-cp-card {
  overflow: hidden;
  border: 1px solid var(--hb-grouped-line);
  border-radius: 8px;
  background: var(--surface-2);
}
.fu-cp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 12px;
}
.fu-cp-row + .fu-cp-row {
  border-top: 1px solid var(--hb-grouped-line);
}
.fu-cp-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.fu-cp-acts {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.fu-cp-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}
.fu-cp-sk-i {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.fu-cp-sk-t {
  width: 40%;
  height: 12px;
}
.fu-cp-sk-d {
  width: 70%;
  height: 10px;
  margin-top: 4px;
}
.fu[data-step='computer'] .fu-acts {
  margin-top: 16px;
}
@media (max-width: 620px) {
  .fu-cp-visual {
    width: min(100%, 320px);
    margin-top: 16px;
  }
  .fu-cp-h {
    flex-direction: column;
  }
  .fu-cp-row {
    flex-wrap: wrap;
  }
  .fu-cp-row .fu-row-t {
    flex-basis: calc(100% - 42px);
  }
  .fu-cp-acts {
    justify-content: flex-end;
    width: 100%;
  }
}

/* Cache de miniaturas e programas de provedores no gráfico de Armazenamento. */
.set-space-chart [data-space=cache] { --space-ink: var(--text-2); }
.set-space-chart [data-space=programs] { --space-ink: var(--text-4); }
.set-space-chart:has([data-space=cache]:hover) [data-space]:not([data-space=cache]),
.set-space-chart:has([data-space=programs]:hover) [data-space]:not([data-space=programs]) { opacity: .35; }

/* Atualização obrigatória (mustupdate.js): tela cheia por cima do app, com a forma da tela de erro da leitura inicial.
   Medidas do app de referência (update-required.css, 26/11/2026): progresso a 30 do botão, vão de 10, texto de 14 e
   linha de 3 px; aviso a 24 do botão; link e "continuar" de 28 de altura, centrados, a 12 do de cima. */
.hb.mu {
  position: fixed;
  inset: 0;
  z-index: 1200;
  border: 0;
  border-radius: 0;
}
.hb.mu .ent {
  height: 100%;
}
.hb.mu .ent-go {
  width: 100%;
  height: auto;
  min-height: 44px;
  margin-top: 30px;
  gap: 8px;
  border-radius: 8px;
}
.mu-card {
  display: flex;
  flex-direction: column;
}
/* O cartão só recebe o foco pelo código, quando não há botão principal: não é um controle, não leva contorno. */
.mu-card:focus,
.mu-card:focus-visible {
  outline: none;
  box-shadow: none;
}
.mu-note,
.mu-err {
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 18px;
}
.mu-err {
  color: var(--text);
  text-wrap: balance;
}
.mu-err svg {
  display: inline-block;
  margin-inline-end: 6px;
  color: var(--red);
  vertical-align: -2px;
}
.mu-note + .ent-go,
.mu-err + .ent-go {
  margin-top: 14px;
}
.mu-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 30px;
}
.mu-progress-l {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 18px;
}
.mu-progress-v {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mu-track {
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-strong);
}
.mu-fill {
  width: var(--mu-pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  transition: width 200ms ease-out;
}
.hb.mu .hb-btn.mu-more {
  align-self: center;
  margin-top: 12px;
  background: none !important;
  color: var(--text-3) !important;
  font-weight: 500;
}
.hb.mu .hb-btn.mu-more:hover {
  background: var(--hb-hover) !important;
  color: var(--text) !important;
}
@media (prefers-reduced-motion: reduce) {
  .mu-fill {
    transition: none;
  }
}

/* Pasta largada sobre a lista de pastas (só com o app do Mac contando os caminhos). Como lá (`agent-folders.css`): a zona
   da página Pastas envolve o título e o grupo, sem canto, e o grupo continua opaco por cima do fundo; a linha Pastas da
   ficha acende inteira. Os dois textos ocupam o mesmo lugar e só um aparece, então nada muda de tamanho. */
.fd-val-drop,
.fd-i-drop,
.fd-l-drop {
  display: none;
}
.fd-entry[data-dragging][data-phrase] .fd-val,
.fd-zone[data-dragging] .fd-i-plus,
.fd-zone[data-dragging] .fd-l {
  display: none;
}
.fd-entry[data-dragging][data-phrase] .fd-val-drop {
  display: inline;
}
.fd-zone[data-dragging] .fd-i-drop {
  display: inline-grid;
}
.fd-zone[data-dragging] .fd-l-drop {
  display: inline;
}
.fd-zone {
  display: grid;
  gap: 6px;
}
.fd-zone > .hb-sub {
  padding: 0;
  margin-left: 4px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.fd-entry[data-fd-zone],
.fd-zone {
  outline: 1px dashed transparent;
  outline-offset: -1px;
  transition: outline-color 120ms cubic-bezier(0.23, 1, 0.32, 1), background-color 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.fd-entry[data-dragging],
.fd-zone[data-dragging] {
  outline-color: var(--text-3);
  background-color: var(--hb-hover);
}
.fd-zone[data-dragging] button.hb-lrow.fd-add {
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  .fd-entry[data-fd-zone],
  .fd-zone {
    transition: none;
  }
}

/* A moldura de soltar da conversa com as duas metades (anexar e pasta): fundo a 70%, letra 15/600 e entrada com esmaecer,
   como `.agent-folders-chat-drop` e `.agent-folders-chat-zone` da referência. */
.hb-drop.hb-drop-2 {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  place-items: stretch;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 15px;
  font-weight: 600;
  animation: hb-drop-fade 120ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes hb-drop-fade {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb-drop.hb-drop-2 {
    animation: none;
  }
}
.hb-drop-half {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border: 1px dashed var(--text-3);
  border-radius: 12px;
  text-align: center;
  text-wrap: balance;
  transition: border-color 120ms cubic-bezier(0.23, 1, 0.32, 1), background-color 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.hb-drop-half > span:last-child {
  max-width: 28ch;
}
.hb-drop-i {
  display: grid;
  color: var(--text-2);
}
.hb-drop-folder {
  pointer-events: auto;
}
.hb-drop-folder[data-dragging] {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--text));
  background: var(--hb-hover);
}
.hb-drop-folder[data-dragging] .hb-drop-i {
  color: var(--text);
}
@media (max-width: 520px) {
  .hb-drop.hb-drop-2 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

.hb.app .app-store-nav > .hb-logo { flex: none; }

.set-profile-color .set-profile-options .set-profile-dot { display: block; flex: none; width: 8px; height: 8px; }
.set-proxy-catalog-symbol { display: grid; place-items: center; height: 32px; width: 32px; }
.hb.app .set-page .set-profile-options button[data-do=set-proxy-catalog-delete] { color: var(--red, #e8483f) !important; }

.set-page #set-site-memory { width: 36px; height: 20px; }
.set-page #set-site-memory::after { width: 16px; height: 16px; }
.set-page #set-site-memory:checked::after { transform: translateX(16px); }

.set-profile-options > .set-proxy-flyout { top: 36px; inset-inline-end: calc(100% + 4px); max-height: min(360px, 50vh); overflow: auto; }
.set-proxy-flyout[hidden] { display: none; }
@media (max-width: 700px) { .set-profile-options > .set-proxy-flyout { inset-inline-end: 0; top: 0; } }

.hb.app dialog.store-app-key { width: min(460px, calc(100vw - 32px)); padding: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; }
.store-app-key form, .store-app-key label { display: grid; gap: 8px; }
.store-app-key label { margin-top: 8px; }
.store-app-key h2, .store-app-key p { margin: 0; }
.store-app-key .hb-foot { margin-top: 12px; }

.ph-copy > .ph-via { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--text-3); }
.ph-via > svg { width: 12px; height: 12px; flex: none; }

/* Menu "+": o ícone de gravar fica em vermelho. */
.hb.app button.app-menu-i.app-menu-rec svg {
  color: var(--hb-danger);
}

/* o cartão da rotina que o bot marcou ou mudou (routinecard.js): contêiner de 1 de borda, raio 14 e respiro 16; cabeçalho de 32
   com o ícone redondo, rótulo 13/18 e nome 15/22; embaixo 14/20 apagado. Largura até 520, no mínimo 320 (medidas do código da 0.79) */
.rc-row {
  margin: 12px 0;
}
.rc-card {
  box-sizing: border-box;
  display: grid;
  width: fit-content;
  min-width: min(100%, 320px);
  max-width: min(100%, 520px);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--hb-card-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}
.rc-h {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.rc-ic {
  display: inline-flex;
  flex: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
}
.rc-hd {
  display: grid;
  min-width: 0;
  flex: 1;
}
.rc-eyebrow {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.rc-title {
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-open {
  display: inline-flex;
  flex: none;
  height: 24px;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.rc-open:hover {
  background: var(--hb-hover);
  color: var(--text);
}
.rc-card .rt-when.rc-when {
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}
.rc-card .rt-when .hb-input,
.rc-card .rt-when .ps-b,
.rc-card .rt-when .cp-b {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 14px;
}
.rc-card .rt-word {
  color: var(--text-3);
  font-size: 15px;
  line-height: 22px;
}
.rc-card .rt-wd {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.rc-card .rt-wd[aria-pressed='true'] {
  background: var(--text);
  color: var(--surface);
}
.rc-hint {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.rc-f {
  display: flex;
  min-height: 20px;
  align-items: center;
  color: var(--text-3);
  font-size: 14px;
  line-height: 20px;
}
.rc-f-empty {
  min-height: 0;
  margin-top: -12px;
}
.rc-st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rc-err {
  color: var(--hb-danger-text);
}
.rc-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.rc-line-open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* Cartão de confirmação do bot (ferramenta confirm_with_person): base do .app-ask, botões do app e as classes cfc-*. */
.cfc-draft,
.cfc-edit {
  box-sizing: border-box;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--hb-raised);
  font: inherit;
  font-size: 14px;
  line-height: 22px;
}
.cfc-draft {
  max-height: 16em;
  overflow: auto;
  color: var(--text-2);
}
.cfc-draft p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cfc-draft[data-open='true'] {
  max-height: none;
}
.cfc-draft[data-fade] {
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black calc(100% - 2.5em), transparent);
}
.cfc-edit {
  min-height: 8lh;
  color: var(--text);
  resize: vertical;
}
.cfc-more {
  align-self: flex-start;
  margin-top: -6px;
  padding: 0;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: underline;
}
.cfc-more[hidden] {
  display: none;
}
.cfc-confirm {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.cfc-confirm legend {
  color: var(--text);
  font: 500 14px/20px inherit;
  padding: 0 0 8px;
}
.cfc-note {
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  margin: 0;
}
.cfc-alert {
  box-shadow: inset 0 0 0 1px var(--hb-danger);
}
/* O botão de segurar: uma película da cor do texto abre da esquerda para a direita enquanto ele é segurado. */
.hb.app .hb-btn.cfc-hold {
  position: relative;
  isolation: isolate;
  touch-action: none;
  user-select: none;
}
.cfc-hold::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, currentColor 28%, transparent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 150ms ease-out;
  pointer-events: none;
}
.cfc-hold[data-pressing]::before {
  clip-path: inset(0);
  transition: clip-path var(--cfc-ms, 800ms) linear;
}
@media (prefers-reduced-motion: reduce) {
  .cfc-hold[data-pressing]::before {
    transition-duration: 1ms;
  }
}

/* o cartão de ajuste que o bot mostrou (settingcard.js): usa o contêiner, o ícone e os títulos do cartão da rotina (rc-*) e o botão de 32
   das fichas; aqui ficam só as diferenças. Três colunas (ícone, texto, botão) numa grade; 520 de largura, respiro de 12 em cima e
   embaixo, ícone quadrado de 36 com canto 8, nome 15/22 em 600 e caminho 14/20 numa linha só. Quando a linha tem menos de 394 de largura
   (a área útil do cartão fica abaixo de 360), o botão desce e ocupa a largura toda. Medidas do código da 0.79. */
.sc-row {
  container-type: inline-size;
}
.rc-card.sc-card {
  inline-size: min(100%, 520px);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding-block: 12px;
}
.rc-ic.sc-ic {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 8px;
  background: var(--hb-ctl-active);
  color: var(--text);
}
.rc-title.sc-title {
  font-weight: 600;
  letter-spacing: -0.1px;
}
.rc-eyebrow.sc-path {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.sc-path > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-chev {
  flex: none;
}
.hb.app .hb-btn.sc-open {
  margin-inline-start: 4px;
  padding-inline: 16px;
  border-radius: 999px;
}
@container (inline-size < 394px) {
  .hb.app .hb-btn.sc-open {
    grid-column: 1 / -1;
    margin-inline-start: 0;
  }
}

/* cartão de servidor de ferramentas (rodada N20): a lista de argumentos e o que o servidor era antes */
.app-ask-args {
  margin: 0;
  padding: 0 0 0 22px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
}
.app-ask-args li {
  overflow-wrap: anywhere;
}
.app-ask-was {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.app-ask-was h4 {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}

/* A régua de perguntas (trilho.js): um risco por fala da pessoa na borda direita da conversa, para ver onde se está e
   pular para uma pergunta. Medidas e cores conferidas no app de referência (scroll-rail.css): passo de 8 px, área de
   toque de 20 px, riscos de 4×2 px que se alargam perto do ponteiro, e um cartão de vidro ao lado com a pergunta. */
.hb-qrail {
  position: absolute;
  z-index: 3;
  width: 20px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.hb-qrail-track {
  max-height: min(64%, 600px);
  width: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  pointer-events: auto;
}
.hb-qrail-track::-webkit-scrollbar {
  display: none;
}
.hb-qrail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb-qrail-link {
  position: relative;
  display: block;
  width: 20px;
  height: 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hb-qrail-link:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: -2px;
  border-radius: 3px;
}
.hb-qrail-tick {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 4px;
  height: 2px;
  border-radius: 1px;
  background: color-mix(in oklab, var(--text) 18%, transparent);
}
.hb-qrail-item[data-state='read'] .hb-qrail-tick {
  background: color-mix(in oklab, var(--text) 36%, transparent);
}
.hb-qrail-item[data-state='active'] .hb-qrail-tick {
  width: 8px;
  background: var(--text-2);
}
.hb-qrail:hover .hb-qrail-tick,
.hb-qrail:focus-within .hb-qrail-tick {
  width: 8px;
}
.hb-qrail-item[data-near='2'] .hb-qrail-tick {
  width: 10px;
}
.hb-qrail-item[data-near='1'] .hb-qrail-tick,
.hb-qrail:hover .hb-qrail-item[data-state='active'] .hb-qrail-tick {
  width: 12px;
}
.hb-qrail .hb-qrail-item[data-open] .hb-qrail-tick {
  width: 16px;
  background: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .hb-qrail {
    opacity: 0;
  }
  .hb-qrail[data-near],
  .hb-qrail:focus-within {
    opacity: 1;
  }
}
.hb-qrail-card {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: min(300px, 60vw);
  padding: 12px;
  border: 1px solid color-mix(in oklab, var(--text) 8%, transparent);
  border-radius: 12px;
  background: var(--hb-pop);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  line-height: 18px;
  pointer-events: none;
  translate: 0 -50%;
  opacity: 0;
  visibility: hidden;
}
.hb-qrail-card[data-open] {
  opacity: 1;
  visibility: visible;
}
.hb-qrail-card-t {
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-qrail-card-r {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-3);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (prefers-reduced-motion: no-preference) {
  .hb-qrail {
    transition: opacity 160ms ease;
  }
  .hb-qrail-tick {
    transition: width 160ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 160ms ease;
  }
  .hb-qrail-card {
    filter: blur(4px);
    transform: translateX(4px);
    transition: opacity 160ms ease, filter 160ms ease, transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 160ms;
  }
  .hb-qrail-card[data-open] {
    filter: none;
    transform: none;
    transition: opacity 160ms ease, filter 160ms ease, transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
  }
}

/* O bot trabalhando antes da primeira palavra (botBody > activityHtml): boneco de 32, frase de 14/20 com um brilho que
   passa por cima e o tempo depois de 5 s. Medidas conferidas no app de referência (messages.css, agent-activity-*):
   vão de 8, respiro de 12 em cima e 8 embaixo, o boneco entra subindo e crescendo; o brilho e os tempos são nossos. */
/* Só o bot trabalhando, sem passos nem texto ainda: sem o balão em volta, como lá. */
.hb.app .hb-answer:has(> .hb-actw:only-child) {
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: none;
}
.hb-act {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 0 8px 8px;
}
.hb-act-face {
  display: inline-flex;
  flex: 0 0 auto;
}
.hb-act-t {
  position: relative;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.hb-act-shine {
  display: none;
}
.hb-act-time {
  flex: 0 0 auto;
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
}
.hb-act-time:empty {
  display: none;
}
/* Os passos da resposta que trabalha, debaixo da linha (medidas da referência: seta de 24 com ícone de 12, lista recuada
   24 e 8 de respiro embaixo). A seta gira ao abrir; a lista é a mesma dos passos da resposta pronta. */
.hb-actw {
  min-width: 0;
}
.hb-act-tg {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.hb-act-tg svg {
  transition: rotate 120ms ease-out;
}
.hb-act-tg[aria-expanded='true'] svg {
  rotate: 180deg;
}
@media (hover: hover) {
  .hb-act-tg:hover {
    background: var(--hb-ctl-hover);
  }
}
.hb-act-steps {
  padding: 0 0 8px 24px;
}
.hb-act-steps[hidden] {
  display: none;
}
.hb-act-steps .app-steps-l {
  padding: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hb-act {
    animation: hb-act-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .hb-act-face {
    transform-origin: 50% 100%;
    animation: hb-act-pop 420ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
  }
  /* O brilho: uma cópia da frase em cinza claro, vista por uma janela que corre da esquerda para a direita. */
  .hb-act-shine {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 55%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 55%, transparent 100%);
    -webkit-mask-size: 40% 100%;
    mask-size: 40% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    animation: hb-act-shine 2.4s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  }
  .hb-act-shine > span {
    color: var(--text-4);
  }
}
@keyframes hb-act-in {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(4px);
  }
}
@keyframes hb-act-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.5);
  }
}
@keyframes hb-act-shine {
  0%,
  15% {
    -webkit-mask-position: -70% 0;
    mask-position: -70% 0;
  }
  85%,
  100% {
    -webkit-mask-position: 170% 0;
    mask-position: 170% 0;
  }
}

/* A falha da última resposta, acima da caixa de escrever (paintTurnError). Como o aviso do app de referência
   (notices.css, composer-notice danger): 12 px para dentro das bordas da caixa, escondido 14 px atrás dela, fundo
   vermelho claro, ícone de 20 e o X na cor do aviso; o botão Tentar de novo é nosso. */
.hb-cerr-slot {
  flex: none;
  position: relative;
  z-index: 1;
  margin: 6px 28px -20px;
}
.hb-cerr-slot[hidden] {
  display: none;
}
.hb-cerr-slot + .hb-composer {
  position: relative;
  z-index: 2;
}
.hb-cerr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 20px 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
}
.hb-cerr-i {
  display: inline-flex;
  flex: none;
  color: var(--red);
}
.hb-cerr-i svg {
  width: 20px;
  height: 20px;
}
.hb-cerr-c {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.hb-cerr-h {
  color: var(--red);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.hb-cerr-t {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Detalhes: o código que o servidor gravou, escondido atrás de uma seta; o botão ao lado copia. */
.hb-cerr-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
}
.hb-cerr-more svg {
  flex: none;
  transition: rotate 120ms ease-out;
}
.hb-cerr-more[aria-expanded='true'] svg {
  rotate: 90deg;
}
.hb-cerr-d {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 2px;
}
.hb-cerr-d[hidden] {
  display: none;
}
.hb-cerr-d code {
  min-width: 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
  overflow-wrap: anywhere;
  user-select: text;
}
.hb-cerr-cp {
  display: inline-grid;
  flex: none;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
@media (hover: hover) {
  .hb-cerr-cp:hover {
    background: color-mix(in srgb, var(--red) 18%, transparent);
  }
}
.hb.app .hb-cerr button.hb-btn.hb-cerr-go {
  flex: none;
  border-color: transparent;
  background: color-mix(in srgb, var(--red) 14%, transparent) !important;
  color: var(--red) !important;
}
.hb-cerr-x {
  display: inline-grid;
  flex: none;
  align-self: flex-start;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--red);
  cursor: pointer;
}
@media (hover: hover) {
  .hb.app .hb-cerr button.hb-btn.hb-cerr-go:hover {
    background: color-mix(in srgb, var(--red) 24%, transparent) !important;
  }
  .hb-cerr-x:hover {
    background: color-mix(in srgb, var(--red) 18%, transparent);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hb-cerr {
    animation: hb-cerr-in 220ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}
@keyframes hb-cerr-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ------------------------------------------------------------------ subagentes (subagents.js)
   Medidas e cores lidas no código e nas telas de exemplo do app de referência (27/11/2026), nos dois temas: a linha
   do grupo 14/20 com a pastilha de progresso 13/18, a caixa das linhas com raio 14 e borda fina, cada linha com 8 de
   folga, título 14/20 em peso 500 e a linha de baixo 13/18 em cinza. O "trabalhando" é o hexágono da biblioteca. */
.hb-subs {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0;
}
.hb.app button.hb-sub-h {
  display: flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: auto;
  margin-inline-start: -6px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: start;
  cursor: pointer;
}
.hb.app button.hb-sub-h:hover,
.hb.app button.hb-sub-h:focus-visible {
  background: var(--hb-ctl-hover);
}
.hb-sub-h > svg {
  flex: none;
  color: var(--text-3);
  transition: rotate 120ms ease-out;
}
.hb-sub-h[aria-expanded='true'] > svg {
  rotate: 90deg;
}
.hb-sub-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-sub-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
}
.hb-sub-bad {
  color: var(--hb-danger-text);
}
.hb-sub-ring {
  flex: none;
}
.hb-sub-ring-t {
  stroke: var(--border);
}
.hb-sub-ring-i {
  stroke: var(--accent-ink);
  stroke-linecap: round;
  transition: stroke-dasharray 300ms ease-out;
}
.hb-sub-time {
  flex: none;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
}
.hb-sub-list {
  display: flex;
  width: 100%;
  flex-direction: column;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--surface);
  list-style: none;
}
.hb.app button.hb-sub-row {
  display: grid;
  width: 100%;
  height: auto;
  align-items: start;
  grid-template-columns: 14px minmax(0, 1fr) auto auto;
  gap: 2px 8px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: start;
  white-space: normal;
  cursor: pointer;
}
.hb.app button.hb-sub-row:hover {
  background: var(--hb-hover);
}
.hb.app button.hb-sub-row.on {
  background: var(--surface-2);
}
.hb.app button.hb-sub-row:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: -2px;
}
.hb-sub-row-t {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.hb-sub-row .hb-sub-time {
  line-height: 20px;
}
.hb-sub-row-c {
  flex: none;
  margin-top: 4px;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 120ms ease-out;
}
.hb-sub-row:hover .hb-sub-row-c,
.hb-sub-row:focus-visible .hb-sub-row-c,
.hb-sub-row.on .hb-sub-row-c {
  opacity: 1;
}
.hb-sub-live {
  display: contents;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb-sub-live-g {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  color: var(--text-3);
}
.hb-sub-live-t {
  display: -webkit-box;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.hb-sub-live[data-state='failed'] .hb-sub-live-t {
  color: var(--hb-danger-text);
}
.hb-sub-shine {
  position: relative;
}
.hb-sub-st {
  display: inline-flex;
  flex: none;
  width: 14px;
  height: 20px;
  align-items: center;
  justify-content: center;
}
.hb-sub-st[data-state='completed'] {
  color: var(--green);
}
.hb-sub-st[data-state='failed'] {
  color: var(--hb-danger);
}
.hb-sub-st[data-state='stopped'] {
  color: var(--text-3);
}

/* O painel de um subagente, na coluna da direita. */
.app-subagent {
  overflow: hidden;
}
.hb-sub-detail {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px;
}
.hb-sub-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hb-sub-head .hb-sub-st {
  height: 22px;
}
.hb-sub-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.hb-sub-meta {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hb-sub-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hb-sub-prompt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding-inline-start: 8px;
  border-inline-start: 2px solid var(--border-strong);
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hb-sub-prompt-l {
  color: var(--text-3);
  font-weight: 500;
}
.hb-sub-step-l {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb-sub-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.hb-sub-step-g {
  flex: none;
  margin-top: 3px;
  color: var(--text-3);
}
.hb-sub-step[data-kind='thinking'] .hb-sub-step-t {
  color: var(--text-3);
  font-style: italic;
}
.hb-sub-step[data-kind='text'] .hb-sub-step-t {
  color: var(--text);
}
.hb-sub-err {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--hb-danger-text);
  font-size: 13px;
  line-height: 18px;
}
.hb-sub-err > svg {
  flex: none;
  margin-top: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .hb-sub-h > svg,
  .hb-sub-row-c,
  .hb-sub-ring-i {
    transition: none;
  }
}

/* ------------------------------------------------------------------ outra aba (umaaba.js)
   A tela que aparece quando as telas já estão abertas em outra aba do navegador. Medidas da tela de conexão da
   versão web do app de referência (27/11/2026): cartão de até 420 px no meio, 24 entre o topo e o botão, título
   24/30 em negrito, texto 13/18 de até 340 px, ícone de 64 com 16 embaixo, botão de pelo menos 200. */
.hb-otab {
  display: grid;
  height: 100%;
  min-height: 100vh;
  place-items: center;
  overflow-y: auto;
  padding: 32px 16px;
  background: var(--surface);
  color: var(--text);
}
.hb-otab-c {
  display: flex;
  width: min(420px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.hb-otab-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  object-fit: contain;
}
.hb-otab h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
}
.hb-otab p {
  max-width: 340px;
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.hb-otab .hb-otab-go {
  min-width: 200px;
  margin-top: 16px;
}

/* Cartões do lugar da pessoa (ask_where_person_is) e da captura da tela (take_screenshot): só a nota; o resto é o .app-ask. */
.dvc-note {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
}
.dvc-done[data-outcome='ok'] .app-plan-o {
  color: var(--text-2);
}
.dvc-done[data-outcome='ok'] .app-plan-o svg {
  color: var(--green);
}

/* o fundo animado da janela (windowscene.js): uma camada atrás de todo o app. O quadro não recebe ponteiro, tecla nem foco. Com a
   cena na janela (`data-window-scene` na raiz), a moldura, a placa da lista e da conversa e o fundo da conversa ficam
   translúcidos, só com os tokens, para a cena aparecer por trás; o resto (menus, janelas, cartões) continua opaco para ler bem. */
.ws-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.ws-frame {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
}
:root[data-window-scene] :is(html, body),
:root[data-window-scene] .hb.app,
:root[data-window-scene] .hb.app .hb-win {
  background: transparent;
}
:root[data-window-scene] .hb.app .hb-win::before {
  background: color-mix(in srgb, var(--surface) 58%, transparent);
}
:root[data-window-scene] .hb.app #msgs {
  background: transparent;
  backdrop-filter: none;
}
.ws-card .rc-title.sc-title {
  white-space: normal;
  text-wrap: balance;
}

/* Ficha, Avançado: o botão de excluir o bot mede 36 de altura, como na referência (o resto dos cartões fica em 32). */
.hb.app .hb-btn.hb-sm.card-b32.card-b36 { height: 36px; }

/* Ajustes > Voz. Medidas do app de referência (conferidas em 27/11/2026): linhas de 48 de altura mínima, escolha de 168 de
   largura (220 na escolha do modelo), botões e escolhas de 32 de altura, interruptor de 36 × 20 e janela do servidor de 640.
   O interruptor ligado usa o verde da marca, como o resto do app. */
.set-page[data-page='voice'] .set-card { overflow: visible; }
.set-page[data-page='voice'] .set-actions .toggle,
.vs-dlg .vs-route-end .toggle { width: 36px; height: 20px; border-radius: 10px; }
.set-page[data-page='voice'] .set-actions .toggle::after,
.vs-dlg .vs-route-end .toggle::after { width: 16px; height: 16px; }
.set-page[data-page='voice'] .set-actions .toggle:checked::after,
.vs-dlg .vs-route-end .toggle:checked::after { transform: translateX(16px); }
.vs-loading { display: flex; align-items: center; gap: 8px; }
.vs-model-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.vs-model-pick .set-choice { width: 220px; }
.hb.app .hb-btn.vs-btn { color: var(--text) !important; background: transparent !important; box-shadow: inset 0 0 0 1px var(--border); }
.hb.app .hb-btn.vs-btn:hover:not(:disabled) { background: var(--hb-hover) !important; }
.vs-file { display: grid; gap: 6px; }
.vs-file-err { color: var(--red) !important; }
.vs-file progress { display: block; appearance: none; width: 100%; max-width: 280px; height: 4px; border: 0; border-radius: 4px; color: var(--text-2); background: var(--surface-3); }
.vs-file progress::-webkit-progress-bar { border-radius: inherit; background: var(--surface-3); }
.vs-file progress::-webkit-progress-value { border-radius: inherit; background: currentColor; }
.vs-file progress::-moz-progress-bar { border-radius: inherit; background: currentColor; }
.set-copy > .vs-note { color: var(--text-3); }
.set-choice-group { display: block; padding: 6px 8px 4px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.vs-flag { display: inline-block; margin-inline-end: 6px; }
.vs .hb-btn svg, .vs .hb-btn .hc-loader { flex: none; }
.vs .app-err { margin: 0 0 12px; }
.vs-dlg { width: min(640px, calc(100vw - 32px)) !important; }
.vs-routes { display: grid; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.vs-route {
  position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 2fr) auto; gap: 8px 12px;
  align-items: center; padding: 12px 16px;
}
.vs-route + .vs-route::before { content: ''; position: absolute; top: 0; right: 16px; left: 16px; height: 1px; background: var(--divider); }
.vs-route-name { display: grid; grid-column: 1; min-width: 0; }
.vs-route-name strong { color: var(--text); font-size: 14px; font-weight: 500; line-height: 20px; }
.vs-route-name span { color: var(--text-3); font-size: 13px; line-height: 18px; }
.vs-route-model { grid-column: 2; min-width: 0; }
.vs-route-wide { grid-column: 2 / 4; }
.vs-route-voice { grid-column: 3; min-width: 0; }
.vs-route-end { display: flex; grid-column: 4; justify-content: flex-end; }
.vs-select { height: 32px; font-size: 13px; padding: 0 8px; }
@media (max-width: 680px) {
  .vs-model-actions { flex-wrap: wrap; }
  .vs-model-pick .set-choice { width: 168px; }
  .set-page[data-page='voice'] .set-row:has(.vs-model-actions) { flex-wrap: wrap; }
  .set-page[data-page='voice'] .set-row:has(.vs-model-actions) .set-actions { flex: 1 1 100%; margin-left: 0; }
  .vs-route { grid-template-columns: minmax(0, 1fr) auto; }
  .vs-route-name { grid-column: 1; }
  .vs-route-end { grid-column: 2; grid-row: 1; }
  .vs-route-model, .vs-route-wide, .vs-route-voice { grid-column: 1 / -1; }
}
.vs { display: grid; gap: 24px; min-width: 0; }
.set-personal-page .vs .set-copy > span { overflow: visible; text-overflow: clip; white-space: normal; }

/* Esperas abertas: a razão vira botão quando leva à resposta em que o bot pediu a espera. */
.hb.app .app-w-go { display: block; max-width: 100%; appearance: none; background: none; border: 0; padding: 0; text-align: start; cursor: pointer; font: inherit; color: inherit; }
.hb.app .app-w-go:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Consentimento de uso do primeiro uso. Medidas do app de referência (conferido em 27/11/2026, onboarding.css:863-955):
   linha dentro do grupo com borda em cima, respiro 12 16, 8 entre a caixa e o texto, título 14/500 e apoio 13/18;
   a frase de Termos e Privacidade a 16 abaixo do grupo, centrada, 13/18, links sublinhados a 2 do texto. */
.hb.app label.fu-improve {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
}
.fu-improve .fu-row-t {
  gap: 2px;
}
.fu-notice {
  width: min(100%, 440px);
  margin: 16px 0 0;
  color: var(--text-3);
  text-align: center;
  font-size: 13px;
  line-height: 18px;
}
.hb.app .fu-notice button.fu-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.hb.app .fu-notice button.fu-link:hover {
  color: var(--text);
}
.fu-share-err {
  width: min(100%, 440px);
  margin: 12px 0 0;
  text-align: left;
}

/* As páginas de termos e privacidade: uma caixa de 560 com corpo que rola e o aviso de rascunho no alto. */
.hb.lg-host {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  border-radius: 0;
  background: none;
}
.hb-scrim.lg-scrim {
  box-sizing: border-box;
  align-items: start;
  padding: min(12vh, 100px) 16px 16px;
}
.hb-dlg.lg-dlg {
  width: min(560px, 100%);
  max-height: 100%;
  box-sizing: border-box;
  gap: 0;
  padding: 8px;
  border-radius: 14px;
  overflow: hidden;
}
.lg-h {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 4px 4px 12px;
}
.hb-dlg.lg-dlg .lg-h h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.lg-b {
  min-height: 0;
  overflow-y: auto;
  padding: 4px 12px 12px;
}
.hb-dlg.lg-dlg .lg-draft {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.lg-b h3 {
  margin: 16px 0 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.hb-dlg.lg-dlg .lg-b p:not(.lg-draft) {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 21px;
}

/* Guia do Hermes, aba da habilidade: três passos numerados com a linha entre eles e o cartão do arquivo, nas medidas do
   guia da referência (marca 24, coluna de 24 + 16, 24 entre passos, cartão com borda de grupo e raio 8). */
.hb.app .app-imp-steps {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hb.app .app-imp-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 16px;
  padding-bottom: 24px;
}
.hb.app .app-imp-step:last-child {
  padding-bottom: 0;
}
.hb.app .app-imp-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 4px;
  left: 11.5px;
  width: 1px;
  background: var(--hb-line);
}
.hb.app .app-imp-step-n {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hb-line-2, var(--hb-line));
  border-radius: 999px;
  color: var(--hb-muted);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hb.app .app-imp-step-b {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-top: 2px;
}
.hb.app .app-imp-step-t {
  margin: 0;
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 500;
}
.hb.app .app-imp-step-b .app-imp-guide-note {
  margin: 0;
}
.hb.app .app-imp-skill {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--hb-line);
  border-radius: 8px;
  background: var(--hb-card);
}
.hb.app .app-imp-skill .hb-opt-t {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 19px;
}
.hb.app .app-imp-skill .mono {
  color: var(--hb-muted);
  font-size: 12.5px;
}
.hb.app .app-imp-skill-x {
  display: flex;
  flex: none;
  gap: 4px;
}
.hb.app .app-imp-skill-msg .hb-opt-t span {
  color: var(--hb-text);
}
@media (max-width: 640px) {
  .hb.app .app-imp-skill {
    flex-wrap: wrap;
  }
  .hb.app .app-imp-skill-x {
    width: 100%;
    justify-content: flex-end;
  }
}
.hb.app .app-imp-skill .mono {
  white-space: nowrap;
}

/* Contas do provedor (Ajustes > Provedores > Claude Code e Codex) e a conta fixada na ficha do bot: provideraccounts.js */
.pa-sec {
  display: grid;
  gap: 8px;
}
.pa-row {
  flex-wrap: wrap;
  row-gap: 8px;
}
.pa-row .set-copy {
  flex: 1 1 220px;
}
.pa-row .set-copy > strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.pa-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pa-acts {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.pa-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.set-page[data-page='providers'] .pa-row .set-copy > span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.set-page[data-page='providers'] .pa-row .set-copy > span.pa-state[data-tone='ok'] {
  color: var(--green);
}
.set-page[data-page='providers'] .pa-row .set-copy > span.pa-state[data-tone='warn'] {
  color: var(--hb-warn-text);
}
.set-page[data-page='providers'] .pa-row .set-copy > span.pa-state[data-tone='bad'] {
  color: var(--red);
}
.pa-state .hc-loader {
  flex: none;
}
.pa-trash {
  color: var(--red);
}
.pa-edit {
  align-items: flex-end;
}
.pa-field {
  display: grid;
  flex: 1 1 220px;
  gap: 6px;
  min-width: 0;
}
.pa-field > span {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.pa-field .hb-input {
  width: 100%;
  height: 32px;
}
.pa-form {
  margin-top: 0;
}
.pa-err {
  margin: 0;
}
.pa-card[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .pa-acts {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* Catálogo público de agentes ACP (Ajustes > Provedores). */
.set-prov-catalog .set-sec > .set-note,
.set-prov-catalog .set-sec > .set-find {
  margin: 0 0 8px;
}
.set-prov-catalog .set-find {
  display: flex;
}
.set-prov-catalog .set-row {
  flex-wrap: wrap;
}
.set-prov-catalog .set-copy {
  flex: 1 1 200px;
  min-width: 0;
}
.set-prov-catalog .set-copy > span {
  overflow-wrap: anywhere;
}
.set-prov-catalog .set-actions {
  flex-wrap: wrap;
  min-width: 0;
  margin-inline-start: auto;
  align-items: center;
}
.set-prov-catalog > .set-sec > .app-err {
  margin: 8px 0 0;
}
.set-prov-catalog .set-row {
  min-height: 52px;
}
.set-prov-catalog .set-find {
  width: 100%;
  max-width: none;
}
.set-prov-catalog .set-find input {
  width: 100%;
}

/* ---------------------------------------------------------------- o rastro de uma resposta (trace.js)
   Pastilha na fileira de ações e janela com a cascata dos passos. Medidas conferidas no app de referência
   (27/11/2026): linha de 36, barra de 16, coluna de nomes de até 260, janela de até 1040 por 680. */
.hb.app .app-acts button.app-act-trace {
  width: auto;
  padding: 0 6px;
  gap: 8px;
  white-space: nowrap;
}
.hb.app .app-acts button.app-act-trace span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}
.hb.app .app-acts button.app-act-trace svg {
  width: 12px;
  height: 12px;
}
.hb.app .app-acts button.app-act-trace .app-act-f {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.hb.app .app-acts button.app-act-trace .app-act-d {
  font-variant-numeric: tabular-nums;
}
.hb.tr-host {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.hb-scrim.tr-scrim {
  box-sizing: border-box;
  padding: 24px 16px;
}
.hb-dlg.tr-dlg {
  width: min(1040px, 100%);
  max-height: min(680px, 100%);
  min-height: 0;
  gap: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  --tr-surface: var(--hb-canvas);
}
.tr-h {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--hb-line);
}
.hb-dlg.tr-dlg .tr-h h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.tr-find {
  position: relative;
  flex: 0 1 240px;
  min-width: 0;
}
.tr-find-i {
  position: absolute;
  top: 50%;
  left: 8px;
  display: flex;
  color: var(--text-3);
  translate: 0 -50%;
  pointer-events: none;
}
.tr-find input {
  width: 100%;
  height: 28px;
  padding: 0 52px 0 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: 0;
}
.tr-find input::placeholder {
  color: var(--text-3);
}
.tr-find input:focus-visible {
  border-color: var(--text-3);
}
.tr-find input::-webkit-search-cancel-button {
  display: none;
}
.tr-find kbd {
  position: absolute;
  top: 50%;
  right: 6px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-3);
  font: inherit;
  font-size: 11px;
  line-height: 16px;
  translate: 0 -50%;
  pointer-events: none;
}
.tr-tot {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  margin: 0 -1px 0 0;
}
.tr-t {
  display: grid;
  flex: 1 1 96px;
  gap: 2px;
  min-width: 0;
  padding: 8px 12px;
  border-right: 1px solid var(--hb-line);
  border-bottom: 1px solid var(--hb-line);
}
.tr-t dt {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-t dd {
  margin: 0;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 24px;
}
.tr-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  container-type: inline-size;
  overscroll-behavior: contain;
}
.tr-grid {
  --tr-name: min(260px, 45cqw);
  --tr-room: min(150px, 25cqw);
  --tr-pad: 12px;
  --tr-h: 36px;
  --tr-bar: 16px;
  --tr-hue: var(--text-3);
  --tr-scale: calc(100% - var(--tr-pad) - var(--tr-room));
  position: relative;
  z-index: 0;
  min-width: 520px;
  font-size: 13px;
  line-height: 18px;
}
.tr-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tr-row {
  --tr-tint: transparent;
  display: grid;
  height: var(--tr-h);
  grid-template-columns: var(--tr-name) minmax(0, 1fr);
  border-bottom: 1px solid var(--hb-line);
}
.tr-row[data-pick]:hover,
.tr-row[data-parent]:hover,
.tr-row:has(.tr-nb:focus-visible) {
  --tr-tint: var(--hb-hover);
}
.tr-axis {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--tr-surface);
}
.tr-row[data-parent] {
  position: sticky;
  top: var(--tr-h);
  z-index: 4;
  background: var(--tr-surface);
}
.tr-name {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding-inline: 8px;
  border-right: 1px solid var(--hb-line);
  background: linear-gradient(var(--tr-tint), var(--tr-tint)), var(--tr-surface);
}
.tr-kids .tr-name {
  padding-inline-start: 24px;
}
.tr-axis-n {
  color: var(--text-3);
}
.tr-tg,
.tr-tg-gap {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
}
.tr-tg {
  border-radius: 6px;
  color: var(--text-3);
}
.tr-tg:hover {
  background: var(--hb-ctl-hover);
}
.tr-tg svg {
  transition: rotate 120ms ease-out;
}
.tr-tg[aria-expanded='false'] svg {
  rotate: -90deg;
}
.tr-nb {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  cursor: default;
}
.tr-row[data-pick] .tr-nb,
.tr-row[data-parent] .tr-nb {
  cursor: pointer;
}
.tr-nb:focus-visible {
  outline: 1px solid var(--text-3);
  outline-offset: 1px;
}
.tr-glyph {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border: 1px solid var(--hb-line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 4%, var(--tr-surface));
  color: var(--text-2);
}
.tr-glyph[data-failed] {
  color: var(--red);
}
.tr-glyph.tr-face {
  border: 0;
  background: none;
}
.tr-n {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-row[data-parent] .tr-n {
  font-weight: 600;
}
.tr-row[data-failed] .tr-n {
  color: var(--red);
}
.tr-det {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-nb .hc-loader {
  flex: none;
}
.tr-lane {
  position: relative;
  z-index: 1;
  min-width: 0;
  background: var(--tr-tint);
}
.tr-over {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--tr-name);
  pointer-events: none;
}
.tr-tick,
.tr-gl,
.tr-now,
.tr-dot,
.tr-bar,
.tr-lab {
  position: absolute;
  left: calc(var(--tr-pad) + var(--tr-scale) * var(--at));
}
.tr-tick {
  top: 50%;
  padding-left: 4px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  translate: 0 -50%;
  white-space: nowrap;
}
.tr-gl,
.tr-now {
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hb-line);
}
.tr-now {
  z-index: 2;
  background: var(--text-4);
}
.tr-dot {
  bottom: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  translate: -3px 50%;
}
.tr-bar {
  top: 50%;
  display: grid;
  width: max(3px, calc(var(--tr-scale) * var(--w)));
  height: var(--tr-bar);
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  translate: 0 -50%;
}
.tr-bar[data-kind='model'],
.tr-sw[data-kind='model'] {
  background-color: var(--tr-hue);
}
.tr-bar[data-kind='tool'],
.tr-sw[data-kind='tool'] {
  background-color: color-mix(in srgb, var(--tr-hue) 45%, var(--tr-surface));
}
.tr-bar[data-kind='waiting'],
.tr-sw[data-kind='waiting'] {
  border: 1px solid color-mix(in srgb, var(--tr-hue) 60%, transparent);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--tr-hue) 60%, transparent) 0 1px, transparent 1px 5px);
}
.tr-bar[data-failed],
.tr-sw[data-failed] {
  border: 0;
  background: var(--hb-danger);
  color: var(--hb-badge-fg);
}
.tr-bar.tr-track {
  background: color-mix(in srgb, var(--tr-hue) 16%, transparent);
}
.tr-bar[data-running]:not([data-kind='waiting']) {
  background-image: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--text) 35%, transparent) 50%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 50% 100%;
  animation: tr-shine 1.6s linear infinite;
}
@keyframes tr-shine {
  from {
    background-position: -100% 0;
  }
  to {
    background-position: 200% 0;
  }
}
.tr-lab {
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  translate: 0 -50%;
  white-space: nowrap;
}
.tr-slow {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hb-warn-soft);
  color: var(--hb-warn-text);
  font-size: 12px;
  line-height: 18px;
}
.tr-err-row {
  position: sticky;
  left: 0;
  width: 100cqw;
  padding: 6px 8px 6px 56px;
  border-bottom: 1px solid var(--hb-line);
  background: var(--tr-surface);
}
.tr-err {
  max-height: 160px;
  margin: 0;
  padding: 6px 8px;
  overflow: auto;
  border: 1px solid var(--hb-line);
  border-radius: 4px;
  background: var(--hb-card);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.tr-none {
  position: sticky;
  left: 0;
  display: grid;
  gap: 4px;
  width: 100cqw;
  padding: 32px 16px;
  text-align: center;
}
.tr-none p {
  margin: 0;
}
.tr-none .hc-loader {
  justify-self: center;
}
.tr-none p + p {
  color: var(--text-3);
}
.tr-f {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 8px 8px 16px;
  border-top: 1px solid var(--hb-line);
}
.tr-play {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tr-play .hb-ic:disabled {
  opacity: 0.5;
  cursor: default;
}
.tr-play .tr-play-b {
  border-radius: 50%;
  border: 1px solid var(--hb-line);
}
.tr-speed {
  height: 28px;
  margin-inline-start: 4px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hb-field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.tr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  color: var(--text-3);
  font-size: 13px;
  list-style: none;
}
.tr-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tr-sw {
  --tr-hue: var(--text-3);
  --tr-surface: var(--hb-canvas);
  width: 16px;
  height: 8px;
  flex: none;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .tr-tg svg {
    transition: none;
  }
  .tr-bar[data-running] {
    animation: none;
  }
}
@media (max-width: 760px) {
  .hb-scrim.tr-scrim {
    padding: 12px 8px;
  }
  .tr-find {
    flex-basis: 160px;
  }
  .tr-find kbd {
    display: none;
  }
  .tr-find input {
    padding-right: 8px;
  }
}
/* Provedores por chave prontos: a escolha dos modelos na janela de chave. */
.cp-pk-box { display: flex; flex-direction: column; max-height: 260px; min-height: 0; overflow: hidden; padding: 4px; border: 1px solid var(--divider); border-radius: 8px; }
.cp-pk-box .cp-menu-l { min-height: 64px; }
.cp-row .cp-acts { flex-wrap: wrap; justify-content: flex-end; }
#custom-providers { display: grid; gap: 24px; min-width: 0; }
#custom-providers:empty { display: none; }

/* Alertas de carga do computador (machinealerts.js): um cartão no pé da coluna da esquerda, sobre os estilos .alert. */
.mc-wrap { flex: none; display: flex; flex-direction: column; gap: 8px; }
.mc-wrap[hidden] { display: none; }
.mc-card { position: relative; align-items: center; gap: 12px; padding: 12px; }
.mc-ring { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--mc-c) calc(var(--pct) * 1%), var(--surface-3) 0); position: relative; }
.mc-ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.mc-ring > span { position: relative; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.mc-card.warn { --mc-c: var(--amber); }
.mc-card.danger { --mc-c: var(--red); }
.mc-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mc-text p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 18px; }
.mc-text .mc-open { margin-top: 4px; }
.mc-x { position: absolute; top: 6px; right: 6px; }
.mc-card.warn .mc-text, .mc-card.danger .mc-text { padding-right: 16px; }
/* Tela de modo seguro (safemode.js), sobre .ent. */
.sm-screen .sm-next, .sm-screen .sm-reason { margin-top: 16px; }
.sm-screen .sm-err { margin-top: 16px; text-align: left; }
