/* NomiPlay Mundos: interface comum de NOMIPLAY WORLD e NOMIPLAY WIZARD WORLD (complementa /aventuras/estilo.css). */
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--fundo); border-radius: 99px; padding: 8px 14px; font-weight: 700; font-size: 16px; box-shadow: var(--sombra); color: var(--tinta); white-space: nowrap; }
#hud-nivel { position: relative; overflow: hidden; font-size: 13px; }
#hud-nivel i { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: linear-gradient(90deg, #22c55e, #facc15); }
#missao { cursor: pointer; }
@media (max-width: 640px) { #hud-nivel b { display: none; } .pill { padding: 7px 10px; font-size: 14px; } }

/* barra lateral de atalhos */
#barra-extra { position: fixed; right: max(12px, env(safe-area-inset-right)); top: 50%; transform: translateY(-62%); display: grid; gap: 8px; }
#barra-extra button { width: 58px; min-height: 58px; border-radius: 18px; border: 0; background: var(--fundo); box-shadow: var(--sombra); font-size: 24px; cursor: pointer; display: grid; place-items: center; padding: 4px 0; font-family: inherit; color: var(--tinta); }
#barra-extra small { font-size: 10px; font-weight: 700; line-height: 1; }
#barra-extra button:active { transform: scale(.94); }
@media (max-height: 560px) { #barra-extra { top: 74px; transform: none; grid-auto-flow: column; right: 50%; margin-right: -150px; } #barra-extra button { width: 52px; min-height: 48px; font-size: 20px; } }

/* transição entre cenas */
#veu { position: fixed; inset: 0; background: radial-gradient(circle, #312e81, #020617); opacity: 0; pointer-events: none; transition: opacity .45s; z-index: 40; }
#veu.ativo { opacity: 1; }

/* confete */
.confete { position: fixed; top: -12px; width: 10px; height: 14px; border-radius: 3px; z-index: 60; pointer-events: none; animation: cair 2.4s ease-in forwards; }
@keyframes cair { to { transform: translateY(105vh) rotate(720deg); opacity: .6; } }

/* painel de minijogo (deixa o 3D visível) */
#mini { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); background: var(--fundo); border-radius: 26px; padding: 14px 16px; box-shadow: var(--sombra); text-align: center; z-index: 12; }
#mini > b { display: block; font-size: clamp(15px, 4vw, 19px); margin-bottom: 8px; }
.medidor { position: relative; height: 30px; border-radius: 99px; background: linear-gradient(90deg, #fecaca, #fde68a, #fecaca); margin: 8px 0 12px; overflow: hidden; }
.medidor .verde { position: absolute; top: 0; bottom: 0; background: #4ade80; }
.medidor .cursor { position: absolute; top: -2px; bottom: -2px; width: 8px; margin-left: -4px; background: #1e1b4b; border-radius: 4px; }
.ritmo { position: relative; width: 120px; height: 120px; margin: 6px auto 10px; display: grid; place-items: center; }
.ritmo .anel { position: absolute; width: 70px; height: 70px; border-radius: 50%; border: 6px solid #a855f7; }
.ritmo .bolinha { position: absolute; width: 70px; height: 70px; border-radius: 50%; border: 4px dashed #f472b6; }

/* editor de personagem */
.editor .topo-e, .topo-c { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.editor .abas, #construir .abas { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.editor .conteudo { max-height: 52vh; overflow: auto; padding: 2px; }
.editor small { display: block; margin: 8px 0 4px; font-weight: 700; color: #6366f1; }
.roupas { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 8px 0; }
.roupa { font: inherit; border: 3px solid transparent; background: #f1f5f9; border-radius: 16px; padding: 8px; display: grid; justify-items: center; gap: 2px; cursor: pointer; color: var(--tinta); }
.roupa i { width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.roupa b { font-size: 13px; line-height: 1.15; text-align: center; } .roupa small { margin: 0 !important; font-size: 12px; color: #475569 !important; }
.roupa.sel { border-color: var(--azul); background: #eff6ff; } .roupa.trav { opacity: .55; }
@media (max-width: 720px) { .painel.lado.editor { width: 100%; max-height: 52vh; border-radius: 24px 24px 0 0; padding: 12px; } .editor .conteudo { max-height: 26vh; } #telas.menu-lado { padding: 0; } }

/* construção */
#construir { position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(900px, calc(100vw - 20px)); background: var(--fundo); border-radius: 24px; padding: 12px 14px; box-shadow: var(--sombra); z-index: 12; }
#construir .objs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
#construir .obj { font: inherit; flex: 0 0 auto; min-width: 104px; border: 3px solid transparent; background: #f1f5f9; border-radius: 16px; padding: 8px 10px; display: grid; gap: 2px; cursor: pointer; color: var(--tinta); }
#construir .obj b { font-size: 14px; } #construir .obj small { font-size: 12px; color: #475569; }
#construir .obj.sel { border-color: #f59e0b; background: #fef3c7; } #construir .obj.trav { opacity: .5; }
#construir .ferr { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; background: #fef9c3; border-radius: 16px; padding: 6px; margin-bottom: 6px; }
#construir .nota { margin: 0 0 4px; text-align: center; }
#construir .dpad { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: calc(100% + 12px); display: grid; grid-template-columns: repeat(3, 46px); grid-template-areas: ". u ." "l d r"; gap: 6px; }
#construir .dpad button { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--fundo); box-shadow: var(--sombra); font-size: 20px; touch-action: none; }
#construir .dpad [data-pan=up] { grid-area: u; } #construir .dpad [data-pan=left] { grid-area: l; } #construir .dpad [data-pan=down] { grid-area: d; } #construir .dpad [data-pan=right] { grid-area: r; }
#construir .cores-casa small { display: block; font-weight: 700; color: #6366f1; margin-top: 4px; }

/* missões */
.missoes { max-height: 92vh; overflow: auto; text-align: left; }
.missoes h3 { margin: 14px 0 6px; }
.item-m { background: #f8fafc; border-radius: 14px; padding: 8px 10px; margin: 6px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 15px; }
.item-m .barra { grid-column: 1 / -1; display: block; height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.item-m .barra b { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #facc15); }
.item-m.feita { background: #dcfce7; }
.idiomas { margin: 10px 0; }
.apelido { display: grid; gap: 6px; margin-top: 12px; text-align: left; }
.apelido input { font: inherit; font-size: 18px; padding: 10px 14px; border-radius: 14px; border: 2px solid #c7d2fe; }

/* temas */
.tema-world .titulo-jogo { background: linear-gradient(90deg, #38bdf8, #a78bfa, #f472b6, #facc15); -webkit-background-clip: text; background-clip: text; }
.tema-wizard { --fundo: rgba(255,251,235,.97); --tinta: #1e1338; }
.tema-wizard .titulo-jogo { background: linear-gradient(90deg, #fde68a, #f0abfc, #a5b4fc); -webkit-background-clip: text; background-clip: text; font-family: 'Cinzel Decorative', 'Fredoka', serif; letter-spacing: .02em; }
.tema-wizard .caixa, .tema-wizard .menu, .tema-wizard .painel { background: linear-gradient(180deg, #fffbeb, #fef3c7); border: 2px solid #d4a017; }
.tema-wizard #telas.escura { background: radial-gradient(circle at 50% 25%, rgba(76,29,149,.92), rgba(9,5,26,.97)); }
.tema-wizard .btn.amarelo { background: linear-gradient(180deg, #fde68a, #f59e0b); }

/* barra de feitiços (Wizard World) */
#feiticos { position: fixed; left: 50%; bottom: max(62px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; background: rgba(30,19,56,.78); padding: 6px; border-radius: 20px; backdrop-filter: blur(6px); }
#feiticos button { width: 50px; height: 50px; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font-size: 22px; cursor: pointer; position: relative; font-family: inherit; }
#feiticos button.sel { border-color: #fde68a; background: rgba(253,230,138,.25); box-shadow: 0 0 14px rgba(253,230,138,.6); }
#feiticos button small { position: absolute; right: 2px; bottom: 0; font-size: 10px; font-weight: 700; color: #fde68a; }
#feiticos button:disabled { opacity: .3; }
@media (max-width: 900px) { #feiticos { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 146px); left: max(10px, env(safe-area-inset-left)); transform: none; flex-wrap: wrap; width: 164px; justify-content: center; } #feiticos button { width: 44px; height: 44px; font-size: 19px; } }
@media (max-width: 900px) and (max-height: 560px) { #feiticos { bottom: 140px; width: auto; flex-wrap: nowrap; } }
.runa { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; justify-content: center; margin: 10px auto; touch-action: none; position: relative; }
.runa button { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #a78bfa; background: #ede9fe; font-size: 26px; font-family: inherit; }
.runa button.on { background: #fde68a; border-color: #f59e0b; box-shadow: 0 0 18px #fde68a; }
.runa button.prox { animation: pulsar 1s infinite; }
.lab { text-align: left; }
.lab .ingr { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.lab .ingr button { font: inherit; background: #fff7ed; border: 2px solid #fdba74; border-radius: 14px; padding: 8px; cursor: pointer; display: grid; justify-items: center; color: var(--tinta); }
.lab .ingr button span { font-size: 28px; } .lab .ingr button:disabled { opacity: .35; }
.lab .caldeirao { display: flex; gap: 6px; flex-wrap: wrap; min-height: 44px; background: #1e1338; border-radius: 16px; padding: 8px; color: #fff; align-items: center; justify-content: center; font-size: 26px; }
.lab input[type=range] { width: 100%; accent-color: #f97316; }
.grimorio { max-height: 92vh; overflow: auto; text-align: left; }
.grimorio .pagina { background: #fffaf0; border-radius: 14px; padding: 10px 12px; margin: 6px 0; border: 1px solid #f5d38a; }
.grimorio .pagina.apagada { opacity: .55; }
.ordem-card { border-radius: 22px; padding: 14px; color: #fff; text-align: center; }
.ordem-card .simbolo { font-size: 54px; }
#telas.escura .menu, #telas.escura .painel, #telas .menu, #telas .painel { color: var(--tinta); }
@media (max-width: 720px) { .painel.lado.editor { max-height: 58vh; display: flex; flex-direction: column; } .editor .conteudo { flex: 1; min-height: 0; max-height: none; } .editor .linha:last-child { flex: 0 0 auto; padding-top: 6px; } }
.item-m { display: block; } .item-m small { float: right; margin-left: 8px; font-weight: 700; color: #475569; } .item-m .barra { display: block; margin-top: 6px; }
.acao[data-id="feitico"] { grid-area: correr; font-size: 34px; }
#hud-ordem { font-size: 13px; } #hud-efeitos { font-size: 20px; }
@media (max-width: 640px) { #hud-ordem b { display: none; } }
