/* Mestres Play · certificados do aluno (núcleo, 27/10/2026). Par do cert-aluno.js.
   Vale nas duas versões do visual, então nada aqui depende de body.mp-novo: todo seletor começa com uma classe .mca-
   (ou html.mca-), as animações são @keyframes mca-*. Sem nada disso na página, nenhum pixel muda.
   Cores e medidas do visual novo: fundo #0f0f11, cartões #151517/#1d1d20, dourado #e5b66c, verde da plataforma #91d95b,
   texto #f5f5f7/#a1a1a8, botões de 46 px, cantos de 12 a 26 px. Fontes Sora e DM Sans (as do cert.css, que chega junto). */

/* ---------- comuns ---------- */
.mca {
  color: #f5f5f7; text-align: left; line-height: 1.4;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mca *, .mca *::before, .mca *::after { box-sizing: border-box; }
.mca-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mca-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; letter-spacing: .06em; }
html.mca-travado, html.mca-travado body { overflow: hidden; }

.mca-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; margin: 0; border-radius: 12px; border: 1px solid transparent;
  font: 650 15px/1.2 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
  -webkit-transition: background-color .15s, border-color .15s, color .15s; transition: background-color .15s, border-color .15s, color .15s;
}
.mca-btn svg { flex: none; width: 18px; height: 18px; }
.mca-btn:focus-visible, .mca-voltar:focus-visible, .mca-x:focus-visible { outline: 2px solid #e5b66c; outline-offset: 3px; }
.mca-btn:disabled { opacity: .6; cursor: default; }
.mca-btn-ouro { background: #e5b66c; color: #1a1408; }
.mca-btn-ouro:hover { background: #f0c47c; color: #1a1408; }
.mca-btn-vidro { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #e0e0e5; }
.mca-btn-vidro:hover { background: rgba(255, 255, 255, .1); border-color: rgba(229, 182, 108, .45); color: #f5f5f7; }
.mca-btn-fantasma { background: none; color: #a1a1a8; }
.mca-btn-fantasma:hover { color: #f5f5f7; background: rgba(255, 255, 255, .05); }
.mca-x {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: none; color: #c9c9cf; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mca-x:hover { background: rgba(255, 255, 255, .08); color: #f5f5f7; }

/* a tela de hoje (#view-cert) perde o "← Voltar" e o rodapé: as telas novas têm os delas */
.mca-vista > .back, .mca-vista > footer { display: none !important; }
/* validação aberta por quem não entrou: sem o cabeçalho do visual novo (o antigo já some no boot) */
html.mca-publico #mpn-topo, html.mca-publico #mpn-abas { display: none !important; }

/* ---------- página do certificado (#/certificado/CODIGO) ---------- */
.mca-pagina { padding: 22px 0 72px; }
.mca-barra { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; max-width: 1100px; margin: 0 auto 26px; }
.mca-voltar {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; margin-left: -8px; border-radius: 12px;
  color: #d2d2d8; font: 650 15px/1 "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif; text-decoration: none;
}
.mca-voltar svg { width: 20px; height: 20px; }
.mca-voltar:hover { color: #f5f5f7; background: rgba(255, 255, 255, .05); }
.mca-acoes-pag { display: flex; flex-wrap: wrap; gap: 8px; }
.mca-papel { position: relative; max-width: 1100px; margin: 0 auto; isolation: isolate; }
.mca-papel::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: -40px; height: 46%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 70% at 50% 30%, rgba(229, 182, 108, .16), transparent 72%);
}
.mca-faixa-rev {
  display: flex; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto 18px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 143, 134, .08); border: 1px solid rgba(255, 143, 134, .35); color: #ffb4ab; font-size: 15px; font-weight: 650;
}
.mca-faixa-rev svg { flex: none; width: 18px; height: 18px; }
.mca-vazio { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 1100px; margin: 0 auto; padding: 72px 20px; text-align: center; }
.mca-vazio p { margin: 0; font-size: 17px; font-weight: 600; color: #d2d2d8; }
.mca-vazio-ico { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #1d1d20; color: #8e8e96; }
.mca-vazio-ico svg { width: 30px; height: 30px; }

/* ---------- validação (#/verificar/CODIGO): o selo é a estrela ---------- */
.mca-valida { max-width: 1100px; margin: 0 auto; padding: 48px 0 56px; }
.mca-v-topo { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: center; gap: 56px; }
.mca-selo { position: relative; width: 100%; max-width: 400px; aspect-ratio: 1 / 1; margin: 0 auto; isolation: isolate; }
.mca-selo::before {
  content: ""; position: absolute; left: -16%; top: -16%; right: -16%; bottom: -16%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(229, 182, 108, .26) 0%, rgba(229, 182, 108, .09) 42%, transparent 68%);
}
.mca-selo .mpc { display: block; width: 100%; height: 100%; gap: 0; }
.mca-selo .mpc-selo { display: block; width: 100%; height: 100%; overflow: visible; }
.mca-selo .mpc .mpc-hx-aura { display: inline; }
.mca-rev .mca-selo::before, .mca-nao .mca-selo::before, .mca-limite .mca-selo::before, .mca-erro .mca-selo::before { background: radial-gradient(circle, rgba(255, 255, 255, .05) 0%, transparent 62%); }
.mca-selo-vazio {
  position: absolute; left: 8%; top: 8%; right: 8%; bottom: 8%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center; color: #6f6f78;
}
.mca-selo-vazio svg { width: 30%; height: 30%; }
.mca-v-estado {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 9px 16px 9px 10px; border-radius: 999px;
  font: 700 16px/1.2 "Sora", "DM Sans", -apple-system, sans-serif; letter-spacing: -.01em;
}
.mca-v-estado i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mca-v-estado i svg { width: 16px; height: 16px; }
.mca-ok .mca-v-estado { color: #b9ef8f; background: rgba(145, 217, 91, .1); border: 1px solid rgba(145, 217, 91, .38); }
.mca-ok .mca-v-estado i { background: #91d95b; color: #0f1a07; }
.mca-rev .mca-v-estado { color: #ffb4ab; background: rgba(255, 143, 134, .1); border: 1px solid rgba(255, 143, 134, .4); }
.mca-rev .mca-v-estado i { background: #ff8f86; color: #2a0b08; }
.mca-nao .mca-v-estado { padding: 0; border-radius: 0; font-size: clamp(24px, 2.6vw, 32px); color: #f5f5f7; }
.mca-limite .mca-v-estado, .mca-erro .mca-v-estado { display: block; padding: 0; border-radius: 0; max-width: 30ch; font-size: 22px; line-height: 1.3; color: #f5f5f7; }
.mca-v-cod { margin: 14px 0 0; font-size: 18px; color: #a1a1a8; }
.mca-v-info > .mca-btn { margin-top: 22px; }
.mca-v-dados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin: 28px 0 0; padding: 26px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.mca-v-dados > div { min-width: 0; }
.mca-v-dados dt { font: 700 11px/1 "DM Sans", -apple-system, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: #8e8e96; }
.mca-v-dados dd { margin: 9px 0 0; font: 600 17px/1.3 "Sora", "DM Sans", -apple-system, sans-serif; color: #f5f5f7; overflow-wrap: anywhere; }
.mca-v-dados .mca-v-nome { grid-column: 1 / -1; }
.mca-v-dados .mca-v-nome dd { font-size: clamp(28px, 3.3vw, 42px); line-height: 1.08; letter-spacing: -.025em; }
.mca-v-dados dd.mca-mono { font-size: 16px; color: #d2d2d8; }
.mca-rev .mca-v-dados dd { color: #a1a1a8; }
.mca-v-cert { max-width: 920px; margin: 64px auto 0; }
.mca-so-frente .mpc-verso { display: none !important; }
.mca-v-pe { margin: 30px 0 0; text-align: center; font-size: 14px; color: #8e8e96; }

/* ---------- esperando o servidor ---------- */
.mca-espera .mca-selo-espera,
.mca-espera .mca-linha-espera,
.mca-espera .mca-folha-espera {
  display: block; background: linear-gradient(100deg, #18181b 30%, #232327 50%, #18181b 70%); background-size: 300% 100%;
}
.mca-espera .mca-selo-espera { position: absolute; left: 8%; top: 8%; right: 8%; bottom: 8%; border-radius: 50%; }
.mca-espera .mca-linha-espera { width: 70%; height: 22px; margin: 0 0 14px; border-radius: 8px; }
.mca-espera .mca-curta { width: 44%; }
.mca-espera .mca-folha-espera { width: 100%; aspect-ratio: 297 / 210; border-radius: 10px; }

/* ---------- janelas (nome e comemoração) ---------- */
.mca-veu {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 200; overflow-y: auto; padding: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 7, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* "Seu nome no certificado" */
.mca-janela {
  position: relative; width: 100%; max-width: 460px; margin: auto; padding: 22px 22px 18px; text-align: center;
  background: #151517; border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
.mca-previa {
  position: relative; aspect-ratio: 2480 / 1754; margin: 0 0 20px; border-radius: 14px; overflow: hidden; text-align: left;
  background: radial-gradient(70% 90% at 85% 15%, rgba(229, 182, 108, .3), transparent 60%), #111113; border: 1px solid rgba(229, 182, 108, .45);
}
.mca-previa img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.mca-previa::after { content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: linear-gradient(90deg, rgba(6, 7, 8, .9) 0%, rgba(6, 7, 8, .55) 52%, rgba(6, 7, 8, 0) 78%); }
.mca-previa-txt { position: absolute; left: 7%; top: 0; bottom: 0; z-index: 1; width: 62%; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.mca-previa-rot { font: 800 10px/1.2 "DM Sans", -apple-system, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #e5b66c; }
.mca-previa-nome {
  font: 600 24px/1.08 "Sora", "DM Sans", -apple-system, sans-serif; letter-spacing: -.02em; color: #f5f5f7; overflow-wrap: anywhere;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
}
.mca-janela-t { margin: 0 0 14px; font: 700 20px/1.2 "Sora", "DM Sans", -apple-system, sans-serif; letter-spacing: -.02em; color: #f5f5f7; }
.mca-campo {
  display: block; width: 100%; min-height: 52px; margin: 0; padding: 0 16px; border-radius: 14px;
  background: #0f0f11; border: 1px solid rgba(255, 255, 255, .18); color: #f5f5f7; text-align: center;
  font: 600 18px/1.2 "Sora", "DM Sans", -apple-system, sans-serif; -webkit-appearance: none; appearance: none;
}
.mca-campo:focus { outline: none; border-color: #e5b66c; box-shadow: 0 0 0 3px rgba(229, 182, 108, .22); }
.mca-msg { min-height: 20px; margin: 8px 0 0; font-size: 13.5px; line-height: 1.4; color: #ffb4ab; }
.mca-janela-acoes { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.mca-janela .mca-x { top: 28px; right: 28px; width: 36px; height: 36px; background: rgba(15, 15, 17, .62); color: #f5f5f7; }
.mca-janela .mca-x:hover { background: rgba(15, 15, 17, .85); }
.mca-janela .mca-x svg { width: 18px; height: 18px; }

/* "Certificado liberado" */
.mca-festa {
  position: relative; width: 100%; max-width: 660px; margin: auto; padding: 34px 30px 26px; text-align: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 70% at 50% 0%, rgba(229, 182, 108, .18), transparent 62%), #141416;
  border: 1px solid rgba(229, 182, 108, .3); border-radius: 26px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.mca-festa-raios {
  position: absolute; left: 50%; top: 52%; z-index: -1; width: 150%; height: 0; padding-bottom: 150%; margin: -75% 0 0 -75%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(229, 182, 108, .1) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%); mask-image: radial-gradient(circle, #000 0%, transparent 60%);
}
.mca-faiscas { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none; }
.mca-faisca {
  position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; opacity: 0;
  background: #fff1cc; box-shadow: 0 0 10px 2px rgba(229, 182, 108, .8);
}
.mca-festa-t { margin: 0 0 22px; font: 700 28px/1.15 "Sora", "DM Sans", -apple-system, sans-serif; letter-spacing: -.03em; color: #f5f5f7; }
.mca-festa-cert { position: relative; border-radius: 10px; box-shadow: 0 26px 70px -24px rgba(229, 182, 108, .45); }
.mca-festa-cert .mpc { gap: 0; }
.mca-festa-cert::after {
  content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 1; border-radius: 10px; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 222, .32) 50%, transparent 62%); background-size: 260% 100%; background-position: 120% 0;
}
.mca-festa-arte { display: block; width: 100%; height: auto; border-radius: 10px; }
.mca-festa-acoes { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.mca-festa-acoes .mca-btn { min-width: 180px; }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .mca-valida { padding: 26px 0 40px; }
  .mca-v-topo { grid-template-columns: minmax(0, 1fr); gap: 28px; justify-items: center; }
  .mca-selo { max-width: 248px; }
  .mca-v-info { width: 100%; text-align: center; }
  .mca-v-dados { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; padding-top: 22px; text-align: left; }
  .mca-v-dados dd { font-size: 15.5px; }
  .mca-v-cert { margin-top: 40px; }
  .mca-limite .mca-v-estado, .mca-erro .mca-v-estado { margin: 0 auto; }
}
@media (max-width: 640px) {
  .mca-pagina { padding-top: 12px; }
  .mca-barra { margin-bottom: 18px; }
  .mca-acoes-pag { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mca-acoes-pag .mca-btn { padding: 0 10px; }
  .mca-acoes-pag .mca-btn-ouro { grid-column: 1 / -1; }
  .mca-papel .mpc { gap: 14px; }
  .mca-veu { padding: 12px; }
  .mca-nome-veu { align-items: flex-end; padding: 0; }
  .mca-janela { max-width: none; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .mca-festa { padding: 28px 14px 14px; border-radius: 22px; }
  .mca-festa-t { margin-bottom: 18px; font-size: 23px; }
  .mca-festa-acoes { flex-direction: column; gap: 8px; margin-top: 18px; }
  .mca-festa-acoes .mca-btn { width: 100%; min-width: 0; }
}

/* ---------- movimento: só para quem não pediu menos, e nada fica rodando para sempre ---------- */
@media (prefers-reduced-motion: no-preference) {
  .mca-veu { -webkit-animation: mca-aparece .22s ease-out both; animation: mca-aparece .22s ease-out both; }
  .mca-janela { -webkit-animation: mca-sobe .34s cubic-bezier(.2, .8, .2, 1) both; animation: mca-sobe .34s cubic-bezier(.2, .8, .2, 1) both; }
  .mca-festa { -webkit-animation: mca-sobe .5s cubic-bezier(.2, .8, .2, 1) both; animation: mca-sobe .5s cubic-bezier(.2, .8, .2, 1) both; }
  .mca-festa-cert { -webkit-animation: mca-cert .9s cubic-bezier(.16, .9, .24, 1) .12s both; animation: mca-cert .9s cubic-bezier(.16, .9, .24, 1) .12s both; }
  .mca-festa-cert::after { -webkit-animation: mca-brilho 1.5s ease-in-out .8s 1 both; animation: mca-brilho 1.5s ease-in-out .8s 1 both; }
  .mca-festa-raios { -webkit-animation: mca-gira 24s linear 1 both; animation: mca-gira 24s linear 1 both; }
  .mca-faisca { -webkit-animation: mca-faisca 1.4s ease-out .5s 1 both; animation: mca-faisca 1.4s ease-out .5s 1 both; }
  .mca-espera .mca-selo-espera,
  .mca-espera .mca-linha-espera,
  .mca-espera .mca-folha-espera { -webkit-animation: mca-espera 1.4s ease-in-out infinite; animation: mca-espera 1.4s ease-in-out infinite; }
}
@-webkit-keyframes mca-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes mca-aparece { from { opacity: 0; } to { opacity: 1; } }
@-webkit-keyframes mca-sobe { from { opacity: 0; -webkit-transform: translateY(24px) scale(.98); transform: translateY(24px) scale(.98); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes mca-sobe { from { opacity: 0; -webkit-transform: translateY(24px) scale(.98); transform: translateY(24px) scale(.98); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes mca-cert { from { opacity: 0; -webkit-transform: perspective(900px) rotateX(14deg) translateY(26px) scale(.9); transform: perspective(900px) rotateX(14deg) translateY(26px) scale(.9); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes mca-cert { from { opacity: 0; -webkit-transform: perspective(900px) rotateX(14deg) translateY(26px) scale(.9); transform: perspective(900px) rotateX(14deg) translateY(26px) scale(.9); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes mca-brilho { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -20% 0; } }
@keyframes mca-brilho { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -20% 0; } }
@-webkit-keyframes mca-gira { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } to { -webkit-transform: rotate(60deg); transform: rotate(60deg); } }
@keyframes mca-gira { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } to { -webkit-transform: rotate(60deg); transform: rotate(60deg); } }
@-webkit-keyframes mca-faisca { 0% { opacity: 0; -webkit-transform: scale(0); transform: scale(0); } 30% { opacity: 1; -webkit-transform: scale(1.3); transform: scale(1.3); } 100% { opacity: 0; -webkit-transform: scale(.2) translateY(-18px); transform: scale(.2) translateY(-18px); } }
@keyframes mca-faisca { 0% { opacity: 0; -webkit-transform: scale(0); transform: scale(0); } 30% { opacity: 1; -webkit-transform: scale(1.3); transform: scale(1.3); } 100% { opacity: 0; -webkit-transform: scale(.2) translateY(-18px); transform: scale(.2) translateY(-18px); } }
@-webkit-keyframes mca-espera { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes mca-espera { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- PDF no iPhone e no iPad: imprime a própria página, só com o certificado ----------
   O cert-aluno.js marca o caminho do <body> até o certificado (.mca-pr-cadeia), põe .mca-pr-alvo no .mpc e
   html.mca-imprimindo; o resto some no papel. Na tela nada muda (tudo aqui é @media print). */
@media print {
  html.mca-imprimindo, html.mca-imprimindo body { margin: 0 !important; padding: 0 !important; background: #060708 !important; overflow: visible !important; }
  html.mca-imprimindo body > :not(.mca-pr-cadeia) { display: none !important; }
  html.mca-imprimindo .mca-pr-cadeia {
    display: block !important; position: static !important; width: auto !important; max-width: none !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
    -webkit-transform: none !important; transform: none !important; -webkit-animation: none !important; animation: none !important;
  }
  html.mca-imprimindo .mca-pr-cadeia::before, html.mca-imprimindo .mca-pr-cadeia::after { display: none !important; }
  html.mca-imprimindo .mca-pr-cadeia > :not(.mca-pr-cadeia):not(.mca-pr-alvo) { display: none !important; }
}
