/* ShopTHEO Jogos — hub /jogos (frente C1). Tokens em jogos-base.css. */
.stj-hub { font-family: inherit; line-height: 1.45; padding-bottom: 40px; }
.stj-hub h1, .stj-hub h2, .stj-hub h3, .stj-hub p { margin: 0; }
.stj-h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 12px !important; display: flex; align-items: center; gap: 8px; }
.stj-h2 .stj-h2__coin { width: 22px; height: 22px; }
.stj-small { font-size: .82rem; }
.stj-error { color: var(--stj-miss); font-weight: 600; padding: 8px 0; }
.stj-loading, .stj-empty { padding: 32px 16px; text-align: center; color: var(--stj-muted); }
.stj-legal { font-size: .82rem; color: var(--stj-muted); text-align: center; margin: 24px 16px 0 !important; }
.stj-legal a { color: var(--stj-orange-dark); }

/* Banner */
.stj-banner { position: relative; overflow: hidden; min-height: 200px; background: linear-gradient(135deg, var(--stj-orange) 0%, #ff7a2e 55%, var(--stj-orange-soft) 100%); color: #fff; }
.stj-banner__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.stj-banner__txt { position: relative; padding: 28px 16px 24px; max-width: 520px; }
.stj-banner__kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.stj-banner__title { font-size: clamp(1.45rem, 5.6vw, 2.4rem); line-height: 1.12; font-weight: 900; margin: 6px 0 8px !important; text-shadow: 0 2px 12px rgba(120, 30, 0, .35); }
.stj-banner__sub { font-size: .95rem; max-width: 30ch; text-shadow: 0 1px 8px rgba(120, 30, 0, .35); }
.stj-banner:has(.stj-banner__pic) { aspect-ratio: 1 / 1; background: #fbe6d6; color: var(--stj-ink); }
.stj-banner:has(.stj-banner__pic) .stj-banner__title, .stj-banner:has(.stj-banner__pic) .stj-banner__sub { text-shadow: none; }
.stj-banner:has(.stj-banner__pic) .stj-banner__kicker { color: var(--stj-orange-dark); opacity: 1; }
.stj-banner:has(.stj-banner__pic) .stj-banner__title em { font-style: normal; color: var(--stj-orange); }
.stj-banner:has(.stj-banner__pic) .stj-banner__txt { max-width: 100%; text-align: center; margin: 0 auto; }
.stj-banner:has(.stj-banner__pic) .stj-banner__sub { margin: 0 auto; }
@media (min-width: 768px) {
  .stj-banner { min-height: 260px; }
  .stj-banner:has(.stj-banner__pic) { aspect-ratio: 1600 / 500; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__txt { text-align: left; margin: 0; width: 56%; max-width: 640px; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__sub { margin: 0; }
  .stj-banner__txt { padding: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 56px); }
}

/* Celular (0.2.0): banner compacto de ~180 px — texto à esquerda, Theo recortado da arte 800x800 à direita,
   para os cards dos jogos aparecerem na primeira tela mesmo com o cabeçalho da loja (~190 px). */
@media (max-width: 767px) {
  .stj-banner:has(.stj-banner__pic) { aspect-ratio: auto; height: 180px; min-height: 0; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__pic img { inset: auto; top: auto; bottom: 0; right: -16%; left: auto; width: auto; height: 200%; max-width: none; object-fit: contain; object-position: right bottom; }
  .stj-banner:has(.stj-banner__pic)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fbe6d6 0%, rgba(251, 230, 214, .92) 46%, rgba(251, 230, 214, 0) 64%); pointer-events: none; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__txt { z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 12px 16px; width: 60%; max-width: 60%; margin: 0; text-align: left; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__kicker { font-size: .7rem; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__title { font-size: 1.22rem; line-height: 1.15; margin: 4px 0 6px !important; }
  .stj-banner:has(.stj-banner__pic) .stj-banner__sub { font-size: .78rem; line-height: 1.3; margin: 0; max-width: 24ch; }
  .stj-home { padding-top: 12px; }
  .stj-home > section { margin-top: 14px; }
  .stj-home > section:first-of-type { margin-top: 10px; }
}

/* Durante o jogo o banner sai para o jogo caber na primeira dobra. */
.stj-hub.is-playing .stj-banner { display: none; }

/* Barra do jogador. --stj-top = altura do cabeçalho fixo do tema (hub.js mede com ResizeObserver):
   a barra prende logo abaixo dele, sem cobrir o menu da loja; z-index abaixo do cabeçalho (20). */
.stj-hub { scroll-margin-top: var(--stj-top, 0px); }
.stj-player { position: sticky; top: var(--stj-top, 0px); z-index: 19; padding: 10px 12px; background: rgba(255, 246, 234, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--stj-line); }
.stj-player__in { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "bal cta" "streak streak"; gap: 8px 12px; align-items: center; }
.stj-player__bal { grid-area: bal; display: flex; align-items: center; gap: 8px; }
.stj-player__coin { display: inline-flex; width: 32px; height: 32px; }
.stj-player__coin img, .stj-player__coin svg { width: 32px; height: 32px; }
.stj-player__num { font-size: 1.4rem; line-height: 1; display: block; }
.stj-player__bal small { display: block; font-size: .72rem; color: var(--stj-muted); }
.stj-player__cta { grid-area: cta; }
.stj-streak { grid-area: streak; display: flex; align-items: center; gap: 10px; min-width: 0; }
.stj-streak__dots { display: flex; gap: 5px; padding: 0; margin: 0; list-style: none; }
.stj-streak__dots li { width: 14px; height: 14px; border-radius: 50%; background: var(--stj-cream-2); box-shadow: inset 0 0 0 2px var(--stj-line); }
.stj-streak__dots li.is-on { background: var(--stj-orange); box-shadow: none; }
.stj-streak__dots li.is-today { box-shadow: 0 0 0 3px rgba(226, 77, 0, .25); }
.stj-streak__dots li.is-next { box-shadow: inset 0 0 0 2px var(--stj-orange); animation: stj-blink 1.4s ease-in-out infinite; }
.stj-streak__txt { font-size: .8rem; color: var(--stj-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stj-streak__txt b { color: var(--stj-ink); }
@keyframes stj-blink { 50% { opacity: .35; } }
.stj-player__in:has(.stj-goal:not([hidden])) { grid-template-areas: "bal cta" "goal goal" "streak streak"; }
@media (min-width: 768px) {
  .stj-player__in { grid-template-columns: auto 1fr auto; grid-template-areas: "bal streak cta"; }
  .stj-player__in:has(.stj-goal:not([hidden])) { grid-template-areas: "bal streak cta" "goal goal goal"; }
  .stj-streak { justify-content: center; }
}

/* Próximo prêmio: "Faltam N Theo-moedas para R$ 5 de desconto" + barra. */
.stj-goal { grid-area: goal; display: grid; grid-template-columns: 1fr minmax(80px, 38%); gap: 10px; align-items: center; min-width: 0; transform-origin: left center; }
.stj-goal[hidden] { display: none; }
.stj-goal__txt { font-size: .8rem; font-weight: 700; color: var(--stj-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stj-goal .stj-bar { margin-top: 0; height: 8px; }
.stj-goal__go { justify-self: start; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; background: #157a40; color: #fff; box-shadow: 0 0 0 3px rgba(31, 157, 85, .25); } /* verde escuro: contraste AA com texto branco */
.stj-goal.is-ready .stj-bar span { background: var(--stj-ok); }
@media (max-width: 767px) {
  .stj-player { padding: 8px 12px; }
  .stj-player__in { gap: 6px 12px; }
  .stj-goal { grid-template-columns: 1fr; gap: 4px; }
  .stj-goal__go { min-height: 44px; }
  /* Na partida a barra fica enxuta (saldo + Trocar) para sobrar tela para o jogo. */
  .stj-hub.is-playing .stj-streak, .stj-hub.is-playing .stj-goal { display: none; }
}

/* Home */
.stj-home, .stj-stage { max-width: 1100px; margin: 0 auto; padding: 20px 16px 0; }
.stj-home > section { margin-top: 24px; }
.stj-notices { display: grid; gap: 12px; }
.stj-notice { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-left: 4px solid var(--stj-orange); }
.stj-notice p { font-size: .9rem; color: var(--stj-muted); margin-top: 2px !important; }
.stj-notice__act { display: flex; gap: 8px; flex-wrap: wrap; }
a.stj-btn { text-decoration: none; }

.stj-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* Colunas vêm do hub.js (--stj-cols-t / --stj-cols-d, pela quantidade de jogos do /config; 5 a 8 cards). */
@media (min-width: 768px) and (max-width: 1023px) { .stj-games { grid-template-columns: repeat(var(--stj-cols-t, 3), minmax(0, 1fr)); gap: 16px; } .stj-game.is-wide-t { grid-column: span 2; } }
@media (min-width: 1024px) { .stj-games { grid-template-columns: repeat(var(--stj-cols-d, 5), minmax(0, 1fr)); gap: 16px; } .stj-game.is-wide-d { grid-column: span 2; } }
.stj-game { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; color: inherit; text-decoration: none; transition: transform .18s var(--stj-ease), box-shadow .18s; overflow: hidden; }
.stj-game::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--stj-orange), var(--stj-orange-soft)); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--stj-ease); }
a.stj-game:hover::after, .stj-game.is-hot::after { transform: scaleX(1); }
a.stj-game:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(184, 58, 0, .2); }
a.stj-game:active { transform: scale(.97); }
.stj-game.is-off { opacity: .55; }
.stj-game.is-hot { box-shadow: 0 0 0 2px var(--stj-orange), var(--stj-shadow); }
.stj-game__icon { width: 72px; height: 72px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(145deg, var(--stj-cream) 0%, var(--stj-cream-2) 100%); box-shadow: inset 0 0 0 1px var(--stj-line); transition: transform .25s var(--stj-ease); }
.stj-game__icon img, .stj-game__icon svg { width: 48px; height: 48px; display: block; }
a.stj-game:hover .stj-game__icon { transform: scale(1.08) rotate(-3deg); }
.stj-game__tag { position: absolute; top: 12px; right: 12px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--stj-orange-dark); background: var(--stj-cream-2); padding: 2px 8px; border-radius: 999px; }
.stj-game__t { font-size: 1.05rem; font-weight: 800; line-height: 1.2; }
.stj-game__d { font-size: .82rem; color: var(--stj-muted); flex: 1; }
.stj-game__meta { font-size: .78rem; font-weight: 700; color: var(--stj-muted); margin-top: 6px; }
.stj-game__meta.is-hot { color: var(--stj-orange-dark); }
.stj-game__meta.is-hot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--stj-orange); animation: stj-blink 1.2s ease-in-out infinite; }

.stj-mission { padding: 16px; }
.stj-mission__head { display: flex; justify-content: space-between; align-items: baseline; }
.stj-mission__count { color: var(--stj-orange-dark); }
.stj-mission p { font-size: .9rem; color: var(--stj-muted); }
.stj-mission.is-done { border-color: var(--stj-ok); }
.stj-mission.is-done .stj-bar span { background: var(--stj-ok); }
.stj-bar { display: block; height: 10px; margin-top: 10px; border-radius: 999px; background: var(--stj-cream-2); overflow: hidden; }
.stj-bar span { display: block; height: 100%; background: var(--stj-orange); transform-origin: left; transition: transform .6s var(--stj-ease); }

.stj-how ol { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; counter-reset: stj; }
.stj-how li { counter-increment: stj; display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.stj-how li > span { flex: 1; }
.stj-how li::before { content: counter(stj); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--stj-orange); color: #fff; font-weight: 800; }
@media (min-width: 768px) { .stj-how ol { grid-template-columns: repeat(3, 1fr); } }

/* Palco do jogo */
.stj-stage__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.stj-stage__title { font-size: 1.25rem; font-weight: 900; flex: 1; outline: none; }
.stj-back { min-height: 40px; padding: 0 14px; }
.stj-levels { display: flex; gap: 6px; }
.stj-chip { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--stj-line); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; color: var(--stj-ink); }
.stj-chip.is-on { background: var(--stj-ink); color: #fff; box-shadow: none; }

/* Theo */
.stj-theo { position: fixed; left: 12px; bottom: 12px; z-index: 60; display: flex; align-items: flex-end; gap: 0; pointer-events: none; opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s var(--stj-ease); max-width: min(360px, calc(100vw - 24px)); }
.stj-theo.is-on { opacity: 1; transform: none; }
.stj-theo__img { flex: none; display: block; height: 168px; filter: drop-shadow(0 8px 14px rgba(120, 30, 0, .25)); }
.stj-theo__img img { height: 168px; width: auto; display: block; }
.stj-theo__img svg { width: 72px; height: 72px; }
@media (max-width: 767px) { .stj-theo__img, .stj-theo__img img { height: 120px; } }
.stj-theo__msg { position: relative; margin: 0 0 10px 6px !important; padding: 12px 16px; background: #fff; border-radius: 16px 16px 16px 4px; box-shadow: var(--stj-shadow); border: 1px solid var(--stj-line); font-size: 1rem; font-weight: 700; }
/* Celular, durante a partida: o balão mora na barra do jogador (topo, fora da área do jogo) e some sozinho. */
.stj-player .stj-theo { position: absolute; inset: 0; left: 0; bottom: 0; z-index: 2; max-width: none; align-items: center; gap: 6px; padding: 4px 12px; background: var(--stj-cream); transform: translateY(-6px); }
.stj-player .stj-theo.is-on { transform: none; }
.stj-player .stj-theo__img, .stj-player .stj-theo__img img { height: 64px; filter: none; }
.stj-player .stj-theo__img svg { width: 44px; height: 44px; }
.stj-player .stj-theo__msg { flex: 1; min-width: 0; padding: 8px 12px; font-size: .85rem; line-height: 1.25; border-radius: 14px 14px 14px 4px; box-shadow: none; }
.stj-levels:empty { display: none; }

/* Efeitos */
.stj-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }
.stj-flycoin { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; will-change: transform; }
.stj-toast { position: fixed; left: 50%; bottom: 20px; z-index: 96; transform: translateX(-50%); background: var(--stj-ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .9rem; font-weight: 600; max-width: calc(100vw - 32px); animation: stj-in .25s var(--stj-ease); }
@keyframes stj-in { from { opacity: 0; transform: translate(-50%, 10px); } }
/* Celular: o aviso sai no topo (abaixo do cabeçalho da loja), longe do balão do Theo e do jogo (P10). */
@media (max-width: 767px) {
  .stj-toast { bottom: auto; top: calc(var(--stj-top, 0px) + 8px); width: max-content; text-align: center; }
}

/* Modal de resultado */
.stj-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(21, 23, 26, .55); animation: stj-fade .2s; }
@keyframes stj-fade { from { opacity: 0; } }
.stj-modal__box { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px 18px; text-align: center; animation: stj-pop .3s var(--stj-ease); }
@keyframes stj-pop { from { transform: scale(.92); opacity: 0; } }
.stj-result__theo { display: block; height: 190px; margin: -12px auto 2px; filter: drop-shadow(0 10px 16px rgba(120, 30, 0, .22)); }
.stj-result__theo img { height: 190px; width: auto; display: block; margin: 0 auto; }
.stj-result__theo svg { width: 80px; height: 80px; margin-top: 60px; }
@media (max-width: 767px) { .stj-result__theo, .stj-result__theo img { height: 150px; } }
.stj-result__pts { font-size: 1.8rem; color: var(--stj-ink); }
.stj-result__pts.is-won { color: var(--stj-orange-dark); }
.stj-result__msg { margin-top: 4px !important; font-weight: 600; }
.stj-result__status { margin-top: 8px !important; font-size: .85rem; color: var(--stj-muted); background: var(--stj-cream); border-radius: 10px; padding: 8px 10px; }
.stj-result__status.is-pending_login, .stj-result__status.is-pending_email, .stj-result__status.is-capped { color: var(--stj-orange-dark); background: var(--stj-cream-2); }
.stj-result__bonus { margin-top: 8px !important; font-weight: 800; color: var(--stj-ok); }
.stj-result__prods { margin-top: 16px; text-align: left; }
.stj-result__prods h3 { font-size: .9rem; margin-bottom: 8px; }
.stj-result__act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.stj-result__act .stj-btn { flex: 1 1 140px; }

.stj-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.stj-prod { display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--stj-line); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; font-size: .78rem; }
.stj-prod:hover { border-color: var(--stj-orange); }
.stj-prod img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.stj-prod__n { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stj-prod__p { font-weight: 800; color: var(--stj-orange-dark); }

.stj-offer { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--stj-line); }
.stj-offer__btn { width: 100%; }
.stj-offer__note { font-size: .8rem; margin-top: 6px !important; }

.stj-coupon { margin-top: 12px; padding: 12px; border: 2px dashed var(--stj-orange); border-radius: 12px; background: var(--stj-cream); text-align: left; }
.stj-coupon__row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.stj-coupon__code { font-size: 1.15rem; font-weight: 900; letter-spacing: .06em; user-select: all; }
.stj-coupon__info { font-size: .8rem; color: var(--stj-muted); margin-top: 6px !important; }

/* Gaveta */
.stj-drawer { position: fixed; inset: 0; z-index: 70; background: rgba(21, 23, 26, .45); animation: stj-fade .2s; }
.stj-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--stj-cream); padding: 16px; overflow: auto; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); animation: stj-slide .28s var(--stj-ease); }
@keyframes stj-slide { from { transform: translateX(40px); opacity: 0; } }
.stj-drawer__head { display: flex; justify-content: space-between; align-items: center; }
.stj-x { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--stj-ink); border-radius: 50%; }
.stj-drawer__bal { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px !important; }
.stj-drawer__bal b { font-size: 1.2rem; }
.stj-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.stj-tab { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--stj-line); font: inherit; font-weight: 700; cursor: pointer; color: var(--stj-ink); }
.stj-tab.is-on { background: var(--stj-ink); color: #fff; box-shadow: none; }
.stj-drawer__body { display: grid; gap: 12px; }
.stj-rewards { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.stj-reward { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; }
.stj-reward > div { flex: 1; min-width: 0; }
.stj-reward p { font-size: .8rem; }
.stj-reward__miss { color: var(--stj-orange-dark); font-weight: 700; }
.stj-reward .stj-bar { height: 6px; margin-top: 6px; }
.stj-redeem-result:empty { display: none; }
.stj-redeem-result h3 { font-size: 1rem; }
.stj-ledger { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; background: #fff; border-radius: 12px; border: 1px solid var(--stj-line); }
.stj-ledger li { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--stj-line); }
.stj-ledger li:first-child { border-top: 0; }
.stj-ledger small { display: block; font-size: .75rem; }
.stj-ledger .is-pos { color: var(--stj-ok); }
.stj-ledger .is-neg { color: var(--stj-miss); }

/* Anúncio em andamento (stj:ad-start … stj:ad-end): congela animações. */
.stj.is-ad *, .stj.is-ad *::before { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .stj-streak__dots li.is-next, .stj-game__meta.is-hot::before { animation: none; }
}
