:root { --panel: rgba(18, 19, 22, .82); --tekst: #eeebe4; --akcent: #d23b52; --tlo: #1d1f23; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--tlo); color: var(--tekst);
             font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }

/* strona QR: pełnoekranowy model, panele na wierzchu */
body.przegladarka { overflow: hidden; }
#scena { position: fixed; inset: 0; touch-action: none; }
#scena canvas { display: block; width: 100%; height: 100%; }
#gora { position: fixed; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top) + 12px) 16px 24px;
        background: linear-gradient(rgba(0,0,0,.6), transparent); pointer-events: none; z-index: 5; }
#gora h1 { margin: 0; font-size: 20px; font-weight: 650; }
#gora p { margin: 2px 0 0; font-size: 13px; opacity: .8; max-width: 46ch; }
#pasek { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 12px);
         display: flex; gap: 8px; justify-content: center; z-index: 6; padding: 0 12px; }
#pasek button, #pasek a { background: var(--panel); color: var(--tekst); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 10px 16px; font: inherit; text-decoration: none; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#pasek .wl, #pasek button[aria-pressed="true"] { border-color: var(--akcent); color: #fff; }
#pasek a[hidden] { display: none; }
body.galeria-otwarta #pasek { bottom: calc(env(safe-area-inset-bottom) + 124px); }
#galeria { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 8px 12px calc(env(safe-area-inset-bottom) + 8px);
           background: linear-gradient(transparent, rgba(0,0,0,.75) 30%); }
#galeria[hidden] { display: none; }
#galeria h2 { margin: 0 0 6px 4px; font-size: 12px; font-weight: 500; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
#lista-zdjec { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#lista-zdjec li { flex: 0 0 auto; }
#lista-zdjec button { border: 1px solid rgba(255,255,255,.18); background: #000; padding: 0; border-radius: 8px;
                      overflow: hidden; width: 120px; height: 75px; cursor: pointer; }
#lista-zdjec img { width: 100%; height: 100%; object-fit: cover; display: block; }
#lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.92); display: grid;
            grid-template-rows: 1fr auto; place-items: center; padding: 16px; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; }
#lightbox p { margin: 8px 0 0; opacity: .8; }
#lb-zamknij { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 12px; font-size: 32px; line-height: 1;
              background: none; border: 0; color: #fff; padding: 8px 14px; cursor: pointer; }
#postep { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 30; background: transparent; }
#postep i { display: block; height: 100%; width: 0; background: var(--akcent); transition: width .15s; }
body:not([data-stan="ladowanie"]) #postep { display: none; }
#komunikat, .komunikat-stale { position: fixed; inset: 0; z-index: 25; display: grid; place-content: center; text-align: center;
  padding: 24px; background: var(--tlo); font-size: 17px; }
#komunikat[hidden] { display: none; }
#komunikat a { color: var(--akcent); }

/* etykiety POI (CSS2D) */
.poi { pointer-events: auto; cursor: pointer; padding: 4px 10px; border-radius: 999px;
       background: rgba(18, 19, 22, .82); color: #eeebe4; border: 1px solid rgba(255,255,255,.14);
       white-space: nowrap; font: 500 12px/1.2 system-ui, sans-serif; margin-bottom: 4px; }
.poi.hero { background: #a8243a; border-color: #d23b52; color: #fff; font-weight: 650; }
.poi.park, .poi.punkt { opacity: .78; font-weight: 400; }
.poi.wybrany { outline: 2px solid #d23b52; }
body.bez-etykiet .poi { display: none; }

/* strona główna: lista budynków */
body.lista { overflow: auto; padding: 24px 16px calc(env(safe-area-inset-bottom) + 24px); }
body.lista main { max-width: 640px; margin: 0 auto; }
body.lista h1 { font-size: 24px; }
body.lista ul { list-style: none; padding: 0; display: grid; gap: 10px; }
body.lista li a { display: block; padding: 14px 16px; border-radius: 12px; background: #272a30; text-decoration: none;
                  border: 1px solid rgba(255,255,255,.08); }
body.lista li a small { display: block; opacity: .65; }
