/* INDIA DISCOVERY 360 · estilos comuns dos jogos INDIA ADVENTURE 360 e INDIA LIFE 360 */
:root { --pri: #ea580c; --sec: #0f766e; --fundo: #fffaf2; --tinta: #1c1917; --suave: #78716c; --borda: #f3e3cc; --sombra: 0 10px 30px rgba(28, 25, 23, .22); --ok: #16a34a; --erro: #dc2626; --ouro: #d4a017; }
.tema-life { --pri: #4338ca; --sec: #d97706; --fundo: #fbfaff; --borda: #e4e2fb; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1917; color: var(--tinta); font-family: "Baloo 2", "Noto Sans Devanagari", system-ui, sans-serif; overscroll-behavior: none; }
#tela { position: fixed; inset: 0; display: block; touch-action: none; }
button { font-family: inherit; }
.oculto { display: none !important; }

/* HUD */
#hud { position: fixed; top: max(10px, env(safe-area-inset-top)); left: max(40px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--fundo); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 15px; box-shadow: var(--sombra); white-space: nowrap; border: 0; color: var(--tinta); }
#missao { max-width: min(52vw, 440px); white-space: normal; line-height: 1.15; text-align: left; cursor: pointer; font-size: 14px; }
#missao small { display: block; color: var(--suave); font-weight: 600; font-size: 12px; }
.hud-dir { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hud-dir button.pill { cursor: pointer; font-size: 18px; padding: 6px 10px; }
.hud-dir button.pill small { font-size: 11px; }
@media (max-width: 640px) { .hud-dir button.pill small { display: none; } #missao { font-size: 13px; max-width: 50vw; } #missao small { display: none; } .pill { padding: 5px 9px; } }

/* controles */
#setas { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; gap: 10px; z-index: 5; }
#setas button, #bt-acao { width: 64px; height: 64px; border-radius: 22px; border: 0; background: rgba(255, 250, 242, .92); box-shadow: var(--sombra); font-size: 24px; color: var(--tinta); touch-action: none; cursor: pointer; }
#setas button.ativo { transform: scale(.93); background: #fde68a; }
#bt-acao { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: auto; min-width: 120px; padding: 0 18px; font-size: 17px; font-weight: 800; background: var(--pri); color: #fff; z-index: 5; animation: pulsar 1.6s infinite; }
@keyframes pulsar { 50% { transform: scale(1.05); } }
#dica { position: fixed; left: 50%; bottom: max(90px, calc(env(safe-area-inset-bottom) + 90px)); transform: translateX(-50%); background: rgba(28, 25, 23, .72); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 14px; pointer-events: none; z-index: 4; white-space: nowrap; transition: opacity .3s; }
#dica:empty { opacity: 0; }
#aviso { position: fixed; left: 50%; top: 72px; transform: translate(-50%, -20px); background: var(--tinta); color: #fff; padding: 10px 18px; border-radius: 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: .3s; z-index: 70; max-width: calc(100vw - 30px); text-align: center; }
#aviso.visivel { opacity: 1; transform: translate(-50%, 0); }

/* janela modal */
#janela { position: fixed; inset: 0; display: none; place-items: center; background: rgba(28, 25, 23, .45); z-index: 30; padding: 14px; }
#janela.aberta { display: grid; }
#janela .caixa { width: min(620px, 100%); max-height: calc(100dvh - 28px); overflow: auto; background: var(--fundo); border-radius: 26px; padding: 18px 20px; box-shadow: var(--sombra); animation: subir .25s ease-out; }
#janela.larga .caixa { width: min(760px, 100%); }
@keyframes subir { from { transform: translateY(18px); opacity: 0; } }
@media (max-width: 640px) { #janela { place-items: end center; padding: 8px; } #janela .caixa { border-radius: 22px; padding: 14px; } }
.topo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.topo .emo { font-size: 34px; line-height: 1; }
.topo h2 { margin: 0; font-size: clamp(19px, 4.6vw, 24px); line-height: 1.1; }
.texto { font-size: 17px; line-height: 1.45; }
.texto p { margin: 6px 0; }
.pergunta { font-weight: 700; font-size: 18px; }
.botoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.bt { border: 0; border-radius: 16px; padding: 12px 20px; font-size: 17px; font-weight: 800; cursor: pointer; background: #f1ebe2; color: var(--tinta); }
.bt.pri { background: var(--pri); color: #fff; }
.bt.sec { background: var(--sec); color: #fff; }
.bt.mini { padding: 6px 12px; font-size: 14px; border-radius: 12px; }
.bt:active, .op:active { transform: scale(.97); }
.opcoes { display: grid; gap: 8px; margin-top: 10px; }
.opcoes.grade { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.op { border: 2px solid var(--borda); background: #fff; border-radius: 16px; padding: 12px 14px; font-size: 16px; text-align: left; cursor: pointer; color: var(--tinta); line-height: 1.25; }
.op:hover { border-color: var(--pri); }
.op.sel { border-color: var(--pri); background: #fff1e6; }
.tema-life .op.sel { background: #eef2ff; }
.op.ok { border-color: var(--ok); background: #dcfce7; }
.op:disabled { cursor: default; }
.treme { animation: treme .35s; border-color: var(--erro) !important; }
@keyframes treme { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.fb { border-radius: 16px; padding: 10px 14px; margin-top: 10px; }
.fb p { margin: 4px 0 0; line-height: 1.4; }
.fb.certo { background: #dcfce7; } .fb.errado { background: #fee2e2; }
.mais { background: #e0f2fe; border-radius: 16px; padding: 10px 14px; margin-top: 10px; }
.mais p { margin: 4px 0 0; line-height: 1.4; }
.dica { background: #fef9c3; border-radius: 12px; padding: 8px 12px; font-size: 15px; }
.dica:empty { display: none; }
.feitos { margin: 8px 0; padding-left: 22px; } .feitos li { margin: 3px 0; } .feitos small { color: var(--suave); }
.explica { padding-left: 20px; line-height: 1.4; } .explica li { margin: 5px 0; }
.pares { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pares > div { display: grid; gap: 8px; align-content: start; }
.pares .op { font-size: 15px; padding: 10px; }

/* diálogo */
.fala { display: flex; gap: 12px; align-items: flex-start; }
.fala .foto { width: 76px; height: 76px; border-radius: 20px; flex: 0 0 auto; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.fala .foto.emo { display: grid; place-items: center; font-size: 40px; background: #fde68a; }
.fala b { font-size: 15px; color: var(--pri); } .fala p { margin: 2px 0 0; font-size: 17px; line-height: 1.45; }
.hindi { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; background: #fff7ed; border: 2px dashed #fdba74; border-radius: 16px; padding: 8px 12px; margin-top: 8px; }
.hindi b { font-size: 26px; grid-row: span 2; color: #9a3412; font-family: "Noto Sans Devanagari", "Baloo 2", system-ui; }
.hindi span { font-weight: 800; } .hindi small { color: var(--suave); grid-column: 2; }
.hindi button { grid-row: 1 / span 2; grid-column: 3; }

/* labirinto e quebra-cabeça */
.labir { display: grid; gap: 2px; margin: 10px auto; max-width: min(460px, 100%); background: #14532d; padding: 4px; border-radius: 12px; }
.labir i { aspect-ratio: 1; display: grid; place-items: center; font-style: normal; font-size: clamp(12px, 3.6vw, 20px); border-radius: 4px; }
.labir i.p { background: #166534; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); } .labir i.c { background: #f5e6c8; cursor: pointer; }
.dpad { display: grid; grid-template-columns: repeat(3, 54px); grid-template-areas: ". u ." "l d r"; gap: 6px; justify-content: center; }
.dpad button { height: 50px; border-radius: 14px; border: 0; background: #f1ebe2; font-size: 20px; cursor: pointer; }
.dpad [data-m="0,-1"] { grid-area: u; } .dpad [data-m="-1,0"] { grid-area: l; } .dpad [data-m="0,1"] { grid-area: d; } .dpad [data-m="1,0"] { grid-area: r; }
.quebra { display: grid; gap: 3px; width: min(360px, 100%); margin: 10px auto; }
.peca { aspect-ratio: 1; border: 0; border-radius: 6px; cursor: pointer; outline: 3px solid transparent; }
.peca.sel { outline-color: var(--pri); } .peca.ok { box-shadow: inset 0 0 0 2px rgba(22,163,74,.6); }

/* telas cheias (início, mapa, passaporte, certificados) */
#telas { position: fixed; inset: 0; display: none; z-index: 20; overflow: auto; }
#telas.ativa { display: block; }
.tela-inicio { min-height: 100%; display: grid; place-items: center; padding: 20px 16px 40px; background: radial-gradient(circle at 20% 10%, rgba(255,153,51,.55), transparent 50%), radial-gradient(circle at 90% 90%, rgba(19,136,8,.45), transparent 55%), linear-gradient(160deg, #7c2d12, #134e4a); color: #fff; }
.tema-life .tela-inicio { background: radial-gradient(circle at 15% 15%, rgba(250,204,21,.45), transparent 50%), radial-gradient(circle at 85% 85%, rgba(236,72,153,.35), transparent 55%), linear-gradient(160deg, #312e81, #0f172a); }
.inicio { width: min(860px, 100%); text-align: center; }
.selo-col { display: inline-block; font-size: 13px; letter-spacing: .12em; font-weight: 800; background: rgba(255,255,255,.16); border-radius: 99px; padding: 4px 14px; }
.inicio h1 { font-size: clamp(36px, 9vw, 70px); line-height: .95; margin: 12px 0 4px; letter-spacing: .01em; text-shadow: 0 6px 24px rgba(0,0,0,.35); }
.inicio h1 em { font-style: normal; color: #fbbf24; }
.inicio .sub { font-size: clamp(17px, 4vw, 22px); margin: 0 0 18px; opacity: .95; }
.inicio .grupo { background: rgba(255,255,255,.1); border-radius: 22px; padding: 12px; margin: 10px 0; }
.inicio .grupo > b { display: block; text-align: left; margin: 0 4px 8px; font-size: 15px; letter-spacing: .04em; }
.escolhas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.escolha { border: 3px solid transparent; background: rgba(255,255,255,.92); color: var(--tinta); border-radius: 18px; padding: 8px; cursor: pointer; text-align: center; display: grid; gap: 2px; justify-items: center; }
.escolha img { width: 76px; height: 76px; border-radius: 16px; }
.escolha b { font-size: 17px; } .escolha small { font-size: 13px; color: var(--suave); line-height: 1.2; }
.escolha.sel { border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.4); }
.acoes-inicio { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.acoes-inicio .bt { font-size: 18px; }
.bt.jogar { font-size: 24px; padding: 14px 40px; background: #fbbf24; color: #1c1917; box-shadow: 0 8px 0 #b45309; }
.tema-life .bt.jogar { background: #facc15; box-shadow: 0 8px 0 #a16207; }
.bt.vidro { background: rgba(255,255,255,.16); color: #fff; }
.nota-pe { font-size: 13px; opacity: .8; margin-top: 16px; line-height: 1.4; }
.painel { width: min(900px, calc(100% - 24px)); margin: max(16px, env(safe-area-inset-top)) auto 30px; background: var(--fundo); border-radius: 26px; padding: 18px; box-shadow: var(--sombra); }
.painel h2 { margin: 0 0 6px; } .painel .topo-p { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
#telas.fundo-escuro { background: rgba(28, 25, 23, .78); }

/* mapa da Índia */
.mapa { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 720px) { .mapa { grid-template-columns: 1fr; } }
.mapa svg { width: 100%; height: auto; max-height: 70vh; }
.mapa .pino { cursor: pointer; }
.mapa .pino circle { transition: r .2s; }
.lista-destinos { display: grid; gap: 8px; }
.destino { display: flex; gap: 10px; align-items: center; border: 2px solid var(--borda); background: #fff; border-radius: 16px; padding: 8px 12px; cursor: pointer; text-align: left; color: var(--tinta); font-size: 15px; }
.destino .e { font-size: 26px; } .destino b { display: block; font-size: 16px; } .destino small { color: var(--suave); }
.destino.trav { opacity: .55; } .destino.atual { border-color: var(--pri); }
.prog { height: 8px; border-radius: 99px; background: #eee3d3; overflow: hidden; margin-top: 4px; } .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--sec), #fbbf24); }

/* passaporte */
.passaporte { background: linear-gradient(160deg, #1e3a8a, #172554); color: #fde68a; border-radius: 22px; padding: 16px; }
.passaporte h3 { margin: 0 0 10px; text-align: center; letter-spacing: .1em; }
.carimbos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.carimbo { aspect-ratio: 1; border-radius: 50%; border: 4px double currentColor; display: grid; place-items: center; text-align: center; padding: 10px; transform: rotate(var(--r, -8deg)); font-weight: 800; line-height: 1.05; background: rgba(255,255,255,.05); }
.carimbo span { font-size: 30px; display: block; } .carimbo small { font-size: 11px; font-weight: 600; display: block; opacity: .85; }
.carimbo.vazio { opacity: .25; border-style: dashed; }
.carimbo.novo { animation: carimbar .5s cubic-bezier(.3,1.6,.6,1); }
@keyframes carimbar { from { transform: scale(2.4) rotate(20deg); opacity: 0; } }

/* medalhas, conquistas, roupas */
.lista-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.card { background: #fff; border: 2px solid var(--borda); border-radius: 16px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; text-align: left; color: var(--tinta); font-size: 14px; line-height: 1.3; }
.card .e { font-size: 28px; line-height: 1; } .card b { display: block; font-size: 15px; } .card small { color: var(--suave); }
button.card { cursor: pointer; font-family: inherit; }
.card.trav { opacity: .5; filter: grayscale(.6); } .card.sel { border-color: var(--pri); background: #fff7ed; }
.abas { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.aba { border: 0; border-radius: 99px; padding: 8px 14px; font-weight: 800; background: #f1ebe2; cursor: pointer; font-size: 15px; color: var(--tinta); }
.aba.sel { background: var(--pri); color: #fff; }
.niveis { display: grid; gap: 8px; }
.nivel-l { border-radius: 18px; padding: 12px; background: #fff; border: 2px solid var(--borda); }
.nivel-l h3 { margin: 0 0 6px; font-size: 17px; }
.missoes-l { display: grid; gap: 4px; }
.missoes-l div { display: flex; gap: 8px; font-size: 15px; } .missoes-l .ok { color: var(--ok); } .missoes-l .trav { color: var(--suave); }

/* certificado */
.certificado { position: relative; background: #fffdf7; border: 10px double var(--ouro); border-radius: 12px; padding: 26px 22px; text-align: center; color: #1c1917; margin: 10px 0; }
.certificado::before { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(212,160,23,.4); border-radius: 6px; pointer-events: none; }
.certificado .col { letter-spacing: .14em; font-size: 12px; font-weight: 800; color: var(--sec); }
.certificado h3 { font-size: clamp(22px, 5vw, 32px); margin: 8px 0; color: var(--pri); }
.certificado .nome { font-size: clamp(24px, 6vw, 36px); font-weight: 800; border-bottom: 2px solid var(--ouro); display: inline-block; padding: 0 20px; margin: 6px 0 10px; }
.certificado .tri { height: 6px; background: linear-gradient(90deg, #ff9933 33%, #fff 33% 66%, #138808 66%); border-radius: 4px; margin: 12px auto 0; width: 60%; }
@media print { body * { visibility: hidden !important; } .certificado, .certificado * { visibility: visible !important; } .certificado { position: fixed; left: 5%; top: 5%; width: 90%; } }

/* tutorial */
.tut { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; }
.tut div { background: #fff; border-radius: 16px; padding: 10px; border: 2px solid var(--borda); font-size: 15px; line-height: 1.3; } .tut b { display: block; font-size: 26px; }

/* minijogos em canvas */
.mini-cv { width: 100%; max-width: 560px; aspect-ratio: 4/3; display: block; margin: 8px auto; border-radius: 16px; background: #0f172a; touch-action: none; }
.mini-bts { display: flex; gap: 8px; justify-content: center; }
.mini-bts button { min-width: 80px; height: 56px; border-radius: 16px; border: 0; background: #f1ebe2; font-size: 20px; font-weight: 800; touch-action: none; cursor: pointer; }
.mini-bts button.ativo { background: #fde68a; }
.placar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; font-weight: 800; }

.confete { position: fixed; top: -12px; width: 10px; height: 14px; border-radius: 3px; z-index: 80; pointer-events: none; animation: cair 2.6s ease-in forwards; }
@keyframes cair { to { transform: translateY(105vh) rotate(720deg); opacity: .6; } }
#veu { position: fixed; inset: 0; background: #1c1917; opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 40; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; text-align: center; }
#veu.ativo { opacity: 1; pointer-events: auto; }
#carregando { position: fixed; inset: 0; display: grid; place-items: center; background: #1c1917; color: #fff; z-index: 100; text-align: center; font-weight: 800; }
#carregando img { width: 84px; height: 84px; border-radius: 22px; }
#gire { position: fixed; left: 50%; top: 132px; transform: translateX(-50%); background: rgba(28,25,23,.7); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 13px; z-index: 4; pointer-events: none; }
@media (orientation: landscape), (min-width: 700px) { #gire { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
