/* =====================================================================
   Missão Código — estilos (tudo escopado em .mc)
   ===================================================================== */
.mc {
  --bg: #0E1A31; --s1: #15274A; --s2: #1D3563; --s3: #26437A;
  --txt: #EAF0FA; --muted: #9AAAC6; --gold: #E0A93B; --gold2: #F5C76A;
  --cyan: #3FC1E0; --ok: #4CD38A; --bad: #FF6B6B; --mcor: #3FC1E0;
  position: relative; width: 100%; max-width: 1140px; margin: 0 auto;
  padding: clamp(14px, 3vw, 30px); border-radius: 24px;
  color: var(--txt); line-height: 1.5; font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(700px 360px at 0% -10%, rgba(63,193,224,.18), transparent 60%),
    radial-gradient(600px 360px at 110% 110%, rgba(224,169,59,.13), transparent 60%),
    var(--bg);
  box-shadow: 0 20px 60px rgba(15,42,68,.25);
}
.mc *, .mc *::before, .mc *::after { box-sizing: border-box; }
.mc [hidden] { display: none !important; }
.mc h1, .mc h2, .mc h3 { color: inherit; font-family: inherit; line-height: 1.2; margin: 0; }
.mc p { margin: 0; }
.mc button, .mc input, .mc select { font-family: inherit; }
.mc svg { display: block; width: 100%; height: 100%; }
.mc-muted { color: var(--muted); font-size: .85rem; }
.mc-centro { text-align: center; margin-top: 10px; }
.mc-sobretitulo { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold2); }

/* ---------- Botões ---------- */
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 700; font-size: .92rem; cursor: pointer;
  background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #1A2B4A;
  box-shadow: 0 6px 18px rgba(224,169,59,.28); transition: transform .15s, filter .15s, background .2s;
}
.mc-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.mc-btn:disabled { opacity: .5; cursor: not-allowed; }
.mc-btn.ghost { background: transparent; color: var(--txt); border: 1px solid rgba(255,255,255,.18); box-shadow: none; }
.mc-btn.ghost[aria-pressed="true"] { background: rgba(245,199,106,.15); border-color: var(--gold2); color: var(--gold2); }
.mc-btn.grande { padding: 14px 26px; font-size: 1.05rem; border-radius: 14px; }
.mc-btn.perigo { background: var(--bad); color: #fff; box-shadow: none; }
.mc-btn:focus-visible, .mc button:focus-visible, .mc select:focus-visible, .mc input:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; }
.mc-voltar, .mc-link { background: none; border: 0; color: var(--muted); cursor: pointer; font-weight: 600; font-size: .9rem; padding: 6px 0; }
.mc-voltar:hover, .mc-link:hover { color: var(--txt); }
.mc-link { text-decoration: underline; margin-top: 14px; font-size: .8rem; }
.mc-icone { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: var(--s1); cursor: pointer; font-size: 1.1rem; }
.mc-icone:hover { background: var(--s2); }

/* ---------- Início ---------- */
.mc-inicio { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0 6px; }
.mc-inicio-arte { position: relative; width: 260px; height: 190px; margin-bottom: 4px; }
.mc-inicio-av { position: absolute; left: 20px; top: 0; width: 160px; height: 175px; animation: mc-flutuar 4s ease-in-out infinite; }
.mc-inicio-robo { position: absolute; right: 0; bottom: 0; width: 110px; height: 110px; animation: mc-flutuar 3s ease-in-out infinite reverse; }
.mc-flutua { position: absolute; font-size: 1.3rem; animation: mc-flutuar 3.5s ease-in-out infinite; font-weight: 800; color: var(--cyan); }
.mc-flutua.f1 { left: -14px; top: 30px; } .mc-flutua.f2 { right: 8px; top: 6px; animation-delay: -.8s; }
.mc-flutua.f3 { left: -4px; bottom: 6px; animation-delay: -1.6s; } .mc-flutua.f4 { right: 110px; top: -10px; animation-delay: -2.4s; }
.mc-logo { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: .02em; }
.mc-logo span { background: linear-gradient(135deg, var(--cyan), var(--gold2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mc-slogan { font-weight: 600; color: var(--gold2); }
.mc-historia { max-width: 640px; color: #C9D5EA; }
.mc-inicio-botoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.mc-features { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; width: 100%; max-width: 900px; }
.mc-features li { background: var(--s1); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; font-size: .88rem; color: #C9D5EA; }
.mc-features b { color: var(--txt); }
.mc-privacidade { max-width: 560px; }
.mc-roadmap { width: 100%; max-width: 700px; background: var(--s1); border-radius: 14px; padding: 12px 16px; text-align: left; }
.mc-roadmap summary { cursor: pointer; font-weight: 700; }
.mc-roadmap ol { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.mc-roadmap li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; font-size: .86rem; color: #C9D5EA; }
.mc-roadmap .ic { font-size: 1.3rem; }
.mc-roadmap em { font-style: normal; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 50px; background: var(--s2); color: var(--muted); }
.mc-roadmap em.ok { background: rgba(76,211,138,.18); color: var(--ok); }

/* ---------- Conta ---------- */
.mc-carregando { text-align: center; padding: 80px 0; color: var(--muted); }
.mc-conta-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; max-width: 700px; padding: 12px 16px; border-radius: 14px; font-size: .88rem; text-align: left; background: var(--s1); }
.mc-conta-box.ok { border: 1px solid rgba(76,211,138,.35); background: rgba(76,211,138,.08); }
.mc-conta-box.aviso { border: 1px solid rgba(245,199,106,.4); background: rgba(245,199,106,.1); }
.mc-conta-box span { flex: 1; min-width: 220px; }
.mc-conta { max-width: 480px; margin: 0 auto; }
.mc-form { display: flex; flex-direction: column; gap: 14px; }
.mc-form-robo { width: 90px; height: 90px; margin: 0 auto; animation: mc-flutuar 3s ease-in-out infinite; }
.mc-form .mc-link { align-self: center; margin-top: 0; }
.mc-senha { position: relative; display: flex; }
.mc-senha input { flex: 1; padding-right: 48px; }
.mc-olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 1.1rem; cursor: pointer; padding: 6px; }
.mc-campo input[readonly] { opacity: .7; cursor: not-allowed; }
.mc-trocar-senha summary { cursor: pointer; font-weight: 600; }
.mc-trocar-senha .mc-form { margin-top: 10px; }

/* ---------- Criador ---------- */
.mc-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mc-topo h2 { font-size: clamp(1.15rem, 3vw, 1.5rem); text-align: center; flex: 1; }
.mc-moedas { font-weight: 700; background: var(--s1); padding: 6px 12px; border-radius: 50px; white-space: nowrap; }
.mc-criador-grid { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 24px; align-items: start; }
.mc-preview { position: sticky; top: 100px; background: var(--s1); border-radius: 20px; padding: 18px; text-align: center; }
.mc-preview-av { width: 200px; height: 216px; margin: 0 auto; }
.mc-preview-robo { width: 120px; height: 120px; margin: -30px 0 0 auto; animation: mc-flutuar 3s ease-in-out infinite; }
.mc-evolucao { font-size: .9rem; margin-top: 6px; }
.mc-vitrine {
  position: relative; width: 100%; aspect-ratio: 1 / 1.08; max-height: 380px; margin: 0 auto; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(63,193,224,.28), transparent 65%), #0e1a31; touch-action: pan-y;
}
.mc-vitrine .mc-carregando { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; font-size: .85rem; }
.mc-vitrine::after { content: '↔ arraste para girar'; position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: .7rem; color: var(--muted); pointer-events: none; }
@media (max-width: 960px) { .mc-vitrine { grid-column: 1 / -1; max-width: 340px; } }
.mc-editor { display: flex; flex-direction: column; gap: 14px; }
.mc-campo { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.mc-campo small { color: var(--muted); font-weight: 400; }
.mc-campo input { padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); background: #0A1426; color: var(--txt); font-size: 1rem; }
.mc-abas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--s1); border-radius: 14px; }
.mc-abas button { border: 0; border-radius: 10px; padding: 10px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.mc-abas button[aria-selected="true"] { background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #1A2B4A; }
.mc-grupo { display: flex; flex-direction: column; gap: 6px; }
.mc-grupo-rot { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mc-chip {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 44px; padding: 8px 12px; border-radius: 12px; border: 2px solid transparent;
  background: var(--s1); color: var(--txt); font-weight: 600; font-size: .85rem; cursor: pointer;
}
.mc-chip:hover { background: var(--s2); }
.mc-chip.sel { border-color: var(--gold2); background: var(--s2); }
.mc-chip.trava { opacity: .8; }
.mc-chip small { font-size: .65rem; color: var(--gold2); font-weight: 700; }
.mc-cor { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); }
.mc-compra { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: rgba(245,199,106,.12); border: 1px solid rgba(245,199,106,.4); font-size: .9rem; }
.mc-erro { color: var(--bad); font-weight: 600; min-height: 1.2em; font-size: .9rem; }

/* ---------- HUD e mapa ---------- */
.mc-hud { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: 18px; background: var(--s1); border: 1px solid rgba(255,255,255,.06); }
.mc-hud-av { position: relative; width: 64px; height: 70px; border: 0; background: none; padding: 0; cursor: pointer; flex: none; }
.mc-hud-nv { position: absolute; right: -4px; bottom: -2px; min-width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold2); color: #1A2B4A; font-weight: 800; font-size: .8rem; border: 2px solid var(--s1); }
.mc-hud-info { display: flex; flex-direction: column; gap: 3px; min-width: 180px; flex: 1; }
.mc-hud-titulo { font-size: .8rem; color: var(--gold2); font-weight: 600; }
.mc-xp { height: 9px; border-radius: 9px; background: #0A1426; overflow: hidden; max-width: 320px; }
.mc-xp i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--cyan), var(--ok)); transition: width .6s; }
.mc-hud-robo { width: 54px; text-align: center; font-size: .7rem; color: var(--muted); }
.mc-hud-robo svg { height: 50px; }
.mc-hud-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-hud-stats span { background: #0A1426; padding: 6px 10px; border-radius: 50px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.mc-hud-botoes { display: flex; gap: 6px; }

.mc-mundos { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 8px; scrollbar-width: thin; }
.mc-mundo-tab {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; cursor: pointer;
  border: 2px solid transparent; background: var(--s1); color: var(--txt); font-weight: 600; font-size: .85rem;
}
.mc-mundo-tab .ic { font-size: 1.3rem; }
.mc-mundo-tab small { font-size: .65rem; color: var(--muted); font-weight: 700; }
.mc-mundo-tab.sel { border-color: var(--mcor); background: var(--s2); }
.mc-mundo-tab.trava { opacity: .55; }

.mc-mapa-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; margin-top: 6px; }
.mc-mundo { border-radius: 20px; padding: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--mcor) 16%, transparent), transparent 220px), var(--s1); border: 1px solid rgba(255,255,255,.06); }
.mc-mundo-head { display: flex; align-items: center; gap: 12px; }
.mc-mundo-ic { font-size: 2.2rem; }
.mc-mundo-head h2 { font-size: 1.25rem; }
.mc-mundo-head p { color: var(--muted); font-size: .85rem; }
.mc-mundo-est { margin-left: auto; font-weight: 700; background: #0A1426; padding: 6px 12px; border-radius: 50px; white-space: nowrap; }

.mc-trilha { position: relative; margin-top: 10px; }
.mc-trilha svg { position: absolute; inset: 0; }
.mc-trilha path { fill: none; stroke: color-mix(in srgb, var(--mcor) 55%, #0A1426); stroke-width: 6; stroke-dasharray: 2 12; stroke-linecap: round; }
.mc-no {
  position: absolute; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); background: var(--s2); color: var(--txt); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 0 #0A1426; transition: transform .15s;
}
.mc-no:hover:not(:disabled) { transform: translate(-50%, -54%); }
.mc-no.feito { background: color-mix(in srgb, var(--mcor) 40%, var(--s2)); border-color: var(--mcor); }
.mc-no.atual { border-color: var(--gold2); animation: mc-pulsar 1.6s ease-in-out infinite; }
.mc-no.trava { opacity: .45; cursor: not-allowed; }
.mc-no.chefe { width: 78px; height: 78px; background: #3A1A3F; border-color: #FF6B9A; }
.mc-no-num { font-weight: 800; font-size: 1.05rem; line-height: 1; }
.mc-no-ic { position: absolute; top: -10px; right: -10px; font-size: 1rem; background: var(--bg); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.mc-no.chefe .mc-no-ic { font-size: 1.5rem; width: 34px; height: 34px; top: -14px; right: -14px; }
.mc-no-est { position: absolute; bottom: -9px; font-size: .78rem; letter-spacing: -1px; background: var(--bg); border-radius: 50px; padding: 0 5px; }
.mc-no-est span { color: #3A4E73; } .mc-no-est span.on { color: var(--gold2); }
.mc-no-tit { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: .78rem; font-weight: 600; color: #C9D5EA; pointer-events: none; text-align: left; }
.mc-no[style*="left:7"] .mc-no-tit, .mc-no[style*="left:8"] .mc-no-tit { left: auto; right: calc(100% + 10px); text-align: right; }
.mc-no-eu { position: absolute; left: -46px; top: -16px; width: 42px; height: 46px; animation: mc-flutuar 2s ease-in-out infinite; }

.mc-lateral { display: flex; flex-direction: column; gap: 14px; }
.mc-card { background: var(--s1); border-radius: 18px; padding: 16px; border: 1px solid rgba(255,255,255,.06); }
.mc-card h3 { font-size: 1rem; margin-bottom: 10px; }
.mc-missoes { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 7px; }
.mc-missoes li { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; padding: 8px 10px; border-radius: 10px; background: #0A1426; }
.mc-missoes li.ok { color: var(--ok); }
.mc-missoes b { white-space: nowrap; }
.mc-rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.mc-rank li { display: grid; grid-template-columns: 34px 1fr auto; gap: 6px; padding: 6px 8px; border-radius: 8px; font-size: .86rem; }
.mc-rank li:nth-child(odd) { background: rgba(255,255,255,.03); }
.mc-rank li.eu { background: rgba(245,199,106,.16); color: var(--gold2); font-weight: 700; }
.mc-rank .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-rank .xp { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Fase ---------- */
.mc-fase-topo { display: flex; align-items: center; gap: 14px; }
.mc-fase-tit { flex: 1; }
.mc-fase-tit h2 { font-size: clamp(1.15rem, 3vw, 1.5rem); }
.mc-fase-est { font-size: 1.4rem; letter-spacing: 2px; }
.mc-fase-est span, .mc-res-estrelas span { color: #3A4E73; }
.mc-fase-est span.on, .mc-res-estrelas span.on { color: var(--gold2); }
.mc-hp { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 700; font-size: .85rem; }
.mc-hp-barra { flex: 1; height: 14px; border-radius: 10px; background: #0A1426; overflow: hidden; border: 1px solid rgba(255,107,154,.4); }
.mc-hp-barra i { display: block; height: 100%; background: linear-gradient(90deg, #FF6B9A, var(--bad)); transition: width .4s; }
.mc-objetivo { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--mcor) 14%, transparent); border-left: 4px solid var(--mcor); font-weight: 600; font-size: .95rem; }
.mc-companheiro { display: flex; align-items: flex-end; gap: 10px; margin: 14px 0; }
.mc-comp-robo { width: 64px; height: 64px; flex: none; }
.mc-comp-robo.fala { animation: mc-pulo .45s ease; }
.mc-comp-robo.triste { filter: saturate(.6); }
.mc-comp-robo.feliz { animation: mc-pulo .45s ease 2; }
.mc-balao { position: relative; flex: 1; background: #F3F7FF; color: #1A2B4A; border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: .92rem; min-height: 56px; }
.mc-balao b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #1F4E79; }
.mc-dica { align-self: center; }

/* ---------- Labirinto ---------- */
.mc-lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 18px; align-items: start; }
.mc-lab-mapa { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mc-board {
  position: relative; display: grid; width: min(100%, calc(var(--cols) * 72px));
  grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr);
  aspect-ratio: var(--cols) / var(--rows); border-radius: 14px; overflow: hidden;
  background: #0A1426; border: 3px solid #0A1426; box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.mc-cel { position: relative; display: grid; place-items: center; font-size: clamp(.9rem, 3.4vw, 1.6rem); }
.mc-cel.chao { background: #2A4A80; box-shadow: inset 0 0 0 1px rgba(10,20,38,.5); }
.mc-board[data-mundo="1"] .mc-cel.chao { background: #E8D29B; }
.mc-board[data-mundo="1"] .mc-cel.parede { background: radial-gradient(circle at 30% 30%, #4FB3E8, #2A7FC0); }
.mc-board[data-mundo="2"] .mc-cel.chao { background: #8FCB73; }
.mc-board[data-mundo="2"] .mc-cel.parede { background: #1F5B33; }
.mc-board[data-mundo="2"] .mc-cel.parede::after { content: '🌲'; font-size: .8em; }
.mc-board[data-mundo="3"] .mc-cel.chao { background: #5B6A86; background-image: linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 50% 50%; }
.mc-board[data-mundo="3"] .mc-cel.parede { background: #1B2740; }
.mc-board[data-mundo="3"] .mc-cel.parede::after { content: '🏢'; font-size: .75em; opacity: .9; }
.mc-cel.virus { background: #4A1F3D !important; }
.mc-cel.virus span { animation: mc-tremer 1.4s ease-in-out infinite; }
.mc-cel.inicio::before { content: ''; position: absolute; inset: 22%; border-radius: 50%; border: 2px dashed rgba(10,20,38,.35); }
.mc-cel.bat span { animation: mc-flutuar 1.8s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(76,211,138,.7)); }
.mc-cel.bau span { opacity: .6; animation: mc-brilho 2s ease-in-out infinite; }
.mc-cel.pego span { animation: mc-sumir .4s ease forwards; }
.mc-cel.bateu { box-shadow: inset 0 0 0 4px var(--bad) !important; }
.mc-bot {
  position: absolute; z-index: 2; width: calc(100% / var(--cols)); height: calc(100% / var(--rows));
  left: calc(var(--c, 0) * 100% / var(--cols)); top: calc(var(--r, 0) * 100% / var(--rows));
  padding: 8%; transition: left .3s ease, top .3s ease; pointer-events: none;
}
.mc-bot.sem-anim { transition: none; }
.mc-bot svg { filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
.mc-bot-dir { display: none; position: absolute; inset: -6%; place-items: center end; color: var(--gold2); font-size: clamp(.6rem, 2vw, .95rem); transition: transform .25s ease; text-shadow: 0 0 4px #0A1426; }
.mc-bot.rel .mc-bot-dir { display: grid; }
.mc-bot.erro svg { animation: mc-tremer .4s ease 2; filter: drop-shadow(0 0 8px var(--bad)); }
.mc-bot.feliz svg { animation: mc-pulo .5s ease 3; }
.mc-legenda { font-size: .78rem; color: var(--muted); text-align: center; }

.mc-lab-lado, .mc-est-regras { display: flex; flex-direction: column; gap: 12px; }
.mc-paleta { display: flex; flex-wrap: wrap; gap: 7px; }
.mc-pb {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 12px; cursor: pointer;
  border: 0; font-weight: 700; font-size: .85rem; color: #0E1A31; box-shadow: 0 4px 0 rgba(0,0,0,.3); transition: transform .1s;
}
.mc-pb:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.mc-pb:disabled { opacity: .5; }
.mc-pb-mov { background: #7FE0F5; } .mc-pb-giro { background: #B8A6FF; } .mc-pb-ctrl { background: var(--gold2); }
.mc-prog-box { background: #0A1426; border-radius: 16px; padding: 12px; border: 1px solid rgba(255,255,255,.07); }
.mc-prog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: .9rem; }
.mc-prog-head span { font-size: .78rem; color: var(--muted); }
.mc-prog-head span.acima { color: var(--gold2); }
.mc-alvo { font-size: .8rem; color: var(--gold2); }
.mc-alvo:not(:empty) { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mc-alvo button { background: none; border: 1px solid rgba(245,199,106,.5); color: var(--gold2); border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: .75rem; }
.mc-prog { display: flex; flex-direction: column; gap: 5px; min-height: 110px; max-height: 420px; overflow-y: auto; padding: 6px; border-radius: 12px; border: 2px dashed transparent; }
.mc-prog.ativo { border-color: rgba(245,199,106,.35); }
.mc-prog-vazio { color: var(--muted); font-size: .85rem; text-align: center; padding: 24px 8px; }
.mc-blk { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 34px 7px 10px; border-radius: 10px; font-size: .85rem; font-weight: 600; color: #0E1A31; cursor: pointer; }
.mc-blk-mov { background: #7FE0F5; } .mc-blk-giro { background: #B8A6FF; }
.mc-blk.exec { box-shadow: 0 0 0 3px #fff, 0 0 16px rgba(255,255,255,.6); }
.mc-ctrl { flex-direction: column; align-items: stretch; padding: 6px 6px 6px 8px; gap: 6px; background: var(--gold2); }
.mc-ctrl.se { background: #FFB27A; } .mc-ctrl.enq { background: #F59AC0; }
.mc-ctrl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-right: 28px; }
.mc-ctrl-head b { min-width: 22px; text-align: center; font-size: .95rem; }
.mc-ctrl-head select { border-radius: 8px; border: 0; padding: 3px 6px; font-weight: 700; font-size: .8rem; background: #fff; color: #0E1A31; }
.mc-ctrl-sub { font-weight: 800; font-size: .75rem; letter-spacing: .08em; padding-left: 4px; }
.mc-num { width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(14,26,49,.2); font-weight: 800; cursor: pointer; color: #0E1A31; }
.mc-slot { display: flex; flex-direction: column; gap: 5px; min-height: 38px; padding: 6px; border-radius: 9px; background: rgba(10,20,38,.82); border: 2px dashed transparent; }
.mc-slot.ativo { border-color: #fff; }
.mc-slot-vazio { color: var(--muted); font-size: .78rem; font-weight: 500; padding: 4px; }
.mc-x { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 7px; border: 0; background: rgba(14,26,49,.18); color: #0E1A31; font-size: .75rem; cursor: pointer; }
.mc-x:hover { background: var(--bad); color: #fff; }
.mc-acoes { display: flex; flex-wrap: wrap; gap: 7px; }
.mc-code { margin: 0; padding: 12px 14px; border-radius: 12px; background: #050B16; color: #9FE6B8; font: 500 .82rem/1.55 ui-monospace, 'Cascadia Code', Consolas, monospace; overflow-x: auto; white-space: pre; border: 1px solid rgba(76,211,138,.25); }
.rodando .mc-x, .rodando .mc-num, .rodando .mc-pb, .rodando select { pointer-events: none; opacity: .6; }

/* ---------- 3D: tabuleiro das fases ---------- */
.mc-vista { width: 100%; display: flex; justify-content: center; }
.mc-vista.tres-d {
  position: relative; display: block; aspect-ratio: 4 / 3; max-height: 64vh; border-radius: 18px; overflow: hidden;
  background: linear-gradient(#bfe8fb, #8fd3f4); box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.mc-vista.tres-d .mc-carregando { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; color: #1A2B4A; font-weight: 600; }
.mc-canvas3d { display: block; width: 100% !important; height: 100% !important; touch-action: none; }

/* ---------- 3D: Ilha explorável ---------- */
.mc-tela.ilha { margin: calc(-1 * clamp(14px, 3vw, 30px)); }
.mc-ilha { position: relative; height: min(80vh, 780px); min-height: 460px; border-radius: 24px; overflow: hidden; background: #8fd3f4; user-select: none; -webkit-user-select: none; }
.mc-ilha-cena { position: absolute; inset: 0; }
.mc-ilha-cena .mc-carregando { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; color: #1A2B4A; font-weight: 700; font-size: 1.1rem; }
.mc-ilha-hud { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; gap: 10px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 16px; background: rgba(10,20,38,.78); backdrop-filter: blur(6px); }
.mc-ilha-av { position: relative; width: 50px; height: 54px; }
.mc-ilha-info { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; min-width: 120px; }
.mc-ilha-info .mc-xp { height: 7px; }
.mc-ilha-botoes { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }
.mc-ilha-botoes .mc-icone { background: rgba(10,20,38,.78); backdrop-filter: blur(6px); }
.mc-ilha-prompt {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 40px);
  padding: 10px 10px 10px 16px; border-radius: 16px; background: rgba(10,20,38,.9); font-weight: 600; font-size: .9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: mc-pop .2s ease;
}
.mc-ilha-prompt .mc-btn { white-space: nowrap; }
.mc-ilha-fala {
  position: absolute; z-index: 2; transform: translate(-50%, -100%); max-width: 250px; pointer-events: none;
  padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: #F3F7FF; color: #1A2B4A; font-size: .84rem; font-weight: 600;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.mc-ilha-ajuda { position: absolute; left: 14px; bottom: 10px; z-index: 1; margin: 0; font-size: .75rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.mc-radar {
  position: absolute; right: 16px; bottom: 86px; z-index: 3; width: 64px; height: 64px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 2px solid rgba(127,224,245,.7); background: rgba(10,20,38,.82); color: #fff; font-size: 1.5rem; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(127,224,245,.6); animation: mc-radar 2.4s ease-out infinite;
}
.mc-radar span { font-size: .6rem; font-weight: 700; letter-spacing: .04em; }
@keyframes mc-radar { 0% { box-shadow: 0 0 0 0 rgba(127,224,245,.55); } 80%, 100% { box-shadow: 0 0 0 16px rgba(127,224,245,0); } }
@media (pointer: coarse) { .mc-radar { bottom: auto; top: 50%; right: 14px; } }
.mc-joy { position: absolute; left: 20px; bottom: 20px; z-index: 3; width: 124px; height: 124px; border-radius: 50%; touch-action: none;
  background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.45); backdrop-filter: blur(3px); }
.mc-joy-pino { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255,255,255,.88); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
@media (pointer: coarse) {
  .mc-ilha-ajuda { display: none; }
  .mc-ilha-prompt { left: auto; right: 14px; transform: none; bottom: 22px; max-width: calc(100% - 170px); flex-direction: column; align-items: stretch; font-size: .8rem; }
}
@media (max-width: 560px) {
  .mc-ilha { height: 76vh; min-height: 420px; }
  .mc-ilha-botoes { flex-direction: column; max-width: none; }
  .mc-ilha-hud { padding: 6px 10px 6px 6px; }
  .mc-ilha-av { width: 40px; height: 44px; }
  .mc-ilha-info { min-width: 90px; font-size: .72rem; }
}
.mc-ficha { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.mc-res-estrelas.pequeno { font-size: 1.8rem; }
/* Tela cheia: real (:fullscreen) ou simulada por CSS onde a API não existe (.mc-cheia, ex.: iPhone) */
.mc:fullscreen, .mc.mc-cheia {
  max-width: none; width: 100vw; height: 100vh; height: 100dvh; overflow: auto; border-radius: 0;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.mc.mc-cheia { position: fixed; inset: 0; z-index: 1500; margin: 0; }
.mc:fullscreen .mc-ilha, .mc.mc-cheia .mc-ilha { height: 100vh; height: 100dvh; border-radius: 0; }
.mc:fullscreen .mc-vista.tres-d, .mc.mc-cheia .mc-vista.tres-d { max-height: 70vh; }
.mc::backdrop { background: #0E1A31; }
.mc-fase-topo .mc-icone[data-tela-cheia] { flex: none; }

/* ---------- Esteira ---------- */
.mc-est { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.mc-est-regras .mc-prog-head { margin: 0; }
.mc-regra { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 38px 10px 10px; border-radius: 12px; background: #FFB27A; color: #0E1A31; font-weight: 600; font-size: .85rem; }
.mc-regra + .mc-regra { margin-top: 7px; }
.mc-regra.senao { background: #B8C4D6; padding-right: 10px; }
.mc-regra select { border: 0; border-radius: 8px; padding: 5px 6px; font-weight: 700; font-size: .82rem; background: #fff; color: #0E1A31; max-width: 100%; }
.mc-kw { font-weight: 800; letter-spacing: .04em; }
.mc-cond { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mc-seta { font-weight: 800; }
.mc-mini { border: 0; border-radius: 8px; padding: 4px 8px; background: rgba(14,26,49,.18); font-weight: 800; cursor: pointer; font-size: .75rem; color: #0E1A31; }
.mc-add-regra { align-self: flex-start; }
.mc-est-palco { background: #0A1426; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.mc-fila { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; justify-content: center; }
.mc-fila-item { transition: opacity .3s, transform .3s; }
.mc-fila-item.saiu { opacity: 0; transform: translateY(14px) scale(.6); }
.mc-esteira { height: 54px; border-radius: 12px; position: relative; display: grid; place-items: center;
  background: repeating-linear-gradient(90deg, #2B3A55 0 18px, #22304A 18px 36px); }
.rodando .mc-esteira { animation: mc-esteira .6s linear infinite; }
.mc-scanner { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--cyan); box-shadow: 0 0 14px rgba(63,193,224,.5); background: rgba(63,193,224,.08); }
.mc-scanner.travou { border-color: var(--bad); box-shadow: 0 0 14px rgba(255,107,107,.6); animation: mc-tremer .3s ease 2; }
.mc-caixas { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.mc-caixa { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 110px; padding: 8px; border-radius: 12px; background: var(--s1); border: 2px solid rgba(255,255,255,.08); text-align: center; font-size: .78rem; transition: border-color .2s; }
.mc-caixa.certo { border-color: var(--ok); }
.mc-caixa.errado { border-color: var(--bad); }
.mc-caixa-pecas { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.mc-caixa-peca { animation: mc-pop .3s ease; transform: scale(.7); }
.mc-caixa-peca.errada { outline: 2px solid var(--bad); border-radius: 6px; }
.mc-peca { position: relative; display: inline-block; width: 30px; height: 30px; background: var(--cor); vertical-align: middle; }
.mc-peca.f-cubo { border-radius: 6px; box-shadow: inset -4px -4px 0 rgba(0,0,0,.2); }
.mc-peca.f-bola { border-radius: 50%; box-shadow: inset -5px -5px 0 rgba(0,0,0,.2); }
.mc-peca.f-triangulo { clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.mc-peca.t-pequena { width: 22px; height: 22px; }
.mc-peca.t-grande { width: 38px; height: 38px; }
.mc-peca.def::after { content: '⚠️'; position: absolute; right: -6px; bottom: -6px; font-size: .75rem; }
.mc-peca.f-triangulo.def { clip-path: none; background: none; }
.mc-peca.f-triangulo.def::before { content: ''; position: absolute; inset: 0; background: var(--cor); clip-path: polygon(50% 4%, 100% 96%, 0 96%); }

/* ---------- Padrões ---------- */
.mc-pd { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.mc-pd-linhas { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 760px; }
.mc-pd-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: #0A1426; }
.mc-pd-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--s2); font-size: .78rem; font-weight: 800; color: var(--muted); }
.mc-pd-cel { min-width: 46px; height: 46px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--s1); font-size: 1.35rem; font-weight: 700; color: var(--txt); border: 2px solid transparent; }
button.mc-pd-cel { cursor: pointer; border: 2px dashed rgba(245,199,106,.6); background: rgba(245,199,106,.08); color: var(--gold2); font-family: inherit; }
button.mc-pd-cel.cheio { border-style: solid; color: var(--txt); background: var(--s2); }
button.mc-pd-cel.sel { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
button.mc-pd-cel.errado { border-color: var(--bad); animation: mc-tremer .35s ease 2; }
.mc-pd-opcoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mc-pd-op { min-width: 54px; height: 54px; padding: 0 10px; border-radius: 14px; border: 0; background: var(--gold2); font-size: 1.4rem; font-weight: 800; color: #0E1A31; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.mc-pd-op:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }

/* ---------- Modal e avisos ---------- */
.mc-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(5,11,22,.72); backdrop-filter: blur(4px); }
.mc-modal[hidden] { display: none; }
.mc-modal-box { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; border-radius: 22px; background: var(--bg); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: mc-pop .25s ease; display: flex; flex-direction: column; gap: 12px; }
.mc-modal-box.largo { max-width: 620px; }
.mc-modal-box h2 { font-size: 1.3rem; }
.mc-modal-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 6px; }
.mc-toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.mc-toast { padding: 12px 16px; border-radius: 14px; background: #F3F7FF; color: #1A2B4A; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: mc-pop .25s ease; transition: opacity .4s, transform .4s; }
.mc-toast.sai { opacity: 0; transform: translateY(10px); }
.mc-resultado { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mc-res-estrelas { font-size: 3rem; letter-spacing: 6px; }
.mc-res-estrelas span.on { display: inline-block; animation: mc-estrela .5s ease backwards; text-shadow: 0 0 18px rgba(245,199,106,.6); }
.mc-res-estrelas span.on:nth-child(2) { animation-delay: .2s; } .mc-res-estrelas span.on:nth-child(3) { animation-delay: .4s; }
.mc-premios { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; width: 100%; }
.mc-premios li { padding: 8px 12px; border-radius: 10px; background: var(--s1); font-size: .9rem; }
.mc-nivel-up { display: grid; grid-template-columns: 70px 50px 1fr; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(245,199,106,.2), rgba(63,193,224,.15)); text-align: left; width: 100%; }
.mc-nivel-up .av { height: 76px; } .mc-nivel-up .rb { height: 50px; }
.mc-aprendizado { font-size: .88rem; padding: 10px 12px; border-radius: 12px; background: rgba(76,211,138,.1); border: 1px solid rgba(76,211,138,.3); text-align: left; }
.mc-medalhas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.mc-medalhas li { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--s1); opacity: .55; }
.mc-medalhas li.ok { opacity: 1; border: 1px solid rgba(245,199,106,.4); }
.mc-medalhas .ic { font-size: 1.7rem; }
.mc-medalhas small { display: block; color: var(--muted); font-size: .78rem; }
.mc-dialogo { display: flex; gap: 12px; align-items: flex-end; }
.mc-dialogo-robo { width: 90px; height: 90px; flex: none; animation: mc-flutuar 2.5s ease-in-out infinite; }
.mc-chefe-intro, .mc-embreve { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.mc-chefe-ic { font-size: 3rem; line-height: 1; }
.mc-chefe-ic.grande { font-size: 5rem; animation: mc-tremer 1.6s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(255,107,154,.6)); }
.mc-chefe-fala { font-style: italic; color: #FFC2D6; }
.mc-modal-box.chefe { border-color: rgba(255,107,154,.5); background: radial-gradient(400px 200px at 50% 0, rgba(255,107,154,.18), transparent), var(--bg); }

/* ---------- Animações ---------- */
@keyframes mc-flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes mc-pulsar { 0%, 100% { box-shadow: 0 6px 0 #0A1426, 0 0 0 0 rgba(245,199,106,.5); } 50% { box-shadow: 0 6px 0 #0A1426, 0 0 0 10px rgba(245,199,106,0); } }
@keyframes mc-pulo { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }
@keyframes mc-tremer { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px) rotate(-4deg); } 75% { transform: translateX(4px) rotate(4deg); } }
@keyframes mc-sumir { to { transform: scale(1.8); opacity: 0; } }
@keyframes mc-brilho { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
@keyframes mc-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes mc-estrela { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3) rotate(10deg); } to { transform: scale(1); } }
@keyframes mc-esteira { to { background-position: 36px 0; } }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .mc-mapa-grid, .mc-lab, .mc-est, .mc-criador-grid { grid-template-columns: 1fr; }
  .mc-preview { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .mc-preview-av { width: 150px; height: 162px; }
  .mc-preview-robo { margin: 0 auto; }
  .mc-evolucao { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .mc { border-radius: 16px; padding: 12px; }
  .mc-hud { gap: 10px; }
  .mc-hud-robo { display: none; }
  .mc-hud-info { min-width: 0; }
  .mc-no-tit { display: none; }
  .mc-no-eu { left: -40px; width: 36px; height: 40px; }
  .mc-companheiro { flex-wrap: wrap; }
  .mc-comp-robo { width: 50px; height: 50px; }
  .mc-balao { flex-basis: calc(100% - 60px); }
  .mc-dica { margin-left: auto; }
  .mc-fase-topo { flex-wrap: wrap; }
  .mc-pd-cel { min-width: 38px; height: 40px; font-size: 1.1rem; }
  .mc-nivel-up { grid-template-columns: 56px 40px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mc *, .mc *::before, .mc *::after { animation: none !important; transition-duration: .01ms !important; }
}
