/* Coin-O-Matic — direção de arte "FLIPERAMA": um fliperama à noite.
   Gabinetes pintados de roxo/índigo com friso cromado, letreiro de lâmpadas (as bolinhas
   que piscam em fila) no lugar da faixa zebrada, neon magenta e ciano só nos acentos,
   moedas douradas, papel creme nos cartões e tinta roxo-quase-preta no texto.
   Sombras duras (nada de brilho borrado), 3 raios (6 / 10 / 16) e escala de tipo fixa:
   Lilita One para títulos e números, Fredoka para o resto. */
:root {
  --ink-line: #1a1233;
  --ink: #251c3e;
  --ink-soft: #6b5f78;
  --paper: #f6eedb;
  --paper-2: #e8dbbb;
  --paper-3: #d5c6a2;
  /* gabinete pintado */
  --cab: #4b3a8c;
  --cab-hi: #7a68bd;
  --cab-d: #35286e;
  --cab-dd: #261b52;
  --cab-ddd: #160e33;
  /* friso cromado */
  --chrome: #c2cada;
  --chrome-hi: #f3f6fb;
  --chrome-d: #7b84a0;
  /* neon (só acento) */
  --magenta: #ff3dce;
  --magenta-d: #a6228c;
  --magenta-l: #ff9de8;
  --cyan: #35e4ff;
  --cyan-d: #1689a8;
  --cyan-l: #b8f6ff;
  /* tintas */
  --gold: #f4c542;
  --gold-d: #b47d16;
  --gold-l: #ffe08a;
  --red: #e2384f;
  --red-d: #8f2038;
  --red-l: #ff8f9c;
  --green: #4cb348;
  --green-d: #2a6b22;
  --green-l: #95e07c;
  --hot: #ff6a2b;
  --hot-d: #9e3610;
  --hot-l: #ffa66e;
  --cream: #fff6e0;
  --g-machine: #2fa8e6;
  --g-coins: var(--gold);
  --g-room: var(--green);
  --g-prize: var(--magenta);
  --r1: 6px;
  --r2: 10px;
  --r3: 16px;
  --display: "Lilita One", "Fredoka", system-ui, sans-serif;
  --body: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  /* friso cromado por dentro da borda de tinta (painéis de gabinete) */
  --trim: inset 0 0 0 2px var(--chrome-d), inset 0 3px 0 1px var(--chrome-hi), inset 0 -4px 0 1px var(--cab-d);
  /* lâmpada de letreiro (acesa / apagada) */
  --bulb: radial-gradient(circle, #fffbe6 0 1.5px, #ffd54a 1.9px 3px, var(--ink-line) 3.4px 4.3px, transparent 4.7px);
  --bulb-off: radial-gradient(circle, #7d4f1c 0 3px, var(--ink-line) 3.4px 4.3px, transparent 4.7px);
  --bulbs-lr: var(--bulb) 3px 50% / 10px 10px no-repeat, var(--bulb) calc(100% - 3px) 50% / 10px 10px no-repeat;
  --bulbs-4: var(--bulb) 2px 2px / 10px 10px no-repeat, var(--bulb) calc(100% - 2px) 2px / 10px 10px no-repeat,
    var(--bulb) 2px calc(100% - 2px) / 10px 10px no-repeat, var(--bulb) calc(100% - 2px) calc(100% - 2px) / 10px 10px no-repeat;
  /* carpete de fliperama: rabiscos de neon bem apagados */
  --carpet: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'><g fill='none' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' opacity='.2'><path d='M6 16q4-7 8 0t8 0' stroke='%2335e4ff'/><path d='M44 50l6-8 6 8z' stroke='%23ff3dce'/><circle cx='54' cy='16' r='3.5' stroke='%23f4c542'/><path d='M14 50l5 5m0-5l-5 5' stroke='%23f4c542'/><path d='M30 30q4 5 8 0' stroke='%23ff3dce'/><path d='M60 64l4-4' stroke='%2335e4ff'/></g></svg>");
}
/* Cirílico e CJK: a Lilita/Fredoka não têm esses glifos; cai na fonte do sistema, mais pesada. */
html:lang(ru), html:lang(ja), html:lang(ko), html:lang(zh) {
  --display: "Lilita One", "Arial Black", "Segoe UI Black", "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei", "Malgun Gothic", system-ui, sans-serif;
  --body: "Fredoka", "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei", "Malgun Gothic", system-ui, sans-serif;
}
html:lang(ru) :is(h2, button, .tab, .float, .note-body b, #hud-money, .ph-banner b, .pz-name, .sl-name, .ph-name),
html:lang(ja) :is(h2, button, .tab, .float, .note-body b, #hud-money, .ph-banner b, .pz-name, .sl-name, .ph-name),
html:lang(ko) :is(h2, button, .tab, .float, .note-body b, #hud-money, .ph-banner b, .pz-name, .sl-name, .ph-name),
html:lang(zh) :is(h2, button, .tab, .float, .note-body b, #hud-money, .ph-banner b, .pz-name, .sl-name, .ph-name) { font-weight: 800; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
img { -webkit-user-drag: none; }

/* Escala da interface (src/scale.js): --k = 1 no celular e na janela padrão do
   portal; em tela cheia/grande o #app é montado em px lógicos e ampliado.
   --vw/--vh: vw/vh do tamanho lógico (use no lugar de vw/vh dentro do #app). */
:root { --k: 1; --vw: calc(1vw / var(--k)); --vh: calc(1vh / var(--k)); }
html.scaled #app { width: calc(100% / var(--k)); height: calc(100% / var(--k)); transform: scale(var(--k)); transform-origin: 50% 0; }

html, body {
  height: 100%; overflow: hidden; background: var(--cab-ddd);
  font-family: var(--body); color: var(--ink);
  user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;
  -webkit-touch-callout: none; touch-action: manipulation;
}
/* Só a página (tela de verdade): o #app tem largura e overflow próprios logo abaixo. */
html, body { max-width: 100vw; overflow-x: hidden; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

#app {
  position: relative; height: 100%; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; overflow: hidden; background: var(--cab-dd);
  box-shadow: 0 0 0 4px var(--ink-line);
}
#stage { position: relative; flex: 1; min-height: 0; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; touch-action: none; }
#fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
#vignette {
  position: absolute; inset: 0; pointer-events: none; --n: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 48%, transparent 60%, rgba(16, 8, 38, calc(.24 + var(--n) * .3)) 100%);
}
.glyph { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; flex: none; }

/* Contorno de texto (o mesmo do logo: sombra dura em 8 direções). */
#hud-money, .card .price, .tab-prizes.on, .menu-box button, .float, #magpie-alert span, .pz-play, .sl-up,
.ph-name, .ph-banner b, .pb-txt, .ph-n, .prize-btn .badge, .mbtn, .bank-pop, #goal-text, .tlabel.low, .pi-box h2,
.result-box.lose h2, .pz-name, .tk-pull, .ph-banner span, .pb-n {
  --o: var(--ink-line);
  text-shadow: 0 2px 0 var(--o), 2px 0 0 var(--o), -2px 0 0 var(--o), 0 -2px 0 var(--o), 2px 2px 0 var(--o), -2px 2px 0 var(--o), 2px -2px 0 var(--o), -2px -2px 0 var(--o), 0 3px 0 var(--o);
}

/* Letreiro de lâmpadas que piscam em fila (borda da loja, avisos dourados). */
@keyframes chase { to { background-position: 24px 50%, 36px 50%, 0 0; } }
@keyframes chaseY { to { background-position: 50% 24px, 50% 36px, 0 0; } }

/* ── HUD ─────────────────────────────────────────── */
#hud {
  position: absolute; z-index: 4;   /* acima da linha do prêmio: a plaquinha "PUXE!" do tanque pendura por cima */
  top: calc(8px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r));
  display: flex; gap: 7px; align-items: center; pointer-events: none;
}
.bank {
  position: relative; flex: 1; min-width: 0; max-width: 390px; height: 46px; padding: 0 9px 0 11px;
  display: flex; align-items: center; gap: 7px; border-radius: var(--r2); white-space: nowrap; container-type: inline-size;
  background: var(--cab); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), var(--trim);
}
.bank-chutes {
  position: relative; flex: none; display: flex; align-items: center; height: 28px; padding: 0 9px 0 31px;
  border-radius: var(--r1); background: var(--cab-ddd); color: var(--cream);
  font-family: var(--display); font-size: 17px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .4);
}
.chip-ico { position: absolute; left: -7px; top: 50%; width: 38px; height: 38px; transform: translateY(-55%); }
.chip-emo { position: absolute; left: -2px; top: 50%; width: 30px; height: 30px; transform: translateY(-52%); display: flex; }
.chip-emo .glyph { width: 100%; height: 100%; }
.bank-sep { flex: none; width: 3px; height: 26px; border-radius: 2px; background: var(--cab-d); box-shadow: 1px 0 0 var(--cab-hi); }
.bank-money { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.bank-money.bump { animation: bankBump .2s ease-out; }
@keyframes bankBump { 40% { transform: scale(1.06); } }
.coin-ico, .coin {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: normal; color: var(--gold-d);
  background: var(--gold); border: 2px solid var(--ink-line);
  box-shadow: inset 0 -3px 0 #d39a1c, inset 0 2px 0 #ffe9a0;
}
.bank-money .coin-ico { width: 27px; height: 27px; font-size: 15px; flex: none; }
.bank-money .coin-ico.ping { animation: coinPing .26s ease-out; }
@keyframes coinPing { 35% { transform: scale(1.22); } }
#hud-money { font-family: var(--display); font-size: clamp(15px, 7.8cqw, 23px); color: var(--cream); letter-spacing: .3px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
#hud-money.l6 { font-size: clamp(14px, 6.8cqw, 20px); }
#hud-money.l8 { font-size: clamp(12px, 5.8cqw, 17px); }
.bank-stats { flex: none; display: flex; flex-direction: column; gap: 2px; }
.bank-stats span {
  display: block; padding: 1px 6px; border-radius: 4px; text-align: center; background: var(--cab-ddd);
  font-family: var(--display); font-size: 11px; line-height: 14px; letter-spacing: .3px; font-variant-numeric: tabular-nums;
}
#hud-rate { color: var(--green-l); }
#hud-time { color: var(--paper-2); }
/* Placa estreita (painel da loja no celular deitado, celular pequeno): o dinheiro ficava cortado
   ("5.0…"). Sem o divisor e com os lados mais justos, sobra lugar pro número. */
@container (max-width: 260px) {
  .bank-sep { display: none; }
  .bank-chutes { padding: 0 6px 0 28px; font-size: 15px; }
  .chip-ico { left: -6px; width: 34px; height: 34px; }
  .bank-money { gap: 4px; }
  .bank-money .coin-ico { width: 23px; height: 23px; font-size: 13px; }
  .bank-stats span { padding: 1px 4px; font-size: 10px; }
}
#hud-time::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; vertical-align: -1px;
  border: 1.5px solid currentColor; border-radius: 50%;
  background: linear-gradient(currentColor, currentColor) 50% 15% / 1.5px 45% no-repeat, linear-gradient(currentColor, currentColor) 70% 55% / 40% 1.5px no-repeat;
}
.hud-btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%; pointer-events: auto; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; color: var(--chrome-hi);
  background: var(--cab); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), var(--trim);
}
.hud-btn svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 var(--ink-line)); }
.hud-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-line), var(--trim); }

/* Tanque de fichas: vidrinho com a pilha de moedas subindo; acima do risco = transbordando (115%). */
.tank {
  position: relative; flex: none; width: 36px; height: 46px; border-radius: var(--r2);
  background: var(--cab); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), var(--trim);
}
.tk-glass {
  position: absolute; left: 6px; right: 6px; top: 6px; bottom: 7px; overflow: hidden; border-radius: 4px;
  background: #120a2e; box-shadow: 0 0 0 2px var(--ink-line);
}
.tk-glass::after { content: ""; position: absolute; left: 3px; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.tk-fill {
  position: absolute; inset: 0; clip-path: inset(13% 0 0 0);
  background: repeating-linear-gradient(0deg, var(--gold) 0 3px, var(--gold-d) 3px 4px);
  transition: clip-path .25s ease-out;
}
.tk-mark { position: absolute; left: 0; right: 0; top: 13%; height: 2px; margin-top: -1px; background: var(--chrome-hi); opacity: .55; }
.tank.over .tk-fill { background: repeating-linear-gradient(0deg, var(--gold-l) 0 3px, var(--gold) 3px 4px); }
.tank.over .tk-glass { box-shadow: 0 0 0 2px var(--ink-line), inset 0 0 0 2px var(--gold-l); }
.tank.low .tk-fill { background: repeating-linear-gradient(0deg, var(--hot) 0 3px, var(--hot-d) 3px 4px); animation: lowBlink .5s steps(2) infinite; }
@keyframes lowBlink { 50% { opacity: .35; } }
.tank.empty { background: var(--red); box-shadow: 0 4px 0 var(--ink-line), inset 0 0 0 2px var(--red-d), inset 0 3px 0 1px var(--red-l); animation: tankPulse .7s ease-in-out infinite; }
@keyframes tankPulse { 50% { transform: scale(1.1); } }
.tk-pull {
  display: none; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); z-index: 2;
  width: max-content; padding: 1px 8px 3px; border-radius: var(--r1);
  font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .5px; color: #fff;
  background: var(--red); border: 2.5px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
}
.tk-pull::before { content: ""; position: absolute; left: 50%; top: -8px; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--ink-line); border-top: 0; }
.tank.empty .tk-pull { display: block; animation: pullBob .7s ease-in-out infinite; }
@keyframes pullBob { 50% { margin-top: 3px; } }

/* ── Máquina de prêmios: botão com anel de progresso + barra até o próximo prêmio ── */
#goal {
  position: absolute; z-index: 3; top: calc(64px + var(--safe-t)); left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r));
  max-width: 420px; height: 40px; display: flex; align-items: center; pointer-events: none;
}
.prize-btn {
  position: relative; z-index: 1; flex: none; width: 46px; height: 46px; border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; pointer-events: auto;
  background: conic-gradient(var(--magenta) calc(var(--p, 0) * 1%), var(--cab-ddd) 0);
  border: 3px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
}
.prize-btn .prize-in {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--gold); background: var(--cab-d); box-shadow: 0 0 0 2.5px var(--ink-line);
}
.prize-btn .prize-in img { width: 31px; height: 31px; }
.prize-btn .badge {
  display: none; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red); color: #fff; font-family: var(--display); font-size: 13px; line-height: 15px; text-align: center;
  border: 2.5px solid var(--ink-line);
}
.prize-btn:active { transform: translateY(2px); }
.goal-track {
  position: relative; flex: 1; height: 26px; margin-left: -12px; border-radius: 0 var(--r1) var(--r1) 0; overflow: hidden;
  background: var(--cab-ddd); border: 3px solid var(--ink-line); border-left: 0; pointer-events: auto; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink-line), inset 0 3px 0 rgba(0, 0, 0, .3);
}
#goal-bar {
  height: 100%; width: 0; transition: width .4s;
  background: repeating-linear-gradient(-45deg, var(--magenta) 0 8px, #e62cb6 8px 16px);
  background-size: 22px 22px; animation: stripes 1.4s linear infinite;
  box-shadow: inset 0 -3px 0 var(--magenta-d);
}
@keyframes stripes { to { background-position: 22px 0; } }
#goal-text {
  position: absolute; inset: 0; padding: 0 6px 0 14px; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 12.5px; letter-spacing: .3px; color: var(--cream); white-space: nowrap; overflow: hidden;
  --o: var(--ink-line);
  text-shadow: 0 1px 0 var(--o), 1px 0 0 var(--o), -1px 0 0 var(--o), 0 -1px 0 var(--o), 0 2px 0 var(--o);
}
#goal.ready .prize-btn { background: var(--gold); animation: prizePulse .9s ease-in-out infinite; }
#goal.ready .prize-btn .badge { display: block; }
#goal.ready #goal-bar { background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, #e2a21f 8px 16px); background-size: 22px 22px; box-shadow: inset 0 -3px 0 var(--gold-d); }
#goal.ready #goal-text { font-size: 14px; }
@keyframes prizePulse { 50% { transform: scale(1.1); } }

/* ── Avisos ───────────────────────────────────────── */
#notes {
  position: absolute; left: 50%; top: calc(112px + var(--safe-t)); transform: translateX(-50%); z-index: 5;
  width: min(320px, calc(100% - 28px)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.note {
  --c1: var(--cab);
  position: relative; display: flex; align-items: center; gap: 10px; max-width: 100%; min-height: 52px;
  padding: 7px 14px 10px 7px; border-radius: var(--r2); overflow: hidden; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 #fffaf0;
  animation: noteIn .38s cubic-bezier(.2, 1.5, .4, 1) both;
}
.note.bump { animation: noteBump .25s ease-out; }
.note.out { animation: noteOut .25s ease-in forwards; }
@keyframes noteIn { from { opacity: 0; transform: translateY(-14px) scale(.88); } }
@keyframes noteBump { 40% { transform: scale(1.05); } }
@keyframes noteOut { to { opacity: 0; transform: translateY(-10px) scale(.92); } }
.note-ico {
  flex: none; width: 38px; height: 38px; border-radius: var(--r2); display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: var(--c1); border: 2.5px solid var(--ink-line); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22);
}
.note-ico img { width: 34px; height: 34px; }
.note-ico .glyph { width: 30px; height: 30px; }
.note-ico .coin-ico { width: 26px; height: 26px; font-size: 14px; }
.note-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.note-body b { font-family: var(--display); font-weight: 400; font-size: 16px; letter-spacing: .2px; color: var(--ink); overflow-wrap: anywhere; }
.note-body span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; overflow-wrap: anywhere; }
.note-time { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 3px; border-radius: 2px; background: var(--ink-line); opacity: .18; transform-origin: left; }
@keyframes noteTime { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.note-good { --c1: var(--green); }
.note-bad { --c1: var(--red); }
.note-warn { --c1: var(--hot); }
.note-magpie, .note-rival { --c1: var(--red); }
.note-prize { --c1: var(--magenta); }
.note-gold { --c1: var(--gold); padding-left: 17px; }
.note-gold::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; border-right: 2px solid var(--ink-line);
  background: var(--bulb) 50% 0 / 10px 24px repeat-y, var(--bulb-off) 50% 12px / 10px 24px repeat-y, var(--cab-ddd);
  animation: chaseY 1.1s steps(2) infinite;
}

/* ── Moedinhas e "+$" da placa ───────────────────── */
#coinfx { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.coin { position: absolute; left: 0; top: 0; width: 16px; height: 16px; font-size: 10px; border-width: 1.5px; transform: translate(-50%, -50%) scale(0); pointer-events: none; will-change: transform; }
.coin-s { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; background: var(--gold); border: 1.5px solid var(--ink-line); box-shadow: inset 0 -2px 0 #d39a1c; }
.bank-pop { position: absolute; z-index: 1; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; font-family: var(--display); font-size: 20px; color: var(--gold-l); }

/* ── Textos flutuantes e rótulos no mundo ────────── */
.float { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font-family: var(--display); font-size: 19px; letter-spacing: .3px; color: #ffd76a; animation: rise 1.05s ease-out forwards; }
.float.gain { font-size: 16px; }
.float.gain.silver, .float.gain.crit { font-size: 19px; color: #e8eef5; }
.float.gain.gold { font-size: 23px; color: var(--gold); }
.float.gain.big { font-size: 25px; color: var(--gold-l); }
.float.mult { font-size: 15px; color: var(--cyan-l); }
.float.cost { font-size: 17px; color: var(--red-l); }
.float.perfect { font-size: 30px; color: var(--green-l); animation: risePerfect 1.3s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.float.cascade { font-size: 32px; color: var(--magenta-l); letter-spacing: 1px; animation: risePerfect 1.4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.float.golden { font-size: 17px; color: var(--gold); }
.float.hint { font-size: 17px; color: var(--cream); }
.float.name {
  font-family: var(--body); font-weight: 700; color: var(--ink); font-size: 14px; text-shadow: none; animation-duration: 1.9s;
  background: var(--paper); padding: 2px 9px; border-radius: var(--r1); border: 2.5px solid var(--ink-line); box-shadow: 0 2px 0 var(--ink-line);
}
.float.mini { font-size: 12.5px; animation: riseMini .75s ease-out forwards; }
@keyframes rise {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(.4); }
  14% { opacity: 1; transform: translate(-50%, -100%) scale(1.22); }
  28% { transform: translate(-50%, -100%) scale(1); margin-top: 0; }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(1); margin-top: -44px; }
}
@keyframes risePerfect {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(.3) rotate(-8deg); }
  18% { opacity: 1; transform: translate(-50%, -100%) scale(1.25) rotate(3deg); }
  32% { transform: translate(-50%, -100%) scale(1) rotate(-2deg); margin-top: 0; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(1.05); margin-top: -50px; }
}
@keyframes riseMini {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(.5); }
  20% { opacity: 1; transform: translate(-50%, -100%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(1); margin-top: -22px; }
}
.tlabel {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap;
  background: var(--cab-ddd); color: var(--cream); border-radius: var(--r1); border: 2.5px solid var(--ink-line);
  font-family: var(--display); font-size: 12.5px; letter-spacing: .3px; padding: 2px 9px; font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 0 var(--ink-line);
}
.tlabel.low { background: var(--gold); color: var(--cream); animation: tagPulse 1s ease-in-out infinite; }
@keyframes tagPulse { 50% { scale: 1.06; } }
.tlabel.hint {
  background: var(--paper); color: var(--ink); font-size: 14px; padding: 5px 11px; border-radius: var(--r2);
  animation: bob 1.2s ease-in-out infinite;
}
.tlabel.hint::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--ink-line); border-bottom: 0; }
@keyframes bob { 50% { margin-top: -6px; } }
.tlabel.mval { font-size: 11.5px; padding: 1px 6px; }

/* ── Medidor da alavanca: tubo vertical com a faixa verde (perfeito) ── */
#lever-gauge {
  position: absolute; left: 0; top: 0; z-index: 2; width: 30px; height: 132px; pointer-events: none;
  opacity: 0; transition: opacity .12s; will-change: transform;
}
#lever-gauge.on { opacity: 1; }
.lg-track {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--r2);
  background: repeating-linear-gradient(0deg, transparent 0 calc(10% - 2px), rgba(255, 255, 255, .16) calc(10% - 2px) 10%), #120a2e;
  border: 3px solid var(--ink-line); box-shadow: 0 4px 0 var(--ink-line), inset 0 0 0 2px var(--chrome-d);
}
.lg-fill {
  position: absolute; left: 4px; right: 4px; bottom: 4px; top: 4px; border-radius: 4px; transform-origin: 50% 100%; transform: scaleY(0);
  background: var(--gold); box-shadow: inset 3px 0 0 var(--gold-l), inset -3px 0 0 var(--gold-d);
}
.lg-zone {
  position: absolute; left: 2px; right: 2px; z-index: 1; border-radius: 3px;
  background: rgba(76, 179, 72, .45); border-top: 3px solid var(--green-l); border-bottom: 3px solid var(--green-l);
  box-shadow: 0 -2px 0 var(--ink-line), 0 2px 0 var(--ink-line);
}
#lever-gauge.hot .lg-fill { background: var(--green-l); box-shadow: inset 3px 0 0 #d6ffc6, inset -3px 0 0 var(--green); }
#lever-gauge.hot .lg-zone { background: rgba(149, 224, 124, .6); animation: zoneHot .3s steps(2) infinite; }
@keyframes zoneHot { 50% { border-color: #fff; } }
#lever-gauge.over .lg-fill { background: var(--red-l); box-shadow: inset 3px 0 0 #ffd0d6, inset -3px 0 0 var(--red); }
#lever-gauge.perfect .lg-track { box-shadow: 0 4px 0 var(--ink-line), inset 0 0 0 2px var(--green-l); }

/* ── Loja: carpete do fliperama com letreiro de lâmpadas na borda ── */
#shop {
  position: relative; height: 272px; flex: none; z-index: 2; display: flex; flex-direction: column; padding-bottom: var(--safe-b);
  background: var(--carpet) 0 0 / 72px 72px, var(--cab-dd);
  border-top: 4px solid var(--ink-line);
}
/* A aba Prêmios é mais alta: a loja sobe com uma molinha em vez de pular. */
/* Sem redimensionar o canvas (o WebGL piscaria): a loja cresce por cima da máquina. A margem
   negativa devolve a altura extra ao palco, que fica com o mesmo tamanho o tempo todo. */
#shop { transition: height .38s cubic-bezier(.2, .9, .3, 1.12), margin-top .38s cubic-bezier(.2, .9, .3, 1.12); }
#prize-list.enter > .pz-card { animation: champIn .36s cubic-bezier(.2, .9, .3, 1.25) both; }
#prize-list.enter .tools-head { animation: champIn .4s cubic-bezier(.2, .9, .3, 1.2) .06s both; }
#prize-list.enter .slot { animation: slotIn .42s cubic-bezier(.2, .9, .3, 1.35) both; }
#prize-list.enter .slot:nth-child(2) { animation-delay: .08s; }
#prize-list.enter .slot:nth-child(3) { animation-delay: .14s; }
#prize-list.enter .slot:nth-child(4) { animation-delay: .2s; }
@keyframes champIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes slotIn { from { opacity: 0; transform: translateY(18px) scale(.82); } to { opacity: 1; transform: none; } }
#shop::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-bottom: 3px solid var(--ink-line);
  background: var(--bulb) 0 50% / 24px 10px repeat-x, var(--bulb-off) 12px 50% / 24px 10px repeat-x, var(--cab-ddd);
  animation: chase 1.1s steps(2) infinite;
}
#shop-top:empty { display: none; }
#shop-head { position: relative; height: 30px; flex: none; }
.tabs { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.tab {
  position: relative; min-width: 118px; height: 42px; padding: 0 18px 2px; border-radius: var(--r2); cursor: pointer;
  font-family: var(--display); font-size: 18px; letter-spacing: .5px; color: var(--cab-hi);
  background: var(--cab-d); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 rgba(255, 255, 255, .12);
  transition: transform .1s;
}
.tab.on { transform: translateY(-3px); }
.tab-machine.on { color: var(--ink-line); background: var(--bulbs-lr), var(--gold); box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 var(--gold-l), inset 0 -3px 0 var(--gold-d); }
.tab-prizes.on { color: #fff; background: var(--bulbs-lr), var(--magenta); box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 var(--magenta-l), inset 0 -3px 0 var(--magenta-d); }
.tab:active { transform: translateY(1px); }
.tab-dot { display: none; position: absolute; top: -7px; right: -7px; width: 17px; height: 17px; border-radius: 50%; background: var(--gold); border: 2.5px solid var(--ink-line); }
.tab.dot .tab-dot { display: block; }
.tab.alert .tab-dot { display: block; background: var(--red); animation: dotPulse .8s ease-in-out infinite; }
@keyframes dotPulse { 50% { transform: scale(1.3); } }

.shop-list {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: 106px;
  gap: 8px; padding: 4px 18px 12px 9px; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-width: none; scroll-snap-type: y proximity;
}
.shop-list::-webkit-scrollbar { display: none; }
.shop-list.dragging { scroll-snap-type: none; cursor: grabbing; }
/* Mouse: um clique da roda (100 px) é menos que meia fileira de cartas e o snap puxava de volta
   pra mesma fileira (a loja parecia travada). O snap fica só no toque. */
@media (hover: hover) and (pointer: fine) { .shop-list { scroll-snap-type: none; } }
#prize-list { grid-auto-rows: max-content; align-content: start; container-type: inline-size; }
#shop-scroll { position: absolute; right: 5px; width: 6px; border-radius: 3px; z-index: 2; background: var(--cab-ddd); pointer-events: none; }
#shop-scroll i { position: absolute; left: 0; right: 0; top: 0; border-radius: 3px; background: var(--chrome-d); }

/* Cartas: papel creme, faixa da categoria em cima, contorno de tinta. */
.card {
  --cat: var(--g-machine);
  position: relative; scroll-snap-align: start; min-height: 0; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 3px 5px 4px; border-radius: var(--r2); color: var(--ink);
  background: var(--paper); border: 2.5px solid var(--ink-line); border-top: 6px solid var(--cat);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 #fffaf0;
  transition: transform .08s, box-shadow .08s;
}
.card.g-coins { --cat: var(--g-coins); }
.card.g-room { --cat: var(--g-room); }
.card.g-prize { --cat: var(--g-prize); }
.shop-list:not(.dragging) .card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-line), inset 0 2px 0 #fffaf0; }
.ico-wrap { width: 46px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; }
.card .ico { width: 42px; height: 42px; }
.card .emo { font-size: 26px; line-height: 1; }
.card .name { font-weight: 700; font-size: 13px; color: var(--ink); text-align: center; line-height: 1.25; padding-bottom: 1px; margin-top: -2px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .desc { font-size: 10.5px; font-weight: 600; color: var(--ink-soft); text-align: center; line-height: 1.25; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .lvl {
  position: absolute; top: 3px; right: 4px; padding: 0 5px; border-radius: 4px; z-index: 1;
  font-family: var(--display); font-size: 10.5px; letter-spacing: .3px; color: var(--paper); background: var(--ink-line);
}
.card .lvl:empty { display: none; }
.card .price {
  align-self: stretch; margin-top: 2px; padding: 1px 0 3px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--display); font-size: 15px; letter-spacing: .3px; color: #fff;
  background: var(--green); border: 2.5px solid var(--ink-line);
  box-shadow: inset 0 -3px 0 var(--green-d), inset 0 2px 0 var(--green-l);
}
.card.cant .price { background: var(--cab-hi); box-shadow: inset 0 -3px 0 var(--cab), inset 0 2px 0 #a497d6; }
.card.cant .ico { filter: saturate(.55); }
.card.free .price { background: var(--hot); box-shadow: inset 0 -3px 0 var(--hot-d), inset 0 2px 0 var(--hot-l); }
.card.free .coin-s, .card.full .coin-s, .card.maxed .coin-s { display: none; }
.card.full .price, .card.maxed .price { background: var(--cab); box-shadow: inset 0 -3px 0 var(--cab-d); font-size: 13.5px; }
/* Etiqueta "novo": inteira dentro da carta (cabe em qualquer idioma), meio torta no canto do ícone. */
.card.new::after {
  content: attr(data-new); position: absolute; top: 9px; left: 5px; z-index: 2; max-width: calc(100% - 10px);
  padding: 1px 5px 2px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--display); font-size: 9.5px; letter-spacing: .4px; color: #fff; transform: rotate(-8deg); transform-origin: left center;
  background: var(--red); border: 1.5px solid var(--ink-line); box-shadow: 0 2px 0 var(--ink-line);
}
.card.flash { animation: flash .35s ease-out; }
@keyframes flash { 0% { transform: scale(.92); } 60% { transform: scale(1.05); } 100% { transform: none; } }
.card.shake, .slot.shake { animation: shakeX .3s; }
@keyframes shakeX { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.card.ready, .slot.ready { animation: ready .55s ease-out; }
@keyframes ready { 35% { transform: translateY(-4px) scale(1.03); } }

/* ═══ Cartas premium da loja (mesmo esquema do Spin-O-Matic, no acabamento de fliperama) ═══
   Ícone é o herói (disco iluminado); hierarquia: ícone → preço → nome → descrição.
   Faixa por grupo: máquina = gabinete azul com lâmpadas, moedas = esmalte dourado listrado,
   sala de contagem = chapa verde. Obra (compra única) = carta larga com carimbo "Construir".
   Sem dinheiro: a carta APAGA (papel acinzentado, ícone sem cor, preço fosco que enche até
   o preço com "faltam $X"); quando dá para comprar ela acende e o botão brilha. */
#shop-list { container-type: inline-size; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-auto-rows: max-content; grid-auto-flow: row dense; gap: 9px; padding-top: 6px; }
#shop-list .card {
  --band: var(--g-machine); --band-d: #1b6e9e; --band-ink: #fff; --seg-off: rgba(0, 0, 0, .3); --seg-on: #fff;
  --band-bg: var(--bulbs-lr), linear-gradient(180deg, rgba(255, 255, 255, .25), transparent 60%), var(--band);
  justify-content: flex-start; gap: 3px; padding: 0 0 8px; border: 3px solid var(--ink-line); border-top-width: 3px; border-radius: var(--r2);
  min-height: min-content;   /* carta com overflow:hidden não pode ser espremida pela grade */
  background: linear-gradient(180deg, #fffaf0 0, var(--paper) 35%, var(--paper) 100%);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 -4px 0 var(--paper-2);
  transition: transform .08s, box-shadow .08s, filter .25s;
}
#shop-list .card.g-coins { --band: var(--gold); --band-d: var(--gold-d); --band-ink: var(--ink-line); --seg-off: rgba(26, 18, 51, .22); --seg-on: var(--ink-line);
  --band-bg: repeating-linear-gradient(-45deg, rgba(26, 18, 51, .08) 0 5px, transparent 5px 10px), var(--band); }
#shop-list .card.g-room { --band: var(--green); --band-d: var(--green-d); --band-ink: #fff; --seg-off: rgba(0, 0, 0, .3); --seg-on: #fff;
  --band-bg: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%), var(--band); }
#shop-list:not(.dragging) .card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-line), inset 0 -4px 0 var(--paper-2); }
.card .band {
  align-self: stretch; flex: none; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 13px;
  background: var(--band-bg); color: var(--band-ink); border-bottom: 2.5px solid var(--ink-line);
  box-shadow: inset 0 -3px 0 var(--band-d), inset 0 2px 0 rgba(255, 255, 255, .3);
}
.card .gg { flex: none; width: 16px; height: 16px; display: flex; }
.card .gg svg { width: 100%; height: 100%; }
/* Selo de nível tom sobre tom: a cor da própria faixa, mais escura e meio transparente, com o texto
   da faixa; "Lv" e o teto ("/10") mais apagados que o número. */
#shop-list .card .lvl {
  position: static; margin-left: auto; flex: none; padding: 1px 7px 2px; border-radius: 999px; font-size: 12px; letter-spacing: .2px;
  color: var(--band-ink); background: color-mix(in srgb, var(--band-d) 70%, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .28);
}
#shop-list .card .lvl .lv { margin-right: 3px; font-size: .78em; opacity: .72; }
#shop-list .card .lvl .of { margin-left: 1px; font-size: .82em; opacity: .62; }
/* Ícone herói num disco iluminado */
#shop-list .ico-wrap { position: relative; width: 78px; height: 78px; margin: 4px auto 0; flex: none; }
#shop-list .ico-wrap::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #fffdf6 0 28%, color-mix(in srgb, var(--band) 30%, var(--paper)) 72%);
  border: 2.5px solid rgba(26, 18, 51, .18); box-shadow: inset 0 -5px 0 rgba(26, 18, 51, .08);
}
#shop-list .card .ico { position: relative; width: 76px; height: 76px; }
#shop-list .card .emo { position: relative; font-size: 40px; }
#shop-list .card .name, #shop-list .card .desc {
  max-width: 100%; text-align: center; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; white-space: normal; text-overflow: clip;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
#shop-list .card .name { flex: none; margin-top: 0; font-size: 14.5px; line-height: 1.12; padding: 0 6px 1px; }
#shop-list .card .desc { flex: none; font-size: 12.5px; line-height: 1.18; padding: 0 7px; }
/* Cirílico e CJK caem na fonte do sistema (Segoe UI, YaHei...), mais alta que a Fredoka: com a linha
   apertada o line-clamp cortava a perna do у/р/д na 2ª linha. Aqui a linha cabe a fonte inteira
   (padding extra não serve: no line-clamp ele mostraria o topo da 3ª linha escondida). */
html:is(:lang(ru), :lang(ja), :lang(ko), :lang(zh)) #shop-list .card :is(.name, .desc) { line-height: 1.3; }
/* Preço: botão gordo verde com brilho passando */
#shop-list .card .price {
  position: relative; overflow: hidden; margin: auto 8px 0; align-self: stretch; min-height: 42px; padding: 3px 4px 5px;
  flex-direction: column; gap: 1px; line-height: 1; font-size: 18px;
}
.pr-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; }
.pr-main .coin-s { width: 16px; height: 16px; }
.pr-need { display: none; position: relative; z-index: 1; font-family: var(--body); font-weight: 700; font-size: 12px; color: var(--cream); text-shadow: 0 1px 0 var(--ink-line); }
.pr-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0; transition: width .3s; }
#shop-list .card:not(.cant) .price::after {
  content: ""; position: absolute; z-index: 1; top: -20%; bottom: -20%; left: -45%; width: 32%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: glint 3.4s ease-in-out infinite;
}
@keyframes glint { 0%, 72% { left: -45%; } 100% { left: 135%; } }
/* Sem dinheiro: carta apagada (bem diferente da que dá para comprar) */
#shop-list .card.short { background: linear-gradient(180deg, #ece6d8 0, #ddd5c3 100%); box-shadow: 0 4px 0 var(--ink-line), inset 0 -4px 0 #c9bfa8; }
#shop-list .card.short .band { filter: saturate(.35) brightness(.85); }
#shop-list .card.short .ico-wrap { filter: grayscale(.75) brightness(.92); opacity: .8; }
#shop-list .card.short .name { color: #6d6578; }
#shop-list .card.short .desc { color: #948b9c; }
#shop-list .card.short .price {
  background: #5d5578; color: #cfc8de; text-shadow: none;
  box-shadow: inset 0 -3px 0 #403a58, inset 0 2px 0 #7a7296;
}
#shop-list .card.short .pr-fill { background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .2) 0 5px, rgba(255, 255, 255, .1) 5px 10px); }
#shop-list .card.short .pr-need { display: block; color: #e7e1f2; }
#shop-list .card.short .pr-main { font-size: 15px; }
#shop-list .card.short .coin-s { filter: grayscale(1) brightness(1.2); }
#shop-list .card.short.new::after { filter: saturate(.5); }
#shop-list .card.cant .ico { filter: none; }
/* Máquina lotada: cartão travado (cinza-roxo) */
#shop-list .card.full .price { background: var(--cab); color: var(--cab-hi); box-shadow: inset 0 -3px 0 var(--cab-d); font-size: 14px; }
/* No máximo: selo dourado, vai para o fim */
#shop-list .card.maxed { order: 1; }
#shop-list .card.maxed .price { background: var(--gold); color: var(--ink-line); text-shadow: none; box-shadow: inset 0 -3px 0 var(--gold-d), inset 0 2px 0 var(--gold-l), inset 0 0 0 3px rgba(255, 255, 255, .35); }
#shop-list .card.maxed .pr-main::before { content: "\2605"; font-size: 15px; }
/* Obra: carta larga com ícone grande e carimbo "Construir" */
.card .stamp { display: none; }
#shop-list .card.feature {
  grid-column: span 2; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto;
  column-gap: 4px; align-items: start; justify-items: start; text-align: left;
}
#shop-list .card.feature .band { grid-column: 1 / -1; justify-self: stretch; }
#shop-list .card.feature .ico-wrap { grid-column: 1; grid-row: 2 / -1; align-self: center; width: 100px; height: 100px; margin: 4px 0 0 4px; }
#shop-list .card.feature .ico-wrap::before { inset: 4px; background: radial-gradient(circle at 50% 42%, #fffef8 0 32%, color-mix(in srgb, var(--band) 42%, var(--paper)) 74%); border-color: rgba(26, 18, 51, .28); box-shadow: 0 0 0 4px color-mix(in srgb, var(--band) 30%, transparent), inset 0 -6px 0 rgba(26, 18, 51, .1); }
#shop-list .card.feature .ico { width: 96px; height: 96px; }
#shop-list .card.feature .stamp {
  display: inline-block; grid-column: 2; grid-row: 2; margin: 8px 7px 0; padding: 1px 8px 2px; border-radius: 4px; transform: rotate(-3deg);
  font-family: var(--display); font-size: 13px; letter-spacing: .5px; color: var(--red); border: 2.5px solid var(--red); background: rgba(255, 255, 255, .55);
}
#shop-list .card.feature .name { grid-column: 2; grid-row: 3; text-align: left; font-size: 16px; margin-top: 3px; }
#shop-list .card.feature .desc { grid-column: 2; grid-row: 4; text-align: left; }
#shop-list .card.feature .price { grid-column: 2; grid-row: 5; justify-self: stretch; margin: 6px 8px 0 7px; }
#shop-list .card.new::after { top: 33px; left: 6px; font-size: 11px; }
/* Compra: carimbo (scale) */
#shop-list .card.flash { animation: stampCard .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stampCard { 0% { transform: translateY(-6px) scale(1.04); } 40% { transform: translateY(3px) scale(.96, 1.02); } 100% { transform: none; } }
@container (max-width: 250px) {
  #shop-list .card.feature .ico-wrap { width: 96px; height: 96px; }
  #shop-list .card.feature .ico { width: 90px; height: 90px; }
}
@media (max-height: 520px) {
  #shop-list .ico-wrap { width: 72px; height: 72px; margin-top: 4px; }
  #shop-list .card .ico { width: 68px; height: 68px; }
  #shop-list .card.feature .ico-wrap { width: 92px; height: 92px; }
  #shop-list .card.feature .ico { width: 86px; height: 86px; }
}

/* ── Aba Prêmios: cartão do próximo prêmio ───────── */
.pz-card {
  --pc: var(--magenta);
  grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 10px; min-height: 106px;
  padding: 9px 12px 9px 10px; border-radius: var(--r2); overflow: hidden; color: var(--cream);
  background: var(--cab); border: 2.5px solid var(--ink-line); border-top: 6px solid var(--magenta);
  box-shadow: 0 4px 0 var(--ink-line), var(--trim);
}
.pz-face {
  position: relative; flex: none; width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cab-dd); border: 5px solid var(--pc); box-shadow: 0 0 0 2px var(--ink-line), 0 4px 0 1px var(--ink-line), inset 0 -5px 0 rgba(0, 0, 0, .3);
}
.pz-ico img { width: 62px; height: 62px; display: block; }
.pz-ico .emo { font-size: 34px; }
.pz-n { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: 4px; font-family: var(--display); font-size: 11.5px; color: var(--ink-line); background: var(--gold); border: 2px solid var(--ink-line); white-space: nowrap; }
.pz-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pz-kicker { font-size: 11px; font-weight: 700; color: var(--paper-2); }
.pz-name { font-family: var(--display); font-weight: 400; font-size: clamp(15px, calc(4.6 * var(--vw)), 18px); line-height: 1.05; letter-spacing: .3px; color: var(--cream); overflow-wrap: anywhere; }
.pz-flavor { font-size: 11.5px; font-weight: 600; color: var(--paper-2); line-height: 1.15; overflow-wrap: anywhere; }
.pz-recs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-top: 4px; }
.rec-lbl { flex-basis: 100%; font-size: 10.5px; font-weight: 700; line-height: 1.1; color: var(--chrome); }
.rec { display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px 1px 2px; border-radius: 4px; background: var(--cab-ddd); font-family: var(--display); font-size: 11.5px; line-height: 18px; color: var(--green-l); white-space: nowrap; }
.rec.behind { color: var(--red-l); }
.rec-ico { width: 18px; height: 18px; flex: none; }
.rec .emo { font-size: 12px; }
.pz-bar { position: relative; height: 20px; margin-top: 5px; border-radius: var(--r1); overflow: hidden; background: var(--cab-ddd); border: 2.5px solid var(--ink-line); }
.pz-bar i { display: block; height: 100%; width: 0; transition: width .4s; background: var(--magenta); box-shadow: inset 0 -3px 0 var(--magenta-d); }
.pz-bar span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 11px; letter-spacing: .3px; color: var(--cream); white-space: nowrap;
  text-shadow: 0 1px 0 var(--ink-line), 1px 0 0 var(--ink-line), -1px 0 0 var(--ink-line), 0 -1px 0 var(--ink-line);
}
.pz-perk { display: none; font-size: 11.5px; font-weight: 700; color: var(--gold); line-height: 1.15; margin-top: 3px; }
.pz-play {
  display: none; flex: none; min-width: 92px; min-height: 52px; padding: 0 12px 3px; border-radius: var(--r2); cursor: pointer;
  font-family: var(--display); font-size: 21px; letter-spacing: .5px; color: #fff;
  background: var(--magenta); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 -4px 0 var(--magenta-d), inset 0 2px 0 var(--magenta-l);
  animation: playPulse 1s ease-in-out infinite;
}
.pz-play:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-line), inset 0 -2px 0 var(--magenta-d); animation: none; }
.pz-card.ready { border-top-color: var(--ink-line); padding-top: 14px; }
.pz-card.ready::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-bottom: 2px solid var(--ink-line);
  background: var(--bulb) 0 50% / 24px 10px repeat-x, var(--bulb-off) 12px 50% / 24px 10px repeat-x, var(--cab-ddd);
  animation: chase 1.1s steps(2) infinite;
}
.pz-card.ready .pz-bar { display: none; }
.pz-card.ready .pz-perk, .pz-card.ready .pz-play { display: block; }
.pz-card.done { --pc: var(--gold); border-top-color: var(--gold); }
.pz-card.done .pz-bar, .pz-card.done .pz-perk, .pz-card.done .pz-recs, .pz-card.done .pz-flavor { display: none; }
@container (max-width: 340px) {
  .pz-card { flex-wrap: wrap; row-gap: 8px; }
  .pz-card .pz-face { width: 60px; height: 60px; }
  .pz-card .pz-ico img { width: 52px; height: 52px; }
  .pz-card.ready .pz-play { flex: 1 1 100%; min-height: 46px; }
}

/* ── Aba Prêmios: caixa de ferramentas (4 encaixes) ── */
.tools { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.tools-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; }
.tools-head b { font-family: var(--display); font-weight: 400; font-size: 17px; color: var(--paper); text-shadow: 0 2px 0 var(--ink-line); white-space: nowrap; }
.tools-head span { min-width: 0; font-size: 11.5px; font-weight: 600; color: var(--cab-hi); line-height: 1.15; }
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@container (max-width: 290px) { .tools-grid { grid-template-columns: 1fr; } }
.slot {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 5px 6px 6px;
  border-radius: var(--r2); background: var(--paper); border: 2.5px solid var(--ink-line); border-top: 5px solid var(--g-prize); box-shadow: 0 3px 0 var(--ink-line);
}
.sl-top { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sl-ico { flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.sl-ico .ico { width: 34px; height: 34px; }
.sl-ico .emo { font-size: 20px; }
.sl-name { min-width: 0; font-weight: 700; font-size: 12.5px; line-height: 1.05; color: var(--ink); overflow-wrap: anywhere; }
.sl-desc { font-size: 10.5px; font-weight: 600; line-height: 1.15; color: var(--ink-soft); overflow-wrap: anywhere; }
.sl-pips { display: flex; gap: 2px; }
.sl-pips i { flex: 1; max-width: 8px; height: 8px; border-radius: 2px; background: var(--paper-3); }
.sl-pips i:nth-child(4n):not(:last-child) { margin-right: 3px; }
.sl-pips i.on { background: var(--magenta); box-shadow: inset 0 -2px 0 var(--magenta-d); }
.sl-eff { display: flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 12.5px; line-height: 1; color: var(--ink); white-space: nowrap; }
.sl-eff .glyph { font-size: 10px; color: var(--ink-soft); }
.sl-nxt { color: var(--green-d); }
.slot.maxed .sl-eff .glyph, .slot.maxed .sl-nxt { display: none; }
.sl-up {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; margin-top: auto; padding: 0 4px 2px; border-radius: var(--r1); cursor: pointer;
  font-family: var(--display); font-size: 14px; color: #fff; background: var(--green); border: 2.5px solid var(--ink-line);
  box-shadow: inset 0 -3px 0 var(--green-d), inset 0 2px 0 var(--green-l), 0 2px 0 var(--ink-line);
}
.sl-up:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--green-d); }
.sl-price { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; }
.slot.cant .sl-up { background: var(--cab-hi); box-shadow: inset 0 -3px 0 var(--cab), inset 0 2px 0 #a497d6, 0 2px 0 var(--ink-line); }
.slot.maxed .sl-up { background: var(--cab); box-shadow: inset 0 -3px 0 var(--cab-d); cursor: default; }
.slot.maxed .sl-lbl, .slot.maxed .coin-s { display: none; }
.slot.forged { animation: stamp .45s cubic-bezier(.3, 1.5, .5, 1); }
.slot.forged::after { content: ""; position: absolute; inset: -3px; border-radius: var(--r2); background: #fff; pointer-events: none; animation: forgeFlash .4s ease-out forwards; }
@keyframes stamp { 0% { transform: translateY(-8px) scale(1.05); } 35% { transform: translateY(3px) scale(.96, 1.02); } 100% { transform: none; } }
@keyframes forgeFlash { from { opacity: .85; } to { opacity: 0; } }
.slot .spk {
  position: absolute; left: 50%; top: 40%; width: 8px; height: 8px; z-index: 2; pointer-events: none; border-radius: 50%; background: var(--gold);
  border: 1.5px solid var(--ink-line); animation: spk .6s ease-out forwards;
}
.slot .spk:nth-child(2n) { background: var(--magenta-l); }
@keyframes spk { to { translate: var(--dx) var(--dy); opacity: 0; scale: .4; } }

/* ── Tutorial: luva apontando ────────────────────── */
#hand { position: absolute; left: 0; top: 0; width: 0; z-index: 9; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
#hand .hand-bubble { left: 50%; margin-left: 0; translate: -50% 0; }
.hand-ico { width: 42px; height: 51px; margin-top: 2px; margin-left: 4px; transform-origin: 40% 0; animation: tapHand 1s ease-in-out infinite; }
.hand-ico .glyph { width: 100%; height: 100%; vertical-align: top; }
.hand-bubble {
  position: absolute; bottom: 100%; margin-bottom: 8px; width: max-content; max-width: min(290px, calc(84 * var(--vw))); text-align: center; line-height: 1.2; overflow-wrap: anywhere;
  background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 15.5px; letter-spacing: .2px;
  padding: 6px 12px; border-radius: var(--r2); border: 3px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
}
.hand-bubble:empty { display: none; }
#hand.swipe .hand-ico { animation: swipeHand 1.4s ease-in-out infinite; }
#hand.pull .hand-ico { animation: pullHand 1.6s ease-in-out infinite; }
#hand.drag .hand-ico { animation: dragHand 2.2s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes tapHand { 0%, 100% { transform: translateY(6px); } 50% { transform: translateY(16px) scale(.92); } }
@keyframes swipeHand { 0%, 100% { transform: translate(-36px, 10px) rotate(-12deg); } 50% { transform: translate(36px, 10px) rotate(12deg); } }
@keyframes pullHand { 0%, 15% { transform: translate(0, 10px) scale(.92); } 60% { transform: translate(0, 58px); } 70% { transform: translate(0, 4px); opacity: 1; } 85%, 100% { transform: translate(0, 4px); opacity: 0; } }
@keyframes dragHand {
  0%, 8% { transform: translate(0, 6px) scale(1); }
  14% { transform: translate(0, 10px) scale(.88); }
  40% { transform: translate(44px, 2px) scale(.88) rotate(10deg); }
  66% { transform: translate(-40px, 22px) scale(.88) rotate(-10deg); }
  86% { transform: translate(0, 10px) scale(.88); }
  94%, 100% { transform: translate(0, 6px) scale(1); }
}

/* ── Janelas: papel creme com placa de letreiro (lâmpadas) no topo ── */
#menu {
  position: absolute; inset: 0; z-index: 10; background: rgba(20, 11, 44, .68);
  display: flex; animation: fadeIn .2s; overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
  padding: calc(34px + var(--safe-t)) 12px calc(14px + var(--safe-b));
}
@keyframes fadeIn { from { opacity: 0; } }
.menu-box {
  position: relative; width: 272px; max-width: 100%; margin: auto; flex: none;
  background: var(--paper); border: 3px solid var(--ink-line); border-radius: var(--r3);
  padding: 32px 18px 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 6px 0 var(--ink-line), inset 0 3px 0 #fffaf0, inset 0 -4px 0 var(--paper-2);
  animation: popIn .3s cubic-bezier(.3, 1.6, .5, 1);
  isolation: isolate;   /* os brilhos atrás dos ícones (z-index -1) ficam acima do papel e abaixo do texto */
}
@keyframes popIn { from { transform: scale(.7); opacity: 0; } }
.modes-box { width: min(400px, 100%); }
.modes { display: flex; flex-direction: column; gap: 7px; max-height: min(calc(56 * var(--vh)), 460px); overflow-y: auto; padding: 2px 2px 6px; }
/* Cartões de modo são botões: tiram o visual de botão grande dos menus. */
.menu-box button.mode {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 0; padding: 7px 9px 7px 7px; text-align: left;
  font-family: inherit; font-size: inherit; letter-spacing: 0; color: var(--ink);
  border-radius: var(--r2); background: var(--paper-2); border: 2.5px solid transparent; box-shadow: none; text-shadow: none;
}
.menu-box button.mode.open { background: #fffaf0; border-color: var(--ink-line); box-shadow: 0 3px 0 var(--ink-line); }
.menu-box button.mode.open:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-line); }
.menu-box button.mode.on { background: #fffaf0; border-color: var(--ink-line); box-shadow: 0 3px 0 var(--ink-line), inset 0 0 0 2px var(--green); }
.menu-box button.mode.on:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-line), inset 0 0 0 2px var(--green); }
.menu-box button.mode.locked[disabled] { opacity: .82; }
.mode-ico { flex: none; width: 46px; height: 46px; border-radius: var(--r2); display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--cab) 35%, var(--paper-2)); }
.mode.on .mode-ico, .mode.open .mode-ico { background: var(--cab); border: 2px solid var(--ink-line); }
.mode.hard .mode-ico { background: var(--red); }
.mode-ico img { width: 42px; height: 42px; }
.mode-ico .glyph { width: 36px; height: 36px; }
.mode.locked .mode-ico img { filter: grayscale(.9); opacity: .65; }
.mode-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mode-name { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; font-family: var(--display); font-size: 16px; line-height: 1.1; color: var(--ink); }
.mode-desc { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.2; overflow-wrap: anywhere; }
.mode-rec { display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; margin-top: 2px; padding: 1px 6px 1px 3px; white-space: nowrap; border-radius: 4px; font-family: var(--display); font-size: 12px; color: var(--ink); background: var(--gold); border: 1.5px solid var(--ink-line); }
.mode-rec .glyph { width: 13px; height: 13px; }
.mode-tag { flex: none; display: flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 4px; font-family: var(--display); font-size: 12px; color: var(--paper); background: color-mix(in srgb, var(--cab) 70%, #000); }
.mode-tag svg { width: 12px; height: 12px; }
.mode.on .mode-tag { background: var(--green); border: 2px solid var(--ink-line); }
.mode.open .mode-tag { padding: 5px 10px; font-size: 13.5px; color: #fff; background: var(--hot); border: 2px solid var(--ink-line); box-shadow: 0 2px 0 var(--ink-line); text-shadow: 0 2px 0 var(--ink-line); }
/* Selo HARDCORE (cartões, título, regras, fim). */
.hard-tag { display: inline-block; padding: 1px 5px 2px; border-radius: 4px; font-family: var(--display); font-weight: 400; font-size: 10.5px; letter-spacing: .6px; line-height: 1.1; color: #fff; background: var(--red); border: 1.5px solid var(--ink-line); vertical-align: 2px; white-space: nowrap; }
.menu-box h2 {
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%); white-space: nowrap;
  padding: 5px 28px 7px; border-radius: var(--r1); font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .5px; color: var(--ink-line);
  background: var(--bulbs-lr), var(--gold); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 var(--gold-l), inset 0 -3px 0 var(--gold-d);
}
.menu-box h2 .globe { width: 24px; height: 24px; vertical-align: -6px; }
.menu-box p { color: var(--ink); font-size: 15.5px; font-weight: 500; text-align: center; line-height: 1.35; overflow-wrap: anywhere; }
.menu-box p.small { font-size: 12.5px; color: var(--ink-soft); }
.menu-box button {
  --o: var(--green-d); --bg: var(--green); --hi: var(--green-l); --lo: var(--green-d);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 7px 12px 9px; border-radius: var(--r2); cursor: pointer;
  font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: .3px; color: #fff;
  background: var(--bg); border: 3px solid var(--ink-line);
  box-shadow: 0 4px 0 var(--ink-line), inset 0 -4px 0 var(--lo), inset 0 2px 0 var(--hi);
}
.menu-box button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-line), inset 0 -2px 0 var(--lo); }
.menu-box button.alt { --o: var(--ink-line); --bg: var(--cab); --hi: var(--cab-hi); --lo: var(--cab-d); }
.menu-box button.danger { --o: var(--red-d); --bg: var(--red); --hi: var(--red-l); --lo: var(--red-d); }
/* Glifos dos botões de menu (pelo data-act; sobrevivem a troca do texto). */
.menu-box button:is([data-act="sound"], [data-act="music"], [data-act="lang"], [data-act="resume"], [data-act="ach"], [data-act="reset"], [data-act="back"], [data-act="options"])::before {
  content: ""; flex: none; width: 19px; height: 19px; background: currentColor; filter: drop-shadow(0 2px 0 var(--ink-line));
  -webkit-mask: var(--gi) center / contain no-repeat; mask: var(--gi) center / contain no-repeat;
}
.menu-box button[data-act="sound"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 9h4l6-5v16l-6-5H3z'/><path d='M16 8.5a5 5 0 0 1 0 7M18.8 5.5a9 9 0 0 1 0 13' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/></svg>"); }
.menu-box button[data-act="music"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 17V5l11-2v12' fill='none' stroke='black' stroke-width='2.6' stroke-linejoin='round'/><circle cx='6.5' cy='17.5' r='3.5'/><circle cx='17.5' cy='15.5' r='3.5'/></svg>"); }
.menu-box button[data-act="lang"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='none' stroke='black' stroke-width='2.3'><circle cx='12' cy='12' r='9.5'/><path d='M2.5 12h19M12 2.5c3.2 3 3.2 16 0 19M12 2.5c-3.2 3-3.2 16 0 19'/></g></svg>"); }
.menu-box button[data-act="resume"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 4.5v15l12-7.5z' stroke='black' stroke-width='2' stroke-linejoin='round'/></svg>"); }
.menu-box button[data-act="ach"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 3h10v4a5 5 0 0 1-10 0zM10 15h4v4h3v2H7v-2h3z'/><path d='M7 5H4a3 3 0 0 0 3 4M17 5h3a3 3 0 0 1-3 4' fill='none' stroke='black' stroke-width='2.2'/></svg>"); }
.menu-box button[data-act="reset"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13' fill='none' stroke='black' stroke-width='2.6' stroke-linejoin='round'/></svg>"); }
.menu-box button[data-act="back"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 12H6M11 6l-6 6 6 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
.menu-box button[data-act="options"] { --gi: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='7'/><path d='M12 1.5v4M12 18.5v4M1.5 12h4M18.5 12h4M4.6 4.6l2.8 2.8M16.6 16.6l2.8 2.8M4.6 19.4l2.8-2.8M16.6 7.4l2.8-2.8' stroke='black' stroke-width='3.2'/></svg>"); }
.menu-box.wide { width: min(92%, 400px); }
/* Listas que rolam com a roda do mouse: no fim da lista a rolagem para ali (não vaza pra página do portal). */
#menu, .menu-box, .modes, .lang-grid, .ach-grid { overscroll-behavior: contain; }
.big-money { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-size: 32px; color: var(--ink); }
.big-money .coin-s { width: 26px; height: 26px; }

/* Idioma */
.flag { display: inline-flex; width: 26px; height: 17px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 2px var(--ink-line); }
.flag svg { width: 100%; height: 100%; display: block; }
.lang-box { width: min(360px, calc(100% - 24px)); }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 6px; max-height: min(calc(52 * var(--vh)), 420px); overflow-y: auto; padding: 3px; }
.menu-box .lang-opt {
  --o: transparent; justify-content: flex-start; gap: 8px; margin: 0; padding: 8px 10px; min-height: 44px; text-align: left;
  font-family: var(--body); font-weight: 700; font-size: 14px; color: var(--ink); text-shadow: none;
  --bg: #fffaf0; --hi: #fff; --lo: var(--paper-2); border-width: 2.5px; box-shadow: 0 3px 0 var(--ink-line), inset 0 -3px 0 var(--lo);
}
.menu-box .lang-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-box .lang-opt.on { --bg: var(--cab); --lo: var(--cab-d); color: #fff; }

/* ── Conquistas ──────────────────────────────────── */
.ach-box { width: min(420px, 100%); }
.ach-head { display: flex; align-items: center; gap: 10px; }
.ach-head b { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--ink); line-height: 1; }
.ach-head small { font-size: 15px; color: var(--ink-soft); }
.ach-bar { flex: 1; height: 14px; border-radius: 4px; background: var(--paper-3); border: 2.5px solid var(--ink-line); overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: var(--gold); box-shadow: inset 0 -3px 0 var(--gold-d); }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: min(calc(54 * var(--vh)), 460px); overflow-y: auto; padding: 2px 2px 4px; }
.ach { display: flex; gap: 8px; align-items: center; padding: 6px 8px 6px 6px; border-radius: var(--r2); background: var(--paper-2); border: 2.5px solid transparent; min-width: 0; }
.ach.got { background: #fffaf0; border-color: var(--ink-line); box-shadow: 0 3px 0 var(--ink-line); }
.a-ico { position: relative; flex: none; width: 40px; height: 40px; border-radius: var(--r2); display: flex; align-items: center; justify-content: center; background: var(--cab-d); font-size: 20px; color: var(--paper-2); }
.ach.got .a-ico { background: var(--cab); border: 2px solid var(--ink-line); box-shadow: inset 0 0 0 2px var(--chrome-d); }
.a-ico img { width: 36px; height: 36px; }
.a-ico .coin-ico { width: 26px; height: 26px; font-size: 14px; }
.a-ico > .glyph { width: 22px; height: 22px; }
.ach.locked .a-ico img, .ach.locked .a-ico .coin-ico, .ach.locked .a-ico .emo { filter: grayscale(1) brightness(.85); opacity: .7; }
.a-ok { position: absolute; right: -6px; bottom: -6px; width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green); border: 2px solid var(--ink-line); color: #fff; font-size: 11px; }
.a-txt { min-width: 0; }
.a-name { font-family: var(--display); font-size: 13.5px; line-height: 1.1; color: var(--ink); overflow-wrap: anywhere; }
.a-desc { font-size: 11px; font-weight: 600; color: var(--ink-soft); line-height: 1.2; overflow-wrap: anywhere; }
.ach.locked .a-name { color: var(--ink-soft); }

/* ── Apresentação do prêmio (antes da rodada) ────── */
#menu.prize-bg { background: radial-gradient(ellipse 70% 55% at 50% 30%, rgba(255, 61, 206, .32), transparent 70%), rgba(20, 11, 44, .8); }
.pi-box { --pc: var(--magenta); width: min(370px, 100%); gap: 8px; padding-top: 30px; }
.pi-box h2 { color: #fff; background: var(--bulbs-lr), var(--magenta); box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 var(--magenta-l), inset 0 -3px 0 var(--magenta-d); }
.pi-kicker { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: -4px; }
.pi-show { position: relative; height: 108px; display: flex; align-items: center; justify-content: center; }
.pi-face {
  position: relative; width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cab-dd); border: 6px solid var(--pc); box-shadow: 0 0 0 3px var(--ink-line), 0 6px 0 2px var(--ink-line), inset 0 -6px 0 rgba(0, 0, 0, .3);
  animation: trophyIn .6s cubic-bezier(.3, 1.8, .5, 1) both;
}
.pi-face img { width: 86px; height: 86px; animation: trophyBob 2s .6s ease-in-out infinite; }
.pi-face .emo { font-size: 46px; }
.pi-show .res-rays { --ray: rgba(255, 61, 206, .42); }
.menu-box .pi-flavor { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.25; margin-top: -2px; }
.pi-tools { display: flex; flex-direction: column; gap: 5px; padding: 7px 8px 8px; border-radius: var(--r2); background: var(--paper-2); }
.pi-thead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.pi-thead b { grid-column: 2; min-width: 96px; font-weight: 700; color: var(--ink); }
.pi-stat { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.pi-lbl { display: flex; align-items: center; gap: 3px; justify-content: center; min-width: 96px; font-size: 11.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pi-pi { width: 20px; height: 20px; flex: none; }
.pi-lbl .emo { font-size: 13px; }
.pi-bar { position: relative; height: 16px; border-radius: 4px; background: var(--paper-3); overflow: hidden; border: 2px solid var(--ink-line); }
.pi-bar i { position: absolute; top: 0; bottom: 0; right: 0; background: var(--cyan); transition: width .6s .3s; }
.pi-bar.rec i { right: auto; left: 0; background: var(--magenta-l); }
.pi-bar span { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); font-family: var(--display); font-size: 10.5px; color: var(--ink-line); }
.pi-bar.rec span { left: auto; right: 6px; }
.pi-stat.up .pi-bar.me { box-shadow: 0 0 0 2px var(--green); }
.pi-stat.down .pi-bar.me { box-shadow: 0 0 0 2px var(--red); }
.menu-box .pi-rules { font-size: 13px; font-weight: 600; }
.menu-box .pi-reward { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--gold-d); }
.menu-box .pi-tip { font-size: 12.5px; font-weight: 700; color: #fff; background: var(--red); border-radius: var(--r1); padding: 4px 8px; border: 2px solid var(--ink-line); }
.menu-box button.play { --o: var(--magenta-d); --bg: var(--magenta); --hi: var(--magenta-l); --lo: var(--magenta-d); min-height: 56px; font-size: 27px; letter-spacing: 1px; animation: playPulse 1.1s .9s ease-in-out infinite; }

/* ── Resultado e fim ─────────────────────────────── */
.result-box { width: min(330px, 100%); align-items: stretch; text-align: center; padding-top: 34px; }
.result-box.lose h2 { color: #fff; background: var(--bulbs-lr), var(--cab); box-shadow: 0 4px 0 var(--ink-line), inset 0 2px 0 var(--cab-hi), inset 0 -3px 0 var(--cab-d); }
.res-burst { position: relative; height: 104px; display: flex; align-items: center; justify-content: center; margin-top: -4px; }
/* Raios atrás do ícone. A caixa (elipse parada) esmaece as pontas e quase não passa da faixa do
   ícone; o ::before gira dentro dela. z-index -1 com o isolation do .menu-box: fica sob o texto. */
.res-rays {
  --ray: rgba(244, 197, 66, .5);
  position: absolute; left: 50%; top: 50%; width: 250px; height: 150px; margin: -75px 0 0 -125px; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 50%, rgba(0, 0, 0, .45) 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 50%, rgba(0, 0, 0, .45) 72%, transparent 100%);
  animation: raysIn .8s ease-out both;
}
.res-rays::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  background: repeating-conic-gradient(var(--ray) 0 10deg, transparent 10deg 20deg);
  animation: rays 14s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes raysIn { from { opacity: 0; } }
.res-burst .res-ico { position: relative; width: 96px; height: 96px; animation: trophyIn .7s cubic-bezier(.3, 1.8, .5, 1) both, trophyBob 2s .7s ease-in-out infinite; }
.res-burst .emo.res-ico { font-size: 70px; width: auto; height: auto; line-height: 1; }
@keyframes trophyIn { from { transform: scale(0) rotate(-30deg); } }
@keyframes trophyBob { 50% { transform: translateY(-6px) rotate(3deg); } }
.res-face { display: flex; justify-content: center; }
.res-face .res-ico { width: 84px; height: 84px; filter: grayscale(.25); animation: wobble 1.6s ease-in-out infinite; }
.res-face .emo.res-ico { font-size: 56px; width: auto; height: auto; }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.menu-box .res-sub { font-family: var(--display); font-size: 17px; letter-spacing: .2px; }
.res-perk {
  align-self: center; display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 12px 5px 6px; border-radius: var(--r1);
  font-weight: 700; font-size: 13px; line-height: 1.2; color: #fff; background: var(--cab); border: 2.5px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line); overflow-wrap: anywhere;
}
.rp-ico { width: 26px; height: 26px; flex: none; }
.res-perk .coin-ico { width: 22px; height: 22px; font-size: 12px; }
#menu.res-win { background: rgba(20, 11, 44, .74); }
.end-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.end-stat { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: var(--r2); background: #fffaf0; border: 2.5px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line); min-width: 0; }
.es-ico { width: 32px; height: 32px; }
.end-stat .coin-ico { width: 26px; height: 26px; font-size: 14px; margin: 3px 0; }
.end-stat > .glyph { width: 26px; height: 26px; margin: 3px 0; color: var(--cab); }
.end-stat b { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--ink); white-space: nowrap; }
.end-stat small { font-size: 11px; font-weight: 700; color: var(--ink-soft); overflow-wrap: anywhere; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; border: 1.5px solid var(--ink-line); animation: confetti linear infinite; }
.confetti i.c { width: 13px; height: 13px; border-radius: 50%; }
@keyframes confetti { to { transform: translate(var(--x), calc(110 * var(--vh))) rotate(var(--r)); } }
#menu > .menu-box { z-index: 1; }

/* ── Pega ladra: faixa pulsando no topo + brilho nas bordas ── */
#magpie-alert {
  position: absolute; left: 50%; top: calc(110px + var(--safe-t)); z-index: 4; display: flex; align-items: center; gap: 6px;
  transform: translate(-50%, -12px) scale(.9); opacity: 0; pointer-events: none;
  width: max-content; max-width: calc(100% - 24px); padding: 4px 16px 6px 8px; border-radius: var(--r2); border: 3px solid var(--ink-line);
  background: var(--red); color: #fff; line-height: 1.2; font-family: var(--display); font-size: 16px; letter-spacing: .2px;
  box-shadow: 0 4px 0 var(--ink-line), inset 0 -3px 0 var(--red-d); transition: opacity .2s, transform .2s;
}
#magpie-alert::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: -12px; height: 8px; border-radius: 0 0 4px 4px;
  background: var(--bulb) 0 50% / 16px 8px repeat-x, var(--cab-ddd); border: 2px solid var(--ink-line); border-top: 0;
}
.ma-ico { width: 32px; height: 32px; flex: none; }
#magpie-alert.show { opacity: 1; transform: translate(-50%, 0) scale(1); animation: magpiePulse .8s ease-in-out infinite; }
@keyframes magpiePulse { 50% { transform: translate(-50%, 0) scale(1.05); } }
#stage.magpie-on #notes { top: calc(156px + var(--safe-t)); }
#magpie-edge { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; border: 6px solid var(--red); transition: opacity .4s; }
#magpie-edge.on { opacity: .55; }
#magpie-edge.flash { animation: magpieEdge .9s ease-out; }
@keyframes magpieEdge { 0%, 30% { opacity: 1; } 100% { opacity: .55; } }

/* ── Rodada de prêmio ────────────────────────────── */
body.in-prize #shop, body.in-prize #hud, body.in-prize #btn-menu, body.in-prize #goal, body.in-prize #magpie-alert,
body.in-prize #magpie-edge, body.in-prize #lever-gauge { display: none !important; }
body.in-prize #notes { top: calc(96px + var(--safe-t)); }
#prize-hud { position: absolute; inset: 0; z-index: 4; pointer-events: none; --pc: var(--magenta); }
.ph-top {
  position: absolute; top: calc(8px + var(--safe-t)); left: 50%; transform: translateX(-50%);
  width: min(460px, calc(100% - 16px - var(--safe-l) - var(--safe-r))); display: flex; align-items: center;
}
.ph-face {
  position: relative; z-index: 1; flex: none; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--cab-dd); border: 4px solid var(--pc); box-shadow: 0 0 0 2.5px var(--ink-line), 0 4px 0 1.5px var(--ink-line), inset 0 -4px 0 rgba(0, 0, 0, .3);
}
.ph-face img { width: 50px; height: 50px; }
.ph-face .emo { font-size: 28px; }
.ph-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; margin-left: -14px; }
/* padding/margin embaixo: a caixa cortava a perna do g/y/p (e do у/р/д no russo) com overflow: hidden e linha apertada. */
.ph-name { padding: 0 4px 4px 22px; margin-bottom: -4px; font-family: var(--display); font-size: clamp(13px, calc(4 * var(--vw)), 17px); line-height: 1.05; color: var(--cream); letter-spacing: .3px; white-space: nowrap; overflow: hidden; }
.ph-track {
  position: relative; height: 24px; border-radius: 0 var(--r1) var(--r1) 0; overflow: hidden;
  background: var(--cab-ddd); border: 3px solid var(--ink-line); border-left: 0; box-shadow: 0 3px 0 var(--ink-line);
}
/* Os últimos 14% são o "depois da borda" (zona listrada): o prêmio pendurado entra nela. */
.ph-cliff {
  position: absolute; top: 0; bottom: 0; right: 0; width: 14%; border-left: 3px solid var(--chrome-hi);
  background: repeating-linear-gradient(-45deg, rgba(226, 56, 79, .55) 0 5px, transparent 5px 10px);
}
.ph-edge {
  position: absolute; top: 0; bottom: 0; right: 0; width: 14%; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 10px; letter-spacing: .4px; color: var(--cream); white-space: nowrap; overflow: hidden;
  text-shadow: 0 1px 0 var(--ink-line), 1px 0 0 var(--ink-line), -1px 0 0 var(--ink-line), 0 -1px 0 var(--ink-line);
}
.ph-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: 0 50%; transform: scaleX(0); transition: transform .2s linear;
  background: var(--cyan); box-shadow: inset 0 -4px 0 var(--cyan-d);
}
.ph-track.hang { animation: hangGlow .45s steps(2) infinite; }
.ph-track.hang .ph-fill { background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--gold-l) 8px 16px); box-shadow: inset 0 -4px 0 var(--gold-d); }
@keyframes hangGlow { 50% { border-color: var(--gold-l); } }
.ph-coach {
  position: absolute; left: 50%; top: calc(80px + var(--safe-t)); transform: translateX(-50%); z-index: 2;
  width: max-content; max-width: calc(100% - 24px); padding: 7px 22px 9px; border-radius: var(--r1);
  background: var(--bulbs-lr), var(--gold); border: 3px solid var(--ink-line); box-shadow: 0 4px 0 var(--ink-line), inset 0 -3px 0 var(--gold-d);
  font-family: var(--display); font-size: 16px; letter-spacing: .2px; color: var(--ink-line); line-height: 1.15; text-align: center; overflow-wrap: anywhere;
}
.ph-coach.in { animation: coachIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, -16px) scale(.8); } }
.ph-bot {
  position: absolute; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(14px + var(--safe-b));
  max-width: 560px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.ph-tokens {
  min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px 10px 8px; border-radius: var(--r2);
  background: var(--cab); border: 3px solid var(--ink-line); box-shadow: 0 4px 0 var(--ink-line), var(--trim);
}
.ph-lbl { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-size: 12px; letter-spacing: .4px; color: var(--chrome); white-space: nowrap; }
.ph-n { font-size: 18px; color: var(--cream); }
.ph-row { display: flex; flex-wrap: wrap; gap: 3px; max-width: 225px; }
.ph-row:empty { display: none; }
/* Ficha pesada: moeda cromada com estrela */
.tok {
  position: relative; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--chrome); border: 2px solid var(--ink-line);
  box-shadow: inset 0 -2px 0 var(--chrome-d), inset 0 2px 0 #fff; transition: opacity .2s, transform .2s;
}
.tok::after {
  content: ""; position: absolute; inset: 3px; background: var(--chrome-d);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.tok.used { opacity: .28; transform: scale(.8); }
.ph-hint {
  position: absolute; left: 50%; bottom: calc(130px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 24px);
  padding: 6px 14px; border-radius: var(--r2); background: var(--cab-ddd); border: 2.5px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
  font-family: var(--display); font-size: 14px; letter-spacing: .2px; color: var(--cream); text-align: center; overflow-wrap: anywhere; animation: noteIn .35s both;
}
/* Botão de fliperama: domo vermelho com aro cromado */
.ph-bump {
  position: relative; flex: none; width: 98px; height: 98px; margin: 0 8px 8px 0; border-radius: 50%; cursor: pointer; pointer-events: auto; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--red); border: 4px solid var(--ink-line);
  box-shadow: 0 0 0 5px var(--chrome), 0 0 0 8px var(--ink-line), 0 8px 0 8px var(--ink-line), inset 0 -9px 0 var(--red-d), inset 0 5px 0 var(--red-l);
  transition: transform .06s;
}
.ph-bump::before { content: ""; position: absolute; left: 22%; top: 16%; width: 26%; height: 14%; border-radius: 50%; background: rgba(255, 255, 255, .55); transform: rotate(-25deg); }
.pb-txt { position: relative; max-width: 86px; font-family: var(--display); font-size: 22px; letter-spacing: .5px; color: #fff; white-space: nowrap; }
.pb-n {
  position: absolute; top: -12px; right: -14px; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 17px; color: #fff;
  background: var(--cab); border: 3px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
}
.ph-bump:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 5px var(--chrome), 0 0 0 8px var(--ink-line), 0 3px 0 8px var(--ink-line), inset 0 -5px 0 var(--red-d), inset 0 5px 0 var(--red-l); }
.ph-bump.hot { animation: bumpHot .5s ease-in-out infinite; }
@keyframes bumpHot { 50% { transform: scale(1.1); } }
.ph-bump:disabled { cursor: default; background: var(--cab-hi); box-shadow: 0 0 0 5px var(--chrome-d), 0 0 0 8px var(--ink-line), 0 8px 0 8px var(--ink-line), inset 0 -9px 0 var(--cab), inset 0 5px 0 #a497d6; }
.ph-bump:disabled .pb-n { background: var(--cab-d); color: var(--cab-hi); }
.ph-bump.pressed { animation: bumpPress .25s ease-out; }
@keyframes bumpPress { 30% { transform: translateY(5px) scale(.94); } }
.ph-banner { position: absolute; left: 50%; top: 40%; z-index: 4; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; width: max-content; max-width: calc(100 * var(--vw)); }
.ph-banner b {
  font-family: var(--display); font-weight: 400; font-size: clamp(40px, calc(13 * var(--vw)), 64px); letter-spacing: 1px; color: var(--cream); line-height: 1.1;
  text-shadow: 0 4px 0 var(--o), 4px 0 0 var(--o), -4px 0 0 var(--o), 0 -4px 0 var(--o), 3px 3px 0 var(--o), -3px 3px 0 var(--o), 3px -3px 0 var(--o), -3px -3px 0 var(--o), 0 8px 0 var(--o) !important;
}
.ph-banner span { margin-top: 6px; padding: 3px 14px 4px; border-radius: var(--r1); font-family: var(--display); font-size: 17px; color: #fff; background: var(--cab); border: 3px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line); }
.ph-banner.intro b { color: var(--magenta-l); }
.ph-banner.go b { color: var(--green-l); }
.ph-banner.hang b { color: var(--gold); }
.ph-banner.play { animation: bannerIn 1.5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes bannerIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.6); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(.92); }
  22% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}
/* Cinema (o prêmio caindo): faixas pretas entram, o HUD apaga. */
.ph-lb { position: absolute; left: 0; right: 0; height: 9%; z-index: 3; background: var(--ink-line); pointer-events: none; transition: transform .45s cubic-bezier(.3, .8, .3, 1); }
.ph-lb.top { top: 0; transform: translateY(-101%); }
.ph-lb.bot { bottom: 0; transform: translateY(101%); }
#prize-hud.cine .ph-lb { transform: none; }
#prize-hud .ph-top, #prize-hud .ph-bot, #prize-hud .ph-hint { transition: opacity .35s; }
#prize-hud.cine .ph-top, #prize-hud.cine .ph-bot, #prize-hud.cine .ph-hint { opacity: .2; }
#prize-hud.cine .ph-coach { display: none; }
body.in-prize #hand { z-index: 9; }

/* ── Tela inicial ────────────────────────────────── */
#splash {
  position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; overflow: hidden; overflow: clip; cursor: default;
  background: rgba(22, 12, 48, .76); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: opacity .45s .2s;
}
body.in-title #menu { z-index: 30; }
/* Título e carregamento (o <body> já começa com in-title): a loja espera fora da tela e o
   canvas cobre também o lugar dela, com a máquina no meio (render3d: tela cheia). HUD, meta,
   engrenagem, efeitos e vinheta (que é só do palco e faria uma emenda) somem até o JOGAR;
   aí a loja entra deslizando (ui._leaveMenu: animação no relógio que a máquina segue até o
   palco) e o resto aparece em seguida. */
body.in-title #shop { transform: translateY(calc(100% + 40px)); }   /* + as abas, que passam da borda */
body.in-title #hud, body.in-title #goal, body.in-title #btn-menu, body.in-title #fx, body.in-title #vignette { opacity: 0; transition: none; }
#hud, #goal, #stage > #btn-menu { transition: opacity .35s .5s; }
#vignette { transition: opacity .8s .5s; }
#fx { transition: opacity .4s .7s; }
/* Atrás do letreiro: a máquina do jogo (desfocada) e um facho de luz de cima, como num fliperama. */
.menu-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 46% at 50% 26%, rgba(255, 120, 220, .22), rgba(110, 70, 230, .1) 55%, transparent 75%); }
.splash-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; transform: translateY(-20px); transition: transform .45s cubic-bezier(.5, 0, .7, .4), opacity .35s; }
.logo { display: flex; flex-direction: column; align-items: center; }
.logo-title { font-family: var(--display); font-size: clamp(40px, calc(13.5 * var(--vw)), 62px); color: var(--cream); }
.logo-ribbon { margin-top: 2px; padding: 4px 20px 6px; font-family: var(--display); font-size: clamp(14px, calc(4.4 * var(--vw)), 19px); letter-spacing: 2px; color: #fff; background: var(--magenta); border: 3px solid var(--ink-line); border-radius: var(--r1); }
.logo-svg { display: block; width: min(calc(94 * var(--vw)), 500px); height: auto; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
/* Letreiro: cai e quica; depois as letras acendem uma a uma (falha de neon) e as lâmpadas correm. */
.logo-svg .logo-sign { transform-box: fill-box; transform-origin: 50% 0; animation: signIn .7s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes signIn { 0% { transform: translateY(-60px) rotate(-3deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.logo-svg .lt { animation: litOn .5s steps(1) both; animation-delay: calc(.45s + var(--d) * .07s); }
@keyframes litOn { 0% { opacity: .15; } 30% { opacity: 1; } 45% { opacity: .35; } 60%, 100% { opacity: 1; } }
.logo-svg .bulb { animation: bulbChase 1.05s steps(1) infinite; }
.logo-svg .bulb.b1 { animation-delay: -.35s; }
.logo-svg .bulb.b2 { animation-delay: -.7s; }
@keyframes bulbChase { 0% { opacity: 1; } 33.3% { opacity: .3; } }
.logo-svg .logo-coin { transform-box: fill-box; transform-origin: 50% 100%; animation: coinHop 3.2s 1.6s ease-in-out infinite; }
@keyframes coinHop { 0%, 72%, 100% { transform: none; } 80% { transform: translateY(-10px) rotate(-8deg); } 88% { transform: translateY(0) scale(1.06, .94); } 94% { transform: rotate(3deg); } }
.logo-svg .logo-glint { animation: glint 3.2s 1.2s ease-in-out infinite; }
@keyframes glint { 0%, 55% { transform: translateX(0); } 85%, 100% { transform: translateX(150px); } }
.logo-svg .logo-plate { transform-box: fill-box; transform-origin: 50% 0; animation: plateIn .6s .75s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes plateIn { 0% { transform: translateY(-16px) rotate(4deg); opacity: 0; } 100% { transform: none; } }
.menu-btns { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }
.mbtn { --line: var(--ink-line); --o: var(--ink-line); position: relative; overflow: hidden; cursor: pointer; color: #fff; font-family: var(--display); font-weight: 400; letter-spacing: .5px; border: 3px solid var(--line); }
.mbtn:active { transform: translateY(3px) scale(.97) !important; }
.mbtn-play {
  width: 294px; max-width: calc(100 * var(--vw) - 40px); padding: 9px 0 13px; font-size: 34px; border-radius: var(--r3);
  background: var(--hot); box-shadow: 0 6px 0 var(--ink-line), inset 0 -6px 0 var(--hot-d), inset 0 3px 0 var(--hot-l);
  animation: btnIn .55s 1.05s both cubic-bezier(.3, 1.6, .5, 1), playPulse 1.6s 1.8s ease-in-out infinite;
}
.mbtn-play span { position: relative; z-index: 2; }
@keyframes playPulse { 50% { transform: scale(1.05); } }
@keyframes btnIn { from { transform: translateY(34px) scale(.5); opacity: 0; } }
.mbtn-row { display: flex; gap: 12px; }
.mbtn-sq {
  width: 90px; height: 88px; border-radius: var(--r2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 14px; background: var(--bulbs-4), var(--cab); box-shadow: 0 5px 0 var(--ink-line), var(--trim);
  animation: btnIn .5s both cubic-bezier(.3, 1.6, .5, 1);
}
.mbtn-sq:nth-child(1) { animation-delay: 1.2s; }
.mbtn-sq:nth-child(2) { animation-delay: 1.28s; }
.mbtn-sq:nth-child(3) { animation-delay: 1.36s; }
.mbtn-sq b { font-weight: 400; position: relative; z-index: 1; max-width: 100%; padding: 0 4px; overflow-wrap: anywhere; line-height: 1.05; text-align: center; }
.mbtn-ico { position: relative; z-index: 1; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; color: var(--chrome-hi); transition: transform .2s; }
.mbtn-ico svg { width: 38px; height: 38px; filter: drop-shadow(0 3px 0 var(--ink-line)); }
.mbtn-ico img { width: 46px; height: 46px; }
.mbtn-sq:hover .mbtn-ico { transform: scale(1.1) rotate(-6deg); }
.menu-lang {
  position: absolute; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 14px; border-radius: var(--r2); cursor: pointer;
  font-family: var(--display); font-size: 14px; letter-spacing: .3px; color: var(--paper);
  background: var(--cab-ddd); border: 3px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
}
.menu-lang .flag { width: 22px; height: 15px; }
#splash.out { opacity: 0; pointer-events: none; }
#splash.out .splash-inner { transform: translateY(-70px) scale(.85); opacity: 0; }
#splash:not(.ready) .splash-inner, #splash:not(.ready) .menu-lang { display: none; }
#splash.ready .menu-loading { display: none; }
.menu-loading { position: absolute; left: 50%; top: 46%; width: 48px; height: 64px; margin-left: -24px; z-index: 3; }
/* Moeda do "carregando" só em CSS: aparece antes de qualquer JS. */
.ld-coin {
  position: absolute; left: 6px; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--ink-line); box-shadow: inset 0 -4px 0 var(--gold-d), inset 0 3px 0 var(--gold-l);
  animation: ldHop .7s ease-in-out infinite, ldFlip .7s linear infinite;
}
.ld-coin::after {
  content: ""; position: absolute; inset: 6px; background: #fff3c4;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.ld-shadow { position: absolute; left: 8px; bottom: 0; width: 32px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .35); animation: ldShadow .7s ease-in-out infinite; }
@keyframes ldHop { 0%, 100% { transform: translateY(20px) scale(1.08, .92); } 50% { transform: translateY(0); } }
@keyframes ldFlip { 50% { scale: .12 1; } }
@keyframes ldShadow { 50% { transform: scale(.6); opacity: .5; } }

/* Medidor de FPS (?fps na URL) */
#fps { position: fixed; left: 6px; bottom: 6px; z-index: 50; pointer-events: none; padding: 3px 7px; border-radius: 4px; background: rgba(0, 0, 0, .7); color: var(--green-l); font: 600 12px/1.2 ui-monospace, Menlo, Consolas, monospace; }

/* ── Retrato: a aba Prêmios cresce (cartão do prêmio + caixa de ferramentas) ── */
@media (max-aspect-ratio: 5/4) {
  #shop.prizes { height: clamp(272px, calc(54 * var(--vh)), 460px); margin-top: calc(272px - clamp(272px, calc(54 * var(--vh)), 460px)); }
}
/* ── Paisagem: máquina à esquerda, loja como painel lateral à direita com o HUD no topo ── */
@media (min-aspect-ratio: 5/4) {
  #app { max-width: none; flex-direction: row; }
  body.in-title #shop { transform: translateX(calc(100% + 40px)); }
  #shop { width: clamp(300px, calc(33 * var(--vw)), 430px); height: auto; padding-bottom: var(--safe-b); padding-right: var(--safe-r); border-top: 0; border-left: 4px solid var(--ink-line); }
  #shop::before {
    left: 0; right: auto; top: 0; bottom: 0; width: 12px; height: auto; border-bottom: 0; border-right: 3px solid var(--ink-line);
    background: var(--bulb) 50% 0 / 10px 24px repeat-y, var(--bulb-off) 50% 12px / 10px 24px repeat-y, var(--cab-ddd);
    animation-name: chaseY;
  }
  #shop-top { position: relative; z-index: 4; padding: calc(10px + var(--safe-t)) 10px 4px 20px; display: flex; flex-direction: column; gap: 8px; }
  #shop-top #hud { position: static; }
  #shop-top .bank { max-width: none; }
  #stage > #btn-menu { position: absolute; z-index: 3; top: calc(10px + var(--safe-t)); right: 10px; }
  #shop-top #goal { position: static; max-width: none; height: 40px; }
  #shop-head { height: 54px; }
  .tabs { top: 8px; left: 20px; right: 10px; transform: none; }
  .tab { min-width: 0; flex: 1; padding: 0 10px 2px; }
  .tab.on { transform: none; }
  .shop-list { padding-left: 20px; }
  #notes { top: calc(14px + var(--safe-t)); }
  #magpie-alert { top: calc(14px + var(--safe-t)); }
  #stage.magpie-on #notes { top: calc(62px + var(--safe-t)); }
  body.in-prize #notes { top: calc(88px + var(--safe-t)); }
  .logo-svg { width: min(calc(44 * var(--vw)), 600px); }
  .splash-inner { transform: translateY(-6px); }
  .ph-coach { top: calc(76px + var(--safe-t)); }
  .ph-hint { bottom: calc(24px + var(--safe-b)); }
}
@media (min-aspect-ratio: 5/4) and (max-height: 520px) {
  .logo-svg { width: 360px; }
  .menu-btns { gap: 10px; }
  .mbtn-sq { height: 72px; }
  .mbtn-ico { height: 34px; }
  .mbtn-ico img { width: 38px; height: 38px; }
  .ph-bump { width: 82px; height: 82px; }
  .pb-txt { font-size: 19px; max-width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .coin-flip, .twinkle, .logo-svg .bulb, .logo-svg .logo-coin, .logo-svg .logo-glint, #goal-bar, .res-rays, .res-rays::before, .offer-rays, #shop::before, .note-gold::before, .pz-card.ready::before { animation: none !important; }
}
/* Telas baixas (paisagem no celular): janelas mais compactas. */
@media (max-height: 560px) {
  #menu { padding-top: calc(28px + var(--safe-t)); padding-bottom: 8px; }
  .menu-box { gap: 7px; padding: 26px 14px 12px; }
  .menu-box button { min-height: 40px; padding: 5px 10px 7px; font-size: 17px; }
  .pi-box { width: min(440px, 100%); }
  .pi-kicker, .menu-box .pi-flavor { display: none; }
  .pi-show { height: 72px; }
  .pi-face { width: 66px; height: 66px; border-width: 4px; }
  .pi-face img { width: 58px; height: 58px; }
  .pi-tools { gap: 3px; padding: 5px 8px; }
  .pi-bar { height: 13px; }
  .menu-box button.play { min-height: 46px; font-size: 22px; }
  .res-burst { height: 76px; }
  .res-rays { transform: scale(.74); }
  .res-burst .res-ico { width: 70px; height: 70px; }
  .ach-grid { max-height: calc(48 * var(--vh)); }
}
/* Celular deitado (~390 px de altura): a apresentação do prêmio cabe sem rolar. */
@media (max-height: 420px) {
  .pi-box { gap: 5px; }
  .pi-show { height: 54px; }
  .pi-show .res-rays { display: none; }
  .pi-face { width: 52px; height: 52px; border-width: 4px; }
  .pi-face img { width: 46px; height: 46px; }
  .menu-box .pi-reward { display: none; }
  .menu-box .pi-rules { font-size: 12px; line-height: 1.2; }
  .pi-tools { gap: 2px; padding: 4px 8px; }
  .menu-box button.play { min-height: 42px; font-size: 21px; }
}
@media (max-width: 380px) {
  #hud { gap: 6px; }
  .bank { gap: 5px; padding: 0 7px 0 8px; }
  .bank-chutes { padding: 0 7px 0 29px; font-size: 15px; }
  .bank-stats span { padding: 1px 5px; font-size: 10px; }
  .tank { width: 32px; }
  .tk-glass { left: 5px; right: 5px; }
  .menu-box h2 { font-size: 20px; padding: 5px 22px 7px; }
  .tab { min-width: 104px; font-size: 16px; }
  .shop-list { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); }
  .pi-lbl { min-width: 84px; font-size: 11px; }
  .pi-thead b { min-width: 84px; }
  .ach-grid { grid-template-columns: 1fr; }
  .mbtn-sq { width: 84px; }
  .ph-face { width: 50px; height: 50px; }
  .ph-face img { width: 42px; height: 42px; }
  .ph-bump { width: 88px; height: 88px; }
  .pb-txt { font-size: 19px; max-width: 76px; }
}


/* ═══ Avisos tocáveis e compactos ════════════════════════════════════════
   Um toque/clique fecha o aviso (e a faixa da pega) na hora. O cartão é
   baixinho e estreito, pra não cobrir a máquina (no celular em pé, principalmente). */
#notes { width: min(280px, calc(100% - 28px)); gap: 6px; }
.note {
  pointer-events: auto; cursor: pointer; touch-action: manipulation;
  min-height: 0; gap: 8px; padding: 4px 12px 7px 4px; border-width: 2.5px;
  box-shadow: 0 3px 0 var(--ink-line), inset 0 2px 0 #fffaf0;
}
.note-gold { padding-left: 15px; }
.note-ico { width: 28px; height: 28px; font-size: 15px; border-width: 2px; }
.note-ico img { width: 24px; height: 24px; }
.note-ico .glyph { width: 22px; height: 22px; }
.note-ico .coin-ico { width: 19px; height: 19px; font-size: 10px; }
.note-body b { font-size: 14px; }
.note-body span { font-size: 11.5px; margin-top: 1px; }
.note-time { left: 10px; right: 10px; bottom: 3px; height: 2px; }
#magpie-alert.show { pointer-events: auto; cursor: pointer; }

/* ═══ Anúncios: 2× de renda, ofertas premiadas e selo de vídeo ════════════ */
/* Selo de vídeo dos anúncios premiados: plaquinha vermelha de "gravando". */
.tv-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 19px; padding-left: 1px; border-radius: var(--r1);
  background: var(--red); border: 2px solid var(--ink-line); box-shadow: 0 2px 0 var(--ink-line);
}
.tv-ico svg { width: 15px; height: 11px; fill: #fff; display: block; }

/* Botão 2× no fim da linha da máquina de prêmios: moeda dourada pulsando, com o selo de vídeo.
   Ativo: verde, com um anel que esvazia junto da contagem. */
#goal .hud-btn.boost { width: 42px; height: 42px; margin-left: 8px; }
.hud-btn.boost {
  position: relative; flex-direction: column; gap: 0; color: #fff; font-family: var(--display);
  background: var(--gold); box-shadow: 0 4px 0 var(--ink-line), inset 0 3px 0 var(--gold-l), inset 0 -4px 0 var(--gold-d);
  animation: prizePulse 1.2s ease-in-out infinite;
}
.hud-btn.boost b {
  position: relative; z-index: 1; font-size: 17px; line-height: 1; font-weight: 400;
  --o: var(--ink-line); text-shadow: 0 2px 0 var(--o), 1.5px 0 0 var(--o), -1.5px 0 0 var(--o), 0 -1.5px 0 var(--o);
}
.hud-btn.boost .tv-ico { position: absolute; z-index: 2; top: -8px; right: -7px; width: 21px; height: 16px; border-width: 1.5px; }
.hud-btn.boost .tv-ico svg { width: 12px; height: 9px; }
.hud-btn.boost .boost-ring, .hud-btn.boost .boost-time { display: none; }
.hud-btn.boost.on { animation: none; background: conic-gradient(var(--green) calc(var(--p, 100) * 1%), var(--cab-dd) 0); box-shadow: 0 4px 0 var(--ink-line); }
.hud-btn.boost.on .tv-ico { display: none; }
.hud-btn.boost.on .boost-ring { display: block; position: absolute; inset: 4px; border-radius: 50%; background: var(--green-d); border: 2px solid var(--ink-line); }
.hud-btn.boost.on b { font-size: 11px; }
.hud-btn.boost.on .boost-time { display: block; position: relative; z-index: 1; font-size: 9.5px; line-height: 1; font-variant-numeric: tabular-nums; }

/* Ofertas de anúncio premiado (2× e bem-vindo): faixa dourada em volta
   da janela e medalhão. Aceitar e recusar usam o mesmo botão (mesmo tamanho, fonte
   e cor, sem empurrar o anúncio); muda só o conteúdo (selo de vídeo, valor). */
.menu-box.offer-box { box-shadow: 0 6px 0 var(--ink-line), 0 0 0 4px var(--gold), 0 0 0 7px var(--ink-line), inset 0 3px 0 #fffaf0, inset 0 -4px 0 var(--paper-2); }
.offer-hero { position: relative; align-self: center; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; }
.offer-rays {
  position: absolute; inset: -22px; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(rgba(244, 197, 66, .55) 0 10deg, transparent 10deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%); mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  animation: rays 14s linear infinite;
}
.offer-hero b {
  position: relative; width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--gold); border: 3px solid var(--ink-line);
  box-shadow: 0 5px 0 var(--ink-line), inset 0 4px 0 var(--gold-l), inset 0 -6px 0 var(--gold-d);
  font-family: var(--display); font-weight: 400; font-size: 38px; color: #fff; animation: playPulse 1.4s ease-in-out infinite;
  --o: var(--ink-line); text-shadow: 0 3px 0 var(--o), 2px 0 0 var(--o), -2px 0 0 var(--o), 0 -2px 0 var(--o), 2px 2px 0 var(--o), -2px 2px 0 var(--o);
}
.offer-x2 { font-weight: 400; font-size: 22px; line-height: 1; }
.offer-amt { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; border-radius: 999px; background: rgba(20, 50, 12, .35); font-weight: 400; }
.offer-amt .coin-s { width: 17px; height: 17px; }
.menu-box button[disabled] { opacity: .5; cursor: default; transform: none; }

/* Desktop muito largo (ou janela baixa): o jogo para em 2:1 e sobra moldura dos
   lados (regra do Playgama). No celular deitado continua tela cheia. */
@media (min-aspect-ratio: 2/1) and (hover: hover) and (pointer: fine) {
  #app { max-width: calc(200 * var(--vh)); }
}

/* Caixa surpresa: a caixa no balão e o prêmio (moeda ou canaleta) no canto do medalhão. */
.crate-hero { width: 120px; height: 120px; }
.crate-hero img { position: relative; width: 104px; height: 104px; filter: drop-shadow(0 4px 0 rgba(20, 11, 44, .35)); animation: playPulse 1.6s ease-in-out infinite; }
.crate-hero .crate-prize { position: absolute; right: -6px; bottom: -4px; width: 56px; height: 56px; animation-delay: .3s; }
.crate-hero i.crate-prize { width: 40px; height: 40px; right: 2px; bottom: 6px; border-width: 3px; box-shadow: 0 3px 0 var(--ink-line), inset 0 -5px 0 #d39a1c; }
.offer-amt .amt-ico { width: 22px; height: 22px; margin: -3px 0; }

/* ── Modos: selo do modo (título e pausa), regras e fim ── */
.mode-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; }
.mc-ico { flex: none; width: 38px; height: 38px; border-radius: var(--r1); display: flex; align-items: center; justify-content: center; background: var(--cab); border: 2px solid var(--ink-line); }
.mode-chip.hard .mc-ico { background: var(--red); }
.mc-ico img { width: 34px; height: 34px; }
.mc-ico .glyph { width: 30px; height: 30px; }
.mc-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.mc-txt b { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1.1; }
.mc-txt small { font-size: 12px; font-weight: 700; line-height: 1.2; opacity: .85; overflow-wrap: anywhere; }
.menu-mode {
  font: inherit; max-width: min(320px, calc(100 * var(--vw) - 40px)); margin-top: 14px; padding: 5px 14px 5px 6px; border-radius: var(--r2); cursor: pointer;
  color: var(--paper); background: var(--cab-ddd); border: 3px solid var(--ink-line); box-shadow: 0 3px 0 var(--ink-line);
  animation: btnIn .5s .95s both cubic-bezier(.3, 1.6, .5, 1);
}
.menu-mode:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-line); }
.menu-mode .mc-txt small { color: var(--gold-l); opacity: 1; }
.menu-mode + .menu-btns { margin-top: 12px; }
.menu-box > .mode-chip { align-self: center; color: var(--ink); padding: 3px 12px 3px 4px; border-radius: var(--r2); background: var(--paper-2); }
.end-mode { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; font-family: var(--display); font-size: 18px; color: var(--cab); text-align: center; }
.end-recs { display: flex; justify-content: center; }
.end-rec { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 3px 10px 4px 7px; border-radius: var(--r1); font-family: var(--display); font-size: 15px; color: var(--ink); background: var(--paper-2); border: 2px solid var(--ink-line); }
.end-rec .glyph { width: 16px; height: 16px; }
.end-rec.new { color: #fff; background: var(--hot); box-shadow: 0 3px 0 var(--ink-line); animation: playPulse 1.2s ease-in-out infinite; }
.rules-box { width: min(340px, 100%); }
.rules-box.hard { box-shadow: 0 6px 0 var(--ink-line), 0 0 0 4px var(--red), 0 0 0 7px var(--ink-line), inset 0 3px 0 #fffaf0, inset 0 -4px 0 var(--paper-2); }
.rules-hero img { position: relative; width: 78px; height: 78px; animation: playPulse 1.6s ease-in-out infinite; }
.rules-hero .glyph { position: relative; width: 64px; height: 64px; }
.menu-box .rules-desc { font-family: var(--display); font-size: 15px; }
.rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.rules li { position: relative; padding: 5px 8px 5px 26px; border-radius: var(--r1); font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink); background: var(--paper-2); overflow-wrap: anywhere; }
.rules li::before { content: ""; position: absolute; left: 9px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--gold); border: 1.5px solid var(--ink-line); }
.rules-box.hard .rules li:nth-child(n+4)::before { background: var(--red); }
.tokens-hero { width: 110px; height: 110px; }
.tokens-hero .tk-prize { position: relative; width: 96px; height: 96px; animation: trophyBob 2s ease-in-out infinite; }
.tokens-hero .emo.tk-prize { font-size: 64px; width: auto; height: auto; }
/* Modo de recorde: o relógio do HUD em destaque (é ele que conta). */
body.ranked #hud-time { padding: 0 6px; border-radius: 4px; color: var(--ink-line); background: var(--gold); font-variant-numeric: tabular-nums; }
body.ranked.hard #hud-time { color: #fff; background: var(--red); }

/* ── Teste de 3 min (premiado): convite no cartão, contagem no cartão e no HUD ── */
#shop-list .card.trial .desc { display: flex; align-items: center; justify-content: center; gap: 4px; color: #2f8a3f; font-weight: 700; }
#shop-list .card.trial .desc .tv-ico { flex: none; width: 17px; height: 12px; border-radius: 3px; border-width: 1.5px; }
#shop-list .card.trial .desc .tv-ico svg { width: 10px; height: 7px; }
#shop-list .card.short.trial { box-shadow: 0 4px 0 var(--ink-line), inset 0 -4px 0 #c9bfa8, 0 0 0 3px var(--green); }
#shop-list .card.short.trial .ico-wrap { filter: none; opacity: 1; }
#shop-list .card.trialing { box-shadow: 0 4px 0 var(--ink-line), inset 0 -4px 0 #c9bfa8, 0 0 0 3px var(--green); }
#shop-list .card.trialing .desc { color: #2f8a3f; font-weight: 700; font-variant-numeric: tabular-nums; }
#shop-list .card.trialing .ico-wrap { filter: none; opacity: 1; }
#goal .hud-btn.trial { width: 42px; height: 42px; margin-left: 8px; }
.hud-btn.trial {
  position: relative; flex-direction: column; gap: 0; padding: 0; color: #fff; font-family: var(--display);
  background: conic-gradient(var(--green) calc(var(--p, 100) * 1%), var(--cab-dd) 0); box-shadow: 0 4px 0 var(--ink-line);
}
.hud-btn.trial .trial-in { position: absolute; inset: 3px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--cab-d); border: 2px solid var(--ink-line); }
.hud-btn.trial .trial-in img { width: 30px; height: 30px; }
.hud-btn.trial .trial-in .emo { font-size: 18px; }
.hud-btn.trial .trial-time {
  position: absolute; z-index: 2; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 0 4px; border-radius: 4px;
  font-size: 10px; line-height: 13px; font-variant-numeric: tabular-nums; background: var(--green); border: 1.5px solid var(--ink-line);
}
.trial-hero .trial-ico { position: relative; width: 84px; height: 84px; animation: playPulse 1.6s ease-in-out infinite; }
.trial-hero .emo.trial-ico { font-size: 56px; width: auto; height: auto; }
.offer-amt.trial-amt { gap: 3px; padding: 2px 8px 2px 6px; font-variant-numeric: tabular-nums; }
.offer-amt.trial-amt .glyph { width: 15px; height: 15px; }
