/* Página em tela cheia: o canvas do Three.js fica atrás e a interface por cima. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #000;
             font-family: system-ui, sans-serif; color: #f2f2f2; }
canvas { display: block; }
[hidden] { display: none !important; }

/* Raiz do DOM overlay: não bloqueia toques, só os controles recebem eventos. */
#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#overlay button, #overlay .sheet { pointer-events: auto; }

button {
    font: inherit; font-size: 14px; color: #f2f2f2; background: rgba(20, 22, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 8px 14px; cursor: pointer;
}

/* Topo: abas do módulo e botão de ajuda. */
.top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
.tabs { display: flex; background: rgba(20, 22, 26, 0.72); border-radius: 999px; padding: 3px; }
.tab { border: none; background: transparent; padding: 7px 16px; }
.tab.active { background: #f2f2f2; color: #111; }
.round { margin-left: auto; width: 36px; height: 36px; padding: 0; font-weight: 700; }

/* Dica ou aviso, logo abaixo do topo. */
.status {
    position: absolute; top: 60px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px);
    background: rgba(20, 22, 26, 0.72); padding: 7px 14px; border-radius: 999px; font-size: 14px;
    text-align: center;
}
.status.warn { background: #ffd400; color: #111; font-weight: 600; }

/* Rodapé: fica acima do botão "INICIAR AR"; no AR esse botão some. */
.bottom { position: absolute; left: 0; right: 0; bottom: 76px; display: flex; flex-direction: column;
          align-items: center; gap: 8px; padding: 0 12px; }
.ar .bottom { bottom: 16px; }
.info { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip { background: rgba(20, 22, 26, 0.72); padding: 5px 12px; border-radius: 999px; font-size: 13px;
        display: inline-flex; align-items: center; }
.swatch { width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; border: 1px solid rgba(255, 255, 255, 0.6); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

#crosshair {
    position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
    border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

#toast {
    position: absolute; left: 50%; top: 104px; transform: translateX(-50%); max-width: calc(100% - 24px);
    background: #ffd400; color: #111; font-weight: 600; padding: 7px 14px; border-radius: 999px;
    text-align: center; font-size: 14px;
}

/* Ajuda. */
.sheet {
    position: absolute; top: 60px; left: 12px; right: 12px; max-width: 420px; margin: 0 auto;
    background: rgba(20, 22, 26, 0.92); border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.45;
}
.sheet h2 { margin: 0 0 8px; font-size: 16px; }
.sheet p { margin: 0 0 8px; }
.sheet .muted { color: #b9c1c9; font-size: 13px; }
.sheet .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
#legend { margin: 0 0 8px; }
