/* ===== Acabamento "pro" das peças do HUD que ficam fora do #hud (carregado depois de style.css/creator.css):
   nomes sobre os bonecos, voz, painel do carro, aviso do YouTube, chat e tela de fim. ===== */
:root { --hud: 'Barlow Condensed', 'Barlow', system-ui, sans-serif; --hud-glass: rgba(12, 14, 19, .88); --hud-edge: rgba(255,255,255,.1); }

/* ---------- nomes e vida sobre os bonecos ---------- */
.hero-label .nm { font-family: var(--hud); font-weight: 700; font-size: 14px; letter-spacing: .03em; padding: 0 8px 1px; border-radius: 3px;
  background: rgba(12, 14, 19, .8); box-shadow: inset 0 -2px 0 var(--c); }
.hero-label.ally .nm { color: #fff; }
.hero-label:not(.ally) .nm { color: color-mix(in srgb, var(--c) 45%, #fff); }
.hero-label .hp { width: 62px; height: 5px; border-radius: 2px; background: rgba(0,0,0,.7); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.hero-label .hp i { background: var(--c); }
.hero-label.ally .hp i { background: #2fbf71; }
.boss-label b { display: inline-block; font-family: var(--hud); font-weight: 800; font-style: italic; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 14px 1px; border-radius: 3px; color: #fff;
  background: color-mix(in srgb, var(--c) 70%, #000); box-shadow: inset 0 2px 0 var(--c), 0 4px 12px rgba(0,0,0,.4); }
.boss-label .mini { width: 150px; height: 7px; margin-top: 6px; border-radius: 2px; background: rgba(0,0,0,.7); box-shadow: 0 0 0 1px rgba(255,255,255,.35); }

/* ---------- voz ---------- */
/* voz embaixo à esquerda, logo acima do minimapa (estilo GTA); quem está falando empilha para cima */
#voice { top: auto; bottom: calc(var(--hu) * 18.9 + 10px); left: calc(var(--hu) * .9); flex-direction: column-reverse; gap: 5px; font-family: var(--hud); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
#voice .vc-mic { display: flex; align-items: center; gap: 6px; }
#voice .vc-mic span, #voice .vc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 3px; background: var(--hud-glass); border: 1px solid var(--hud-edge); }
#voice .vc-pill i { display: grid; width: 16px; height: 16px; }
#voice .vc-pill i svg { width: 100%; height: 100%; }
#voice .vc-off { color: #aab6c8; }
#voice .vc-on { color: #fff; border-color: rgba(79,209,125,.5); }
#voice .vc-on i { color: #4fd17d; }
#voice .vc-on.talk { border-color: #4fd17d; }
#voice kbd { font-family: var(--hud); font-size: 11px; border-bottom-width: 1px; border-radius: 3px; opacity: .8; }
#voice .vc-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; margin-left: 2px; }
#voice .vc-eq u { width: 3px; height: 30%; border-radius: 1px; background: #4fd17d; opacity: .5; }
#voice .vc-on.talk .vc-eq u { opacity: 1; animation: vc-eq .5s ease-in-out infinite alternate; }
#voice .vc-on.talk .vc-eq u:nth-child(2) { animation-delay: -.2s; }
#voice .vc-on.talk .vc-eq u:nth-child(3) { animation-delay: -.35s; }
@keyframes vc-eq { from { height: 25%; } to { height: 100%; } }
#voice .vc-err { color: #ff9a8f; max-width: 280px; font-size: 12px; }
#voice .vc-talk { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 3px 10px 3px 6px; border-radius: 3px;
  background: var(--hud-glass); border: 1px solid var(--hud-edge); box-shadow: inset 3px 0 0 #4fd17d; animation: fade .15s; }
#voice .vc-talk i { display: grid; width: 16px; height: 16px; color: #8ff0a8; }
#voice .vc-talk i svg { width: 100%; height: 100%; }
#voice .vc-talk .w1, #voice .vc-talk .w2, #voice .vc-talk .w3, #yt-box .yt-eq svg { animation: wave 1s ease-in-out infinite; }
#voice .vc-talk .w2 { animation-delay: .15s; }
#voice .vc-talk .w3 { animation-delay: .3s; }
@keyframes wave { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- painel do carro de som ---------- */
#car-hint { font-family: var(--hud); font-size: 15px; font-weight: 700; letter-spacing: .03em; border-radius: 4px; background: var(--hud-glass); border: 1px solid var(--hud-edge); box-shadow: inset 0 2px 0 var(--mine), 0 8px 22px rgba(0,0,0,.4); }
#car-hint b { color: #fff; font-weight: 800; padding: 1px 6px; margin: 0 2px; border-radius: 3px; background: rgba(255,255,255,.12); }
#car-hint .ch-song, #car-hint .ch-yt { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }
#car-hint .ch-song svg { width: 16px; height: 16px; color: #c2c8d2; flex: none; }
#car-hint .ch-yt svg { width: 20px; height: 14px; flex: none; }
#car-hint .ch-yt { color: #ffb3b3; }
#car-hint .ch-song span, #car-hint .ch-yt span { overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
#car-hint .ch-vol i { width: 4px; height: 12px; border-radius: 1px; }
#car-hint .ch-keys { font-size: 13px; font-weight: 600; color: #c9d3e0; }

/* ---------- aviso do YouTube do paredão (acima do minimapa, longe do placar de derrubadas) ---------- */
#yt-box { top: auto; bottom: calc(var(--hu) * 7.6); right: calc(var(--hu) * .9); } /* acima das armas */
#yt-box .yt-label { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 7px; border-radius: 3px; font-family: var(--hud); font-size: 14px; font-weight: 700; letter-spacing: .03em; color: #fff;
  background: var(--hud-glass); border: 1px solid var(--hud-edge); box-shadow: inset 3px 0 0 #ff0033; }
#yt-box .yt-label i { display: grid; }
#yt-box .yt-label i:first-child svg { width: 20px; height: 14px; }
#yt-box .yt-eq svg { width: 14px; height: 14px; color: #ffd166; }
#yt-box .yt-show { font-family: var(--hud); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; padding: 4px 8px; background: rgba(8,12,22,.75); border: 1px solid var(--hud-edge); }

/* ---------- chat ---------- */
.ch-scope { font-family: var(--hud); letter-spacing: .1em; }
.ch-tip { font-family: var(--hud); font-weight: 600; letter-spacing: .04em; }

/* ---------- roda de emotes (B) ---------- */
#emote-wheel { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: auto; background: radial-gradient(circle at 50% 50%, rgba(5,8,16,.35), rgba(5,8,16,0) 60%); }
#emote-wheel.hidden { display: none; }
#emote-wheel .ew-ring { --r: clamp(105px, 17vmin, 150px); position: relative; width: calc(var(--r) * 2 + 84px); height: calc(var(--r) * 2 + 84px); border-radius: 50%;
  background: radial-gradient(circle, rgba(8,12,22,.62) 0 calc(var(--r) - 44px), rgba(10,15,26,.72) calc(var(--r) - 43px) calc(var(--r) + 44px), rgba(8,12,22,0) calc(var(--r) + 45px));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); animation: ew-in .14s ease-out; }
@keyframes ew-in { from { transform: scale(.85); opacity: 0; } }
#emote-wheel .ew-item { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; display: grid; place-items: center;
  transform: translate(calc(var(--x) * var(--r)), calc(var(--y) * var(--r))); color: #e9eef7; cursor: pointer;
  background: var(--hud-glass); border: 1px solid var(--hud-edge); box-shadow: 0 6px 16px rgba(0,0,0,.4); transition: transform .1s, background .1s, color .1s; }
#emote-wheel .ew-item .ic { width: 38px; height: 38px; display: grid; }
#emote-wheel .ew-item .ic svg { width: 100%; height: 100%; }
#emote-wheel .ew-item kbd { position: absolute; right: 2px; bottom: 2px; font-family: var(--hud); font-size: 11px; line-height: 1; padding: 2px 4px; border-radius: 3px; background: rgba(0,0,0,.55); color: #c5cedd; border: 0; }
#emote-wheel .ew-item.on { color: #fff; background: color-mix(in srgb, var(--team) 70%, #000); border-color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.4);
  transform: translate(calc(var(--x) * var(--r)), calc(var(--y) * var(--r))) scale(1.12); }
#emote-wheel .ew-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(var(--r) * 1.2); text-align: center; font-family: var(--hud); color: #fff; pointer-events: none; }
#emote-wheel .ew-center b { display: block; font-size: 24px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
#emote-wheel .ew-center small { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: #aab6c8; }
#emote-wheel .ew-center kbd { font-family: var(--hud); font-size: 11px; padding: 0 4px; border-radius: 3px; background: rgba(255,255,255,.12); border: 0; color: #fff; }

/* painel do carro / aviso de carona: sempre logo acima do painel de vida (--hp-top medido no client.js) */
#car-hint { bottom: calc(var(--hu) * 1.4) !important; } /* embaixo no meio: ali não tem mais painel */

/* ---------- modo passeio (NEUTRO) ---------- */
.hero-label.tour .nm { color: #fff; box-shadow: inset 0 -2px 0 #2a9ec4; }
.hero-label.tour .tg { margin-top: 2px; font: 700 10px/1 var(--hud); letter-spacing: .14em; text-transform: uppercase; color: #9fdcf0; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#tour-chip { display: none; position: absolute; left: 50%; bottom: 1.4em; transform: translateX(-50%); align-items: center; gap: 8px; padding: 6px 12px; border-radius: 4px;
  background: rgba(12, 14, 19, .82); box-shadow: inset 0 -2px 0 #2a9ec4; font: 600 13px/1.2 var(--hud); letter-spacing: .04em; color: rgba(255,255,255,.88); white-space: nowrap; pointer-events: none; }
#tour-chip b { font-weight: 800; letter-spacing: .1em; color: #9fdcf0; }
body.tourist #tour-chip { display: flex; }
/* o painel do carro (e o aviso "F dirigir" no PC) fica no mesmo lugar: enquanto ele aparece, o aviso de passeio sai */
body.tourist.driving #tour-chip, body.tourist:has(#car-hint.show.car) #tour-chip, body.tourist:not(.touch):has(#car-hint.show) #tour-chip { display: none; }
body.tourist #abilities .ab:not([data-k="dash"]), body.tourist #crosshair, body.tourist #stats, body.tourist #upgrades,
body.tourist #xpbar, body.tourist #lv, body.tourist #pend, body.tourist .t-fire, body.tourist .t-balao,
body.tourist .t-megafone, body.tourist .t-santinhos { display: none !important; }
.board-tour { margin-top: 10px; padding: 8px 12px; border-radius: 4px; background: rgba(42, 158, 196, .12); font: 500 13px/1.4 var(--hud); color: rgba(255,255,255,.8); }
.board-tour b { margin-right: 6px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9fdcf0; }

/* ---------- celular / tablet: peças fora do #hud (mesma escala --hu de hud.css; "html" vence touch.css) ---------- */
html body.touch .hero-label .nm { font-size: calc(var(--hu) * 1.2); padding: 0 .5em 1px; }
html body.touch .hero-label .hp { width: calc(var(--hu) * 5.6); height: 6px; }
html body.touch .boss-label b { font-size: calc(var(--hu) * 1.65); }
html body.touch .boss-label .mini { width: calc(var(--hu) * 11); height: 8px; }
html body.touch .floater { font-size: calc(var(--hu) * 1.9); }
/* chat no toque: fechado, embaixo do minimapa, só as 3 últimas mensagens (mais largo: quebra menos linha) (sem rolagem: ao fechar, a rolagem ficava
   no meio e cortava a última). Digitando (#chat.typing com html.kb: teclado aberto; a barra de digitar fica presa logo
   acima dele, touch.css), a conversa aparece logo acima da barra, com as mensagens antigas, no espaço que sobra até o topo. */
html body.touch #chat { top: calc(var(--sat) + var(--hu) * 12.6); bottom: auto; left: calc(var(--sal) + 8px); width: min(380px, 46vw); font-size: 14px; }
html body.touch #chat .ch-log { max-height: none; overflow: visible; mask-image: none; }
html body.touch #chat:not(.typing) .ch-row:not(:nth-last-child(-n+3)), html:not(.kb) body.touch #chat .ch-row:not(:nth-last-child(-n+3)) { display: none; }
html body.touch #chat .ch-row { padding: 2px 8px 3px; }
html body.touch #chat .ch-tip { display: none; }
html.kb body.touch #chat.typing .ch-log { position: fixed; top: auto; left: calc(var(--sal) + 8px); bottom: calc(var(--kb-bottom, 0px) + 72px); width: min(560px, calc(100vw - 16px - var(--sal) - var(--sar)));
  max-height: calc(100vh - var(--kb-bottom, 0px) - 80px - var(--sat)); overflow: hidden; justify-content: flex-end; padding: 6px 8px; border-radius: var(--r);
  background: rgba(12, 14, 19, .92); border: 1px solid var(--line-2); }
html.kb body.touch #chat.typing .ch-log:empty { display: none; }
html.kb body.touch #chat.typing .ch-row { opacity: 1; background: transparent; padding: 1px 2px; }
/* voz no toque: o botão de microfone já mostra se está ligado; aqui só quem está falando, embaixo dos botões do topo */
html body.touch #voice { top: calc(var(--sat) + 96px); bottom: auto; left: auto; right: calc(var(--sar) + 8px); flex-direction: column; align-items: flex-end; font-size: 13px; }
html body.touch #voice .vc-talk { align-self: flex-end; }
html body.touch #voice .vc-mic { display: none; }
body:has(#touch.menu) :is(#voice, #yt-box) { visibility: hidden; } /* menu "⋯" aberto desce por cima desse canto */
/* painel do carro: embaixo no meio, acima da fileira de baixo dos botões do carro (~100 px do chão) e estreito o
   bastante para não encostar neles (ocupam até ~236 px da borda direita); o "F dirigir" é o botão verde */
html body.touch #car-hint { bottom: calc(var(--sab) + 106px) !important; font-size: 14px; max-width: min(420px, calc(100vw - 472px)); overflow: hidden; }
html body.touch #car-hint .ch-keys, html body.touch #car-hint:not(.car) { display: none; }
/* YouTube do paredão: no canto de cima à direita, embaixo dos botões do topo */
html body.touch #yt-box { top: calc(var(--sat) + 60px); bottom: auto; right: calc(var(--sar) + 8px); transform: none; }
html body.touch #yt-box .yt-label { font-size: 14px; }
html body.touch #tour-chip { bottom: calc(var(--hu) * 7.2); font-size: 13px; }
html body.touch #emote-wheel .ew-item { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
