/* HUD no layout do Capítulo 1 */
#ui { position: fixed; inset: 0; pointer-events: none; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px rgba(0,0,0,.7); font-family: "Segoe UI", Arial, sans-serif; }
#ui > * { position: absolute; }
#ui svg { display: block; }
.fps { top: 3px; left: 50%; transform: translateX(-50%); font-size: 11px; color: #4cff5a; white-space: nowrap; text-align: center; }
.fps b { font-size: 14px; font-weight: 900; letter-spacing: 1px; } .fps small { font-size: 10px; opacity: .7; }
.fps .png { font-size: 12px; font-weight: 800; margin-left: 4px; } .fps .png.ok { color: #4cff5a; } .fps .png.med { color: #ffd94a; } .fps .png.ruim { color: #ff5a5a; }
/* cartão do time (canto superior esquerdo) */
.timecard { top: 22px; left: 14px; width: 190px; }
.tc { margin-bottom: 5px; opacity: .95; } .tc.morto { opacity: .4; }
.tc .tn { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; } .tc .ts { font-size: 10px; font-weight: 600; opacity: .75; letter-spacing: .3px; text-transform: uppercase; } .tc.morto .ts { color: #ff7a7a; opacity: 1; } .tc.morto { opacity: .55; } .tc.eu .tn::before { content: "◆ "; color: #5ad0ff; }
.tc .tb { position: relative; height: 7px; background: rgba(0,0,0,.55); border-radius: 2px; overflow: hidden; margin-top: 2px; }
.tc .tb div { position: absolute; left: 0; top: 0; height: 100%; } .tc .tvida { background: #5fd657; } .tc .tesc { background: #3fa7ff; top: 0; height: 40%; z-index: 1; }
/* minimapa + contadores */
.topo { top: 12px; right: 12px; width: 190px; }
.topo .mini { display: block; width: 190px; height: 190px; border: 3px solid rgba(255,255,255,.9); border-radius: 6px; background: #2a5b8f; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.contadores { margin-top: 6px; display: flex; justify-content: flex-end; gap: 12px; font-size: 15px; font-weight: 700; }
.cnt { display: flex; align-items: center; gap: 4px; } .cnt .ci { width: 18px; height: 18px; display: inline-block; } .cnt.enc { color: #e35bff; }
/* feed e mensagens */
.feed { top: 130px; left: 14px; font-size: 13px; }
.feed div { background: rgba(0,0,0,.4); padding: 3px 8px; margin-bottom: 3px; border-radius: 3px; }
.feed .eu { color: #ffd94a; font-weight: bold; } .feed .fi { display: inline-block; width: 22px; height: 14px; vertical-align: middle; margin: 0 3px; } .feed .fi svg { width: 22px; height: 14px; } .feed .amigo { color: #5ae66e; font-weight: bold; }
.poi { top: 70px; left: 0; right: 0; text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; opacity: 0; transition: opacity .6s; }
.msg { top: 22%; left: 0; right: 0; text-align: center; font-size: 46px; font-weight: 900; letter-spacing: 3px; color: #ffd94a; display: none; justify-content: center; align-items: center; }
.msg.vitoria { color: #fff; }
.msg.vitoria .n1 { font-size: 78px; color: #ffe93a; font-style: italic; font-weight: 900; margin-right: 14px; transform: rotate(-8deg); display: inline-block; text-shadow: 3px 3px 0 #1a5ba8, -2px -2px 0 #1a5ba8, 0 0 12px rgba(0,0,0,.6); }
.msg.vitoria .vr { background: #2f8de8; padding: 8px 60px; font-size: 44px; font-style: italic; clip-path: polygon(2% 0, 100% 4%, 98% 100%, 0 96%); box-shadow: 0 6px 0 #1a5ba8; letter-spacing: 1px; }
.msg.morte { color: #ff5a5a; }
.submsg { top: calc(22% + 90px); left: 0; right: 0; text-align: center; font-size: 18px; display: none; background: rgba(0,0,0,.45); margin: 0 auto; width: fit-content; padding: 8px 16px; border-radius: 6px; }
.banner { top: 34%; left: 0; right: 0; text-align: center; font-size: 42px; font-weight: 900; font-style: italic; letter-spacing: 4px; color: #fff; background: linear-gradient(90deg, rgba(47,141,232,0), rgba(47,141,232,.9) 30%, rgba(47,141,232,.9) 70%, rgba(47,141,232,0)); padding: 6px 0; }
@keyframes bannerAnim { 0% { opacity: 0; transform: scale(1.4); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; display: none; } }
.fimbotoes { top: 62%; left: 0; right: 0; display: none; justify-content: center; gap: 14px; pointer-events: auto; }
.fimbtn { font-size: 18px; font-weight: 900; letter-spacing: 2px; padding: 12px 28px; border: 0; border-radius: 6px; background: #ffd94a; color: #1b2a4b; cursor: pointer; box-shadow: 0 5px 0 #a88a1a; text-shadow: none; font-family: inherit; }
.fimbtn:hover { background: #ffe680; } .fimbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a88a1a; }
.espec { bottom: 120px; left: 50%; transform: translateX(-50%); width: 320px; text-align: center; background: rgba(0,0,0,.5); border-radius: 8px; padding: 8px 12px; }
.esp-t { font-size: 11px; letter-spacing: 3px; opacity: .8; } .esp-n { font-size: 20px; font-weight: 800; } .esp-b { position: relative; height: 8px; background: rgba(0,0,0,.6); border-radius: 3px; margin: 4px 0; overflow: hidden; }
.esp-b div { position: absolute; left: 0; top: 0; height: 100%; } .esp-vida { background: #5fd657; } .esp-esc { background: #3fa7ff; height: 40% !important; z-index: 1; } .esp-i { font-size: 13px; } .esp-d { font-size: 11px; opacity: .75; margin-top: 2px; }
.fimtab { margin: 6px auto; border-collapse: collapse; font-size: 15px; } .fimtab td { padding: 2px 14px; text-align: left; } .fimtab td:last-child { text-align: right; }
.aviso { top: 62%; left: 0; right: 0; text-align: center; font-size: 17px; color: #ffe27a; }
.tempalerta { top: 18%; left: 0; right: 0; text-align: center; font-size: 22px; font-weight: bold; color: #e29bff; display: none; animation: pisca 1s infinite; }
@keyframes pisca { 50% { opacity: .35; } }
/* seta da zona segura fica no alto, um pouco à direita do centro (fora da mira e longe do minimapa), pra não atrapalhar a visão na tempestade */
.setazona { top: 15%; left: calc(70% - 95px); width: 190px; text-align: center; display: none; }
.setazona svg { width: 56px; height: 56px; margin: 0 auto; filter: drop-shadow(0 0 8px rgba(255,40,40,.85)); transition: transform .08s linear; }
.setazona .sz-d { font-size: 15px; font-weight: bold; color: #ff7a7a; margin-top: 2px; }
.interagir { top: 56%; left: 0; right: 0; text-align: center; font-size: 18px; display: none; }
.interagir b { background: #fff; color: #000; border-radius: 4px; padding: 0 7px; margin-right: 6px; text-shadow: none; }
.canal { top: 66%; left: 50%; transform: translateX(-50%); width: 260px; display: none; text-align: center; }
.canalbar { height: 10px; background: rgba(0,0,0,.5); border-radius: 5px; overflow: hidden; } .canalfill { height: 100%; background: #4fd648; width: 0; }
.canaltxt { font-size: 14px; margin-top: 4px; }
.build { bottom: 140px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.5); padding: 6px 14px; border-radius: 6px; font-size: 14px; display: none; }
/* centro inferior: munição e barras */
.centro { bottom: 26px; left: 50%; transform: translateX(-40%); width: 420px; }
.mun { font-size: 20px; margin-bottom: 4px; padding-left: 40px; display: flex; align-items: center; gap: 6px; height: 34px; }
.mun b { font-size: 30px; } .mun .mi { width: 18px; height: 18px; display: inline-block; } .mun i { font-size: 13px; color: #ffe27a; }
.bar { position: relative; height: 22px; margin-top: 4px; margin-left: 30px; background: rgba(0,0,0,.6); border: 2px solid rgba(0,0,0,.6); border-radius: 3px; }
.bar.esc { height: 14px; width: 300px; } .bar.vida { width: 380px; }
.bar .fill { position: absolute; left: 0; top: 0; height: 100%; transition: width .15s; } .esc .fill { background: #3fa7ff; } .vida .fill { background: #5fd657; }
.bar .bico { position: absolute; left: -28px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; }
.bar.esc .bico { width: 16px; height: 16px; }
.bar .num { position: absolute; left: 10px; top: 0; height: 100%; display: flex; align-items: center; font-size: 13px; opacity: .95; } .bar.vida .num { font-size: 15px; } .bar .num b { font-size: 1.15em; margin-right: 4px; }
/* materiais (direita, meio) */
.mats { right: 20px; bottom: 210px; background: rgba(0,0,0,.45); border-radius: 6px; padding: 6px 8px; display: flex; gap: 10px; }
.mat { display: flex; flex-direction: column; align-items: center; width: 52px; padding: 3px; border-radius: 4px; border: 2px solid transparent; }
.mat.sel { border-color: #fff; background: rgba(60,120,255,.5); }
.mat .mi { width: 30px; height: 30px; } .mat .mq { font-size: 15px; font-weight: 800; }
/* barra de construção */
.direita { right: 20px; bottom: 20px; }
.buildbar { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 8px; opacity: .85; }
.buildbar.ativo { opacity: 1; }
.bslot { width: 56px; text-align: center; position: relative; }
.bslot .bk { font-size: 11px; font-weight: 800; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.5); border-radius: 3px; display: inline-block; padding: 0 5px; margin-bottom: 3px; }
.bslot .bi { width: 46px; height: 46px; margin: 0 auto; background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.35); border-radius: 5px; padding: 5px; box-sizing: border-box; transform: skewX(-6deg); }
.bslot .bn { font-size: 10px; margin-top: 2px; opacity: .85; }
.bslot.sel .bi { background: rgba(60,140,255,.85); border-color: #fff; box-shadow: 0 0 10px rgba(80,160,255,.8); }
.bslot.off { opacity: .4; }
.bslot:first-child .bi { background: rgba(255,255,255,.15); }
/* slots de itens */
.slots { display: flex; gap: 6px; justify-content: flex-end; align-items: flex-end; }
.slot { width: 62px; height: 62px; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.35); border-radius: 5px; position: relative; overflow: hidden; box-sizing: border-box; }
.slot.pic { width: 54px; height: 54px; }
.slot.sel { border-color: #fff; transform: translateY(-8px) scale(1.06); box-shadow: 0 0 10px rgba(255,255,255,.5); }
.slot .k { position: absolute; top: 1px; left: 4px; font-size: 10px; opacity: .8; z-index: 2; }
.slot .si { position: absolute; inset: 6px 6px 14px 6px; }
.slot .n { position: absolute; bottom: 1px; left: 2px; right: 2px; font-size: 8px; line-height: 1; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .m { position: absolute; top: 1px; right: 4px; font-size: 12px; font-weight: 800; z-index: 2; }
.slot.r0 { background: linear-gradient(rgba(150,150,150,.75), rgba(90,90,90,.85)); } .slot.r1 { background: linear-gradient(rgba(80,200,60,.8), rgba(30,120,25,.9)); }
.slot.r2 { background: linear-gradient(rgba(60,140,255,.8), rgba(25,70,180,.9)); } .slot.r3 { background: linear-gradient(rgba(190,80,255,.8), rgba(110,30,170,.9)); } .slot.r4 { background: linear-gradient(rgba(255,190,40,.85), rgba(200,120,10,.95)); }
.flash { inset: 0; background: radial-gradient(ellipse at center, rgba(255,0,0,0) 40%, rgba(255,0,0,.7) 100%); opacity: 0; }
.scope { inset: 0; display: none; background: radial-gradient(circle at center, rgba(0,0,0,0) 34%, rgba(0,0,0,.97) 36%); }
.mapa { inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.6); flex-direction: column; }
.mapa canvas { width: min(85vh, 85vw); height: min(85vh, 85vw); border: 3px solid #fff; border-radius: 6px; }
.mapatxt { margin-top: 8px; font-size: 14px; }
.ajuda { bottom: 2px; left: 0; right: 0; text-align: center; font-size: 11px; opacity: .7; }
/* ---- acabamento profissional: fonte própria (Luckiest Guy p/ títulos, Nunito p/ texto), brilhos e animações ---- */
#ui { font-family: 'Nunito', "Segoe UI", Arial, sans-serif; }
.poi, .msg, .banner, .fimbtn, .contadores, .mun b, .tempalerta, .esp-n { font-family: 'Luckiest Guy', 'Nunito', "Segoe UI", Arial, sans-serif; font-weight: 400; }
.poi { font-size: 40px; letter-spacing: 3px; text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 18px rgba(0,0,0,.6); }
.msg { font-size: 52px; letter-spacing: 3px; text-shadow: 0 4px 0 rgba(0,0,0,.5), 0 0 24px rgba(0,0,0,.55); }
.banner { font-size: 48px; letter-spacing: 5px; }
.contadores { font-size: 18px; letter-spacing: 1px; }
.mun b { font-size: 34px; }
.topo .mini { border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.25); }
.slot, .bslot .bi, .mats, .timecard .tc .tb { box-shadow: 0 3px 8px rgba(0,0,0,.45); }
.slot.sel { box-shadow: 0 0 14px rgba(255,255,255,.55), 0 4px 10px rgba(0,0,0,.5); }
.bar { box-shadow: 0 3px 8px rgba(0,0,0,.45); border-radius: 4px; }
.bar .fill { transition: width .18s ease-out; }
.vida .fill { background: linear-gradient(180deg, #7ff07a, #4cc244); } .esc .fill { background: linear-gradient(180deg, #6ec0ff, #2f8ff0); }
.vidas.hit .bar.vida { animation: barHit .4s ease-out; } @keyframes barHit { 25% { box-shadow: 0 0 0 3px rgba(255,70,70,.95), 0 0 18px rgba(255,60,60,.8); } }
.feed div { background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.25)); border-left: 3px solid rgba(255,255,255,.35); }
.interagir b { border-radius: 5px; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.fimbtn { font-size: 20px; letter-spacing: 2px; background: linear-gradient(180deg, #ffe36b, #ffc93a); }
/* chat da partida */
.chatbox { left: 14px; bottom: 150px; width: 340px; pointer-events: none; }
.chatmsgs { background: rgba(0,0,0,.45); border-radius: 6px; padding: 6px 10px; font-size: 13px; margin-bottom: 6px; display: none; } .chatmsgs b { color: #ffd94a; }
.chatin { width: 100%; box-sizing: border-box; pointer-events: auto; padding: 7px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.6); color: #fff; font-family: inherit; font-size: 14px; }
.chatbox:has(.chatin:focus) .chatin { border-color: #ffd94a; }
/* ---- controles de toque (celular/tablet) ---- */
#toque { position: fixed; inset: 0; z-index: 8; display: none; touch-action: none; user-select: none; -webkit-user-select: none; font-family: 'Nunito', "Segoe UI", Arial, sans-serif; }
.tq-joy { position: absolute; left: 0; bottom: 0; width: 44vw; height: 62vh; touch-action: none; }
.tq-joybase { display: none; position: absolute; width: 104px; height: 104px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.45); }
.tq-joyknob { position: absolute; left: 30px; top: 30px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.tq-olhar { position: absolute; right: 0; top: 0; width: 56vw; height: 100vh; touch-action: none; }
.tq-bt { position: absolute; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; text-shadow: 0 1px 2px #000; touch-action: none; z-index: 2; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.tq-bt.on { background: rgba(255,217,74,.85); color: #1b2a4b; text-shadow: none; }
.tq-fogo { right: 2.5vw; bottom: 36vh; width: 78px; height: 78px; font-size: 34px; background: rgba(230,60,60,.55); border-color: rgba(255,255,255,.8); }
.tq-mira { right: 15vw; bottom: 42vh; width: 58px; height: 58px; }
.tq-pular { right: 26vw; bottom: 34vh; width: 60px; height: 60px; }
.tq-agachar { right: 37vw; bottom: 34vh; width: 50px; height: 50px; }
.tq-rec { right: 26vw; bottom: 50vh; width: 46px; height: 46px; font-size: 22px; }
.tq-build { right: 37vw; bottom: 48vh; width: 52px; height: 52px; }
.tq-editar { right: 48vw; bottom: 34vh; width: 46px; height: 46px; display: none; }
#toque.build .tq-editar { display: flex; }
.tq-pegar, .tq-sair { left: 50%; bottom: 56vh; transform: translateX(-50%); width: auto; height: 46px; border-radius: 10px; padding: 0 22px; font-size: 16px; display: none; background: rgba(255,217,74,.9); color: #1b2a4b; text-shadow: none; }
#toque.pegar .tq-pegar { display: flex; } #toque.veiculo .tq-sair { display: flex; }
.tq-mapa { left: 2vw; top: 42vh; width: auto; height: 38px; border-radius: 8px; padding: 0 12px; font-size: 13px; }
.tq-emote { left: 2vw; top: 54vh; width: 40px; height: 40px; font-size: 20px; }
.tq-menu { left: 50%; top: 6px; transform: translateX(-50%); width: 44px; height: 40px; border-radius: 8px; font-size: 22px; }
.tq-peca { display: none; bottom: 62vh; width: auto; height: 36px; border-radius: 8px; padding: 0 10px; font-size: 12px; }
#toque.build .tq-peca { display: flex; }
.tq-p1 { right: 2vw; } .tq-p2 { right: 13vw; } .tq-p3 { right: 23vw; } .tq-p4 { right: 34vw; } .tq-p5 { right: 44vw; } .tq-p6 { right: 53vw; }
/* HUD mais compacta no toque; slots e peças clicáveis */
body.toque .ajuda { display: none !important; } body.toque .fps small { display: none; } body.toque .fps { top: 2px; }
body.toque .direita { transform: scale(.78); transform-origin: bottom right; pointer-events: auto; }
body.toque .slot, body.toque .bslot { pointer-events: auto; }
body.toque .centro { transform: scale(.8) translateX(-40%); }
body.toque .topo { transform: scale(.62); transform-origin: top right; }
body.toque .timecard { transform: scale(.8); transform-origin: top left; }
body.toque .mats { transform: scale(.8); transform-origin: bottom right; bottom: 190px; }
body.toque .feed { top: 100px; font-size: 11px; }
body.toque .fimbotoes { pointer-events: auto; }
body.toque .chatbox { display: none !important; }
/* toque: sem nomes de tecla; o aviso de interação vira botão */
body.toque .interagir b:empty, body.toque .slot .k, body.toque .bslot .bk { display: none; }
body.toque .interagir { pointer-events: auto; background: rgba(255,217,74,.92); color: #1b2a4b; text-shadow: none; border-radius: 10px; padding: 8px 18px; width: fit-content; margin: 0 auto; font-weight: 800; }
body.toque .interagir span { color: #1b2a4b !important; }
.tq-pegar { font-size: 15px; }
/* inventário (tecla I) */
.inv { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 600px; max-width: 94vw; background: linear-gradient(160deg, rgba(14,28,64,.96), rgba(8,16,40,.94)); border-radius: 12px; padding: 16px 18px 18px; pointer-events: auto; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.6); z-index: 5; }
.inv-t { font-family: 'Luckiest Guy', 'Nunito', Arial, sans-serif; font-size: 26px; letter-spacing: 4px; margin-bottom: 10px; }
.inv-grid { display: flex; gap: 10px; justify-content: center; margin-bottom: 26px; }
.inv-slot { width: 86px; height: 100px; border-radius: 8px; cursor: pointer; position: relative; border: 2px solid rgba(255,255,255,.3); background: rgba(0,0,0,.5); box-sizing: border-box; overflow: visible; transition: transform .1s; }
.inv-slot:hover { transform: translateY(-3px); border-color: #fff; } .inv-slot.sel { border-color: #ffd94a; box-shadow: 0 0 14px rgba(255,217,74,.8); } .inv-slot.atual { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }
.inv-slot .k { position: absolute; top: 2px; left: 5px; font-size: 10px; opacity: .8; } .inv-slot .si { position: absolute; inset: 14px 10px 30px 10px; } .inv-slot .n { position: absolute; bottom: 14px; left: 3px; right: 3px; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-slot .m { position: absolute; bottom: 2px; left: 0; right: 0; font-size: 10px; opacity: .9; }
.inv-slot.r0 { background: linear-gradient(rgba(150,150,150,.75), rgba(90,90,90,.85)); } .inv-slot.r1 { background: linear-gradient(rgba(80,200,60,.8), rgba(30,120,25,.9)); } .inv-slot.r2 { background: linear-gradient(rgba(60,140,255,.8), rgba(25,70,180,.9)); } .inv-slot.r3 { background: linear-gradient(rgba(190,80,255,.8), rgba(110,30,170,.9)); } .inv-slot.r4 { background: linear-gradient(rgba(255,190,40,.85), rgba(200,120,10,.95)); }
.inv-slot.vazio { opacity: .55; } .inv-slot.pic { background: rgba(255,255,255,.12); }
.inv-sol { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 800; background: #d33; color: #fff; padding: 2px 8px; border-radius: 4px; cursor: pointer; } .inv-sol:hover { background: #f55; }
.inv-mun { font-size: 13px; opacity: .9; margin: 4px 0; } .inv-dica { font-size: 12px; opacity: .75; margin: 8px 0 10px; }
.inv .fimbtn { font-size: 15px; padding: 8px 20px; }
body.toque .inv { width: 92vw; padding: 8px; transform: translate(-50%, -50%) scale(.85); } body.toque .inv-slot { width: 70px; height: 88px; }
.tq-inv { left: 8px; top: 242px; width: 40px; height: 40px; font-size: 20px; }
/* cartões de reboot e voz */
.cartoes { top: 250px; left: 14px; font-size: 13px; color: #5ae66e; font-weight: 700; } .cartoes div { background: rgba(0,0,0,.4); padding: 2px 8px; border-radius: 4px; margin-bottom: 3px; }
.voz { top: 4px; left: 230px; font-size: 13px; font-weight: 700; } .voz .fala { color: #5ae66e; }
/* ---- layout dos controles de toque ----
   Olhar = a tela inteira: qualquer dedo que não esteja no joystick (canto inferior esquerdo) nem num botão gira a câmera,
   então andar e mirar ao mesmo tempo funciona com dois dedos. touch-action: none em tudo evita que o navegador cancele o
   gesto (zoom/rolagem) quando o segundo dedo encosta. A HUD fica acima dos controles pra slots/pegar/inventário continuarem tocáveis.
   Arrumação (sem nada em cima de nada): topo esquerdo = fila de botões (⚙, mochila, emote, marcar), depois MAPA, o time,
   materiais e o feed; topo centro = FPS/ping; topo direito = minimapa; embaixo à direita = slots com o arco de ações em cima;
   segundo tiro à esquerda acima do joystick; vida embaixo ao centro; peças de construção acima da vida. Tudo dentro da área segura. */
body.toque, body.toque #ui, body.toque #toque, body.toque #gl { touch-action: none; }
body.toque #ui { z-index: 9; } #toque { z-index: 8; }
body.toque #ui, body.toque #toque, body.toque #lobby { top: max(6px, env(safe-area-inset-top)); bottom: max(6px, env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); }
#toque { pointer-events: none; }
#toque .tq-joy, #toque .tq-olhar, #toque .tq-bt { pointer-events: auto; }
.tq-olhar { left: 0; top: 0; right: 0; bottom: 0; width: auto; height: auto; z-index: 0; }
.tq-joy { left: 0; bottom: 0; width: 44%; height: 58%; z-index: 1; }
.tq-bt { border-width: 2px; background: rgba(10,18,40,.5); z-index: 2; }
/* topo esquerdo: minimapa pequeno e, à direita dele, a fila de botões (⚙, mochila, emote, marcar), MAPA e o time; materiais e feed abaixo do minimapa */
body.toque .topo { transform: scale(.5); transform-origin: top left; top: 0; left: 0; right: auto; }
body.toque .topo .contadores { justify-content: flex-start; }
.tq-menu { left: 104px; top: 0; transform: none; width: 42px; height: 36px; border-radius: 8px; font-size: 18px; }
.tq-inv { left: 150px; top: 0; width: 40px; height: 36px; font-size: 17px; border-radius: 8px; }
.tq-emote { left: 194px; top: 0; width: 40px; height: 36px; font-size: 17px; border-radius: 8px; }
.tq-ping { left: 238px; top: 0; width: 40px; height: 36px; font-size: 16px; border-radius: 8px; }
.tq-mapa { left: 104px; top: 42px; height: 26px; padding: 0 10px; font-size: 11px; border-radius: 8px; }
body.toque .timecard { transform: scale(.6); transform-origin: top left; top: 74px; left: 104px; }
body.toque .mats { right: auto; left: 0; top: 122px; bottom: auto; transform: scale(.5); transform-origin: top left; }
body.toque .feed { top: 170px; left: 0; font-size: 10px; max-width: 40%; }
/* topo centro: FPS/ping */
body.toque .fps { top: 2px; }
/* embaixo à direita: slots pequenos e, acima deles, o arco de ações (cabe em telas baixas como o iPhone com a barra do Safari) */
body.toque .direita { right: 0; bottom: 0; top: auto; transform: scale(.55); transform-origin: bottom right; }
.tq-fogo { right: 6px; bottom: 96px; width: 74px; height: 74px; font-size: 32px; }
.tq-pular { right: 88px; bottom: 90px; width: 54px; height: 54px; }
.tq-agachar { right: 150px; bottom: 94px; width: 46px; height: 46px; }
.tq-mira { right: 18px; bottom: 178px; width: 48px; height: 48px; }
.tq-rec { right: 92px; bottom: 154px; width: 42px; height: 42px; }
.tq-build { right: 86px; bottom: 206px; width: 48px; height: 48px; }
.tq-editar { right: 146px; bottom: 156px; width: 42px; height: 42px; }
/* segundo tiro: em cima do joystick, à esquerda (longe do centro pra não parecer mira) */
.tq-fogo2 { left: 22%; bottom: 160px; width: 56px; height: 56px; font-size: 24px; background: rgba(230,60,60,.4); border-color: rgba(255,255,255,.7); }
/* vida ao centro; peças de construção logo acima dela */
body.toque .centro { bottom: 4px; transform: scale(.7) translateX(-40%); }

/* peças da construção: fileira no canto superior direito (o minimapa fica à esquerda no toque), sempre dentro da tela */
/* fileira abaixo da linha do FPS (que fica no meio em cima) */
.tq-peca { top: 30px; bottom: auto; left: auto; height: 34px; width: 50px; padding: 0; font-size: 10.5px; border-radius: 8px; letter-spacing: .2px; }
.tq-p1 { right: 276px; } .tq-p2 { right: 222px; } .tq-p3 { right: 168px; } .tq-p4 { right: 114px; } .tq-p5 { right: 60px; } .tq-p6 { right: 6px; }
#toque { transform: none; translate: none; }
.tq-peca.sel { background: rgba(60,140,255,.85); border-color: #fff; box-shadow: 0 0 10px rgba(80,160,255,.8); }
body.toque .buildbar { display: none; }
.tq-pegar, .tq-sair { bottom: 54%; }
/* em pé: tela estreita */
@media (orientation: portrait) {
  body.toque .direita { transform: scale(.5); }
  body.toque .fps { top: 40px; }
  .tq-menu, .tq-inv, .tq-emote, .tq-ping { top: 0; } .tq-menu { left: 104px; } .tq-inv { left: 150px; } .tq-emote { left: 194px; } .tq-ping { left: 238px; }
  .tq-joy { width: 50%; height: 42%; }
  .tq-fogo2 { left: 30%; bottom: 240px; }
  .tq-peca { top: 30px; } .tq-p1 { right: 114px; } .tq-p2 { right: 60px; } .tq-p3 { right: 6px; } .tq-p4 { right: 114px; top: 70px; } .tq-p5 { right: 60px; top: 70px; } .tq-p6 { right: 6px; top: 70px; }
}
/* contagem regressiva do meteoro, embaixo do minimapa */
.meteoro { display: none; margin-top: 6px; text-align: right; font-size: 15px; font-weight: 800; color: #ffb347; background: rgba(0,0,0,.45); border-radius: 6px; padding: 4px 8px; border-left: 3px solid #ff7a1a; }
.meteoro b { font-size: 18px; color: #fff; margin: 0 4px; } .meteoro span { font-size: 12px; opacity: .85; font-weight: 600; }
.meteoro.urgente { color: #ff5a5a; border-left-color: #ff3030; animation: pisca .5s infinite; }
body.toque .meteoro { text-align: left; font-size: 13px; padding: 3px 6px; } body.toque .meteoro b { font-size: 15px; }
/* modo de edição do layout de toque: todos os botões aparecem, arrastáveis; barra com PRONTO/RESETAR */
#toque.editando .tq-bt { display: flex !important; outline: 2px dashed #ffd94a; outline-offset: 2px; }
#toque.editando .tq-joy, #toque.editando .tq-olhar { pointer-events: none; }
.tq-editbar { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); display: none; gap: 8px; align-items: center; background: rgba(10,18,40,.85); border-radius: 10px; padding: 8px 12px; color: #fff; font-weight: 800; pointer-events: auto; z-index: 5; }
.tq-editbar button { font: inherit; font-weight: 800; border: 0; border-radius: 8px; padding: 6px 12px; background: #ffd94a; color: #1b2a4b; } .tq-editbar .reset { background: #eee; }
/* roda de emotes (B) */
.emotes { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); background: rgba(10,20,45,.92); border-radius: 12px; padding: 12px 14px; pointer-events: auto; box-shadow: 0 10px 40px rgba(0,0,0,.6); z-index: 6; }
.em-t { font-family: 'Luckiest Guy', 'Nunito', "Segoe UI", Arial, sans-serif; font-size: 22px; letter-spacing: 2px; margin-bottom: 8px; } .em-t small { font-family: 'Nunito', "Segoe UI", Arial, sans-serif; font-size: 12px; letter-spacing: 0; opacity: .8; }
.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.em-it { background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.25); border-radius: 8px; padding: 12px 8px; text-align: center; font-weight: 800; cursor: pointer; font-size: 14px; }
.em-it:hover { background: rgba(255,217,74,.25); border-color: #ffd94a; }
.em-it.r1 { border-color: #4fd648; } .em-it.r2 { border-color: #3d8cff; } .em-it.r3 { border-color: #b34ff0; } .em-it.r4 { border-color: #ffbf2e; }
body.toque .emotes { transform: translate(-50%, -50%) scale(.85); }
/* derrubado: barra de vida amarela (cartão do time, sua barra e a barra sobre a cabeça) */
.tc.caido .tvida { background: #ffd23a; } .tc.caido .tn { color: #ffd23a; }
.vida .fill.caido { background: #ffd23a; }

/* controle (gamepad): foco nos menus e aviso de controle detectado */
.padFoco { outline: 3px solid #ffd94a !important; outline-offset: 2px; box-shadow: 0 0 14px rgba(255,217,74,.9) !important; }
#padToast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; z-index: 9999; display: none; border: 2px solid #ffd94a; pointer-events: none; max-width: 90vw; text-align: center; }

/* diagnóstico gráfico */
#diag { position: fixed; inset: 20px; z-index: 10000; background: rgba(0,0,0,.92); color: #fff; padding: 14px; border: 2px solid #ffd94a; border-radius: 8px; overflow: auto; font-size: 13px; }
#diag pre { white-space: pre-wrap; word-break: break-all; margin: 0 0 10px; font-family: Consolas, monospace; line-height: 1.4; }

/* tutorial da primeira partida */
#tutorial { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); width: min(560px, 92vw); background: rgba(8,16,30,.88); border: 2px solid #ffd94a; border-radius: 10px; color: #fff; z-index: 60; display: none; box-shadow: 0 6px 24px rgba(0,0,0,.5); font-size: 15px; line-height: 1.4; pointer-events: none; }
#tutorial .tt-cab { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 0; font-size: 11px; letter-spacing: 2px; font-weight: 800; color: #ffd94a; }
#tutorial .tt-x { pointer-events: auto; background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; font-size: 14px; }
#tutorial .tt-x:hover { opacity: 1; }
#tutorial .tt-txt { padding: 4px 12px 10px; }
#tutorial .tt-txt b { color: #ffd94a; }
#tutorial.ok { border-color: #4fd648; }
#tutorial.ok .tt-n::after { content: ' ✓'; color: #4fd648; }
body.toque #tutorial { bottom: 200px; font-size: 13px; }
/* barrinha de progresso da recarga (embaixo do "recarregando…", ao lado da munição) */
.mun .rec { display: inline-flex; flex-direction: column; align-items: center; }
.mun .recbar { width: 90px; height: 4px; margin: 3px auto 0; background: rgba(0,0,0,.55); border-radius: 2px; overflow: hidden; } .mun .recbar div { height: 100%; background: linear-gradient(90deg, #ffd94a, #fff); }
