/* Jogo do curso — linguagem visual estilo Duolingo sobre a paleta Total Value.
   Botões com borda inferior grossa (efeito de tecla), feedback em faixa que
   sobe do rodapé, uma questão por tela. */

:root{
  --g-green:#46BC5C; --g-green-dark:#238D43; --g-green-soft:#E4F7E9; --g-green-line:#A9E3B8;
  --g-red:#E5484D; --g-red-dark:#B4272C; --g-red-soft:#FDECEC; --g-red-line:#F5BFC1;
  --g-ink:#172039; --g-muted:#7785A0; --g-card:#F7F9F7; --g-line:#E2E8EF;
  --g-gold:#F5A524;
}

.game-body{font-family:Poppins,"Segoe UI",Arial,sans-serif;color:var(--g-ink);background:#fff}
/* A página do jogo não carrega course.css, então precisa do próprio reset de link. */
.game-body a{color:inherit;text-decoration:none}
.game-body *{box-sizing:border-box}

/* ---------------------------------------------------------------- botões */
.gbtn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  font-family:inherit;font-weight:800;font-size:16px;letter-spacing:.04em;text-transform:uppercase;
  padding:15px 28px;border-radius:16px;border:0;border-bottom:4px solid rgba(0,0,0,.22);
  cursor:pointer;transition:transform .06s ease,filter .15s ease,background .15s ease;
  -webkit-tap-highlight-color:transparent;
}
.gbtn:active:not(:disabled){transform:translateY(3px);border-bottom-width:1px}
.gbtn:disabled{opacity:.45;cursor:not-allowed;border-bottom-color:rgba(0,0,0,.12)}
.gbtn-green{background:var(--g-green);color:#fff}
.gbtn-green:hover:not(:disabled){filter:brightness(1.05)}
.gbtn-red{background:var(--g-red);color:#fff}
.gbtn-ghost{background:#fff;color:var(--g-muted);border:2px solid var(--g-line);border-bottom-width:4px}
.gbtn-ghost:hover{color:var(--g-ink);border-color:var(--g-muted)}

/* ---------------------------------------------------------------- topo */
.gtop{position:sticky;top:0;z-index:40;background:#fff;padding:16px 0 14px;border-bottom:1px solid var(--g-line)}
.gtop-in{max-width:820px;margin:0 auto;padding:0 18px;display:flex;align-items:center;gap:16px}
.gquit{flex:0 0 auto;width:34px;height:34px;border:0;background:none;cursor:pointer;color:var(--g-muted);
  display:flex;align-items:center;justify-content:center;border-radius:10px}
.gquit:hover{background:var(--g-card);color:var(--g-ink)}
.gquit svg{width:20px;height:20px;stroke:currentColor;stroke-width:3;fill:none;stroke-linecap:round}
.gbar{flex:1;height:16px;border-radius:99px;background:#E7ECF2;overflow:hidden}
.gbar i{display:block;height:100%;width:0;border-radius:99px;background:var(--g-green);
  transition:width .4s cubic-bezier(.2,.8,.2,1);position:relative}
.gbar i::after{content:"";position:absolute;inset:3px 6px auto 6px;height:4px;border-radius:99px;background:rgba(255,255,255,.35)}
.gscore{flex:0 0 auto;display:flex;align-items:center;gap:7px;font-weight:800;font-size:16px;color:var(--g-gold)}
.gscore svg{width:19px;height:19px;fill:currentColor}
.gsound{flex:0 0 auto;width:34px;height:34px;border:0;background:none;cursor:pointer;color:var(--g-muted);
  display:flex;align-items:center;justify-content:center;border-radius:10px}
.gsound:hover{background:var(--g-card);color:var(--g-ink)}
.gsound svg{width:20px;height:20px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* ---------------------------------------------------------------- palco */
.gstage{max-width:820px;margin:0 auto;padding:34px 18px 220px}
.gkicker{font-size:12.5px;font-weight:800;letter-spacing:.16em;color:var(--g-green-dark);margin-bottom:14px}
.gprompt{font-size:clamp(21px,3.2vw,30px);font-weight:800;line-height:1.28;letter-spacing:-.02em}
.gcontext{margin-top:14px;padding:16px 18px;background:var(--g-card);border-radius:14px;
  font-size:15.5px;line-height:1.5;color:var(--g-ink);border-left:5px solid var(--g-green)}
.ghint{margin-top:12px;font-size:14px;color:var(--g-muted);font-weight:600}
.gtag{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;letter-spacing:.1em;
  padding:5px 11px;border-radius:99px;background:var(--g-card);color:var(--g-muted);margin-left:10px;vertical-align:middle}

/* opções */
.gopts{margin-top:28px;display:flex;flex-direction:column;gap:12px}
.gopt{
  display:flex;align-items:center;gap:14px;width:100%;text-align:left;
  padding:16px 18px;border-radius:16px;background:#fff;cursor:pointer;
  border:2px solid var(--g-line);border-bottom-width:4px;
  font-family:inherit;font-size:16.5px;font-weight:600;line-height:1.4;color:var(--g-ink);
  transition:background .12s,border-color .12s,transform .06s;-webkit-tap-highlight-color:transparent;
}
.gopt:hover:not(:disabled){background:var(--g-card)}
.gopt:active:not(:disabled){transform:translateY(2px)}
.gopt .gkey{flex:0 0 26px;height:26px;border-radius:8px;border:2px solid var(--g-line);
  display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:var(--g-muted)}
.gopt.sel{background:var(--g-green-soft);border-color:var(--g-green);color:var(--g-green-dark)}
.gopt.sel .gkey{background:var(--g-green);border-color:var(--g-green);color:#fff}
.gopt.right{background:var(--g-green-soft);border-color:var(--g-green)}
.gopt.wrong{background:var(--g-red-soft);border-color:var(--g-red)}
.gopt:disabled{cursor:default}
.gopt .gmark{margin-left:auto;flex:0 0 22px;height:22px}
.gopt .gmark svg{width:22px;height:22px}

/* numérico */
.gnum{margin-top:28px;display:flex;align-items:center;gap:12px}
.gnum input{
  flex:1;min-width:0;font-family:inherit;font-size:30px;font-weight:800;color:var(--g-ink);
  padding:16px 20px;border-radius:16px;border:2px solid var(--g-line);border-bottom-width:4px;outline:none;
}
.gnum input:focus{border-color:var(--g-green)}
.gnum input.right{border-color:var(--g-green);background:var(--g-green-soft)}
.gnum input.wrong{border-color:var(--g-red);background:var(--g-red-soft)}
.gnum .gunit{font-size:20px;font-weight:800;color:var(--g-muted)}

/* classificação */
.gclass{margin-top:26px;display:flex;flex-direction:column;gap:12px}
.gitem{padding:16px 18px;border-radius:16px;border:2px solid var(--g-line);border-bottom-width:4px;background:#fff}
.gitem.right{border-color:var(--g-green);background:var(--g-green-soft)}
.gitem.wrong{border-color:var(--g-red);background:var(--g-red-soft)}
.gitem .gtext{font-size:16px;font-weight:600;line-height:1.35;display:flex;align-items:flex-start;gap:10px}
.gitem .gtext .gmark{flex:0 0 20px}
.gitem .gtext .gmark svg{width:20px;height:20px}
.gchips{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px}
.gchip{font-family:inherit;font-size:13.5px;font-weight:700;padding:9px 15px;border-radius:99px;cursor:pointer;
  background:#fff;color:var(--g-muted);border:2px solid var(--g-line);transition:all .12s}
.gchip:hover:not(:disabled){border-color:var(--g-muted);color:var(--g-ink)}
.gchip.sel{background:var(--g-green);border-color:var(--g-green);color:#fff}
.gchip:disabled{cursor:default}

/* ---------------------------------------------------------- faixa de feedback */
.gfeed{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  background:#fff;border-top:2px solid var(--g-line);
  transform:translateY(110%);transition:transform .32s cubic-bezier(.2,.9,.3,1);
  padding:20px 0 24px;
  /* Explicação longa em tela baixa (celular deitado) não pode empurrar o botão
     Continuar para fora da tela — a faixa rola por dentro. */
  max-height:62vh;overflow-y:auto;overscroll-behavior:contain;
}
.gfeed.on{transform:translateY(0)}
.gfeed.ok{background:var(--g-green-soft);border-top-color:var(--g-green-line)}
.gfeed.no{background:var(--g-red-soft);border-top-color:var(--g-red-line)}
.gfeed-in{max-width:820px;margin:0 auto;padding:0 18px;display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.gfeed-icon{flex:0 0 52px;width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff}
.gfeed-icon svg{width:30px;height:30px;stroke-width:3.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
.gfeed.ok .gfeed-icon svg{stroke:var(--g-green-dark)}
.gfeed.no .gfeed-icon svg{stroke:var(--g-red-dark)}
.gfeed-txt{flex:1;min-width:220px}
.gfeed-title{font-size:21px;font-weight:800;letter-spacing:-.01em}
.gfeed.ok .gfeed-title{color:var(--g-green-dark)}
.gfeed.no .gfeed-title{color:var(--g-red-dark)}
.gfeed-body{margin-top:7px;font-size:15px;line-height:1.5;color:var(--g-ink)}
.gfeed-gain{display:inline-flex;align-items:center;gap:6px;margin-left:10px;font-size:14px;font-weight:800;color:var(--g-gold)}
.gfeed-gain svg{width:15px;height:15px;fill:currentColor}
.gfeed .gbtn{margin-left:auto;align-self:center}

/* barra de ação fixa (verificar) */
.gact{position:fixed;left:0;right:0;bottom:0;z-index:50;background:#fff;border-top:2px solid var(--g-line);padding:18px 0 22px}
.gact-in{max-width:820px;margin:0 auto;padding:0 18px;display:flex;align-items:center;gap:14px}
.gact .gbtn{margin-left:auto;min-width:190px}
.gact .gtries{font-size:13.5px;font-weight:700;color:var(--g-muted);display:flex;align-items:center;gap:8px}
.gact .gtries i{width:9px;height:9px;border-radius:50%;background:var(--g-green);display:inline-block}
.gact .gtries i.spent{background:var(--g-line)}

/* ---------------------------------------------------------------- final */
.gend{max-width:640px;margin:0 auto;padding:52px 18px 90px;text-align:center}
.gend-badge{width:104px;height:104px;border-radius:50%;margin:0 auto 26px;display:flex;align-items:center;justify-content:center;
  background:var(--g-green-soft);border:5px solid var(--g-green)}
.gend-badge svg{width:52px;height:52px;stroke:var(--g-green-dark);stroke-width:3.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
.gend h2{font-size:clamp(26px,4.4vw,36px);font-weight:800;letter-spacing:-.025em;line-height:1.15}
.gend .gsub{margin-top:12px;font-size:16.5px;color:var(--g-muted);line-height:1.5}
.gend-stats{margin:32px 0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.gstat{padding:18px 12px;border-radius:16px;border:2px solid var(--g-line);border-bottom-width:4px;background:#fff}
.gstat b{display:block;font-size:26px;font-weight:800;letter-spacing:-.02em}
.gstat span{display:block;margin-top:5px;font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--g-muted)}
.gstat.gold{border-color:var(--g-gold);background:#FFF9EE}
.gstat.gold b{color:var(--g-gold)}
.gend-actions{display:flex;flex-direction:column;gap:12px}
.gend-actions .gbtn{width:100%}

/* ---------------------------------------------------------------- hub */
.hub-hero{padding:52px 0 12px}
.hub-rank{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding:24px 26px;border-radius:22px;
  background:var(--g-card);border:1px solid var(--g-line);margin-top:26px}
.hub-rank .medal{flex:0 0 62px;width:62px;height:62px;border-radius:50%;background:#fff;border:4px solid var(--g-gold);
  display:flex;align-items:center;justify-content:center}
.hub-rank .medal svg{width:30px;height:30px;fill:var(--g-gold)}
.hub-rank .rk{font-size:21px;font-weight:800;letter-spacing:-.02em}
.hub-rank .rs{margin-top:4px;font-size:14px;color:var(--g-muted)}
.hub-rank .pts{margin-left:auto;text-align:right}
.hub-rank .pts b{display:block;font-size:30px;font-weight:800;color:var(--g-gold);letter-spacing:-.02em}
.hub-rank .pts span{font-size:12.5px;font-weight:700;letter-spacing:.08em;color:var(--g-muted)}
.hub-rank .bar{flex-basis:100%;height:12px;border-radius:99px;background:#E7ECF2;overflow:hidden}
.hub-rank .bar i{display:block;height:100%;width:0;background:var(--g-gold);border-radius:99px;transition:width .5s}

.hub-rules{margin-top:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.hub-rule{padding:16px 18px;border-radius:16px;background:#fff;border:1px solid var(--g-line)}
.hub-rule b{display:block;font-size:19px;font-weight:800;color:var(--g-green-dark)}
.hub-rule span{display:block;margin-top:4px;font-size:13.5px;color:var(--g-muted);line-height:1.4}

.hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.hub-card{display:flex;flex-direction:column;gap:10px;padding:20px;border-radius:18px;background:#fff;
  border:2px solid var(--g-line);border-bottom-width:4px;transition:transform .2s,border-color .2s}
.hub-card:hover{transform:translateY(-3px);border-color:var(--g-green-line)}
.hub-card.done{background:var(--g-green-soft);border-color:var(--g-green-line)}
.hub-card .hrow{display:flex;align-items:center;gap:11px}
.hub-card .hnum{flex:0 0 34px;height:34px;border-radius:11px;background:var(--g-card);color:var(--g-muted);
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800}
.hub-card.done .hnum{background:var(--g-green);color:#fff}
.hub-card .hlab{font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--g-muted)}
.hub-card h4{font-size:16.5px;font-weight:800;line-height:1.3;letter-spacing:-.01em}
.hub-card .hfoot{margin-top:auto;padding-top:6px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.hub-card .hpts{font-size:13px;font-weight:800;color:var(--g-gold);display:flex;align-items:center;gap:6px}
.hub-card .hpts svg{width:14px;height:14px;fill:currentColor}
.hub-card .hgo{font-size:12.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--g-green-dark)}
.hub-card.done .hgo{color:var(--g-green-dark)}

/* cartão de desafio dentro da página do módulo */
.challenge{margin-top:40px;padding:26px 28px;border-radius:22px;background:var(--g-green-soft);
  border:2px solid var(--g-green-line);display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.challenge .cico{flex:0 0 54px;width:54px;height:54px;border-radius:16px;background:var(--g-green);
  display:flex;align-items:center;justify-content:center}
.challenge .cico svg{width:28px;height:28px;stroke:#fff;stroke-width:2.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.challenge .ctx{flex:1;min-width:230px}
.challenge .ctx b{display:block;font-size:19px;font-weight:800;letter-spacing:-.015em}
.challenge .ctx span{display:block;margin-top:5px;font-size:14.5px;color:var(--g-muted);line-height:1.45}
.challenge .cdone{display:inline-flex;align-items:center;gap:7px;margin-top:9px;font-size:13px;font-weight:800;color:var(--g-green-dark)}
.challenge .cdone svg{width:15px;height:15px;stroke:currentColor;stroke-width:3.4;fill:none;stroke-linecap:round;stroke-linejoin:round}

@media (max-width:640px){
  .gstage{padding:26px 16px 210px}
  .gend-stats{grid-template-columns:1fr;gap:10px}
  .gstat{display:flex;align-items:center;justify-content:space-between;padding:14px 18px}
  .gstat b{font-size:22px}
  .gstat span{margin-top:0}
  .gfeed .gbtn{margin-left:0;width:100%}
  .gact .gbtn{min-width:0;flex:1}
  .hub-rank .pts{margin-left:0;text-align:left}
}
@media (prefers-reduced-motion:reduce){
  .gfeed{transition:none}
  .gbar i{transition:none}
}
