@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/fredoka.woff2") format("woff2");
}

:root {
  --navy: #071a4d;
  --teal: #128f89;
  --blue: #1a62e8;
  --ink: #3e5168;
  --muted: #5d6e82;
  --line: #d5e3f0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
  touch-action: manipulation;
}

input,
textarea,
select {
  font-size: 16px !important;
}

.campo-data {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 3rem;
  max-height: 3rem;
  margin: 0;
  padding: 0 0.75rem;
  line-height: 3rem;
  overflow: hidden;
  field-sizing: fixed;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  line-height: 3rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0 0 0 0.35rem;
  padding: 0;
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

#busca-estrategia,
#busca-ajuda {
  font-size: 12.5px !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--navy);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background-color: #f4fbfe;
  background-image:
    radial-gradient(540px 420px at -4% 10%, rgba(186, 224, 255, 0.85), transparent 70%),
    radial-gradient(680px 520px at 108% -6%, rgba(155, 214, 255, 0.78), transparent 68%),
    radial-gradient(420px 340px at 96% 38%, rgba(190, 236, 214, 0.55), transparent 72%),
    radial-gradient(360px 260px at 72% 12%, rgba(255, 226, 176, 0.38), transparent 70%),
    radial-gradient(520px 360px at 8% 100%, rgba(210, 234, 255, 0.7), transparent 70%);
}

::selection {
  background: #c8f3ee;
  color: var(--navy);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #8eb6ff !important;
  outline-offset: 3px;
}

#site-header.is-scrolled {
  background: rgba(244, 251, 254, 0.92);
  box-shadow: 0 10px 30px rgba(1, 32, 96, 0.06);
  backdrop-filter: blur(14px);
}

.nav-link {
  position: relative;
  color: #1a335f;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.font-display {
  font-family: Fredoka, "Plus Jakarta Sans", sans-serif;
}

.device {
  filter: drop-shadow(0 24px 28px rgba(16, 42, 88, 0.16));
}

.float-a {
  animation: floaty 6.5s ease-in-out infinite;
}

.float-b {
  animation: floaty 7.4s ease-in-out 0.5s infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(2px);
}

dialog {
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(7, 26, 77, 0.42);
}

.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f3f9fd;
  background-image: none;
}

.app-screen {
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 1.15rem 1rem 6.5rem;
}

.chip-row {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.est-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.12rem;
  border-radius: 999px;
  background: #fff;
  padding: 0.28rem 0.28rem;
  color: #5d7390;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 16px rgba(22, 49, 95, 0.06);
}

.est-chip.is-on {
  background: #3d7eef;
  color: #fff;
  box-shadow: none;
}

.menu-pontos > summary {
  list-style: none;
}

.menu-pontos > summary::-webkit-details-marker {
  display: none;
}

.home-link {
  border: 3px solid #fff;
  box-shadow: 0 10px 22px rgba(22, 49, 95, 0.07);
}

.home-art {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 10;
  width: 46%;
  max-height: 92%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

.app-screen.inicio-familia {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 1.05rem;
  padding-bottom: calc(4.35rem + env(safe-area-inset-bottom));
}

.inicio-familia > header img {
  height: 2.35rem;
}

.familia-hero {
  flex: none;
  margin-top: 1.7rem;
  padding: 1.35rem 1.05rem 1.45rem;
}

.familia-hero .home-art {
  width: 40%;
  max-height: 88%;
}

.inicio-familia .familia-atalhos {
  flex: none;
  margin-top: 1.7rem;
  gap: 1rem;
  grid-template-rows: 1fr 1fr;
}

.inicio-familia .familia-atalhos > a {
  height: 100%;
}

.app-screen.has-fab {
  padding-bottom: 9.5rem;
}

.app-screen.chat-tela {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0.55rem 0 0;
}

body:has(.chat-tela) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.chat-topo {
  flex: none;
  background: #f3f9fd;
  padding: 0.1rem 0.85rem 0.7rem;
}

.chat-lista {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0.35rem 1rem 6.75rem;
  touch-action: pan-y;
}

.chat-barra {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  display: flex;
  width: min(100%, 430px);
  transform: translateX(-50%);
  align-items: flex-end;
  gap: 0.5rem;
  background: #f3f9fd;
  padding: 0.65rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom));
}

.chat-editando {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(4.6rem + env(safe-area-inset-bottom));
  display: flex;
  width: min(100%, 430px);
  transform: translateX(-50%);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #fff;
  border-top: 1px solid #e3eef8;
  padding: 0.55rem 0.9rem;
  color: #16315f;
  font-size: 0.8rem;
  font-weight: 700;
}

.audio-zap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(12.75rem, 100%);
  margin-top: 0.15rem;
}

[data-bolha] {
  max-width: 100%;
}

.bolha-minha,
.bolha-recebida {
  min-width: 0;
}

.audio-zap audio {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  pointer-events: none;
}

.menu-pontos > div {
  left: 0;
  right: auto;
}

.audio-zap-play {
  display: grid;
  height: 2.35rem;
  width: 2.35rem;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #128f89;
  color: #fff;
  cursor: pointer;
}

.bolha-minha .audio-zap-play {
  background: #fff;
  color: #128f89;
}

.audio-zap-onda {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 1.4rem;
  cursor: pointer;
}

.audio-zap-onda span {
  width: 3px;
  flex: none;
  border-radius: 999px;
  background: #c5d5e4;
}

.audio-zap-onda span.is-on {
  background: #128f89;
}

.bolha-minha .audio-zap-onda span {
  background: #b7dcc8;
}

.bolha-minha .audio-zap-onda span.is-on {
  background: #0e7a68;
}

.audio-zap-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.15rem;
}

.audio-zap-tempo {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6a7c90;
}

.bolha-minha .audio-zap-tempo {
  color: #5f8a72;
}

.audio-zap-vel {
  border: 0;
  border-radius: 999px;
  background: rgba(18, 143, 137, 0.14);
  color: #0e7a68;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}

.popup-salvo {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 1rem;
  width: min(92vw, 22rem);
  transform: translateX(-50%);
  border-radius: 18px;
  background: #16315f;
  padding: 0.9rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 12px 32px rgba(7, 26, 77, 0.22);
}

.video-vertical {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 18.5rem);
  max-height: min(62dvh, 32rem);
  margin-inline: auto;
  border-radius: 1.5rem;
  background: #071a4d;
  object-fit: contain;
}

.fab-registro,
.fab-duvida {
  position: fixed;
  z-index: 40;
  right: max(1rem, calc((100% - 430px) / 2 + 1rem));
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.filtro-registro.is-on {
  background: #1a62e8;
  color: #fff;
  border-color: #1a62e8;
}

.app-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  display: grid;
  width: min(100%, 430px);
  transform: translateX(-50%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 22px 22px 0 0;
  background: #fff;
  padding: 0.4rem 0.2rem calc(0.45rem + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 28px rgba(7, 26, 77, 0.08);
}

.app-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: #8aa0b8;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.app-nav a.is-active {
  color: #1a62e8;
}

.app-nav a.is-active span {
  box-shadow: inset 0 -2px 0 #1a62e8;
}

html.is-installed,
html.is-installed body {
  overscroll-behavior-y: none;
}

#pull-refresh {
  position: fixed;
  z-index: 45;
  top: 0;
  left: 50%;
  display: none;
  align-items: center;
  gap: 0.45rem;
  transform: translate(-50%, -120%);
  border-radius: 999px;
  background: #fff;
  padding: 0.4rem 0.8rem;
  color: #1a62e8;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(7, 26, 77, 0.12);
}

html.is-installed #pull-refresh {
  display: flex;
}

#pull-refresh span {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid #d5e3f2;
  border-top-color: #1a62e8;
  border-radius: 999px;
}

#pull-refresh.is-ready span,
#pull-refresh.is-loading span {
  animation: pull-spin 0.7s linear infinite;
}

@keyframes pull-spin {
  to {
    transform: rotate(360deg);
  }
}

#app-preload {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #f4fbfe;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#app-preload img {
  width: 148px;
  height: 148px;
  animation: preload-pulse 1.15s ease-in-out infinite;
}

#app-preload.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes preload-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.94);
    opacity: 0.82;
  }
}

.choice-card {
  min-width: 0;
}

.choice-card .choice-label {
  min-width: 0;
  flex: 1;
  line-height: 1.15;
}

.choice-perfil {
  min-height: 5.25rem;
}

.choice-perfil .choice-label {
  flex: none;
  width: 100%;
  text-align: center;
}

.choice-perfil .radio-dot {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
}

.choice-card:has(input:checked) {
  border-color: #1a62e8;
  background: #e8f1ff;
  color: #1a62e8;
}

.radio-dot {
  height: 1rem;
  width: 1rem;
  flex: none;
  border-radius: 999px;
  border: 2px solid #c5d3e2;
}

.choice-card:has(input:checked) .radio-dot {
  border-color: #1a62e8;
  background: #1a62e8;
  box-shadow: inset 0 0 0 3px #fff;
}

.bib-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #fff;
  padding: 0.42rem 0.75rem;
  color: #31465f;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(22, 49, 95, 0.06);
}

.bib-chip.is-on {
  background: #1a62e8;
  color: #fff;
}

.bib-card {
  position: relative;
  display: flex;
  min-height: 9.4rem;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  padding: 0.72rem 0.7rem 2.15rem;
}

.bib-card img {
  position: absolute;
  top: 0.35rem;
  right: 0.2rem;
  height: 3.55rem;
  width: 3.9rem;
  object-fit: contain;
  object-position: right top;
  pointer-events: none;
}

.bib-youtube {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #071a4d;
  padding-top: 56.25%;
}

.bib-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.bib-card .bib-corpo {
  position: relative;
  z-index: 1;
  padding-right: 3.7rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .float-a,
  .float-b,
  #app-preload img {
    animation: none;
  }
}
