:root {
  --gym-bg: #0d1117;
  --gym-surface: #161b22;
  --gym-surface-2: #1f2630;
  --gym-border: #2d3540;
  --gym-accent: #f97316;
  --gym-accent-2: #ea580c;
  --gym-text: #e6edf3;
  --gym-muted: #8b97a5;
}

html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  background-color: var(--gym-bg);
  color: var(--gym-text);
}

.text-accent { color: var(--gym-accent) !important; }

/* ---------- Navbar ---------- */
.gym-navbar {
  background: linear-gradient(90deg, #0d1117 0%, #161b22 100%);
  border-bottom: 2px solid var(--gym-accent);
}
.gym-navbar .navbar-brand { font-size: 1.4rem; letter-spacing: .5px; }
.gym-navbar .nav-link { font-weight: 600; }
.gym-navbar .nav-link:hover { color: var(--gym-accent) !important; }

/* ---------- Cards / surfaces ---------- */
.card {
  background-color: var(--gym-surface);
  border: 1px solid var(--gym-border);
  border-radius: 14px;
}
.card-accent { border-left: 4px solid var(--gym-accent); }

/* ---------- Buttons ---------- */
.btn-gym {
  background-color: var(--gym-accent);
  border-color: var(--gym-accent);
  color: #2a1200;
  font-weight: 700;
}
.btn-gym:hover { background-color: var(--gym-accent-2); border-color: var(--gym-accent-2); color: #fff; }

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, .35);
}

/* ---------- Progress bar ---------- */
.gym-progress {
  height: 28px;
  background-color: var(--gym-surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.gym-progress .progress-bar {
  background: linear-gradient(90deg, var(--gym-accent-2), var(--gym-accent));
  font-weight: 700;
  font-size: .95rem;
  transition: width .5s ease;
}

/* ---------- Timer de descanso ---------- */
.rest-timer {
  background-color: var(--gym-surface);
  border: 1px solid var(--gym-border);
  border-left: 4px solid var(--gym-accent);
  border-radius: 14px;
  padding: .9rem 1rem 1rem;
}
.rest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.rest-label { color: #8b97a5; font-weight: 600; font-size: .95rem; }
.rest-time {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.rest-hide {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: #8b97a5;
  font-size: 1.1rem;
  line-height: 1;
  padding: .25rem .4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color .12s, background-color .12s;
}
.rest-hide:hover { color: var(--gym-text); background: var(--gym-surface-2); }
.rest-show {
  display: block;
  width: 100%;
  background: var(--gym-surface);
  color: #8b97a5;
  border: 1px dashed var(--gym-border);
  border-radius: 14px;
  padding: .7rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.rest-show:hover { border-color: var(--gym-accent); color: var(--gym-text); }
.rest-running .rest-time { color: var(--gym-accent); }
.rest-paused .rest-time { opacity: .55; }
.rest-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.rest-preset {
  flex: 1 1 auto;
  min-width: 60px;
  background: var(--gym-surface-2);
  color: var(--gym-text);
  border: 1px solid var(--gym-border);
  border-radius: 999px;
  padding: .55rem .4rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color .12s, border-color .12s, transform .1s;
}
.rest-preset:hover { border-color: var(--gym-accent); }
.rest-preset:active { transform: scale(.96); }
.rest-controls {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}
.btn-rest {
  flex: 1 1 auto;
  background: var(--gym-accent);
  color: #2a1200;
  border: none;
  border-radius: 10px;
  padding: .6rem .4rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color .12s, transform .1s;
}
.btn-rest:hover { background: var(--gym-accent-2); color: #fff; }
.btn-rest:active { transform: scale(.96); }
.btn-rest-stop {
  background: var(--gym-surface-2);
  color: var(--gym-text);
  border: 1px solid var(--gym-border);
}
.btn-rest-stop:hover { background: var(--gym-border); color: var(--gym-text); }
.rest-hint {
  margin-top: .6rem;
  color: #8b97a5;
  font-size: .85rem;
}
.rest-done {
  border-color: var(--gym-accent);
  animation: restPulse .5s ease-in-out 0s 3;
}
.rest-done .rest-time { color: var(--gym-accent); }
.rest-done .rest-hint { color: var(--gym-accent); font-weight: 700; }
@keyframes restPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  50% { box-shadow: 0 0 0 4px rgba(249,115,22,.45); }
}

/* ---------- Exercise list (execução) ---------- */
.exercise-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--gym-surface);
  border: 1px solid var(--gym-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s, border-color .15s, opacity .2s;
}
.exercise-item:hover { border-color: var(--gym-accent); }
.exercise-item.done {
  opacity: .55;
  border-color: var(--gym-accent);
  background-color: var(--gym-surface-2);
}
.exercise-item.done .ex-name { text-decoration: line-through; }
.exercise-item .ex-check {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  cursor: pointer;
}
/* Botão "conclui uma série" (ao lado do check) */
.exercise-item .ex-serie {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; padding: 6px 8px;
  background: var(--gym-surface-2); color: var(--gym-text);
  border: 1px solid var(--gym-accent); border-radius: 10px;
  cursor: pointer; line-height: 1.1; user-select: none;
  transition: transform .08s ease, background .15s ease;
}
.exercise-item .ex-serie:active { transform: scale(.92); }
.exercise-item .ex-serie .ex-serie-cnt { font-weight: 800; font-size: 1.05rem; color: var(--gym-accent); font-variant-numeric: tabular-nums; }
.exercise-item .ex-serie .ex-serie-lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .4px; opacity: .8; }
.exercise-item .ex-serie.full { background: rgba(249,115,22,.18); }
.exercise-item .ex-serie.pulse { animation: exSeriePulse .3s ease; }
@keyframes exSeriePulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.exercise-item .ex-name { font-size: 1.15rem; font-weight: 600; }
.exercise-item .ex-meta { color: var(--gym-accent); font-weight: 700; white-space: nowrap; }

/* Campo de carga (kg) na execução */
.ex-weight-wrap { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.ex-weight {
  width: 64px; text-align: center; font-weight: 700;
  background: var(--gym-surface-2); color: var(--gym-text);
  border: 1px solid var(--gym-border); border-radius: 10px; padding: 8px 6px; font-size: 1rem;
  -moz-appearance: textfield;
}
.ex-weight::-webkit-outer-spin-button, .ex-weight::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ex-weight:focus { outline: none; border-color: var(--gym-accent); box-shadow: 0 0 0 .15rem rgba(249,115,22,.3); }
.ex-weight.saved { border-color: var(--gym-accent); background: rgba(249,115,22,.15); }
.ex-weight-unit { color: #8b97a5; font-size: .85rem; }
/* Observação / carga sugerida do personal (ou própria) na execução */
.ex-note { font-size: .78rem; color: #fdba74; margin-top: 2px; }
.ex-target { font-size: .74rem; color: #8b97a5; }

/* ---------- Big touch start buttons ---------- */
.plan-pick {
  display: block;
  background-color: var(--gym-surface);
  border: 1px solid var(--gym-border);
  border-left: 4px solid var(--gym-accent);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: .9rem;
  text-decoration: none;
  color: var(--gym-text);
  transition: transform .12s, border-color .12s;
}
.plan-pick:hover { transform: translateY(-2px); color: var(--gym-text); border-color: var(--gym-accent); }

.done-banner {
  text-align: center;
  padding: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gym-accent-2), var(--gym-accent));
  color: #2a1200;
  font-size: 1.4rem;
  font-weight: 800;
}
.done-duration {
  margin-top: .4rem;
  font-size: 1.05rem;
  font-weight: 700;
  opacity: .9;
}

a { color: var(--gym-accent); }
a:hover { color: var(--gym-accent-2); }

.footer {
  background-color: var(--gym-bg);
  border-top: 1px solid var(--gym-border) !important;
}


/* ===== Social (feed / amigos / perfil) ===== */
.feed-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gym-border); flex-shrink: 0; }
.profile-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gym-accent); }
.feed-icon { font-size: 1.6rem; }
.feed-item { border: 1px solid var(--gym-border); }
.min-w-0 { min-width: 0; }
.feed-author { color: var(--gym-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.like-btn { background: transparent; border: 1px solid var(--gym-border); color: var(--gym-text); border-radius: 999px; padding: .35rem .9rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.like-btn.liked { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.12); }
.notif-unread { background: rgba(249,115,22,.10) !important; }
.notif-unread a, .notif-unread span { color: var(--gym-text); }

/* ===== Chat ===== */
.chat-box { height: 56vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px;
            background: var(--gym-surface); border: 1px solid var(--gym-border); border-radius: 14px; }
.msg { max-width: 80%; padding: .5rem .8rem; border-radius: 14px; overflow-wrap: anywhere; }
.msg.them { align-self: flex-start; background: var(--gym-surface-2); color: var(--gym-text); }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, var(--gym-accent-2), var(--gym-accent)); color: #2a1200; }
.msg .t { display: block; font-size: .62rem; opacity: .7; text-align: right; margin-top: 2px; }
.chat-menu { position: relative; }
.chat-menu summary { list-style: none; cursor: pointer; }
.chat-menu summary::-webkit-details-marker { display: none; }
.chat-menu-pop { position: absolute; right: 0; top: 110%; z-index: 50; width: 220px; }

/* ===== Navbar social: destaque + badges + toast ===== */
.nav-social { font-weight: 700; }
.nav-badge {
    display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px;
    font-size: .7rem; font-weight: 800; line-height: 18px; text-align: center;
    color: #fff; background: #ef4444; border-radius: 999px; vertical-align: top;
}
.gym-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
    background: var(--gym-surface-2); color: var(--gym-text);
    border: 1px solid var(--gym-accent); border-left: 4px solid var(--gym-accent);
    padding: .8rem 1.1rem; border-radius: 12px; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 1090; opacity: 0;
    transition: opacity .3s, transform .3s; max-width: 90vw;
}
.gym-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Ícones de chat/notificações sempre visíveis no topo (mobile) ===== */
.nav-icon { font-size: 1.45rem; line-height: 1; text-decoration: none; padding: .15rem; }
.nav-top-badge {
    position: absolute; top: -5px; right: -9px;
    min-width: 17px; height: 17px; padding: 0 4px;
    font-size: .62rem; font-weight: 800; line-height: 17px; text-align: center;
    color: #fff; background: #ef4444; border: 2px solid var(--gym-bg, #0d1117);
    border-radius: 999px;
}

/* ===== Animações dos badges/ícones sociais ===== */
@keyframes badgePop { 0% { transform: scale(1); } 30% { transform: scale(1.6); } 60% { transform: scale(.85); } 100% { transform: scale(1); } }
.badge-pop { animation: badgePop .5s ease; }
@keyframes iconShake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-9deg); } 80% { transform: rotate(9deg); } }
.icon-shake { display: inline-block; animation: iconShake .6s ease; transform-origin: center; }

/* ===== Chat: status online/digitando ===== */
.chat-status { font-size: .75rem; color: var(--gym-muted); height: 1rem; line-height: 1rem; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 3px; vertical-align: middle; }
.feed-img { width: 100%; border-radius: 12px; margin-top: 8px; display: block; max-height: 70vh; object-fit: cover; }

/* Imagens que abrem no visualizador (lightbox) com zoom — ver wwwroot/js/lightbox.js */
.zoomable, .feed-img, .cd-mapa img { cursor: zoom-in; }

/* Presença (online) — pontinho verde sobre o avatar */
.av-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.online-dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%;
              background: #22c55e; border: 2px solid var(--gym-bg, #0d1117); box-shadow: 0 0 6px #22c55e88; }

/* Painel "Amigos online" do feed */
.amigos-online { padding: 0; }
.amigos-online > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
              padding: 12px 16px; font-weight: 800; }
.amigos-online > summary::-webkit-details-marker { display: none; }
.amigos-online > summary::before { content: '▸'; color: #9aa6b2; transition: transform .15s; }
.amigos-online[open] > summary::before { transform: rotate(90deg); }
.amigos-online .ao-list { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 16px; }
.amigos-online .ao-friend { flex: 0 0 auto; width: 68px; text-decoration: none; color: inherit; text-align: center; }
.amigos-online .ao-name { display: block; font-size: .72rem; margin-top: 4px; overflow: hidden;
              text-overflow: ellipsis; white-space: nowrap; }

/* ===== Menções (@usuário) ===== */
.mention { color: var(--gym-accent, #2ea043); font-weight: 600; text-decoration: none; }
.mention:hover { text-decoration: underline; }

.mention-wrap { position: relative; }

.mention-menu {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 1050;
    margin-top: 4px; max-height: 240px; overflow-y: auto;
    background: var(--gym-surface, #161b22);
    border: 1px solid var(--gym-border, #30363d); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.45); padding: 4px;
}
.mention-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: none; border: none; color: inherit; cursor: pointer;
    padding: 8px 10px; border-radius: 8px; text-align: left; font-size: .95rem;
}
.mention-item:hover, .mention-item.active { background: rgba(46,160,67,.16); }
.mention-av {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
    background: var(--gym-surface-2, #21262d);
}

/* ===== Teclado do celular (--kb vem de site.js) ===== */
/* Quando a página não encolhe sozinha com o teclado, abre espaço pra rolar o campo até a área visível. */
html.kb-open body { padding-bottom: var(--kb, 0px); }

/* ----- Chat em tela cheia: cabeçalho fixo, mensagens rolam, campo colado acima do teclado ----- */
body.chat-page { height: calc(100dvh - var(--kb, 0px)); display: flex; flex-direction: column; overflow-y: auto; padding-bottom: 0 !important; }
body.chat-page > header { flex: 0 0 auto; }
body.chat-page > header .navbar { margin-bottom: .5rem !important; }
body.chat-page > .container { flex: 1 1 0; min-height: 260px; display: flex; flex-direction: column; }
body.chat-page main { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(.5rem + env(safe-area-inset-bottom)) !important; }
body.chat-page > footer { display: none; }
body.chat-page .chat-box { flex: 1 1 0; min-height: 0; height: auto; }
body.chat-page .chat-head, body.chat-page .chat-composer { flex: 0 0 auto; }
/* teclado aberto: esconde a navbar pra sobrar espaço pras mensagens */
html.kb-open body.chat-page > header { display: none; }
@supports not (height: 100dvh) { body.chat-page { height: calc(100vh - var(--kb, 0px)); } }

.chat-composer { display: flex; align-items: center; gap: .5rem; }
.chat-composer .form-control, .comment-composer .form-control {
  border-radius: 999px; padding: .6rem 1rem; font-size: 16px; /* 16px evita zoom automático no iOS */
  background: var(--gym-surface-2); border-color: var(--gym-border);
}
.chat-send { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 1.1rem; line-height: 1; }

/* ----- Comentários: campo sempre à mão no rodapé da tela, acima do teclado ----- */
.comment-composer {
  position: sticky; bottom: var(--kb, 0px); z-index: 20;
  margin: 1rem -.75rem 0; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: var(--gym-bg); border-top: 1px solid var(--gym-border);
}
.comment-composer [data-mention-btn] { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
/* campo no rodapé → a lista de menções abre pra CIMA */
.comment-composer .mention-menu { top: auto; bottom: 100%; margin: 0 0 6px; max-height: 200px; }
/* o padding do body (fallback) não se aplica aqui: o sticky já sobe com --kb */
html.kb-open body:has(.comment-composer:focus-within) { padding-bottom: 0; }


/* ===== Acabamento visual / UX (mobile primeiro) ===== */
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(249,115,22,.35); }
* { scrollbar-width: thin; scrollbar-color: var(--gym-border) transparent; }

/* Navbar sempre à mão no topo; menu aberto rola por dentro e vira grade de atalhos no celular */
body > header { position: sticky; top: 0; z-index: 1030; }
.gym-navbar { box-shadow: 0 6px 18px rgba(0,0,0,.35); padding-top: calc(.5rem + env(safe-area-inset-top)); }
.gym-navbar .navbar-toggler { border: none; padding: .35rem .5rem; }
.gym-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .15rem rgba(249,115,22,.35); }
@media (max-width: 575.98px) {
  .gym-navbar .navbar-collapse { max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; }
  .gym-navbar .navbar-nav.flex-grow-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: .6rem 0; }
  .gym-navbar .navbar-nav.flex-grow-1 .nav-link {
    background: var(--gym-surface-2); border: 1px solid var(--gym-border); border-radius: 12px;
    padding: .65rem .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .gym-navbar .navbar-nav.flex-grow-1 .nav-link:active { border-color: var(--gym-accent); }
}

/* Entrada suave do conteúdo */
@keyframes gymFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
main[role="main"] { animation: gymFadeIn .22s ease-out; }
body.chat-page main[role="main"] { animation: none; }

/* Superfícies */
.card { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.18); }
.feed-item { margin-bottom: .9rem; }
.alert { border-radius: 12px; }
.list-group-item { border-color: var(--gym-border); }
.modal-content, .dropdown-menu { background-color: var(--gym-surface); border: 1px solid var(--gym-border); border-radius: 14px; }

/* Botões e campos: alvos de toque maiores e resposta ao toque */
.btn { border-radius: 10px; font-weight: 600; transition: transform .08s ease, background-color .12s, border-color .12s, color .12s; }
.btn:active { transform: scale(.97); }
.btn:not(.btn-sm):not(.btn-close):not(.btn-link) { min-height: 42px; }
.btn-sm { border-radius: 8px; }
.form-control, .form-select {
  background-color: var(--gym-surface-2); border-color: var(--gym-border); border-radius: 10px; color: var(--gym-text);
}
.form-control:focus, .form-select:focus { background-color: var(--gym-surface-2); border-color: var(--gym-accent); color: var(--gym-text); }
.form-control::placeholder { color: var(--gym-muted); opacity: 1; }
@media (max-width: 575.98px) {
  /* 16px nos campos evita o zoom automático do iOS ao focar */
  .form-control, .form-select { font-size: 16px; }
}
.form-check-input:checked { background-color: var(--gym-accent); border-color: var(--gym-accent); }

/* Chat: balões com "rabinho" e lista de conversas mais respirada */
.msg { line-height: 1.35; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.msg.them { border-bottom-left-radius: 4px; }
.msg.mine { border-bottom-right-radius: 4px; }
.chat-box { scroll-behavior: smooth; overscroll-behavior: contain; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main[role="main"] { animation: none; }
  .btn, .chat-box { transition: none; scroll-behavior: auto; }
}

/* ===== Menu inferior (celular) — ativo quando <html class="gl-bn"> ===== */
:root { --bn: 0px; }
.bottom-nav { display: none; }
.bn-sheet {
  background: var(--gym-surface); border-top: 1px solid var(--gym-border);
  border-radius: 18px 18px 0 0; height: auto !important; max-height: 85dvh;
}
.bn-sheet .offcanvas-body { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
.bn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bn-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: .8rem .3rem; border-radius: 14px; text-decoration: none; font-size: .8rem; font-weight: 600;
  color: var(--gym-text); background: var(--gym-surface-2); border: 1px solid var(--gym-border);
}
.bn-grid a span { font-size: 1.5rem; line-height: 1; }
.bn-grid a:active { border-color: var(--gym-accent); transform: scale(.97); }

@media (max-width: 575.98px) {
  html.gl-bn { --bn: calc(60px + env(safe-area-inset-bottom)); }
  html.gl-bn.kb-open { --bn: 0px; } /* teclado aberto: a barra some pra não roubar espaço */
  html.gl-bn body { padding-bottom: calc(var(--bn) + var(--kb, 0px)); }
  html.gl-bn .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
    height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(22,27,34,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--gym-border); box-shadow: 0 -6px 18px rgba(0,0,0,.35);
  }
  html.gl-bn.kb-open .bottom-nav, html.gl-bn body.chat-page .bottom-nav { display: none; }
  html.gl-bn body.chat-page { padding-bottom: 0; }
  /* o "Mais" substitui o hambúrguer */
  html.gl-bn .gym-navbar .navbar-toggler, html.gl-bn .gym-navbar .navbar-collapse { display: none !important; }
  html.gl-bn .gym-toast { bottom: calc(24px + var(--bn)); }
  html.gl-bn .comment-composer { bottom: calc(var(--bn) + var(--kb, 0px)); padding-bottom: .6rem; }
}
.bn-item {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: none; padding: 0; text-decoration: none;
  color: var(--gym-muted); font-size: .68rem; font-weight: 700; position: relative;
  transition: color .12s, transform .08s;
}
.bn-item:hover { color: var(--gym-text); }
.bn-item:active { transform: scale(.94); }
.bn-ico { font-size: 1.35rem; line-height: 1; filter: grayscale(.6) opacity(.8); transition: filter .12s, transform .12s; }
.bn-item.active { color: var(--gym-accent); }
.bn-item.active .bn-ico { filter: none; transform: translateY(-1px); }
.bn-item.active::before {
  content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--gym-accent);
}
/* botão central em destaque */
.bn-main .bn-ico {
  width: 46px; height: 46px; margin-top: -18px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gym-accent-2), var(--gym-accent)); filter: none;
  box-shadow: 0 6px 16px rgba(249,115,22,.4); border: 3px solid var(--gym-bg);
}
.bn-main.active::before { display: none; }

/* ===== Instalar no celular (/instalar + convite no rodapé) — js/instalar.js ===== */
.gi-page { max-width: 560px; }
.gi-hero-icon { border-radius: 22%; box-shadow: 0 8px 28px rgba(249, 115, 22, .25); }
.gi-abas .nav-link { color: var(--gym-text); border-radius: 999px; }
.gi-abas .nav-link.active { background: var(--gym-accent); color: #fff; }
.gi-card { background: var(--gym-surface); border: 1px solid var(--gym-border); border-radius: 16px; padding: 1.1rem; }
.gi-video { max-width: 320px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 9 / 16; box-shadow: 0 10px 34px rgba(0, 0, 0, .45); }
.gi-video video { width: 100%; height: 100%; display: block; object-fit: cover; }
.gi-passos { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .6rem; }
.gi-passos li { display: flex; gap: .75rem; align-items: flex-start; background: var(--gym-surface); border: 1px solid var(--gym-border); border-radius: 14px; padding: .7rem .85rem; }
.gi-passos li > span { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--gym-accent); color: #fff; font-weight: 800; display: grid; place-items: center; }
.gi-passos small { display: block; color: var(--gym-muted); margin-top: .2rem; }
.gi-nota { color: var(--gym-muted); font-size: .9rem; margin: .9rem 0 0; }
.gi-aviso { background: rgba(249, 115, 22, .12); border: 1px solid rgba(249, 115, 22, .45); border-radius: 14px; padding: .8rem .9rem; margin-bottom: 1rem; font-size: .92rem; }
.gi-modal { background: var(--gym-bg); border: 1px solid var(--gym-border); border-radius: 18px; }
.gi-modal .gi-video { max-width: 250px; }

.gi-convite {
  position: fixed; left: 12px; right: 12px; z-index: 1040;
  bottom: calc(max(var(--bn, 0px), env(safe-area-inset-bottom)) + 12px);
  max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: .7rem;
  background: var(--gym-surface-2); border: 1px solid var(--gym-border); border-left: 4px solid var(--gym-accent);
  border-radius: 16px; padding: .7rem 2rem .7rem .75rem; box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(24px); transition: opacity .3s ease, transform .3s ease;
}
.gi-convite.show { opacity: 1; transform: none; }
.gi-convite[hidden] { display: none; }
.gi-convite img { border-radius: 22%; flex: 0 0 auto; }
.gi-convite-txt { flex: 1; min-width: 0; line-height: 1.25; }
.gi-convite-txt strong { display: block; font-size: .95rem; }
.gi-convite-txt span { display: block; font-size: .8rem; color: var(--gym-muted); }
.gi-convite-btn { flex: 0 0 auto; white-space: nowrap; }
.gi-convite-x { position: absolute; top: 2px; right: 6px; background: none; border: 0; color: var(--gym-muted); font-size: 1.3rem; line-height: 1; padding: 4px; }
@media (prefers-reduced-motion: reduce) { .gi-convite { transition: none; } }
