/* Fartnite Party — um só mundo visual (céu aberto, adesivos de gibi), por escolha: sem tema claro/escuro. */
:root {
  /* layout: o jogo ocupa a tela; HUD e menu são adesivos de papel com contorno grosso por cima do 3D */
  --ink: #3b1f1a;        /* marrom-feijão: contornos e texto */
  --paper: #fff6dc;      /* papel creme */
  --gas: #a6e22e;        /* verde-gás */
  --gas-deep: #5e9e1b;
  --sun: #ffc533;        /* destaque e lendário */
  --alert: #ff5a3c;      /* dano */
  --party: #ff5c9d;      /* rosa-festa: a faixa do PARTY e os confetes */
  --sky: #3f9be8;
  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --ui: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --shadow: 5px 5px 0 var(--ink);
  color-scheme: light;
}

/*FONTES*/
@font-face { font-family: "Bagel Fat One"; font-weight: 400; font-style: normal; font-display: swap; src: url(vendor/fonts/bagel-fat-one-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 500; font-style: normal; font-display: swap; src: url(vendor/fonts/baloo-2-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 700; font-style: normal; font-display: swap; src: url(vendor/fonts/baloo-2-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-style: normal; font-display: swap; src: url(vendor/fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }
/*FIM-FONTES*/

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden; background: var(--sky); color: var(--paper);
  font-family: var(--ui); font-weight: 700; font-size: 16px; line-height: 1.25;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  touch-action: none; overscroll-behavior: none;
}
.hidden { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
body.playing #c { cursor: none; }
b { font-weight: 800; }
button, input, select { font: inherit; color: inherit; }
kbd {
  display: inline-block; min-width: 1.7em; padding: 0 .4em; margin-right: .2em; text-align: center;
  font: 800 .82em/1.55 var(--ui); color: var(--paper); background: var(--ink); border-radius: 7px;
}

/* texto de HUD: creme com contorno de tinta */
.ink, #announce, #poi, .brand, #zoneInfo, .chip, #hpNum, #gasNum, .lbl, #hint, #netInfo, #capsule, #turbo, #spectating, #deathWho, #deathPlace {
  text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink),
    1.5px 1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 0 4px 0 rgba(59, 31, 26, .55);
}

.card {
  background: var(--paper); color: var(--ink); border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: var(--shadow); padding: 18px 20px;
}
.card h2 { margin: 0 0 8px; font: 400 26px/1.05 var(--display); letter-spacing: .01em; text-wrap: balance; }
.muted { opacity: .75; font-weight: 500; margin: 0 0 12px; }

button { cursor: pointer; border: 0; background: none; padding: 0; }
button.big {
  display: block; width: 100%; padding: 12px 18px 10px; font: 400 30px/1 var(--display); letter-spacing: .03em;
  color: var(--ink); background: var(--gas); border: 4px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow);
  transition: transform .08s, box-shadow .08s, background .15s;
}
button.big:hover { background: #b9f04a; transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
button.big:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
button.big[disabled] { background: #d8d2bd; cursor: default; transform: none; box-shadow: var(--shadow); }
button.ghost {
  padding: 7px 12px 5px; font-weight: 800; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; background: transparent;
}
button.ghost:hover { background: rgba(59, 31, 26, .1); }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 2px; }
input[type=text], select {
  width: 100%; padding: 8px 12px 6px; font-weight: 800; font-size: 18px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 12px;
}
.lbl { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 12px 0 5px; }
.card .lbl { text-shadow: none; opacity: .8; }
.card .lbl:first-child { margin-top: 0; }

/* ============================ menu ============================ */
#menu {
  position: fixed; inset: 0; z-index: 40; overflow: auto; touch-action: pan-y;
  display: grid; gap: 12px 22px; padding: clamp(14px, 3vw, 40px);
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  /* a linha do meio é a única elástica e ninguém a atravessa: assim nada se sobrepõe em telas baixas */
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "hero hero" ". ." "lobby howto" "foot foot";
  align-items: end;
  background: linear-gradient(98deg, rgba(59, 31, 26, .6) 0%, rgba(59, 31, 26, .25) 36%, rgba(59, 31, 26, 0) 62%);
}
#hero { grid-area: hero; align-self: start; }
/* letreiro: FARTNITE em letras de balão e, por cima, a faixa rosa do PARTY, com chapeuzinho e confete */
#logo {
  margin: 0; position: relative; display: inline-grid; justify-items: start; padding: .06em .16em .12em 0;
  font: 400 clamp(50px, min(11.5vw, 16vh), 150px)/0.92 var(--display); color: var(--paper); letter-spacing: -.01em;
}
#logo::before {
  /* a nuvem de gás atrás do letreiro */
  content: ""; position: absolute; inset: 6% -6% 2% -4%; z-index: -1; border-radius: 50%;
  background:
    radial-gradient(closest-side at 22% 50%, rgba(166, 226, 46, .95), rgba(166, 226, 46, 0) 100%),
    radial-gradient(closest-side at 50% 40%, rgba(166, 226, 46, .9), rgba(166, 226, 46, 0) 100%),
    radial-gradient(closest-side at 78% 56%, rgba(190, 240, 80, .9), rgba(166, 226, 46, 0) 100%);
  filter: blur(10px);
}
#logo .l1 {
  display: inline-flex; -webkit-text-stroke: clamp(8px, 1.3vw, 16px) var(--ink); paint-order: stroke fill;
  filter: drop-shadow(clamp(4px, .6vw, 8px) clamp(5px, .8vw, 10px) 0 var(--ink));
}
#logo .l1 span { display: inline-block; transform-origin: 50% 85%; animation: inflate 3.2s ease-in-out infinite alternate; }
#logo .l1 span:nth-child(2n) { animation-delay: -1.1s; color: #ffe9a8; }
#logo .l1 span:nth-child(3n) { animation-delay: -2.2s; }
#logo .l1 span:nth-child(1) { rotate: -5deg; } #logo .l1 span:nth-child(2) { rotate: 3deg; } #logo .l1 span:nth-child(3) { rotate: -2deg; }
#logo .l1 span:nth-child(4) { rotate: 4deg; } #logo .l1 span:nth-child(5) { rotate: -3deg; } #logo .l1 span:nth-child(6) { rotate: 2deg; }
#logo .l1 span:nth-child(7) { rotate: -4deg; } #logo .l1 span:nth-child(8) { rotate: 5deg; }
@keyframes inflate { from { transform: scale(.96, 1.02); } to { transform: scale(1.07, .97) translateY(-2%); } }
#logo .l2 {
  position: relative; z-index: 1; display: inline-flex; justify-self: end; margin: -.17em -.1em 0 0; padding: .13em .42em .03em .46em;
  font-size: .55em; letter-spacing: .05em; rotate: -5deg; color: var(--sun);
  -webkit-text-stroke: clamp(5px, .75vw, 10px) var(--ink); paint-order: stroke fill;
  filter: drop-shadow(clamp(3px, .5vw, 7px) clamp(4px, .6vw, 8px) 0 var(--ink));
}
#logo .l2::before {
  /* a faixa: um adesivo rosa inclinado, com brilho em cima e sombra embaixo */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: .2em; transform: skewX(-10deg);
  background: linear-gradient(180deg, #ff86b8 0 18%, var(--party) 18% 80%, #e23d80 80%);
  border: clamp(4px, .5vw, 7px) solid var(--ink);
}
#logo .l2 span { display: inline-block; animation: hop 2.6s cubic-bezier(.3, 1.5, .5, 1) infinite; }
#logo .l2 span:nth-child(2n) { color: var(--paper); }
#logo .l2 span:nth-child(1) { animation-delay: 0s; } #logo .l2 span:nth-child(2) { animation-delay: .1s; } #logo .l2 span:nth-child(3) { animation-delay: .2s; }
#logo .l2 span:nth-child(4) { animation-delay: .3s; } #logo .l2 span:nth-child(5) { animation-delay: .4s; }
@keyframes hop { 0%, 34%, 100% { translate: 0 0; rotate: 0deg; } 12% { translate: 0 -16%; rotate: -7deg; } 22% { translate: 0 3%; rotate: 2deg; } }
#logo .hat {
  position: absolute; z-index: 2; left: -.02em; top: -.17em; width: .36em; height: .45em; rotate: -24deg;
  filter: drop-shadow(.03em .04em 0 var(--ink)); animation: hatWobble 3.2s ease-in-out infinite alternate; transform-origin: 50% 100%;
}
@keyframes hatWobble { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
#logo .confetti { position: absolute; inset: -12% -8% -4% -4%; z-index: 0; pointer-events: none; }
#logo .confetti i {
  position: absolute; left: var(--x); top: var(--y); width: .1em; height: .1em; background: var(--c); border: .018em solid var(--ink); border-radius: var(--r, 0);
  rotate: var(--a, 20deg); animation: confetti var(--d, 3.4s) ease-in-out var(--w, 0s) infinite alternate;
}
#logo .confetti i:nth-child(1) { --x: 1%; --y: 62%; --c: var(--party); --a: 18deg; --d: 3.1s; }
#logo .confetti i:nth-child(2) { --x: 9%; --y: 92%; --c: var(--sun); --r: 50%; --d: 3.8s; --w: -1.2s; }
#logo .confetti i:nth-child(3) { --x: 21%; --y: 2%; --c: var(--sky); --a: -30deg; --d: 2.9s; --w: -.5s; }
#logo .confetti i:nth-child(4) { --x: 33%; --y: 88%; --c: var(--alert); --a: 50deg; --d: 3.5s; --w: -2s; width: .14em; height: .06em; }
#logo .confetti i:nth-child(5) { --x: 44%; --y: -3%; --c: var(--sun); --a: 12deg; --d: 4.1s; --w: -.9s; width: .14em; height: .06em; }
#logo .confetti i:nth-child(6) { --x: 55%; --y: 5%; --c: var(--party); --r: 50%; --d: 3.3s; --w: -1.7s; }
#logo .confetti i:nth-child(7) { --x: 66%; --y: -2%; --c: var(--gas); --a: -18deg; --d: 2.7s; --w: -.3s; }
#logo .confetti i:nth-child(8) { --x: 78%; --y: 6%; --c: var(--paper); --a: 38deg; --d: 3.9s; --w: -2.4s; width: .14em; height: .06em; }
#logo .confetti i:nth-child(9) { --x: 91%; --y: 14%; --c: var(--sky); --r: 50%; --d: 3.2s; --w: -1.1s; }
#logo .confetti i:nth-child(10) { --x: 98%; --y: 40%; --c: var(--sun); --a: -42deg; --d: 3.6s; --w: -.7s; }
#logo .confetti i:nth-child(11) { --x: 100%; --y: 78%; --c: var(--alert); --r: 50%; --d: 2.8s; --w: -1.9s; }
#logo .confetti i:nth-child(12) { --x: 47%; --y: 96%; --c: var(--sky); --a: 24deg; --d: 4.2s; --w: -.2s; width: .14em; height: .06em; }
#logo .confetti i:nth-child(13) { --x: 60%; --y: 99%; --c: var(--gas); --r: 50%; --d: 3s; --w: -1.4s; }
#logo .confetti i:nth-child(14) { --x: -3%; --y: 30%; --c: var(--paper); --a: -12deg; --d: 3.7s; --w: -2.2s; }
@keyframes confetti { from { translate: 0 -18%; transform: rotate(-28deg) scale(.9); } to { translate: 0 26%; transform: rotate(34deg) scale(1.08); } }
#tagline {
  margin: clamp(6px, 1.2vw, 14px) 0 0; max-width: 60ch; font: 800 clamp(17px, 2vw, 26px)/1.12 var(--ui); text-wrap: balance;
  text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 5px 0 rgba(59, 31, 26, .6);
}
#lobby { grid-area: lobby; rotate: -1deg; align-self: end; }
#howto { grid-area: howto; justify-self: start; max-width: 640px; rotate: .6deg; background: #fffbee; padding: 14px 18px 12px; }
#howto h2 { font-size: 21px; margin-bottom: 7px; }
#howto ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 20px; font-weight: 500; font-size: 14px; line-height: 1.22; }
#howto li { padding-left: 15px; position: relative; }
#howto li.tc, body.touch #howto li.kb { display: none; }
body.touch #howto li.tc { display: list-item; }
#howto li::before { content: ""; position: absolute; left: 0; top: .42em; width: 8px; height: 8px; border-radius: 50%; background: var(--gas-deep); }
#foodKey { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; font-size: 12.5px; font-weight: 800; align-items: center; }
#foodKey::before { content: "Brilho da comida:"; font-weight: 700; opacity: .8; margin-right: 2px; }
#foodKey span { padding: 2px 10px 0; border-radius: 99px; border: 2.5px solid var(--ink); }
#foodKey .r0 { background: #9be36b; } #foodKey .r1 { background: #6cc6ff; } #foodKey .r2 { background: #d491ff; } #foodKey .r3 { background: var(--sun); }
#swatches { display: flex; flex-wrap: wrap; gap: 7px; padding: 3px 2px 6px; }
#swatches button {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--ink); background: var(--c);
  transition: transform .1s;
}
#swatches button[aria-checked=true] { transform: scale(1.12); box-shadow: 0 0 0 2.5px var(--paper), 0 0 0 5.5px var(--ink); }
#btnPlay { margin-top: 14px; }
#modeLine { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-size: 13.5px; font-weight: 700; min-height: 1.3em; line-height: 1.2; }
#modeDot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #b9b29c; border: 2px solid var(--ink); }
#modeDot.ok { background: var(--gas); } #modeDot.warn { background: var(--sun); }
#soundHint {
  position: fixed; right: clamp(10px, 2vw, 26px); top: clamp(10px, 2vw, 22px); z-index: 2; padding: 5px 13px 3px;
  font-size: 14px; font-weight: 800; color: var(--ink); background: var(--sun); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink); rotate: 2deg; animation: soundHint 1.1s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes soundHint { to { scale: 1.06; } }
#lobbyBtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#lobbyBtns button { font-size: 14px; }
#btnMusic[aria-pressed=false] { opacity: .6; text-decoration: line-through; }
#foot { grid-area: foot; font-size: 13px; font-weight: 500; opacity: .9; text-shadow: 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink); }
@media (max-width: 900px) {
  #howto ul { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  #soundHint { top: auto; right: auto; left: 50%; bottom: 10px; translate: -50% 0; rotate: 0deg; width: max-content; max-width: 94vw; font-size: 13px; }
  #menu { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "hero" "lobby" "howto" "foot"; align-items: start;
    background: linear-gradient(180deg, rgba(59, 31, 26, .5), rgba(59, 31, 26, .25)); }
  #howto { justify-self: stretch; max-width: none; }
  #lobby, #howto { rotate: 0deg; }
}
@media (max-height: 640px) and (min-width: 701px) {
  #menu { padding: 12px 18px; gap: 8px 18px; }
  #logo { font-size: clamp(34px, 10.5vh, 78px); }
  #tagline { font-size: 16px; margin-top: 2px; }
  #lobby { padding: 11px 15px 10px; }
  #lobby .lbl { margin: 7px 0 3px; font-size: 12px; }
  #lobby input[type=text], #lobby select { padding: 5px 10px 3px; font-size: 16px; }
  #swatches button { width: 25px; height: 25px; }
  #btnPlay { margin-top: 10px; padding: 8px 14px 6px; font-size: 25px; }
  #modeLine { margin-top: 8px; font-size: 12.5px; }
  #lobbyBtns { margin-top: 6px; }
  #lobbyBtns button { padding: 4px 10px 2px; font-size: 13px; }
  #howto { padding: 10px 14px 9px; }
  #howto h2 { font-size: 18px; margin-bottom: 4px; }
  #howto ul { font-size: 12.5px; gap: 3px 16px; }
  #foodKey { margin-top: 6px; font-size: 11.5px; }
  #foot { font-size: 11.5px; }
}

/* ============================ HUD ============================ */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#topLeft { position: absolute; left: 16px; top: 12px; max-width: min(46vw, 420px); }
.brand { font: 400 30px/1 var(--display); color: var(--paper); rotate: -3deg; transform-origin: 0 50%; letter-spacing: .01em; white-space: nowrap; }
.brand b {
  display: inline-block; margin-left: .12em; padding: .16em .42em .02em; font: inherit; font-size: .6em; letter-spacing: .05em; vertical-align: .2em;
  color: var(--sun); background: var(--party); border: 3px solid var(--ink); border-radius: 9px; rotate: -5deg; box-shadow: 3px 3px 0 var(--ink);
}
#netInfo { margin-top: 4px; font-size: 13px; font-weight: 700; opacity: .95; }
#feed { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; justify-items: start; }
#feed li {
  padding: 3px 10px 1px; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 10px; animation: feedIn .25s ease-out, feedOut .6s ease-in 5.4s forwards;
  max-width: 100%; overflow-wrap: anywhere;
}
#feed li.me { background: var(--sun); }
#feed li b { font-weight: 800; }
#feed li i { font-style: normal; color: #8a2f22; }
@keyframes feedIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes feedOut { to { opacity: 0; } }

#topRight { position: absolute; right: 16px; top: 14px; display: grid; justify-items: end; gap: 8px; }
#mapFrame { width: 172px; height: 172px; border: 4px solid var(--ink); border-radius: 22px; overflow: hidden; background: #2b8fd0; box-shadow: var(--shadow); rotate: 1.5deg; }
#minimap { width: 100%; height: 100%; display: block; }
#zoneInfo { font-size: 15px; text-align: right; }
#zoneInfo b { font: 400 22px/1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; margin-left: 4px; }
#zoneInfo.closing b { color: var(--alert); }
#counts { display: flex; gap: 12px; }
.chip { font-size: 15px; }
.chip b { font: 400 24px/1 var(--display); color: var(--gas); font-variant-numeric: tabular-nums; margin-right: 2px; }

#announce {
  position: absolute; left: 50%; top: 15%; translate: -50% 0; width: min(92vw, 900px); text-align: center; text-wrap: balance;
  font: 400 clamp(26px, 4.4vw, 52px)/1.02 var(--display); color: var(--paper); opacity: 0;
  -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 rgba(59, 31, 26, .6);
}
#announce.show { animation: pop 2.6s ease-out forwards; }
#announce.warn { color: var(--sun); } #announce.bad { color: #ffb4a2; } #announce.good { color: #d9ff8a; }
@keyframes pop { 0% { opacity: 0; scale: .7; } 9% { opacity: 1; scale: 1.08; } 16% { scale: 1; } 82% { opacity: 1; } 100% { opacity: 0; scale: 1; } }
#poi { position: absolute; left: 50%; top: 8%; translate: -50% 0; font-size: 19px; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transition: opacity .5s; white-space: nowrap; }
#poi.show { opacity: 1; }

#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 3px; }
#crosshair i:nth-child(1) { left: -2.5px; top: -17px; width: 5px; height: 10px; }
#crosshair i:nth-child(2) { left: -2.5px; top: 7px; width: 5px; height: 10px; }
#crosshair i:nth-child(3) { top: -2.5px; left: -17px; width: 10px; height: 5px; }
#crosshair i:nth-child(4) { top: -2.5px; left: 7px; width: 10px; height: 5px; }
#crosshair.nogas i { background: var(--alert); }
#hitmark { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; opacity: 0; }
#hitmark::before, #hitmark::after { content: ""; position: absolute; left: 13px; top: -2px; width: 4px; height: 34px; background: var(--sun); border: 1.5px solid var(--ink); border-radius: 3px; rotate: 45deg; }
#hitmark::after { rotate: -45deg; }
#hitmark.on { animation: hit .28s ease-out; }
#hitmark.kill::before, #hitmark.kill::after { background: var(--alert); }
@keyframes hit { 0% { opacity: 1; scale: 1.5; } 100% { opacity: 0; scale: .8; } }

#bottomLeft { position: absolute; left: 16px; bottom: 14px; }
#hpBox .lbl { margin: 0 0 4px; }
#hpBox .lbl span { font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .9; }
#hpRow { display: flex; align-items: center; gap: 0; }
#roll {
  width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--ink); flex: none; margin-right: -6px; z-index: 1;
  background: radial-gradient(circle, #b9a58a 0 24%, var(--ink) 25% 33%, #fff 34%);
  box-shadow: 3px 3px 0 var(--ink);
}
#sheets { display: flex; height: 30px; filter: drop-shadow(3px 3px 0 var(--ink)); }
#sheets i {
  width: 22px; height: 30px; background: #fff; border-top: 3.5px solid var(--ink); border-bottom: 3.5px solid var(--ink);
  border-right: 2px dashed #c9bfa6; transform-origin: 0 0; transition: width .2s, opacity .25s, transform .35s;
}
#sheets i:last-of-type { border-right: 3.5px solid var(--ink); border-radius: 0 6px 9px 0; }
#sheets i.gone { opacity: 0; transform: translateY(26px) rotate(24deg); }
#sheets.low i { background: #ffd9cf; }
#hpNum { margin-left: 10px; font: 400 34px/1 var(--display); font-variant-numeric: tabular-nums; }
#hpNum.low { color: #ffb4a2; }

#bottomRight { position: absolute; right: 16px; bottom: 10px; display: grid; justify-items: end; gap: 6px; }
#gaugeBox { position: relative; width: 214px; height: 146px; }
#gauge { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(4px 4px 0 var(--ink)); }
#gArcBg { stroke: var(--ink); stroke-width: 34; }
#gArcLow { stroke: var(--alert); stroke-width: 22; } #gArcMid { stroke: var(--paper); stroke-width: 22; } #gArcHigh { stroke: var(--gas); stroke-width: 22; }
#gTicks line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
#gTicks line.maj { stroke-width: 4.5; }
#gNeedle { transform-origin: 110px 118px; transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
#gNeedle path { fill: var(--alert); stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
#gNeedle circle { fill: var(--ink); }
#gauge .pin { fill: var(--sun); }
#gaugeBox.full #gNeedle { animation: tremble .12s linear infinite; }
@keyframes tremble { 0%, 100% { translate: 0 0; } 50% { translate: .8px -.6px; } }
#gasNum { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; pointer-events: none; }
#gasNum b { font: 400 30px/1 var(--display); font-variant-numeric: tabular-nums; }
#gasNum span { margin-left: 5px; font-size: 13px; letter-spacing: .1em; }
#gasNote { position: absolute; right: 2px; top: -4px; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--sun); border: 2.5px solid var(--ink); border-radius: 9px; padding: 1px 7px 0; rotate: 4deg; opacity: 0; transition: opacity .2s; }
#gasNote.show { opacity: 1; }
#capsule { display: flex; align-items: center; gap: 8px; font-size: 15px; }
#capIcon {
  width: 30px; height: 15px; border-radius: 99px; border: 3px solid var(--ink); rotate: -24deg; flex: none;
  background: linear-gradient(90deg, var(--paper) 0 50%, var(--cap, #8fe04a) 50% 100%);
}
#capN { font: 400 20px/1 var(--display); color: var(--sun); }
#turbo { font-size: 14px; color: var(--ink); background: var(--sun); border: 3px solid var(--ink); border-radius: 10px; padding: 2px 9px 0; rotate: -3deg; }

#toasts { position: absolute; right: 22px; bottom: 236px; display: grid; gap: 5px; justify-items: end; }
#toasts div {
  padding: 3px 11px 1px; font-size: 15px; font-weight: 800; color: var(--ink); background: var(--gas);
  border: 3px solid var(--ink); border-radius: 11px; animation: toast 1.9s ease-out forwards; white-space: nowrap;
}
#toasts div.r1 { background: #6cc6ff; } #toasts div.r2 { background: #d491ff; } #toasts div.r3 { background: var(--sun); } #toasts div.heal { background: #fff; }
@keyframes toast { 0% { opacity: 0; transform: translateY(14px) scale(.9); } 10% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }

#dmgLayer { position: absolute; inset: 0; overflow: hidden; }
.dmg {
  position: absolute; left: 0; top: 0; display: none; font: 400 24px/1 var(--display); color: var(--paper);
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; will-change: transform;
}
.dmg.on { display: block; } .dmg.mine { color: var(--sun); } .dmg.big { font-size: 36px; color: #ff8a70; }

#vignette { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; background: radial-gradient(ellipse at center, rgba(255, 90, 60, 0) 52%, rgba(255, 60, 30, .62) 100%); }
#zoneVignette { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; box-shadow: inset 0 0 90px 12px rgba(150, 220, 40, .6); }
#zoneVignette.on { opacity: 1; animation: zonePulse 1s ease-in-out infinite alternate; }
@keyframes zonePulse { to { box-shadow: inset 0 0 120px 26px rgba(150, 220, 40, .75); } }
#zoneWarn {
  position: absolute; left: 50%; bottom: 23%; translate: -50% 0; width: max-content; max-width: 92vw; text-align: center; padding: 4px 14px 2px;
  font-size: 15px; font-weight: 800; color: var(--ink); background: var(--gas); border: 3px solid var(--ink); border-radius: 12px; display: none;
}
#zoneWarn.on { display: block; }
#hint { position: absolute; left: 50%; bottom: 15%; translate: -50% 0; font-size: 17px; text-align: center; opacity: 0; transition: opacity .3s; width: max-content; max-width: 90vw; }
#hint.show { opacity: 1; }

/* toque */
#touch { display: none; position: absolute; inset: 0; pointer-events: auto; }
body.touch #touch { display: block; }
#stick { position: absolute; width: 116px; height: 116px; margin: -58px 0 0 -58px; border-radius: 50%; border: 4px solid rgba(59, 31, 26, .8); background: rgba(255, 246, 220, .28); display: none; }
#stick.on { display: block; }
#stickKnob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px; border-radius: 50%; background: var(--paper); border: 4px solid var(--ink); }
#touch button { position: absolute; border-radius: 50%; border: 4px solid var(--ink); color: var(--ink); font: 400 17px/1 var(--display); box-shadow: 4px 4px 0 var(--ink); }
#btnFire { right: 22px; bottom: 34px; width: 98px; height: 98px; background: var(--gas); }
#btnJump { right: 132px; bottom: 22px; width: 74px; height: 74px; background: var(--paper); }
#btnPause { right: 142px; top: 12px; width: 46px; height: 46px; background: var(--paper); font-size: 15px; }
#touch button.on { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
body.touch #bottomRight { right: auto; left: 50%; translate: -50% 0; scale: .78; transform-origin: 50% 100%; bottom: 4px; }
body.touch #toasts { right: auto; left: 50%; translate: -50% 0; bottom: 150px; justify-items: center; }
body.touch #mapFrame { width: 120px; height: 120px; }
body.touch #btnPause { right: 142px; top: 12px; }
@media (max-aspect-ratio: 4/5) {
  body.touch #bottomRight { left: 6px; right: auto; translate: none; transform-origin: 0 100%; bottom: 72px; scale: .66; justify-items: start; }
  body.touch #toasts { bottom: 232px; }
  body.touch #sheets i { width: 11px; }
}
body.touch #hpBox { scale: .85; transform-origin: 0 100%; }

/* ============================ painéis ============================ */
#banner { position: fixed; inset: 0; z-index: 26; pointer-events: none; display: grid; align-content: start; justify-content: center; text-align: center; gap: 4px; padding-top: 7vh;
  background: radial-gradient(ellipse at 50% 16%, rgba(255, 197, 51, .55), rgba(255, 197, 51, 0) 60%); }
#bannerTitle {
  font: 400 clamp(40px, min(8.6vw, 17vh), 124px)/.95 var(--display); color: var(--sun); text-wrap: balance;
  -webkit-text-stroke: clamp(8px, 1.2vw, 15px) var(--ink); paint-order: stroke fill; filter: drop-shadow(6px 8px 0 var(--ink));
  animation: bannerIn .7s cubic-bezier(.2, 1.7, .4, 1);
}
#bannerSub { font-size: clamp(17px, 2.2vw, 26px); text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); }
@keyframes bannerIn { from { scale: .2; rotate: -12deg; opacity: 0; } }

#death { position: fixed; left: 50%; top: 13%; translate: -50% 0; z-index: 20; pointer-events: none; text-align: center; display: grid; gap: 6px; justify-items: center; width: min(92vw, 640px); }
.stamp {
  font: 400 clamp(38px, 6.5vw, 76px)/1 var(--display); color: var(--alert); padding: 8px 22px 2px; rotate: -6deg; letter-spacing: .03em;
  border: 7px solid var(--alert); border-radius: 16px; background: rgba(255, 246, 220, .9); box-shadow: var(--shadow); animation: stamp .35s cubic-bezier(.3, 1.8, .5, 1);
}
@keyframes stamp { from { scale: 2.6; opacity: 0; } }
.stamp.calm { color: var(--ink); border-color: var(--ink); font-size: clamp(28px, 4.5vw, 52px); }
#deathWho { font-size: 22px; margin-top: 10px; }
#deathPlace { font-size: 17px; }
#spectating { font-size: 15px; opacity: .95; }

#results, #pause { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: rgba(59, 31, 26, .35); }
#pause { z-index: 30; background: rgba(59, 31, 26, .55); }
#results { pointer-events: none; align-items: end; padding-bottom: 5vh; background: none; }
#results .card { width: min(94vw, 430px); max-height: 60vh; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; padding: 14px 18px; }
#results h2 { font-size: 23px; }
#resList { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 15px; overflow: hidden; }
#resList li { display: grid; grid-template-columns: 2.1em 1fr auto; gap: 8px; align-items: baseline; padding: 2px 10px 0; border-radius: 9px; }
#resList li:first-child { background: var(--sun); border: 2.5px solid var(--ink); }
#resList li.me { outline: 3px dashed var(--gas-deep); outline-offset: -2px; }
#resList .pl { font: 400 18px/1 var(--display); font-variant-numeric: tabular-nums; }
#resList .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#resList .ks { font-variant-numeric: tabular-nums; font-weight: 800; }
#resNext { margin-top: 10px; font-weight: 800; }
#pause .card { width: min(94vw, 420px); }
#pause .row { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 10px; margin: 9px 0; font-weight: 700; }
#pause select { font-size: 15px; padding: 5px 8px 3px; }
#pause input[type=range] { width: 100%; accent-color: var(--gas-deep); }
#pause .btns { display: grid; gap: 10px; margin-top: 16px; justify-items: center; }

#fatal { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; padding: 24px; text-align: center; background: var(--ink); color: var(--paper); font-size: 18px; }

@media (max-width: 720px) {
  #mapFrame { width: 118px; height: 118px; }
  .brand { font-size: 22px; }
  #gaugeBox { width: 170px; height: 116px; }
  #toasts { bottom: 190px; }
  #sheets i { width: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #logo span, #logo .hat, #logo .confetti i, #soundHint, #gaugeBox.full #gNeedle, #zoneVignette.on { animation: none; }
  #bannerTitle, .stamp { animation: none; }
}
