:root {
  --bg: #06080d;
  --glass: rgba(14, 18, 28, 0.72);
  --glass-2: rgba(24, 30, 44, 0.78);
  --line: rgba(255, 255, 255, 0.12);
  --txt: #eef2f8;
  --mut: #9aa6b8;
  --acc: #5fd0ff;
  --acc-2: #2aa6ff;
  --ok: #55e39a;
  --bad: #ff5a4a;
  --warm: #ffc27a;
  --r: 14px;
  --gut: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); overflow: hidden; overscroll-behavior: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
canvas#c:active { cursor: grabbing; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }
.grow { flex: 1; }
.small { font-size: 12px; color: var(--mut); margin: 8px 0 0; }
.err { color: var(--bad); font-size: 13px; }

/* ---------- top bar ---------- */
#top {
  position: fixed; top: calc(10px + var(--safe-t)); left: var(--gut); right: var(--gut); z-index: 20;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
#top > * { pointer-events: auto; }
.brand { display: block; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; }
.brand img { display: block; height: 20px; width: auto; }
.seg { display: inline-flex; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 7px 12px; border-radius: 9px; font-size: 13px; color: var(--mut); white-space: nowrap; transition: .2s; }
.seg button.on { background: rgba(95, 208, 255, 0.18); color: #fff; box-shadow: inset 0 0 0 1px rgba(95, 208, 255, 0.5); }
.seg button:hover:not(.on) { color: #fff; }
.ibtn { height: 40px; min-width: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 600; }
.ibtn:hover { border-color: rgba(95, 208, 255, 0.5); }
.ibtn[aria-pressed="false"] { opacity: .55; }
.mob { display: none; }

.pop { position: fixed; z-index: 30; background: var(--glass-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
#menu { top: calc(62px + var(--safe-t)); right: var(--gut); left: var(--gut); }
.menu-row { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; font-size: 12px; color: var(--mut); }
.menu-row .seg { background: rgba(255, 255, 255, .04); backdrop-filter: none; align-self: stretch; }
.menu-row .seg button { flex: 1; padding: 9px 4px; }

/* ---------- dock ---------- */
#dock {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 20;
  display: flex; gap: 4px; padding: 6px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 18px; max-width: calc(100vw - 2 * var(--gut));
}
#dock button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 13px; font-size: 11.5px; color: var(--txt); min-width: 68px; transition: .2s; }
#dock button:hover, #dock button.on { background: rgba(95, 208, 255, 0.16); }
#dock button.on { box-shadow: inset 0 0 0 1px rgba(95, 208, 255, 0.5); }
.dockpop { bottom: calc(92px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: min(560px, calc(100vw - 2 * var(--gut))); }
.dockpop button { padding: 10px 14px; border-radius: 11px; background: rgba(255, 255, 255, .06); font-size: 13px; border: 1px solid transparent; }
.dockpop button:hover { border-color: rgba(95, 208, 255, 0.5); background: rgba(95, 208, 255, .12); }
#hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--safe-b)); z-index: 5; font-size: 12.5px; color: var(--mut); background: var(--glass); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; pointer-events: none; opacity: 0; transition: opacity .6s; }
#hint.show { opacity: 1; }

/* ---------- hotspots ---------- */
#hotspots { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.hs { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: auto; border-radius: 50%; display: grid; place-items: center; transition: opacity .3s; will-change: transform; }
.hs i { position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle, #fff 0 28%, var(--acc) 30% 100%); box-shadow: 0 0 14px var(--acc); }
.hs::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--acc); animation: pulse 2s infinite; }
.hs:hover i { transform: scale(1.2); }
.hs b { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--glass-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; }
.hs:hover b { opacity: 1; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- toasts / notifications ---------- */
#toasts { position: fixed; top: calc(66px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--glass-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; animation: pop .3s ease both; max-width: calc(100vw - 32px); text-align: center; }
.toast.ok { border-color: rgba(85, 227, 154, .55); }
.toast.bad { border-color: rgba(255, 90, 74, .65); }
@keyframes popc { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.97); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
#notifs { position: fixed; top: calc(112px + var(--safe-t)); right: var(--gut); z-index: 41; display: flex; flex-direction: column; gap: 8px; width: min(330px, calc(100vw - 32px)); pointer-events: none; }
.notif { background: rgba(250, 250, 252, .96); color: #15171c; border-radius: 16px; padding: 11px 13px; display: flex; gap: 11px; align-items: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); animation: slidein .35s ease both; }
.notif.alarm { background: #fff1ef; }
.notif .ni { width: 34px; height: 34px; border-radius: 10px; background: #ff5a00; color: #fff; display: grid; place-items: center; flex: none; }
.notif.alarm .ni { background: #e5311f; }
.notif .ni svg { width: 19px; height: 19px; }
.notif .nt { font-size: 12.5px; line-height: 1.3; }
.notif .nt small { display: block; color: #7a8190; font-size: 11px; }
.notif .nt b { display: block; font-size: 13px; }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

#alarm { position: fixed; inset: 0; z-index: 38; pointer-events: none; box-shadow: inset 0 0 120px 20px rgba(255, 40, 30, .55); animation: flash .8s infinite alternate; }
@keyframes flash { from { opacity: .25; } to { opacity: 1; } }
.alarm-box { position: absolute; bottom: calc(120px + var(--safe-b)); left: 50%; transform: translateX(-50%); pointer-events: auto; display: flex; align-items: center; gap: 12px; background: #2a0b09; border: 1px solid var(--bad); border-radius: 14px; padding: 12px 16px; color: #ffd9d4; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); }
.alarm-box svg { color: var(--bad); width: 24px; height: 24px; }
.alarm-box button { background: var(--bad); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 600; }

/* ---------- panels ---------- */
.panel { position: fixed; z-index: 25; background: var(--glass-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); animation: pop .3s ease both; }
.panel .close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--mut); z-index: 2; }
.panel .close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
#card { left: var(--gut); top: calc(68px + var(--safe-t)); width: 340px; max-height: calc(100vh - 170px - var(--safe-t)); overflow: auto; padding: 18px; }
#card h2 { margin: 0 28px 4px 0; font-size: 18px; line-height: 1.25; }
#card .tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); margin-bottom: 4px; }
#card img.prod { display: block; width: 100%; max-height: 190px; object-fit: contain; border-radius: 12px; background: #f3f4f6; margin: 10px 0; padding: 6px; }
#card ul { margin: 8px 0 12px; padding: 0 0 0 18px; color: #cfd8e6; font-size: 13px; line-height: 1.55; }
#card .try { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 12px 0 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--txt); }
.btn:hover { border-color: rgba(95, 208, 255, .6); }
.btn.primary, button.primary { background: linear-gradient(180deg, var(--acc), var(--acc-2)); color: #03121c; border-color: transparent; }
.btn.ghost, button.ghost { background: transparent; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* replica of the glass switch */
.plate { position: relative; width: 250px; height: 250px; margin: 8px auto 4px; border-radius: 0px; background: linear-gradient(135deg, #1f2125 0%, #08090b 46%, #020203 100%); box-shadow: 0 14px 30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .2); }
.plate .gang { position: absolute; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 11px; border: 1.5px solid rgba(255, 255, 255, .88); transition: .25s; }
.plate .gang:hover { border-color: #fff; }
.plate .gang.on { border-color: #d6efff; background: rgba(50, 160, 255, .26); box-shadow: 0 0 14px rgba(30, 155, 255, .9), 0 0 30px rgba(30, 155, 255, .45), inset 0 0 12px rgba(60, 170, 255, .4); }
.plate .gang svg { width: 24px; height: 24px; stroke-width: 1.4; position: absolute; left: 7.5px; top: 7.5px; color: rgba(255, 255, 255, .88); }
.plate .gang.on svg { color: #fff; }
.plate .bolt { border: 0; }
.plate .bolt.on { box-shadow: none; }
.plate .bolt svg { width: 42px; height: 42px; left: 0; top: 0; stroke-width: 1.3; filter: none; }
.plate .bolt.on { background: none; }
.plate .bolt.on svg { color: #d6efff; fill: rgba(50, 160, 255, .3); filter: drop-shadow(0 0 6px rgba(30, 155, 255, .95)) drop-shadow(0 0 14px rgba(30, 155, 255, .6)); }
.plate .lbl { position: absolute; right: 12px; bottom: 9px; font-size: 7.5px; letter-spacing: .04em; color: #d5d7da; font-weight: 500; }
.plate-cap { text-align: center; font-size: 12px; color: var(--mut); margin-bottom: 8px; }
.kv { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }

/* remote */
#remote { left: 50%; transform: translateX(-50%); animation-name: popc; bottom: calc(96px + var(--safe-b)); width: min(660px, calc(100vw - 2 * var(--gut))); max-height: calc(100vh - 190px - var(--safe-t)); overflow: auto; padding: 16px 18px 18px; }
#remote h2 { margin: 0 30px 2px 0; font-size: 17px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.rbox { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.rbox h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); display: flex; align-items: center; gap: 6px; }
.rbox h4 .chip { margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 99px; letter-spacing: .04em; }
.chip.ir { background: rgba(255, 90, 74, .2); color: #ff9c90; }
.chip.rf { background: rgba(95, 208, 255, .2); color: var(--acc); }
.rbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.rbtns button { flex: 1 1 auto; padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: 13px; font-weight: 600; min-width: 52px; }
.rbtns button:hover:not(:disabled) { border-color: var(--acc); background: rgba(95, 208, 255, .14); }
.rbtns button:disabled { opacity: .35; cursor: not-allowed; }
.explain { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.explain > div { font-size: 12.5px; color: #cdd6e4; line-height: 1.45; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.explain b { display: block; color: #fff; margin-bottom: 3px; font-size: 13px; }
.explain .e-ir { border-color: rgba(255, 90, 74, .4); }
.explain .e-rf { border-color: rgba(95, 208, 255, .4); }
.tests { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tests button { padding: 10px; border-radius: 11px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); text-align: left; line-height: 1.3; }
.tests button.t-ir:hover { border-color: #ff7a6a; }
.tests button.t-rf:hover { border-color: var(--acc); }

/* ---------- Tuya-style phone ---------- */
#phone-wrap { position: fixed; right: var(--gut); top: calc(66px + var(--safe-t)); bottom: calc(96px + var(--safe-b)); z-index: 26; display: flex; align-items: center; animation: pop .3s ease both; pointer-events: none; }
#phone { pointer-events: auto; width: 306px; height: min(620px, 100%); border-radius: 38px; background: #f3f4f6; color: #1b1d22; border: 7px solid #0b0c0f; box-shadow: 0 0 0 2px #2b2e35, 0 30px 70px rgba(0, 0, 0, .6); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.p-status { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 4px; font-size: 12px; font-weight: 600; position: relative; flex: none; }
.p-notch { position: absolute; left: 50%; top: 6px; width: 70px; height: 18px; background: #0b0c0f; border-radius: 99px; transform: translateX(-50%); }
.p-sig svg { width: 14px; height: 14px; fill: #1b1d22; stroke: none; }
#p-screen { flex: 1; overflow: auto; padding: 0 14px 14px; scrollbar-width: none; }
#p-screen::-webkit-scrollbar { display: none; }
.p-nav { display: flex; flex: none; background: #fff; border-top: 1px solid #e6e8ec; padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
.p-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: #8a909c; padding: 4px; }
.p-nav button svg { width: 21px; height: 21px; }
.p-nav button.on { color: #ff5a00; }
.p-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 6px; }
.p-head h3 { margin: 0; font-size: 19px; font-weight: 700; }
.p-brand { font-size: 10.5px; color: #ff5a00; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 5px; }
.p-brand::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff5a00; }
.p-weather { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #ff7a2f, #ff5a00); color: #fff; padding: 12px 14px; border-radius: 16px; margin: 4px 0 10px; font-size: 12px; }
.p-weather b { font-size: 24px; font-weight: 700; display: block; line-height: 1.1; }
.p-chips { display: flex; gap: 6px; overflow: auto; padding: 2px 0 10px; scrollbar-width: none; }
.p-chips::-webkit-scrollbar { display: none; }
.p-chips button { flex: none; padding: 6px 12px; border-radius: 99px; font-size: 12px; background: #e9ebef; color: #555b66; font-weight: 600; }
.p-chips button.on { background: #1b1d22; color: #fff; }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dcard { background: #fff; border-radius: 16px; padding: 11px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); position: relative; }
.dcard .di { width: 34px; height: 34px; border-radius: 11px; background: #eef0f3; color: #6b7280; display: grid; place-items: center; transition: .2s; }
.dcard.on .di { background: #ff5a00; color: #fff; }
.dcard.alert .di { background: #e5311f; color: #fff; }
.dcard .dn { font-size: 12.5px; font-weight: 600; line-height: 1.2; margin-top: 8px; color: #1b1d22; }
.dcard .ds { font-size: 11px; color: #8a909c; margin-top: 1px; }
.dcard .tg { position: absolute; right: 10px; top: 12px; width: 34px; height: 20px; border-radius: 99px; background: #d5d9df; transition: .2s; }
.dcard .tg::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.dcard.on .tg { background: #ff5a00; }
.dcard.on .tg::after { left: 16px; }
.dcard .sl { width: 100%; margin-top: 6px; accent-color: #ff5a00; height: 4px; }
.dcard .stp { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.dcard .stp button { width: 26px; height: 26px; border-radius: 50%; background: #eef0f3; font-weight: 700; color: #333; }
.dcard .stp span { font-size: 12.5px; font-weight: 700; flex: 1; text-align: center; }
.p-sec { font-size: 12px; color: #6b7280; margin: 14px 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.scene { width: 100%; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 8px; text-align: left; }
.scene .si { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.scene b { display: block; font-size: 13.5px; }
.scene small { color: #8a909c; font-size: 11.5px; }
.scene .go { margin-left: auto; color: #ff5a00; font-weight: 700; font-size: 12px; }
.auto { background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 12px; color: #444; line-height: 1.4; }
.auto b { color: #ff5a00; }
.secbig { background: #fff; border-radius: 18px; padding: 16px; text-align: center; margin: 8px 0 12px; }
.secbig .sh { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; background: #eef0f3; color: #6b7280; transition: .3s; }
.secbig.armed .sh { background: #ff5a00; color: #fff; box-shadow: 0 0 0 8px rgba(255, 90, 0, .15); }
.secbig .sh svg { width: 30px; height: 30px; }
.secbig b { font-size: 15px; display: block; margin-bottom: 8px; }
.secbig button { background: #1b1d22; color: #fff; padding: 9px 18px; border-radius: 99px; font-weight: 600; font-size: 12.5px; }
.logrow { display: flex; gap: 8px; font-size: 11.5px; padding: 6px 2px; border-bottom: 1px solid #e6e8ec; color: #444; }
.logrow time { color: #9aa0ab; flex: none; width: 38px; }

/* ---------- tour ---------- */
#tourbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--safe-b)); z-index: 27; width: min(640px, calc(100vw - 2 * var(--gut))); }
.tour-box { display: flex; gap: 14px; align-items: center; background: var(--glass-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); animation: pop .3s ease both; }
.tour-step { font-size: 12px; color: var(--mut); text-align: center; flex: none; min-width: 38px; }
.tour-step span:first-child { display: block; font-size: 24px; font-weight: 700; color: var(--acc); line-height: 1; }
.tour-txt { flex: 1; min-width: 0; }
.tour-txt h3 { margin: 0 0 3px; font-size: 15px; }
.tour-txt p { margin: 0; font-size: 13px; color: #cdd6e4; line-height: 1.45; }
.tour-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
.tour-btns button { padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.tour-btns button.ghost { border-color: transparent; color: var(--mut); padding: 4px; font-weight: 500; font-size: 12px; }

/* ---------- start overlay ---------- */
#start { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(1200px 700px at 50% 30%, #12233f 0%, #06080d 70%); padding: 20px; transition: opacity .8s, visibility .8s; }
#start.out { opacity: 0; visibility: hidden; pointer-events: none; }
.start-card { text-align: center; max-width: 440px; width: 100%; }
.start-logo { height: 22px; width: auto; margin: 6px 0 14px; opacity: .6; }
.start-mark { width: 132px; height: auto; margin-bottom: 22px; animation: markpulse 2.4s ease-in-out infinite; filter: drop-shadow(0 0 24px rgba(95, 208, 255, .35)); }
@keyframes markpulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.03); } }
#loadpct { margin: 8px 0 0; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.start-card h1 { margin: 0; font-size: clamp(30px, 6vw, 44px); letter-spacing: -.02em; font-weight: 700; }
.start-card .sub { color: var(--mut); margin: 8px 0 26px; }
#loadbar { height: 3px; max-width: 280px; margin: 0 auto; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
#loadbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc-2)); transition: width .25s; }
button.big { padding: 15px 34px; border-radius: 14px; font-size: 16px; font-weight: 700; margin-top: 8px; box-shadow: 0 10px 30px rgba(42, 166, 255, .35); }
.langpick { display: flex; gap: 8px; justify-content: center; margin: 16px 0 4px; }
.langpick button { padding: 7px 16px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; color: var(--mut); }
.langpick button.on { color: #fff; border-color: var(--acc); background: rgba(95, 208, 255, .14); }

/* ---------- responsive ---------- */

/* product spotlight, messenger link, how it works */
#card .taghd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-right: 34px; }
#card .taghd .tag { margin-bottom: 0; }
#card .spotnav { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mut); }
#card .spotnav button { width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--txt); background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
#card .spotnav button:hover { border-color: rgba(95, 208, 255, .6); }
#card .spot .btn { padding: 8px 10px; font-size: 12.5px; }
.menu-chat { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--txt); }
.menu-chat b { color: var(--acc); }
#how { left: 50%; transform: translateX(-50%); animation-name: popc; bottom: calc(96px + var(--safe-b)); width: min(680px, calc(100vw - 2 * var(--gut))); max-height: calc(100vh - 190px - var(--safe-t)); overflow: auto; padding: 16px 18px 18px; }
.how-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 34px 14px 0; }
.how-tabs button { padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--txt); }
.how-tabs button.on { background: rgba(95, 208, 255, .18); border-color: var(--acc); }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.flow .a { font-style: normal; color: var(--mut); }
.flow .n { padding: 11px 13px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); animation: hop 4s infinite; animation-delay: calc(var(--i) * .9s); }
@keyframes hop { 0%, 24% { background: rgba(95, 208, 255, .22); border-color: var(--acc); box-shadow: 0 0 16px rgba(95, 208, 255, .35); } 36%, 100% { background: rgba(255, 255, 255, .06); border-color: var(--line); box-shadow: none; } }
.how-d { margin: 14px 0 0; font-size: 13.5px; line-height: 1.6; color: #cfd8e6; }
.how-irrf { display: block; width: 100%; height: auto; }
.how-irrf .room { fill: rgba(255, 255, 255, .04); stroke: var(--line); stroke-width: 1.5; }
.how-irrf .wall { fill: rgba(255, 255, 255, .16); }
.how-irrf .dev { fill: #0b0d10; stroke: var(--acc); stroke-width: 2; }
.how-irrf .tv { fill: #0b0d10; stroke: rgba(255, 255, 255, .5); stroke-width: 2; }
.how-irrf .curtain { fill: rgba(255, 255, 255, .1); stroke: rgba(255, 255, 255, .4); stroke-width: 2; animation: sway 3.6s ease-in-out infinite; transform-origin: 526px 26px; }
.how-irrf .lbl { fill: var(--mut); font-size: 16px; text-anchor: middle; }
.how-irrf .wallt { fill: rgba(255, 255, 255, .6); }
.how-irrf .ir { fill: #ffb86b; }
.how-irrf .rf { fill: var(--acc); }
.how-irrf .beam { stroke: #ffb86b; stroke-width: 2.5; stroke-dasharray: 7 7; animation: dash 1s linear infinite; }
.how-irrf .beam.stop { opacity: .7; }
.how-irrf .x { stroke: #ff6b6b; stroke-width: 3; stroke-linecap: round; fill: none; }
.how-irrf .arc { fill: none; stroke: var(--acc); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transform-origin: 54px 95px; animation: rfwave 2.8s ease-out infinite; }
.how-irrf .a2 { animation-delay: .9s; }
.how-irrf .a3 { animation-delay: 1.8s; }
@keyframes dash { to { stroke-dashoffset: -14; } }
@keyframes rfwave { 0% { transform: scale(.4); opacity: .85; } 100% { transform: scale(15); opacity: 0; } }
@keyframes sway { 0%, 100% { transform: skewX(0); } 50% { transform: skewX(-3deg); } }
@media (max-width: 980px) {
  .desk { display: none !important; }
  .mob { display: inline-flex; }
}
@media (max-width: 720px) {
  :root { --gut: 12px; }
  .brand { padding: 8px 11px; }
  .brand img { height: 16px; }
  .seg button { padding: 7px 9px; font-size: 12px; }
  #top { gap: 6px; }
  #top .grow:last-of-type { display: none; }
  #dock { gap: 0; padding: 4px; width: calc(100vw - 2 * var(--gut)); justify-content: space-between; }
  #dock button { min-width: 0; flex: 1; padding: 7px 4px; font-size: 10.5px; }
  #card { left: var(--gut); right: var(--gut); top: auto; bottom: calc(86px + var(--safe-b)); width: auto; max-height: 52vh; }
  #remote { bottom: calc(86px + var(--safe-b)); max-height: 62vh; }
  #how { bottom: calc(86px + var(--safe-b)); max-height: 62vh; }
  #dock button { line-height: 1.15; text-align: center; }
  .flow .n { font-size: 12.5px; padding: 9px 10px; }
  .explain, .tests { grid-template-columns: 1fr; }
  #phone-wrap { right: 0; left: 0; top: calc(60px + var(--safe-t)); bottom: calc(84px + var(--safe-b)); justify-content: center; }
  #phone { width: min(330px, calc(100vw - 24px)); height: 100%; max-height: 640px; }
  #tourbar { bottom: calc(86px + var(--safe-b)); }
  .tour-box { flex-wrap: wrap; padding: 12px; }
  .tour-btns { flex-direction: row; width: 100%; }
  .tour-btns button { flex: 1; }
  #notifs { top: calc(60px + var(--safe-t)); right: var(--gut); }
  .dockpop { bottom: calc(80px + var(--safe-b)); }
  #hint { display: none; }
}
@media (pointer: coarse) {
  .hs { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .hs i { inset: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs::before, #alarm, .flow .n, .how-irrf * { animation: none; }
}

.menu-row.powered { display: block; font-size: 10.5px; letter-spacing: .02em; color: var(--mut); max-width: 300px; }
.menu-row.powered a { color: inherit; font-weight: 600; text-decoration: none; }
.menu-row.powered a:hover { color: var(--fg, #fff); }
.menu-row.credits { display: block; font-size: 8.5px; line-height: 1.4; color: var(--mut); max-width: 300px; opacity: .6; padding-top: 0; }

#photo-badge{position:fixed;left:var(--gut);bottom:calc(96px + var(--safe-b));z-index:20;padding:5px 12px;border-radius:999px;background:rgba(20,22,26,.72);color:#fff;font:600 12px/1 system-ui,sans-serif;backdrop-filter:blur(8px);pointer-events:none}
#photo-badge.hidden{display:none}

/* ---- live explain strip ---- */
#explain{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(100px + var(--safe-b));z-index:26;width:min(600px,calc(100vw - 2*var(--gut)));padding:14px 16px 12px;border-radius:var(--r);background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(14px);box-shadow:0 14px 40px rgba(0,0,0,.35);transition:opacity .35s,transform .35s}
#explain.out{opacity:0;transform:translateX(-50%) translateY(10px)}
body.touring #explain{bottom:calc(196px + var(--safe-b))}
#explain .ex-flow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:9px}
#explain .ex-chip{padding:5px 10px;border-radius:99px;border:1px solid var(--line);font-size:11.5px;font-weight:600;color:var(--mut);background:rgba(255,255,255,.04);opacity:.35;transform:translateY(3px);transition:all .3s}
#explain .ex-chip.on{opacity:1;transform:none;color:#04121c;background:var(--acc);border-color:var(--acc)}
#explain .ex-chip.warn.on{background:var(--bad);border-color:var(--bad);color:#fff}
#explain .ex-arr{color:var(--mut);font-size:12px}
#explain .ex-txt{margin:0;font-size:13.5px;line-height:1.45}
#explain .ex-spec{margin:7px 0 0;font-size:11.5px;color:var(--mut)}
/* ---- cinematic intro ---- */
#intro{position:fixed;inset:0;z-index:60;pointer-events:none}
#intro .intro-vig{position:absolute;inset:0;background:radial-gradient(ellipse at center,rgba(0,0,0,0) 45%,rgba(0,0,0,.55) 100%)}
#intro .intro-title{position:absolute;left:50%;top:24%;transform:translate(-50%,-50%);text-align:center;width:min(900px,92vw);animation:introTitle 4.6s ease both;text-shadow:0 2px 24px rgba(0,0,0,.6)}
#intro .intro-title img{height:34px;opacity:.95}
#intro .intro-title h2{margin:16px 0 8px;font-size:clamp(22px,3.6vw,40px);font-weight:700;letter-spacing:-.02em}
#intro .intro-title p{margin:0;color:#dfe8f4;font-size:clamp(13px,1.6vw,17px)}
@keyframes introTitle{0%{opacity:0;transform:translate(-50%,-44%)}14%{opacity:1;transform:translate(-50%,-50%)}78%{opacity:1}100%{opacity:0;transform:translate(-50%,-56%)}}
#intro .intro-cap{position:absolute;left:50%;bottom:calc(14% + var(--safe-b));transform:translateX(-50%);padding:10px 20px;border-radius:99px;background:rgba(10,14,22,.62);backdrop-filter:blur(10px);border:1px solid var(--line);font-weight:600;font-size:clamp(13px,1.6vw,16px);opacity:0;transition:opacity .5s}
#intro .intro-cap.show{opacity:1}
#intro-skip{position:absolute;right:var(--gut);bottom:calc(var(--gut) + var(--safe-b));pointer-events:auto;padding:8px 16px;border-radius:99px;background:rgba(10,14,22,.6);border:1px solid var(--line);font-size:13px}
body.intro #hotspots,body.intro #dock,body.intro header{opacity:0;pointer-events:none;transition:opacity .5s}

/* ---- switch finder, kiosk ---- */
.pill { position: fixed; left: var(--gut); bottom: calc(104px + var(--safe-b)); z-index: 24; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); color: var(--txt); font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.pill svg { width: 16px; height: 16px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; }
.pill:hover { border-color: rgba(95,208,255,.6); }
body:has(#card:not(.hidden)) #find-btn, body:has(#how:not(.hidden)) #find-btn, body:has(#remote:not(.hidden)) #find-btn, body:has(#find:not(.hidden)) #find-btn,
body:has(#phone-wrap:not(.hidden)) #find-btn, body:has(#start:not(.out)) #find-btn, body:has(#intro:not(.hidden)) #find-btn, body.touring #find-btn, body.embed #find-btn { display: none; }
#find { left: 50%; transform: translateX(-50%); animation-name: popc; bottom: calc(96px + var(--safe-b)); width: min(560px, calc(100vw - 2 * var(--gut))); max-height: calc(100vh - 190px - var(--safe-t)); overflow: auto; padding: 16px 18px 18px; }
#find h2 { margin: 0 34px 10px 0; font-size: 18px; }
#find .tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }
.fq { margin: 0 0 10px; color: #cfd8e6; font-size: 14px; }
.fopts { display: grid; gap: 8px; }
.fopts.g4 { grid-template-columns: 1fr 1fr; }
.fopt { text-align: left; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt); font-size: 14px; }
.fopt:hover { border-color: var(--acc); background: rgba(95,208,255,.12); }
.fback { margin-top: 10px; }
.fres { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }
.fres img { width: 96px; height: 96px; object-fit: contain; background: #f3f4f6; border-radius: 12px; padding: 6px; }
.fres h3 { margin: 0 0 4px; font-size: 17px; } .fres p { margin: 0; color: #cfd8e6; font-size: 13.5px; line-height: 1.5; }
#find .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
#kiosk { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 0 var(--gut) calc(34px + var(--safe-b)); background: linear-gradient(180deg, transparent 45%, rgba(6,8,13,.72)); animation: kfade .8s ease both; cursor: pointer; }
.kcard { display: flex; align-items: center; gap: 34px; padding: 22px 30px; border-radius: 26px; background: rgba(14,18,28,.62); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid var(--line); max-width: 760px; }
.ktxt img { height: 26px; opacity: .95; margin-bottom: 12px; }
.ktxt h2 { margin: 0 0 6px; font-size: clamp(20px, 3.2vw, 30px); font-weight: 600; letter-spacing: -.01em; }
.ktxt p { margin: 0; color: var(--acc); font-size: 15px; letter-spacing: .04em; animation: kpulse 2.6s ease-in-out infinite; }
.kqr { text-align: center; } .kqr small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--mut); max-width: 132px; }
.qrbox { width: 116px; height: 116px; padding: 8px; background: #fff; border-radius: 14px; line-height: 0; } .qrbox svg { width: 100%; height: 100%; }
@keyframes kfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kpulse { 50% { opacity: .45; } }
body.kiosk #btn-quality, body.kiosk #btn-sound, body.kiosk #btn-menu, body.kiosk #hint { display: none !important; }
@media (max-width: 640px) { .kcard { flex-direction: column; gap: 14px; text-align: center; padding: 18px 20px; } .pill { bottom: calc(92px + var(--safe-b)); } }
body:has(#kiosk:not(.hidden)) #dock, body:has(#kiosk:not(.hidden)) #find-btn, body:has(#kiosk:not(.hidden)) #explain, body:has(#kiosk:not(.hidden)) #notifs, body:has(#kiosk:not(.hidden)) #hotspots { display: none; }

/* ---------- mobile comfort ---------- */
button, .seg button, .ibtn, #dock button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#rooms { display: none; }
#p-close { display: none; }
/* wide touch screens keep the compact floating card, placed below the room chips */
@media (pointer: coarse) and (min-width: 721px) { #card { top: calc(106px + var(--safe-t)); max-height: calc(100dvh - 240px); } }
@media (max-width: 720px), (pointer: coarse) {
  #rooms { display: flex; position: fixed; z-index: 19; left: 0; right: 0; top: calc(58px + var(--safe-t)); gap: 6px; padding: 2px var(--gut) 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #rooms::-webkit-scrollbar { display: none; }
  #rooms button { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--txt); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); min-height: 36px; }
  #rooms button.on { background: rgba(95, 208, 255, .22); border-color: var(--acc); }
  body.touring #rooms, body:has(#start:not(.out)) #rooms, body:has(#intro:not(.hidden)) #rooms, body:has(#phone-wrap:not(.hidden)) #rooms, body.embed #rooms, body:has(#kiosk:not(.hidden)) #rooms { display: none; }
}
@media (max-width: 720px) {
  #notifs { top: calc(100px + var(--safe-t)); }
  /* bottom sheets */
  #card, #remote, #how { left: 0; right: 0; bottom: 0; top: auto; width: auto; transform: none; border-radius: 22px 22px 0 0; max-height: 72dvh; padding-bottom: calc(18px + var(--safe-b)); animation: sheetup .28s ease both; }
  #card::before, #remote::before, #how::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .28); margin: -8px auto 10px; }
  body:has(#card:not(.hidden)) #dock, body:has(#remote:not(.hidden)) #dock, body:has(#how:not(.hidden)) #dock { display: none; }
  /* full-screen phone app */
  #phone-wrap { inset: 0; top: 0; bottom: 0; z-index: 40; background: #f3f4f6; pointer-events: auto; animation: sheetup .28s ease both; }
  #phone { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .p-status { padding-top: calc(10px + var(--safe-t)); }
  .p-notch { display: none; }
  #p-close { display: grid; place-items: center; position: absolute; right: 10px; top: calc(4px + var(--safe-t)); width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .08); color: #1b1d22; font-size: 22px; line-height: 1; z-index: 3; }
  .p-sig { margin-right: 38px; }
  /* top bar fits a 360 px screen */
  #top { gap: 5px; }
  #top .grow { display: none; }
  #top { justify-content: space-between; }
  .brand { padding: 8px 9px; }
  .brand img { height: 13px; }
  .seg button { padding: 7px 8px; font-size: 11.5px; }
  .ibtn { min-width: 38px; }
}
@keyframes sheetup { from { transform: translateY(100%); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
