/* Visual "cassino do futuro": fundo noturno, vidro fosco e neon (ciano, magenta, dourado).
   Layout: barra superior fixa + trilha à esquerda (gaveta no celular) + coluna de leitura de ~76 caracteres.
   Cada etapa tem a cor de uma ficha (chip-1..4). A tela de login fica no fim do arquivo. */
:root {
  --bg: #060912;
  --bg-2: #0c1226;
  --surface: rgb(20 28 52 / .62);       /* vidro */
  --surface-solid: #0e1530;
  --ink: #e7eefa;
  --muted: #93a2c0;
  --line: rgb(150 180 240 / .14);
  --line-forte: rgb(150 180 240 / .26);
  --neon: #2ee6d6;
  --neon-2: #ff3dbb;
  --gold: #ffc94a;
  --neon-soft: rgb(46 230 214 / .1);
  --code-bg: rgb(255 255 255 / .045);
  --chip-1: #ff5a76;
  --chip-2: #57a8ff;
  --chip-3: #b689ff;
  --chip-4: #ffc94a;
  --ok: #3ee8a1;
  --bad: #ff5a76;
  --on-neon: #03141a;
  --grad: linear-gradient(120deg, var(--neon), #57a8ff 55%, var(--neon-2));
  --glow: 0 0 0 1px rgb(46 230 214 / .25), 0 0 24px rgb(46 230 214 / .18);
  --f-brand: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --f-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --top: 60px;
  --side: 304px;
  --raio: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.68 var(--f-body);
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(1100px 620px at 92% -8%, rgb(255 61 187 / .13), transparent 60%),
    radial-gradient(900px 560px at -8% 8%, rgb(46 230 214 / .11), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgb(87 168 255 / .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* grade sutil de "sala de servidores" atrás de tudo */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: .5;
}
::selection { background: rgb(46 230 214 / .35); }
a { color: var(--neon); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, pre:focus-visible, summary:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { margin: 0; font: 600 .75rem/1.4 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--neon); }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top);
  display: flex; align-items: center; gap: 12px;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  background: rgb(6 9 18 / .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); opacity: .55; }
.brand, .marca { font: 800 1.05rem var(--f-brand); letter-spacing: .12em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span, .marca span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu-btn { display: none; font-size: 1.25rem; background: none; border: 0; color: var(--ink); padding: 4px 8px; cursor: pointer; }
.progresso { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.barra {
  --p: 0%; width: 140px; height: 6px; border-radius: 3px;
  background: var(--grad) 0 0 / var(--p) 100% no-repeat, rgb(255 255 255 / .08);
  box-shadow: 0 0 12px rgb(46 230 214 / .25);
}

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: var(--top);
  height: calc(100vh - var(--top));
  overflow-y: auto;
  padding: 22px 16px 40px max(16px, env(safe-area-inset-left));
  border-right: 1px solid var(--line);
  background: rgb(8 12 26 / .55);
  display: flex; flex-direction: column; gap: 22px;
  scrollbar-width: thin; scrollbar-color: var(--line-forte) transparent;
}
.main { min-width: 0; padding: 36px max(16px, env(safe-area-inset-right)) 80px 44px; }
.carregando .topbar, .carregando .layout, .deslogado .topbar, .deslogado .layout { display: none; }

/* ---------- trilha (sidebar) ---------- */
.side-etapa h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 .7rem/1.4 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side-etapa ol { list-style: none; margin: 0; padding: 0; }
.side-link, .side-mod { position: relative; display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .9375rem; transition: background .15s, color .15s; }
.side-link:hover, .side-mod:hover { background: rgb(255 255 255 / .05); }
.sidebar [aria-current="page"] { background: var(--neon-soft); font-weight: 600; color: #fff; }
.sidebar [aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.side-mod .num { font: 500 .75rem var(--f-mono); color: var(--muted); }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); }
.dot[data-status="lendo"] { border-color: var(--gold); background: linear-gradient(90deg, var(--gold) 50%, transparent 50%); }
.dot[data-status="feito"] { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.side-tools { margin-top: auto; padding: 16px; border: 1px solid var(--line); border-radius: var(--raio); background: var(--surface); }
.hint { margin: 0 0 8px; font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; }

.conta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font: 800 1rem var(--f-brand); color: var(--on-neon); background: var(--grad); box-shadow: 0 0 14px rgb(46 230 214 / .35); }
.conta-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.conta-txt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: .8125rem; color: var(--muted); }
.sync::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.sync[data-estado="enviando"]::before { background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: pulsar 1s ease-in-out infinite; }
.sync[data-estado="offline"]::before { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
@keyframes pulsar { 50% { opacity: .3; } }

/* ficha de cassino: anel tracejado na cor da etapa */
.chip { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--chip-c, var(--muted)); box-shadow: inset 0 0 0 2px var(--chip-c, var(--muted)), inset 0 0 0 3.5px var(--bg), 0 0 10px var(--chip-c, transparent); outline: 1.5px dashed var(--chip-c, var(--muted)); outline-offset: 1px; }
.chip-1 { --chip-c: var(--chip-1); }
.chip-2 { --chip-c: var(--chip-2); }
.chip-3 { --chip-c: var(--chip-3); }
.chip-4 { --chip-c: var(--chip-4); }

/* ---------- botões ---------- */
.btn, .btn-ghost, .btn-link { font: 600 .9375rem var(--f-body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: box-shadow .2s, transform .2s, border-color .2s, background .2s; }
.btn { padding: 10px 18px; border-radius: 10px; border: 0; background: var(--grad); color: var(--on-neon); box-shadow: 0 6px 22px rgb(46 230 214 / .25); }
.btn:hover { box-shadow: 0 8px 30px rgb(46 230 214 / .45), 0 0 0 1px rgb(255 255 255 / .25) inset; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.done { background: var(--ok); cursor: default; }
.btn-ghost { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-forte); background: rgb(255 255 255 / .03); color: var(--ink); font-weight: 500; }
.btn-ghost:hover { border-color: var(--neon); box-shadow: var(--glow); }
.btn-ghost[aria-pressed="true"] { border-color: var(--neon); background: var(--neon-soft); color: #fff; font-weight: 600; box-shadow: var(--glow); }
.btn-ghost.danger { color: var(--bad); }
.btn-ghost.danger:hover { border-color: var(--bad); box-shadow: 0 0 18px rgb(255 90 118 / .25); }
.btn-link { padding: 0; border: 0; background: none; color: var(--neon); }

/* ---------- início ---------- */
.home { max-width: 1080px; display: flex; flex-direction: column; gap: 32px; }
.home-head {
  position: relative; overflow: hidden;
  padding: clamp(24px, 4vw, 44px); padding-right: clamp(24px, 30%, 340px);
  border: 1px solid var(--line); border-radius: 22px;
  background:
    radial-gradient(500px 260px at 100% 0%, rgb(255 61 187 / .18), transparent 70%),
    radial-gradient(420px 260px at 0% 100%, rgb(46 230 214 / .14), transparent 70%),
    var(--surface);
  backdrop-filter: blur(10px);
}
.home-head h1 { margin: 6px 0 10px; font-size: clamp(2rem, 5vw, 3.2rem); background: linear-gradient(90deg, #fff 30%, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-robo { position: absolute; right: 16px; bottom: -24px; height: calc(100% + 6px); max-height: 360px; filter: drop-shadow(0 0 24px rgb(46 230 214 / .25)); pointer-events: none; }
.lead { margin: 0 0 22px; font-size: 1.125rem; color: var(--muted); max-width: 58ch; }
.home-actions { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }
.esteira { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.etapa {
  position: relative;
  background: var(--surface); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.etapa::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 2px; border-radius: 2px; background: var(--chip-c); box-shadow: 0 0 14px var(--chip-c); }
.etapa:hover { border-color: color-mix(in srgb, var(--chip-c) 45%, transparent); box-shadow: 0 10px 40px rgb(0 0 0 / .35), 0 0 30px color-mix(in srgb, var(--chip-c) 14%, transparent); }
.etapa > header { display: flex; gap: 12px; align-items: flex-start; }
.etapa > header .chip { margin-top: 4px; width: 18px; height: 18px; }
.etapa .eyebrow { color: var(--chip-c); }
.etapa h2 { margin: 2px 0; font-size: 1.4rem; }
.etapa header .muted { margin: 0; }
.mods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mod { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; transition: background .15s; }
.mod:hover { background: rgb(255 255 255 / .05); }
.mod .num { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 8px; border: 1px solid var(--line-forte); font: 500 .8125rem var(--f-mono); color: var(--muted); }
.mod:hover .num { border-color: var(--chip-c); color: var(--chip-c); }
.mod-body { display: flex; flex-direction: column; min-width: 0; }
.mod-body .muted { font-size: .875rem; line-height: 1.4; }
.mod-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pill { font-size: .75rem; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line-forte); color: var(--muted); white-space: nowrap; }
.pill[data-status="lendo"] { border-color: var(--gold); color: var(--gold); }
.pill[data-status="feito"] { border-color: var(--ok); background: rgb(62 232 161 / .15); color: var(--ok); }
.checkpoint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-forte); background: rgb(255 255 255 / .025); font-size: .9375rem; line-height: 1.5; cursor: pointer; }
.checkpoint:has(input:checked) { border-style: solid; border-color: var(--ok); background: rgb(62 232 161 / .08); }
.checkpoint input { margin-top: 4px; accent-color: var(--ok); }

/* ---------- documento ---------- */
.doc { max-width: 76ch; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 12px 0 18px; background: linear-gradient(90deg, #fff 40%, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc h2 { position: relative; font-size: 1.5rem; margin: 2.4em 0 .7em; padding-top: 1em; border-top: 1px solid var(--line); }
.doc h2::before { content: ""; position: absolute; left: 0; top: -1px; width: 56px; height: 2px; background: var(--grad); box-shadow: 0 0 10px rgb(46 230 214 / .5); }
.doc h3 { font-size: 1.1875rem; margin: 1.8em 0 .5em; color: #cfe6ff; }
.doc strong { color: #fff; }
.doc blockquote { margin: 1.2em 0; padding: 12px 18px; border: 1px solid rgb(46 230 214 / .25); border-left: 3px solid var(--neon); background: var(--neon-soft); border-radius: 0 12px 12px 0; }
.doc blockquote p { margin: .3em 0; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.doc hr:has(+ h2) { display: none; }   /* o h2 já tem a linha; evita linha dupla */
.doc code { font: .875em var(--f-mono); background: var(--code-bg); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; color: #bff6ef; }
.doc pre { overflow-x: auto; padding: 16px 18px; background: rgb(3 6 14 / .7); border: 1px solid var(--line); border-radius: 12px; line-height: 1.55; }
.doc pre code { background: none; border: 0; padding: 0; font-size: .8125rem; color: #d6e4ff; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.doc table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.5; }
.doc th, .doc td { padding: 9px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { background: rgb(46 230 214 / .07); font-weight: 600; color: #fff; }
.doc tr:last-child td { border-bottom: 0; }
.doc tbody tr:hover td { background: rgb(255 255 255 / .025); }
.doc details { margin: 1em 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.doc summary { cursor: pointer; font-weight: 600; color: var(--neon); }
.doc img { max-width: 100%; }

.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: .8125rem; color: var(--muted); width: fit-content; max-width: 100%; }

/* revisão interativa */
.quiz { display: flex; flex-direction: column; gap: 10px; margin: 1em 0; }
.quiz-score { margin: 0; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.qcard { padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--line-forte); border-radius: 12px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.qcard[data-marca="certo"] { border-left-color: var(--ok); box-shadow: -6px 0 18px -10px var(--ok); }
.qcard[data-marca="errado"] { border-left-color: var(--bad); box-shadow: -6px 0 18px -10px var(--bad); }
.qq { display: flex; gap: 10px; margin: 0 0 6px; }
.qq .num { font: 500 .875rem/1.9 var(--f-mono); color: var(--neon); }
.qa { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-forte); }
.qactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.mod-foot { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prev-next a { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.prev-next a:hover { border-color: var(--neon); box-shadow: var(--glow); }
.prev-next a small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.prev-next .next { text-align: right; }

/* ---------- flashcards ---------- */
.flash { max-width: 660px; }
.flash h1 { margin: 6px 0 8px; }
.flash-area { margin-top: 26px; }
.card-flash {
  position: relative; overflow: hidden;
  padding: 32px; border: 1px solid var(--line); border-radius: 22px;
  background: radial-gradient(400px 200px at 100% 0%, rgb(255 61 187 / .14), transparent 70%), var(--surface);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  box-shadow: 0 20px 50px rgb(0 0 0 / .35);
}
.card-flash::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad); }
.card-flash h2 { margin: 0; font-size: 2rem; }
.card-flash.done::before { background: var(--ok); }
.verso p { margin: 0 0 10px; }

/* ---------- instalar no celular ---------- */
.side-btn { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--neon); font-weight: 500; }
.install {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 32px));
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line-forte); border-radius: 18px;
  background: rgb(14 21 48 / .92); backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgb(0 0 0 / .5), var(--glow);
}
.deslogado .install, .carregando .install { display: none; }   /* volta a aparecer depois do login */
.install img { flex: none; border-radius: 12px; }
.install-body { min-width: 0; }
.install h2 { margin: 0 0 4px; font-size: 1.125rem; }
.install p { margin: 0 0 12px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.install-passos { margin: 0 0 12px; padding-left: 1.2em; font-size: .9375rem; line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.install-acoes { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- avisos e erros ---------- */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-forte); background: rgb(14 21 48 / .95); color: var(--ink); font-size: .9375rem; box-shadow: var(--glow); }
.erro { max-width: 60ch; }
[hidden] { display: none !important; }

/* ================= tela de login ================= */
.login {
  position: fixed; inset: 0; z-index: 50;
  overflow: hidden auto;
  display: grid; align-items: center; justify-items: start;
  padding: 32px clamp(16px, 9vw, 140px);
  background:
    radial-gradient(900px 520px at 75% 20%, rgb(255 61 187 / .22), transparent 60%),
    radial-gradient(700px 480px at 10% 85%, rgb(46 230 214 / .18), transparent 60%),
    linear-gradient(180deg, #050713, #0a0f24 60%, #120a26);
}
.cena { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
/* estrelas */
.cena::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 15%, #fff9, transparent), radial-gradient(1.5px 1.5px at 85% 45%, #9fdcff, transparent), radial-gradient(1px 1px at 40% 70%, #fff7, transparent), radial-gradient(1px 1px at 55% 35%, #ffc94a, transparent), radial-gradient(1.5px 1.5px at 10% 60%, #ff3dbb, transparent); background-size: 340px 340px; opacity: .7; }
/* sol neon no horizonte */
.horizonte { position: absolute; left: 50%; bottom: 34%; width: min(70vw, 760px); aspect-ratio: 1; translate: -50% 50%; border-radius: 50%; background: linear-gradient(180deg, rgb(255 61 187 / .55), rgb(255 201 74 / .15) 60%, transparent 75%); filter: blur(2px); mask-image: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 20px); opacity: .55; }
/* piso de grade em perspectiva, andando */
.piso {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 38%;
  background-image: linear-gradient(rgb(46 230 214 / .55) 1px, transparent 1px), linear-gradient(90deg, rgb(46 230 214 / .55) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(420px) rotateX(64deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 55%);
  animation: piso 3s linear infinite;
}
.piso::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--neon-2); box-shadow: 0 0 24px 6px rgb(255 61 187 / .6); }
@keyframes piso { to { background-position: 0 64px; } }
.robo {
  position: absolute; right: clamp(-60px, 4vw, 120px); bottom: 3vh;
  height: min(86vh, 780px); max-width: 60vw; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 0 40px rgb(46 230 214 / .3)) drop-shadow(0 30px 40px rgb(0 0 0 / .6));
  animation: pairar 6s ease-in-out infinite;
}
@keyframes pairar { 50% { translate: 0 -14px; } }

/* fichas, cartas, dado, roleta e 777 flutuando */
.flutua { position: absolute; width: var(--t, 80px); height: auto; filter: drop-shadow(0 0 18px var(--brilho, rgb(46 230 214 / .45))) drop-shadow(0 10px 14px rgb(0 0 0 / .5)); animation: flutuar var(--d, 7s) ease-in-out var(--a, 0s) infinite; rotate: var(--r, 0deg); }
@keyframes flutuar { 0%, 100% { translate: 0 0; } 50% { translate: var(--x, 6px) -26px; rotate: calc(var(--r, 0deg) + 14deg); } }
.f1 { --t: 92px; --r: -18deg; --brilho: rgb(255 61 187 / .6); left: 6%; top: 12%; }
.f2 { --t: 76px; --r: 12deg; --d: 8s; --a: -2s; --brilho: rgb(255 201 74 / .55); left: 40%; top: 7%; }
.f3 { --t: 70px; --r: -14deg; --d: 9s; --a: -4s; left: 3%; bottom: 18%; }
.f4 { --t: 64px; --r: 20deg; --d: 7.5s; --a: -1s; --brilho: rgb(255 61 187 / .5); right: 3%; bottom: 24%; }
.f5 { --t: 64px; --r: 24deg; --d: 6.5s; --a: -3s; left: 41%; top: 50%; }
.f6 { --t: 120px; --r: 0deg; --d: 10s; --brilho: rgb(255 201 74 / .45); left: 41%; bottom: 7%; animation-name: flutuar, rodar; animation-duration: 10s, 24s; animation-timing-function: ease-in-out, linear; }
@keyframes rodar { to { transform: rotate(360deg); } }
.f7 { --t: 54px; --r: 30deg; --d: 8.5s; --a: -5s; left: 29%; bottom: 5%; }
.f8 { --brilho: rgb(255 201 74 / .7); left: 46%; top: 27%; font: 800 2.2rem var(--f-brand); letter-spacing: .08em; color: var(--gold); text-shadow: 0 0 12px rgb(255 201 74 / .8), 0 0 30px rgb(255 61 187 / .6); --d: 6s; --a: -2.5s; --r: -8deg; }

/* cartão de vidro com borda neon girando */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.login-card {
  position: relative; z-index: 1;
  width: min(430px, 100%);
  padding: 34px 30px 30px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgb(255 255 255 / .1), rgb(255 255 255 / .025) 60%), rgb(10 14 32 / .55);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 30px 80px rgb(0 0 0 / .55), 0 0 60px rgb(46 230 214 / .12);
  display: flex; flex-direction: column; gap: 14px;
}
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), var(--neon), #57a8ff, var(--neon-2), var(--gold), var(--neon));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: borda 6s linear infinite;
}
@keyframes borda { to { --ang: 360deg; } }
.marca { margin: 0; font-size: .95rem; }
.login-card h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.1rem); }
.login-sub { margin: -4px 0 4px; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.abas { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgb(0 0 0 / .35); border: 1px solid var(--line); }
.abas button { padding: 9px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 .9375rem var(--f-body); cursor: pointer; transition: background .2s, color .2s; }
.abas button[aria-pressed="true"] { background: rgb(46 230 214 / .14); color: #fff; box-shadow: inset 0 0 0 1px rgb(46 230 214 / .45), 0 0 18px rgb(46 230 214 / .15); }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.campo input {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-forte);
  background: rgb(0 0 0 / .35); color: var(--ink);
  font: 400 1rem var(--f-body); letter-spacing: normal; text-transform: none;
  transition: border-color .2s, box-shadow .2s;
}
.campo input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgb(46 230 214 / .2), 0 0 20px rgb(46 230 214 / .2); }
.login-card[data-modo="entrar"] .campo-nome { display: none; }
.login-erro { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgb(255 90 118 / .5); background: rgb(255 90 118 / .1); color: #ffc2cc; font-size: .9rem; }
.btn-neon { margin-top: 4px; padding: 14px; font: 800 .95rem var(--f-brand); letter-spacing: .12em; text-transform: uppercase; border-radius: 12px; }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 15; left: 0; top: var(--top);
    width: min(86vw, var(--side)); height: calc(100% - var(--top));
    background: var(--surface-solid);
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .menu-aberto .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .55); }
  .main { padding: 24px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left)); }
  .brand { font-size: .9rem; }
  .progresso { font-size: .8rem; gap: 8px; }
  .barra { width: 48px; }
  .prev-next { grid-template-columns: 1fr; }
  .mod { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .mod-meta { grid-column: 2; flex-direction: row; align-items: center; gap: 8px; }
  .home-head { padding-right: clamp(24px, 4vw, 44px); padding-bottom: 150px; }
  .home-robo { height: 190px; bottom: -30px; right: -10px; }

  /* celular: robô em cima, cabeça aparecendo acima do cartão */
  .login { justify-items: center; align-items: end; padding: max(28vh, 190px) 16px 24px; }
  .robo { right: 50%; top: 2vh; bottom: auto; translate: 50% 0; height: 40vh; max-width: none; animation: none; }
  .f2, .f4, .f5, .f8 { display: none; }
  .f1 { --t: 56px; left: 4%; top: 4%; }
  .f6 { --t: 70px; left: auto; right: 4%; bottom: auto; top: 3%; }
  .f3 { --t: 48px; left: 3%; top: 22%; bottom: auto; }
  .f7 { --t: 40px; left: auto; right: 6%; bottom: auto; top: 22%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
