/* stile.css: l'aspetto della pagina della stanza (ingresso, pulsanti, barra della scrittura, joystick, riserva senza 3D). */
:root { --fondo: #1d2026; --testo: #ece8df; --tenue: #a9a59b; --accento: #e0a458; --pannello: rgba(24, 27, 33, 0.86); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fondo); color: var(--testo); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; color: inherit; }
button { background: #353a44; border: 1px solid #4a505c; border-radius: 8px; padding: 0.45em 0.9em; cursor: pointer; }
button:hover { background: #414753; }
button.secondario { background: transparent; }
input { background: #2a2e36; border: 1px solid #4a505c; border-radius: 8px; padding: 0.45em 0.6em; }
[hidden] { display: none !important; }

#ingresso { max-width: 22rem; margin: 12vh auto 0; padding: 1.5rem; }
#ingresso h1 { font-weight: 300; letter-spacing: 0.3em; color: var(--accento); }
#modulo label { display: block; margin: 0 0 0.8rem; color: var(--tenue); }
#modulo input { display: block; width: 100%; margin-top: 0.25rem; color: var(--testo); }
#avviso { color: var(--accento); min-height: 1.4em; }

#stanza { position: fixed; inset: 0; overflow: hidden; }
#tela { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
#riga { position: absolute; top: 0.6rem; left: 50%; transform: translateX(-50%); background: var(--pannello); padding: 0.3rem 0.8rem; border-radius: 8px; font-size: 0.9rem; pointer-events: none; max-width: 90vw; text-align: center; }
#riga:empty { display: none; }
#pulsanti { position: absolute; top: 0.6rem; right: 0.6rem; display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; max-width: 60vw; }
#pulsanti button { background: var(--pannello); }
#micro.spento { opacity: 0.55; text-decoration: line-through; }
#vr { background: #3a5f8a !important; }

#joystick { position: absolute; left: 1.2rem; bottom: 6.5rem; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25); touch-action: none; }
#pomello { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }

#menu { position: absolute; background: var(--pannello); border: 1px solid #4a505c; border-radius: 8px; padding: 0.3rem; display: flex; flex-direction: column; gap: 0.2rem; z-index: 5; }
#pannello { position: absolute; top: 3.5rem; right: 0.6rem; background: var(--pannello); padding: 0.6rem 0.8rem; border-radius: 8px; font: 13px/1.45 ui-monospace, Consolas, monospace; max-width: 92vw; white-space: pre-wrap; z-index: 4; }

#barra { position: absolute; left: 0; right: 0; bottom: 0; background: var(--pannello); padding: 0.4rem 0.6rem calc(0.4rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.5rem; align-items: end; }
#piega { grid-row: 2; }
#messaggi { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; max-height: 28vh; overflow-y: auto; font-size: 0.95rem; }
#barra.piegata #messaggi { display: none; }
#messaggi li { padding: 0.15rem 0; display: flex; gap: 0.4rem; align-items: baseline; }
#messaggi .chi { font-weight: 600; }
#messaggi .ora { color: var(--tenue); font-size: 0.8em; }
#messaggi .testo { flex: 1; overflow-wrap: anywhere; }
#messaggi button { padding: 0 0.4em; font-size: 0.8em; background: transparent; border-color: transparent; }
#scrivi { grid-row: 2; display: flex; gap: 0.4rem; }
#testo { flex: 1; min-width: 0; color: var(--testo); }

#riserva { position: absolute; inset: 0 0 8rem 0; overflow-y: auto; padding: 1rem 1.2rem; }
#riserva li { margin: 0.2rem 0; }
#riserva-vista img { max-width: 100%; max-height: 60vh; display: block; background: #fff; }
