/* Mundo Globalito — identidade visual compartilhada.
 * Azul como cor principal, branco e amarelo de apoio; cada área do mundo tem uma cor própria (--area). */
:root {
  color-scheme: light;
  --navy: #0b2b58;
  --blue: #0957d8;
  --blue-d: #073fa3;
  --sky: #1ab8f4;
  --cyan: #5ae8f6;
  --yellow: #ffda62;
  --yellow-d: #e2a82b;
  --cream: #f9f5e9;
  --paper: #fffdf6;
  --ink: #102a42;
  --ink-soft: #3d5873;
  --green: #16a085;
  --purple: #8e5cf7;
  --orange: #e8590c;
  --pink: #e64980;
  --ok: #1f9d55;
  --bad: #d6336c;
  --area: var(--blue);
  --r: 16px;
  --shadow: 0 5px 0 var(--navy);
  --font: "Trebuchet MS", "Segoe UI", Verdana, system-ui, sans-serif;
  --tap: 48px; /* área de toque mínima */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); line-height: 1.45; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, [tabindex] { outline-offset: 3px; }
:focus-visible { outline: 4px solid var(--blue); border-radius: 6px; }
.m-dark :focus-visible, .m-bar :focus-visible { outline-color: var(--yellow); }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 1000; padding: 10px 14px; background: var(--yellow); color: var(--navy); font-weight: 900; border-radius: 8px; }
.skip-link:focus { top: 10px; }

/* ----- Barra superior ----- */
.m-bar { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 60px;
  padding: calc(6px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
  background: var(--navy); color: #fff; border-bottom: 5px solid var(--area); }
.m-bar__back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 12px 0 6px; color: #fff; font-weight: 900; font-size: 15px; text-decoration: none; border-radius: 12px; }
.m-bar__back:hover { background: #ffffff22; }
.m-bar__back > span:first-child { font-size: 32px; line-height: 1; margin-top: -3px; }
.m-bar__title { text-align: center; min-width: 0; }
.m-bar__title strong { display: block; font-size: 17px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bar__title span { display: block; font-size: 12px; font-weight: 700; color: #bfe3f7; }
.m-bar__tools { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.m-bar__stars { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; }
.m-bar__stars:hover { background: #ffffff22; }
.m-iconbtn { width: 44px; height: 44px; border: 2px solid #ffffff55; border-radius: 12px; background: #ffffff18; color: #fff; font-size: 20px; line-height: 1; }
.m-iconbtn:hover { background: #ffffff33; }
@media (max-width: 520px) { .m-bar__backtxt { display: none; } .m-bar__title strong { font-size: 15px; } .m-bar { gap: 4px; } }

/* ----- Botões ----- */
.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 22px; border: 3px solid var(--navy); border-radius: 14px;
  background: var(--yellow); color: var(--navy); font-weight: 900; font-size: 18px; line-height: 1.1; text-decoration: none; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, background .12s; }
.m-btn:hover { background: #ffe58f; }
.m-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.m-btn--blue { background: var(--blue); color: #fff; }
.m-btn--blue:hover { background: #1a6af0; }
.m-btn--ghost { background: #fff; }
.m-btn--ghost:hover { background: #eef5ff; }
.m-btn--sm { min-height: 44px; padding: 8px 16px; font-size: 16px; }
.m-btn[disabled], .m-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: 0 2px 0 var(--navy); transform: none; }

/* ----- Cartões, painéis ----- */
.m-card { background: #fff; border: 3px solid var(--navy); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; }
.m-panel { background: var(--paper); border: 4px solid var(--navy); border-radius: 22px; box-shadow: 0 8px 0 #061f3e; padding: clamp(18px, 4vw, 30px); text-align: center; color: var(--navy); }
.m-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #e7f2fb; color: #154b69; font-size: 13px; font-weight: 800; }
.m-title { font-size: clamp(28px, 5vw, 44px); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 8px; color: var(--navy); }
.m-wrap { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 4vw, 36px) max(16px, env(safe-area-inset-right)) 56px max(16px, env(safe-area-inset-left)); }

/* ----- Globalito falando (guia) ----- */
.m-guide { display: flex; align-items: flex-end; gap: 12px; }
.m-guide__img { flex: none; width: 72px; height: 72px; object-fit: contain; }
.m-guide__bubble { position: relative; background: #fff; color: var(--navy); border: 3px solid var(--navy); border-radius: 18px; padding: 10px 14px; font-weight: 800; font-size: 16px; line-height: 1.35; box-shadow: 0 4px 0 #061f3e33; }
.m-guide__bubble::before { content: ''; position: absolute; left: -11px; bottom: 16px; width: 16px; height: 16px; background: #fff; border-left: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(45deg); }

/* ----- Aviso rápido ----- */
.m-toast { position: fixed; z-index: 1000; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; max-width: min(92vw, 460px); padding: 12px 18px; border: 3px solid var(--navy); border-radius: 14px; background: var(--yellow); color: var(--navy); font-weight: 900; text-align: center; box-shadow: 0 5px 0 var(--navy); pointer-events: none; transition: opacity .25s, transform .25s; }
.m-toast--on { opacity: 1; transform: translate(-50%, 0); }

/* ----- Estrelas de resultado ----- */
.m-stars { display: inline-flex; gap: 4px; font-size: 34px; letter-spacing: 2px; }
.m-stars .off { filter: grayscale(1); opacity: .3; }

/* ----- Animações leves (desligadas se o usuário pedir menos movimento) ----- */
@keyframes m-pop { 0% { transform: scale(.85); opacity: 0 } 70% { transform: scale(1.04) } 100% { transform: scale(1); opacity: 1 } }
@keyframes m-float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.m-pop { animation: m-pop .35s ease both; }
.m-float { animation: m-float 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ----- Impressão genérica (cada página pode complementar) ----- */
@media print {
  .m-bar, .m-toast, .skip-link, .no-print { display: none !important; }
  body { background: #fff; }
}

/* =====================================================================
 * Acabamento visual — estilo "massinha" (clay): bordas grossas, relevo suave e luz
 * Paleta da Global preservada: azul-marinho #0b2b58, azul #0957d8, amarelo #ffda62, ciano #5ae8f6.
 * ===================================================================== */
:root {
  --sky-50: #f6fbff;
  --sky-100: #d9efff;
  --lift: 0 12px 22px rgba(11, 43, 88, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body {
  background:
    radial-gradient(900px 360px at 92% -90px, var(--sky-100), transparent 70%),
    radial-gradient(700px 300px at -6% 110px, #e9f6ff, transparent 70%),
    linear-gradient(180deg, var(--sky-50) 0, var(--cream) 560px);
  background-repeat: no-repeat;
  background-color: var(--cream);
}
/* linhas de fibra e pontos de luz, bem suaves, no canto da página */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='820' height='520' viewBox='0 0 820 520'%3E%3Cg fill='none' stroke='%230957d8' stroke-opacity='.09' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M820 40C640 60 520 140 430 260S250 450 40 470'/%3E%3Cpath d='M820 120C660 130 560 200 480 300S320 470 160 500'/%3E%3C/g%3E%3Cg fill='%235ae8f6' fill-opacity='.55'%3E%3Ccircle cx='640' cy='80' r='5'/%3E%3Ccircle cx='430' cy='262' r='6'/%3E%3Ccircle cx='560' cy='190' r='4'/%3E%3Ccircle cx='300' cy='410' r='4'/%3E%3C/g%3E%3C/svg%3E") top right / min(820px, 95vw) auto no-repeat;
}
.m-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; flex: none; }

/* Barra superior */
.m-bar { background: linear-gradient(180deg, #123e79 0%, var(--navy) 100%); box-shadow: 0 6px 18px rgba(11, 43, 88, .30); }
.m-bar__logo { display: none; height: 26px; width: auto; margin-right: 10px; opacity: .96; }
@media (min-width: 900px) { .m-bar__logo { display: block; } }
.m-bar__stars { gap: 6px; border: 2px solid #ffffff40; border-radius: 999px; background: #ffffff1a; }
.m-bar__stars .m-ico { font-size: 22px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.m-iconbtn { display: inline-grid; place-items: center; border-radius: 50%; font-size: 22px; transition: background .15s, transform .15s var(--ease); }
.m-iconbtn:active { transform: scale(.92); }
.m-iconbtn[aria-pressed="true"] { background: var(--yellow); border-color: #fff; color: var(--navy); }

/* Botões: relevo, luz no topo e borda inferior */
.m-btn { border-radius: 18px; background: linear-gradient(180deg, #ffe58d 0%, #ffd24d 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .75), 0 5px 0 var(--navy), 0 12px 18px rgba(11, 43, 88, .20);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s; }
.m-btn:hover { background: linear-gradient(180deg, #ffeeac 0%, #ffdc70 100%); transform: translateY(-2px); }
.m-btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--navy), 0 3px 6px rgba(11, 43, 88, .18); }
.m-btn--blue { background: linear-gradient(180deg, #1f6fe6 0%, #0957d8 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .38), 0 5px 0 var(--navy), 0 12px 18px rgba(9, 87, 216, .30); }
.m-btn--blue:hover { background: linear-gradient(180deg, #2f7df0 0%, #0f62e6 100%); }
.m-btn--ghost { background: linear-gradient(180deg, #fff 0%, #eaf4ff 100%); }
.m-btn--ghost:hover { background: linear-gradient(180deg, #fff 0%, #dcedff 100%); }
.m-btn[disabled], .m-btn[aria-disabled="true"] { transform: none; box-shadow: 0 2px 0 var(--navy); }

/* Cartões e painéis */
.m-card { border-radius: 22px; background: linear-gradient(180deg, #fff 0%, #fbfdff 100%); box-shadow: 0 6px 0 var(--navy), var(--lift); }
.m-panel { border-radius: 28px; background: linear-gradient(180deg, #fffefb 0%, #fff7e3 100%); box-shadow: 0 8px 0 #061f3e, 0 22px 34px rgba(11, 43, 88, .24); }
.m-chip { background: #e0f0ff; color: #0a417d; }
.m-guide__bubble { border-radius: 20px; box-shadow: 0 4px 0 rgba(11, 43, 88, .18); }

/* Relevo suave extra nas peças de cada página (sem mexer nas sombras próprias) */
.item, .medal, .grupo, .of-card, .cap { filter: drop-shadow(0 10px 14px rgba(11, 43, 88, .10)); }

/* Estrelas (ícone SVG) */
.off .m-ico, .m-ico.off { filter: grayscale(1) opacity(.35); }
.m-toast { border-radius: 18px; box-shadow: 0 5px 0 var(--navy), 0 14px 24px rgba(11, 43, 88, .25); }
