/* Модуль «Управление клубом»: «сутки клуба» (разрез здания + шкала времени, погода, воздух, журнал, заявка технику)
   и мини-виджеты в «инженерном» стиле. Разметка — resources/views/site/modules/building.blade.php, сценарий — building.js */
.bz, .bzf {
    --bz-ease: cubic-bezier(.2, .7, .2, 1);
    --bz-spring: cubic-bezier(.3, 1.5, .5, 1);
    --bz-ok: #22a35a; --bz-bad: #d64545; --bz-amber: #e0961f; --bz-cool: #3d8bfd; --bz-heat: #f08a3c; --bz-eco: #9aa3b2;
    --bz-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bz-head { max-width: 820px; }
.bz-head .lead { margin-top: 18px; }

/* ── Окно ── */
.bz-app {
    position: relative; margin-top: 44px; border: 1px solid var(--line-card); border-radius: 18px; overflow: hidden; font-size: 13px;
    background: radial-gradient(120% 90% at 40% 30%, #fbfbfa 0%, #f3f3f1 55%, #ecece9 100%);
    box-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 30px 80px rgba(20, 20, 19, .10);
}
.bz-bar { min-height: 52px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 8px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.bz-club { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; margin-right: 4px; }
.bz-club b { color: var(--ink); font-weight: 600; }
.bz-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 12px; white-space: nowrap; transition: background .3s, color .3s; }
.bz-chip b { color: var(--ink); font-weight: 600; }
.bz-scene span { color: var(--muted); }
.bz-door i { width: 7px; height: 7px; border-radius: 50%; background: var(--bz-ok); box-shadow: 0 0 0 3px rgba(34, 163, 90, .18); }
.bz-door[data-st='open'] { background: var(--ok-soft); color: var(--ok); }
.bz-door[data-st='locked'] { background: var(--bad-soft); color: var(--bad); }
.bz-door[data-st='locked'] i { background: var(--bz-bad); box-shadow: 0 0 0 3px rgba(214, 69, 69, .16); }
.bz-eq { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.bz-eq i { width: 2px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: bottom; animation: bz-eq .9s ease-in-out infinite alternate; }
.bz-eq i:nth-child(2) { animation-delay: -.3s; } .bz-eq i:nth-child(3) { animation-delay: -.6s; } .bz-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes bz-eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.bz-music { color: var(--accent); background: var(--accent-soft); }
.bz-music[data-st='off'] { color: var(--muted); background: var(--chip); }
.bz-music[data-st='off'] .bz-eq { display: none; }
.bz-music[data-st='ann'] { color: #8a4b00; background: #fff1dc; }
.bz-vent .i { transition: transform .3s; }
.bz-vent[data-st='boost'] { background: #e5f3ff; color: #1662c4; }
.bz-vent[data-st='boost'] .i { animation: bz-spin .5s linear infinite; }
.bz-inside { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.bz-inside b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bz-clock { margin-left: auto; font: 600 22px/1 var(--bz-mono); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }

.bz-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; padding: 14px; }

/* ── Разрез ── */
.bz-scene-wrap { position: relative; min-width: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-card); background: #0f1530; box-shadow: 0 10px 26px rgba(20, 20, 19, .08); }
.bz-scroll { overflow: hidden; }
.bz-svg { display: block; width: 100%; height: auto; }
.bz-svg text { font-family: var(--font); }
.bz-stars circle { fill: #fff; animation: bz-tw 2.4s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes bz-tw { from { opacity: .35; } to { opacity: 1; } }
.bz-stars, [data-bz-sun], [data-bz-moon], .bz-clouds, .bz-rain, .bz-puddles { transition: opacity .6s; }
.bz-mount { fill: #3b4a73; opacity: .9; }
.bz-mount-snow { fill: #fff; opacity: .55; }
.bz-cl { fill: #fff; transition: fill .8s; }
.bz-cl-a { transform: translate(120px, -6px); animation: bz-drift-a 46s linear infinite alternate; }
.bz-cl-b { transform: translate(470px, -26px); animation: bz-drift-b 58s linear infinite alternate; }
.bz-cl-c { transform: translate(800px, 8px); animation: bz-drift-c 40s linear infinite alternate; }
@keyframes bz-drift-a { to { transform: translate(220px, -6px); } }
@keyframes bz-drift-b { to { transform: translate(380px, -26px); } }
@keyframes bz-drift-c { to { transform: translate(720px, 8px); } }
.bz-svg[data-wet='1'] .bz-cl { fill: #aeb7c6; }
.bz-rain { opacity: 0; }
.bz-rain-r { animation: bz-rain .45s linear infinite; }
@keyframes bz-rain { to { transform: translateY(40px); } }
.bz-puddles ellipse { fill: #9fb4d8; opacity: .35; }
.bz-puddles { opacity: 0; }
.bz-svg[data-wet='1'] .bz-puddles { opacity: 1; }

.bz-wall { fill: #1d2230; }
.bz-lit { opacity: 1; transition: opacity .5s, fill .5s; fill: #f6f3ea; }
.bz-room[data-tone='eve'] .bz-lit { fill: #f6dcb0; }
.bz-room[data-tone='clean'] .bz-lit { fill: #e6eefb; }
.bz-win-f { fill: none; stroke: #7d8596; stroke-width: 2; }
.bz-cone { transition: opacity .5s; mix-blend-mode: screen; }
.bz-room[data-tone='eve'] .bz-cone { filter: sepia(.8) saturate(2.2) hue-rotate(-12deg); }
.bz-lamp { fill: #9aa2b3; transition: fill .4s; }
.bz-room.is-on .bz-lamp { fill: #fff7d6; }
.bz-room.is-fault .bz-lamp { fill: #5b2b2b; }
.bz-fx { fill: #5c6474; }
.bz-fx-scr { fill: #7fd4a8; }
.bz-flap { fill: #a8c2ef; opacity: .8; transition: transform .4s var(--bz-ease); transform-box: fill-box; }
.bz-svg.is-closed .bz-flap { fill: #c56a6a; }
.bz-counter { fill: #7a5b45; }
.bz-bottle { fill: hsl(var(--h) 55% 50%); }
.bz-fridge { fill: #c9ced8; } .bz-fridge-g { fill: #9fd3f5; opacity: .8; }
.bz-lock { fill: #8a96ad; }
.bz-room[data-z='fem'] .bz-lock { fill: #b49ab8; }
.bz-lock-l { stroke: #5e6880; stroke-width: 1; fill: none; }
.bz-tread { fill: #4b5262; }
.bz-rack { fill: #4b5262; }
.bz-plate { fill: #2a2f3a; }
.bz-spk rect { fill: #2a2f3a; } .bz-spk circle { fill: #5c6474; }
.bz-notes { fill: var(--accent); font-size: 12px; opacity: 0; transition: opacity .4s; }
.bz-svg.is-music .bz-notes { opacity: 1; }
.bz-notes text { animation: bz-note 2.2s ease-in-out infinite; }
.bz-notes text:nth-child(2) { animation-delay: -.7s; } .bz-notes text:nth-child(3) { animation-delay: -1.4s; }
@keyframes bz-note { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.bz-bahily { opacity: 0; transition: opacity .5s, transform .5s var(--bz-spring); transform: translateY(8px); }
.bz-bahily rect { fill: #fff6d8; stroke: #e0961f; stroke-width: 1.5; }
.bz-bahily path { stroke: #8a8f99; stroke-width: 2; }
.bz-bahily text { font-size: 8.5px; font-weight: 700; fill: #8a5a0e; }
.bz-svg[data-wet='1'] .bz-bahily { opacity: 1; transform: none; }
.bz-fault { opacity: 0; transition: opacity .3s; }
.bz-fault circle { fill: none; stroke: var(--bz-bad); stroke-width: 2; animation: bz-ring 1.1s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.bz-fault text { font-size: 10px; font-weight: 700; fill: #ff8a8a; }
.bz-room.is-fault .bz-fault { opacity: 1; }
@keyframes bz-ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.bz-ac rect { fill: #e7eaf0; }
.bz-ac-led { fill: var(--bz-cool); }
.bz-ac[data-m='heat'] .bz-ac-led { fill: var(--bz-heat); }
.bz-ac[data-m='eco'] .bz-ac-led, .bz-ac[data-m='off'] .bz-ac-led { fill: var(--bz-eco); }
.bz-ac-air { fill: none; stroke: #9ccaff; stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 3 3; animation: bz-air .8s linear infinite; }
.bz-ac[data-m='heat'] .bz-ac-air { stroke: #ffb27a; }
.bz-ac[data-m='eco'] .bz-ac-air { opacity: .35; animation-duration: 2.4s; }
.bz-ac[data-m='off'] .bz-ac-air { opacity: 0; }
@keyframes bz-air { to { stroke-dashoffset: -12; } }

.bz-pp { opacity: 0; transition: opacity .45s, transform .45s var(--bz-ease); transform: translateY(6px); }
.bz-pp.is-in { opacity: 1; transform: none; }

.bz-doorg .bz-door-p { fill: #2a2f3a; transition: fill .4s, opacity .4s; }
.bz-doorg[data-st='open'] .bz-door-p { fill: #7fd4a8; opacity: .55; }
.bz-door-led { fill: var(--bz-ok); transition: fill .3s; }
.bz-doorg[data-st='locked'] .bz-door-led { fill: var(--bz-bad); }

.bz-airflow { stroke: #9ed0ff; stroke-width: 2.4; stroke-dasharray: 8 12; fill: none; opacity: .35; animation: bz-air 1.2s linear infinite; transition: opacity .4s; }
.bz-svg[data-vent='eco'] .bz-airflow { opacity: .1; animation-duration: 4s; }
.bz-svg[data-vent='boost'] .bz-airflow { opacity: 1; animation-duration: .3s; stroke: #bfe2ff; }
.bz-fan { animation: bz-spin 1.1s linear infinite; transform-box: fill-box; transform-origin: center; }
.bz-svg[data-vent='eco'] .bz-fan { animation-duration: 4s; }
.bz-svg[data-vent='boost'] .bz-fan { animation-duration: .22s; }
@keyframes bz-spin { to { transform: rotate(360deg); } }

.bz-tag rect { fill: rgba(255, 255, 255, .94); stroke: rgba(20, 20, 19, .06); }
.bz-tag-tick { stroke: rgba(255, 255, 255, .7); stroke-width: 1.4; }
.bz-tag-n { font-size: 10.5px; fill: #75756f; font-weight: 500; }
.bz-tag-t { font-size: 15px; font-weight: 700; fill: #141413; font-variant-numeric: tabular-nums; }
.bz-tag-g { font-size: 10.5px; font-weight: 500; fill: #8b8b87; }
.bz-tag-dot { fill: var(--bz-cool); transition: fill .3s; }
.bz-tag[data-m='heat'] .bz-tag-dot { fill: var(--bz-heat); }
.bz-tag[data-m='eco'] .bz-tag-dot, .bz-tag[data-m='off'] .bz-tag-dot { fill: var(--bz-eco); }
.bz-tag[data-m='fault'] rect { stroke: var(--bz-bad); stroke-width: 1.5; }
.bz-tag[data-m='fault'] .bz-tag-dot { fill: var(--bz-bad); }
.bz-tag[data-m='fault'] .bz-tag-g { fill: var(--bz-bad); font-weight: 700; }

/* Объявление */
.bz-ann { position: absolute; left: 50%; top: 14px; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 28px); padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(20, 20, 19, .86); color: #fff; font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); opacity: 0; transform: translate(-50%, -12px); transition: opacity .35s, transform .45s var(--bz-spring); pointer-events: none; white-space: nowrap; }
.bz-ann.is-on { opacity: 1; transform: translate(-50%, 0); }
.bz-ann-ico { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ffb547; color: #3a2400; }
.bz-ann > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bz-wave { display: inline-flex; align-items: center; gap: 2px; height: 16px; }
.bz-wave i { width: 2.5px; height: 100%; border-radius: 2px; background: #ffb547; animation: bz-eq .5s ease-in-out infinite alternate; }
.bz-wave i:nth-child(2n) { animation-delay: -.25s; } .bz-wave i:nth-child(3n) { animation-delay: -.4s; height: 70%; }

/* Заявка технику */
.bz-tk {
    position: absolute; right: 14px; top: 14px; width: 292px; padding: 12px 14px 12px; border-radius: 16px; background: rgba(255, 255, 255, .97);
    box-shadow: 0 24px 60px rgba(10, 14, 30, .38), 0 0 0 1px rgba(20, 20, 19, .06); font-size: 12px;
    opacity: 0; transform: translateY(-14px) scale(.96); transform-origin: top right; transition: opacity .35s, transform .5s var(--bz-spring); pointer-events: none;
}
.bz-tk.is-on { opacity: 1; transform: none; }
.bz-tk-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.bz-tk-app { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #b23a3a; }
.bz-tk-app .i { padding: 3px; width: 20px; height: 20px; border-radius: 6px; background: #fdecec; }
.bz-tk-top b { font-family: var(--bz-mono); color: var(--ink-2); font-weight: 600; }
.bz-tk-title { display: block; margin-top: 8px; font-size: 15px; line-height: 1.25; letter-spacing: -.01em; }
.bz-tk-place { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.bz-tk-amp { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #fbf4f4; }
.bz-tk-amp svg { display: block; width: 100%; height: 26px; margin-bottom: 6px; }
.bz-tk-line { fill: none; stroke: var(--bz-bad); stroke-width: 2; stroke-linejoin: round; }
.bz-tk-cmd { stroke: #c9a0a0; stroke-dasharray: 2 2; }
.bz-tk-amp dl { margin: 0; display: grid; gap: 1px; }
.bz-tk-amp dl div { display: flex; gap: 6px; font-size: 11px; line-height: 1.35; }
.bz-tk-amp dt { color: var(--muted); min-width: 64px; }
.bz-tk-amp dd { margin: 0; font-weight: 600; }
.bz-tk-att { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.bz-tk-att span { height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: var(--chip); color: var(--ink-2); font-size: 10.5px; }
.bz-tk-att .bz-tk-prio { background: #fdecec; color: #b23a3a; font-weight: 600; }
.bz-tk-who { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bz-tk-who b { display: block; font-size: 12.5px; }
.bz-tk-who small { color: var(--muted); font-size: 11px; }
.bz-tk-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #2f5bd8; color: #fff; font-size: 10.5px; font-weight: 700; }
.bz-tk-st { display: grid; gap: 3px; margin-top: 8px; }
.bz-tk-st li { display: grid; grid-template-columns: 12px 38px 1fr; align-items: center; gap: 6px; font-size: 11.5px; color: var(--faint); transition: color .3s; }
.bz-tk-st time { font-family: var(--bz-mono); font-size: 11px; }
.bz-tk-st i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #d6d6d1; transition: background .3s, border-color .3s; }
.bz-tk-st li.is-done { color: var(--ink); }
.bz-tk-st li.is-done i { border-color: var(--bz-ok); background: var(--bz-ok); }
.bz-tk-st li.is-done:last-child span { color: var(--ok); font-weight: 600; }
.bz-tk[data-st='3'] .bz-tk-line { stroke: var(--bz-ok); d: path('M0 8h40l4 0 2 18h40l2-18h32'); }

/* ── Боковые панели ── */
.bz-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; height: 0; min-height: 100%; }
.bz-p { position: relative; background: rgba(255, 255, 255, .94); border: 1px solid var(--line-card); border-radius: 14px; padding: 11px 14px; box-shadow: 0 1px 2px rgba(20, 20, 19, .03), 0 10px 26px rgba(20, 20, 19, .05); min-width: 0; }
.bz-cap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; margin: 0 0 10px; white-space: nowrap; }
.bz-verdict { margin-left: auto; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 11.5px; background: var(--ok-soft); color: var(--ok); transition: background .3s, color .3s; }
.bz-wx[data-wet='1'] .bz-verdict { background: #e3eeff; color: #1d55b8; }
.bz-metar { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; background: #12161f; color: #cfe3ff; overflow: hidden; }
.bz-metar code { font: 500 11.5px/1.3 var(--bz-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-metar code b { color: #ffd36b; font-weight: 600; }
.bz-metar-k { flex: none; font: 700 9.5px/1 var(--bz-mono); letter-spacing: .08em; color: #12161f; background: #7fb2ff; padding: 3px 5px; border-radius: 4px; }
.bz-tokens { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.bz-tokens li { display: flex; flex-direction: column; gap: 0; padding: 4px 7px; border-radius: 8px; background: var(--chip); min-width: 0; animation: bz-tok .45s var(--bz-ease) both; animation-delay: calc(var(--k, 0) * 90ms); }
.bz-tokens code { font: 600 10.5px/1.2 var(--bz-mono); color: var(--accent); }
.bz-tokens span { font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bz-tokens li.is-key { background: #e3eeff; }
.bz-tokens li.is-key code { color: #1d55b8; }
@keyframes bz-tok { from { opacity: 0; transform: translateY(6px); } }
.bz-local { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; font-size: 11.5px; color: var(--ink-2); }
.bz-local b { font-weight: 600; color: var(--ink); }
.bz-rule { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 9px; border-radius: 9px; font-size: 12px; background: var(--chip); color: var(--muted); transition: background .3s, color .3s; }
.bz-wx[data-wet='1'] .bz-rule { background: #fff3dc; color: #8a5a0e; font-weight: 600; }

.bz-co2 { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12px; }
.bz-co2 b { font: 700 15px/1 var(--font); color: var(--ink); font-variant-numeric: tabular-nums; transition: color .3s; }
.bz-air.is-high .bz-co2 b { color: var(--bz-bad); }
.bz-chart { display: block; width: 100%; height: 62px; overflow: visible; }
.bz-ch-band { fill: #e1efff; }
.bz-ch-lim { stroke: var(--bz-bad); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.bz-ch-ghost { fill: none; stroke: #d9d9d4; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.bz-ch-line { fill: none; stroke: #22a35a; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bz-ch-now { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .35; }
.bz-ch-leg { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.bz-ch-leg span { display: inline-flex; align-items: center; gap: 5px; }
.bz-ch-leg i { width: 10px; height: 2px; }
.bz-ch-leg i.lim { border-top: 2px dashed var(--bz-bad); }
.bz-ch-leg i.vb { height: 8px; border-radius: 2px; background: #cfe4ff; }
.bz-ch-leg b { color: var(--ink); font-weight: 600; }

.bz-log { flex: 1; overflow: hidden; min-height: 120px; }
.bz-log::after { content: ''; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 26px; border-radius: 0 0 14px 14px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.bz-rows { display: grid; gap: 6px; }
.bz-rows li { display: grid; grid-template-columns: 38px 1fr; gap: 2px 8px; align-items: start; animation: bz-row .45s var(--bz-ease) both; }
@keyframes bz-row { from { opacity: 0; transform: translateY(-8px); } }
.bz-rows time { font: 500 11px/1.6 var(--bz-mono); color: var(--faint); }
.bz-rows .tx { font-size: 12px; line-height: 1.35; color: var(--ink); }
.bz-src { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; margin-right: 5px; border-radius: 5px; font-size: 10.5px; font-weight: 600; vertical-align: 1px; background: var(--chip); color: var(--ink-2); }
.bz-src[data-src='plan'] { background: #eef0ff; color: #3b45b5; }
.bz-src[data-src='rule'] { background: #e6f6ee; color: #1f7a45; }
.bz-src[data-src='sensor'] { background: #fdecec; color: #b23a3a; }
.bz-src[data-src='staff'] { background: #f3ecfd; color: #6a3fb5; }
.bz-src[data-src='weather'] { background: #e3eeff; color: #1d55b8; }
.bz-src[data-src='tech'] { background: #fff1dc; color: #8a5a0e; }

/* ── Шкала суток ── */
.bz-tl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 8px 18px 16px; }
.bz-play { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; }
.bz-play:hover { background: var(--dark-hover); }
.bz-play span:first-child { display: inline-flex; }
.bz-track-wrap { position: relative; padding-top: 72px; }
.bz-moments { position: absolute; left: 24px; right: 24px; top: 0; height: 68px; }
.bz-moments button { position: absolute; left: var(--x); bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; padding: 2px 6px 7px; border-radius: 8px; font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s; }
.bz-moments button::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 1px; height: 5px; background: currentColor; opacity: .5; }
.bz-moments time { font: 600 10px/1.2 var(--bz-mono); color: var(--faint); }
.bz-moments button:hover { color: var(--ink); background: rgba(255, 255, 255, .8); }
.bz-moments button.is-cur { color: var(--accent); }
.bz-moments button.is-cur time { color: var(--accent); }
.bz-moments button:nth-child(1), .bz-moments button:nth-child(7) { bottom: 28px; }
.bz-moments button:nth-child(1)::after, .bz-moments button:nth-child(7)::after { display: none; }
.bz-track {
    position: relative; height: 12px; margin-inline: 24px; border-radius: 999px; cursor: pointer; touch-action: none;
    background: linear-gradient(90deg, #17204a 0%, #26306a 22%, #f2a76b 30%, #8cc1f5 36%, #9cc9f2 62%, #f3b183 76%, #3a3f78 82%, #17204a 100%);
    box-shadow: inset 0 0 0 1px rgba(20, 20, 19, .08);
}
.bz-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; border-radius: inherit; background: rgba(255, 255, 255, .0); }
.bz-thumb { position: absolute; top: 50%; left: 50%; height: 28px; padding: 0 10px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(20, 20, 19, .3), 0 0 0 4px rgba(255, 255, 255, .9); cursor: grab; transition: transform .15s; }
.bz-thumb b { font: 600 12px/1 var(--bz-mono); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.bz-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.bz-track.is-drag .bz-thumb { cursor: grabbing; transform: translate(-50%, -50%) scale(1.08); }
.bz-hours { margin-inline: 24px; position: relative; height: 20px; margin-top: 4px; }
.bz-hours span { position: absolute; left: var(--x); transform: translateX(-50%); top: 8px; font: 500 10.5px/1 var(--bz-mono); color: var(--faint); }
.bz-hours span:first-child { transform: none; } .bz-hours span:last-child { transform: translateX(-100%); }
.bz-hint { display: none; }

/* ── Мини-виджеты ── */
.bzf-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bzf-card { border: 1px solid var(--line-card); border-radius: 16px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.bzf-card h3 { display: flex; align-items: center; gap: 8px; padding: 20px 22px 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.bzf-card h3 .i { color: var(--accent); }
.bzf-card > p { padding: 8px 22px 22px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.bzf-vis {
    position: relative; height: 196px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line-card);
    background-color: #f7f8fa;
    background-image: linear-gradient(rgba(47, 91, 216, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 91, 216, .07) 1px, transparent 1px), linear-gradient(rgba(47, 91, 216, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 91, 216, .035) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
    background-position: -1px -1px;
}
.bzf-pill { position: absolute; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #fff; box-shadow: 0 4px 12px rgba(20, 20, 19, .08); white-space: nowrap; }

/* CO₂ */
.bzf-co2 .bzf-vis > svg { width: 86%; height: auto; overflow: visible; }
.bzf-co2 .band { fill: #e1efff; animation: bzf-band 5s infinite; }
.bzf-co2 .lim { stroke: var(--bz-bad); stroke-dasharray: 5 5; }
.bzf-co2 .lim-t { font: 600 10px var(--bz-mono); fill: var(--bz-bad); }
.bzf-co2 .crv { fill: none; stroke: #22a35a; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; animation: bzf-draw 5s var(--bz-ease) infinite; }
.bzf-co2 .dot { fill: #fff; stroke: #141413; stroke-width: 2; }
.bzf-co2 .bzf-pill.b { top: 14px; left: 50%; transform: translateX(-50%); color: #1662c4; animation: bzf-pa 5s infinite; }
.bzf-co2 .bzf-pill.g { bottom: 12px; right: 14px; color: var(--ok); animation: bzf-pb 5s infinite; }
.bzf-co2 .bzf-pill.b .i { animation: bz-spin .5s linear infinite; }
@keyframes bzf-draw { 0% { stroke-dashoffset: 100; } 80%, 100% { stroke-dashoffset: 0; } }
@keyframes bzf-band { 0%, 30% { opacity: 0; } 40%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bzf-pa { 0%, 34% { opacity: 0; } 40%, 62% { opacity: 1; } 68%, 100% { opacity: 0; } }
@keyframes bzf-pb { 0%, 66% { opacity: 0; } 72%, 94% { opacity: 1; } 100% { opacity: 0; } }

/* Сцены */
.bzf-plan { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr; grid-template-rows: 48px 48px; gap: 6px; width: 78%; }
.bzf-plan span { position: relative; display: flex; align-items: flex-end; padding: 5px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 600; background: #222838; color: #8d96a8; transition: background .6s, color .6s, box-shadow .6s; }
.bzf-plan span i { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #3b4252; transition: background .5s, box-shadow .5s; }
.bzf-plan span[data-g='0'] { grid-row: span 1; }
.bzf-scenes [data-g].on { background: #fffaf0; color: #5f5f5a; box-shadow: 0 0 0 1px #f0e6c8, 0 6px 18px rgba(255, 200, 80, .22); }
.bzf-scenes [data-g].on i { background: #ffc94a; box-shadow: 0 0 8px #ffc94a; }
.bzf-scenes[data-sc='evening'] [data-g].on { background: #ffe7c2; }
.bzf-scenes[data-sc='clean'] [data-g].on { background: #eef4ff; }
.bzf-scenes[data-sc='clean'] [data-g].on i { background: #8fb6ff; box-shadow: 0 0 8px #8fb6ff; }
.bzf-scenes [data-g].dim { background: #3c4253; color: #b6bdcc; }
.bzf-scenes [data-g].dim i { background: #b49343; }
.bzf-sc { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: inline-flex; padding: 3px; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(20, 20, 19, .08); }
.bzf-sc b { padding: 4px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 500; color: var(--muted); transition: background .3s, color .3s; white-space: nowrap; }
.bzf-scenes[data-sc='day'] [data-s='day'], .bzf-scenes[data-sc='evening'] [data-s='evening'], .bzf-scenes[data-sc='clean'] [data-s='clean'], .bzf-scenes[data-sc='night'] [data-s='night'] { background: var(--ink); color: #fff; }
.bzf-scenes .bzf-plan { margin-bottom: 30px; }

/* Климат */
.bzf-dial { position: relative; width: 128px; height: 128px; margin-bottom: 18px; }
.bzf-dial svg { width: 100%; height: 100%; transform: rotate(135deg); }
.bzf-dial circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.bzf-dial .t { stroke: #e7e9ee; stroke-dasharray: 226 302; }
.bzf-dial .v { stroke: var(--bz-heat); stroke-dasharray: 52 100; transition: stroke-dasharray 1s var(--bz-ease), stroke .6s; }
.bzf-climate[data-m='night'] .bzf-dial .v { stroke-dasharray: 30 100; stroke: #6f7fd6; }
.bzf-dial-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bzf-dial-c b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bzf-dial-c small { font-size: 11.5px; color: var(--muted); }
.bzf-dial-c .ic { color: var(--bz-heat); display: inline-flex; }
.bzf-dial-c .ic.n { color: #6f7fd6; }
.bzf-climate[data-m='day'] .n, .bzf-climate[data-m='night'] .d { display: none; }
.bzf-ready { position: absolute; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: #fff; font-size: 11.5px; color: var(--ink-2); box-shadow: 0 4px 12px rgba(20, 20, 19, .08); }

/* Ток */
.bzf-cur .bzf-vis { grid-template-columns: 130px 1fr; gap: 14px; padding: 0 20px; }
.bzf-meter { text-align: center; }
.bzf-meter svg { width: 120px; height: 70px; }
.bzf-meter .arc { fill: none; stroke: #e2e4ea; stroke-width: 8; stroke-linecap: round; }
.bzf-meter .arc-ok { fill: none; stroke: var(--bz-ok); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .9s var(--bz-ease), stroke .3s; }
.bzf-meter .needle { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; transform-origin: 60px 62px; transform: rotate(-80deg); transition: transform .9s var(--bz-spring); }
.bzf-meter circle { fill: var(--ink); }
.bzf-meter b { display: block; font: 700 20px/1 var(--bz-mono); margin-top: 4px; }
.bzf-cur[data-st='3'] .arc-ok { stroke-dashoffset: 0; }
.bzf-cur[data-st='3'] .needle { transform: rotate(28deg); }
.bzf-cur.is-bad .needle { transform: rotate(-80deg); }
.bzf-cur.is-bad .arc-ok { stroke-dashoffset: 100; }
.bzf-cur.is-bad .bzf-meter b { color: var(--bz-bad); }
.bzf-chain { display: grid; gap: 6px; }
.bzf-chain li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 9px; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 500; color: var(--faint); box-shadow: 0 0 0 1px var(--line-card); transition: color .3s, box-shadow .3s; }
.bzf-chain em { font-style: normal; font-size: 11px; font-weight: 600; display: none; }
.bzf-chain .ok { color: var(--ok); } .bzf-chain .bad { color: var(--bz-bad); }
.bzf-cur[data-st='1'] [data-k='1'], .bzf-cur[data-st='2'] [data-k='1'], .bzf-cur[data-st='2'] [data-k='2'], .bzf-cur[data-st='3'] li { color: var(--ink); box-shadow: 0 0 0 1.5px #b9d9c6; }
.bzf-cur[data-st='3']:not(.is-bad) .ok { display: inline; }
.bzf-cur.is-bad[data-st='3'] [data-k='3'] { box-shadow: 0 0 0 1.5px #f0b5b5; }
.bzf-cur.is-bad[data-st='3'] .bad { display: inline; }

/* Ручной режим */
.bzf-sw { position: relative; width: 150px; height: 120px; margin-bottom: 26px; }
.bzf-knob { position: absolute; left: 50%; top: 58px; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #d9dce3 70%); box-shadow: 0 6px 16px rgba(20, 20, 19, .2), inset 0 0 0 1px rgba(20, 20, 19, .08); transition: transform .6s var(--bz-spring); }
.bzf-knob i { position: absolute; left: 50%; top: 6px; width: 10px; height: 26px; margin-left: -5px; border-radius: 5px; background: var(--ink); }
.bzf-manual[data-p='0'] .bzf-knob { transform: rotate(-50deg); }
.bzf-manual[data-p='1'] .bzf-knob { transform: rotate(0deg); }
.bzf-manual[data-p='2'] .bzf-knob { transform: rotate(50deg); }
.bzf-sw .pos { position: absolute; font: 600 12px/1 var(--font); color: var(--faint); transition: color .3s; }
.bzf-sw .pos[data-k='0'] { left: 4px; top: 6px; } .bzf-sw .pos[data-k='1'] { left: 50%; top: -8px; transform: translateX(-50%); } .bzf-sw .pos[data-k='2'] { right: 4px; top: 6px; }
.bzf-manual[data-p='0'] .pos[data-k='0'] { color: var(--accent); } .bzf-manual[data-p='1'] .pos[data-k='1'] { color: var(--ink); } .bzf-manual[data-p='2'] .pos[data-k='2'] { color: var(--bz-amber); }
.bzf-swn { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.bzf-swn span { display: none; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px rgba(20, 20, 19, .08); }
.bzf-manual[data-p='0'] .bzf-swn [data-k='0'], .bzf-manual[data-p='1'] .bzf-swn [data-k='1'], .bzf-manual[data-p='2'] .bzf-swn [data-k='2'] { display: inline-block; animation: bz-tok .4s var(--bz-ease); }

/* Пустая зона */
.bzf-room { position: relative; width: 200px; height: 120px; margin-bottom: 26px; border-radius: 10px; background: #222838; overflow: hidden; animation: bzf-room 7s infinite; }
.bzf-room .lamp { position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: #fff3c4; animation: bzf-lamp 7s infinite; }
.bzf-room .cone { position: absolute; top: 13px; left: 50%; width: 170px; height: 107px; margin-left: -85px; background: linear-gradient(#fff6d6, rgba(255, 246, 214, 0)); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); animation: bzf-cone 7s infinite; }
.bzf-room .pp { position: absolute; bottom: 0; width: 16px; height: 38px; border-radius: 8px 8px 0 0; background: #2f5bd8; animation: bzf-pp 7s infinite; }
.bzf-room .pp::before { content: ''; position: absolute; left: 3px; top: -13px; width: 10px; height: 10px; border-radius: 50%; background: #e2b08f; }
.bzf-room .pp.a { left: 40px; } .bzf-room .pp.b { left: 92px; background: #d6533c; animation-delay: .2s; } .bzf-room .pp.c { left: 144px; background: #1f7a45; animation-delay: .4s; }
.bzf-room .sens { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--accent); }
@keyframes bzf-room { 0%, 40% { background: #e9e5d8; } 55%, 85% { background: #4a4f5e; } 100% { background: #e9e5d8; } }
@keyframes bzf-cone { 0%, 40% { opacity: .9; } 55%, 85% { opacity: .15; } 100% { opacity: .9; } }
@keyframes bzf-lamp { 0%, 40% { background: #fff3c4; } 55%, 85% { background: #8f8a73; } 100% { background: #fff3c4; } }
@keyframes bzf-pp { 0%, 22% { transform: none; opacity: 1; } 34%, 88% { transform: translateX(220px); opacity: 0; } 89% { transform: translateX(-60px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.bzf-st { position: absolute; bottom: 14px; left: 0; right: 0; display: grid; place-items: center; }
.bzf-st span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: #fff; font-size: 11.5px; font-weight: 600; box-shadow: 0 4px 12px rgba(20, 20, 19, .08); }
.bzf-st .busy { color: var(--ink-2); animation: bzf-pa2 7s infinite; }
.bzf-st .idle { color: var(--ok); animation: bzf-pb2 7s infinite; }
@keyframes bzf-pa2 { 0%, 40% { opacity: 1; } 48%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bzf-pb2 { 0%, 48% { opacity: 0; } 55%, 86% { opacity: 1; } 92%, 100% { opacity: 0; } }

/* Сеть */
.bzf-clubs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 84%; }
.bzf-club { position: relative; display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line-card), 0 4px 12px rgba(20, 20, 19, .05); font-size: 11.5px; }
.bzf-club b { font-size: 12.5px; }
.bzf-club span { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.bzf-club em { font-style: normal; font-variant-numeric: tabular-nums; }
.bzf-club .st { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bz-ok); }
.bzf-club .air { justify-self: start; margin-top: 3px; font-size: 10px; font-weight: 600; color: #1662c4; background: #e5f3ff; padding: 1px 6px; border-radius: 5px; animation: bzf-air 6s infinite; }
.bzf-club[data-k='1'] { animation: bzf-warn 6s infinite; }
.bzf-club[data-k='1'] .st { animation: bzf-st 6s infinite; }
.bzf-club[data-k='1'] .c em { animation: bzf-em 6s infinite; }
@keyframes bzf-warn { 0%, 55% { box-shadow: 0 0 0 1.5px #f3c27a, 0 4px 12px rgba(224, 150, 31, .18); } 70%, 100% { box-shadow: 0 0 0 1px var(--line-card), 0 4px 12px rgba(20, 20, 19, .05); } }
@keyframes bzf-st { 0%, 55% { background: var(--bz-amber); } 70%, 100% { background: var(--bz-ok); } }
@keyframes bzf-em { 0%, 55% { color: #b06a00; font-weight: 700; } 70%, 100% { color: inherit; } }
@keyframes bzf-air { 0%, 55% { opacity: 1; } 65%, 100% { opacity: 0; } }

/* Журнал */
.bzf-log ol { width: 88%; display: grid; gap: 6px; }
.bzf-log li { display: grid; grid-template-columns: 38px auto 1fr; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px var(--line-card); font-size: 11.5px; }
.bzf-log.in li { animation: bzf-li 1.4s var(--bz-ease) both; animation-delay: calc(.3s + var(--k) * .35s); }
.bzf-log time { font: 500 10.5px var(--bz-mono); color: var(--faint); }
.bzf-log .tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bzf-log .src { display: inline-flex; height: 18px; align-items: center; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; }
.bzf-log .src[data-src='plan'] { background: #eef0ff; color: #3b45b5; }
.bzf-log .src[data-src='rule'] { background: #e6f6ee; color: #1f7a45; }
.bzf-log .src[data-src='staff'] { background: #f3ecfd; color: #6a3fb5; }
.bzf-log .src[data-src='weather'] { background: #e3eeff; color: #1d55b8; }
@keyframes bzf-li { 0% { opacity: 0; transform: translateY(-8px); } 8%, 100% { opacity: 1; transform: none; } }

/* Неделя */
.bzf-days { width: 86%; display: grid; gap: 5px; }
.bzf-days .row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.bzf-days .row span { font-weight: 600; color: var(--ink-2); }
.bzf-days .row small { font: 500 10.5px var(--bz-mono); text-align: right; }
.bzf-days i { position: relative; height: 10px; border-radius: 3px; background: #e7e9ee; overflow: hidden; }
.bzf-days i::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); border-radius: 3px; background: linear-gradient(90deg, #ffc46b, #5f9fe8 40%, #3b45b5); transform-origin: left; animation: bzf-bar 6s var(--bz-ease) infinite; animation-delay: calc(var(--k) * 70ms); }
.bzf-days .hol span { color: #b23a3a; }
.bzf-days .hol i::after { background: linear-gradient(90deg, #ff9a8a, #d64545); }
@keyframes bzf-bar { 0% { transform: scaleX(0); } 20%, 90% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: .6; } }

/* ── Адаптив ── */
@media (max-width: 1200px) {
    .bz-body { grid-template-columns: 1fr; }
    .bz-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: auto; min-height: 0; }
    .bz-log { min-height: 0; max-height: 300px; }
    .bzf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .bz-side { grid-template-columns: 1fr 1fr; }
    .bz-log { grid-column: span 2; max-height: 240px; }
}
@media (max-width: 640px) {
    .bz-app { margin-top: 28px; border-radius: 14px; }
    .bz-bar { padding: 8px 12px; }
    .bz-vent, .bz-inside, .bz-scene span { display: none; }
    .bz-club { width: 100%; }
    .bz-clock { font-size: 18px; }
    .bz-body { padding: 10px; gap: 10px; }
    .bz-scroll { overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
    .bz-svg { width: 760px; max-width: none; }
    .bz-side { grid-template-columns: 1fr; }
    .bz-log { grid-column: auto; }
    .bz-tk { position: absolute; right: 8px; left: auto; top: 8px; width: 230px; padding: 10px 12px; }
    .bz-tk-amp, .bz-tk-att, .bz-tk-who { display: none; }
    .bz-tk-title { font-size: 13.5px; margin-top: 6px; }
    .bz-ann { top: auto; bottom: 10px; left: 10px; right: 10px; max-width: none; transform: translateY(12px); white-space: normal; border-radius: 14px; font-size: 12px; line-height: 1.35; }
    .bz-ann.is-on { transform: none; }
    .bz-wave { display: none; }
    .bz-tl { grid-template-columns: auto 1fr; gap: 10px 12px; padding: 4px 12px 14px; }
    .bz-track-wrap { grid-column: 1 / -1; grid-row: 1; padding-top: 10px; }
    .bz-moments { display: none; }
    .bz-replay { justify-self: end; }
    .bz-hint { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
    .bzf-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .bz *, .bzf * { animation: none !important; transition: none !important; }
    .bzf-co2 .crv { stroke-dashoffset: 0; }
    .bzf-co2 .band, .bzf-co2 .bzf-pill.b { opacity: 1; }
    .bzf-co2 .bzf-pill.g { opacity: 0; }
    .bzf-st .idle { opacity: 0; }
}
