:root {
  --fundo: #0e0c12;
  --camada: #17141e;
  --camada-2: #211d2b;
  --linha: #2e2939;
  --texto: #f4f0f8;
  --mudo: #a39bb3;
  --destaque: #ff4d6d;
  --destaque-fundo: #ff4d6d1f;
  --ok: #3ccf8e;
  --erro: #ff6b6b;
  --aviso: #f5b942;
  --raio: 14px;
  --titulo: ui-serif, "Iowan Old Style", Georgia, serif;
  --interface: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font: 15px/1.45 var(--interface); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* Casca */
.casca { display: flex; flex-direction: column; min-height: 100dvh; }
.topo {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; min-height: 56px;
  padding: 8px 16px; background: color-mix(in srgb, var(--fundo) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linha);
}
.topo h1 { flex: 1; min-width: 0; font: 600 20px/1.2 var(--titulo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marca { display: inline-flex; align-items: center; gap: 8px; }
.marca::before { content: ""; width: 22px; height: 22px; border-radius: 6px; background: var(--destaque) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M8 6v10l8-5z' fill='%23fff'/%3E%3C/svg%3E"); flex-shrink: 0; }
.conteudo { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 16px 16px 96px; }
.abas-base {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--camada) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--linha);
}
.abas-base a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; color: var(--mudo);
  font-size: 12px; text-decoration: none; min-width: 0;
}
.abas-base a[aria-current="page"] { color: var(--destaque); }
.abas-base svg { width: 22px; height: 22px; }

@media (min-width: 900px) {
  .casca { padding-left: 88px; }
  .abas-base { top: 0; right: auto; bottom: 0; width: 88px; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 16px 0; border-top: 0; border-right: 1px solid var(--linha); }
  .abas-base a { flex: 0 0 auto; padding: 10px 4px; }
  .conteudo { padding-bottom: 48px; }
}

/* Texto e ícones */
.mudo { color: var(--mudo); }
.pequeno { font-size: 13px; }
.titulo { font: 600 18px/1.25 var(--titulo); }
.ico { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--linha);
  border-radius: 12px; background: var(--camada-2); font-weight: 600; text-decoration: none; white-space: nowrap;
}
a.botao { color: var(--texto); }
.botao:hover { border-color: #463f57; }
.botao.principal { background: var(--destaque); border-color: var(--destaque); color: #1a0710; }
.botao.principal:hover { filter: brightness(1.08); }
.botao.fantasma { background: transparent; border-color: transparent; color: var(--mudo); }
.botao.perigo { color: var(--erro); }
.botao.icone { width: 44px; padding: 0; }
.botao.bloco { width: 100%; }
.botao:disabled { opacity: .5; cursor: default; filter: none; }
.botao:focus-visible, a:focus-visible, .chip:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }

/* Campos: o foco muda só a própria borda */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > span { font-size: 13px; color: var(--mudo); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; background: var(--camada); border: 1px solid var(--linha); border-radius: 12px; outline: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--destaque); box-shadow: inset 0 0 0 1px var(--destaque); outline: none; }
input::placeholder, textarea::placeholder { color: #6f6880; }
input[type="file"] { display: none; }

/* Chips e abas */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--linha); border-radius: 999px;
  background: var(--camada); color: var(--mudo); font-size: 14px;
}
.chip[aria-pressed="true"], .chip.ativo { border-color: var(--destaque); background: var(--destaque-fundo); color: var(--texto); }
.abas { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--camada); border: 1px solid var(--linha); border-radius: 14px; overflow-x: auto; }
.abas { scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas button { flex: 1 0 auto; min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--mudo); font-weight: 600; font-size: 14px; white-space: nowrap; }
.abas button[aria-selected="true"] { background: var(--camada-2); color: var(--texto); }

/* Cartões e grades */
.grade { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grade.larga { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grade.larga { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cartao { display: block; min-width: 0; background: var(--camada); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; color: inherit; text-decoration: none; }
a.cartao:hover, button.cartao:hover { border-color: #463f57; }
button.cartao { padding: 0; text-align: left; width: 100%; }
.capa { display: block; width: 100%; aspect-ratio: 3 / 4; background: linear-gradient(160deg, var(--cor-a, #3a2146), var(--cor-b, #14101b)); object-fit: cover; position: relative; }
.capa-letra { display: flex; align-items: center; justify-content: center; font: 600 56px/1 var(--titulo); color: #ffffffcc; }
.cartao-corpo { padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cartao-corpo b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Linhas */
.lista { display: flex; flex-direction: column; gap: 8px; }
.linha {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; background: var(--camada); border: 1px solid var(--linha);
  border-radius: var(--raio); color: inherit; text-decoration: none; min-width: 0;
}
a.linha:hover { border-color: #463f57; }
.linha .texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.linha .texto b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.numero {
  width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--camada-2); font: 600 17px/1 var(--titulo);
}
.avatar { width: 40px; height: 40px; flex-shrink: 0; display: block; border-radius: 50%; object-fit: cover; background: linear-gradient(160deg, var(--cor-a, #3a2146), var(--cor-b, #14101b)); }
.avatar.letra { display: flex; align-items: center; justify-content: center; font: 600 17px/1 var(--titulo); color: #fffc; }

/* Etiquetas */
.etiqueta { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--camada-2); color: var(--mudo); font-size: 12px; font-weight: 600; white-space: nowrap; }
.etiqueta.destaque { background: var(--destaque-fundo); color: var(--destaque); }
.etiqueta.ok { background: #3ccf8e1f; color: var(--ok); }
.etiqueta.aviso { background: #f5b9421f; color: var(--aviso); }
.etiqueta.erro { background: #ff6b6b1f; color: var(--erro); }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulsa 1.4s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .ponto { animation: none; } }

/* Etapas do episódio */
.etapas { display: flex; gap: 6px; margin: 4px 0 16px; }
.etapas li { flex: 1; min-width: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--mudo); }
.etapas ol { display: contents; }
.etapas li::before { content: ""; height: 4px; border-radius: 4px; background: var(--linha); }
.etapas li.feita::before { background: var(--destaque); opacity: .55; }
.etapas li.atual { color: var(--texto); font-weight: 600; }
.etapas li.atual::before { background: var(--destaque); }
.etapas li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cabeçalho de tela */
.cabeca { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cabeca .texto { flex: 1; min-width: 0; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.barra-fixa { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

/* Vazio */
.vazio { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 16px; text-align: center; color: var(--mudo); border: 1px dashed var(--linha); border-radius: var(--raio); }

/* Plano */
.plano { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--camada); border: 1px solid var(--linha); border-radius: var(--raio); min-width: 0; }
.plano-topo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.plano-topo .texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plano p { overflow-wrap: anywhere; }
.fala { padding-left: 12px; border-left: 2px solid var(--destaque); color: var(--texto); }
.clipe { display: block; width: 120px; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; object-fit: cover; }
.versoes { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.versao { flex: 0 0 120px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; min-width: 0; }
.versao.usada .clipe { outline: 2px solid var(--destaque); outline-offset: 2px; }
.versao span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Vídeo final */
.player { display: block; width: min(100%, 360px); aspect-ratio: 9 / 16; margin: 0 auto 16px; background: #000; border-radius: var(--raio); }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 50dvh; }
.mensagens { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bolha { max-width: min(560px, 88%); padding: 10px 14px; border-radius: 16px; background: var(--camada-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.bolha.dono { align-self: flex-end; background: var(--destaque); color: #1a0710; border-bottom-right-radius: 4px; }
.bolha.claude { align-self: flex-start; border-bottom-left-radius: 4px; }
.bolha.erro { align-self: flex-start; background: #ff6b6b1f; color: var(--erro); }
.bolha-acoes { align-self: flex-start; margin-top: -4px; }
.escrevendo { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--camada-2); }
.escrevendo i { width: 6px; height: 6px; border-radius: 50%; background: var(--mudo); animation: pulsa 1.2s ease-in-out infinite; }
.escrevendo i:nth-child(2) { animation-delay: .2s; }
.escrevendo i:nth-child(3) { animation-delay: .4s; }
.entrada-chat { position: sticky; bottom: 72px; display: flex; gap: 8px; align-items: flex-end; padding: 8px 0; background: var(--fundo); }
.entrada-chat textarea { min-height: 44px; height: 44px; max-height: 140px; resize: none; }
@media (min-width: 900px) { .entrada-chat { bottom: 0; } }
.bolha.digitando::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--destaque); animation: pulsa 1s ease-in-out infinite; }
.escrevendo { align-items: center; }
.escrevendo span { margin-left: 6px; }
.msg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* Vídeo mandado para análise */
.video-anexo { align-self: flex-end; display: block; width: 160px; aspect-ratio: 9 / 16; background: #000; border-radius: 12px; }
.link-anexo {
  align-self: flex-end; max-width: min(560px, 88%); min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 16px; border-bottom-right-radius: 4px; background: var(--destaque); color: #1a0710; text-decoration: none;
}
.link-anexo span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analise { align-self: flex-end; width: min(100%, 420px); }
.analise summary { margin-left: auto; }
.novela-da-conversa { margin-bottom: 12px; text-decoration: none; }

/* Criar: tela inicial com o chat do especialista */
.inicio { width: 100%; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }
.inicio-logo {
  width: 72px; height: 72px; margin: 8px auto 4px; flex-shrink: 0; border-radius: 22px;
  background: var(--destaque) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M8 6v10l8-5z' fill='%23fff'/%3E%3C/svg%3E") center / 44px no-repeat;
  box-shadow: 0 0 0 12px #ff4d6d12, 0 0 64px 8px #ff4d6d4d;
}
.inicio-titulo { font: 600 26px/1.2 var(--titulo); text-align: center; text-wrap: balance; }

/* Entrar: só no painel que está no ar */
.entrar { width: 100%; max-width: 360px; margin: 0 auto; padding: 16vh 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.entrar-aviso { color: var(--erro); text-align: center; font-size: 14px; }
@media (min-width: 900px) { .inicio { padding-top: 10vh; } .inicio-titulo { font-size: 30px; } }
.rolar { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
.rolar::-webkit-scrollbar { display: none; }
.rolar .chip { flex-shrink: 0; }
@media (min-width: 712px) { .rolar { flex-wrap: wrap; justify-content: center; margin: 0; padding: 2px 0; } }
.sugestoes { justify-content: center; }
.secao-titulo { margin: 12px 0 8px; font: 600 13px/1.2 var(--interface); color: var(--mudo); }
.selo { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--destaque-fundo); color: var(--destaque); }
.selo.erro { background: #ff6b6b1f; color: var(--erro); }

/* Caixa de mensagem: uma borda só, que muda de cor no foco */
.compositor { display: flex; align-items: flex-end; gap: 8px; min-width: 0; padding: 6px 6px 6px 16px; background: var(--camada); border: 1px solid var(--linha); border-radius: 24px; }
.compositor:focus-within { border-color: var(--destaque); box-shadow: inset 0 0 0 1px var(--destaque); }
.compositor textarea { flex: 1; min-width: 0; min-height: 40px; height: 40px; max-height: 160px; padding: 9px 0; border: 0; border-radius: 0; background: transparent; resize: none; }
.compositor textarea:focus { border-color: transparent; box-shadow: none; }
.compositor .botao { width: 40px; min-height: 40px; height: 40px; border-radius: 50%; }
.compositor .botao:not(.principal):not(.gravando) { border-color: transparent; background: transparent; color: var(--mudo); }
.compositor .botao.gravando { background: var(--erro); border-color: var(--erro); color: #fff; animation: pulsa 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .compositor .botao.gravando, .bolha.digitando::after { animation: none; } }
.compositor.com-clipe { flex-wrap: wrap; padding-left: 6px; }
.anexo { flex-basis: 100%; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 12px; border-radius: 18px; background: var(--camada-2); color: var(--mudo); }
.anexo-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texto); }
.anexo .mudo { flex-shrink: 0; }
.compositor .anexo .botao { width: 32px; min-height: 32px; height: 32px; }
.compositor-fixo { position: sticky; bottom: 72px; padding: 12px 0; background: linear-gradient(transparent, var(--fundo) 24px); }
@media (min-width: 900px) { .compositor-fixo { bottom: 0; } }

/* Cartão do vídeo pedido no chat */
.cartao-video { align-self: flex-start; width: min(100%, 420px); display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--camada); border: 1px solid var(--linha); border-radius: var(--raio); }
.cartao-video-topo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cartao-video-topo .texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cartao-video-topo .texto b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cartao-video-topo .texto span { overflow-wrap: anywhere; }
.cartao-video-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.progresso { height: 6px; border-radius: 6px; background: var(--camada-2); overflow: hidden; }
.progresso i { display: block; height: 100%; border-radius: inherit; background: var(--destaque); transition: width .6s ease; }
.video-pronto { display: block; width: 100%; max-width: 260px; aspect-ratio: 9 / 16; background: #000; border-radius: 12px; }
.audio-pronto { display: block; width: 100%; height: 44px; }

/* Resposta do especialista, no estilo da Domma: marca e etiquetas, cartão com o texto em blocos, botões de ação rápida */
.resposta { align-self: stretch; }
.resposta-topo { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.resposta-marca {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px;
  background: var(--destaque) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M8 6v10l8-5z' fill='%23fff'/%3E%3C/svg%3E") center / 22px;
}
.passo {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--destaque-fundo); border: 1px solid color-mix(in srgb, var(--destaque) 22%, transparent); color: var(--destaque);
}
.passo .ponto { width: 6px; height: 6px; }
.cartao-resposta {
  min-width: 0; padding: 12px 16px; border-radius: 4px 14px 14px 14px; overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--texto) 3.5%, transparent); border: 1px solid color-mix(in srgb, var(--texto) 7%, transparent);
  font-size: 14.5px; line-height: 1.6;
}
.cartao-resposta > * { margin: 0 0 10px; }
.cartao-resposta > :last-child { margin-bottom: 0; }
.cartao-resposta h3, .cartao-resposta h4 { margin: 16px 0 6px; font-weight: 700; line-height: 1.25; }
.cartao-resposta h3 { font-size: 15px; color: var(--destaque); }
.cartao-resposta h4 { font-size: 15.5px; }
.cartao-resposta > :first-child { margin-top: 0; }
.cartao-resposta ul, .cartao-resposta ol { display: grid; gap: 4px; padding-left: 22px; }
.cartao-resposta li::marker { color: var(--destaque); }
.cartao-resposta blockquote { padding: 2px 0 2px 12px; border-left: 2px solid color-mix(in srgb, var(--destaque) 40%, transparent); color: var(--mudo); }
.cartao-resposta hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--texto) 10%, transparent); margin: 14px 0; }
.cartao-resposta i { color: color-mix(in srgb, var(--texto) 82%, var(--mudo)); }
.cartao-resposta.digitando > :last-child::after {
  content: ""; display: inline-block; width: 6px; height: 1.05em; margin-left: 3px; vertical-align: -2px; border-radius: 1px;
  background: var(--destaque); animation: pulsa 1s steps(2, start) infinite;
}
/* Cenas e ideias dentro da resposta */
.cenas, .ideia { border: 1px solid color-mix(in srgb, var(--texto) 8%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--texto) 2.5%, transparent); }
.cenas-topo { padding: 8px 12px; font-size: 12px; font-weight: 600; color: var(--mudo); border-bottom: 1px solid color-mix(in srgb, var(--texto) 8%, transparent); }
.cena { display: flex; gap: 10px; padding: 10px 12px; }
.cena + .cena { border-top: 1px solid color-mix(in srgb, var(--texto) 6%, transparent); }
.cena-n {
  width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--destaque-fundo); color: var(--destaque); font-size: 12px; font-weight: 700;
}
.cena-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cena-corpo p { margin: 0; }
.fala-cena { font-style: italic; }
.ideias { display: flex; flex-direction: column; gap: 8px; }
.ideia { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.ideia p { margin: 0; color: color-mix(in srgb, var(--texto) 85%, var(--mudo)); }
.ideia-topo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.ideia-topo b { font-size: 15px; line-height: 1.3; }
.ideia-n { font-size: 12px; font-weight: 700; color: var(--destaque); }
.ideia-topo .etiqueta { height: 22px; }
.ideia-botao { align-self: flex-start; min-height: 36px; padding: 0 14px; font-size: 14px; }
.acoes-rapidas { display: flex; flex-wrap: wrap; gap: 6px; }
.acao-rapida {
  min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--destaque); text-align: left;
  background: var(--destaque-fundo); border: 1px solid color-mix(in srgb, var(--destaque) 35%, transparent);
  transition: background .12s, border-color .12s, transform .12s;
}
.acao-rapida:hover { background: color-mix(in srgb, var(--destaque) 18%, transparent); border-color: color-mix(in srgb, var(--destaque) 60%, transparent); }
.acao-rapida:active { transform: scale(.97); }
.acao-rapida:focus-visible, .botao-copiar:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }
.resposta-pe { display: flex; gap: 8px; }
.botao-copiar {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: transparent; border: 1px solid color-mix(in srgb, var(--texto) 10%, transparent); color: var(--mudo);
}
.botao-copiar .ico { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .cartao-resposta.digitando > :last-child::after { animation: none; } .acao-rapida { transition: none; } }
.roteiro-pedido summary { width: fit-content; cursor: pointer; color: var(--mudo); font-size: 14px; }
.roteiro-pedido pre {
  max-height: 320px; margin: 8px 0 0; padding: 10px 12px; overflow-y: auto; border-radius: 10px; background: var(--camada-2);
  font: 13px/1.5 var(--interface); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Folha (janela de baixo) */
.fundo-folha { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: #000a; }
.folha {
  width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--camada); border: 1px solid var(--linha);
  border-radius: 20px 20px 0 0; overflow: hidden;
}
@media (min-width: 640px) { .fundo-folha { align-items: center; } .folha { border-radius: 20px; } }
.folha-cabeca { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--linha); }
.folha-cabeca h2 { flex: 1; font: 600 18px/1.2 var(--titulo); }
.folha-corpo { padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.folha-pe { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); }
.folha-pe .botao { flex: 1; }

/* Modelos */
.modelo { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--linha); border-radius: 12px; background: var(--camada-2); cursor: pointer; min-width: 0; }
.modelo input { width: 20px; min-height: 20px; height: 20px; flex-shrink: 0; accent-color: var(--destaque); }
.modelo .texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.modelo .texto b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modelo:has(input:checked) { border-color: var(--destaque); background: var(--destaque-fundo); }

/* Agenda */
.dia { margin-bottom: 20px; }
.dia > h2 { font: 600 15px/1.2 var(--interface); color: var(--mudo); margin-bottom: 8px; text-transform: capitalize; }
.hora { width: 52px; flex-shrink: 0; font: 600 17px/1 var(--titulo); }

/* Gerado */
.resumo { display: flex; gap: 12px; margin-bottom: 16px; }
.resumo > div { flex: 1; padding: 12px; background: var(--camada); border: 1px solid var(--linha); border-radius: var(--raio); }
.resumo b { display: block; font: 600 22px/1.2 var(--titulo); }
.mini { display: block; width: 100%; aspect-ratio: 9 / 16; background: #000; object-fit: cover; }

/* Aviso */
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px); padding: 12px 16px;
  background: var(--camada-2); border: 1px solid var(--linha); border-radius: 12px; box-shadow: 0 8px 24px #0008;
}
.toast.erro { border-color: var(--erro); color: var(--erro); }
