/* ============================================================================
   PORTAL v2 DO PACIENTE: A FOLHA DO NUCLEO (30/09/2026)
   ============================================================================
   Carrega sempre, junto com /assets/js/portal/nucleo.js. Os modulos (agendar,
   meus, resultados) trazem a propria folha sob demanda, com prefixo proprio
   (pa-, pm-, pr-); aqui so o que e do nucleo (prefixo pt-).

   POR QUE NAO O cronos.css: ele faz @import das fontes do Google, e o
   index.html ja pede as mesmas fontes. Seriam DOIS pedidos da mesma folha, e o
   @import bloqueia o desenho da pagina (auditoria C1). Os tokens que a pagina
   usa estao copiados abaixo com os MESMOS nomes e valores do design system:
   quando o cronos.css mudar, conferir aqui.

   ALVO: Safari 12 / Chrome 70 (celular antigo). Por isso:
   - 100vh ANTES de 100dvh (o Chrome anterior ao 108 descarta o dvh) e, entre
     os dois, a altura medida pelo JavaScript (--vh), que acerta a barra do
     navegador do iPhone antigo;
   - nada de `inset`, `aspect-ratio`, `clamp` sem recuo;
   - `gap` em FLEX so chegou no Safari 14.1 e no Chrome 84: coluna e GRID (o
     gap de grid funciona desde o Safari 10.1), e toda linha flex tem o recuo
     `.pt-sem-gap` (classe que o nucleo poe no <html> quando o navegador nao
     tem gap em flex) com margens no lugar do gap;
   - hover so em @media (hover: hover): no celular o hover "gruda" depois do
     toque;
   - prefers-reduced-motion desliga as animacoes.
   ============================================================================ */

:root {
  --sky-50: #f0f7fb;
  --sky-100: #dceef6;
  --sky-200: #c3e2ef;
  --sky-300: #a9d4e6;
  --sky-400: #84bfd8;
  --sky-500: #5ba3c4;
  --sky-600: #3f87aa;
  --sky-700: #2e6c8c;

  --sage-100: #eaf0ce;
  --sage-300: #c2d85f;
  --sage-400: #afc847;
  --sage-500: #93ad33;
  --sage-600: #76902a;
  --sage-700: #5e7322;

  --orange-50: #fdf3ea;
  --orange-100: #fbe7d4;
  --orange-200: #f6cba6;
  --orange-300: #ee9a5a;
  --orange-400: #e8743b;
  --orange-600: #a8461c;

  --coral-50: #fdeeeb;
  --coral-200: #f4b3a7;
  --coral-300: #ec7a6a;
  --coral-400: #d8503b;
  --coral-500: #b23c2a;

  --gray-200: #dee4ea;
  --gray-300: #c9d1da;
  --gray-400: #a4aebb;
  --gray-500: #7e8895;
  --gray-700: #3e4651;
  --gray-800: #262b33;
  --ink: #16181d;

  --bg-canvas: #dce3ec;
  --bg-base: #edf1f5;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f6f9;
  --bg-inset: #f4f6f8;

  --fg-primary: #16181d;
  --fg-secondary: #5c6573;
  --fg-tertiary: #8a93a1;

  --border-subtle: #eaeef2;
  --border-default: #dee4ea;

  --grad-sky: linear-gradient(135deg, #c3e2ef 0%, #a9d4e6 100%);

  --font-sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;

  --shadow-xs: 0 1px 2px rgba(22, 24, 29, 0.04);
  --shadow-sm: 0 2px 10px rgba(22, 24, 29, 0.05);
  --shadow-md: 0 10px 28px rgba(22, 24, 29, 0.06);
  --shadow-lg: 0 20px 44px rgba(22, 24, 29, 0.08);
  --shadow-xl: 0 28px 64px rgba(22, 24, 29, 0.11);
  --anel-foco: 0 0 0 3px rgba(132, 191, 216, 0.45);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* A coluna do conteudo e a margem lateral (o desenho: 520/20 no celular,
     680/32 no computador). */
  --col-w: 520px;
  --pad-x: 20px;
}

@media (min-width: 900px) {
  :root {
    --col-w: 680px;
    --pad-x: 32px;
  }
}

/* ─── Base ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-canvas);
  font-family: var(--font-sans);
  color: var(--fg-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--sky-600);
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  margin: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
  opacity: 1;
}

img {
  max-width: 100%;
}

/* O foco do teclado. Separado da lista de seletores de proposito: navegador
   sem :focus-visible descartaria a regra inteira. */
button:focus-visible,
a:focus-visible,
[role="checkbox"]:focus-visible,
[role="radio"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--sky-700);
  outline-offset: 3px;
}

/* O titulo que recebe o foco na troca de tela (leitor de tela) nao ganha
   contorno: ele nao e clicavel. */
[tabindex="-1"]:focus {
  outline: none;
}

.pt-i {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pt-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.pt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Utilitarios para os modulos: coluna e linha com espaco por --g. */
.pt-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--g, 10px);
}

.pt-row {
  display: flex;
  align-items: center;
  gap: var(--g, 8px);
}

/* ─── Animacoes do desenho ─────────────────────────────────────────────── */

@keyframes crIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* O feixe de leitura. O desenho animava `top` (recalculo de layout a cada
   quadro, trava o celular fraco: auditoria C4); aqui e `transform`, com o
   mesmo caminho: o feixe tem 40% da altura e vai de -40% a 100%. */
@keyframes crScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

@keyframes crPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes crBubble {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  72% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0; }
}

@keyframes crCheck {
  0%, 25% { transform: scale(0); opacity: 0; }
  45% { transform: scale(1.2); opacity: 1; }
  58%, 75% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes crRing {
  0%, 62% { transform: scale(0.7); opacity: 0; }
  70% { opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes crFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Classes prontas para os modulos. */
.pt-anima-in {
  animation: crIn 220ms var(--ease-out);
}

.pt-pulso {
  animation: crPulse 1.2s ease-in-out infinite;
}

.pt-feixe {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(132, 191, 216, 0) 0%, rgba(132, 191, 216, 0.55) 90%, #5ba3c4 100%);
  animation: crScan 1.4s var(--ease-in-out) infinite;
  will-change: transform;
}

/* ─── Moldura ──────────────────────────────────────────────────────────── */

.pt-palco {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-canvas);
}

/* Celular e janela ate 899 px: a coluna de 480 px, sem borda; entre 481 e 899
   ela fica centralizada com o fundo dos lados. */
.pt-moldura {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

/* Computador: o cartao de 880 px com raio e sombra. */
@media (min-width: 900px) {
  .pt-palco {
    padding: 24px;
  }

  .pt-moldura {
    max-width: 880px;
    border-radius: 28px;
    box-shadow: var(--shadow-xl);
  }
}

/* ─── Cabecalho e barra de etapas ──────────────────────────────────────── */

.pt-topo {
  flex: none;
  display: grid;
  gap: 12px;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top));
}

.pt-topo-linha {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.pt-voltar {
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-topo-titulo {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-contador {
  flex: none;
  font-size: 13px;
  color: var(--fg-secondary);
}

.pt-etapas {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}

.pt-etapa {
  height: 4px;
  border-radius: 999px;
  background: var(--gray-300);
  transition: background 320ms var(--ease-out);
}

.pt-etapa.pt-feita {
  background: var(--sky-500);
}

/* ─── Corpo ────────────────────────────────────────────────────────────── */

.pt-corpo {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px var(--pad-x) 24px;
  outline: none;
}

.pt-coluna {
  position: relative;
  max-width: var(--col-w);
  margin: 0 auto;
}

/* O gap de 20 px entre TODOS os blocos de primeiro nivel de cada tela. */
.pt-tela {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.pt-tela.pt-entra {
  animation: crIn 220ms var(--ease-out);
}

/* "Mais abaixo". O -24px compensa o padding de baixo do <main>; a faixa vai
   de borda a borda do <main> (o desenho usava -20px fixo e, no computador,
   com margem de 32, o degrade nao chegava a borda). */
.pt-mais {
  position: -webkit-sticky;
  position: sticky;
  bottom: -24px;
  height: 0;
  z-index: 3;
}

.pt-mais-faixa {
  position: absolute;
  left: calc(var(--pad-x) * -1);
  right: calc(var(--pad-x) * -1);
  bottom: 0;
  height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  background: linear-gradient(180deg, rgba(237, 241, 245, 0) 0%, rgba(237, 241, 245, 0.92) 70%, #edf1f5 100%);
  pointer-events: none;
}

.pt-mais-botao {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(22, 24, 29, 0.2);
  animation: crIn 220ms var(--ease-out);
}

/* ─── Rodape ───────────────────────────────────────────────────────────── */

.pt-rodape {
  flex: none;
  padding: 12px 20px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--bg-base);
}

.pt-rodape-dentro {
  max-width: var(--col-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

/* A barra de selecao dos Meus exames (rodape "barra"): branca, com raio em
   cima e sombra para cima. */
.pt-rodape.pt-rodape-barra {
  position: relative;
  overflow: hidden;
  padding-top: 14px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 32px rgba(22, 24, 29, 0.18), 0 -1px 0 rgba(22, 24, 29, 0.06);
  animation: crIn 220ms var(--ease-out);
}

.pt-rodape.pt-rodape-barra .pt-rodape-dentro {
  gap: 10px;
}

/* ─── Botoes ───────────────────────────────────────────────────────────── */

.pt-botao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  transition: background 140ms, transform 140ms, color 140ms;
}

.pt-botao:active:not(:disabled) {
  transform: scale(0.97);
}

.pt-botao-principal {
  background: var(--ink);
  color: #fff;
}

.pt-botao-principal:disabled {
  background: var(--gray-200);
  color: var(--gray-500);
}

/* Enviando: o botao fica desabilitado (sem toque duplo) mas mantem o preto,
   para nao parecer "invalido". */
.pt-botao.pt-ocupado,
.pt-botao-principal.pt-ocupado:disabled {
  background: var(--ink);
  color: #fff;
  cursor: progress;
}

.pt-botao-claro {
  background: var(--bg-surface);
  color: var(--fg-primary);
  border: 1.5px solid var(--border-default);
}

.pt-botao-texto {
  min-height: 50px;
  background: transparent;
  color: var(--fg-primary);
}

/* Uma cor so para acao destrutiva (o desenho tinha tres vermelhos). */
.pt-botao-perigo {
  background: var(--coral-500);
  color: #fff;
}

.pt-botao-perigo.pt-ocupado,
.pt-botao-perigo.pt-ocupado:disabled {
  background: var(--coral-500);
}

.pt-botao-perigo-texto {
  min-height: 50px;
  background: transparent;
  color: var(--coral-500);
}

.pt-botao-claro:disabled,
.pt-botao-texto:disabled,
.pt-botao-perigo:disabled,
.pt-botao-perigo-texto:disabled {
  opacity: 0.55;
}

.pt-botao-pequeno {
  min-height: 46px;
  padding: 0 12px;
  font-size: 14px;
}

/* Botao sobre fundo escuro (visor). */
.pt-botao-escuro {
  width: auto;
  min-height: 48px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
}

.pt-link-texto {
  padding: 0;
  border: none;
  background: none;
  color: var(--sky-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Blocos das telas ─────────────────────────────────────────────────── */

.pt-cabeca {
  display: grid;
  gap: 6px;
}

.pt-cabeca h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: pretty;
}

.pt-cabeca p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-secondary);
  text-wrap: pretty;
}

.pt-aviso {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--sky-100);
  font-size: 15px;
  line-height: 1.45;
  color: var(--gray-700);
}

.pt-aviso > .pt-i {
  margin-top: 1px;
  color: var(--sky-700);
}

.pt-aviso-textos {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
  text-wrap: pretty;
}

.pt-aviso-titulo {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--fg-primary);
}

.pt-aviso-alerta {
  background: var(--orange-100);
}

.pt-aviso-alerta > .pt-i {
  color: var(--orange-600);
}

.pt-aviso-erro {
  background: var(--coral-50);
}

.pt-aviso-erro > .pt-i {
  color: var(--coral-500);
}

.pt-aviso-ok {
  background: var(--sage-100);
}

.pt-aviso-ok > .pt-i {
  color: var(--sage-700);
}

.pt-aviso .pt-botao {
  margin-top: 8px;
  min-height: 46px;
  font-size: 15px;
}

/* Opcao de escolha (pessoa, forma de pagamento, exame...). */
.pt-opcao {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 1.5px solid transparent;
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  color: var(--fg-primary);
  text-align: left;
  transition: border-color 140ms, background 140ms;
}

.pt-opcao.pt-sel {
  border-color: var(--sky-400);
  background: var(--sky-50);
}

.pt-opcao.pt-andamento {
  border-color: var(--orange-200);
  background: var(--orange-50);
}

.pt-opcao.pt-andamento.pt-sel {
  border-color: var(--orange-300);
}

.pt-opcao:disabled {
  opacity: 0.55;
}

.pt-radio {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-400);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink);
  transform: scale(0);
  transition: transform 140ms;
}

.pt-sel > .pt-radio {
  border-color: var(--ink);
}

.pt-sel > .pt-radio::after {
  transform: scale(1);
}

.pt-check {
  flex: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-400);
  border-radius: 7px;
  background: #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-check .pt-i {
  opacity: 0;
}

.pt-sel > .pt-check {
  border-color: var(--ink);
  background: var(--ink);
}

.pt-sel > .pt-check .pt-i {
  opacity: 1;
}

.pt-opcao-textos {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pt-opcao-rotulo {
  font-size: 16px;
  font-weight: 600;
}

.pt-opcao-texto {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-secondary);
}

.pt-opcao > .pt-i:last-child {
  color: var(--fg-tertiary);
}

.pt-selo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--orange-100);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange-600);
}

.pt-selo::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--orange-300);
}

.pt-pilulas {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.pt-pilulas::-webkit-scrollbar {
  display: none;
}

.pt-pilula {
  flex: none;
  height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-primary);
  white-space: nowrap;
}

.pt-pilula.pt-sel {
  border-color: var(--sky-400);
  background: var(--sky-100);
  font-weight: 700;
}

.pt-caixa {
  border-radius: 22px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pt-resumo {
  padding: 4px 18px;
}

.pt-resumo-linha {
  display: grid;
  gap: 3px;
  padding: 14px 0;
}

.pt-resumo-linha + .pt-resumo-linha {
  border-top: 1px solid var(--border-subtle);
}

.pt-resumo-rotulo {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-tertiary);
}

.pt-resumo-valor {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}

.pt-resumo-sub {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-secondary);
}

/* ─── Campos ───────────────────────────────────────────────────────────── */

.pt-campo {
  display: grid;
  gap: 6px;
}

.pt-campo-rotulo {
  font-size: 14px;
  font-weight: 600;
}

/* 16 px e obrigatorio: abaixo disso o Safari do iPhone da zoom na pagina ao
   focar o campo. */
.pt-campo-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-surface);
  font-size: 16px;
  color: var(--fg-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 140ms, box-shadow 140ms;
}

textarea.pt-campo-input {
  height: auto;
  min-height: 104px;
  padding: 12px 16px;
  line-height: 1.45;
  resize: vertical;
}

.pt-campo-input:focus {
  border-color: var(--sky-400);
  box-shadow: var(--anel-foco);
}

.pt-campo-input.pt-invalido {
  border-color: var(--coral-400);
}

.pt-campo-input:disabled {
  background: var(--bg-inset);
  color: var(--fg-secondary);
}

.pt-erro {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--coral-500);
}

.pt-dica {
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-secondary);
}

/* ─── Envio de arquivo (zona e seletor escondido) ──────────────────────── */

/* O <input type=file> fica DENTRO do rotulo e escondido, sem `display:none`
   (o toque no rotulo abre o seletor, e o teclado ainda chega nele). */
.pt-arquivo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pt-zona {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  padding: 28px 20px;
  border: 2px dashed var(--sky-400);
  border-radius: 22px;
  background: var(--sky-50);
  text-align: center;
  cursor: pointer;
  transition: background 140ms, transform 140ms;
}

/* O desenho: entre 200 e 300 px, um terco da tela. Sem clamp (Safari < 13.1),
   fica nos 200. */
@supports (min-height: clamp(1px, 1vh, 2px)) {
  .pt-zona {
    min-height: clamp(200px, 34vh, 300px);
  }
}

.pt-zona > * + * {
  margin-top: 12px;
}

.pt-zona:active {
  transform: scale(0.98);
}

.pt-zona:focus-within {
  box-shadow: 0 0 0 3px rgba(46, 108, 140, 0.45);
}

.pt-zona-circulo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--sky-400);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-zona-textos {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.pt-zona-titulo {
  font-size: 18px;
  font-weight: 700;
}

.pt-zona-texto {
  max-width: 260px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-secondary);
}

.pt-zona.pt-zona-linha {
  flex-direction: row;
  justify-content: flex-start;
  min-height: 64px;
  padding: 12px 16px;
  border-width: 1.5px;
  border-radius: 18px;
  text-align: left;
}

.pt-zona.pt-zona-linha > * + * {
  margin-top: 0;
  margin-left: 14px;
}

.pt-zona-linha .pt-zona-circulo {
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  color: var(--sky-700);
}

.pt-zona-linha .pt-zona-textos {
  justify-items: start;
  gap: 2px;
}

.pt-zona-linha .pt-zona-titulo {
  font-size: 15px;
}

.pt-zona-linha .pt-zona-texto {
  max-width: none;
  line-height: 1.4;
}

/* ─── Carregando ───────────────────────────────────────────────────────── */

.pt-carregando {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
}

.pt-carregando > * + * {
  margin-top: 12px;
}

.pt-carregando-titulo {
  font-size: 16px;
  font-weight: 700;
}

.pt-carregando-texto {
  max-width: 280px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-secondary);
}

.pt-pontos {
  display: flex;
}

.pt-pontos > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sky-500);
  animation: crPulse 1.2s ease-in-out infinite;
}

.pt-pontos > span + span {
  margin-left: 6px;
}

.pt-pontos > span:nth-child(2) {
  animation-delay: 0.2s;
}

.pt-pontos > span:nth-child(3) {
  animation-delay: 0.4s;
}

.pt-esqueleto {
  height: 64px;
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  animation: crPulse 1.2s ease-in-out infinite;
}

/* ─── Toast ────────────────────────────────────────────────────────────── */

/* Centralizado por um conteiner de largura total: o desenho usava
   translateX(-50%), que a animacao crIn (que mexe em transform) apagava, e o
   toast nascia torto e pulava para o centro. */
.pt-toast-regiao {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  top: calc(72px + env(safe-area-inset-top));
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}

.pt-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow-lg);
  animation: crIn 220ms var(--ease-out);
  pointer-events: auto;
}

.pt-toast .pt-i {
  color: var(--sage-300);
}

.pt-toast.pt-toast-erro .pt-i {
  color: var(--coral-300);
}

/* ─── Folha (bottom sheet) ─────────────────────────────────────────────── */

.pt-veu {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 17, 22, 0.45);
  animation: crFade 220ms var(--ease-out);
  transition: opacity 200ms;
}

.pt-veu.pt-saindo {
  opacity: 0;
}

.pt-folha {
  width: 100%;
  max-width: 520px;
  max-height: 85%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: 0 20px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--bg-surface);
  box-shadow: var(--shadow-xl);
  outline: none;
  animation: crIn 220ms var(--ease-out);
}

/* O desenho: min(460px, 72%). Sem min() (Safari < 11.1), 72% da moldura. */
.pt-folha.pt-alta {
  min-height: 72%;
}

@supports (min-height: min(1px, 2px)) {
  .pt-folha.pt-alta {
    min-height: min(460px, 72%);
  }
}

.pt-folha > * + * {
  margin-top: 20px;
}

.pt-folha-alca {
  position: relative;
  flex: none;
  display: flex;
  justify-content: center;
  margin: 0 -20px;
  padding: 12px 20px 4px;
  touch-action: none;
  cursor: grab;
}

.pt-folha-alca::before {
  content: '';
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: var(--gray-300);
}

.pt-folha > .pt-folha-conteudo {
  margin-top: 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.pt-folha-conteudo > * + * {
  margin-top: 18px;
}

.pt-folha-fechar {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-folha-icone {
  flex: none;
  width: 52px;
  height: 52px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--sky-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-folha-cabeca {
  display: grid;
  gap: 8px;
}

.pt-folha-conteudo > .pt-folha-cabeca:first-child {
  margin-top: 12px;
}

.pt-folha-cabeca h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: pretty;
}

.pt-folha-cabeca p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-secondary);
  text-wrap: pretty;
}

/* Os botoes descem para o pe quando a folha e alta. */
.pt-folha-conteudo > .pt-folha-botoes {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 8px;
}

/* ─── Visor em tela cheia ──────────────────────────────────────────────── */

/* O mesmo z-index da folha: a camada aberta por ultimo fica por cima (a ordem
   no DOM decide). */
.pt-visor {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #0b0c0f;
  color: #fff;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
  animation: crIn 200ms var(--ease-out);
}

.pt-visor-topo {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 20px;
  padding-top: calc(10px + env(safe-area-inset-top));
}

.pt-visor-titulos {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pt-visor-titulo {
  font-size: 16px;
  font-weight: 700;
}

.pt-visor-dica {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.pt-visor-x {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-visor-area {
  position: relative;
  flex: 1;
  min-height: 0;
}

.pt-visor-trilho {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pt-visor-trilho::-webkit-scrollbar {
  display: none;
}

/* Durante o zoom o carrossel trava: arrastar move a imagem, nao troca. */
.pt-visor-trilho.pt-travado {
  overflow-x: hidden;
}

.pt-visor-slide {
  position: relative;
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* touch-action pan-x desde o inicio: o dedo troca de slide e o zoom nativo da
   pagina nao entra (a pinca e nossa). */
.pt-visor-zoom {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  touch-action: pan-x;
}

.pt-visor-miolo {
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 0 0;
  will-change: transform;
}

.pt-visor-img {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.pt-visor-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  padding: 24px;
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.pt-visor-pdf > * + * {
  margin-top: 12px;
}

.pt-visor-pdf-nome {
  font-weight: 600;
  color: #fff;
  word-break: break-word;
}

.pt-visor-seta {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
}

.pt-visor-seta.pt-esq {
  left: 10px;
}

.pt-visor-seta.pt-dir {
  right: 10px;
}

.pt-visor-base {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.pt-visor-base > * + * {
  margin-top: 12px;
}

.pt-visor-legenda {
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.pt-legenda-ok {
  color: var(--sage-300);
}

.pt-legenda-alerta {
  color: var(--orange-200);
}

.pt-legenda-erro {
  color: var(--coral-300);
}

.pt-pontinhos {
  display: flex;
}

.pt-pontinhos > span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 200ms, background 200ms;
}

.pt-pontinhos > span + span {
  margin-left: 6px;
}

.pt-pontinhos > span.pt-atual {
  width: 18px;
  background: #fff;
}

.pt-visor-confirma {
  width: 100%;
  max-width: 480px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: #1d2027;
}

.pt-visor-confirma strong {
  font-size: 16px;
  font-weight: 700;
}

.pt-visor-confirma span {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.pt-visor-confirma-botoes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pt-visor-cancelar,
.pt-visor-apagar {
  min-height: 48px;
  border-radius: 999px;
  font-size: 15px;
}

.pt-visor-cancelar {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  font-weight: 600;
}

.pt-visor-apagar {
  border: none;
  background: var(--coral-300);
  color: var(--ink);
  font-weight: 700;
}

/* ─── Carrossel generico ───────────────────────────────────────────────── */

.pt-carrossel {
  display: grid;
  gap: 10px;
}

/* O trilho vai de borda a borda do <main> (margem negativa) para o cartao
   seguinte aparecer na ponta, convidando a arrastar. */
.pt-carrossel-trilho {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(var(--pad-x) * -1);
  padding: 2px var(--pad-x) 8px;
  scroll-padding: 0 var(--pad-x);
}

.pt-carrossel-trilho::-webkit-scrollbar {
  display: none;
}

.pt-carrossel-item {
  flex: none;
  scroll-snap-align: start;
}

.pt-carrossel-item + .pt-carrossel-item {
  margin-left: 12px;
}

.pt-carrossel-rodape {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-carrossel-rodape > * + * {
  margin-left: 10px;
}

.pt-carrossel-rodape .pt-pontinhos > span {
  background: var(--gray-300);
}

.pt-carrossel-rodape .pt-pontinhos > span.pt-atual {
  background: var(--ink);
}

.pt-carrossel-contador {
  font-size: 13px;
  color: var(--fg-secondary);
}

/* ─── Conclusao ────────────────────────────────────────────────────────── */

.pt-conclusao-topo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
  padding-top: calc(48px + env(safe-area-inset-top));
  text-align: center;
}

.pt-conclusao-topo > * + * {
  margin-top: 10px;
}

.pt-conclusao-circulo {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--sage-300);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-conclusao-circulo.pt-alerta {
  background: var(--orange-300);
}

.pt-conclusao-topo h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

.pt-conclusao-topo p {
  max-width: 320px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-secondary);
  text-wrap: pretty;
}

.pt-protocolo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: 0.02em;
}

/* ─── Inicio ───────────────────────────────────────────────────────────── */

.pt-inicio-saudacao {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  text-align: center;
}

.pt-inicio-saudacao > span {
  font-size: 15px;
  color: var(--fg-secondary);
}

.pt-inicio-logo {
  display: block;
  width: 200px;
  max-width: 64%;
  height: auto;
  margin: 8px 0 22px;
}

.pt-inicio-saudacao h1 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.pt-agendar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 104px;
  padding: 20px 16px 20px 18px;
  border: none;
  border-radius: 22px;
  background: var(--grad-sky);
  box-shadow: 0 2px 4px rgba(22, 24, 29, 0.06), 0 12px 28px rgba(46, 108, 140, 0.18);
  color: var(--fg-primary);
  text-align: left;
  transition: transform 180ms var(--ease-out), box-shadow 180ms;
}

.pt-agendar:active {
  transform: scale(0.98);
}

.pt-agendar-icone {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-agendar-textos {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pt-agendar-titulo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pt-agendar-sub {
  font-size: 14px;
  line-height: 1.4;
  color: var(--gray-800);
  text-wrap: pretty;
}

.pt-agendar-seta {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-servicos {
  display: grid;
  gap: 10px;
}

.pt-servicos h2 {
  margin: 6px 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}

.pt-servicos ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 900px) {
  .pt-servicos ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pt-servicos li {
  display: flex;
}

.pt-servico {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.05), 0 4px 12px rgba(22, 24, 29, 0.05);
  color: var(--fg-primary);
  text-align: left;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), box-shadow 160ms, border-color 160ms;
}

.pt-servico:active {
  transform: scale(0.98);
}

.pt-servico-icone {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-cor-sage-500 { background: var(--sage-500); }
.pt-cor-sage-600 { background: var(--sage-600); }
.pt-cor-sky-600 { background: var(--sky-600); }
.pt-cor-orange-300 { background: var(--orange-300); }
.pt-cor-orange-400 { background: var(--orange-400); }
.pt-cor-coral-400 { background: var(--coral-400); }
.pt-cor-ink { background: var(--ink); }

.pt-servico-textos {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pt-servico-titulo {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.pt-servico-texto {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-secondary);
  text-wrap: pretty;
}

.pt-servico > .pt-i:last-child {
  color: var(--fg-secondary);
}

.pt-servico[aria-busy="true"] .pt-servico-texto,
.pt-agendar[aria-busy="true"] .pt-agendar-sub {
  animation: crPulse 1.2s ease-in-out infinite;
}

.pt-nota-link {
  padding: 4px 8px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg-tertiary);
  text-align: center;
  text-wrap: pretty;
}

/* ─── Enderecos e horarios ─────────────────────────────────────────────── */

.pt-unid-controles {
  display: grid;
  gap: 10px;
}

.pt-busca {
  position: relative;
}

.pt-busca > .pt-i {
  position: absolute;
  left: 16px;
  top: 50%;
  color: var(--fg-tertiary);
  pointer-events: none;
  transform: translateY(-50%);
}

.pt-busca input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-surface);
  font-size: 16px;
  color: var(--fg-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.pt-busca input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.pt-busca input:focus {
  border-color: var(--sky-400);
  box-shadow: var(--anel-foco);
}

.pt-localizar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: transform 140ms, background 140ms;
}

.pt-localizar:active:not(:disabled) {
  transform: scale(0.97);
}

.pt-localizar.pt-ligado {
  background: var(--sky-100);
  color: var(--sky-700);
}

.pt-localizar:disabled {
  cursor: progress;
}

.pt-nota {
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-tertiary);
  text-align: center;
}

.pt-unid-vazio {
  padding: 24px 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-secondary);
  text-align: center;
  text-wrap: pretty;
}

.pt-unid {
  border-radius: 22px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* <button> como conteiner flex (grid em <button> falha no Chrome antigo);
   o espaco entre as linhas por margem. */
.pt-unid-topo {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 18px;
  border: none;
  background: transparent;
  color: var(--fg-primary);
  text-align: left;
}

.pt-unid-topo > * + * {
  margin-top: 10px;
}

.pt-unid-linha1 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pt-unid-nomes {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pt-unid-perto {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky-700);
}

.pt-unid-nome {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pt-unid-curto {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-secondary);
}

.pt-unid-dist {
  flex: none;
  font-size: 14px;
  font-weight: 600;
}

.pt-unid-linha2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pt-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-base);
  color: #4a5361;
  font-size: 13px;
  font-weight: 700;
}

.pt-status::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gray-400);
}

.pt-status.pt-aberta {
  background: var(--sage-100);
  color: var(--sage-700);
}

.pt-status.pt-aberta::before {
  background: var(--sage-400);
}

.pt-unid-sub {
  font-size: 14px;
  color: var(--fg-secondary);
}

.pt-unid-coleta {
  font-size: 13px;
  color: var(--fg-secondary);
}

.pt-unid-abrir {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sky-700);
}

.pt-unid-abrir .pt-i {
  transition: transform 200ms;
}

.pt-unid.pt-aberto .pt-unid-abrir .pt-i {
  transform: rotate(180deg);
}

.pt-unid-detalhe {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
  animation: crIn 200ms var(--ease-out);
}

.pt-unid-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-secondary);
  text-wrap: pretty;
}

.pt-unid-secao {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.pt-unid-secao-rotulo {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-tertiary);
}

.pt-unid-secao-linha {
  font-size: 15px;
  line-height: 1.45;
  text-wrap: pretty;
}

.pt-unid-detalhe .pt-botao {
  min-height: 50px;
  font-size: 15px;
  font-weight: 700;
}

/* ─── Hover so com mouse ───────────────────────────────────────────────── */

@media (hover: hover) {
  a:hover {
    color: var(--sky-700);
  }

  .pt-voltar:hover {
    background: rgba(255, 255, 255, 0.7);
  }

  .pt-botao-texto:hover:not(:disabled),
  .pt-botao-perigo-texto:hover:not(:disabled),
  .pt-botao-claro:hover:not(:disabled) {
    background: var(--bg-subtle);
  }

  .pt-botao-escuro:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .pt-zona:hover {
    background: var(--sky-100);
  }

  .pt-opcao:hover:not(:disabled):not(.pt-sel) {
    background: var(--bg-subtle);
  }

  .pt-agendar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 24, 29, 0.08), 0 16px 36px rgba(46, 108, 140, 0.24);
  }

  .pt-servico:hover {
    border-color: var(--gray-300);
    box-shadow: 0 2px 4px rgba(22, 24, 29, 0.06), 0 10px 24px rgba(22, 24, 29, 0.08);
    transform: translateY(-1px);
  }

  .pt-unid-topo:hover {
    background: var(--bg-subtle);
  }

  .pt-visor-img {
    cursor: zoom-in;
  }
}

/* ─── Recuo para navegador sem gap em flex (Safari < 14.1, Chrome < 84) ── */

.pt-sem-gap .pt-row > * + * { margin-left: var(--g, 8px); }
.pt-sem-gap .pt-topo-linha > * + * { margin-left: 8px; }
.pt-sem-gap .pt-mais-botao > * + * { margin-left: 6px; }
.pt-sem-gap .pt-botao > * + * { margin-left: 8px; }
.pt-sem-gap .pt-aviso > * + * { margin-left: 12px; }
.pt-sem-gap .pt-opcao > * + * { margin-left: 14px; }
.pt-sem-gap .pt-selo::before { margin-right: 6px; }
.pt-sem-gap .pt-pilulas > * + * { margin-left: 8px; }
.pt-sem-gap .pt-erro > * + * { margin-left: 6px; }
.pt-sem-gap .pt-toast > * + * { margin-left: 8px; }
.pt-sem-gap .pt-visor-topo > * + * { margin-left: 8px; }
.pt-sem-gap .pt-agendar > * + * { margin-left: 16px; }
.pt-sem-gap .pt-servico > * + * { margin-left: 14px; }
.pt-sem-gap .pt-localizar > * + * { margin-left: 8px; }
.pt-sem-gap .pt-unid-linha1 > * + * { margin-left: 12px; }
.pt-sem-gap .pt-unid-linha2 > * { margin-right: 8px; margin-bottom: 4px; }
.pt-sem-gap .pt-status::before { margin-right: 6px; }
.pt-sem-gap .pt-unid-abrir > * + * { margin-left: 6px; }

/* ─── Menos movimento ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .pt-feixe {
    display: none;
  }

  .pt-botao:active:not(:disabled),
  .pt-zona:active,
  .pt-agendar:active,
  .pt-servico:active,
  .pt-localizar:active:not(:disabled) {
    transform: none;
  }
}
