/* UVATRON 3D — панель 10,1″ 1920×1200 (8,85 px на мм). Светлая тёплая тема: слоновая кость, графит, шампань.
   Текст не меньше 28 px (подписи меток и вторичные — от 22 px), кнопки от 88 px. Тени статичные, без размытия фона. */
:root {
    --bg1: #fbfaf7; --bg2: #ece8e0; --card: #ffffff; --scene: #efede8;
    --ink: #1d2228; --ink2: #3a3f47; --muted: #8b8478; --line: #ebe6dd; --soft: #f5f2ec; --soft2: #efebe3;
    --gold: #c59b5f; --gold-l: #e6c99a; --gold-d: #9c7440; --graphite: #23282f;
    --brand: #13c94a; --blue: #3b8cf0; --orange: #e9773a; --red: #c8474b;
    --shadow: 0 14px 34px rgba(70, 52, 25, 0.09), 0 2px 6px rgba(70, 52, 25, 0.05);
    --shadow-s: 0 6px 16px rgba(70, 52, 25, 0.1);
    --r: 32px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e7e2d9; touch-action: none; user-select: none; -webkit-user-select: none; }
body { font-family: Roboto, 'Segoe UI', Arial, sans-serif; color: var(--ink); }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }

#stage {
    position: absolute; left: 0; top: 0; width: 1920px; height: 1200px; transform-origin: 0 0;
    background: radial-gradient(1400px 900px at 30% 0%, var(--bg1), var(--bg2)); padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 22px;
}

/* ── значки ── */
.ic { display: inline-flex; width: 1em; height: 1em; flex: none; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── шапка ── */
.top { height: 104px; display: flex; align-items: center; gap: 28px; }
.brand { width: 300px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.brand__logo { height: 44px; width: auto; align-self: flex-start; }
.brand__sub { font-size: 26px; color: var(--muted); letter-spacing: 0.4px; }
.meta { margin-left: auto; display: flex; align-items: center; gap: 36px; }
.weather, .clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.weather { flex-direction: row; align-items: center; gap: 14px; font-size: 46px; color: var(--gold); }
.weather > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.weather b { font-size: 46px; font-weight: 300; color: var(--ink); }
.weather small { font-size: 24px; color: var(--muted); }
.clock b { font-size: 60px; font-weight: 300; letter-spacing: 1px; }
.clock small { font-size: 24px; color: var(--muted); white-space: nowrap; letter-spacing: 0.3px; }

/* сегментный переключатель */
.seg { display: flex; background: rgba(255, 255, 255, 0.6); border-radius: 28px; padding: 6px; gap: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 88px; padding: 0 30px; border-radius: 22px; font-size: 30px; font-weight: 400; color: var(--ink2); display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.seg button .ic { font-size: 34px; color: var(--muted); }
.seg button.on { background: var(--graphite); color: #fff; box-shadow: 0 8px 20px rgba(35, 40, 47, 0.25); }
.seg button.on .ic { color: var(--gold-l); }
.seg--rooms { margin: 0 auto; }
.seg--rooms button { height: 92px; padding: 0 34px; font-size: 31px; }

/* ── основная часть ── */
.main { flex: 1; display: flex; gap: 24px; min-height: 0; }
.view { position: relative; flex: 1; border-radius: var(--r); background: var(--scene); box-shadow: var(--shadow); overflow: hidden; }
#gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.nogl { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--muted); padding: 60px; text-align: center; }

.tools { position: absolute; right: 22px; top: 22px; display: flex; flex-direction: column; gap: 14px; z-index: 3; }
.tool { width: 104px; height: 104px; border-radius: 28px; background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-s); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink2); }
.tool .ic { font-size: 38px; }
.tool.on { color: var(--gold-d); box-shadow: 0 0 0 2px var(--gold), var(--shadow-s); }
.tool span:last-child { font-size: 22px; font-weight: 500; }
.hint { position: absolute; left: 26px; top: 24px; padding: 12px 20px; border-radius: 18px; background: rgba(255, 255, 255, 0.85); font-size: 24px; color: var(--muted); z-index: 1; }

/* метки на сцене */
.markers { z-index: 2; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; }
.mk { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }
.mk__dot { position: relative; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: #fff; box-shadow: 0 8px 20px rgba(40, 30, 15, 0.22); display: flex; align-items: center; justify-content: center; color: var(--ink2); font-size: 34px; border: 3px solid #fff; }
.mk__dot::before { content: ''; position: absolute; left: -14px; top: -14px; right: -14px; bottom: -14px; border-radius: 50%; }
.mk__val { color: var(--ink); position: absolute; left: 50%; top: 44px; transform: translateX(-50%); white-space: nowrap; font-size: 22px; font-weight: 500; padding: 3px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 2px 8px rgba(40, 30, 15, 0.14); }
.mk.on .mk__dot { color: #fff; }
.mk--light.on .mk__dot { background: linear-gradient(145deg, var(--gold-l), var(--gold)); box-shadow: 0 8px 22px rgba(197, 155, 95, 0.55); }
.mk--ac.on .mk__dot { background: var(--blue); }
.mk--ac.heat .mk__dot { background: var(--orange); }
.mk--ac.auto .mk__dot { background: var(--graphite); color: var(--gold-l); }
.mk--screen.on .mk__dot { background: var(--graphite); color: var(--gold-l); }
.mk--blinds.on .mk__dot { background: #a99677; }
.mk--room .mk__pill { position: relative; margin: -52px 0 0 0; transform: translateX(-50%); background: #fff; border-radius: 26px; padding: 14px 26px 16px; box-shadow: 0 14px 30px rgba(40, 30, 15, 0.2); white-space: nowrap; }
.mk--room .mk__pill::after { content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -12px; border: 12px solid transparent; border-bottom: 0; border-top-color: #fff; }
.mk__name { font-size: 30px; font-weight: 500; }
.mk__info { font-size: 24px; color: var(--muted); display: flex; gap: 16px; margin-top: 4px; }
.mk__info b { color: var(--ink); font-weight: 500; }
.mk__info .ic { color: var(--gold); }

/* нижняя полоса сценариев */
.dock { position: absolute; left: 22px; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 30px; background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow); z-index: 3; }
.dock__title { flex: none; font-size: 24px; color: var(--muted); padding: 0 10px 0 14px; line-height: 1.15; width: 150px; }
.scene { flex: none; white-space: nowrap; height: 100px; padding: 0 22px 0 10px; border-radius: 24px; background: var(--soft); display: flex; align-items: center; gap: 14px; font-size: 28px; font-weight: 400; color: var(--ink2); }
.scene .ic { width: 56px; height: 56px; border-radius: 18px; background: #fff; color: var(--gold-d); font-size: 32px; padding: 12px; box-shadow: 0 2px 6px rgba(70, 52, 25, 0.08); }
.scene.on { background: var(--graphite); color: #fff; box-shadow: 0 10px 24px rgba(35, 40, 47, 0.3); }
.scene.on .ic { background: linear-gradient(145deg, var(--gold-l), var(--gold)); color: #fff; box-shadow: none; }
.hold { position: relative; overflow: hidden; }
.hold__bar { position: absolute; left: 0; bottom: 0; height: 6px; width: 0; background: currentColor; opacity: 0.6; }
.hold.holding .hold__bar { width: 100%; transition: width 1.2s linear; }
.off { flex: none; white-space: nowrap; margin-left: auto; height: 100px; padding: 0 26px 0 16px; border-radius: 24px; border: 2px solid #ead2cf; color: var(--red); display: flex; align-items: center; gap: 14px; font-size: 28px; font-weight: 500; background: #fff; }
.off .ic { font-size: 38px; }

/* ── правая панель ── */
.side { width: 600px; flex: none; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.side__head { display: flex; align-items: center; gap: 16px; }
.side__title { font-size: 42px; font-weight: 300; letter-spacing: -0.3px; }
.pill { margin-left: auto; font-size: 24px; font-weight: 500; padding: 10px 18px; border-radius: 16px; background: var(--graphite); color: var(--gold-l); white-space: nowrap; }
.pill--idle { background: var(--soft); color: var(--muted); }
.pill--ok { background: #e9f8ee; color: #0f9a3c; }
.side .seg { background: var(--soft); box-shadow: none; }
.side .seg button { flex: 1; justify-content: center; padding: 0 6px; font-size: 28px; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }

/* свет */
.grp { border-radius: 26px; background: var(--soft); padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.grp__row { display: flex; align-items: center; gap: 18px; }
.tile { width: 76px; height: 76px; border-radius: 22px; background: #fff; color: #a39b8e; display: flex; align-items: center; justify-content: center; font-size: 38px; flex: none; box-shadow: 0 2px 6px rgba(70, 52, 25, 0.06); }
.grp.on .tile { background: linear-gradient(145deg, var(--gold-l), var(--gold)); color: #fff; box-shadow: 0 8px 18px rgba(197, 155, 95, 0.45); }
.grp__name { font-size: 30px; font-weight: 500; line-height: 1.1; }
.grp__val { font-size: 24px; color: var(--muted); margin-top: 6px; }
.sw { margin-left: auto; width: 112px; height: 64px; border-radius: 32px; background: #ddd7cc; position: relative; flex: none; }
.sw::after { content: ''; position: absolute; left: 6px; top: 6px; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); transition: left 0.18s; }
.sw.on { background: var(--graphite); }
.sw.on::after { left: 54px; background: linear-gradient(145deg, #fff, var(--gold-l)); }
.slider { position: relative; height: 64px; border-radius: 20px; background: #e9e4da; overflow: hidden; touch-action: none; }
.slider__fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #f1dfbf, var(--gold)); border-radius: 20px; }
.slider__txt { position: absolute; right: 20px; top: 0; line-height: 64px; font-size: 26px; font-weight: 500; color: #4d3a1d; }
.slider--blue .slider__fill { background: linear-gradient(90deg, #c9d2dc, #5a6675); }
.slider--blue .slider__txt { color: #1d2228; }
.slider--sand .slider__fill { background: linear-gradient(90deg, #efe7d9, #b9a17a); }
.slider--sand .slider__txt { color: #4c3d22; }

/* климат */
.temp { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 26px; background: var(--soft); padding: 22px; }
.temp__now { display: flex; flex-direction: column; }
.temp__now small, .lbl { font-size: 24px; color: var(--muted); letter-spacing: 0.3px; }
.temp__now b { font-size: 60px; font-weight: 300; }
.setp { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.btn-r { width: 120px; height: 120px; border-radius: 34px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 50px; color: var(--ink2); }
.setp__val { text-align: center; }
.setp__val b { display: block; font-size: 108px; font-weight: 200; line-height: 1; letter-spacing: -2px; }
.setp__val small { font-size: 24px; color: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mode { height: 112px; border-radius: 24px; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 26px; color: var(--ink2); }
.mode .ic { font-size: 38px; }
.mode.on { background: #eaf2fd; color: #1f62b8; box-shadow: inset 0 0 0 2px var(--blue); }
.mode.on.heat { background: #fdf0e8; color: #b2531f; box-shadow: inset 0 0 0 2px var(--orange); }
.mode.on.auto { background: var(--graphite); color: var(--gold-l); box-shadow: none; }
.mode.on.fan { background: #eef6fb; color: #2d6f93; box-shadow: inset 0 0 0 2px #8fcfff; }
.units { display: flex; gap: 12px; }
.unit { flex: 1; border-radius: 20px; background: var(--soft); padding: 14px 18px; font-size: 24px; display: flex; align-items: center; gap: 12px; color: var(--ink2); }
.unit i { width: 14px; height: 14px; border-radius: 50%; background: #c2bbb0; flex: none; }
.unit.on i { background: var(--gold); box-shadow: 0 0 0 5px rgba(197, 155, 95, 0.2); }

/* шторы */
.win { height: 230px; border-radius: 26px; background: linear-gradient(180deg, #d9e7f2, #f2f6f9); position: relative; overflow: hidden; box-shadow: inset 0 0 0 10px var(--soft); }
.win__blind { position: absolute; left: 10px; right: 10px; top: 10px; background: repeating-linear-gradient(180deg, #f1ebe0 0 18px, #e3dacb 18px 21px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); border-bottom: 6px solid var(--ink2); }
.win__txt { position: absolute; right: 22px; bottom: 16px; font-size: 28px; font-weight: 500; color: var(--ink); background: rgba(255, 255, 255, 0.9); padding: 6px 14px; border-radius: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.big { height: 120px; border-radius: 24px; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 26px; letter-spacing: -0.3px; padding: 0 4px; color: var(--ink2); }
.big .ic { font-size: 40px; color: var(--gold-d); }
.big.on { background: var(--graphite); color: #fff; }
.big.on .ic { color: var(--gold-l); }

/* экран и звук */
.line { display: flex; align-items: center; gap: 18px; border-radius: 26px; background: var(--soft); padding: 18px 20px; }
.line .tile { width: 76px; height: 76px; }
.line.on .tile { background: var(--graphite); color: var(--gold-l); }
.mute { width: 88px; height: 88px; border-radius: 24px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 38px; color: var(--ink2); flex: none; }
.mute.on { background: #fbeceb; color: var(--red); }

/* обзор этажа */
.card { text-align: left; border-radius: 26px; background: var(--soft); padding: 14px; display: flex; align-items: center; gap: 20px; }
.card__img { width: 190px; height: 116px; border-radius: 20px; background: #e9e5dd center / cover no-repeat; flex: none; box-shadow: 0 2px 8px rgba(70, 52, 25, 0.12); }
.card__name { font-size: 30px; font-weight: 500; white-space: nowrap; }
.card__info { font-size: 24px; color: var(--muted); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.card__info b { color: var(--ink); font-weight: 500; }
.card__go { margin-left: auto; font-size: 38px; color: #b4ab9d; padding-right: 8px; }
.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sum div { border-radius: 24px; background: var(--soft); padding: 18px 20px; }
.sum b { display: block; font-size: 46px; font-weight: 300; }
.sum small { font-size: 22px; color: var(--muted); line-height: 1.15; display: block; margin-top: 4px; }
.side .off { margin: auto 0 0; justify-content: center; height: 112px; }

.toast { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); background: rgba(29, 34, 40, 0.94); color: #fff; font-size: 28px; padding: 20px 30px; border-radius: 22px; z-index: 10; box-shadow: var(--shadow); }
