/* Fontes self-hosted (Baloo 2 400/700/800 + Inter 400/600, subsets
   latin/latin-ext). woff2 em /assets/fonts/. Sem chamada externa a
   fonts.googleapis.com/gstatic.com. Baixam sob demanda por unicode-range;
   font-display:swap não bloqueia o render. */
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/baloo2-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/baloo2-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/baloo2-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/baloo2-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:800;font-display:swap;src:url(/assets/fonts/baloo2-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:800;font-display:swap;src:url(/assets/fonts/baloo2-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/inter-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/inter-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

:root {
  /* Cores vindas da API (sobrescritas por theme.js). Fallbacks neutros. */
  --c-primary: #1ecdfe;
  --c-secondary: #026cff;
  --c-background: #bad7ff;
  --c-background-secondary: #eef4ff;
  --c-text: #0a2540;
  --c-card: #ffffff;
  --c-leftbar: #cafcfe;
  --c-tabbar: #ffffff;
  --c-header: #cafcfe;
  --c-jackpot-number: #026cff;
  --c-button-text: #ffffff;
  --c-sidebar-text: #0a2540;
  --c-sidebar-icon: #1ecdfe;
  --c-top-button: #1ecdfe;
  --c-default-icon: #1ecdfe;
  --c-title: #0a2540;
  --c-theme-hint: #5a8fc7;
  --bg-image: none;

  --frame-w: 540px;
  --s: calc(min(var(--frame-w), 100vw) / 54);
  /* Alturas do chrome: telas pequenas 47/63; telas grandes (>=640px) 64/85. */
  --header-h: 47px;
  --bottom-h: 63px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Baloo 2', 'Inter', sans-serif;
}

@media (min-width: 640px) {
  :root { --header-h: 64px; --bottom-h: 85px; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Zera a folha do user-agent das listas (disc + 1em + 40px de padding-inline):
   app não quer bullets em lugar nenhum; quem precisar de recuo declara o seu. */
ul, ol, menu { list-style: none; margin: 0; padding: 0; }

/* O atributo hidden SEMPRE vence: qualquer regra de display autoral (flex,
   grid, inline-flex...) sobrescreveria o [hidden] nativo do navegador e o
   elemento "escondido" continuaria visível (ex.: botão "Carregar mais" de uma
   seção esgotada, pager, rodapés de seção). */
[hidden] { display: none !important; }

/* Sem barras de rolagem visíveis em lugar nenhum (todas as direções, todos os
   layouts). A rolagem continua funcionando — só o indicador some. */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Nenhuma imagem do sistema pode ser arrastada (ghost-drag). O app.js também
   bloqueia dragstart; aqui cobre os navegadores que respeitam user-drag. */
img { -webkit-user-drag: none; user-drag: none; }

/* Bloqueia o pull-to-refresh / puxar além do topo SOMENTE em dispositivos de
   toque (forma moderna: overscroll-behavior, escopado por media query). No
   desktop esta regra NÃO pode valer: overscroll-behavior none/contain também
   corta o scroll chaining, e a roda do mouse morre sobre qualquer rail
   horizontal (carrossel de jogos, categorias, banner) em vez de rolar a página. */
@media (hover: none) and (pointer: coarse) {
  html, body { overscroll-behavior-y: none; }
}

body {
  font-family: var(--font-ui);
  color: var(--c-text);
  background: var(--c-card);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Rede de segurança UNIVERSAL para ícones SVG.
   Qualquer SVG inline ganha um tamanho-base (escala com a fonte) e jamais
   ultrapassa o container. SVGs com largura/altura próprias definidas por
   classe (a maioria) sobrescrevem este padrão pela especificidade.
   Isto evita que ícones sem regra de tamanho (em overlays no body, modais,
   telas novas) "explodam" e tomem a tela inteira. */
svg {
  max-width: 100%;
  max-height: 100%;
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}
/* Ícones do sprite (icon() → <svg class="ic"><use href="…#i-nome"></use></svg>).
   O <svg> externo é dimensionado pelas mesmas regras `<contexto> svg { … }` de
   sempre; o <use> preenche esse box. A cor vem por currentColor (color herda do
   contexto). NÃO forço fill/stroke aqui: cada <symbol> traz o seu (fill=none +
   stroke nos ícones de contorno, fill nos sólidos) — um fill global encheria os
   ícones de contorno. */
svg.ic { display: inline-block; color: inherit; }
svg.ic use { pointer-events: none; }
/* navArrowR é o navArrowL espelhado. O transform tem de ficar no <svg> externo
   (classe): dentro de um <symbol> referenciado por <use> externo ele é ignorado
   por vários browsers. */
svg.ic-navArrowR { transform: scaleX(-1); }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; border: none; background: none; }

/* ---------- Frame mobile-fixo (vale para os 8 layouts) ---------- */
.app-frame {
  /* Unidade de escala: 1 unidade ~ proporcional à largura do frame.
     Em 540px -> --s = 10px. Em telas menores encolhe junto (responsivo). */
  --s: calc(min(var(--frame-w), 100vw) / 54);
  width: 100%;
  max-width: var(--frame-w);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--c-background);
  position: relative;
  overflow-x: clip;
  box-shadow: 0 0 60px rgba(0,0,0,.25);
}

#app { min-height: 100dvh; display: flex; flex-direction: column; position: relative; }

/* background_image do tema (via --bg-image, setada pelo theme.js): aparece SÓ
   na HOME de cada layout. É um tile pequeno (ex.: 128x128) — repete no tamanho
   natural, ancorado no topo/centro e fixo ao viewport durante a rolagem (no
   iOS o 'fixed' degrada para scroll, sem quebrar nada). */
.vy-home, .dy-home, .sw-home, .by-home,
.rg-home, .lk-home, .bb-home, .rr-home {
  background-image: var(--bg-image);
  background-repeat: repeat;
  background-size: auto;
  background-position: top center;
  background-attachment: fixed;
}

/* ---------- Boot screen (restrita ao frame de 540px, como a bet) ---------- */
.boot {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--frame-w); z-index: 9999;
  display: grid; place-items: center; padding: 24px;
  background: var(--c-background, #0a2540);
}
/* Sem transição de saída: o loading some seco; a hierarquia visual de entrada
   fica nos modais (auth surge animado logo em seguida). */
.boot.done { display: none; }

/* Sem spinner: o boot fica só com o fundo até a loading_image da API chegar. */

/* Loading image da API: imagem quadrada centralizada, com borda arredondada,
   sem encostar nas bordas dos 540px (o padding do .boot garante o respiro). */
.boot-image {
  width: 100%; max-width: 320px; height: auto; aspect-ratio: 1/1;
  object-fit: contain; border-radius: 22px; display: block;
}

/* ---------- Toasts ---------- */
/* Toasts no TOPO, estilo notificação de iPhone (liquid glass): vidro
   translúcido com blur, entrada com mola descendo e saída subindo. */
/* Sem transform no host: transform em ancestral viraria o containing block de
   position:fixed e prenderia o .toast-copy no topo em vez do centro da tela. */
#toasts {
  position: fixed; left: 0; right: 0; margin-inline: auto;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 12000; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(calc(var(--frame-w) - 24px), 92vw); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 16px; border-radius: 18px;
  font-size: 13.5px; font-weight: 500; color: #0b1220; line-height: 1.4;
  background: rgba(252,253,255,.78);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 10px 34px rgba(6,16,36,.28), inset 0 1px 0 rgba(255,255,255,.75);
  opacity: 0; transform: translateY(-18px) scale(.96);
  transition: opacity .3s var(--ease), transform .45s cubic-bezier(.2,.9,.25,1.2);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-ic { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.toast-ic svg { width: 12px; height: 12px; }
.toast-ok .toast-ic { background: #22c55e; }
.toast-err .toast-ic { background: #ef4444; }
.toast-info .toast-ic { background: #3b82f6; }

/* Toast de cópia (padrão da referência): card branco sólido centrado na tela,
   check verde. Sai do empilhamento do topo (position fixed próprio). */
.toast-copy, .toast-center {
  position: fixed; top: 50%; left: 50%; width: auto; max-width: 76%;
  padding: 16px 22px; border-radius: 10px; justify-content: center;
  background: #fff; border: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font-size: 14.5px; color: #323233;
  box-shadow: 0 6px 24px rgba(6,16,36,.22);
  opacity: 0; transform: translate(-50%, -50%) scale(.9);
}
.toast-copy.show, .toast-center.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast-copy .toast-ic { width: 24px; height: 24px; background: #13cb09; }
.toast-copy .toast-ic svg { width: 13px; height: 13px; }
.toast-copy .toast-tx { flex: 0 0 auto; }
.toast-center .toast-tx { flex: 0 0 auto; text-align: center; }
.toast-tx { flex: 1; min-width: 0; overflow-wrap: break-word; }

/* ---------- Modal (genérico) ---------- */
/* Zoom central (equivalente visual do slide-in-fwd-center / slide-out-bck-center
   do Animista): surge aumentando a partir do centro, some diminuindo. */
@keyframes modal-in-fwd {
  0%   { transform: scale(.42); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes modal-out-bck {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(.6); opacity: 0; }
}
/* Botão principal que "pulsa" (Login/Registro do auth). */
@keyframes btn-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}
.btn-pulse { animation: btn-pulse 1.6s ease-in-out infinite; }
.lite .btn-pulse { animation: none; }
.modal-overlay {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--frame-w); z-index: 10001;
  display: grid; place-items: center; align-content: center; row-gap: 14px;
  padding: 18px 0;
  background: rgba(6,16,36,.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s var(--ease);
}
.modal-overlay.open { opacity: 1; }
.modal-overlay.closing { opacity: 0; pointer-events: none; }
/* Larguras proporcionais ao frame (base 540px): genérico ~92% (497@540). */
.modal {
  width: 92%; max-height: 88dvh; overflow: auto;
  background: var(--c-card); color: var(--c-text);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.modal-overlay.open .modal { animation: modal-in-fwd .4s cubic-bezier(.25,.46,.45,.94) both; }
.modal-overlay.closing .modal { animation: modal-out-bck .4s cubic-bezier(.55,.085,.68,.53) both; }
.lite .modal-overlay .modal { animation: none; }
.modal-sm { width: 92%; }
/* Confirmação (Lembrete): ~80% (432@540). */
.modal.confirm-modal { width: 80%; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(0,0,0,.08);
}
.modal-title { margin: 0; font-family: var(--font-display); font-size: 18px; color: var(--c-title); }
.modal-x { width: 32px; height: 32px; color: var(--c-text); opacity: .6; }
.modal-x svg { width: 20px; height: 20px; }
.modal-x:hover { opacity: 1; }
.modal-body { padding: 18px; }
.modal-foot { padding: 14px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid rgba(0,0,0,.08); }
.modal-msg { margin: 0; font-size: 15px; line-height: 1.5; }

/* ---------- Botões genéricos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-weight: 400; font-size: 14px; transition: filter .15s var(--ease), transform .1s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: var(--c-button-text); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: var(--c-secondary); color: var(--c-background); }
.btn-ghost { background: rgba(0,0,0,.06); color: var(--c-text); }
.btn-block { width: 100%; }

/* ---------- Estados ---------- */
.view-error, .view-empty {
  padding: 40px 20px; text-align: center; color: var(--c-theme-hint);
  font-size: 15px;
}

/* ---------- Skeleton ---------- */
.skeleton {
  position: relative; overflow: hidden;
  background: rgba(0,0,0,.06); border-radius: var(--radius-sm);
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%); animation: shimmer 1.25s var(--ease) infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
/* Variantes reutilizáveis */
.sk-game { aspect-ratio: 3/4; border-radius: 12px; width: 100%; }
.sk-blocks { display: flex; flex-direction: column; gap: 12px; }
.sk-block { width: 100%; border-radius: var(--radius); }
.sk-list { display: flex; flex-direction: column; gap: 12px; }
.sk-row { display: flex; gap: 12px; align-items: center; }
.sk-avatar { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; border-radius: 6px; width: 100%; }
.sk-line.short { width: 55%; }
.sk-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-cardlet { height: 72px; border-radius: 12px; }
/* Skeleton dos cards de jogo: usa a imagem própria no lugar do shimmer cinza.
   A imagem já vem na proporção do card (retrato) com gradiente e cantos.
   Precisa vir DEPOIS de .skeleton/.skeleton::after para vencer o cinza. */
.skeleton.sk-game-img {
  background: url('/assets/images/games/skeleton.webp') center / 100% 100% no-repeat;
  border-radius: 12.5%;
}
.skeleton.sk-game-img::after { content: none; display: none; }

/* ---------- Transição de slide entre telas (push direcional) ---------- */
#view { position: relative; flex: 1; display: flex; flex-direction: column; }
.view-layer { width: 100%; min-height: 100%; display: flex; flex-direction: column; flex: 1; }
#view.view-sliding { overflow: hidden; }
#view.view-sliding .view-layer {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto; will-change: transform;
}
/* A animação de slide (curva, duração, fade, modo leve) é definida no
   layout-2-dy.css para ficar em um lugar só. Aqui fica apenas a estrutura. */

/* ---------- Acessibilidade ---------- */
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Modal "Notificação de depósito" (gameflow) — padrão da
   referência: título com ícone, texto com destaque, botão cheio com a fita
   "Bônus de depósito" (e o presente) flutuando sobre ele. ---------- */
.dep-notice-modal .modal-head { display: none; }
.dep-notice-modal .modal-body { padding: 22px 18px 18px; }
.dep-notice { text-align: center; }
.dep-notice-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.dep-notice-ic { width: 26px; height: 26px; flex: 0 0 auto; }
.dep-notice-ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dep-notice-ic svg { width: 26px; height: 26px; color: var(--c-jackpot-number, #ffd000); }
.dep-notice-head strong { font-family: var(--font-display); font-size: 17px; font-weight: 400; color: var(--c-title); }
.dep-notice-text { font-size: 13.5px; line-height: 1.6; color: var(--c-text); margin: 0 0 26px; }
.dep-notice-text b { color: var(--c-jackpot-number, #ffd000); font-weight: 400; }
.dep-notice-submit { position: relative; margin-top: 10px; }
.dep-notice-badge {
  position: absolute; top: -13px; left: 0; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-jackpot-number, #ffd000); color: #3a2600;
  font-weight: 400; font-size: 12px; line-height: 1;
  padding: 5px 10px; border-radius: 8px 8px 8px 0;
}
.dep-notice-badge img { width: 26px; height: 26px; object-fit: contain; margin: -8px -2px -4px 0; }
.dep-notice-btn {
  width: 100%; height: 46px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--c-top-button); color: var(--c-button-text, #fff);
  font-size: 15px; font-weight: 400;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Trava de scroll (sidebar/modal abertos) ---------- */
body.scroll-locked { overflow: hidden; touch-action: none; overscroll-behavior: none; }

/* ---------- Modal de download do app (share.js) — padrão da referência:
   favicon + texto, e dois botões lado a lado ("Atalho na área de trabalho"
   outline / "APLICATIVO rápido" sólido com badge Popular). ---------- */
.dl-modal-wrap .modal-head { display: none; }
.dl-modal-wrap .modal-body { padding: 18px 16px 16px; }
.dl-modal-top { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.dl-modal-icon { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; flex: 0 0 auto; background: rgba(255,255,255,.06); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.dl-modal-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-modal-icon svg { width: 28px; height: 28px; color: var(--c-secondary); }
.dl-modal-text { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 400; color: var(--c-title); line-height: 1.4; overflow-wrap: break-word; }
.dl-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-btn {
  position: relative; min-width: 0; min-height: 54px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; cursor: pointer;
  font-size: 13px; line-height: 1.25; text-align: left;
}
.dl-btn-ghost { background: transparent; border: 1px solid var(--c-top-button); color: var(--c-top-button); }
.dl-btn-main { background: var(--c-top-button); color: var(--c-button-text, #fff); }
.dl-btn-ic { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex: 0 0 auto; }
.dl-btn-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dl-btn-name { display: block; max-width: 100%; overflow-wrap: break-word; }
.dl-btn-name em { font-style: normal; font-size: 11px; opacity: .85; }
.dl-btn-auto { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.dl-btn-auto i { width: 13px; height: 13px; border-radius: 3px; background: #22c55e; color: #fff; display: inline-grid; place-items: center; }
.dl-btn-auto i svg { width: 9px; height: 9px; }
.dl-modal-tag { position: absolute; top: -7px; left: -4px; z-index: 1; background: #f12c4c; color: #fff; font-size: 10px; font-weight: 400; padding: 2px 8px; border-radius: 6px 6px 6px 0; }

/* ---------- Confirmação (Lembrete) — título central, dois botões lado a lado ---------- */
.confirm-modal .modal-head { justify-content: center; padding: 20px 18px 2px; border-bottom: 0; }
.confirm-modal .modal-x { display: none; }
.confirm-modal .modal-title { font-size: 17px; }
.confirm-modal .modal-msg { margin: 12px 0 4px; text-align: center; color: var(--c-text); font-size: 14px; }
.confirm-modal .modal-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 18px 18px; border-top: 0; }
.confirm-modal .modal-foot .btn { width: 100%; height: 42px; border-radius: 10px; font-weight: 400; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.confirm-modal .modal-foot .btn-ghost { background: transparent; border: 1px solid var(--c-top-button); color: var(--c-top-button); }
.confirm-modal .modal-foot .btn-primary { background: var(--c-top-button); color: var(--c-button-text, #fff); }

/* ---------- Popups do /theme (core/popups.js) — card central ~85%, checkbox
   "Não mostrar novamente hoje" e X circular abaixo, como a referência. ---------- */
.pop-overlay {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--frame-w); z-index: 10000;
  display: grid; place-items: center; padding: 18px 0;
  background: rgba(6,16,36,.55); backdrop-filter: blur(2px);
  perspective: 1200px;
  opacity: 0; transition: opacity .25s var(--ease);
}
.pop-overlay.open { opacity: 1; }
.pop-overlay.closing { opacity: 0; pointer-events: none; }
.pop-stack { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 85%; max-width: 464px; max-height: 92dvh; }
.pop-overlay.open .pop-stack { animation: modal-in-fwd .4s cubic-bezier(.25,.46,.45,.94) both; }
.pop-overlay.closing .pop-stack { animation: modal-out-bck .4s cubic-bezier(.55,.085,.68,.53) both; }
.lite .pop-overlay .pop-stack { animation: none; }
.pop-card { width: 100%; border-radius: 14px; overflow: hidden; cursor: pointer; }
.pop-card-img { line-height: 0; }
.pop-img { width: 100%; height: auto; display: block; }
.pop-card-text { background: var(--c-card); color: var(--c-text); padding: 16px; cursor: default; }
.pop-card-text[data-has-url="1"] { cursor: pointer; }
.pop-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 17px; color: var(--c-title); text-align: center; }
.pop-text { max-height: 52dvh; overflow-y: auto; font-size: 13.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: break-word; }
.pop-text a { color: var(--c-secondary); text-decoration: underline; word-break: break-all; }

/* Textos agrupados (padrão da referência): abas laterais + conteúdo. */
.pop-card-group {
  display: flex; align-items: stretch; cursor: default;
  background: var(--c-card); color: var(--c-text);
  aspect-ratio: 464 / 380; max-height: 62dvh;
}
.pop-tabs { width: 27%; flex: 0 0 auto; overflow-y: auto; background: var(--c-background); display: flex; flex-direction: column; }
.pop-tab {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 12px 8px; border: 0; background: transparent; cursor: pointer;
  text-align: left; font-size: 11px; line-height: 1.3; color: var(--c-text);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.pop-tab.on { background: var(--c-card); color: var(--c-primary); }
.pop-tab-ic { flex: 0 0 auto; display: inline-grid; place-items: center; }
.pop-tab-ic svg { width: 17px; height: 17px; }
.pop-tab-lb { flex: 1; min-width: 0; overflow-wrap: break-word; }
.pop-pages { flex: 1; min-width: 0; position: relative; }
.pop-page { position: absolute; inset: 0; display: none; overflow-y: auto; padding: 14px 16px; }
.pop-page.on { display: block; }
.pop-page[data-has-url="1"] { cursor: pointer; }
.pop-page .pop-text { max-height: none; overflow-y: visible; }
.pop-check { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; cursor: pointer; user-select: none; }
.pop-check input { position: absolute; opacity: 0; pointer-events: none; }
.pop-check-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid rgba(255,255,255,.8); display: inline-grid; place-items: center; color: transparent; }
.pop-check-box svg { width: 10px; height: 10px; }
.pop-check input:checked + .pop-check-box { background: #22c55e; border-color: #22c55e; color: #fff; }
.pop-x {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  border: 1.5px solid rgba(255,255,255,.55); background: transparent; color: rgba(255,255,255,.9);
  display: grid; place-items: center; cursor: pointer;
}
.pop-x svg { width: 16px; height: 16px; }
.pop-x:active { transform: scale(.92); }

/* ---------- Modal "Encontre-nos" (share.js) ---------- */
.fu-modal-wrap .modal-head { display: none; }
.fu-modal-wrap .modal-body { padding: 0; }
.fu-modal-wrap .modal { background: #eaf2ff; }
.fu-modal { padding: 14px; }
.fu-head { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0 14px; }
.fu-head-ic { width: 26px; height: 26px; } .fu-head-ic img { width: 100%; height: 100%; object-fit: contain; }
.fu-head strong { font-family: var(--font-display); font-size: 19px; color: var(--c-secondary, #026cff); }

.fu-alert { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid #d6e6ff; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.fu-alert-ic { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; object-fit: contain; }
.fu-alert p { margin: 0; font-size: 14px; font-weight: 400; color: #0a2540; line-height: 1.5; }

.fu-card { background: #fff; border: 1px solid #d6e6ff; border-radius: 14px; padding: 14px; }
.fu-card-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px dashed #d6e6ff; margin-bottom: 12px; }
.fu-card-title { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 16px; color: var(--c-secondary, #026cff); }
.fu-www { width: 22px; height: 22px; object-fit: contain; }
.fu-copyall { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 400; color: var(--c-secondary, #026cff); }
.fu-copyall svg { width: 16px; height: 16px; }

.fu-warn { font-size: 14px; font-weight: 400; color: #f59e0b; line-height: 1.45; margin-bottom: 12px; }
.fu-warn b { color: #f59e0b; }

.fu-step { display: flex; gap: 10px; margin-bottom: 12px; }
.fu-step-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; background: #e2e8f0; color: #475569; font-size: 12px; font-weight: 400; display: grid; place-items: center; margin-top: 1px; }
.fu-step-tx { font-size: 14px; line-height: 1.55; color: #0a2540; }
.fu-step-h { display: block; margin-bottom: 2px; color: #f59e0b; }
.fu-step-h.fu-danger { color: #e53935; }
.fu-domain { color: var(--c-secondary, #026cff); font-weight: 400; text-decoration: underline; word-break: break-all; }

.fu-unavail { font-size: 14px; font-weight: 400; color: #e53935; margin: 6px 0 8px; }
.fu-checks { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fu-checks li { font-size: 14px; font-weight: 400; color: #0a2540; line-height: 1.4; }
.fu-thanks { font-size: 14px; font-weight: 400; color: #0a2540; line-height: 1.5; margin: 0 0 12px; }

.fu-divider { text-align: center; font-weight: 400; color: #e53935; font-size: 13px; letter-spacing: 1px; margin: 10px 0; }
.fu-urls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.fu-url { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--c-secondary, #026cff); font-weight: 400; text-align: left; }
.fu-url svg { width: 15px; height: 15px; }

.fu-savephoto { margin-top: 14px; font-size: 16px; padding: 15px; border-radius: 12px; }

/* ===== Diálogo de retenção do depósito (compartilhado) ===== */
.dep-retain-overlay { position: fixed; inset: 0; z-index: 10010; display: grid; place-items: center; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s var(--ease); padding: 24px; }
.dep-retain-overlay.open { opacity: 1; }
.dep-retain { width: 100%; max-width: 320px; background: var(--c-card, #fff); border-radius: 16px; overflow: hidden; transform: scale(.96); transition: transform .2s var(--ease); }
.dep-retain-overlay.open .dep-retain { transform: scale(1); }
.dep-retain-title { text-align: center; font-weight: 400; font-size: 16px; color: var(--c-text); padding: 18px 16px 8px; }
.dep-retain-msg { text-align: center; font-size: 14px; line-height: 1.55; color: var(--c-text); opacity: .85; padding: 0 18px 18px; }
.dep-retain-msg b { opacity: 1; }
.dep-retain-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--c-border, rgba(0,0,0,.1)); }
.dep-retain-btn { padding: 14px 8px; border: 0; background: transparent; font-weight: 400; font-size: 15px; cursor: pointer; }
.dep-retain-leave { color: var(--c-text); opacity: .7; }
.dep-retain-stay { color: var(--c-secondary); border-left: 1px solid var(--c-border, rgba(0,0,0,.1)); }

.rs-modal .modal-head { display: none; }
.rs-modal .modal-body { padding: 26px 20px 22px; }
.rs { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rs-check { width: 64px; height: 64px; border-radius: 50%; background: #04be02; color: #fff; display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(4,190,2,.35); }
.rs-check svg { width: 34px; height: 34px; }
.rs-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--c-title); }
.rs-text { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: var(--c-text); opacity: .85; }
.rs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.rs-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 10px; border: 0; border-radius: 14px; font-weight: 400; font-size: 14px; cursor: pointer; color: var(--c-button-text, #fff); transition: filter .15s var(--ease), transform .1s var(--ease); }
.rs-btn:active { transform: translateY(1px); }
.rs-btn:hover { filter: brightness(1.05); }
.rs-btn-app { background: var(--c-primary); }
.rs-btn-dep { background: var(--c-secondary); color: #fff; }
.rs-badge { font-size: 10.5px; font-weight: 400; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.22); }
.rs-x, .modal-float-x { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.9); background: transparent; border: 1.5px solid rgba(255,255,255,.55); cursor: pointer; justify-self: center; padding: 0; }
.rs-x svg, .modal-float-x svg { width: 16px; height: 16px; }
.rs-x:active, .modal-float-x:active { transform: scale(.92); }

/* Parabéns por se cadastrar — padrão da referência (check verde, título entre
   emojis, botões em degradê com fita-presente por cima). */
.rs2 .rs-check { margin-top: 6px; }
.rs2-title { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; }
.rs2-title img { width: 30px; height: 30px; flex: 0 0 auto; }
.rs2-title span {
  font-family: var(--font-display); font-size: 18px; font-weight: 400; color: #04be02;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rs2-text { font-size: 15px; line-height: 1.75; color: var(--c-title); }
.rs2-actions { display: flex; justify-content: center; gap: 16px; width: 100%; margin-top: 34px; }
.rs2-bwrap { position: relative; display: inline-block; flex: 1; min-width: 0; max-width: 200px; }
.rs2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 46px; padding: 0 10px; border: 0; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; cursor: pointer;
  transition: filter .15s var(--ease), transform .1s var(--ease);
}
.rs2-btn:active { transform: translateY(1px); }
.rs2-btn:hover { filter: brightness(1.06); }
.rs2-btn-app { background: linear-gradient(90deg, #f495f3 2.08%, #8632ff 98.1%); }
.rs2-btn-dep { background: linear-gradient(90deg, #fece01 -13.33%, #ff7200 98.1%); }
.rs2-btn-ic { width: 30px; height: 30px; flex: 0 0 auto; }
.rs2-badge {
  position: absolute; top: -12px; right: -4px; z-index: 2;
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  background: var(--c-jackpot-number, #f6c343); color: #7a3b00;
  font-size: 10.5px; font-weight: 400; line-height: 1; white-space: nowrap;
  pointer-events: none;
}
.rs2-badge img { position: absolute; left: -14px; top: -8px; width: 26px; height: 26px; }

/* ============================================================
   Promoção DESKTOP (tela cheia, sidebar + conteúdo ~1200px)
   Ativada por #app.pm-desktop-on; usa :has() para escapar do frame 540px.
   ============================================================ */
.app-frame:has(.pm-desktop-on) { max-width: none; width: 100%; background: #0f1115; }
.app-frame:has(.pm-desktop-on) .dy-header,
.app-frame:has(.pm-desktop-on) .dy-bottom,
.app-frame:has(.pm-desktop-on) .vy-header,
.app-frame:has(.pm-desktop-on) .vy-bottom { display: none !important; }

.pmd { --pmd-accent: var(--c-secondary, #026cff); --pmd-gold: var(--c-primary, #ffd000); --pmd-bg: #0f1115; --pmd-card: #181b21; --pmd-line: rgba(255,255,255,.08); --pmd-text: #e9edf5; --pmd-dim: #8b93a7; color: var(--pmd-text); min-height: 100dvh; background: var(--pmd-bg); display: flex; flex-direction: column; }

/* Header */
.pmd-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 28px; background: var(--pmd-card); border-bottom: 1px solid var(--pmd-line); flex-wrap: wrap; }
.pmd-head-left { display: flex; align-items: center; gap: 28px; }
.pmd-logo { width: 40px; height: 40px; object-fit: contain; }
.pmd-settle p, .pmd-rate p { display: flex; flex-direction: column; line-height: 1.4; }
.pmd-settle, .pmd-rate { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.pmd-settle span, .pmd-rate span { color: var(--pmd-dim); }
.pmd-settle b, .pmd-rate b { color: var(--pmd-text); font-weight: 400; }
.pmd-head-right { display: flex; align-items: center; gap: 20px; }
.pmd-user { display: flex; align-items: center; gap: 10px; }
.pmd-user img { width: 36px; height: 36px; object-fit: contain; }
.pmd-user p { font-size: 12px; color: var(--pmd-dim); display: flex; align-items: center; gap: 6px; }
.pmd-user b { color: var(--pmd-text); font-weight: 400; }
.pmd-user button { color: var(--pmd-accent); display: inline-flex; } .pmd-user button svg { width: 14px; height: 14px; }
.pmd-head-btn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pmd-dim); padding: 8px 12px; border-radius: 8px; transition: background .2s; }
.pmd-head-btn:hover { background: rgba(255,255,255,.05); color: var(--pmd-text); }
.pmd-head-btn svg { width: 18px; height: 18px; }

/* Shell: sidebar + main */
.pmd-shell { flex: 1; display: grid; grid-template-columns: 230px 1fr; min-height: 0; }
.pmd-side { background: var(--pmd-card); border-right: 1px solid var(--pmd-line); padding: 16px 12px; }
.pmd-menu { display: flex; flex-direction: column; gap: 4px; }
.pmd-menu-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 400; color: var(--pmd-dim); text-align: left; transition: background .2s, color .2s; }
.pmd-menu-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.pmd-menu-item:hover { background: rgba(255,255,255,.04); color: var(--pmd-text); }
.pmd-menu-item.on { background: color-mix(in srgb, var(--pmd-accent) 18%, transparent); color: var(--pmd-accent); }
.pmd-main { padding: 24px 28px; overflow-y: auto; max-width: 1200px; }
.pmd-skel { height: 40dvh; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 37%, rgba(255,255,255,.04) 63%); background-size: 400% 100%; animation: pmd-shimmer 1.4s infinite; }
@keyframes pmd-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.pmd-title { font-family: var(--font-display); font-size: 22px; font-weight: 400; margin-bottom: 18px; color: var(--pmd-text); }
.pmd-card { background: var(--pmd-card); border: 1px solid var(--pmd-line); border-radius: 14px; padding: 20px; margin-bottom: 18px; }
.pmd-card h4 { font-size: 15px; font-weight: 400; margin-bottom: 14px; }
.pmd-block-title { font-size: 14px; color: var(--pmd-dim); font-weight: 400; margin: 18px 0 12px; }
.warn { color: var(--pmd-gold) !important; } .ok { color: #2dc26b !important; } .err { color: #e05656 !important; }

/* Começar */
.pmd-agentgrid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; align-items: start; }
.pmd-userbox-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.pmd-userbox-head img { width: 56px; height: 56px; object-fit: contain; }
.pmd-coletavel { flex: 1; }
.pmd-coletavel label { display: block; font-size: 12px; color: var(--pmd-dim); }
.pmd-cur { font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--pmd-gold); display: block; margin: 2px 0 10px; }
.pmd-userbox-btns { display: flex; gap: 10px; }
.pmd-userbox-btns .btn { padding: 8px 22px; font-size: 13px; }
.pmd-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.pmd-kv > div { display: flex; flex-direction: column; gap: 4px; }
.pmd-kv span { font-size: 12px; color: var(--pmd-dim); }
.pmd-kv b { font-size: 14px; font-weight: 400; display: inline-flex; align-items: center; gap: 6px; }
.pmd-kv b button { color: var(--pmd-accent); display: inline-flex; } .pmd-kv b svg { width: 14px; height: 14px; }
.pmd-sharebox-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pmd-code-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pmd-code-line label { color: var(--pmd-dim); }
.pmd-code-line p { font-weight: 400; }
.pmd-code-line button { color: var(--pmd-accent); display: inline-flex; } .pmd-code-line svg { width: 15px; height: 15px; }
.pmd-share-main { display: flex; gap: 24px; align-items: flex-start; }
.pmd-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pmd-qr-box { width: 150px; height: 150px; background: #fff; border-radius: 10px; padding: 6px; display: grid; place-items: center; }
.pmd-qr-box canvas { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.pmd-qr .btn { padding: 8px 14px; font-size: 12px; }
.pmd-share-right { flex: 1; min-width: 0; }
.pmd-share-title { font-size: 13px; color: var(--pmd-dim); margin-bottom: 8px; }
.pmd-link { display: flex; align-items: center; background: rgba(255,255,255,.04); border: 1px solid var(--pmd-line); border-radius: 8px; padding: 0 10px; margin-bottom: 16px; }
.pmd-link input { flex: 1; min-width: 0; border: 0; background: none; padding: 11px 0; font-size: 13px; color: var(--pmd-text); outline: none; }
.pmd-link button { color: var(--pmd-accent); display: inline-flex; } .pmd-link svg { width: 17px; height: 17px; }
.pmd-share-btns { display: flex; gap: 18px; }
.pmd-share-btns button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--pmd-dim); }
.pmd-share-btns span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.pmd-share-btns span svg { width: 22px; height: 22px; }

/* Meus Dados */
.pmd-rangetabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.pmd-rangetab { padding: 8px 18px; border-radius: 8px; border: 1px solid var(--pmd-line); font-size: 13px; font-weight: 400; color: var(--pmd-dim); }
.pmd-rangetab.on { background: var(--pmd-accent); border-color: var(--pmd-accent); color: #fff; }
.pmd-earnings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pmd-earnings-grid > div { display: flex; flex-direction: column; gap: 6px; }
.pmd-earnings-grid span { font-size: 13px; color: var(--pmd-dim); }
.pmd-earnings-grid b { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.pmd-datagrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pmd-dataitem { background: rgba(255,255,255,.02); border: 1px solid var(--pmd-line); border-radius: 10px; padding: 14px; }
.pmd-dataitem-top { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--pmd-line); }
.pmd-dataitem-top span { font-size: 12px; color: var(--pmd-dim); }
.pmd-dataitem-top b { font-family: var(--font-display); font-size: 18px; font-weight: 400; }
.pmd-dataitem-rows > div { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.pmd-dataitem-rows span { color: var(--pmd-dim); }
.pmd-totalbox-blue, .pmd-totalbox-yellow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 16px; border-radius: 10px; margin-bottom: 12px; }
.pmd-totalbox-blue { background: color-mix(in srgb, var(--pmd-accent) 10%, transparent); }
.pmd-totalbox-yellow { background: color-mix(in srgb, var(--pmd-gold) 8%, transparent); grid-template-columns: repeat(3, 1fr); }
.pmd-totalbox-blue > div, .pmd-totalbox-yellow > div { display: flex; flex-direction: column; gap: 4px; }
.pmd-totalbox-blue span, .pmd-totalbox-yellow span { font-size: 12px; color: var(--pmd-dim); }
.pmd-totalbox-blue b, .pmd-totalbox-yellow b { font-size: 16px; font-weight: 400; }

/* Toolbar (filtros) */
.pmd-toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.pmd-toolbar select { background: var(--pmd-card); border: 1px solid var(--pmd-line); border-radius: 8px; color: var(--pmd-text); font-size: 13px; padding: 9px 30px 9px 12px; appearance: none; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22 fill=%22%238b93a7%22%3E%3Cpath d=%22M6 8L2 4h8z%22/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: right 10px center; }
.pmd-search { display: flex; align-items: center; border: 1px solid var(--pmd-line); border-radius: 8px; background: var(--pmd-card); padding-right: 8px; }
.pmd-search input { border: 0; background: none; padding: 9px 12px; font-size: 13px; color: var(--pmd-text); outline: none; width: 200px; }
.pmd-search button { color: var(--pmd-accent); display: inline-flex; } .pmd-search svg { width: 17px; height: 17px; }
.pmd-agent-chip { font-size: 13px; color: var(--pmd-dim); margin-bottom: 12px; }
.pmd-agent-chip b { color: var(--pmd-text); }
.pmd-agent-chip span { color: var(--pmd-accent); }

/* Tabela */
.pmd-tablewrap { padding: 0; overflow: hidden; }
.pmd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pmd-table th { text-align: left; padding: 14px 16px; background: rgba(255,255,255,.03); color: var(--pmd-dim); font-weight: 400; white-space: nowrap; border-bottom: 1px solid var(--pmd-line); }
.pmd-table td { padding: 13px 16px; border-bottom: 1px solid var(--pmd-line); color: var(--pmd-text); white-space: nowrap; }
.pmd-table tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }
.pmd-table tbody tr:hover { background: rgba(255,255,255,.04); }
.pmd-table td b { font-weight: 400; }
.pmd-tcopy { color: var(--pmd-accent); display: inline-flex; vertical-align: middle; } .pmd-tcopy svg { width: 13px; height: 13px; }
.pmd-empty td { text-align: center; padding: 48px 16px; color: var(--pmd-dim); }
.pmd-summaryline { display: flex; gap: 40px; padding: 16px 20px; background: var(--pmd-card); border: 1px solid var(--pmd-line); border-radius: 14px; margin-bottom: 18px; }
.pmd-summaryline > div { display: flex; flex-direction: column; gap: 4px; }
.pmd-summaryline span { font-size: 12px; color: var(--pmd-dim); }
.pmd-summaryline b { font-size: 16px; font-weight: 400; }
.pmd-pager { display: flex; align-items: center; gap: 10px; }
.pmd-pager button { width: 34px; height: 34px; border-radius: 8px; background: var(--pmd-card); border: 1px solid var(--pmd-line); color: var(--pmd-text); font-size: 16px; display: grid; place-items: center; }
.pmd-pager button:disabled { opacity: .4; }
.pmd-pager-cur { width: 34px; height: 34px; border-radius: 8px; background: var(--pmd-accent); color: #fff; display: grid; place-items: center; font-weight: 400; font-size: 13px; }
.pmd-pager-text { font-size: 12px; color: var(--pmd-dim); margin-left: 8px; }
.pmd-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--pmd-dim); background: rgba(255,255,255,.03); border: 1px solid var(--pmd-line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.pmd-note svg { width: 16px; height: 16px; color: var(--pmd-accent); flex: 0 0 auto; }
.pmd-export p { color: var(--pmd-dim); margin-bottom: 14px; }

/* Tutorial */
.pmd-tutorial { max-width: 760px; }
.pmd-tut-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.pmd-tut-tab { padding: 9px 18px; border-radius: 8px 8px 0 0; border: 1px solid var(--pmd-line); border-bottom: 0; font-size: 13px; font-weight: 400; color: var(--pmd-dim); background: rgba(255,255,255,.02); }
.pmd-tut-tab.on { background: var(--pmd-accent); border-color: var(--pmd-accent); color: #fff; }
.pmd-tut-tree { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pmd-tut-node { position: relative; width: 100%; border-radius: 12px; padding: 18px 16px; text-align: center; }
.pmd-tut-node img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 6px; }
.pmd-tut-node p { font-size: 13px; line-height: 1.6; }
.pmd-tut-node em { font-style: normal; color: var(--pmd-gold); font-weight: 400; }
.pmd-tut-node b { font-weight: 400; }
.pmd-tut-badge { position: absolute; top: 12px; left: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 400; color: #fff; background: var(--pmd-accent); }
.pmd-tut-badge.b { background: #3b82f6; } .pmd-tut-badge.c { background: #22c55e; } .pmd-tut-badge.n { background: #ef4444; }
.pmd-tut-node.A { background: color-mix(in srgb, var(--pmd-gold) 10%, transparent); border: 1px solid color-mix(in srgb, var(--pmd-gold) 30%, transparent); }
.pmd-tut-node.A .pmd-tut-calc { text-align: left; display: inline-block; }
.pmd-tut-node.N { background: rgba(239,68,68,.06); border: 1px dashed rgba(239,68,68,.4); }
.pmd-tut-arrow { color: rgba(255,255,255,.25); } .pmd-tut-arrow svg { width: 22px; height: 22px; } .pmd-tut-arrow.dashed { opacity: .6; }
.pmd-tut-rowB { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.pmd-tut-rowC { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; }
.pmd-tut-rowB .pmd-tut-node { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.3); }
.pmd-tut-rowC .pmd-tut-node { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.3); }
.pmd-tut-legend { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 16px 0; margin-top: 12px; border-top: 1px dashed var(--pmd-line); font-size: 12px; color: var(--pmd-dim); }
.pmd-tut-legend span { display: inline-flex; align-items: center; gap: 6px; } .pmd-tut-legend i { width: 16px; height: 9px; border-radius: 3px; }
.pmd-tut-detail { font-size: 13px; color: var(--pmd-dim); line-height: 1.8; padding-top: 16px; border-top: 1px solid var(--pmd-line); }
.pmd-tut-detail b { color: var(--pmd-text); } .pmd-tut-detail em { font-style: normal; color: var(--pmd-gold); font-weight: 400; }

@media (max-width: 1000px) {
  .pmd-shell { grid-template-columns: 1fr; }
  .pmd-side { border-right: 0; border-bottom: 1px solid var(--pmd-line); }
  .pmd-menu { flex-direction: row; overflow-x: auto; }
  .pmd-menu-item span { display: none; }
  .pmd-agentgrid { grid-template-columns: 1fr; }
  .pmd-datagrid { grid-template-columns: repeat(2, 1fr); }
}

/* Taxa de Comissão (tabela escalonada + calculadora) */
.pmd-rate-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pmd-calc-btn { padding: 9px 20px; font-size: 13px; }
.pmd-sub { font-size: 14px; color: var(--pmd-dim); margin: 6px 0 14px; }
.pmd-rate-tabs { display: flex; gap: 0; margin-bottom: 16px; }
.pmd-rate-tab { padding: 10px 28px; font-size: 13.5px; font-weight: 400; color: var(--pmd-dim); border: 1px solid var(--pmd-line); background: rgba(255,255,255,.02); }
.pmd-rate-tab:first-child { border-radius: 8px 0 0 8px; }
.pmd-rate-tab:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.pmd-rate-tab.on { background: var(--pmd-accent); border-color: var(--pmd-accent); color: #fff; }
.pmd-rate-table th, .pmd-rate-table td { text-align: center; }
.pmd-th-sub { font-weight: 400; font-size: 11px; opacity: .7; }
.pmd-pct { font-size: 11px; margin-left: 1px; }
.pmd-calc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 10050; padding: 20px; }
.pmd-calc-modal { width: 100%; max-width: 420px; background: var(--c-card, #181b21); color: #e9edf5; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 22px; }
.pmd-calc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pmd-calc-top h4 { font-size: 16px; font-weight: 400; }
.pmd-calc-top button { color: #8b93a7; display: inline-flex; } .pmd-calc-top svg { width: 20px; height: 20px; }
.pmd-calc-label { display: block; font-size: 12px; color: #8b93a7; margin-bottom: 6px; }
.pmd-calc-input { width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 12px 14px; font-size: 15px; color: #e9edf5; outline: none; margin-bottom: 18px; }
.pmd-calc-input:focus { border-color: var(--c-secondary, #026cff); }
.pmd-calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pmd-calc-result > div { background: rgba(255,255,255,.03); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.pmd-calc-result span { font-size: 12px; color: #8b93a7; }
.pmd-calc-result b { font-size: 18px; font-weight: 400; }

/* ===== Player de jogo (iframe + botão Lobby) ===== */
.game-player {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--frame-w, 540px);
  z-index: 10080; background: #000;
  display: flex; flex-direction: column;
}
.game-player-frame { flex: 1; width: 100%; height: 100%; border: 0; display: block; background: #000; }
/* Tela de carregamento do jogo (referência buntingpg): cobre o player em preto
   com a animação centralizada (1.8rem deles = largura/7.5 × 1.8); abre ANTES do
   pedido do jogo e é removida quando o iframe termina de carregar. */
.game-player-loading {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.game-player-loading img {
  width: calc(min(var(--frame-w, 540px), 100vw) / 7.5 * 1.8);
  aspect-ratio: 1; height: auto;
}
/* Bola "Lobby" nas medidas da referência (draggleBall): .95rem de diâmetro,
   ícone .4rem, label .2rem, offset .03rem — rem deles = largura/7.5. */
.game-player-lobby {
  --gp-rem: calc(min(var(--frame-w, 540px), 100vw) / 7.5);
  position: absolute; top: calc(var(--gp-rem) * .03); left: calc(var(--gp-rem) * .03);
  z-index: 1999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  width: calc(var(--gp-rem) * .95); height: calc(var(--gp-rem) * .95);
  color: #fff; background-color: rgba(0,0,0,.6);
  border: solid max(1px, calc(var(--gp-rem) * .015)) rgba(255,255,255,.65); border-radius: 50%;
  box-shadow: 0 calc(var(--gp-rem) * .03) calc(var(--gp-rem) * .06) rgba(0,0,0,.16);
  cursor: pointer; user-select: none; -webkit-user-drag: none;
}
.game-player-lobby:active { transform: scale(.95); }
.game-player-lobby-ic { display: flex; }
.game-player-lobby-ic svg { width: calc(var(--gp-rem) * .4); height: calc(var(--gp-rem) * .4); }
.game-player-lobby-tx { font-size: calc(var(--gp-rem) * .2); font-weight: 400; line-height: 1; }
/* ============================================================
   OTIMIZAÇÕES PARA DEVICE FRACO (classe .lite no <html>)
   Vale para todos os layouts que usam este base.
   ============================================================ */
/* Modal: sem blur (backdrop-filter é caro em GPU fraca) e sem escala/slide. */
.lite .modal-overlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transition: none; }
.lite .modal { transition: none; transform: none; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lite .modal-overlay.open .modal { transform: none; }

/* Toast sem animação de entrada no modo leve. */
.lite .toast { transition: opacity .15s linear; transform: none; }
.lite .toast.show { transform: none; }

/* Skeleton: o shimmer contínuo consome GPU; no modo leve vira cor estática. */
.lite .skeleton::after { display: none; }
.lite .skeleton { background: rgba(0,0,0,.08); }

/* Boot spinner mais leve. */
.lite .boot { transition: none; }
/* ===== Comportamento de app instalado (PWA standalone) =====
   Quando roda como app (display-mode: standalone / iOS standalone), reforça o
   look nativo: sem pull-to-refresh, sem seleção acidental, sem realce de toque,
   e o frame ocupa 100dvh respeitando as safe-areas. Não afeta o browser normal. */
@media (display-mode: standalone) {
  html, body {
    overscroll-behavior: none;
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none;
  }
  /* Inputs e áreas editáveis continuam selecionáveis. */
  input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
}
