: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: #fff; background: rgba(170, 220, 255, .12); box-shadow: 0 0 9px rgba(150, 210, 255, .55); }
.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 svg { filter: drop-shadow(0 0 5px rgba(150, 210, 255, .8)); }
.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: 34px; width: auto; margin-bottom: 26px; }
.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: 4px; 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 ---------- */
@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; }
  .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 (prefers-reduced-motion: reduce) {
  .hs::before, #alarm { animation: none; }
}

.menu-row.credits { display: block; font-size: 10.5px; line-height: 1.45; color: var(--mut); max-width: 300px; opacity: .8; }
