:root { --n: #0E2A43; --a: #1565C0; --z: #FFB938; --t: #16293A; --s: #4A5A66; --tlo: #EDF1F2; --ok: #2E7D32; --zle: #C62828; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--t); background: var(--tlo); min-height: 100vh; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.gora { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--n); color: #fff; }
.marka { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.marka b { color: var(--z); }
.status { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.12); white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #9aa; vertical-align: 1px; }
.status.ok::before { background: #5BE37D; } .status.zle::before { background: #FF6B6B; } .status.demo::before { background: var(--z); }
main { max-width: 760px; margin: 0 auto; padding: 16px 12px calc(24px + env(safe-area-inset-bottom)); }
h1 { font-size: 22px; margin: 0 0 4px; }
h3 { font-size: 17px; margin: 0; }
.szary { color: var(--s); margin: 0; }
.karta { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(14,42,67,.12); padding: 16px; }
.waska { max-width: 420px; margin: 24px auto; }
label { display: block; margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--s); }
input:not([type=range]) { display: block; width: 100%; margin-top: 6px; padding: 12px; font-size: 17px; border: 1px solid #C9D3D8; border-radius: 10px; }
input:focus { outline: 2px solid var(--a); outline-offset: 1px; }
button { min-height: 48px; padding: 10px 16px; border: 0; border-radius: 11px; background: var(--n); color: #fff; font: inherit; font-weight: 650; cursor: pointer; touch-action: manipulation; }
button:active { transform: scale(.97); }
button.duzy { width: 100%; margin-top: 18px; font-size: 17px; }
button.stop { background: #E3E8EB; color: var(--n); }
button.link { background: none; color: var(--a); min-height: 44px; padding: 8px 0; margin-top: 8px; text-decoration: underline; }
button.link.maly { margin: 0; font-size: 14px; }
.blad { color: var(--zle); min-height: 1.2em; margin: 10px 0 0; font-size: 14px; }
.naglowek-domu { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 4px 12px; }
.wszystkie { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.wszystkie span { font-weight: 650; }
.przyciski { display: flex; gap: 8px; }
.przyciski button { min-width: 56px; }
.przyciski.pion { flex-direction: column; }
.przyciski.pion button { width: 56px; padding: 0; font-size: 18px; }
.pokoj { margin: 18px 4px 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--s); }
.roleta { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; margin-bottom: 10px; }
.okno { position: relative; width: 64px; height: 92px; border: 4px solid var(--n); border-radius: 6px; overflow: hidden;
  background: linear-gradient(160deg, #BFE3FF, #E8F5FF 55%, #FFE7A8); }
.pancerz { position: absolute; left: 0; right: 0; top: 0; height: 0%; transition: height .25s linear;
  background: repeating-linear-gradient(to bottom, #8C99A3 0 6px, #6E7C87 6px 7px); box-shadow: 0 2px 0 var(--n); }
.roleta.rusza .okno { border-color: var(--z); }
.opis { min-width: 0; }
.nazwa { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stan { font-size: 14px; margin: 2px 0 8px; }
.suwak { width: 100%; height: 32px; accent-color: var(--a); }
.offline .roleta { opacity: .55; }
@media (max-width: 380px) { .roleta { grid-template-columns: 52px 1fr auto; gap: 10px; } .okno { width: 52px; height: 80px; } }
