* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #e9e5de; color: #2b2824; font: 15px/1.4 system-ui, sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
header, footer { position: fixed; left: 0; right: 0; display: flex; gap: 8px; align-items: center; padding: 12px max(12px, env(safe-area-inset-left)); pointer-events: none; }
header { top: 0; justify-content: space-between; }
footer { bottom: env(safe-area-inset-bottom); }
header > *, footer > * { pointer-events: auto; }
h1 { font-size: 17px; font-weight: 600; background: #fbfaf7e8; padding: 8px 14px; border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button { font: inherit; color: inherit; background: #fbfaf7e8; border: 0; border-radius: 99px; padding: 9px 15px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 4px #0002; }
button.on, #btnBack { background: #2b2824; color: #fbfaf7; }
nav, #rooms { display: flex; gap: 8px; }
#rooms { overflow-x: auto; padding: 4px; scrollbar-width: none; }
#hint { position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%); font-size: 13px; background: #fbfaf7cc; padding: 6px 12px; border-radius: 99px; width: max-content; max-width: 92vw; text-align: center; pointer-events: none; transition: opacity .4s; }
#loading { position: fixed; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; background: #e9e5de; }
#loading[hidden], [hidden] { display: none !important; }
#bar { width: 220px; height: 4px; background: #0001; border-radius: 4px; overflow: hidden; }
#bar i { display: block; height: 100%; width: 0; background: #2b2824; }
#modal { position: fixed; inset: 0; background: #1c1a17f2; z-index: 5; overflow: auto; padding: 64px 12px 24px; }
#close { position: fixed; top: 12px; right: 12px; }
#content { max-width: 1000px; margin: auto; color: #eee9e0; }
#content h2 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.grid img, #content video { width: 100%; border-radius: 8px; display: block; }
.grid img { cursor: zoom-in; aspect-ratio: 3/2; object-fit: cover; }
.big img { cursor: zoom-out; width: 100%; max-height: 85vh; object-fit: contain; }

#btnMotion { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(env(safe-area-inset-bottom) + 132px); width: 54px; height: 54px; padding: 0; display: grid; place-items: center; border-radius: 50%; z-index: 4; box-shadow: 0 2px 10px #0003; }
#btnMotion[hidden] { display: none; }
#btnMotion.on { background: #2b2824; color: #fbfaf7; box-shadow: 0 0 0 3px #fbfaf7, 0 2px 10px #0004; }
