:root {
  --tinta: #1d1b2f;
  --tinta2: #4a4760;
  --papel: #fffaf2;
  --vidro: rgba(255, 250, 242, 0.9);
  --laranja: #ff6a3d;
  --laranja2: #e04e22;
  --amarelo: #ffc233;
  --ceu1: #ffe6c2;
  --ceu2: #fff8ee;
  --sombra: 0 14px 40px rgba(29, 27, 47, 0.18), 0 2px 6px rgba(29, 27, 47, 0.08);
  --raio: 22px;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --texto: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--texto);
  font-weight: 700;
  color: var(--tinta);
  background: linear-gradient(180deg, var(--ceu1), var(--ceu2));
  transition: background 0.6s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

#cena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ─── Botões ─────────────────────────────────────────────────────────────────── */
.bt {
  --fundo: #fff;
  --borda: #e7dccb;
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--fundo);
  color: var(--tinta);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 4px 0 var(--borda), 0 8px 18px rgba(29, 27, 47, 0.1);
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.bt:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--borda), 0 12px 24px rgba(29, 27, 47, 0.14); }
.bt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--borda), 0 4px 10px rgba(29, 27, 47, 0.1); }
.bt:focus-visible, .foco-nav { outline: 4px solid var(--amarelo); outline-offset: 3px; }
.bt.primario { --fundo: var(--laranja); --borda: var(--laranja2); color: #fff; }
.bt.escuro { --fundo: var(--tinta); --borda: #000; color: #fff; }
.bt.fantasma { --fundo: rgba(255, 255, 255, 0.55); --borda: rgba(29, 27, 47, 0.12); box-shadow: 0 3px 0 var(--borda); backdrop-filter: blur(6px); }
.bt.grande { padding: 16px 30px; font-size: 20px; border-radius: 20px; }
.bt.pequeno { padding: 8px 14px; font-size: 14px; }
.bt:disabled { opacity: 0.45; pointer-events: none; }

.icone {
  width: 42px; height: 42px; border-radius: 14px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(8px);
  box-shadow: 0 3px 0 rgba(29, 27, 47, 0.12); display: grid; place-items: center;
}
.icone svg { width: 22px; height: 22px; }
.icone.desligado { opacity: 0.45; }
.icone:hover { background: #fff; }

/* ─── Topo ───────────────────────────────────────────────────────────────────── */
#topo {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 0; pointer-events: none;
}
#topo > * { pointer-events: auto; }
.marca-fliper {
  font-family: var(--display); font-size: 20px; text-decoration: none; color: var(--tinta);
  background: rgba(255, 255, 255, 0.72); padding: 7px 14px; border-radius: 14px; backdrop-filter: blur(8px);
  box-shadow: 0 3px 0 rgba(29, 27, 47, 0.12); letter-spacing: 0.01em;
}
.marca-fliper b { font-weight: 400; background: linear-gradient(90deg, #8b5cf6, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topo-acoes { display: flex; gap: 8px; margin-left: auto; }
body.jogando .marca-fliper, body.jogando #bt-musica, body.jogando #bt-som, body.jogando #bt-tela { display: none; }
.checks { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; }

/* ─── Telas ──────────────────────────────────────────────────────────────────── */
.tela { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.tela > * { pointer-events: auto; }
.tela.modal { z-index: 40; display: grid; place-items: center; background: rgba(29, 27, 47, 0.28); backdrop-filter: blur(3px); pointer-events: auto; }
.cartao {
  background: var(--vidro); backdrop-filter: blur(14px); border-radius: 28px; box-shadow: var(--sombra);
  border: 1px solid rgba(255, 255, 255, 0.8); padding: 28px;
}
.pequeno-cartao { display: grid; gap: 12px; min-width: min(360px, 90vw); text-align: center; }
.pequeno-cartao h2 { font-family: var(--display); font-weight: 400; font-size: 40px; margin: 0 0 6px; }
.check { display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 15px; color: var(--tinta2); padding: 4px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--laranja); }
.dica { text-align: center; color: var(--tinta2); font-size: 14px; margin: 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); }

/* ─── Início ─────────────────────────────────────────────────────────────────── */
#tela-inicio {
  display: flex; align-items: center;
  background: radial-gradient(ellipse 70% 90% at 12% 55%, rgba(255, 248, 238, 0.95) 0%, rgba(255, 248, 238, 0.7) 45%, rgba(255, 248, 238, 0) 75%);
}
.inicio-bloco { padding: 0 clamp(24px, 7vw, 110px); max-width: 640px; }
.logo { margin: 0 0 10px; font-family: var(--display); font-weight: 400; line-height: 0.82; letter-spacing: -0.01em; }
.logo span { display: block; }
.logo .l1 { font-size: clamp(64px, 11vw, 132px); color: var(--tinta); }
.logo .l2 { font-size: clamp(76px, 13vw, 158px); color: var(--laranja); position: relative; display: inline-block; text-shadow: 0 6px 0 rgba(224, 78, 34, 0.25); }
.logo .l1 { text-shadow: 0 6px 0 rgba(29, 27, 47, 0.12); }
.pavio {
  position: absolute; right: -0.34em; top: 0.05em; width: 0.42em; height: 0.36em;
  border: 0.06em solid #a0663d; border-color: #a0663d #a0663d transparent transparent;
  border-radius: 0 100% 0 0; transform: rotate(-8deg);
}
.faisca {
  position: absolute; right: -0.16em; top: -0.16em; width: 0.22em; height: 0.22em; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe066 35%, #ff9f1c 60%, rgba(255, 106, 61, 0) 72%);
  animation: faisca 0.18s infinite alternate;
}
@keyframes faisca { from { transform: scale(0.8) rotate(0deg); } to { transform: scale(1.25) rotate(40deg); } }
.chamada { font-size: clamp(16px, 1.6vw, 20px); line-height: 1.45; color: var(--tinta2); margin: 18px 0 26px; }
.menu-principal { display: grid; gap: 12px; justify-items: start; }
.menu-principal .bt.grande { flex-direction: column; align-items: flex-start; gap: 0; min-width: 300px; padding: 14px 26px; }
.menu-principal .bt.grande small { font-size: 13px; font-weight: 700; opacity: 0.8; }
.menu-principal .bt.grande span { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 0.01em; }
.rodape-inicio { margin-top: 22px; font-size: 13px; color: var(--tinta2); }

/* ─── Lobby ──────────────────────────────────────────────────────────────────── */
#tela-lobby, #tela-sala { display: flex; flex-direction: column; padding: 70px clamp(12px, 3vw, 40px) max(18px, env(safe-area-inset-bottom)); }
.lobby-topo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lobby-topo h2 { font-family: var(--display); font-weight: 400; font-size: 40px; margin: 0; }
.opcoes { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.opcao {
  display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(8px);
  border-radius: 16px; padding: 4px 4px 4px 12px; box-shadow: 0 3px 0 rgba(29, 27, 47, 0.1);
}
.opcao > span { font-size: 12px; color: var(--tinta2); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.ciclo { display: flex; align-items: center; gap: 2px; }
.ciclo b { min-width: 86px; text-align: center; font-weight: 900; font-size: 15px; }
.ciclo button {
  width: 30px; height: 30px; border: 0; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 900; font-size: 16px;
  box-shadow: 0 2px 0 #e7dccb;
}
.ciclo button:hover { background: var(--amarelo); }
#lobby-dica, #sala-dica { margin-top: auto; padding-bottom: 10px; }
#tela-sala .lobby-topo h2 { white-space: nowrap; }
.vagas { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.5vw, 18px); }
.vaga {
  --cor: #ccc; position: relative; background: var(--vidro); backdrop-filter: blur(12px); border-radius: var(--raio);
  box-shadow: var(--sombra); padding: 14px 14px 14px; display: grid; gap: 8px; border-top: 6px solid var(--cor);
  transition: opacity 0.2s, transform 0.2s;
}
.vaga.fechada { opacity: 0.7; }
.vaga-cab { display: flex; align-items: center; gap: 8px; }
.chip-vaga {
  font-family: var(--display); font-size: 16px; background: var(--cor, var(--tinta)); color: #fff; border-radius: 10px;
  padding: 3px 9px; letter-spacing: 0.02em;
}
.vaga-nome { font-weight: 900; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vaga .ciclo { justify-content: space-between; background: #fff; border-radius: 14px; padding: 4px; }
.vaga .ciclo b { font-size: 14px; flex: 1; min-width: 0; }
.vaga .linha { display: flex; gap: 6px; }
.vaga .linha .bt { flex: 1; }
.lobby-base { display: flex; justify-content: center; margin-top: 14px; }
.lobby-base .bt { min-width: 260px; }

/* ─── Online ───────────────────────────────────────────────────────────────── */
.menu-principal .bt.grande.online { --fundo: #2d2a4a; --borda: #15132a; color: #fff; }
.online-cartao { width: min(460px, 92vw); display: grid; gap: 14px; }
.online-cartao h2 { font-family: var(--display); font-weight: 400; font-size: 38px; margin: 0; }
.campo { display: grid; gap: 6px; }
.campo span { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinta2); }
.campo input, .entrar-codigo input {
  font: 900 20px var(--texto); color: var(--tinta); border: 0; background: #fff; border-radius: 14px; padding: 10px 14px;
  box-shadow: inset 0 0 0 2px #efe4d4; user-select: text; min-width: 0;
}
.campo input:focus, .entrar-codigo input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--amarelo); }
.ou { display: flex; align-items: center; gap: 10px; color: var(--tinta2); font-size: 13px; }
.ou::before, .ou::after { content: ''; flex: 1; height: 2px; background: #efe4d4; border-radius: 2px; }
.criar-sala { background: #fff; border-radius: 18px; padding: 12px 14px; display: grid; gap: 8px; }
.criar-sala h3 { margin: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinta2); }
.op-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.op-linha > span { font-size: 14px; color: var(--tinta2); }
.segmento { display: flex; background: var(--papel); border-radius: 12px; padding: 3px; gap: 2px; box-shadow: inset 0 0 0 2px #efe4d4; }
.segmento button { border: 0; background: none; cursor: pointer; font-weight: 900; font-size: 14px; padding: 6px 12px; border-radius: 9px; color: var(--tinta2); }
.segmento button.sel { background: var(--tinta); color: #fff; }
.criar-sala .bt { margin-top: 4px; }
.entrar-codigo { display: flex; gap: 6px; }
.entrar-codigo input { width: 100%; text-transform: uppercase; letter-spacing: 0.3em; text-align: center; font-family: var(--display); font-weight: 400; }
.entrar-codigo input::placeholder { letter-spacing: 0.12em; font-size: 16px; color: #b9ae9c; }
.codigo { font-family: var(--display); font-weight: 400; color: var(--laranja); letter-spacing: 0.08em; }
.vaga .tag { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; background: var(--tinta); color: #fff; border-radius: 8px; padding: 2px 6px; }
.vaga .tag.pronto { background: #2fcf85; }
.vaga .tag.fora { background: #b8b2a6; }
.vaga .estado { font-size: 14px; color: var(--tinta2); min-height: 20px; }
#rede {
  position: fixed; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 21; font-size: 12px; font-weight: 900;
  background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px); border-radius: 10px; padding: 3px 8px; color: var(--tinta2);
}
#rede.ruim { color: #e63946; }

/* ─── Editor ─────────────────────────────────────────────────────────────────── */
#tela-editor { display: flex; align-items: stretch; padding: 70px clamp(12px, 3vw, 40px) 20px; }
.editor-painel {
  width: min(460px, 100%); background: var(--vidro); backdrop-filter: blur(14px); border-radius: 28px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; overflow: hidden;
}
.editor-cab { display: flex; gap: 10px; align-items: center; padding: 18px 18px 12px; }
#editor-nome {
  flex: 1; min-width: 0; font: 900 22px var(--texto); color: var(--tinta); border: 0; background: #fff; border-radius: 14px;
  padding: 8px 12px; box-shadow: inset 0 0 0 2px #efe4d4; user-select: text;
}
#editor-nome:focus { outline: none; box-shadow: inset 0 0 0 3px var(--amarelo); }
.editor-opcoes { flex: 1; overflow-y: auto; padding: 4px 18px 12px; display: grid; gap: 14px; align-content: start; }
.editor-opcoes h3 { margin: 0 0 7px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinta2); }
.fichas { display: flex; flex-wrap: wrap; gap: 6px; }
.ficha {
  border: 0; cursor: pointer; background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 14px;
  box-shadow: 0 2px 0 #e7dccb; transition: transform 0.1s;
}
.ficha:hover { transform: translateY(-1px); }
.ficha.sel { background: var(--tinta); color: #fff; box-shadow: 0 2px 0 #000; }
.cores { display: flex; flex-wrap: wrap; gap: 7px; }
.cor {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(29, 27, 47, 0.2);
  transition: transform 0.1s;
}
.cor:hover { transform: scale(1.1); }
.cor.sel { outline: 3px solid var(--tinta); outline-offset: 2px; }
#editor-pronto { margin: 8px 18px 18px; }
.editor-dica { position: absolute; bottom: 22px; right: 0; left: 480px; }

/* ─── Ajuda ──────────────────────────────────────────────────────────────────── */
#tela-ajuda { display: grid; place-items: center; background: rgba(29, 27, 47, 0.25); backdrop-filter: blur(3px); z-index: 45; pointer-events: auto; }
.ajuda { width: min(1040px, 94vw); max-height: 88vh; overflow-y: auto; }
.ajuda-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ajuda-cab h2 { font-family: var(--display); font-weight: 400; font-size: 38px; margin: 0; }
.ajuda-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.ajuda-grade section { background: #fff; border-radius: 18px; padding: 16px; }
.ajuda-grade h3 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 22px; }
.ajuda-grade table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ajuda-grade td { padding: 5px 4px; border-top: 1px solid #f1e8da; vertical-align: top; }
.ajuda-grade td:first-child { color: var(--tinta2); width: 34%; }
.lista-icones { display: grid; gap: 8px; }
.lista-icones div { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; font-size: 14px; line-height: 1.3; }
.lista-icones img { width: 36px; height: 36px; }
.lista-icones b { display: block; }
.lista-icones small { color: var(--tinta2); font-weight: 700; }
kbd { font-family: var(--texto); font-weight: 900; font-size: 12px; background: var(--papel); border-radius: 6px; padding: 1px 6px; box-shadow: 0 2px 0 #e7dccb; }

/* ─── HUD ────────────────────────────────────────────────────────────────────── */
#hud { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 20; pointer-events: none; display: flex; justify-content: center; padding: 0 62px 0 10px; }
.hud-jogadores { display: flex; gap: 8px; align-items: flex-start; justify-content: center; flex-wrap: nowrap; width: 100%; max-width: 1080px; }
.hud-j { flex: 1 1 0; max-width: 220px; }
.hud-j {
  --cor: #ccc; display: flex; align-items: center; gap: 8px; background: var(--vidro); backdrop-filter: blur(10px);
  border-radius: 18px; padding: 6px 10px 6px 6px; box-shadow: 0 6px 18px rgba(29, 27, 47, 0.14); border-bottom: 4px solid var(--cor);
  min-width: 0; transition: opacity 0.3s, filter 0.3s;
}
.hud-j.fora { opacity: 0.45; filter: grayscale(0.9); }
.hud-j .av {
  width: 38px; height: 38px; border-radius: 12px; background: var(--cor); color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-size: 20px; flex: none; position: relative;
}
.hud-j .av i { position: absolute; bottom: -4px; right: -6px; width: 22px; height: 22px; }
.hud-j .av i img { width: 100%; height: 100%; }
.hud-j > div:nth-child(2) { min-width: 0; flex: 1; }
.hud-j .nome { font-weight: 900; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.1; }
.hud-j .stats { display: flex; gap: 5px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.hud-j .stats span { display: flex; align-items: center; gap: 1px; font-weight: 900; font-size: 13px; }
.hud-j .stats img { width: 17px; height: 17px; }
.hud-j .stats .esp { background: #fff; border-radius: 8px; padding: 1px 4px 1px 1px; }
.hud-j .stats .cav { animation: pulsa 0.6s infinite alternate; }
.hud-j .trofeus { display: flex; gap: 2px; margin-left: 2px; }
.hud-j .trofeus i { width: 10px; height: 10px; border-radius: 50%; background: rgba(29, 27, 47, 0.12); }
.hud-j .trofeus i.ok { background: var(--amarelo); box-shadow: 0 0 0 2px #fff, 0 0 8px var(--amarelo); }
.hud-j .vidas { font-size: 12px; font-weight: 900; color: #ef476f; white-space: nowrap; }
.hud-centro {
  background: var(--tinta); color: #fff; border-radius: 18px; padding: 6px 16px; text-align: center; box-shadow: 0 6px 18px rgba(29, 27, 47, 0.25);
  flex: none; min-width: 92px;
}
.hud-centro .rel { font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: 0.02em; }
.hud-centro small { display: block; font-size: 11px; opacity: 0.75; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }
.hud-centro.urgente { background: #e63946; animation: pulsa 0.5s infinite alternate; }
@keyframes pulsa { from { transform: scale(1); } to { transform: scale(1.06); } }

#aviso {
  position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; pointer-events: none;
  font-family: var(--display); color: #fff; text-align: center;
}
#aviso .msg {
  font-size: clamp(56px, 12vw, 150px); line-height: 0.9; -webkit-text-stroke: 0.035em var(--tinta); paint-order: stroke fill;
  text-shadow: 0 0.06em 0 var(--tinta), 0 0.1em 30px rgba(29, 27, 47, 0.3);
  animation: aviso 1.1s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
#aviso .msg small { display: block; font-size: 0.32em; -webkit-text-stroke: 0.06em var(--tinta); margin-top: 0.15em; }
#aviso .msg.laranja { color: var(--laranja); }
#aviso .msg.amarelo { color: var(--amarelo); }
#aviso .msg.azul { color: #72ddf7; }
@keyframes aviso {
  0% { transform: scale(0.3) rotate(-8deg); opacity: 0; }
  25% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  40% { transform: scale(1) rotate(0); }
  80% { opacity: 1; }
  100% { transform: scale(1.02); opacity: 0; }
}

#flutuantes { position: fixed; inset: 0; z-index: 22; pointer-events: none; overflow: hidden; }
.flut {
  position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: 15px; white-space: nowrap;
  background: #fff; color: var(--tinta); border-radius: 12px; padding: 3px 9px 3px 4px; display: flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 12px rgba(29, 27, 47, 0.2); animation: flut 1.2s ease-out forwards; border-bottom: 3px solid var(--cor, #fff);
}
.flut img { width: 22px; height: 22px; }
.flut.sem-icone { padding: 3px 9px; }
@keyframes flut { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.05); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }

/* ─── Resultado ──────────────────────────────────────────────────────────────── */
.resultado { text-align: center; min-width: min(460px, 92vw); display: grid; gap: 14px; }
.resultado .sobre { margin: 0; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta2); }
.resultado h2 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 50px); margin: 0; line-height: 1; }
.placar { display: grid; gap: 8px; }
.placar .lin {
  --cor: #ccc; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 14px;
  padding: 8px 12px; border-left: 6px solid var(--cor); text-align: left; font-weight: 900;
}
.placar .lin.venceu { background: #fff6d6; }
.placar .trofeus { display: flex; gap: 4px; }
.placar .trofeus i { width: 14px; height: 14px; border-radius: 50%; background: rgba(29, 27, 47, 0.12); }
.placar .trofeus i.ok { background: var(--amarelo); box-shadow: 0 0 0 2px #fff; }
.res-botoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#tela-resultado.podio { background: none; backdrop-filter: none; align-items: end; padding-bottom: 5vh; }

/* ─── Toque ──────────────────────────────────────────────────────────────────── */
#toque { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
#toque .zona-mover { position: absolute; left: 0; top: 70px; bottom: 0; width: 55%; pointer-events: auto; touch-action: none; }
#toque .alavanca {
  position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.28); border: 3px solid rgba(255, 255, 255, 0.7); display: none; place-items: center;
  left: 90px; top: calc(100% - 110px);
}
#toque .alavanca.ativa { display: grid; }
#toque .pino { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 12px rgba(29, 27, 47, 0.3); }
#toque .bt-bomba, #toque .bt-acao {
  position: absolute; pointer-events: auto; touch-action: none; border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 10px 20px rgba(29, 27, 47, 0.25);
}
#toque .bt-bomba {
  right: max(24px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom)); width: 96px; height: 96px;
  background: var(--laranja) center / 60% no-repeat;
}
#toque .bt-acao {
  right: calc(max(24px, env(safe-area-inset-right)) + 104px); bottom: max(40px, env(safe-area-inset-bottom)); width: 68px; height: 68px;
  background: #fff; font-weight: 900; font-size: 14px;
}
#toque .apertado { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }

/* ─── Carregando / erro ──────────────────────────────────────────────────────── */
#carregando { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; z-index: 50; font-size: 16px; color: var(--tinta2); background: linear-gradient(180deg, var(--ceu1), var(--ceu2)); transition: opacity 0.4s; }
#carregando .spark { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #ffe066 35%, #ff9f1c 60%, rgba(255, 106, 61, 0) 72%); animation: faisca 0.18s infinite alternate; }
#carregando.some { opacity: 0; pointer-events: none; }
#erro { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; text-align: center; background: var(--papel); padding: 24px; }

/* ─── Telas estreitas ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .vagas { grid-template-columns: repeat(2, 1fr); }
  .vaga { padding: 10px; gap: 6px; }
  .vaga-nome { font-size: 15px; }
  .lobby-topo h2 { font-size: 30px; }
  .opcoes { margin-left: 0; }
  .hud-j .nome { display: none; }
  .hud-j { padding: 4px 8px 4px 4px; gap: 6px; }
  .hud-j .av { width: 30px; height: 30px; font-size: 16px; }
  #hud { padding: 0 8px; top: 58px; }
  .hud-jogadores { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  #tela-inicio { align-items: flex-end; background: linear-gradient(0deg, rgba(255, 248, 238, 0.97) 0%, rgba(255, 248, 238, 0.85) 55%, rgba(255, 248, 238, 0) 85%); }
  .inicio-bloco { padding: 0 20px max(28px, env(safe-area-inset-bottom)); }
  .menu-principal { justify-items: stretch; }
  .menu-principal .bt.grande { min-width: 0; }
  .chamada { margin: 10px 0 16px; }
  #tela-editor { padding: 60px 10px 10px; align-items: flex-end; }
  .editor-painel { max-height: 58vh; }
  .editor-dica { display: none; }
  .hud-j .stats img { width: 15px; height: 15px; }
  .hud-j .trofeus { display: none; }
  .hud-j.eu { box-shadow: 0 0 0 3px var(--cor), 0 6px 18px rgba(29, 27, 47, 0.14); }
  .hud-j .stats span { font-size: 11px; }
}
@media (max-height: 560px) {
  .logo .l1 { font-size: 56px; } .logo .l2 { font-size: 66px; }
  .chamada { display: none; }
  #tela-lobby { padding-top: 60px; }
}

/* modo capa: só a cena */
body.capa #topo, body.capa #carregando, body.capa .tela, body.capa #hud { display: none !important; }
