/* Botón flotante y panel de la guía de https://faithgroups.app/guia */
#fg-pilot-guide-root{position:static}
#fg-pilot-guide-root[hidden]{display:none!important}

.fgpg-fab{
  position:fixed;
  right:max(16px, env(safe-area-inset-right, 0px));
  bottom:calc(16px + env(safe-area-inset-bottom, 0px));
  z-index:40;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  min-width:48px;
  padding:0 16px;
  box-sizing:border-box;
  border:0;
  border-radius:999px;
  background:var(--teal-d, #007883);
  color:#fff;
  font:700 15px/1 Inter,system-ui,sans-serif;
  letter-spacing:.01em;
  box-shadow:0 6px 18px rgba(5,34,58,.18);
  cursor:pointer;
  margin:0;
  -webkit-appearance:none;
  appearance:none;
}
.fgpg-fab svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.fgpg-fab:hover,.fgpg-fab:focus{background:var(--teal-d, #007883);color:#fff}
.fgpg-fab:focus-visible{outline:none;box-shadow:0 0 0 3px #fff, 0 0 0 6px var(--teal-d, #007883)}

/* Encima de la barra inferior en teléfono, sin taparla. */
@media (max-width:1023px){
  body.is-in:not(.p3-bridge-open) .fgpg-fab{
    /* La barra ya está en el flujo (incluye el margen seguro). 28px de holgura. */
    bottom:calc(28px + var(--fg-tabbar-h, 56px));
  }
  body.is-in:not(.p3-bridge-open) .layout > .main,
  body.is-in:not(.p3-bridge-open) #app-main{
    padding-bottom:var(--fg-fab-clear, 92px);
    scroll-padding-bottom:var(--fg-fab-clear, 92px);
    box-sizing:border-box;
  }
}

/* En la portada y el login, el botón va a la izquierda de la barra
   superior, al otro lado del idioma, para no tapar ningún «Entrar».
   El escenario ocupa toda la ventana; el contenido largo se desplaza
   en .login y llega al final sin quedar bajo el botón. En la app, el
   botón sigue abajo, encima de la barra inferior. */
body:not(.is-in){overflow:hidden}
body:not(.is-in) .fgpg-fab{
  top:13px;
  bottom:auto;
  left:max(16px, env(safe-area-inset-left, 0px));
  right:auto;
}
#access-stage{
  height:100vh;
  height:100dvh;
  min-height:100vh;
  min-height:100dvh;
  box-sizing:border-box;
  overflow:hidden;
}
#access-stage .login{
  flex:1;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  align-items:center;
  align-items:safe center;
  box-sizing:border-box;
}

#fg-pilot-guide-root.is-open .fgpg-fab{visibility:hidden}

.fgpg-scrim{
  display:none;
  position:fixed;
  inset:0;
  z-index:60;
  background:rgba(5,34,58,.45);
  align-items:flex-end;
  justify-content:center;
  padding:0;
  box-sizing:border-box;
}
#fg-pilot-guide-root.is-open .fgpg-scrim{display:flex}

.fgpg-sheet{
  width:100%;
  max-width:100%;
  height:min(92vh, 100%);
  max-height:min(92vh, 100dvh);
  display:flex;
  flex-direction:column;
  background:#fafcfd;
  color:#05223a;
  border-radius:20px 20px 0 0;
  box-shadow:0 -8px 30px rgba(5,34,58,.16);
  box-sizing:border-box;
  overflow:hidden;
}

.fgpg-bar{
  flex:none;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:56px;
  padding:8px 8px 8px 18px;
  border-bottom:1px solid #d7e0e6;
  background:#fff;
}
.fgpg-bar h2{
  flex:1;
  min-width:0;
  margin:0;
  font:800 18px/1.2 Inter,system-ui,sans-serif;
  color:#05223a;
}
.fgpg-close{
  flex:none;
  width:48px;
  height:48px;
  margin:0;
  padding:0;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#05223a;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  -webkit-appearance:none;
  appearance:none;
}
.fgpg-close svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.fgpg-close:hover,.fgpg-close:focus{background:#e8eef2}
.fgpg-close:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(0,120,131,.35)}

.fgpg-body{
  flex:1;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:20px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing:border-box;
  max-width:100%;
}
.fgpg-body .head{margin:0 0 18px}
.fgpg-body .eyebrow{
  margin:0 0 8px;
  font:700 12px/1.2 Inter,system-ui,sans-serif;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#007883;
}
.fgpg-body h1{
  margin:0 0 10px;
  font:800 22px/1.25 Inter,system-ui,sans-serif;
  color:#05223a;
  text-wrap:balance;
}
.fgpg-body .guia-lead{
  margin:0;
  font:500 15px/1.5 Inter,system-ui,sans-serif;
  color:#3b5368;
}
.fgpg-body a{color:#007883;font-weight:600}
.fgpg-body a:hover{color:#05223a}

.fgpg-body .guia-roles{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 18px;
}
.fgpg-body .guia-roles [role=tab]{
  min-height:48px;
  padding:0 16px;
  border:1px solid #d7e0e6;
  border-radius:999px;
  background:#fff;
  color:#05223a;
  font:700 14px/1 Inter,system-ui,sans-serif;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}
.fgpg-body .guia-roles [role=tab][aria-selected=true]{
  background:#007883;
  border-color:#007883;
  color:#fff;
}
.fgpg-body .guia-roles [role=tab]:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(0,120,131,.35);
}

.fgpg-body .guia-intro{
  margin:0 0 16px;
  font:500 15px/1.5 Inter,system-ui,sans-serif;
  color:#3b5368;
}
.fgpg-body .guia-topic{
  margin:0 0 18px;
  padding:16px;
  background:#fff;
  border:1px solid #d7e0e6;
  border-radius:16px;
  box-sizing:border-box;
  max-width:100%;
}
.fgpg-body .guia-topic h3{
  margin:0 0 10px;
  font:800 17px/1.3 Inter,system-ui,sans-serif;
  color:#05223a;
}
.fgpg-body .guia-topic ol{
  margin:0 0 12px;
  padding:0 0 0 1.2em;
  font:500 15px/1.5 Inter,system-ui,sans-serif;
  color:#05223a;
}
.fgpg-body .guia-topic li{margin:0 0 8px;padding:0}
.fgpg-body .guia-video{
  margin:0;
  padding:12px 14px;
  border-radius:12px;
  background:#eef6f7;
  color:#3b5368;
  font:500 13px/1.4 Inter,system-ui,sans-serif;
}
.fgpg-body .guia-video p{margin:0 0 4px}
.fgpg-body .guia-video p:last-child{margin:0}
.fgpg-body .guia-video-langs{display:flex;gap:8px;margin-top:6px;font:700 11px/1 Inter,system-ui,sans-serif;letter-spacing:.04em;color:#007883}
.fgpg-source{
  margin:8px 0 0;
  font:500 13px/1.45 Inter,system-ui,sans-serif;
  color:#546675;
}

#fg-pilot-guide-root[data-lang=es] .en{display:none!important}
#fg-pilot-guide-root[data-lang=en] .es{display:none!important}

body.fg-pilot-guide-open{overflow:hidden}

@media (min-width:1024px){
  .fgpg-scrim{align-items:center;padding:32px 24px}
  .fgpg-sheet{
    width:min(720px, 100%);
    height:min(860px, 90vh);
    max-height:90vh;
    border-radius:20px;
  }
  .fgpg-body{padding:24px 28px 32px}
  .fgpg-body h1{font-size:28px}
}

@media (prefers-reduced-motion:reduce){
  .fgpg-fab,.fgpg-sheet,.fgpg-scrim{transition:none}
}

@media print{
  #fg-pilot-guide-root{display:none!important}
}
