/* Planeta Pana Misia — Galeria 3D: spacer po sali
   Kolory, kroje i przyciski pochodzą z ../style.css — tu tylko to, co dotyczy sali. */

html, body.spacer { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.spacer { position: fixed; inset: 0; -webkit-user-select: none; user-select: none; }

#scena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; background: var(--czern); }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.hud p { margin: 0; }
.hud-marka {
  position: absolute; left: 20px; top: 16px;
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--bialy);
}
.hud-marka span { color: var(--przygaszony); font-weight: 400; }
.hud-ladowanie {
  position: absolute; right: 20px; top: 16px; text-align: right;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--przygaszony);
}
.hud-ladowanie i { display: block; width: 140px; height: 1px; margin: 8px 0 0 auto; background: var(--linia2); }
.hud-ladowanie b { display: block; height: 1px; background: var(--krew); transform: scaleX(0); transform-origin: left; transition: transform .3s linear; }
.hud-ladowanie.gotowe { opacity: 0; transition: opacity 1.2s ease 1.5s; }
.celownik {
  position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%; background: var(--bialy); opacity: .55;
}
.celownik.cel { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: transparent; border: 1px solid var(--bialy); opacity: .9; }
.hud-podpowiedz {
  position: absolute; left: 20px; bottom: 16px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--przygaszony);
}
.hud-podpowiedz b { color: var(--bialy); font-weight: 500; }
.hud-menu { position: absolute; right: 12px; top: 10px; pointer-events: auto; min-height: 36px; padding: 6px 16px; background: var(--czern); display: none; }
.bez-blokady .hud-menu { display: inline-flex; }
.bez-blokady .hud-ladowanie { top: 58px; }
.bez-blokady .celownik { display: none; }
.stan-ogladanie .celownik, .stan-ogladanie .hud-podpowiedz, .stan-ogladanie .hud-menu { display: none; }

/* ---------- tabliczka przy figurce ---------- */
.tabliczka-spacer {
  position: fixed; z-index: 20; right: 24px; top: 50%; transform: translateY(-50%);
  width: min(380px, 36vw); max-width: none; max-height: calc(100vh - 110px); overflow: auto;
  padding: 22px 22px 20px; background: var(--czern); border: 1px solid var(--linia);
  -webkit-user-select: text; user-select: text;
}
.tabliczka-spacer h2 { margin-bottom: 18px; font-size: clamp(18px, 2vw, 24px); }
.tabliczka-spacer .nr { margin-bottom: 10px; }
.tabliczka-spacer dl { margin-bottom: 18px; }
.tabliczka-spacer dl > div { grid-template-columns: 92px 1fr; padding: 7px 0; }
.tabliczka-spacer .opis { padding: 16px 16px 14px; }
.tabliczka-spacer .opis blockquote { font-size: 17px; line-height: 1.5; }
.tabliczka-spacer .tab-przyciski { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tabliczka-spacer .tab-przyciski:not(:has(.btn:not([hidden]))) { display: none; }
.tabliczka-spacer .tab-przyciski .btn { min-height: 36px; padding: 6px 16px; }
.tabliczka-spacer .tab-wskazowka { margin: 14px 0 0; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--przygaszony); }
.tabliczka-spacer .tab-wskazowka em { font-style: normal; color: var(--lipa); }
.klawisz {
  display: inline-block; margin-left: 8px; padding: 2px 6px; border: 1px solid var(--linia2);
  font-size: 9px; letter-spacing: 1px; color: var(--przygaszony);
}
.tab-rozwin { display: none; }

/* ---------- tryb oglądania ---------- */
.ogladanie {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 20px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--czern); border-top: 1px solid var(--linia);
}
.ogladanie p { margin: 0; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--przygaszony); text-align: center; }
.ogladanie .btn { min-height: 36px; padding: 6px 16px; }

/* ---------- drążek dotykowy ---------- */
.drazek {
  position: fixed; z-index: 15; width: 104px; height: 104px; margin: -52px 0 0 -52px;
  border: 1px solid var(--linia2); border-radius: 50%; pointer-events: none;
}
.drazek i { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid var(--bialy); border-radius: 50%; }

/* ---------- ekran startowy ---------- */
.nakladka {
  position: fixed; inset: 0; z-index: 100; overflow: auto; -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, .86);
  display: flex;
}
.nakladka-srodek {
  margin: auto; width: 100%; max-width: 520px; padding: 40px 24px 44px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.nakladka .logo-mis { height: clamp(96px, 17vh, 170px); margin-bottom: 20px; }
.nakladka h1 { font-size: clamp(26px, 5.4vw, 44px); }
.nakladka .kreska { margin: 14px auto 22px; }
.start-wstep { margin: 0 0 22px; max-width: 440px; }
.sterowanie { width: 100%; margin: 0 0 24px; }
.sterowanie > div { grid-template-columns: 150px 1fr; }
.sterowanie-dotyk { display: none; }
.dotyk .sterowanie-dotyk { display: block; }
.dotyk .sterowanie-mysz { display: none; }
.start-stan { margin: 0 0 10px; min-height: 16px; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--przygaszony); }
.start-pasek { display: block; margin: 0 auto 26px; }
.btn-wejdz { min-height: 46px; padding: 10px 30px; border-color: var(--bialy); }
.btn-wejdz:hover { border-color: var(--krew); }
.btn[disabled] { opacity: .4; cursor: default; }
.start-powrot {
  margin-top: 22px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--przygaszony); text-decoration: none; padding: 8px;
}
.start-powrot:hover { color: var(--bialy); }
.brak-js, .brak-webgl { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; margin: 0; text-align: center; color: var(--bialy); background: var(--czern); }

/* ---------- telefon ---------- */
@media (max-width: 1000px) {
  .hud-marka { left: 14px; top: 14px; }
  .hud-marka span { display: none; }
  .hud-podpowiedz { display: none; }
  .tabliczka-spacer {
    left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto;
    max-height: 62vh; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0;
  }
  .tabliczka-spacer .nr { margin-bottom: 6px; }
  .tabliczka-spacer h2 { margin-bottom: 0; font-size: 18px; }
  .tabliczka-spacer .rodzina { margin: 6px 0 0; }
  .tabliczka-spacer .tab-przyciski { margin: 12px 0 0; }
  .tab-rozwin { display: inline-flex; }
  .tabliczka-spacer .tab-szczegoly { display: none; margin-top: 16px; }
  .tabliczka-spacer.rozwinieta .tab-szczegoly { display: block; }
  .tabliczka-spacer .tab-wskazowka { display: none; }
  .sterowanie > div { grid-template-columns: 112px 1fr; }
  .nakladka-srodek { padding: 28px 20px 36px; }
  .klawisz { display: none; }
  .ogladanie { top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--linia); padding: 10px 12px; }
}

/* opcja w menu startowym */
.start-opcja { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--przygaszony); cursor: pointer; }
.start-opcja input { accent-color: var(--krew); width: 16px; height: 16px; }

/* mini mapka */
.mapka { position: fixed; left: 16px; bottom: 52px; z-index: 5; pointer-events: none; opacity: .92; }
.stan-ogladanie .mapka { display: none; }
@media (hover: none) and (pointer: coarse) { .mapka { left: auto; right: 12px; top: 56px; bottom: auto; } }
@media (max-width: 700px) { .mapka { left: auto; right: 12px; top: 56px; bottom: auto; } }
