/* Tela do participante — mobile-first */

.tela-jogador { min-height: 100%; overflow-x: hidden; }
.app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }

.j-topo { display: flex; align-items: center; gap: 12px; height: 48px; flex: none; }
.j-logo { height: 20px; width: auto; }
.j-placar { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--texto-2); padding: 6px 6px 6px 14px; border-radius: 99px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--linha); }
.j-placar b { color: var(--texto); font-variant-numeric: tabular-nums; }
.j-placar-pos { font-weight: 800; color: var(--opc-texto); background: var(--turq); border-radius: 99px; padding: 2px 10px; }
.j-placar-pos:empty { display: none; }
.j-som { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.06); color: var(--texto-2); display: grid; place-items: center; flex: none; }
.j-placar:not(.oculto) + .j-som { margin-left: 0; }
.j-som svg { width: 22px; height: 22px; }

.j-tela { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: 8px; }
.j-cena { flex: 1; display: flex; flex-direction: column; animation: surgir .45s var(--ease-out) both; }
.j-centro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; text-align: center; gap: 14px; }
.j-titulo { font-size: clamp(28px, 8vw, 38px); line-height: 1.1; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.j-sub { font-size: 17px; color: var(--texto-2); margin: 0; line-height: 1.45; }
.j-rotulo { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); font-weight: 700; }

/* ----------------------------------------------------------------- entrar */
.j-entrar .j-centro { justify-content: flex-start; padding-top: 6vh; }
.j-sala { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.j-sala strong { font-size: 44px; letter-spacing: .08em; color: var(--amarelo); font-variant-numeric: tabular-nums; font-weight: 800; }
.j-form { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.j-input { width: 100%; padding: 18px 20px; border-radius: 18px; border: 0; font-size: 22px; font-weight: 700; text-align: center;
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 2px var(--linha); color: var(--texto); transition: box-shadow .2s; }
.j-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--turq), 0 0 0 6px rgba(0,180,208,.15); }
.j-input::placeholder { color: var(--texto-3); font-weight: 500; }
.j-form .btn { font-size: 20px; padding: 18px; }
.j-erro { color: var(--erro); font-weight: 600; min-height: 1.4em; font-size: 16px; }
.j-input.erro { animation: tremer .4s; box-shadow: inset 0 0 0 2px var(--erro); }
.j-dica { font-size: 14px; color: var(--texto-3); }

/* ------------------------------------------------------------------ lobby */
.j-avatar-grande { position: relative; display: grid; place-items: center; width: 180px; height: 180px; margin-bottom: 10px; }
.j-avatar-grande .avatar { font-size: 56px; position: relative; z-index: 1; }
.j-avatar-grande::before, .j-avatar-grande::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; border: 2px solid var(--turq); animation: onda 2.4s ease-out infinite; }
.j-avatar-grande::after { animation-delay: 1.2s; }
@keyframes onda { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
.j-dica-tela { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 18px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--linha); color: var(--texto-2); font-size: 15px; }

/* --------------------------------------------------------------- contagem */
.j-num-grande { font-size: 140px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--turq-claro); text-shadow: 0 0 40px rgba(0,180,208,.6); }
.j-num-grande span { display: inline-block; animation: pop .5s var(--ease-mola) both; }

/* --------------------------------------------------------------- pergunta */
.j-perg-topo { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--texto-2); font-weight: 600; }
.j-tempo { flex: 1; height: 10px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.j-tempo i { display: block; height: 100%; width: 100%; border-radius: 99px; transform-origin: left; background: linear-gradient(90deg, var(--teal), var(--turq-claro)); }
.j-tempo.alerta i { background: linear-gradient(90deg, #ED8B00, var(--amarelo)); }
.j-tempo.critico i { background: linear-gradient(90deg, #C62F0A, var(--erro)); }
.j-seg { min-width: 2.4ch; text-align: right; font-size: 22px; font-weight: 800; color: var(--texto); font-variant-numeric: tabular-nums; }
.j-enunciado { font-size: clamp(19px, 5.2vw, 24px); line-height: 1.3; font-weight: 700; margin: 14px 0; text-wrap: balance; }
.j-imagem { border-radius: 16px; overflow: hidden; max-height: 22vh; margin-bottom: 12px; background: var(--bg-2); }
.j-imagem img { width: 100%; max-height: 22vh; object-fit: contain; display: block; }
.j-alts { flex: 1; display: grid; gap: 12px; grid-auto-rows: minmax(72px, 1fr); min-height: 300px; }
.j-alts.grade { grid-template-columns: 1fr 1fr; }
.j-alts.vf { grid-template-columns: 1fr 1fr; min-height: 220px; }
.j-alt { position: relative; border: 0; border-radius: 20px; background: var(--opc); color: var(--opc-texto); display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; text-align: left; font-size: 19px; font-weight: 700; line-height: 1.2; box-shadow: 0 7px 0 rgba(0,0,0,.3), inset 0 -4px 0 rgba(0,0,0,.12);
  transition: transform .12s, box-shadow .12s, opacity .35s, filter .35s; touch-action: manipulation; animation: surgir .4s var(--ease-out) both; }
.j-alt:nth-child(2) { animation-delay: .05s; } .j-alt:nth-child(3) { animation-delay: .1s; } .j-alt:nth-child(4) { animation-delay: .15s; }
.j-alt .forma { font-size: 34px; flex: none; }
.j-alts.grade .j-alt, .j-alts.vf .j-alt { flex-direction: column; justify-content: center; text-align: center; }
.j-alts.grade .j-alt .forma, .j-alts.vf .j-alt .forma { font-size: 46px; }
.j-alt:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.j-alts.travado .j-alt { pointer-events: none; }
.j-alts.travado .j-alt:not(.escolhida) { opacity: .28; filter: saturate(.3); transform: scale(.96); }
.j-alt.escolhida { box-shadow: 0 7px 0 rgba(0,0,0,.3), 0 0 0 4px #fff; }

.j-enviada { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--linha); animation: surgir .4s var(--ease-out); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--turq); border-right-color: transparent; animation: girar .8s linear infinite; flex: none; }
.j-enviada b { display: block; font-size: 17px; }
.j-enviada span { font-size: 14px; color: var(--texto-2); }

/* --------------------------------------------------------------- feedback */
.j-feedback { flex: 1; margin: 0 -16px -16px; padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; animation: subir .6s var(--ease-mola) both; }
@keyframes subir { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.j-feedback.certo { background: linear-gradient(180deg, #19B97A, #0E8E5C); }
.j-feedback.errado { background: linear-gradient(180deg, #E2503A, #B5301F); }
.j-feedback.sem { background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); }
.j-fb-icone { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); font-size: 58px; animation: pop .6s .1s var(--ease-mola) both; }
.certo .j-fb-icone { color: #0E8E5C; } .errado .j-fb-icone { color: #B5301F; } .sem .j-fb-icone { color: var(--bg-3); }
.j-fb-titulo { font-size: 36px; font-weight: 800; margin: 4px 0 0; color: #fff; }
.j-fb-pontos { font-size: 52px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 4px 0 rgba(0,0,0,.15); }
.j-fb-seq { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: rgba(0,0,0,.2); color: var(--amarelo); font-weight: 800; font-size: 17px; }
.j-fb-seq .forma { font-size: 20px; }
.j-fb-correta { font-size: 16px; color: rgba(255,255,255,.9); background: rgba(0,0,0,.18); padding: 10px 16px; border-radius: 14px; max-width: 100%; }
.j-fb-correta b { color: #fff; }
.j-fb-pos { margin-top: 10px; display: flex; gap: 10px; width: 100%; }
.j-fb-pos div { flex: 1; padding: 14px 10px; border-radius: 18px; background: rgba(0,0,0,.2); color: rgba(255,255,255,.85); font-size: 14px; }
.j-fb-pos strong { display: block; color: #fff; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.j-fb-pos .mov { font-size: 15px; font-weight: 800; color: #fff; }

/* ------------------------------------------------------------------ pódio */
.j-medalha { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; font-size: 68px; font-weight: 800; color: var(--opc-texto);
  box-shadow: 0 0 0 10px rgba(255,255,255,.08), 0 0 60px rgba(255,196,0,.4); animation: pop .8s var(--ease-mola) both; }
.j-medalha.m1 { background: radial-gradient(circle at 35% 30%, #FFF1B3, var(--amarelo)); }
.j-medalha.m2 { background: radial-gradient(circle at 35% 30%, #fff, #A7C1C8); }
.j-medalha.m3 { background: radial-gradient(circle at 35% 30%, #CFF5EE, var(--teal)); }
.j-medalha.mx { background: var(--bg-3); color: var(--texto); box-shadow: inset 0 0 0 2px var(--linha-forte); font-size: 54px; }
.j-resumo { display: flex; gap: 10px; width: 100%; margin-top: 8px; }
.j-resumo div { flex: 1; padding: 14px 10px; border-radius: 18px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--linha); font-size: 13px; color: var(--texto-2); }
.j-resumo strong { display: block; font-size: 24px; color: var(--texto); font-variant-numeric: tabular-nums; }
.j-top3 { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.j-top3 div { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); font-weight: 700; }
.j-top3 .p { width: 2ch; color: var(--amarelo); }
.j-top3 .avatar { font-size: 14px; }
.j-top3 .pts { margin-left: auto; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.j-top3 .eu { box-shadow: inset 0 0 0 2px var(--turq); }

.overlay h2 { font-size: 30px; margin: .2em 0; }

@media (min-width: 700px) {
  .app { padding-top: 32px; }
}
@media (max-height: 640px) {
  .j-alts { grid-auto-rows: minmax(60px, 1fr); min-height: 250px; }
  .j-enunciado { margin: 8px 0; }
}
.spin-g { width: 44px; height: 44px; border-width: 5px; }
.j-fb-icone.neutro { background: rgba(255,255,255,.08); color: var(--amarelo); }

/* Etapa 1 — identidade fixa por empresa */
.j-ident { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-2); padding: 2px 2px 6px; position: relative; z-index: 1; }
.j-ident-emp { font-weight: 800; color: var(--turq-claro); }
.j-ident-emp::after { content: "·"; margin-left: 8px; color: var(--texto-3); }
.j-sub-t { margin-top: 14px; align-self: flex-start; }
.j-resumo div { min-width: 0; }
.grande-48 { font-size: 48px; }
