:root {
  --ink: #24133f;
  --plum: #3a1d5e;
  --magenta: #c8457e;
  --coral: #ff6b4a;
  --orange: #ff9838;
  --gold: #ffd166;
  --cream: #fff4dc;
  --teal: #3ec1b6;
  --tomato: #e5412d;
  --font-d: "Jersey 20", ui-monospace, "Courier New", monospace;
  --font-b: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --p: 0;      /* 0 = fim de tarde, 1 = noite */
  --a: 1;      /* céu dourado */
  --c: 0;      /* céu noturno */
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
  color: var(--cream);
  font: 500 1rem/1.4 var(--font-b);
  -webkit-text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

[hidden] { display: none !important; }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ───────── Cenário ───────── */
.scene { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }
.sky { position: absolute; inset: 0; transition: opacity 1.4s ease; }
.sky-b { background: linear-gradient(#3a1d5e 0%, #8e3a86 26%, #e8557a 46%, #ff8a3d 60%, #ffd166 72%); }
.sky-a { background: linear-gradient(#2f2a6b 0%, #5a4fa6 26%, #c56d92 48%, #f79a5e 62%, #ffcf7a 72%); opacity: var(--a); }
.sky-c { background: linear-gradient(#0d0a26 0%, #1f1447 34%, #4a2269 56%, #9a4070 72%); opacity: var(--c); }

.stars {
  position: absolute; inset: 0 0 34%;
  opacity: var(--c);
  transition: opacity 1.4s ease;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 31% 9%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 47% 26%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 66% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 83% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 48%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 6% 60%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 74% 66%, #fff 50%, transparent 51%);
  animation: twinkle 3s ease-in-out infinite alternate;
}

.sun {
  position: absolute;
  left: 50%;
  top: calc(47% + var(--p) * 24%);
  width: min(42vw, 180px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff7d6 0%, #ffd166 45%, #ff8a3d 100%);
  box-shadow: 0 0 60px 20px rgba(255, 190, 110, .45);
  -webkit-mask-image: linear-gradient(#000 54%, transparent 54% 58%, #000 58% 67%, transparent 67% 72%, #000 72% 80%, transparent 80% 86%, #000 86% 92%, transparent 92%);
  mask-image: linear-gradient(#000 54%, transparent 54% 58%, #000 58% 67%, transparent 67% 72%, #000 72% 80%, transparent 80% 86%, #000 86% 92%, transparent 92%);
  transition: top 1.4s cubic-bezier(.4, 0, .2, 1);
}

.hill { position: absolute; left: -8%; bottom: 28%; width: 64%; height: 13%; fill: #2a1740; }
.ship { position: absolute; bottom: 28%; width: 34px; fill: #2a1740; opacity: .8; }
.ship-1 { right: 12%; }
.ship-2 { right: 34%; width: 22px; opacity: .6; }

.sea {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28%;
  background: linear-gradient(#f08a6a 0%, #a2557f 14%, #1c5873 46%, #0c2f47 100%);
}
.sea::before {           /* escurece com a noite */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(#63305f 0%, #1b2552 30%, #070f2a 100%);
  opacity: var(--c);
  transition: opacity 1.4s ease;
}
.sea::after {            /* marolas */
  content: ""; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cpath d='M0 8q15-8 30 0t30 0 30 0 30 0' fill='none' stroke='%23fff4dc' stroke-opacity='.3' stroke-width='2'/%3E%3C/svg%3E") 0 34% / 120px 16px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='18'%3E%3Cpath d='M0 9q22-10 45 0t45 0 45 0 45 0' fill='none' stroke='%23fff4dc' stroke-opacity='.2' stroke-width='2.500'/%3E%3C/svg%3E") 0 72% / 180px 18px repeat-x;
  animation: drift 9s linear infinite;
}
.glint {
  position: absolute; left: 50%; top: 0; width: min(46vw, 200px); height: 78%;
  translate: -50% 0;
  background: repeating-linear-gradient(transparent 0 7px, rgba(255, 220, 150, .55) 7px 10px);
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 0, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 100% at 50% 0, #000 20%, transparent 72%);
  opacity: calc(1 - var(--p) * .8);
  transition: opacity 1.4s ease;
  animation: shimmer 2.400s ease-in-out infinite alternate;
}

.palm {
  position: absolute; right: -18%; bottom: -4%;
  height: min(74%, 620px);
  fill: #1a0d2e;
  transform-origin: 80% 100%;
  animation: sway 6s ease-in-out infinite alternate;
}
.lights {
  position: absolute; left: 0; top: calc(var(--top) + 46px); width: 100%; height: 64px;
  opacity: var(--c);
  transition: opacity 1.4s ease;
}
.lights circle { animation: bulb 1.600s steps(2) infinite; }
.lights circle:nth-child(even) { animation-delay: .8s; }

@keyframes twinkle { to { opacity: calc(var(--c) * .55); } }
@keyframes drift { to { background-position: 120px 34%, -180px 72%; } }
@keyframes shimmer { to { transform: scaleX(.82); } }
@keyframes sway { from { rotate: -1.500deg; } to { rotate: 2deg; } }
@keyframes bulb { 50% { opacity: .55; } }

/* Fundo 3D: assume o lugar do cenário em CSS quando o WebGL carrega */
#bg3d { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.200s ease; }
.has3d #bg3d { opacity: 1; }
.has3d .scene { opacity: 0; visibility: hidden; transition: opacity 1.200s ease, visibility 0s 1.200s; }
.has3d #game { background: none; }

/* ───────── HUD ───────── */
.hud {
  position: fixed; z-index: 5; top: 0; left: 50%;
  translate: -50% 0;
  width: 100%; max-width: 480px;
  padding: calc(var(--top) + 10px) 12px 0;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.progress { flex: 1; display: flex; gap: 5px; }
.progress i {
  flex: 1; height: 7px; border-radius: 4px;
  background: rgba(255, 244, 220, .32);
  box-shadow: 0 2px 0 rgba(36, 19, 63, .35);
  overflow: hidden;
}
.progress i::after {
  content: ""; display: block; height: 100%; width: 0;
  background: var(--cream);
  transition: width .35s ease;
}
.progress i.done::after { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  background: rgba(36, 19, 63, .55);
  color: var(--cream);
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn .cross { display: none; }
.icon-btn[aria-pressed="true"] .waves { display: none; }
.icon-btn[aria-pressed="true"] .cross { display: block; }
.icon-btn:active { scale: .92; }

/* ───────── Slides ───────── */
.stage { position: fixed; inset: 0; display: flex; justify-content: center; }
.slides { position: relative; width: 100%; max-width: 480px; height: 100%; perspective: 1100px; --tx: 0; --ty: 0; }

.slide {
  position: absolute; inset: 0;
  padding: calc(var(--top) + 66px) 20px calc(var(--bottom) + 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.200dvh, 18px);
  overflow: hidden auto;
  opacity: 0; visibility: hidden;
  perspective: 900px;
  transform: translate3d(70%, 0, -260px) rotateY(-55deg);
  transition: opacity .4s ease, transform .6s cubic-bezier(.2, .9, .25, 1), visibility 0s .6s;
}
.slide.past { transform: translate3d(-70%, 0, -260px) rotateY(55deg); }
.slide.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .4s ease, transform .6s cubic-bezier(.2, .9, .25, 1), visibility 0s;
}

.panel {
  width: 100%;
  background: rgba(36, 19, 63, .86);
  border: 3px solid var(--cream);
  border-radius: 20px;
  box-shadow: 0 7px 0 rgba(13, 7, 28, .55);
  padding: clamp(14px, 2.400dvh, 20px) 18px;
  text-align: center;
  position: relative;
  transform: rotateX(calc(var(--ty) * -5deg)) rotateY(calc(var(--tx) * 7deg));
  transform-style: preserve-3d;
}
.panel::before {           /* brilho que corre pelo vidro conforme a inclinação */
  content: ""; position: absolute; inset: 0; border-radius: 17px; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .16) 47%, transparent 62%) calc(50% + var(--tx) * 90%) 0 / 260% 100% no-repeat;
}
.has3d .panel {
  background: rgba(36, 19, 63, .64);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}
.lowfx .panel { background: rgba(36, 19, 63, .86); -webkit-backdrop-filter: none; backdrop-filter: none; }
.panel > * { position: relative; }
.panel h2 {
  font: 400 clamp(1.900rem, 8.800vw, 2.400rem)/1 var(--font-d);
  margin: 6px 0 8px;
  text-wrap: balance;
}
.panel p { color: rgba(255, 244, 220, .9); text-wrap: pretty; }

.tag {
  display: inline-block;
  font: 400 1rem/1 var(--font-d);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--gold);
  padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 3px 0 var(--orange);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 20px;
  font: 400 1.400rem/1 var(--font-d);
  text-decoration: none;
  color: var(--ink); background: var(--gold);
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink);
  transition: translate .06s, box-shadow .06s;
}
.btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--ink); }
.btn-big { min-height: 58px; font-size: 1.600rem; background: var(--coral); color: #fff; text-shadow: 0 2px 0 rgba(36, 19, 63, .45); }
.btn-teal { background: var(--teal); }
.btn-small { min-height: 48px; font-size: 1.250rem; padding: 0 8px; flex: 1; white-space: nowrap; }
.btn-ghost { background: rgba(255, 244, 220, .12); color: var(--cream); border-color: var(--cream); box-shadow: 0 5px 0 rgba(13, 7, 28, .5); }
.btn-ghost:active { box-shadow: 0 1px 0 rgba(13, 7, 28, .5); }
.link {
  min-height: 44px; padding: 0 12px;
  background: none; border: 0;
  color: rgba(255, 244, 220, .8); text-decoration: underline; text-underline-offset: 3px;
}
.col { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ───────── 0 · início ───────── */
.slide-start { justify-content: flex-start; padding-top: calc(var(--top) + 12vh); gap: 14px; text-align: center; }
.kicker {
  font: 400 1.200rem/1 var(--font-d); letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 2px 0 rgba(36, 19, 63, .6);
}
.title {
  font: 400 clamp(4.400rem, 26vw, 7.400rem)/.8 var(--font-d);
  text-transform: uppercase; letter-spacing: -.01em;
  color: var(--cream);
  text-shadow: 0 4px 0 var(--coral), 0 8px 0 var(--magenta), 0 12px 0 var(--plum), 0 18px 24px rgba(36, 19, 63, .5);
  animation: bob 2.600s ease-in-out infinite alternate;
  transform: rotateX(calc(var(--ty) * -12deg + 6deg)) rotateY(calc(var(--tx) * 16deg));
}
.when { transform: translateZ(40px) rotateX(calc(var(--ty) * -8deg)) rotateY(calc(var(--tx) * 10deg)); }
.when {
  margin-top: 16px;
  font: 400 1.500rem/1.2 var(--font-d);
  background: rgba(36, 19, 63, .8); border: 3px solid var(--cream); border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 5px 0 rgba(13, 7, 28, .5);
}
.skip { margin-top: auto; }
@keyframes bob { to { translate: 0 -8px; } }

/* ───────── 1 · jogador ───────── */
.player-card { padding-top: 16px; }
.avatar {
  width: min(40vw, 22vh, 170px); aspect-ratio: 1;
  margin: 12px auto 8px;
  border-radius: 50%;
  border: 5px solid var(--cream);
  box-shadow: 0 0 0 5px var(--coral), 0 0 0 10px var(--gold), 0 12px 0 rgba(13, 7, 28, .4);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar { transform: translateZ(24px); }
.avatar.spin { animation: coin .6s cubic-bezier(.3, .7, .3, 1); }
@keyframes coin { from { transform: translateZ(24px) rotateY(0); } to { transform: translateZ(24px) rotateY(360deg); } }
.name { font-size: clamp(2.400rem, 12vw, 3.100rem) !important; text-transform: uppercase; margin: 12px 0 0 !important; }
.class { font: 400 1.250rem/1 var(--font-d); color: var(--gold) !important; }
.stats { margin-top: 12px; display: grid; gap: 8px; text-align: left; }
.stats dt { font: 400 1rem/1 var(--font-d); text-transform: uppercase; letter-spacing: .05em; }
.stats dd, .xp-bar {
  height: 14px; margin-top: 3px;
  border: 2px solid var(--cream); border-radius: 8px;
  background: rgba(13, 7, 28, .5);
  overflow: hidden;
}
.stats i { display: block; height: 100%; width: var(--w); background: var(--teal); }
.xp { margin-top: 12px; text-align: left; }
.xp-head { display: flex; justify-content: space-between; font: 400 1rem/1.2 var(--font-d); text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
.xp-bar { height: 22px; border-width: 3px; }
.xp-bar i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, var(--orange) 14px 16px);
  transition: width .4s cubic-bezier(.2, 1.3, .4, 1);
}
.levelup {
  height: 0; overflow: hidden; opacity: 0;
  font: 400 2.400rem/1 var(--font-d); color: var(--gold) !important;
  text-shadow: 0 3px 0 var(--coral);
  transition: height .3s, opacity .3s, margin .3s;
}
.levelup small { display: block; font-size: 1.200rem; color: var(--cream); text-shadow: none; margin-top: 4px; }
.levelup.on { height: 3.800rem; opacity: 1; margin-top: 12px; animation: pop .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.3) rotateX(-360deg); } }

/* ───────── 2 · co-op ───────── */
.stack { position: relative; height: min(46vh, 390px); height: min(46dvh, 390px); aspect-ratio: 3 / 4; flex: none; margin-top: 6px; }
.polaroid {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--cream);
  padding: 9px 9px 0;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(13, 7, 28, .45);
  transform: translate3d(0, 110vh, 380px) rotateX(-65deg) rotateZ(30deg);
  transition: transform .8s cubic-bezier(.2, .9, .3, 1.1);
}
.polaroid.on { transform: rotate(var(--r)); }
.stack { transform: rotateX(calc(var(--ty) * -7deg)) rotateY(calc(var(--tx) * 10deg)); transform-style: preserve-3d; }
.polaroid:nth-child(2).on { transform: translateZ(14px) rotate(var(--r)); }
.polaroid:nth-child(3).on { transform: translateZ(28px) rotate(var(--r)); }
.polaroid img { flex: 1; min-height: 0; width: 100%; object-fit: cover; border-radius: 3px; }
.polaroid figcaption { font: 400 1.350rem/2 var(--font-d); color: var(--ink); text-align: center; }

/* ───────── 3 · missão ───────── */
.quest ul { display: grid; gap: 10px; margin-top: 12px; text-align: left; }
.quest li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 244, 220, .1);
  opacity: 0; transform: perspective(600px) rotateX(-90deg);
  transform-origin: 50% 0;
  transition: opacity .3s, transform .6s cubic-bezier(.2, 1.4, .4, 1);
}
.quest li.on { opacity: 1; transform: none; }
.ico {
  flex: none; width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.500rem;
  background: var(--gold); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 0 3px 0 var(--orange);
}
.quest small { display: block; font: 400 .95rem/1.1 var(--font-d); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.quest b { display: block; font-weight: 800; font-size: 1.120rem; line-height: 1.2; }
.quest em { display: block; font-style: normal; font-size: .9rem; opacity: .85; }
.quest-actions {
  display: flex; gap: 10px; margin-top: 14px;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .35s .15s, transform .35s .15s;
}
.quest-actions.on { opacity: 1; pointer-events: auto; transform: none; }

/* ───────── 4 · confirmação ───────── */
.name-form { margin-top: 12px; }
.name-form input {
  width: 100%; min-height: 56px;
  padding: 0 16px;
  font-family: inherit; font-size: 1.250rem; font-weight: 800; color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: inset 0 3px 0 rgba(36, 19, 63, .15);
}
.name-form input::placeholder { color: rgba(36, 19, 63, .45); }
.name-form input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.count { margin-top: 10px; font-size: .92rem; min-height: 1.300em; }

/* ───────── 5 · jogo ───────── */
.slide-game { padding: 0; overflow: hidden; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--top) + 66px) 20px calc(var(--bottom) + 20px);
  background: rgba(13, 7, 28, .35);
}
.game-panel { max-height: 100%; overflow: hidden auto; }
.game-title { font-size: clamp(2.500rem, 12.500vw, 3.200rem) !important; color: var(--gold); text-shadow: 0 3px 0 var(--coral); text-transform: uppercase; }
.how { display: grid; gap: 6px; text-align: left; margin: 10px 0; }
.how li { padding-left: 22px; position: relative; }
.how li::before { content: "▸"; position: absolute; left: 4px; color: var(--gold); }
.how b { color: var(--gold); }
.best { font: 400 1.250rem var(--font-d); }
.best b { color: var(--gold); font-size: 1.600rem; font-weight: 400; }
.as { font-size: .95rem; }
.as b { color: var(--gold); }
.as .link { min-height: 0; padding: 6px 4px; }
.col .link { min-height: 36px; }
.final { margin: 8px 0 4px; }
.final b { display: block; font: 400 clamp(3.600rem, 19vw, 5rem)/1 var(--font-d); color: var(--gold); text-shadow: 0 4px 0 var(--coral); font-variant-numeric: tabular-nums; }
.final small { font: 400 1.250rem var(--font-d); }

.board { display: grid; gap: 4px; margin-top: 10px; max-height: 30vh; max-height: 30dvh; overflow-y: auto; text-align: left; }
.board li {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 244, 220, .08);
  font-weight: 700;
}
.board li > :first-child { font: 400 1.200rem/1 var(--font-d); }
.board li > :last-child { font: 400 1.350rem/1 var(--font-d); }
.board li.me { background: var(--gold); color: var(--ink); }
.board-note { font-size: .88rem; margin-top: 8px; min-height: 1.200em; }

/* HUD do jogo 3D */
.ghud { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-top { position: absolute; top: calc(var(--top) + 58px); left: 16px; display: flex; align-items: baseline; gap: 6px; }
#g-score {
  font: 400 3.600rem/1 var(--font-d); color: var(--cream);
  text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(255, 107, 74, .7);
}
.g-max { font: 400 1.500rem/1 var(--font-d); color: var(--gold); text-shadow: 0 2px 0 var(--ink); }
.g-time {
  position: absolute; top: calc(var(--top) + 58px); right: 16px;
  min-width: 2.2ch; padding: 4px 12px; border-radius: 12px; text-align: center;
  font: 400 2.400rem/1 var(--font-d); font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--gold); box-shadow: 0 3px 0 var(--orange);
}
.g-time.last { color: var(--cream); background: #e0261a; box-shadow: 0 3px 0 #7a0c05; }
.g-time.pulse { animation: gpulse .35s cubic-bezier(.2, 1.8, .4, 1); }
.g-meter {
  position: absolute; top: calc(var(--top) + 112px); right: 16px;
  width: 38%; height: 22px;
  border: 3px solid var(--cream); border-radius: 12px;
  background: rgba(13, 7, 28, .6); overflow: hidden;
}
.g-meter i {
  display: block; width: 100%; height: 100%;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--coral));
  transition: transform .15s;
}
.g-meter span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 400 1rem/1 var(--font-d); letter-spacing: .16em; text-transform: uppercase;
  color: var(--cream); text-shadow: 0 1px 0 var(--ink), 0 0 6px var(--ink);
}
.ghud.fever .g-meter { border-color: var(--gold); box-shadow: 0 0 18px var(--gold); }
.ghud.fever .g-meter i { background: linear-gradient(90deg, #ff5aa5, #ffd166, #4ef0ff, #7dff9a, #ff5aa5) 0 0 / 200% 100%; animation: gslide .5s linear infinite; }
.ghud.fever::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 70px 14px rgba(255, 209, 102, .6);
  animation: ghue 1.200s linear infinite;
}
.ghud.hell::before {       /* fases de lava: borda em brasa pulsando */
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 90px 22px rgba(255, 50, 0, .55);
  animation: ghell 1s ease-in-out infinite alternate;
}
.g-pops { position: absolute; left: 0; right: 0; top: 40%; height: 0; }
.g-pop {
  position: absolute; left: 50%;
  translate: calc(-50% + var(--dx, 0px)) 0;
  font: 400 2rem/1 var(--font-d); white-space: nowrap;
  color: var(--cream); text-shadow: 0 3px 0 var(--ink);
  animation: gpop .9s ease-out forwards;
}
.g-pop.hot { font-size: 2.600rem; color: var(--gold); text-shadow: 0 3px 0 var(--tomato), 0 0 16px rgba(255, 107, 74, .8); }
.g-pop.cool { color: #4ef0ff; text-shadow: 0 3px 0 var(--ink), 0 0 14px #4ef0ff; }
.g-banner { position: absolute; left: 0; right: 0; top: 22%; text-align: center; opacity: 0; }
.g-banner b {
  display: block; font: 400 clamp(3.200rem, 17vw, 4.800rem)/.9 var(--font-d);
  color: var(--cream);
  text-shadow: 0 4px 0 var(--coral), 0 8px 0 var(--magenta), 0 0 30px rgba(255, 209, 102, .9);
}
.g-banner small { font: 400 1.800rem/1.3 var(--font-d); letter-spacing: .1em; color: var(--gold); text-shadow: 0 2px 0 var(--ink); }
.g-banner.on { animation: gbanner 1.700s cubic-bezier(.2, .9, .3, 1) forwards; }
.g-flash { position: absolute; inset: 0; opacity: 0; }
.g-flash.on { animation: gflash .45s ease-out; }
.g-hint {
  position: absolute; left: 0; right: 0; bottom: 20%;
  display: flex; justify-content: space-between; padding: 0 16px;
  font: 400 1.400rem/1 var(--font-d); color: var(--cream);
}
.g-hint span { padding: 12px 10px; font-size: 1.200rem; border: 3px dashed rgba(255, 244, 220, .8); border-radius: 14px; background: rgba(36, 19, 63, .6); animation: blink 1s steps(2, jump-none) infinite; }
@keyframes gpulse { from { scale: 1.7; } }
@keyframes ghell { to { opacity: .4; } }
@keyframes gslide { to { background-position: -200% 0; } }
@keyframes ghue { to { filter: hue-rotate(360deg); } }
@keyframes gpop {
  0% { transform: translateY(24px) scale(.5); opacity: 0; }
  15% { transform: translateY(0) scale(1.15); opacity: 1; }
  100% { transform: translateY(-120px) scale(1); opacity: 0; }
}
@keyframes gbanner {
  0% { opacity: 0; transform: scale(2.2) rotate(-6deg); }
  14% { opacity: 1; transform: scale(1) rotate(-3deg); }
  80% { opacity: 1; transform: scale(1.04) rotate(-3deg); }
  100% { opacity: 0; transform: scale(.9) translateY(-40px) rotate(-3deg); }
}
@keyframes gflash { from { opacity: .55; } to { opacity: 0; } }
.btn:disabled { opacity: .6; }

/* ───────── dica e efeitos ───────── */
.hint {
  position: fixed; z-index: 4; left: 0; right: 0;
  bottom: calc(var(--bottom) + 22px);
  margin: 0; text-align: center;
  font: 400 1.300rem/1 var(--font-d); letter-spacing: .06em; text-transform: uppercase;
  color: var(--cream); text-shadow: 0 2px 0 rgba(13, 7, 28, .7), 0 0 14px rgba(13, 7, 28, .6);
  pointer-events: none;
  animation: blink 1.200s steps(2, jump-none) infinite;
}
.hint:empty { display: none; }
@keyframes blink { to { opacity: .35; } }

.fx { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.fx i {
  position: absolute; left: var(--x); top: var(--y);
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--col);
  animation: burst var(--t, 1s) cubic-bezier(.1, .7, .3, 1) forwards;
}
.fx b {
  position: absolute; left: var(--x); top: var(--y);
  translate: -50% -50%;
  font: 400 1.600rem var(--font-d); color: var(--gold);
  text-shadow: 0 2px 0 var(--ink);
  animation: float .8s ease-out forwards;
}
@keyframes burst {
  to { translate: var(--dx) var(--dy); rotate: var(--rot); opacity: 0; }
}
@keyframes float { to { translate: -50% -90px; opacity: 0; } }

@media (min-width: 700px) {
  .palm { right: calc(50% - 420px); }
}

@media (max-height: 620px) {
  .stats { display: none; }
  .slide { padding-bottom: calc(var(--bottom) + 52px); }
  .hint { bottom: calc(var(--bottom) + 14px); font-size: 1.100rem; }
}

@media (prefers-reduced-motion: reduce) {
  .title, .palm, .glint, .sea::after, .stars, .lights circle, .hint, .avatar.spin { animation: none; }
  .slide, .slide.past, .slide.active { transition: opacity .2s, visibility 0s; transform: none; }
}
