:root { --bg: #14111c; --folha: #1d1927f2; --linha: #343046; --tinta: #f2eefb; --apagado: #a7a0bb; --ok: #2dd4bf; --ambar: #fbbf24; --verm: #fb7185; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--tinta); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; cursor: pointer; }

.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; pointer-events: none; background: linear-gradient(#14111ccc, #14111c00); }
.lugar { display: flex; flex-direction: column; }
.lugar b { font-size: 15px; }
.lugar span { font-size: 12px; color: var(--apagado); }
.chip { pointer-events: auto; font: 600 13px/1 system-ui, sans-serif; color: var(--tinta); background: #2a2536; border: 1px solid var(--linha); border-radius: 999px; padding: 9px 13px; cursor: pointer; transition: transform .1s, background .2s; }
.chip.logado { background: #0f3a35; border-color: #1f6d63; }
.chip:active { transform: scale(.96); }

.dica { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; font-size: 12px; color: var(--apagado); background: #14111cb3; padding: 6px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.aviso { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translate(-50%, -8px); max-width: min(92vw, 420px); background: #2a2536; border: 1px solid var(--linha); border-radius: 10px; padding: 10px 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; text-align: center; text-wrap: pretty; }
.aviso.on { opacity: 1; transform: translate(-50%, 0); }

.folha { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94vw, 460px); background: var(--folha); backdrop-filter: blur(8px); border: 1px solid var(--linha); border-radius: 14px; padding: 14px; box-shadow: 0 10px 40px #0008; animation: sobe .22s ease-out; }
.folha[hidden] { display: none; }
@keyframes sobe { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.topo { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.topo b { flex: 1; font-size: 15px; }
.rosto { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 62%, #f2c9a0 0 42%, transparent 43%), linear-gradient(#3b2a20 0 45%, #2563eb 45%); box-shadow: 0 0 0 2px var(--ok); flex: none; }
.fecha { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #2a2536; color: var(--tinta); font-size: 20px; line-height: 1; cursor: pointer; }
#c-texto { margin: 0 0 12px; min-height: 2.9em; text-wrap: pretty; white-space: pre-line; }
.opcoes, .andares { display: flex; flex-direction: column; gap: 6px; }
.opcoes button, .andares button { font: 600 14px/1.3 system-ui, sans-serif; text-align: left; color: var(--tinta); background: #2a2536; border: 1px solid var(--linha); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: background .15s, transform .1s; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.opcoes button:hover, .andares button:hover { background: #342e44; }
.opcoes button:active, .andares button:active { transform: scale(.98); }
.opcoes button.principal { background: #0f3a35; border-color: #1f6d63; }
button:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; }
.sub { margin: 0 0 10px; color: var(--apagado); }
.visor { font: 700 14px/1 ui-monospace, Consolas, monospace; color: var(--ambar); background: #0b0910; padding: 6px 9px; border-radius: 6px; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag.meu { background: #0f3a35; color: var(--ok); }
.tag.olhar { background: #3a2f12; color: var(--ambar); }
.tag.livre { background: #2a2536; color: var(--apagado); }
.andares small { display: block; font-weight: 500; color: var(--apagado); font-size: 12px; }
.nota { font-size: 12px; color: var(--apagado); margin: 10px 0 0; }

.entrar { display: flex; flex-direction: column; gap: 8px; }
.entrar input { font: 16px system-ui, sans-serif; color: var(--tinta); background: #14111c; border: 1px solid var(--linha); border-radius: 10px; padding: 12px 14px; }
.entrar input:focus-visible { outline: 2px solid var(--ok); outline-offset: 1px; }
.entrar button { font: 600 14px/1.3 system-ui, sans-serif; color: var(--tinta); background: #2a2536; border: 1px solid var(--linha); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.entrar button.principal { background: #0f3a35; border-color: #1f6d63; }
.entrar button:disabled { opacity: .6; }
.entrar .erro { margin: 0; min-height: 1.2em; color: var(--verm); font-size: 13px; }
body:has(.folha:not([hidden])) .dica { opacity: 0; }
