/* Campo Cirúrgico · a lousa do centro cirúrgico
   O quadro branco de escala das salas: fita isolante, ímãs de situação, letra de marcador.
   Celular primeiro; o desktop é a expansão. */

@font-face {
  font-family: 'Patrick Hand';
  src: url('/fontes/patrick-hand-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/fontes/sofia-sans-condensed-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/fontes/sofia-sans-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sofia Sans Condensed';
  src: url('/fontes/sofia-sans-condensed-latin-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --parede: #d5ded9;
  --junta: #c8d3cd;
  --aluminio-claro: #f3f5f6;
  --aluminio: #c6ccd1;
  --aluminio-escuro: #a3aab1;

  --lousa: #f1f3f0;
  --lousa-brilho: #fcfdfc;
  --tinta-preta: #1e2226;
  --tinta-azul: #1d4ba8;
  --tinta-vermelha: #c4282b;
  --tinta-verde: #146f41;
  --tinta-suave: #56657f;
  --tinta-apoio: #27324a;

  --papel: #fffefa;
  --texto-impresso: #252b33;
  --texto-impresso-2: #444f5d;
  --fita-h: linear-gradient(180deg, #4a4f55 0, #1c1e21 24%, #111214 62%, #2b2e33 100%);
  --fita-v: linear-gradient(90deg, #4a4f55 0, #1c1e21 24%, #111214 62%, #2b2e33 100%);
  --sombra-papel: 0 1px 1px rgba(20, 30, 40, .17), 0 6px 12px -7px rgba(20, 30, 40, .42);

  --marcador: 'Patrick Hand', 'Segoe Print', cursive;
  --impresso: 'Sofia Sans Condensed', 'Arial Narrow', sans-serif;

  --margem: clamp(8px, 2.2vw, 28px);
  --moldura: clamp(7px, 1vw, 14px);
  --num: 3.3rem;

  --cursor-marcador: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M3 25l2.4-6.6L18.6 5.2l4.2 4.2L9.6 22.6z' fill='%231d4ba8' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M18.6 5.2l2.6-2.6a1.5 1.5 0 0 1 2.1 0l2.1 2.1a1.5 1.5 0 0 1 0 2.1l-2.6 2.6z' fill='%23173b85' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M3 25l2.4-6.6 4.2 4.2z' fill='%231e2226'/%3E%3C/svg%3E") 3 25;

  color-scheme: light;
  accent-color: var(--tinta-azul);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--aluminio-escuro) var(--parede);
  scroll-behavior: smooth;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--parede); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--aluminio-claro), var(--aluminio-escuro));
  border-radius: 6px;
  border: 2px solid var(--parede);
}
::selection { background: #ffe45c; color: var(--tinta-preta); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  color: var(--tinta-preta);
  font-family: var(--impresso);
  background: linear-gradient(180deg, #e4eae6 0, var(--parede) 460px, #cdd7d1 100%) var(--parede);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--tinta-azul); text-underline-offset: .2em; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }

button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }

:focus-visible {
  outline: 3px solid var(--tinta-azul);
  outline-offset: 3px;
}

.so-leitor {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pular {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 14px;
  font: 800 .95rem/1 var(--impresso);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--tinta-azul);
  border-radius: 6px;
  translate: 0 -200%;
}
.pular:focus-visible { translate: 0 0; color: #fff; }

.tinta-azul { color: var(--tinta-azul); }
.tinta-vermelha { color: var(--tinta-vermelha); }
.tinta-verde { color: var(--tinta-verde); }

/* traço de marcador engrossado por fora da letra */
.titulo, .num, .proc-nome, .escrita, .fila, .legenda-marcador, .sucesso-titulo,
.sala3-titulo, .salas-titulo, .sala-nome, .sala-prioridade, .complemento-titulo, .pg-titulo {
  paint-order: stroke fill;
}

/* ---------- Luz fluorescente do corredor ---------- */
.luminaria { position: relative; height: clamp(18px, 3.4vh, 36px); pointer-events: none; }
.luminaria-tubo {
  position: absolute;
  top: 0; left: 50%;
  translate: -50% 0;
  width: min(62%, 840px);
  height: 10px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #aab2b8 0, #e9eef0 35%, #ffffff 60%, #dfe6e9 100%);
  box-shadow: 0 2px 0 #9aa2a9;
}
.luminaria::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 300px;
  background: radial-gradient(min(60%, 800px) 100% at 50% 0, rgba(250, 255, 255, .8), rgba(250, 255, 255, 0));
}

/* ---------- O quadro: moldura de alumínio, lousa, bandeja ---------- */
.quadro {
  position: relative;
  width: min(100% - 2 * var(--margem), 1400px);
  margin-inline: auto;
  padding: var(--moldura) var(--moldura) 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--aluminio-claro) 0, var(--aluminio) 16%, #e6e9ec 50%, var(--aluminio-escuro) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    inset 0 -1px 0 rgba(0, 0, 0, .14),
    0 2px 3px rgba(20, 35, 28, .2),
    0 30px 46px -24px rgba(20, 35, 28, .55);
}
.quadro::before,
.quadro::after {
  content: '';
  position: absolute;
  top: -1px;
  width: calc(var(--moldura) + 12px);
  height: calc(var(--moldura) + 12px);
  background: linear-gradient(150deg, #a0a7ae, #5d646b);
  z-index: 2;
}
.quadro::before { left: -1px; border-radius: 9px 2px 12px 2px; }
.quadro::after { right: -1px; border-radius: 2px 9px 2px 12px; }

.lousa {
  position: relative;
  z-index: 1;
  isolation: isolate;
  border-radius: 3px;
  --lousa-x: 18px;
  padding: 16px var(--lousa-x) 24px;
  background: var(--lousa);
  box-shadow: inset 0 0 0 1px rgba(25, 40, 50, .16), inset 0 5px 12px -6px rgba(25, 40, 50, .24);
}
.lousa::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(104deg, rgba(255, 255, 255, 0) 30%, var(--lousa-brilho) 38%, rgba(255, 255, 255, 0) 49%),
    linear-gradient(104deg, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .7) 58%, rgba(255, 255, 255, 0) 63%),
    linear-gradient(180deg, #f8f9f7 0, var(--lousa) 40%);
}
.lousa::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 900' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3Cfilter id='a' x='-5%25' y='-5%25' width='110%25' height='110%25'%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23a)' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M70 610c40-30 70 10 95-12s38-30 60-6 40 8 58-10 30 4 46-4' stroke='%231d4ba8' stroke-width='5' opacity='.07'/%3E%3Cpath d='M820 120c30-18 52 14 80-6 22-16 44 10 66-4s40-6 60 6' stroke='%231e2226' stroke-width='5' opacity='.055'/%3E%3Cpath d='M1160 760c-60-12-120 30-80 70s150 20 160-30-40-60-110-40' stroke='%23c4282b' stroke-width='5' opacity='.06'/%3E%3Cpath d='M560 820l140-6m-20-18 22 22-24 18' stroke='%231d4ba8' stroke-width='5' opacity='.06'/%3E%3Cpath d='M1240 420v60m14-60v60m14-60v60m14-60v60m-52 6 62-70' stroke='%231e2226' stroke-width='4' opacity='.05'/%3E%3Cpath d='M120 180c20-10 46-4 54 16s-12 34-32 32-30-24-22-48' stroke='%23146f41' stroke-width='5' opacity='.06'/%3E%3Cpath d='M300 860c80-20 160-24 260-10' stroke='%231e2226' stroke-width='40' opacity='.025'/%3E%3Cpath d='M960 300c90-30 180-20 300 0' stroke='%231d4ba8' stroke-width='46' opacity='.022'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}

.bandeja {
  position: relative;
  z-index: 2;
  height: clamp(18px, 2.4vw, 32px);
  margin: 0 calc(var(--moldura) * -1);
  border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, #8f969d 0, #e9ecef 18%, #c3c9ce 55%, #8c939a 100%);
  box-shadow: 0 10px 14px -8px rgba(20, 35, 28, .5);
}
.bandeja-itens {
  position: absolute;
  left: clamp(14px, 6%, 90px);
  bottom: 34%;
  width: clamp(180px, 30%, 420px);
  height: auto;
}

/* ---------- Grade da primeira tela (celular) ---------- */
.mapa-grade {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "topo" "titulo" "apoio" "entrada" "foto" "mapa" "sala3" "grupos";
  row-gap: 18px;
}
.col-a, .col-b { display: contents; }

.topo { grid-area: topo; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 10px; }
.marca { flex: none; display: inline-flex; align-items: center; color: inherit; text-decoration: none; border-radius: 8px; }
.marca img { position: relative; z-index: 1; display: block; width: 44px; height: 44px; margin: 0 -14px -5px 0; }
.marca-etiqueta {
  display: inline-block;
  padding: .55em .7em .5em 1.3em;
  font: 800 .84rem/1 var(--impresso);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: var(--sombra-papel), inset 0 0 0 1px rgba(30, 34, 38, .08);
  rotate: -1.2deg;
}
.selo {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  padding: .32em .6em .28em;
  font: 800 .75rem/1.3 var(--impresso);
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--tinta-preta);
  background: #fbe7a1;
  box-shadow: var(--sombra-papel);
  rotate: 1.4deg;
}

.titulo {
  grid-area: titulo;
  margin: 2px 0 0;
  max-width: 15.5em;
  font: 400 clamp(2.3rem, 1.25rem + 3.2vw, 4.3rem)/.98 var(--marcador);
  letter-spacing: -.004em;
  color: var(--tinta-preta);
  -webkit-text-stroke: .041em currentColor;
  text-wrap: balance;
}
.grifo { position: relative; white-space: nowrap; }
.grifo-traco {
  position: absolute;
  left: -3%;
  bottom: -.2em;
  width: 106%;
  height: .32em;
  overflow: visible;
  fill: none;
  stroke: var(--tinta-vermelha);
  stroke-width: 3.4px;
  stroke-linecap: round;
  pointer-events: none;
}
.grifo-traco path { vector-effect: non-scaling-stroke; }
.grifo-traco path + path { stroke-width: 2.6px; opacity: .85; }

.apoio {
  grid-area: apoio;
  align-self: start;
  margin: 0;
  max-width: 54ch;
  font: 400 clamp(1.18rem, 1.05rem + .3vw, 1.36rem)/1.3 var(--marcador);
  color: var(--tinta-apoio);
}

/* ---------- Ímãs redondos ---------- */
.ima {
  --c1: #2fb766; --c2: #0d6534;
  flex: none;
  position: relative;
  display: inline-block;
  width: var(--d, 1.6rem);
  height: var(--d, 1.6rem);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 8%, rgba(255, 255, 255, 0) 25%),
    radial-gradient(circle at 50% 42%, var(--c1) 0 52%, var(--c2) 100%);
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, .28),
    inset 0 1px 1px rgba(255, 255, 255, .55),
    0 2px 2px rgba(0, 0, 0, .24),
    0 6px 9px -3px rgba(0, 0, 0, .3);
}
.ima-verde { --c1: #2fb766; --c2: #0d6534; }
.ima-amarelo { --c1: #f8d24a; --c2: #b07f05; }
.ima-vermelho { --c1: #ec5249; --c2: #8c1913; }
.ima-azul { --c1: #3f7fe0; --c2: #163c86; }
.ima-vazio { background: none; box-shadow: none; border: 2.5px solid var(--tinta-vermelha); opacity: .75; }
.ima-branco {
  --d: 1.8rem;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 10%, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 50% 42%, #ffffff 0 50%, #c9ced3 100%);
}
.ima-branco svg { width: 62%; height: 62%; fill: none; stroke: var(--tinta-azul); stroke-width: 2.6; stroke-linecap: round; }

/* ---------- Foto impressa presa com ímã ---------- */
.foto-impressa { position: relative; margin: 0; width: min(100%, 480px); }
.foto-hero { grid-area: foto; justify-self: center; align-self: start; width: 100%; margin-top: 10px; rotate: -1.2deg; transform-origin: 50% 0; }
.foto-papel {
  display: block;
  padding: 8px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(20, 30, 40, .18), 0 16px 24px -14px rgba(20, 30, 40, .5);
}
.foto-papel img { display: block; width: 100%; height: auto; filter: saturate(.94) contrast(1.03); }
.foto-impressa > .foto-ima { position: absolute; top: -13px; left: 50%; translate: -50% 0; z-index: 2; --d: 1.9rem; }
.legenda-marcador {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-top: 8px;
  padding-left: 14px;
  font: 400 1.26rem/1 var(--marcador);
  color: var(--tinta-azul);
  -webkit-text-stroke: .017em currentColor;
  rotate: 1.5deg;
}
.seta-legenda { width: 34px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Entrada na lista: EQUIPE: ____ ---------- */
.entrada { grid-area: entrada; align-self: start; min-width: 0; scroll-margin-top: 16px; }
.inscricao-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.etiqueta-equipe,
.rotulo {
  display: inline-block;
  padding: .62em .8em .56em;
  font: 800 .9rem/1 var(--impresso);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: var(--sombra-papel), inset 0 0 0 1px rgba(30, 34, 38, .08);
}
.etiqueta-equipe { flex: none; rotate: -1deg; }
.rotulo { rotate: var(--r, 0deg); }
.campo {
  flex: 1 1 11rem;
  min-width: 0;
  height: 3.2rem;
  margin: 0;
  padding: 0 .25em 3px;
  border: 0;
  background: linear-gradient(var(--traco, var(--tinta-preta)), var(--traco, var(--tinta-preta))) left bottom / 100% 3px no-repeat;
  font: 400 1.55rem/1 var(--marcador);
  color: var(--tinta-azul);
  caret-color: var(--tinta-vermelha);
}
.campo::placeholder { color: var(--tinta-suave); opacity: 1; }
.campo:focus-visible { outline-offset: 5px; }
.campo[aria-invalid="true"] { --traco: var(--tinta-vermelha); }

.botao {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 3.25rem;
  margin: 0;
  padding: .5rem 1.4rem;
  border: 0;
  border-radius: 8px;
  font: 800 1.04rem/1.3 var(--impresso);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #2c5ec3 0, #1d4ba8 52%, #173f90 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    inset 0 -2px 0 rgba(0, 0, 0, .22),
    0 2px 2px rgba(20, 30, 40, .24),
    0 9px 14px -8px rgba(20, 30, 40, .6);
  cursor: pointer;
  transition: translate .16s ease-out, box-shadow .16s ease-out;
}
.botao:hover { color: #fff; }
.botao:active { translate: 0 1px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 1px rgba(20, 30, 40, .3); }
.botao:focus-visible { outline-color: var(--tinta-vermelha); outline-offset: 4px; border-radius: 10px; }
.botao[aria-busy="true"], .botao:disabled {
  cursor: progress;
  background: #3a62b4;
}
.botao .icone { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inscricao .botao { width: 100%; margin-top: 14px; }

.botao-whats { background: linear-gradient(180deg, #1d8653 0, #146f41 55%, #0f5c35 100%); }
.botao-papel {
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: inset 0 0 0 1px rgba(30, 34, 38, .14), 0 2px 2px rgba(20, 30, 40, .16), 0 9px 14px -9px rgba(20, 30, 40, .5);
}
.botao-papel:hover { color: var(--tinta-preta); }
.botao-pequeno { min-height: 2.9rem; padding: .4rem 1.15rem; font-size: .95rem; }

.isca { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.turnstile { margin-top: 12px; }

.msg { margin: 10px 0 0; font: 400 1.22rem/1.3 var(--marcador); color: var(--tinta-azul); }
.msg:empty { display: none; }
.msg.is-erro { color: var(--tinta-vermelha); }
.nota { margin: 12px 0 0; max-width: 52ch; font: 500 .92rem/1.4 var(--impresso); color: var(--texto-impresso-2); }
.fila-total { margin: 8px 0 0; font: 400 1.2rem/1.3 var(--marcador); color: var(--tinta-verde); }

/* ---------- Sucesso: o nome escrito a marcador ---------- */
.sucesso { outline: none; }
.sucesso:focus-visible { outline: 3px solid var(--tinta-azul); outline-offset: 6px; }
.sucesso-equipe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.sucesso-equipe .rotulo { rotate: -1deg; }
.escrita-wrap { position: relative; display: inline-block; max-width: 100%; min-width: 0; }
.escrita {
  display: inline-block;
  max-width: 100%;
  padding-right: .1em;
  font: 400 clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem)/1.05 var(--marcador);
  color: var(--tinta-azul);
  -webkit-text-stroke: .037em currentColor;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.ponta {
  position: absolute;
  top: -.5em;
  left: 0;
  width: 22px;
  height: 40px;
  display: none;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 40'%3E%3Cpath d='M3 38l1.5-8 9-22 6 2.5-9 22z' fill='%231d4ba8' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M13.5 8l2.2-5.4a1.5 1.5 0 0 1 2-.8l2 .8a1.5 1.5 0 0 1 .8 2l-2.2 5.4z' fill='%23173b85'/%3E%3Cpath d='M3 38l1.5-8 5.6 2.4z' fill='%231e2226'/%3E%3C/svg%3E") no-repeat center / contain;
}
.sucesso-titulo {
  margin: 14px 0 0;
  font: 400 clamp(1.5rem, 1.25rem + .8vw, 1.9rem)/1.3 var(--marcador);
  color: var(--tinta-verde);
  -webkit-text-stroke: .02em currentColor;
}
.sucesso-fila { margin: 8px 0 0; font: 400 1.4rem/1.45 var(--marcador); color: var(--tinta-apoio); }
.fila {
  position: relative;
  display: inline-block;
  margin-left: .2em;
  padding: .12em .45em .16em;
  font-size: 1.15em;
  color: var(--tinta-vermelha);
  -webkit-text-stroke: .025em currentColor;
  white-space: nowrap;
}
.fila-circulo {
  position: absolute;
  left: -.35em; top: -.32em;
  width: calc(100% + .7em);
  height: calc(100% + .64em);
  overflow: visible;
  fill: none;
  stroke: var(--tinta-vermelha);
  stroke-width: 2.4;
  stroke-linecap: round;
  pointer-events: none;
}
.sucesso-texto { margin: 12px 0 0; font: 500 1rem/1.45 var(--impresso); color: var(--texto-impresso-2); }
.partilha-titulo { margin: 18px 0 0; font: 400 1.25rem/1.3 var(--marcador); color: var(--tinta-apoio); }
.partilha { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.partilha-link {
  margin: 10px 0 0;
  font: 500 .92rem/1.4 var(--impresso);
  color: var(--texto-impresso-2);
  overflow-wrap: anywhere;
}
.link-discreto {
  appearance: none;
  display: inline-block;
  min-height: 44px;
  margin: 6px 0 0;
  padding: 0 2px;
  border: 0;
  background: none;
  font: 400 1.2rem/44px var(--marcador);
  color: var(--tinta-azul);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
  cursor: pointer;
}

.escrevendo .escrita { animation: escrever var(--dur, 1s) cubic-bezier(.4, .12, .5, 1) var(--atraso, 0s) both; }
.escrevendo .ponta { display: block; animation: ponta var(--dur, 1s) cubic-bezier(.4, .12, .5, 1) var(--atraso, 0s) both; }
.escrevendo .fila-txt { display: inline-block; animation: escrever .55s cubic-bezier(.4, .12, .5, 1) calc(var(--atraso, 0s) + var(--dur, 1s) + .2s) both; }
.escrevendo .fila-circulo path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: circular .75s cubic-bezier(.6, 0, .25, 1) calc(var(--atraso, 0s) + var(--dur, 1s) + .75s) both; }
@keyframes escrever {
  from { clip-path: inset(-40% 100% -40% -6%); }
  to { clip-path: inset(-40% -6% -40% -6%); }
}
@keyframes ponta {
  0% { left: 0; opacity: 1; }
  88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes circular { to { stroke-dashoffset: 0; } }

/* ---------- Complemento opcional: folha impressa ---------- */
.complemento { position: relative; margin-top: 28px; padding-top: 24px; }
.complemento::before {
  content: '';
  position: absolute;
  left: -10px; right: -6px; top: 0;
  height: 8px;
  background: var(--fita-h);
  clip-path: polygon(0 20%, 100% 0, 99.7% 100%, .5% 86%);
}
.complemento-ima { display: none; }
.complemento-titulo {
  margin: 0;
  font: 400 1.7rem/1.3 var(--marcador);
  color: var(--tinta-azul);
  -webkit-text-stroke: .02em currentColor;
}
.complemento-dica { margin: 4px 0 0; font: 500 .95rem/1.4 var(--impresso); color: var(--texto-impresso-2); }
.perfis { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.perfis legend, .complemento-rotulo {
  padding: 0;
  font: 800 .82rem/1 var(--impresso);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--texto-impresso);
}
.perfis-lista { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 10px 6px 2px;
  font: 400 1.22rem/1.3 var(--marcador);
  color: var(--tinta-apoio);
  cursor: pointer;
}
.chip span::before {
  content: '';
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2.5px solid var(--tinta-suave);
}
.chip input:checked + span { color: var(--tinta-azul); }
.chip input:checked + span::before {
  border: 0;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 9%, rgba(255, 255, 255, 0) 26%),
    radial-gradient(circle at 50% 42%, #3f7fe0 0 52%, #163c86 100%);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .28), 0 2px 2px rgba(0, 0, 0, .24);
}
.chip input:focus-visible + span { outline: 3px solid var(--tinta-vermelha); outline-offset: 2px; }
.complemento-rotulo { display: block; margin-top: 18px; }
.complemento textarea {
  display: block;
  width: 100%;
  min-height: 6.5rem;
  margin-top: 8px;
  padding: 10px 12px;
  border: 2px solid rgba(30, 34, 38, .35);
  font: 400 1.25rem/1.4 var(--marcador);
  color: var(--tinta-azul);
  background: var(--lousa-brilho);
  resize: vertical;
  caret-color: var(--tinta-vermelha);
}
.complemento textarea::placeholder { color: var(--tinta-suave); opacity: 1; }
.complemento-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; }

/* ---------- O mapa: Salas 1 e 2 (celular: cartões empilhados) ---------- */
.mapa { grid-area: mapa; position: relative; margin-top: 8px; }
.mapa-cab { display: none; }
.mapa-lista { list-style: none; margin: 0; padding: 0; }
.sala-linha {
  position: relative;
  display: grid;
  grid-template-columns: var(--num) minmax(0, 1fr);
  padding: 4px 0;
}
.sala-linha::before,
.sala3::before,
.sala::before {
  content: '';
  position: absolute;
  left: -10px; right: -6px; top: -4px;
  height: 8px;
  z-index: 2;
  background: var(--fita-h);
  rotate: var(--tilt, 0deg);
  clip-path: polygon(0 20%, 100% 0, 99.7% 100%, .5% 86%);
  pointer-events: none;
}
.c { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 6px 10px 14px; }
.sala-linha > .c-num { grid-row: span 3; justify-content: flex-start; padding-top: 12px; }
.sala-linha > .c-num::after,
.sala3-num::after {
  content: '';
  position: absolute;
  right: -4px; top: -4px; bottom: -4px;
  width: 8px;
  background: var(--fita-v);
}
.num { font: 400 2.4rem/1 var(--marcador); -webkit-text-stroke: .043em currentColor; }
.proc-nome { font: 400 clamp(1.4rem, 1.15rem + .6vw, 1.6rem)/1.3 var(--marcador); -webkit-text-stroke: .02em currentColor; text-wrap: balance; }
.proc-nota { font: 400 1.15rem/1.3 var(--marcador); color: var(--tinta-suave); }
.c-equipe, .c-sit { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 4px 10px; padding-block: 4px; }
.sala-linha > .c-sit { padding-bottom: 14px; }
.mini {
  display: inline-block;
  flex: 0 0 5.4rem;
  font: 800 .78rem/1 var(--impresso);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--texto-impresso-2);
}
.equipe-vazia { font: 400 1.22rem/1.3 var(--marcador); color: var(--tinta-suave); }
.equipe-traco { font: 400 1.5rem/1 var(--marcador); color: var(--tinta-suave); }
.c-equipe .escrita { font-size: clamp(1.4rem, 1.15rem + .6vw, 1.75rem); }
.c-equipe .escrita-wrap { flex: 0 1 auto; }
.sit { display: inline-flex; align-items: center; gap: 10px; }
.sit-txt { font: 400 1.3rem/1.3 var(--marcador); }

/* ---------- Sala 3: os votos ---------- */
.sala3 {
  grid-area: sala3;
  position: relative;
  display: grid;
  grid-template-columns: var(--num) minmax(0, 1fr);
  padding-top: 4px;
}
.sala3-num { position: relative; padding: 12px 6px 0 14px; }
.sala3-corpo { min-width: 0; padding: 10px 0 0 14px; }
.sala3-titulo {
  margin: 0;
  font: 400 clamp(1.55rem, 1.25rem + .8vw, 1.9rem)/1.3 var(--marcador);
  -webkit-text-stroke: .02em currentColor;
}
.sala3-dica { margin: 4px 0 0; font: 400 1.16rem/1.35 var(--marcador); color: var(--tinta-apoio); }
.zona {
  position: relative;
  display: block;
  min-height: 4.4rem;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  transition: background-color .2s ease-out;
}
.zona-contorno { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.zona-contorno rect { fill: none; stroke: var(--tinta-azul); stroke-opacity: .5; stroke-width: 2.2px; stroke-dasharray: 10 7; stroke-linecap: round; }
.zona-dica {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 12px;
  font: 400 1.16rem/1.3 var(--marcador);
  color: var(--tinta-suave);
  text-align: center;
  pointer-events: none;
}
.zona.tem-votos .zona-dica { display: none; }
.zona.alvo { background-color: rgba(196, 40, 43, .06); }
.zona.alvo .zona-contorno rect { stroke: var(--tinta-vermelha); stroke-opacity: .95; }
.zona-lista { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zona-lista > li { position: relative; display: flex; max-width: 100%; }
.voto-status { margin: 10px 0 0; font: 400 1.16rem/1.35 var(--marcador); color: var(--tinta-azul); }
.voto-status:empty { display: none; }
.voto-status.is-erro { color: var(--tinta-vermelha); }

/* ---------- Grupos de ímãs: Cirurgias e Procedimentos ---------- */
.grupos { grid-area: grupos; min-width: 0; }
.votar-titulo {
  margin: 0;
  font: 400 clamp(1.7rem, 1.4rem + .9vw, 2.1rem)/1.15 var(--marcador);
  color: var(--tinta-vermelha);
  -webkit-text-stroke: .03em currentColor;
  paint-order: stroke fill;
}
.votar-dica { margin: 4px 0 0; max-width: 46ch; font: 400 1.16rem/1.35 var(--marcador); color: var(--tinta-apoio); }
.sala3 { scroll-margin-top: 16px; }
.contador {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 14px;
  padding: 6px 14px 6px 10px;
  border-radius: 8px;
  font: 400 1.2rem/1.3 var(--marcador);
  color: var(--tinta-preta);
  text-decoration: none;
  background: var(--papel);
  box-shadow: inset 0 0 0 1px rgba(30, 34, 38, .1), 0 2px 2px rgba(20, 30, 40, .16), 0 12px 18px -10px rgba(20, 30, 40, .5);
}
.contador strong { font-weight: 400; color: var(--tinta-vermelha); }
.contador:not(.tem-votos) strong { color: var(--tinta-suave); }
.contador .ima { --d: 1.35rem; }
.contador-seta { width: 20px; height: 20px; margin-left: auto; fill: none; stroke: var(--tinta-azul); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.contador:hover { color: var(--tinta-preta); }
.contador:focus-visible { outline-color: var(--tinta-vermelha); }
.grupos > .outra { margin: 14px 0 6px; }
.grupo + .grupo { margin-top: 14px; }
.grupo > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 2px 4px;
  list-style: none;
  cursor: pointer;
  border-radius: 6px;
}
.grupo > summary::-webkit-details-marker { display: none; }
.grupo-titulo {
  margin: 0;
  display: inline-block;
  padding: .55em .75em .5em;
  font: 800 .92rem/1 var(--impresso);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: var(--sombra-papel), inset 0 0 0 1px rgba(30, 34, 38, .08);
  rotate: -.8deg;
}
.grupo-seta { width: 22px; height: 22px; margin-left: auto; fill: none; stroke: var(--tinta-suave); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .2s ease-out; }
.grupo[open] .grupo-seta { rotate: 180deg; }
.grupo-lista { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.vaga { position: relative; display: flex; min-height: 48px; }
.vaga.vazia::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  background: rgba(86, 101, 127, .05);
  border: 2px dashed rgba(86, 101, 127, .32);
}
.rastro { display: none; }
.vaga.vazia .rastro {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .5em;
  width: 100%;
  padding: 6px 14px;
  font: 400 1.08rem/1.3 var(--marcador);
  color: var(--tinta-suave);
}
.rastro-onde { color: var(--tinta-vermelha); }

.ima-etiqueta {
  --giro: 0deg;
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 6px 10px 6px 7px;
  border: 0;
  border-radius: 4px;
  text-align: left;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: 0 1px 1px rgba(20, 30, 40, .16), 0 6px 11px -7px rgba(20, 30, 40, .45), inset 0 0 0 1px rgba(30, 34, 38, .07);
  rotate: var(--giro);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow .2s ease-out;
}
.ima-etiqueta .ima { --d: 1.35rem; }
.ima-etiqueta:focus-visible { outline-color: var(--tinta-vermelha); outline-offset: 3px; }
.ima-etiqueta.arrastando {
  z-index: 80;
  cursor: grabbing;
  rotate: 2.5deg;
  transition: none;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .12), 0 26px 30px -14px rgba(20, 30, 40, .6), inset 0 0 0 1px rgba(30, 34, 38, .07);
}
.ima-texto { display: block; min-width: 0; }
.ima-nome { display: block; font: 700 .95rem/1.3 var(--impresso); overflow-wrap: break-word; hyphens: none; }
.grupo-lista > .vaga.longo { grid-column: 1 / -1; }
.ima-votos { display: block; margin-top: 2px; font: 500 .84rem/1.3 var(--impresso); color: var(--texto-impresso-2); }
.ima-votos:empty { display: none; }
.zona-lista .ima-etiqueta { width: auto; min-height: 44px; padding: 5px 12px 5px 6px; }
.zona-lista .ima-etiqueta .ima { --d: 1.45rem; }
body.em-arrasto, body.em-arrasto * { cursor: grabbing !important; }

/* etiqueta escrita a marcador (outra cirurgia ou procedimento) */
.livre {
  align-items: center;
  min-height: 44px;
  padding: 4px 4px 4px 8px;
  border-radius: 4px;
  background: var(--papel);
  box-shadow: 0 1px 1px rgba(20, 30, 40, .16), 0 6px 11px -7px rgba(20, 30, 40, .45), inset 0 0 0 1px rgba(30, 34, 38, .07);
  rotate: var(--giro, 0deg);
}
.livre .ima { --d: 1.45rem; margin-right: 10px; }
.livre-nome { min-width: 0; font: 400 1.22rem/1.3 var(--marcador); color: var(--tinta-azul); overflow-wrap: anywhere; }
.tirar-livre {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tinta-vermelha);
  cursor: pointer;
}
.tirar-livre svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.tirar-livre:focus-visible { outline-color: var(--tinta-vermelha); outline-offset: -2px; border-radius: 50%; }

/* ímã em branco: outra cirurgia ou procedimento */
.outra { margin-top: 14px; }
.outra-abrir {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 7px 12px 7px 8px;
  border: 2px dashed rgba(29, 75, 168, .55);
  border-radius: 6px;
  background: rgba(255, 255, 255, .55);
  font: 400 1.22rem/1.3 var(--marcador);
  color: var(--tinta-azul);
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease-out, border-color .2s ease-out;
}
.outra-abrir[aria-expanded="true"] { background: var(--papel); border-color: var(--tinta-azul); }
.outra-form { margin-top: 12px; padding: 2px 2px 0; }
.outra-rotulo {
  display: inline-block;
  padding: .5em .7em .44em;
  font: 800 .8rem/1 var(--impresso);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: var(--sombra-papel), inset 0 0 0 1px rgba(30, 34, 38, .08);
  rotate: -.8deg;
}
.outra-dica { margin: 8px 0 0; font: 400 1.14rem/1.35 var(--marcador); color: var(--tinta-apoio); }
.outra-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 6px; }
.outra-campo {
  flex: 1 1 12rem;
  min-width: 0;
  height: 3rem;
  margin: 0;
  padding: 0 .25em 3px;
  border: 0;
  background: linear-gradient(var(--traco, var(--tinta-preta)), var(--traco, var(--tinta-preta))) left bottom / 100% 3px no-repeat;
  font: 400 1.4rem/1 var(--marcador);
  color: var(--tinta-azul);
  caret-color: var(--tinta-vermelha);
}
.outra-campo:focus-visible { outline-offset: 5px; }
.outra-campo[aria-disabled="true"] { --traco: var(--aluminio-escuro); color: var(--tinta-suave); }
.outra-botao {
  appearance: none;
  flex: none;
  min-height: 3rem;
  margin: 0;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 7px;
  font: 800 .92rem/1 var(--impresso);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #2c5ec3 0, #1d4ba8 52%, #173f90 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 2px 2px rgba(20, 30, 40, .24), 0 8px 12px -8px rgba(20, 30, 40, .6);
  cursor: pointer;
}
.outra-botao:active { translate: 0 1px; }
.outra-botao:focus-visible { outline-color: var(--tinta-vermelha); outline-offset: 4px; border-radius: 9px; }
.outra-botao[aria-disabled="true"] { cursor: not-allowed; background: #5d6878; }
.outra-msg { margin: 8px 0 0; font: 400 1.14rem/1.35 var(--marcador); color: var(--tinta-azul); }
.outra-msg:empty { display: none; }
.outra-msg.is-erro { color: var(--tinta-vermelha); }

/* ---------- Seção seguinte: o que já dá para treinar ---------- */
.quadro-salas { margin-top: clamp(32px, 6vw, 76px); }
.lousa-salas { padding-bottom: clamp(18px, 2vw, 28px); }
.salas-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 40px; padding-bottom: 8px; }
.salas-titulo {
  margin: 0;
  max-width: 19ch;
  font: 400 clamp(1.9rem, 1.2rem + 2.3vw, 3.4rem)/1 var(--marcador);
  -webkit-text-stroke: .034em currentColor;
  text-wrap: balance;
}
.legenda-imas { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 6px; font: 400 1.24rem/1 var(--marcador); }
.legenda-item { display: inline-flex; align-items: center; gap: 9px; }

.sala {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "corpo" "lado";
  gap: 14px;
  padding: 28px 0 20px;
}
.sala-n { margin-right: .15em; font-size: 1.3em; color: var(--tinta-preta); }
.sala-corpo { grid-area: corpo; min-width: 0; }
.sala-lado { grid-area: lado; display: flex; flex-direction: column; min-width: 0; }
.sala-nome {
  margin: 0;
  font: 400 clamp(1.7rem, 1.25rem + 1.4vw, 2.5rem)/1.2 var(--marcador);
  -webkit-text-stroke: .031em currentColor;
  color: var(--tinta-azul);
  text-wrap: balance;
}
.sala-faz { margin: 10px 0 0; max-width: 54ch; text-wrap: pretty; font: 400 1.22rem/1.35 var(--marcador); color: var(--tinta-apoio); }
.sala-faz + .sala-faz { margin-top: 4px; }
.sala-prioridade {
  position: relative;
  display: inline-block;
  margin: 14px 0 0;
  font: 400 1.3rem/1.3 var(--marcador);
  color: var(--tinta-vermelha);
  -webkit-text-stroke: .024em currentColor;
}
.sala-prioridade svg { position: absolute; left: -2%; bottom: -.32em; width: 104%; height: .4em; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.4px; stroke-linecap: round; }
.sala-prioridade svg path { vector-effect: non-scaling-stroke; }
.cenas { list-style: none; margin: 16px 0 0; padding: 0; }
.cena {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 11px 2px 12px;
  background: linear-gradient(rgba(30, 34, 38, .3), rgba(30, 34, 38, .3)) left bottom / 100% 2px no-repeat;
}
.cena:last-child { background: none; }
.cena-nome { font: 400 1.26rem/1.3 var(--marcador); }
.cena-sit { display: inline-flex; align-items: center; gap: 9px; font: 400 1.16rem/1 var(--marcador); white-space: nowrap; }
.cena-sit .ima { --d: 1.35rem; }
.cena-sit.proto { color: var(--tinta-verde); }
.sala-lado .foto-impressa { rotate: var(--giro-foto, 1.2deg); align-self: center; margin-top: 12px; }

/* ---------- Rodapé ---------- */
.rodape {
  padding: 28px 16px calc(36px + env(safe-area-inset-bottom));
  text-align: center;
  font: 500 .98rem/1.5 var(--impresso);
  color: #39443d;
}
.rodape p { margin: 0; }
.rodape-etiqueta {
  display: inline-block;
  margin-right: .5em;
  padding: .35em .6em .3em;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: var(--sombra-papel);
  rotate: -1deg;
}
.rodape-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin-top: 8px !important; }
.rodape-links a { display: inline-block; padding: 10px 2px; color: #1a3f8c; }

/* ---------- Fotos impressas: polaroides presas por ímã ---------- */
.polaroide {
  position: relative;
  margin: 0;
  padding: 8px 8px 0;
  background: #fff;
  box-shadow: 0 1px 1px rgba(20, 30, 40, .18), 0 14px 22px -14px rgba(20, 30, 40, .5);
  rotate: var(--giro, 0deg);
  transform-origin: 50% 0;
  transition: rotate .4s cubic-bezier(.16, 1, .3, 1), translate .4s cubic-bezier(.16, 1, .3, 1);
}
.polaroide > .ima { position: absolute; top: -12px; left: 50%; translate: -50% 0; z-index: 2; --d: 1.7rem; }
.polaroide img { display: block; width: 100%; height: auto; filter: saturate(1.04) contrast(1.02); }
.polaroide figcaption {
  padding: 8px 4px 11px;
  font: 400 1.18rem/1.3 var(--marcador);
  color: var(--tinta-azul);
  text-align: center;
}
.polaroide:active { rotate: 0deg; }
.bloco-titulo {
  margin: 0;
  font: 400 clamp(1.5rem, 1.25rem + .8vw, 1.9rem)/1.2 var(--marcador);
  color: var(--tinta-preta);
  -webkit-text-stroke: .025em currentColor;
  paint-order: stroke fill;
}
.bloco-frase { margin: 6px 0 0; max-width: 54ch; text-wrap: pretty; font: 400 1.22rem/1.35 var(--marcador); color: var(--tinta-apoio); }
.bloco-legenda { margin: 10px 0 0; font: 400 1.1rem/1.3 var(--marcador); color: var(--tinta-suave); }

.casos { gap: 0; }
.casos-lista { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.casos-lista > li { width: min(100%, 360px); }
.casos-lista > li:nth-child(even) { justify-self: end; }

/* ---------- Abertura: a sequência em vídeo, presa pelo ímã ---------- */
.foto-papel { position: relative; }
.sequencia-video { display: block; width: 100%; height: auto; background: #2a2622; }
.sequencia-botao {
  appearance: none;
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 6px 14px 6px 10px;
  border: 0;
  border-radius: 7px;
  font: 800 .86rem/1.3 var(--impresso);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tinta-preta);
  background: var(--papel);
  box-shadow: 0 1px 1px rgba(20, 30, 40, .2), 0 8px 14px -8px rgba(20, 30, 40, .6);
  cursor: pointer;
}
.sequencia-botao svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sequencia-botao[data-estado="tocando"] .ic-ver,
.sequencia-botao:not([data-estado="tocando"]) .ic-pausa { display: none; }
.sequencia-botao:focus-visible { outline-color: var(--tinta-vermelha); outline-offset: 3px; }
.sequencia.parada .sequencia-botao { color: #fff; background: linear-gradient(180deg, #2c5ec3 0, #1d4ba8 52%, #173f90 100%); }
.sequencia-legenda { display: block; margin-top: 10px; }
.sequencia-passos {
  list-style: none;
  counter-reset: passo;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0 4px;
  font: 400 1.08rem/1.35 var(--marcador);
  color: var(--tinta-suave);
}
.sequencia-passos li { position: relative; counter-increment: passo; transition: color .25s ease-out; }
.sequencia-passos li::before { content: counter(passo) ". "; }
.sequencia-passos li.atual { color: var(--tinta-vermelha); -webkit-text-stroke: .02em currentColor; paint-order: stroke fill; }
.sequencia-passos li.atual::after {
  content: '';
  position: absolute;
  left: -3%; right: -3%; bottom: -.18em;
  height: .36em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7c38-5 84-7 128-4 22 1 44 2 66 0' fill='none' stroke='%23c4282b' stroke-width='2.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
.sequencia-legenda .legenda-marcador { margin-top: 6px; font-size: 1.12rem; rotate: .8deg; }
@media (hover: hover) {
  .sequencia-botao:hover { translate: 0 -1px; }
}

/* dica de voto: arrastar só existe com mouse */
.dica-toque { display: none; }
@media (pointer: coarse) {
  .dica-mouse { display: none; }
  .dica-toque { display: inline; }
}

/* celular: o controle do vídeo vira um botão redondo só com o ícone */
@media (max-width: 599px) {
  .sequencia-botao { left: 10px; bottom: 10px; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .sequencia-botao [data-ver-txt] {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* desktop: o contador da Sala 3 fica parado no fim da lista (fixo só no celular) */
@media (min-width: 1100px) {
  .contador { position: static; }
}

/* ---------- Formulário: NOME e WHATSAPP em etiquetas; e-mail recolhido ---------- */
.inscricao-campos {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
}
.campo-linha, .campo-email { display: contents; }
.campo-linha[hidden] { display: none; }
.inscricao-campos .etiqueta-equipe { justify-self: start; }
.inscricao-campos .campo { width: 100%; }
.campo[aria-invalid="true"] { --traco: var(--tinta-vermelha); }
.link-email {
  appearance: none;
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: none;
  font: 400 1.18rem/1.3 var(--marcador);
  color: var(--tinta-azul);
  cursor: pointer;
}
.link-email[hidden] { display: none; }
.link-email svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.opcional {
  margin-left: .35em;
  font: 500 .78rem/1 var(--impresso);
  letter-spacing: .02em;
  text-transform: none;
  color: var(--texto-impresso-2);
}
.complemento-email { margin-top: 14px; }
.complemento-email .campo { width: 100%; margin-top: 6px; }

/* ---------- Comemoração depois de entrar: nome, ímã que cai, fila circulada e rabiscos ---------- */
.sucesso { position: relative; }
.sucesso > :not(.festa) { position: relative; z-index: 1; }
.nome-etiqueta {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 4px 14px 4px 24px;
  background: var(--papel);
  box-shadow: var(--sombra-papel), inset 0 0 0 1px rgba(30, 34, 38, .08);
  rotate: -.8deg;
}
.nome-etiqueta > .ima-cai { position: absolute; left: -12px; top: 50%; margin-top: -.8rem; z-index: 2; --d: 1.6rem; }
.festa {
  position: absolute;
  top: -22px;
  right: -4px;
  z-index: 0;
  display: none;
  width: min(62%, 300px);
  height: auto;
  pointer-events: none;
}
.sucesso.festejo .festa { display: block; }
.festa .r1 { --d: .7s; } .festa .r2 { --d: .8s; } .festa .r3 { --d: .92s; }
.festa .r4 { --d: 1.02s; } .festa .r5 { --d: 1.12s; } .festa .r6 { --d: 1.22s; }
.escrevendo .ima-cai { animation: cai .62s cubic-bezier(.3, .6, .4, 1) calc(var(--atraso, 0s) + var(--dur, 1s)) both; }
.escrevendo .festa path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: circular .35s ease-out calc(var(--atraso, 0s) + var(--dur, 1s) + var(--d, .8s)) both;
}
@keyframes cai {
  0% { translate: 0 -90px; rotate: -25deg; opacity: 0; }
  12% { opacity: 1; }
  62% { translate: 0 4px; rotate: 5deg; }
  82% { translate: 0 -2px; rotate: -1deg; }
  100% { translate: 0 0; rotate: 0deg; opacity: 1; }
}

/* a foto da abertura entra presa pelo ímã com um balanço curto */
@media (prefers-reduced-motion: no-preference) {
  .foto-hero { animation: balanco 1.3s cubic-bezier(.3, .7, .4, 1) .15s both; }
  @keyframes balanco {
    0% { rotate: -4.5deg; }
    38% { rotate: 1deg; }
    68% { rotate: -2deg; }
    100% { rotate: -1.2deg; }
  }
}
@media (hover: hover) {
  .polaroide:hover { rotate: 0deg; translate: 0 -3px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .casos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .casos-lista > li { width: auto; }
}

/* ============================================================
   Páginas simples: privacidade, 404 e admin
   ============================================================ */
.pg-simples .lousa { padding-bottom: 32px; }
.pg-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.pg-titulo {
  margin: 22px 0 0;
  max-width: 18em;
  font: 400 clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem)/1 var(--marcador);
  -webkit-text-stroke: .034em currentColor;
  text-wrap: balance;
}
.pg-titulo + p { margin-top: 12px; }
.pg-lead { max-width: 56ch; font: 400 1.25rem/1.3 var(--marcador); color: var(--tinta-apoio); }
.folha-texto {
  position: relative;
  max-width: 760px;
  margin-top: 26px;
  padding: 26px clamp(18px, 4vw, 40px) 28px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(20, 30, 40, .16), 0 14px 22px -14px rgba(20, 30, 40, .45);
  font: 500 1.06rem/1.6 var(--impresso);
  color: var(--texto-impresso);
}
.folha-texto > .ima { position: absolute; top: -12px; left: 26px; --d: 1.6rem; }
.folha-texto h2 { margin: 26px 0 6px; font: 800 .95rem/1.3 var(--impresso); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-preta); }
.folha-texto h2:first-of-type { margin-top: 0; }
.folha-texto ul { margin: 0; padding-left: 1.2em; }
.folha-texto li + li { margin-top: 6px; }
.folha-texto p { margin: 8px 0 0; }
.versao { font: 500 .9rem/1.4 var(--impresso); color: var(--texto-impresso-2); }
.pg-voltar { margin: 24px 0 0; }

/* admin */
.pg-admin .lousa { padding-bottom: 32px; }
.admin-entrar { max-width: 520px; margin-top: 22px; }
.admin-entrar label { display: block; font: 800 .82rem/1 var(--impresso); letter-spacing: .12em; text-transform: uppercase; }
.admin-linha { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 10px; }
.admin-linha input {
  flex: 1 1 14rem;
  min-width: 0;
  height: 3rem;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(30, 34, 38, .3);
  font: 500 1.05rem/1 var(--impresso);
}
.admin-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.admin-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-resumo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 22px; }
.admin-bloco { padding: 18px 18px 20px; background: #fff; box-shadow: var(--sombra-papel); min-width: 0; }
.admin-bloco h2 { margin: 0 0 10px; font: 800 .9rem/1.3 var(--impresso); letter-spacing: .12em; text-transform: uppercase; }
.admin-barras { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.admin-barras li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; font: 500 .98rem/1.3 var(--impresso); isolation: isolate; }
.admin-barras i { position: absolute; inset: 0 auto 0 0; z-index: -1; background: rgba(29, 75, 168, .12); border-radius: 3px; }
.admin-barras strong { font-variant-numeric: tabular-nums; }
.admin-sugestoes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-sugestoes li { padding: 10px 0; border-bottom: 1px solid #dfe3df; }
.admin-sugestoes li:last-child { border-bottom: 0; }
.admin-sugestoes p { margin: 0; font: 500 1rem/1.45 var(--impresso); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-sugestoes small { display: block; margin-top: 4px; font: 500 .85rem/1.3 var(--impresso); color: var(--texto-impresso-2); }
.admin-tabela { margin-top: 12px; overflow-x: auto; background: #fff; box-shadow: var(--sombra-papel); }
.admin-tabela table { width: 100%; border-collapse: collapse; font: 500 .92rem/1.35 var(--impresso); font-variant-numeric: tabular-nums; }
.admin-tabela th { position: sticky; top: 0; padding: 10px; text-align: left; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; background: var(--papel); border-bottom: 2px solid var(--tinta-preta); }
.admin-tabela td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid #e3e6e3; }
.admin-tabela td:nth-child(3) { overflow-wrap: anywhere; }
.admin-secao { margin-top: 26px; }
.admin-busca { max-width: 520px; margin-top: 18px; }
.admin-busca label { display: block; font: 800 .82rem/1.3 var(--impresso); letter-spacing: .12em; text-transform: uppercase; }
.admin-busca input { width: 100%; height: 3rem; margin-top: 8px; padding: 0 12px; border: 2px solid rgba(30, 34, 38, .35); background: #fff; font: 500 1.05rem/1 var(--impresso); }
.admin-secao > h2 { margin: 0; font: 400 1.6rem/1.3 var(--marcador); -webkit-text-stroke: .02em currentColor; paint-order: stroke fill; }
.admin-status { margin: 10px 0 0; font: 400 1.2rem/1.3 var(--marcador); color: var(--tinta-azul); }
.admin-total { margin: 0; font: 400 clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem)/1 var(--marcador); color: var(--tinta-azul); -webkit-text-stroke: .03em currentColor; paint-order: stroke fill; font-variant-numeric: tabular-nums; }
.admin-status:empty { display: none; }

/* ============================================================
   Larguras maiores
   ============================================================ */

@media (min-width: 480px) {
  .marca img { width: 50px; height: 50px; margin: 0 -16px -6px 0; }
  .marca-etiqueta { padding: .55em .8em .5em 1.45em; font-size: .98rem; letter-spacing: .1em; }
  .selo { padding: .5em .7em .44em; font-size: .78rem; line-height: 1; letter-spacing: .12em; }
  .partilha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inscricao .botao { width: auto; min-width: 15rem; }
}

@media (min-width: 720px) {
  :root { --num: 4.2rem; }
  .lousa { --lousa-x: clamp(18px, 3.2vw, 46px); padding: 22px var(--lousa-x) 30px; }
  .marca img { width: 58px; height: 58px; margin-right: -18px; }
  .marca-etiqueta { font-size: 1.08rem; }
  .selo { font-size: .8rem; }

  /* o mapa vira a tabela de fita isolante */
  .mapa-cab {
    display: grid;
    grid-template-columns: var(--num) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.08fr);
    position: relative;
  }
  .mapa-cab .c { padding: 4px 14px 12px 16px; justify-content: flex-end; }
  .mapa-cab .rotulo { align-self: flex-start; font-size: .82rem; padding: .5em .7em .44em; }
  .mapa-cab .c + .c::before,
  .sala-linha > .c + .c::before {
    content: '';
    position: absolute;
    left: -4px; top: -4px; bottom: -4px;
    width: 8px;
    z-index: 1;
    background: var(--fita-v);
    pointer-events: none;
  }
  .mapa-cab .c + .c::before { top: 2px; }
  .sala-linha { grid-template-columns: var(--num) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.08fr); padding: 0; }
  .sala-linha > .c-num { grid-row: auto; justify-content: center; padding-top: 10px; }
  .sala-linha > .c-num::after { display: none; }
  .c { padding: 12px 14px 13px 16px; }
  .c-equipe, .c-sit { flex-direction: column; align-items: flex-start; padding-block: 12px 13px; }
  .sala-linha > .c-sit { padding-bottom: 13px; }
  .mini {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .num { font-size: 2.7rem; }
  .sala3-num { padding: 14px 6px 0 16px; display: flex; justify-content: flex-start; }
  .sala3-corpo { padding: 12px 0 0 16px; }

  .cena { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 18px; }
  .admin-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .sala {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
    grid-template-areas: "corpo lado";
    column-gap: clamp(28px, 4vw, 64px);
  }
  .casos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .casos-lista > li:nth-child(even) { margin-top: 26px; }
  .complemento { padding: 26px 26px 22px; }
}

@media (min-width: 1100px) {
  .lousa { --lousa-x: clamp(30px, 3.2vw, 46px); padding: 26px var(--lousa-x) 34px; }
  /* duas colunas independentes: a grade vem logo depois do formulário e os votos logo depois da foto */
  .mapa-grade {
    grid-template-columns: minmax(0, 1fr) clamp(380px, 36vw, 520px);
    grid-template-areas: none;
    align-items: start;
    column-gap: clamp(36px, 3.6vw, 60px);
  }
  .col-a, .col-b { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .col-a > *, .col-b > * { align-self: stretch; }
  .col-b > .foto-hero { align-self: center; width: 100%; margin-top: 12px; }
  .grupo-lista .ima-nome { font-size: .92rem; }
  .grupo-lista { display: flex; flex-wrap: wrap; gap: 8px; }
  .grupo-lista > .vaga { flex: 0 1 auto; max-width: 100%; min-height: 44px; }
  .grupo-lista .ima-etiqueta { width: auto; min-height: 44px; padding: 5px 12px 5px 7px; }
  .grupo-lista .vaga.vazia { min-width: 8rem; }
  .grupos { padding-top: 4px; }
  .mapa { margin-top: 2px; }
  .partilha { grid-template-columns: repeat(2, minmax(0, max-content)); }
  .partilha .botao { min-width: 13.5rem; }
}

@media (pointer: fine) {
  .lousa { cursor: var(--cursor-marcador), auto; }
  .campo, .outra-campo, .complemento textarea { cursor: var(--cursor-marcador), text; }
  .ima-etiqueta { cursor: grab; }
}

@media (hover: hover) {
  .botao:hover { translate: 0 -1px; }
  .ima-etiqueta:hover { box-shadow: 0 1px 1px rgba(20, 30, 40, .16), 0 12px 16px -9px rgba(20, 30, 40, .5), inset 0 0 0 1px rgba(30, 34, 38, .07); }
  .outra-abrir:hover { background: var(--papel); border-color: var(--tinta-azul); }
  .tirar-livre:hover { background: rgba(196, 40, 43, .1); }
  .grupo > summary:hover .grupo-seta { stroke: var(--tinta-azul); }
}

@media (max-width: 374px) {
  .topo { flex-wrap: wrap; }
}

@media (max-width: 359px) {
  .grupo-lista { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .titulo { font-size: 2.1rem; }
  .etiqueta-equipe { font-size: .82rem; }
}

/* ============================================================
   Variante de material fotográfico (?material=foto)
   Ímãs e fita em PNG com a própria sombra. Sem a classe, nada muda.
   ============================================================ */

/* ímãs: a imagem da cor certa, sem gradiente nem sombra de CSS */
.material-foto .ima {
  background: url('/img/material/ima-verde.png') center / contain no-repeat;
  box-shadow: none;
}
.material-foto .ima-verde { background-image: url('/img/material/ima-verde.png'); }
.material-foto .ima-amarelo { background-image: url('/img/material/ima-amarelo.png'); }
.material-foto .ima-vermelho { background-image: url('/img/material/ima-vermelho.png'); }
.material-foto .ima-azul { background-image: url('/img/material/ima-azul.png'); }
.material-foto .ima-branco { background-image: url('/img/material/ima-branco.png'); }
.material-foto .ima-vazio { background: none; }
.material-foto .chip input:checked + span::before {
  background: url('/img/material/ima-azul.png') center / contain no-repeat;
  box-shadow: none;
}

/* fita horizontal: pontas rasgadas nas extremidades, miolo repetido (60 px da imagem viram 17 px) */
.material-foto .sala-linha::before,
.material-foto .sala3::before,
.material-foto .sala::before,
.material-foto .complemento::before {
  background: none;
  clip-path: none;
  border-style: solid;
  border-color: transparent;
  border-width: 4px 17px;
  border-image: url('/img/material/fita-h1.png') 14 60 / 4px 17px / 0 round stretch;
}
.material-foto .sala-linha:nth-child(2)::before,
.material-foto .sala:nth-of-type(even)::before,
.material-foto .complemento::before { border-image-source: url('/img/material/fita-h2.png'); }
.material-foto .sala3::before,
.material-foto .sala:nth-of-type(odd)::before { border-image-source: url('/img/material/fita-h3.png'); }

/* fita vertical */
.material-foto .sala-linha > .c-num::after,
.material-foto .sala3-num::after,
.material-foto .mapa-cab .c + .c::before,
.material-foto .sala-linha > .c + .c::before {
  background: none;
  border-style: solid;
  border-color: transparent;
  border-width: 17px 4px;
  border-image: url('/img/material/fita-v1.png') 60 14 / 17px 4px / 0 stretch round;
}
.material-foto .mapa-cab .c:nth-child(3)::before,
.material-foto .sala-linha > .c:nth-child(3)::before,
.material-foto .sala-linha:nth-child(2) > .c-num::after { border-image-source: url('/img/material/fita-v2.png'); }
.material-foto .mapa-cab .c:nth-child(4)::before,
.material-foto .sala-linha > .c:nth-child(4)::before,
.material-foto .sala3-num::after { border-image-source: url('/img/material/fita-v3.png'); }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .ponta { display: none; }
}
