/* Base comum às duas lojas */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

body.modo-tela { overflow: hidden; overscroll-behavior: none; background: #000; }
.store-raiz { position: relative; width: 100%; height: 100%; overflow: hidden; }
.store-raiz--tela { position: fixed; inset: 0; height: 100dvh; }

.store {
  position: absolute; inset: 0;
  display: block; overflow: hidden;
  isolation: isolate;
  container-type: inline-size; container-name: loja;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  user-select: none; -webkit-user-select: none;
  --raio-tela: 0px;
}
.store.com-moldura.ios { --raio-tela: 55px; }
.store.com-moldura.android { --raio-tela: 44px; }
.store svg { width: 1em; height: 1em; flex: none; display: block; }
.store :focus-visible { outline: 2px solid var(--foco, #0a84ff); outline-offset: 2px; border-radius: 6px; }

.trilho { scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.trilho::-webkit-scrollbar { display: none; }
.trilho.arrastando { scroll-snap-type: none !important; cursor: grabbing; }
.trilho.arrastando * { pointer-events: none; }

/* ---------- Estrelas ---------- */
.estrelas { position: relative; display: inline-flex; line-height: 0; vertical-align: middle; }
.estrelas-base, .estrelas-cheias { display: inline-flex; gap: var(--gap-est, 1px); }
.estrelas-cheias { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }
.estrelas svg { width: var(--tam-est, 11px); height: var(--tam-est, 11px); }

/* ---------- Captura de tela "de marketing" ---------- */
.cap {
  position: relative; overflow: hidden; width: 100%;
  aspect-ratio: var(--ar, 9 / 19.5);
  background: var(--cor, #111);
  container-type: inline-size;
  font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.cap > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; pointer-events: none; }
.cap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cor) 55%, #050816) 0%, color-mix(in srgb, var(--cor) 30%, transparent) 26%, transparent 46%),
    linear-gradient(0deg, rgba(4, 8, 22, .55) 0%, transparent 18%);
}
.cap figcaption { position: absolute; z-index: 1; top: 0; left: 0; right: 0; padding: 11cqw 8cqw 0; color: #fff; text-align: center; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.cap small { display: block; font-size: 4.3cqw; letter-spacing: .14em; font-weight: 800; opacity: .9; }
.cap strong { display: block; font-size: 8.6cqw; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin-top: 2.4cqw; text-wrap: balance; }
/* Arte dark minimalista: imagem 2:3 ancorada embaixo; o topo do card usa a
   cor sólida do fundo da arte (--fundo), então não há corte nem emenda visível */
.cap--arte { background: var(--fundo, #050914); }
.cap--arte::after { content: none; }
.cap--arte > img:first-child {
  inset: auto auto 0 50%; width: calc(100% * var(--zoom-ios, 1)); max-width: none; height: auto; aspect-ratio: 2 / 3; translate: -50% 0;
  -webkit-mask-image: linear-gradient(transparent, #000 12%); mask-image: linear-gradient(transparent, #000 12%);
}
/* iPhone (9:19,5) é mais alto: título desce e cresce; Android (9:16) sobe */
.cap--arte figcaption { padding: var(--topo, 31cqw) 6.5cqw 0; text-shadow: none; }
/* card com linha de apoio: começa mais alto no iPhone para caber o texto */
.cap--arte.cap--com-sub { --topo: 25cqw; --titulo: 11cqw; }
.cap--arte strong em { font-style: normal; color: var(--destaque, var(--cor)); }
.cap--arte .cap-sub { display: block; margin: 3.4cqw auto 0; max-width: 78cqw; font-size: var(--sub, 4cqw); line-height: 1.38; font-weight: 500; letter-spacing: -.005em; color: rgba(226, 233, 250, .68); text-wrap: balance; }
.and-captura .cap--arte, .galeria--android .cap--arte { --topo: 12cqw; --titulo: 8.6cqw; --sub: 3.6cqw; }
.and-captura .cap--com-sub, .galeria--android .cap--com-sub { --titulo: 10cqw; }
.and-captura .cap--arte > img:first-child, .galeria--android .cap--arte > img:first-child { width: calc(100% * var(--zoom, 1)); }
.cap--arte small { font-size: 3.5cqw; letter-spacing: .22em; font-weight: 700; color: var(--cor); opacity: 1; }
.cap--arte strong { font-size: var(--titulo, 9.5cqw); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; margin-top: 3.2cqw; color: #f4f6fb; }
.cap-marca { position: absolute; z-index: 1; left: 50%; bottom: 6cqw; width: 42cqw; translate: -50% 0; opacity: .92; pointer-events: none; }

/* ---------- Barras de status (só na moldura) ---------- */
.sb { position: absolute; z-index: 60; top: 0; left: 0; right: 0; display: flex; align-items: center; pointer-events: none; color: var(--txt); transition: color .3s; }
.com-app .sb { color: #fff; z-index: 100; }
.sb-ios { height: 54px; display: grid; grid-template-columns: 1fr 126px 1fr; padding-top: 4px; font: 600 17px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif; letter-spacing: -.01em; }
.sb-ios .sb-hora { justify-self: center; padding-left: 14px; }
.sb-ios .sb-dir { justify-self: center; display: flex; align-items: center; gap: 6px; padding-right: 12px; }
.sb-ios .sb-dir svg { width: 17px; height: 12px; }
.sb-ios .sb-bat svg { width: 27px; height: 13px; }
.sb-and { height: 36px; justify-content: space-between; padding: 0 22px 0 26px; font: 500 14px/1 Roboto, system-ui, sans-serif; }
.sb-and .sb-esq { display: flex; align-items: center; gap: 8px; }
.sb-and .sb-dir { display: flex; align-items: center; gap: 5px; }
.sb-and .sb-dir svg { width: 15px; height: 15px; }
.sb-and .sb-bat svg { width: 16px; height: 16px; }
.sb-baixando { display: none; }
.sb-baixando svg { width: 15px; height: 15px; animation: sobeDesce 1s ease-in-out infinite; }
.android.baixando .sb-baixando { display: block; }
@keyframes sobeDesce { 50% { transform: translateY(2px); opacity: .55; } }

.indicador-home, .barra-gestos { position: absolute; z-index: 70; left: 50%; translate: -50% 0; pointer-events: none; background: var(--txt); transition: background .3s; }
.indicador-home { bottom: 8px; width: 138px; height: 5px; border-radius: 3px; }
.barra-gestos { bottom: 8px; width: 110px; height: 4px; border-radius: 2px; opacity: .55; }
.com-app .indicador-home, .com-app .barra-gestos { background: #fff; }

/* ---------- Aviso ---------- */
.aviso {
  position: absolute; z-index: 90; left: 50%; display: flex; align-items: center; gap: 10px;
  translate: -50% 12px; opacity: 0; pointer-events: none;
  transition: opacity .25s, translate .3s cubic-bezier(.2, .9, .3, 1.2);
  max-width: calc(100% - 32px);
}
.aviso.visivel { opacity: 1; translate: -50% 0; pointer-events: auto; }
.aviso-ic svg { width: 18px; height: 18px; }
.ios .aviso {
  bottom: calc(var(--sb) + 86px); padding: 12px 18px; border-radius: 999px; white-space: nowrap;
  font-size: 15px; font-weight: 600; color: var(--txt);
  background: var(--vidro); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: .5px solid var(--vidro-borda); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.ios .aviso-acao { color: var(--azul); font-weight: 600; }
.android .aviso {
  bottom: calc(var(--sb) + 92px); left: 16px; right: 16px; translate: 0 12px; max-width: none;
  padding: 14px 16px; border-radius: 4px; font: 400 14px/20px Roboto, system-ui, sans-serif;
  background: var(--snack, #313033); color: var(--snack-txt, #f4eff4); box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.android .aviso.visivel { translate: 0 0; }
.android .aviso-txt { flex: 1; }
.android .aviso-acao { color: var(--snack-acao, #a8dab5); font-weight: 500; padding: 4px 8px; margin: -4px -8px -4px 0; border-radius: 20px; }

/* ---------- Camadas ---------- */
.camada { position: absolute; inset: 0; z-index: 80; }

/* Galeria */
.galeria { display: flex; flex-direction: column; opacity: 0; transition: opacity .3s; }
.galeria.aberta { opacity: 1; }
.galeria--ios { background: var(--bg); }
.galeria--android { background: #000; color: #fff; }
.galeria-topo { flex: none; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--st) + 6px) 16px 6px; min-height: calc(var(--st) + 52px); }
.galeria-ok { color: var(--azul); font-size: 17px; font-weight: 600; padding: 8px 4px; }
.galeria-voltar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; margin-left: -8px; }
.galeria-voltar svg { width: 24px; height: 24px; }
.galeria-cont { font: 400 14px Roboto, system-ui, sans-serif; opacity: .8; }
.galeria-trilho { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; outline: none; }
.galeria-item { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; container-type: size; padding: 8px 0; transform: scale(.94); transition: transform .35s; }
.galeria.aberta .galeria-item { transform: none; }
.galeria-item .cap { width: min(calc(100cqw - 40px), calc((100cqh - 16px) * 9 / 19.5)); border-radius: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
.galeria--android .galeria-item .cap { --ar: 9 / 16; width: min(calc(100cqw - 32px), calc((100cqh - 16px) * 9 / 16)); border-radius: 8px; }
.galeria-pontos { flex: none; display: flex; justify-content: center; gap: 7px; padding: 10px 0 calc(var(--sb) + 14px); }
.galeria-pontos i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .25; transition: opacity .2s, transform .2s; }
.galeria--ios .galeria-pontos { color: var(--txt); }
.galeria-pontos i.on { opacity: .9; transform: scale(1.15); }

/* Trailer */
.trailer { background: #000; color: #fff; display: flex; flex-direction: column; opacity: 0; transition: opacity .3s; font-family: Roboto, system-ui, sans-serif; }
.trailer.aberta { opacity: 1; }
.trailer-topo { display: flex; align-items: center; gap: 8px; padding: calc(var(--st) + 4px) 8px 4px; }
.trailer-titulo { flex: 1; font-size: 16px; font-weight: 500; }
.trailer-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; }
.trailer-btn svg { width: 24px; height: 24px; }
.trailer-palco { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.trailer-slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .6s; }
.trailer-slide.on { opacity: 1; }
.trailer-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transform: scale(1.02); }
.trailer-slide.on img { animation: kenBurns calc(var(--dur) + 800ms) linear forwards; }
.trailer.pausado .trailer-slide.on img, .trailer.pausado .trailer-barras b.rodando { animation-play-state: paused; }
@keyframes kenBurns { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.14) translateX(-2%); } }
.trailer-legenda { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; padding: 0 24px; text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }
.trailer-legenda strong { display: block; font: 800 28px/1.1 Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.trailer-legenda span { display: block; margin-top: 6px; font-size: 15px; opacity: .9; }
.trailer-slide.on .trailer-legenda { animation: legendaEntra .7s .2s both cubic-bezier(.2, .9, .3, 1); }
@keyframes legendaEntra { from { opacity: 0; transform: translateY(14px); } }
.trailer-fim { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(0, 0, 0, .78); backdrop-filter: blur(6px); }
.trailer-fim img { border-radius: 14px; }
.trailer-fim strong { font-size: 18px; font-weight: 500; }
.trailer-repetir { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .5); font-weight: 500; }
.trailer-repetir svg { width: 20px; height: 20px; }
.trailer-barras { display: flex; gap: 4px; padding: 14px 16px calc(var(--sb) + 18px); }
.trailer-barras i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.trailer-barras b { display: block; height: 100%; width: 0; background: #fff; }
.trailer-barras b.cheia { width: 100%; }
.trailer-barras b.rodando { animation: barraTrailer var(--dur) linear forwards; }
@keyframes barraTrailer { to { width: 100%; } }

/* ---------- App aberto (após instalar) ---------- */
.app-aberto { position: absolute; inset: 0; z-index: 95; background: #041246; color: #fff; overflow: hidden; font-family: Inter, -apple-system, system-ui, sans-serif; }
.app-splash { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .5s; }
.app-logo { width: 34%; max-width: 140px; transition: opacity .35s, transform .5s cubic-bezier(.2, .9, .3, 1); }
.app-palavra { position: absolute; width: 64%; max-width: 300px; opacity: 0; transform: scale(.94); transition: opacity .45s .1s, transform .6s .1s cubic-bezier(.2, .9, .3, 1); }
.app-carregando { position: absolute; bottom: calc(var(--sb) + 64px); width: 40%; max-width: 160px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; opacity: 0; transition: opacity .3s .2s; }
.app-carregando i { display: block; height: 100%; width: 40%; border-radius: 2px; background: #fcc300; animation: carregando 1.1s ease-in-out infinite; }
@keyframes carregando { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.fase-palavra .app-logo { opacity: 0; transform: scale(.7); }
.fase-palavra .app-palavra { opacity: 1; transform: none; }
.fase-palavra .app-carregando { opacity: 1; }
.app-status { position: absolute; bottom: calc(var(--sb) + 30px); margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: rgba(255, 255, 255, .7); opacity: 0; transition: opacity .3s .3s; }
.fase-palavra .app-status { opacity: 1; }
.fase-saindo .app-splash { opacity: 0; transform: scale(1.04); transition: opacity .35s, transform .35s; }
.app-home { position: absolute; z-index: 3; left: 50%; bottom: 0; width: 180px; height: 26px; translate: -50% 0; cursor: grab; }

/* ---------- Ondas (Material ripple) ---------- */
.rip { position: relative; overflow: hidden; }
.onda { position: absolute; border-radius: 50%; background: currentColor; opacity: .16; transform: scale(0); animation: onda .6s ease-out forwards; pointer-events: none; }
@keyframes onda { to { transform: scale(1); opacity: 0; } }

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

/* Diálogos recebem foco ao abrir, sem contorno */
[role=alertdialog]:focus { outline: none; }
