/* ==========================================================================
   CrossFake — "DeFi" em verde
   Void profundo, luz colorida, precisão técnica. Laranja Bitcoin → verde Cross Fakes.
   Tokens aqui; componentes abaixo só consomem variáveis.
   ========================================================================== */
:root{
  /* Cores */
  --bg: #030304;                 /* True Void */
  --surface: #0F1115;            /* Dark Matter */
  --fg: #FFFFFF;
  --muted-fg: #94A3B8;           /* Stardust */
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #73C82C;             /* verde Cross Fakes (no lugar do laranja Bitcoin) */
  --accent-deep: #4F9A1C;        /* no lugar do laranja queimado */
  --accent-bright: #B8F04A;      /* verde-lima, no lugar do ouro digital */
  --on-accent: #030304;          /* branco sobre esse verde não passa contraste; texto escuro passa ~10:1 */

  --grad-btn: linear-gradient(90deg, var(--accent-deep), var(--accent));
  --grad-text: linear-gradient(90deg, var(--accent), var(--accent-bright));
  --grad-line: linear-gradient(to bottom, var(--accent), rgba(115, 200, 44, 0));

  /* Luz colorida (nunca sombra preta) */
  --glow: 0 0 20px -5px rgba(79, 154, 28, 0.55);
  --glow-strong: 0 0 30px -5px rgba(115, 200, 44, 0.65);
  --glow-soft: 0 0 30px -10px rgba(115, 200, 44, 0.25);
  --glow-bright: 0 0 20px rgba(184, 240, 74, 0.3);

  /* Tipografia */
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Raios */
  --r-card: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-pill: 999px;

  /* Movimento */
  --t: 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);

  --gutter: 20px;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
[hidden]{ display: none !important; }

body{
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Void texturizado: grade de rede que some nas bordas + campos de energia */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-size: 44px 44px;
  background-image:
    linear-gradient(to right, rgba(30, 41, 59, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 41, 59, 0.45) 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 20%, black 20%, transparent 75%);
}
body::after{
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(115, 200, 44, 0.13), transparent 35%),
    radial-gradient(circle at 90% 60%, rgba(184, 240, 74, 0.07), transparent 35%),
    radial-gradient(circle at 30% 100%, rgba(79, 154, 28, 0.08), transparent 40%);
  filter: blur(40px);
}

@keyframes spin{ to{ transform: rotate(360deg); } }
@keyframes float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}
@keyframes ping{
  75%, 100%{ transform: scale(2.4); opacity: 0; }
}
@keyframes rise{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: none; }
}

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Rótulos de dados */
.selo, .focus-tag, .section-label, .exercise-reps, .extra-title, .trilha-info, .rodape strong, .saude strong, .menu-btn{
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Texto em gradiente */
.gradiente{
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px var(--gutter) 26px;
}
.orbe{
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(184, 240, 74, 0.18), rgba(15, 17, 21, 0.9) 65%);
  box-shadow: var(--glow-soft), inset 0 0 20px rgba(115, 200, 44, 0.15);
  animation: float 8s ease-in-out infinite;
}
.anel{
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  pointer-events: none;
}
.anel-externo{
  inset: -8px;
  border-top-color: var(--accent);
  border-right-color: rgba(115, 200, 44, 0.3);
  animation: spin 10s linear infinite;
}
.anel-interno{
  inset: 4px;
  border-bottom-color: var(--accent-bright);
  border-left-color: rgba(184, 240, 74, 0.25);
  animation: spin 15s linear infinite reverse;
}
.orbe-icone{
  width: 40px;
  height: 40px;
  color: var(--fg);
  filter: drop-shadow(0 0 10px rgba(115, 200, 44, 0.5));
}
.hero-texto{ min-width: 0; }
.selo{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(115, 200, 44, 0.35);
  border-radius: var(--r-pill);
  background: rgba(115, 200, 44, 0.08);
  color: var(--accent);
  font-size: 0.68rem;
}
.pulso{
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.pulso::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.marca{
  margin-top: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.1rem, 10vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.sub{
  margin-top: 6px;
  color: var(--muted-fg);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ---------- Histórico de semanas ---------- */
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.selo-area{ display: inline-block; }
button.selo{
  min-height: 32px;
  cursor: pointer;
  transition: all var(--t-fast);
}
button.selo:hover, button.selo[aria-expanded="true"]{
  border-color: var(--accent);
  box-shadow: 0 0 16px -4px rgba(115, 200, 44, 0.55);
}
.selo-seta{ font-size: 0.7rem; transition: transform var(--t-fast); }
button.selo[aria-expanded="true"] .selo-seta{ transform: rotate(180deg); }
/* No histórico: sem pulso "ao vivo", com etiqueta visível */
.selo.historico{
  border-color: rgba(184, 240, 74, 0.4);
  background: rgba(184, 240, 74, 0.08);
  color: var(--accent-bright);
}
.selo.historico .pulso{ display: none; }
.selo.historico #seloTipo{
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  padding-right: 6px;
  border-right: 1px solid rgba(184, 240, 74, 0.35);
}

.semanas-lista{
  position: absolute;
  z-index: 30;
  top: calc(100% - 16px);
  left: var(--gutter);
  right: var(--gutter);
  max-width: 420px;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(15, 17, 21, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 40px -12px rgba(115, 200, 44, 0.3);
  animation: rise 200ms var(--t) both;
}
.semana-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.semana-item:hover{ background: rgba(255, 255, 255, 0.06); color: var(--accent); }
.semana-item[aria-current="true"]{
  color: var(--accent);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(115, 200, 44, 0.5);
}
.semana-item em{
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: rgba(115, 200, 44, 0.12);
  color: var(--accent);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.aviso-historico{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px var(--gutter);
  border-bottom: 1px solid rgba(184, 240, 74, 0.2);
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.aviso-historico strong{ color: var(--accent-bright); font-weight: 500; white-space: nowrap; }
.voltar-semana{
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(115, 200, 44, 0.06);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 16px -4px rgba(115, 200, 44, 0.6);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.voltar-semana:hover{ background: rgba(115, 200, 44, 0.14); }

/* ---------- Barra fixa de vidro ---------- */
.topbar{
  position: relative;
  z-index: 10;
  background: rgba(3, 3, 4, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.menu{
  display: flex;
  gap: 4px;
  max-width: 680px;
  margin: 10px var(--gutter) 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(15, 17, 21, 0.7);
}
@media (min-width: 720px){ .menu{ margin-inline: auto; } }
.topbar:has(nav[hidden]) .menu{ margin-bottom: 10px; }
.menu-btn{
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted-fg);
  font-size: clamp(0.64rem, 2.9vw, 0.75rem);
  cursor: pointer;
  transition: all var(--t-fast);
}
.menu-btn:hover{ color: var(--fg); background: rgba(255, 255, 255, 0.06); }
/* Estado ativo: contorno verde com brilho, texto verde em negrito, sem preenchimento */
.menu-btn[aria-selected="true"], .day-btn[aria-selected="true"]{
  background: rgba(115, 200, 44, 0.06);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 18px -4px rgba(115, 200, 44, 0.6), inset 0 0 12px -4px rgba(115, 200, 44, 0.35);
  text-shadow: 0 0 10px rgba(115, 200, 44, 0.45);
}

nav{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  max-width: 680px;
  margin: 0 auto;
  padding: 10px var(--gutter) 12px;
}
/* telas bem estreitas (320px): 7 bolinhas cabem sem rolar de lado */
@media (max-width: 360px){
  nav{ gap: 4px; padding-inline: 12px; }
  nav .day-btn{ min-height: 36px; }
}
.day-btn{
  justify-self: center;
  width: 100%;
  max-width: 46px;
  aspect-ratio: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 17, 21, 0.6);
  color: var(--muted-fg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.day-btn:hover{ border-color: rgba(115, 200, 44, 0.5); color: var(--fg); }
.day-btn[aria-selected="true"]{ border-color: transparent; }

/* ---------- Conteúdo ---------- */
main{
  max-width: 720px;
  margin: 0 auto;
  padding: 26px var(--gutter) 16px;
}
.day-head{
  margin-bottom: 22px;
  animation: rise 400ms var(--t) both;
}
.day-head h2{
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.focus-tag{
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 12px;
  border: 1px solid rgba(115, 200, 44, 0.4);
  border-radius: var(--r-pill);
  background: rgba(115, 200, 44, 0.1);
  color: var(--accent);
  font-size: 0.68rem;
  line-height: 1.5;
}
.recommended{
  margin-top: 10px;
  color: var(--muted-fg);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Seções */
.section{ margin-top: 20px; }
.section-label{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: 0.72rem;
  text-align: left;
}
.dot{
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(115, 200, 44, 0.5);
  background: rgba(79, 154, 28, 0.2);
  box-shadow: inset 0 0 8px rgba(115, 200, 44, 0.25);
}
.section-label.mobility .dot{ border-color: rgba(184, 240, 74, 0.45); background: rgba(184, 240, 74, 0.1); }
.section-label .count{
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--muted-fg);
}
.chevron{
  flex-shrink: 0;
  color: var(--muted-fg);
  font-size: 0.75rem;
  transition: transform var(--t-fast), color var(--t-fast);
}
[aria-expanded="true"] > .chevron{ transform: rotate(180deg); color: var(--accent); }

/* Linha do tempo como blockchain: linha em gradiente + nós */
.section > .detail > .detail-inner{
  position: relative;
  padding-left: 22px;
}
.section > .detail > .detail-inner::before{
  content: "";
  position: absolute;
  top: 6px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--grad-line);
}

/* Card de exercício ("bloco") */
.exercise{
  position: relative;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  animation: rise 400ms var(--t) both;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.exercise::before{
  content: "";
  position: absolute;
  top: 26px;
  left: -22px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--bg);
  transition: all var(--t);
}
.exercise:hover{
  transform: translateY(-1px);
  border-color: rgba(115, 200, 44, 0.5);
  box-shadow: var(--glow-soft);
}
.exercise:has(.exercise-top[aria-expanded="true"]){
  border-color: var(--accent);
  box-shadow: 0 0 40px -12px rgba(115, 200, 44, 0.35);
}
.exercise.done::before{
  background: var(--accent);
  box-shadow: 0 0 12px rgba(115, 200, 44, 0.8);
}
.exercise-row{ display: flex; align-items: stretch; }
.exercise-top{
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 12px 16px 12px 2px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.exercise-top-text{ flex: 1; min-width: 0; }
.exercise-name, .exercise-reps{ display: block; }
.exercise-name{
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  transition: color var(--t-fast);
}
.exercise-reps{
  margin-top: 3px;
  color: var(--muted-fg);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}
button.exercise-top:hover .exercise-name{ color: var(--accent); }
.exercise.done .exercise-name{
  color: var(--muted-fg);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
}

/* ▶ do cronômetro no card: some quando o exercício está feito ou em andamento */
.exercise-play{
  display: grid;
  place-items: center;
  flex-shrink: 0;
  align-self: center;
  width: 38px;
  height: 38px;
  margin-right: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(115, 200, 44, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(115, 200, 44, 0.55);
  color: var(--accent);
  cursor: pointer;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.exercise-play svg{ width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }
.exercise-play:hover{ box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 16px -4px rgba(115, 200, 44, 0.6); }
.exercise-play:active{ transform: scale(0.92); }
.exercise.done .exercise-play, .exercise.timer-atual .exercise-play{ display: none; }
.exercise-row > button.exercise-top:has(+ .exercise-play){ padding-right: 10px; }
/* com ▶ visível a setinha sai (o card continua abrindo o vídeo ao tocar) */
.exercise:not(.done):not(.timer-atual) .exercise-top:has(+ .exercise-play) .chevron{ display: none; }

/* Checkbox redondo */
.check{
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 10px 0 14px;
  cursor: pointer;
}
.check input{ position: absolute; opacity: 0; width: 1px; height: 1px; }
.check span{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: all var(--t-fast);
}
.check:hover span{ border-color: var(--accent); }
.check span::after{
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--on-accent);
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform var(--t-fast);
}
.check input:checked + span{
  border-color: transparent;
  background: var(--grad-text);
  box-shadow: var(--glow-bright);
}
.check input:checked + span::after{ transform: translateY(-1px) rotate(45deg) scale(1); }
.check input:focus-visible + span{ outline: 2px solid var(--accent); outline-offset: 2px; }

.detail{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t);
}
.detail.open{ grid-template-rows: 1fr; }
.detail-inner{ overflow: hidden; min-height: 0; }

/* Vídeo */
.video{
  position: relative;
  width: calc(100% - 24px);
  max-height: 70vh;
  margin: 0 auto 12px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #000;
}
.video.horizontal{ aspect-ratio: 16 / 9; }
.video:not(.horizontal){ width: min(calc(100% - 24px), calc(70vh * 9 / 16)); }
.video img, .video iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.video img{ transition: transform 500ms var(--t), filter 500ms var(--t); }
.video:hover img{ transform: scale(1.08); filter: contrast(1.15); }
.video-play{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(3, 3, 4, 0.1), rgba(3, 3, 4, 0.55));
  cursor: pointer;
}
.video-play span{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--grad-btn);
  box-shadow: var(--glow-strong);
  transition: transform var(--t-fast);
}
.video-play:hover span{ transform: scale(1.08); }
.video-play svg{ width: 24px; height: 24px; margin-left: 4px; fill: var(--on-accent); }
.video-play:focus-visible{ outline-offset: -4px; border-radius: var(--r-md); }

.empty-day{
  padding: 36px 0;
  text-align: center;
  color: var(--muted-fg);
}

/* ---------- Botões ---------- */
.repor-links{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 540px){ .repor-links:not(.um){ grid-template-columns: 1fr 1fr; } }
.repor-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--grad-btn);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--glow);
  transition: all var(--t);
}
.repor-btn:hover{ transform: scale(1.04); box-shadow: var(--glow-strong); }
/* Segundo botão: contorno */
.repor-links:not(.um) .repor-btn + .repor-btn{
  border: 2px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  box-shadow: none;
}
.repor-links:not(.um) .repor-btn + .repor-btn:hover{ border-color: var(--fg); background: rgba(255, 255, 255, 0.08); }

.day-chip{
  min-width: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 4px;
  border-radius: var(--r-pill);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all var(--t-fast);
}
.day-chip:hover{ background: rgba(255, 255, 255, 0.08); color: var(--accent); }
.day-chip.pendente{
  color: var(--accent);
  font-weight: 700;
  background: rgba(115, 200, 44, 0.06);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 18px -4px rgba(115, 200, 44, 0.6);
}
.day-chip.completo{
  color: var(--muted-fg);
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: 0.7;
}

/* ---------- Cards de vidro com cantoneiras ---------- */
.extra, .saude{
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.extra::before, .extra::after{
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.extra::before{
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-top-left-radius: var(--r-card);
}
.extra::after{
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-bottom-right-radius: var(--r-card);
}

/* Sábado/domingo: texto solto, sem caixa */
.repor{
  color: var(--muted-fg);
  line-height: 1.6;
  animation: rise 400ms var(--t) both;
}
.repor-texto{ font-size: 1rem; }
.repor-texto strong{ color: var(--fg); font-weight: 600; }
.repor-rotulo{
  margin: 24px 0 10px;
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.repor-title{
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--fg);
}
.repor-dias{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.repor .repor-links{ margin-top: 0; }

/* Extra liberado */
.extra{
  margin-top: 26px;
  padding: 18px;
}
.extra-title{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.7rem;
}
.extra-title::before{
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(115, 200, 44, 0.7);
  animation: pingRing 1.8s ease-out infinite;
}
@keyframes pingRing{
  0%{ box-shadow: 0 0 0 0 rgba(115, 200, 44, 0.7); }
  100%{ box-shadow: 0 0 0 9px rgba(115, 200, 44, 0); }
}
.extra .repor-links{ margin-top: 12px; }

/* ---------- Domingo: WOD ---------- */
.wod{
  position: relative;
  padding: 22px 18px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: rise 400ms var(--t) both;
}
.wod::before, .wod::after{
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.wod::before{ top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: var(--r-card); }
.wod::after{ right: -1px; bottom: -1px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); border-bottom-right-radius: var(--r-card); }
.wod-rotulo{
  display: inline-flex;
  padding: 3px 12px;
  border: 1px solid rgba(115, 200, 44, 0.4);
  border-radius: var(--r-pill);
  background: rgba(115, 200, 44, 0.1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
}
.wod-formato{
  margin-top: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 7vw, 2rem);
  line-height: 1.15;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wod-descanso{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg);
  font-size: 0.85rem;
}
.wod-descanso span{
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: rgba(184, 240, 74, 0.12);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wod-opcoes{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
}
.wod-opcoes li{
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
}
.wod-nota{
  margin: 16px 0 6px;
  color: var(--muted-fg);
  font-size: 0.85rem;
  line-height: 1.6;
}
.wod-lista{
  position: relative;
  margin-top: 18px;
  list-style: none;
}
/* linha que liga os movimentos */
.wod-lista::before{
  content: "";
  position: absolute;
  top: 20px;
  bottom: 30px;
  left: 20px;
  width: 1px;
  background: var(--grad-line);
}
.wod-mov{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
}
.wod-reps{
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 16px -4px rgba(115, 200, 44, 0.55);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}
.wod-info{ min-width: 0; padding-top: 7px; }
.wod-nome{
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
}
.wod-adapt{
  margin-top: 6px;
  color: var(--muted-fg);
  font-size: 0.85rem;
  line-height: 1.5;
}
.wod-adapt span{
  display: block;
  margin-bottom: 2px;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wod-adapt b{ font-weight: 400; white-space: nowrap; }
.wod-adapt i{ font-style: normal; color: var(--accent); padding: 0 2px; }

/* ---------- Protocolos: corrente de nós ---------- */
.trilha-info{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-fg);
  font-size: 0.72rem;
}
.trilha-info strong{
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--grad-btn);
  color: var(--on-accent);
  font-weight: 700;
}
.voltar-atual{
  margin-left: auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
}
.voltar-atual:hover{ border-color: var(--fg); background: rgba(255, 255, 255, 0.08); }
.trilha{
  position: relative;
  isolation: isolate;
  display: grid;
  row-gap: 10px;
  margin: 16px 0 6px;
}
.trilha-dia{
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 36px;
  aspect-ratio: 1;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
/* elo entre nós */
.trilha-dia::before{
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 40px;
  height: 1px;
  background: var(--line);
  z-index: -1;
}
.trilha-dia.feito{
  border-color: rgba(115, 200, 44, 0.6);
  background: linear-gradient(rgba(79, 154, 28, 0.25), rgba(79, 154, 28, 0.25)), var(--surface);
  color: var(--accent);
}
.trilha-dia:first-child::before{ display: none; }
.trilha-dia.feito::before{ background: rgba(115, 200, 44, 0.5); }
.trilha-dia.atual{
  border: 2px solid var(--accent);
  color: var(--fg);
  box-shadow: 0 0 0 0 rgba(115, 200, 44, 0.6);
  animation: pingRing 2s ease-out infinite;
}
.trilha-dia[aria-pressed="true"]{
  border-color: transparent;
  background: var(--grad-text);
  color: var(--on-accent);
  font-weight: 500;
  box-shadow: var(--glow-bright);
  animation: none;
}
.trilha-dia:hover{ border-color: var(--accent); }

.aviso{
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(184, 240, 74, 0.4);
  border-radius: var(--r-pill);
  background: rgba(184, 240, 74, 0.1);
  color: var(--accent-bright);
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--glow-bright);
  animation: rise 400ms var(--t) both;
}
.proto-dia{
  margin-top: 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
}
.proto-dia span{
  margin-left: 8px;
  padding: 2px 10px;
  vertical-align: middle;
  border: 1px solid rgba(115, 200, 44, 0.4);
  border-radius: var(--r-pill);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.saude{
  margin-top: 26px;
  padding: 16px;
  color: var(--muted-fg);
  font-size: 0.8rem;
  line-height: 1.6;
}
.saude strong{ color: var(--accent-bright); font-size: 0.7rem; }

/* ---------- Rodapé: superfície alternada ---------- */
.rodape{
  margin-top: 36px;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted-fg);
  font-size: 0.78rem;
  line-height: 1.65;
}
.rodape p{ max-width: 680px; margin-inline: auto; }
.rodape p + p{ margin-top: 12px; }
.rodape strong{ color: var(--fg); font-size: 0.68rem; margin-right: 4px; }

/* Troca de dia (deslize ou toque) */
@keyframes entraDireita{ from{ opacity: 0; transform: translateX(28px); } to{ opacity: 1; transform: none; } }
@keyframes entraEsquerda{ from{ opacity: 0; transform: translateX(-28px); } to{ opacity: 1; transform: none; } }
#content.entra-direita{ animation: entraDireita 260ms var(--t) both; }
#content.entra-esquerda{ animation: entraEsquerda 260ms var(--t) both; }
#content{ touch-action: pan-y pinch-zoom; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation: none !important; transition: none !important; }
}

/* ---------- Entrar (portão) ---------- */
.entrar{
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 56px var(--gutter) 32px;
  text-align: center;
}
.entrar .marca{ margin-top: 22px; }
.entrar .sub{ margin-top: 8px; }
.entrar-aviso{
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 240, 74, 0.4);
  border-radius: var(--r-md);
  background: rgba(184, 240, 74, 0.08);
  color: var(--accent-bright);
  font-size: 0.85rem;
  line-height: 1.5;
}
.entrar-form{
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 26px;
  text-align: left;
}
.entrar-form label{
  margin: 14px 0 6px;
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.entrar-form input{
  height: 50px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid var(--line-strong);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: rgba(0, 0, 0, 0.5);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.entrar-form input:focus-visible{
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 10px 20px -10px rgba(115, 200, 44, 0.35);
}
.entrar-form input#pin{ font-family: var(--font-mono); letter-spacing: 0.3em; }
.entrar-erro{
  margin-top: 12px;
  color: #FF6B6B;
  font-size: 0.85rem;
}
.entrar-form button{
  min-height: 50px;
  margin-top: 24px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--grad-btn);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--glow);
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), opacity var(--t);
}
.entrar-form button:hover{ transform: scale(1.02); box-shadow: var(--glow-strong); }
.entrar-form button:disabled{ opacity: 0.6; cursor: wait; transform: none; }
.entrar-rodape{
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted-fg);
  font-size: 0.8rem;
}

/* ---------- Painel de acessos ---------- */
.painel{
  max-width: 720px;
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
}
.painel-voltar{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
}
.painel-bloco{ margin-top: 28px; }
.painel-titulo{
  margin-bottom: 12px;
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.painel-pessoas{ display: grid; gap: 10px; }
.painel-pessoa{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--muted-fg);
}
.painel-pessoa strong{ color: var(--fg); font-family: var(--font-heading); font-size: 1.05rem; }
.painel-pessoa.alerta{ border-color: rgba(255, 107, 107, 0.5); }
.painel-lista{ list-style: none; }
.painel-evento{
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 2px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.painel-quando{ grid-row: span 2; color: var(--muted-fg); font-family: var(--font-mono); font-size: 0.72rem; padding-top: 2px; }
.painel-ua{ color: var(--muted-fg); font-size: 0.75rem; }
.painel-evento.derrubou strong, .painel-evento.falha strong{ color: #FF6B6B; }

/* ---------- Cronômetro do treino: barra fixa no rodapé ---------- */
body{ --selo-netlify: 0px; }
body.com-timer{ padding-bottom: calc(92px + var(--selo-netlify) + env(safe-area-inset-bottom)); }
.timer{
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px var(--gutter) calc(10px + var(--selo-netlify) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: rgba(3, 3, 4, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 -10px 40px -20px rgba(115, 200, 44, 0.45);
}
.timer-linha{
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}
.timer-info{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.timer-rotulo{
  overflow: hidden;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.timer-nome{
  overflow: hidden;
  color: var(--fg);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.timer-sub{
  overflow: hidden;
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.timer-sub b{ color: var(--fg); font-weight: 500; }
.timer-link{
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-bright);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.timer-relogio{
  flex-shrink: 0;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.timer-tempo{ flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.timer-legenda{
  color: var(--muted-fg);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.timer.serie .timer-legenda{ color: var(--accent); }
.timer.pausado .timer-legenda{ color: #FFB020; }
.timer.parado .timer-relogio{ color: var(--muted-fg); }
.timer.serie .timer-relogio{ color: var(--accent-bright); text-shadow: 0 0 18px rgba(184, 240, 74, 0.35); }
.timer.fim .timer-relogio{ color: var(--accent-bright); }
.timer-botoes{ flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.timer-btn{
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--fg);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}
.timer-btn svg{ width: 20px; height: 20px; fill: currentColor; }
.timer-btn:hover{ color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.timer-btn:active{ transform: scale(0.94); }
/* ✓ série feita */
.timer-btn.feito{ color: var(--accent-bright); box-shadow: inset 0 0 0 1.5px rgba(184, 240, 74, 0.6); }
.timer-btn.principal{
  width: 56px;
  height: 56px;
  background: var(--grad-btn);
  box-shadow: var(--glow);
  color: var(--on-accent);
}
.timer-btn.principal svg{ width: 24px; height: 24px; }
/* tocando: pause em contorno verde com brilho */
.timer-btn.principal.tocando{
  background: rgba(115, 200, 44, 0.06);
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 20px -4px rgba(115, 200, 44, 0.6);
  color: var(--accent);
}
.timer-progresso{
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.timer-progresso i{
  display: block;
  height: 100%;
  background: var(--grad-text);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 250ms linear;
}
/* descanso acabou: tempo extra em âmbar e ⏭ pulsando pra lembrar de seguir */
.timer.estourou{ border-top-color: rgba(184, 240, 74, 0.7); }
.timer.estourou .timer-relogio{ color: #FFB020; }
.timer.estourou .destaque-descanso{ color: var(--accent-bright); animation: timerPisca 1.1s ease-in-out infinite; }
@keyframes timerPisca{
  0%, 100%{ box-shadow: inset 0 0 0 1.5px var(--accent); }
  50%{ box-shadow: inset 0 0 0 1.5px var(--accent-bright), 0 0 0 5px rgba(184, 240, 74, 0.25), 0 0 24px rgba(184, 240, 74, 0.6); }
}
.timer.pausado{ border-top-color: rgba(255, 176, 32, 0.55); }
.timer.pausado .timer-relogio{ color: var(--muted-fg); text-shadow: none; animation: timerPausado 1.6s ease-in-out infinite; }
@keyframes timerPausado{ 50%{ opacity: 0.35; } }
@media (max-width: 360px){
  .timer-linha{ gap: 8px; }
  .timer-relogio{ font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce){
  .timer.estourou .destaque-descanso, .timer.pausado .timer-relogio{ animation: none; }
}

/* card do exercício em andamento */
.exercise.timer-atual{
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 1px rgba(184, 240, 74, 0.5), 0 0 40px -10px rgba(184, 240, 74, 0.45);
}
.exercise.timer-atual::before{ background: var(--accent-bright); box-shadow: 0 0 14px rgba(184, 240, 74, 0.9); }

/* tempo salvo no título do dia */
.tempo-treino{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 12px 0 0 8px;
  padding: 5px 12px;
  border: 1px solid rgba(184, 240, 74, 0.35);
  border-radius: var(--r-pill);
  background: rgba(184, 240, 74, 0.08);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.tempo-treino small{ color: var(--muted-fg); font-size: 0.66rem; }
@media (prefers-reduced-motion: reduce){ .timer.estourou{ animation: none; } }
