/* Minha Trilha no computador (>= 1024px). No celular o bloco .fm-only fica escondido e nada muda. */
.fm-only { display: none; }
@media (min-width: 0px) {
  .fm-only { display: block; }
  .student-header, .safe-bottom { display: none !important; }
  .fm-desk { display: flex; flex-direction: column; gap: 16px; max-width: 1400px; margin: 0 auto; padding: 16px 24px 48px; }
  .fm-desk section, .fm-desk aside { min-width: 0; }
  .fm-card { background: var(--bg-card); border: 1px solid rgba(80,110,230,.28); border-radius: 20px; padding: 20px 22px; }
  .fm-tit { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--text-strong); margin-bottom: 14px; }
  .fm-tit .ic { display: grid; place-items: center; width: 30px; height: 30px; font-size: 20px; }
  .fm-link { margin-left: auto; font-size: 13px; font-weight: 700; color: #7fa6ff; text-decoration: none; }

  /* topo com a montanha */
  .fm-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; min-height: 96px; margin: 0; padding: 12px 8px 12px 4px; border-radius: 0;
    background: radial-gradient(ellipse at 88% 100%, rgba(245,168,0,.14), transparent 45%), linear-gradient(90deg, transparent, rgba(20,34,110,.55) 70%, rgba(14,24,84,.8)); }
  .fm-hero::before { content: ''; position: absolute; inset: 0; opacity: .55; pointer-events: none;
    background-image: radial-gradient(1.5px 1.5px at 12% 30%, #fff, transparent), radial-gradient(1px 1px at 38% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 62% 22%, #fff, transparent),
      radial-gradient(1px 1px at 78% 55%, #fff, transparent), radial-gradient(1px 1px at 92% 18%, #fff, transparent), radial-gradient(1px 1px at 52% 85%, #fff, transparent); }
  .fm-hero-t { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
  .fm-hero-t .cap { font-size: 54px; line-height: 1; filter: drop-shadow(0 4px 12px rgba(80,110,230,.5)); }
  .fm-hero h1 { font-size: 34px; line-height: 1.1; font-weight: 900; letter-spacing: -.01em; color: #fff; margin: 0; }
  .fm-hero p { margin: 4px 0 0; font-size: 14px; color: rgba(190,200,240,.85); }
  .fm-hero-q { position: relative; z-index: 2; max-width: 280px; font-size: 14px; font-style: italic; line-height: 1.5; color: rgba(210,220,250,.9); margin-right: 250px; }
  .fm-hero svg.mt { position: absolute; z-index: 1; right: 0; top: 0; height: 100%; width: 560px; }

  .fm-info { margin-left: 10px; font-size: 18px; color: var(--text-dim); cursor: help; }
  .fm-din { position: relative; } .fm-balao { position: absolute; right: 30px; top: 68px; font-size: 44px; opacity: .9; filter: drop-shadow(0 4px 10px rgba(245,168,0,.3)); }
  .fm-pts { margin-left: 10px; font-size: 20px; line-height: 1; color: var(--text-dim); }
  .fm-ciclo .dt { margin-top: 2px; }
  /* jornada */
  .fm-jor { display: flex; align-items: center; gap: 28px; }
  .fm-jor-l { flex: 1; min-width: 0; }
  .fm-jor-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .fm-jor-top b { font-size: 18px; font-weight: 800; color: var(--text-strong); } .fm-jor-top span.n { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--text-strong); }
  .fm-pill { font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; color: #8fb4ff; background: rgba(59,110,255,.18); border: 1px solid rgba(59,110,255,.4); }
  .fm-barra { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; } .fm-barra i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #fbbf24, #e09a00); }
  .fm-jor-l small { display: block; margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--text-soft); max-width: 760px; }
  .fm-jor-r { display: flex; align-items: center; gap: 16px; padding-left: 28px; border-left: 1px solid var(--surface-3); max-width: 380px; }
  .fm-trofeu { display: grid; place-items: center; flex: none; width: 62px; height: 62px; border-radius: 50%; font-size: 30px; background: rgba(245,168,0,.14); border: 2px solid rgba(245,168,0,.6); box-shadow: 0 0 20px rgba(245,168,0,.25); }
  .fm-jor-r p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-soft); } .fm-jor-r p b { color: var(--text-strong); }

  /* dinâmica + próximos passos */
  .fm-linha { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
  .fm-din .fm-tit { margin-bottom: 8px; }
  .fm-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; color: #1a1205; background: linear-gradient(135deg, #fbbf24, #e09a00); }
  .fm-din h4 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-strong); border-left: 3px solid #3b6eff; padding-left: 8px; }
  .fm-din .obj { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-soft); max-width: 640px; }
  .fm-din .vazio { margin: 10px 0 0; font-size: 13px; color: var(--text-dim); }
  .fm-inst { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; color: var(--text); background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.35); }
  .fm-din-g { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; margin-top: 16px; }
  .fm-din-g label { display: block; font-size: 14px; font-weight: 700; color: var(--text-strong); margin-bottom: 10px; }
  .fm-notas { display: flex; gap: 10px; }
  .fm-notas button { flex: 1; height: 54px; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; color: var(--text-strong); background: var(--bg-elevated); border: 1px solid var(--surface-3); }
  .fm-notas button:hover { border-color: #f5a800; } .fm-notas button.on { color: #1a1205; background: #f5a800; border-color: #f5a800; box-shadow: 0 0 16px rgba(245,168,0,.35); }
  .fm-din textarea { width: 100%; height: 66px; resize: vertical; font: inherit; font-size: 14px; padding: 12px 14px; border-radius: 12px; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--surface-3); }
  .fm-env { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 16px; height: 48px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; border: 0; border-radius: 10px; color: #1a1205; background: linear-gradient(135deg, #fbbf24, #f5a800); box-shadow: 0 0 18px rgba(245,168,0,.3); }
  .fm-env:disabled { opacity: .55; cursor: default; }
  .fm-nota-rodape { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-dim); }
  .fm-nota-rodape.ok { color: #34d399; font-weight: 700; } .fm-nota-rodape.erro { color: #f87171; font-weight: 700; }

  .fm-passos { display: flex; flex-direction: column; gap: 10px; }
  .fm-passo { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--surface-2); }
  .fm-passo .ic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; font-size: 20px; background: rgba(59,110,255,.16); }
  .fm-passo .ic.am { background: rgba(245,168,0,.14); }
  .fm-passo div { flex: 1; min-width: 0; } .fm-passo b { display: block; font-size: 14px; color: var(--text-strong); } .fm-passo small { font-size: 12px; color: var(--text-dim); } .fm-passo i { font-style: normal; font-size: 20px; color: var(--text-dim); }
  .fm-passo.alerta { border-color: rgba(245,168,0,.65); background: rgba(245,168,0,.08); } .fm-passo.alerta b { color: #fbbf24; }

  /* ciclos */
  .fm-ciclos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .fm-ciclo { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--bg-elevated); border: 1px solid var(--surface-2); }
  .fm-ciclo::after { content: ''; position: absolute; top: 50%; right: -15px; width: 16px; border-top: 2px dotted var(--surface-3); }
  .fm-ciclo:last-child::after { display: none; }
  .fm-ciclo.atual { border: 2px solid #f5a800; background: rgba(245,168,0,.06); box-shadow: 0 0 22px rgba(245,168,0,.15); }
  .fm-ciclo-t { display: flex; align-items: center; gap: 12px; }
  .fm-ciclo-n { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; font-weight: 900; color: var(--text-soft); background: var(--surface-2); }
  .fm-ciclo.atual .fm-ciclo-n { color: #1a1205; background: #f5a800; } .fm-ciclo.concluido .fm-ciclo-n { color: #04210f; background: #34d399; }
  .fm-ciclo b { white-space: nowrap; font-size: 15px; color: var(--text-strong); } .fm-ciclo .dt { font-size: 12px; color: var(--text-dim); } .fm-ciclo p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-soft); }
  .fm-ciclo .tag { margin-left: auto; align-self: flex-start; font-size: 10px; font-weight: 800; padding: 4px 8px; white-space: nowrap; border-radius: 999px; color: #1a1205; background: #f5a800; }
  .fm-ciclo .tag.ok { background: #34d399; } .fm-ciclo .brev { align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 700; padding: 6px 16px; border-radius: 999px; color: var(--text-soft); background: var(--surface-2); }
  .fm-ciclo .prog { display: flex; align-items: center; gap: 10px; margin-top: 8px; } .fm-ciclo .prog .fm-barra { flex: 1; height: 8px; } .fm-ciclo .prog small { font-size: 12px; color: var(--text-soft); }

  /* módulos */
  .fm-mods { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; align-items: stretch; }
  .fm-modatual { display: flex; gap: 16px; padding: 14px; min-height: 150px; border-radius: 14px; background: var(--bg-elevated); border: 1px solid var(--surface-2); }
  .fm-modatual .im { display: grid; place-items: center; flex: none; width: 130px; height: 120px; border-radius: 12px; font-size: 48px; background: linear-gradient(135deg, rgba(59,110,255,.35), rgba(139,92,246,.3)); }
  .fm-modatual h4 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--text-strong); }
  .fm-modatual .n { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; color: var(--text-soft); border: 1px solid var(--surface-3); }
  .fm-modatual .pc { float: right; font-size: 13px; font-weight: 800; color: var(--text-strong); } .fm-modatual .fm-barra { margin: 10px 0 8px; clear: both; height: 8px; }
  .fm-modatual p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-soft); }
  .fm-estado { margin-left: auto; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; color: #8fb4ff; background: rgba(59,110,255,.16); }
  .fm-cont { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text-soft); }
  .fm-lista { display: flex; flex-direction: column; gap: 8px; }
  .fm-mod { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--surface-2); }
  .fm-mod .o { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface-3); }
  .fm-mod .ok { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; font-weight: 900; color: #04210f; background: #34d399; }
  .fm-mod div { flex: 1; min-width: 0; } .fm-mod b { display: block; font-size: 14px; color: var(--text-strong); } .fm-mod small { font-size: 12px; color: var(--text-dim); }
  .fm-mod em { font-style: normal; font-size: 11px; max-width: 80px; text-align: right; white-space: normal; color: var(--text-dim); flex: none; } .fm-mod i { font-style: normal; font-size: 18px; color: var(--text-dim); }
  .fm-vazio { padding: 14px; font-size: 13px; color: var(--text-dim); }
}
@media (max-width: 1279px) {
  .fm-linha { grid-template-columns: minmax(0, 1fr); } .fm-ciclos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fm-ciclo::after { display: none; }
  .fm-mods { grid-template-columns: minmax(0, 1fr); } .fm-hero-q { display: none; } .fm-jor { flex-direction: column; align-items: stretch; } .fm-jor-r { border-left: 0; padding-left: 0; max-width: none; }
}

/* ===== celular ===== */
@media (max-width: 767px) {
  .fm-desk { padding: 0 12px calc(92px + env(safe-area-inset-bottom)); gap: 12px; }
  .fm-hero { margin: 0 -12px; padding: 16px; min-height: 84px; } .fm-hero h1 { font-size: 26px; } .fm-hero-t .cap { font-size: 36px; } .fm-hero p { font-size: 12px; }
  .fm-hero svg.mt { width: 240px; opacity: .55; }
  .fm-card { padding: 16px; border-radius: 18px; }
  .fm-jor { flex-direction: column; align-items: stretch; gap: 14px; } .fm-jor-r { border-left: 0; padding-left: 0; max-width: none; } .fm-jor-top { flex-wrap: wrap; } .fm-jor-top b { font-size: 16px; }
  .fm-din-g { grid-template-columns: minmax(0, 1fr); gap: 14px; } .fm-balao { display: none; }
  .fm-ciclos { grid-template-columns: 1fr !important; } .fm-ciclo::after { display: none; }
  .fm-mods { grid-template-columns: minmax(0, 1fr); }
  .fm-modatual { flex-direction: column; } .fm-modatual .im { width: 100%; height: 90px; }
  .fm-tit { flex-wrap: wrap; } .fm-tit small { width: 100%; }
}
