/* The three live demos under the hero (assets/js/demo.js): real pointers, a small File Explorer in the real skins' colours, real live wallpapers.
   Same rules as brand.css: flat colour, hard shadows, no gradient, glow or blur. The Explorer's own colours come in as --x-* from the skin data. */

.bt-slide { position: relative; }
.bt-slide:not(.on)::after { content: ""; position: absolute; inset: 0; z-index: 3; }

/* the window the demos live in: the same 5:3 as the launcher pictures, so a phone-sized or wide screen shows the same shape */
.bt-demo { aspect-ratio: 1280 / 768; background: var(--bt-surface-0); }
.bt-demo-in { display: grid; grid-template-columns: minmax(180px, 24%) minmax(0, 1fr); gap: 14px; height: 100%; padding: 14px; box-sizing: border-box; }
.bt-stage { position: relative; min-width: 0; min-height: 0; border: 1px solid var(--bt-line); border-radius: 8px; background: var(--bt-night); overflow: hidden; }
.bt-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: auto; }
.bt-sidelabel { margin: 0; font: 700 12px/1.2 var(--bt-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--bt-muted); }
[dir="rtl"] .bt-sidelabel { letter-spacing: 0; font-size: 13.5px; text-transform: none; }

/* choosing buttons: pointers and wallpapers */
.bt-packs, .bt-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.bt-pack, .bt-scene { position: relative; display: grid; gap: 5px; padding: 5px 5px 7px; text-align: start; cursor: pointer; background: var(--bt-surface); border: 1px solid var(--bt-line); border-radius: 8px; color: var(--bt-text); font: 700 12.5px/1.25 var(--bt-ui); transition: border-color 100ms ease-out, transform 100ms ease-out; }
.bt-pack img, .bt-scene img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: var(--bt-night); }
.bt-pack:hover, .bt-scene:hover { border-color: var(--bt-lavender); }
.bt-pack:active, .bt-scene:active { transform: translateY(2px); }
.bt-pack[aria-pressed="true"], .bt-scene[aria-pressed="true"] { border-color: var(--bt-violet); box-shadow: 0 0 0 2px var(--bt-violet); }
.bt-pack:focus-visible, .bt-scene:focus-visible, .bt-skin:focus-visible { outline: 3px solid var(--bt-lavender); outline-offset: 2px; }

/* ---------- pointers ---------- */
.bt-pstage { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 14px; }
.bt-hint { margin: 0; font: 600 14px/1.4 var(--bt-ui); color: var(--bt-muted); }
.bt-packname { margin: 0; min-height: 1.4em; font: 800 16px/1.3 var(--bt-ui); color: var(--bt-lavender); }
.bt-zones { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 10px; min-height: 0; }
.bt-zone { position: relative; display: grid; place-items: center; min-height: 0; border: 1px solid var(--bt-line); border-radius: 8px; background: var(--bt-surface); }
.bt-zone b { position: absolute; inset-inline-start: 10px; top: 8px; font: 700 12px/1 var(--bt-ui); color: var(--bt-muted); letter-spacing: .06em; }
.z-link::before { content: ""; width: 46%; height: 34%; background: var(--bt-violet); border-radius: 8px; box-shadow: 0 4px 0 var(--bt-press); }
.z-text::before { content: ""; width: 62%; height: 30%; background: var(--bt-night); border: 1px solid var(--bt-line); border-radius: 6px; box-shadow: inset 12px 0 0 0 var(--bt-night); }
.z-text::after { content: ""; position: absolute; width: 2px; height: 16%; background: var(--bt-lavender); }
.z-busy::before { content: ""; width: 44%; height: 10px; border-radius: 999px; background: var(--bt-line); }
.z-busy::after { content: ""; position: absolute; width: 22%; height: 10px; border-radius: 999px; background: var(--bt-violet); inset-inline-start: 28%; animation: btbusy 1.6s ease-in-out infinite alternate; }
@keyframes btbusy { to { transform: translateX(100%); } } /* one bar-width to the side: a transform, not a layout property (it ran a layout every frame) */
html[dir="rtl"] .z-busy::after { animation-name: btbusyr; }
@keyframes btbusyr { to { transform: translateX(-100%); } }
.z-move::before { content: "\2725"; font: 700 38px/1 var(--bt-ui); color: var(--bt-lavender); }
.z-help::before { content: "?"; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--bt-lavender); font: 800 24px/1 var(--bt-ui); color: var(--bt-lavender); }
.z-desk::before { content: ""; width: 38%; height: 38%; border: 2px dashed var(--bt-line); border-radius: 8px; }

/* ---------- File Explorer: ten real skins, six real options, your own colours ---------- */
.bt-skins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; min-height: 0; overflow: auto; padding: 2px 2px 6px; scrollbar-width: thin; scrollbar-color: var(--bt-line) transparent; }
.bt-skin { display: grid; gap: 5px; padding: 5px 5px 7px; cursor: pointer; text-align: start; background: var(--bt-surface); border: 1px solid var(--bt-line); border-radius: 8px; color: var(--bt-text); font: 700 12px/1.25 var(--bt-ui); transition: border-color 100ms ease-out, transform 100ms ease-out; }
.bt-skin img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: var(--bt-night); }
.bt-skin:hover { border-color: var(--bt-lavender); }
.bt-skin:active { transform: translateY(2px); }
.bt-skin[aria-pressed="true"] { border-color: var(--bt-violet); box-shadow: 0 0 0 2px var(--bt-violet); }
.bt-side:has(.bt-skins) { overflow: hidden; }
.bt-toggles { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 16px; justify-content: start; }
.bt-toggle { display: flex; align-items: center; gap: 8px; font: 600 13px/1.3 var(--bt-ui); color: var(--bt-text); cursor: pointer; }
.bt-toggle input, .bt-switch input { width: 17px; height: 17px; accent-color: var(--bt-violet); flex: none; }
.bt-xstage { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; padding: 12px; background: var(--bt-surface-0); }
.bt-xwrap { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; min-height: 0; }
.bt-xname { margin: 0; font: 800 14px/1.2 var(--bt-ui); color: var(--bt-lavender); }
.bt-xopts { display: grid; gap: 10px; padding: 10px 12px; border: 1px solid var(--bt-line); border-radius: 8px; background: var(--bt-night); }
.bt-own { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 600 12.5px/1.2 var(--bt-ui); color: var(--bt-muted); }
.bt-own b { color: var(--bt-text); font-weight: 800; }
.bt-own label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bt-own input[type="color"] { width: 30px; height: 24px; padding: 1px; background: var(--bt-surface); border: 1px solid var(--bt-line); border-radius: 5px; cursor: pointer; }
.bt-xp { position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; direction: ltr; text-align: left; border: 2px solid var(--x-border, #7A56C8); border-radius: 8px; overflow: hidden; background: var(--x-files, #1A1D24); color: var(--x-navtext, #ECEFF4); font: 500 13px/1.3 var(--bt-ui); box-shadow: 6px 6px 0 var(--bt-shadow); transition: background-color 220ms ease-out, border-color 220ms ease-out; }
.bt-xp-cap { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: var(--x-cap, #2E3440); color: var(--x-captext, #fff); font: 700 13px/1.2 var(--bt-ui); transition: background-color 220ms ease-out; }
.bt-xp-title { margin-inline-end: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-xp-cap i { width: 10px; height: 10px; border-radius: 50%; background: var(--x-captext, #fff); opacity: .55; flex: none; }
.bt-xp-bar { display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: var(--x-head, #20242C); border-bottom: 1px solid var(--x-line, #434C5E); transition: background-color 220ms ease-out; }
.bt-xp-arrows { opacity: .7; letter-spacing: .3em; }
.bt-xp-addr { flex: 1; padding: 4px 10px; border: 1px solid var(--x-line, #434C5E); border-radius: 5px; background: var(--x-files, #1A1D24); font-size: 12.5px; }
.bt-xp-body { display: grid; grid-template-columns: 132px 1fr; min-height: 0; }
.bt-xp-nav { margin: 0; padding: 8px 6px; list-style: none; background: var(--x-nav, #232831); border-inline-end: 1px solid var(--x-line, #434C5E); color: var(--x-navtext, #E5E9F0); transition: background-color 220ms ease-out; overflow: hidden; }
.bt-xp-nav li { padding: 5px 8px; border-radius: 5px; font-size: 12.5px; cursor: pointer; }
.bt-xp-nav li:hover { background: var(--x-line, #434C5E); }
.bt-xp-nav li.on { background: var(--x-cap, #2E3440); color: var(--x-captext, #fff); }
.bt-xp-files { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--x-files, #1A1D24); transition: background-color 220ms ease-out; }
.bt-xp-emblem { position: absolute; z-index: 0; pointer-events: none; aspect-ratio: 1; object-fit: contain; }
.bt-rows, .bt-row.hd { position: relative; z-index: 1; }
.bt-row { display: grid; grid-template-columns: 20px 22px minmax(0, 1fr) 62px 62px; align-items: center; gap: 6px; padding: 0 10px; height: 29px; font-size: 12.5px; }
.bt-xp.compact .bt-row { height: 21px; font-size: 12px; }
.bt-xp:not(.checks) .bt-row .chk { display: none; }
.bt-xp:not(.checks) .bt-row { grid-template-columns: 22px minmax(0, 1fr) 62px 62px; }
.bt-row .chk { width: 13px; height: 13px; border: 1.5px solid var(--x-navtext, #ECEFF4); border-radius: 3px; opacity: .7; }
.bt-row.sel .chk { background: var(--x-captext, #fff); opacity: 1; }
.bt-row.hd { height: 26px; font-weight: 700; background: var(--x-head, #20242C); border-bottom: 1px solid var(--x-line, #434C5E); }
.bt-row.hd .chk { border-color: transparent; }
.bt-rows .bt-row { cursor: pointer; }
.bt-rows .bt-row:hover { background: var(--x-line, #434C5E); }
.bt-row.sel, .bt-rows .bt-row.sel:hover { background: var(--x-cap, #2E3440); color: var(--x-captext, #fff); }
.bt-row.dim { opacity: .6; }
.bt-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-row .d, .bt-row .s { opacity: .8; font-size: 12px; }
.bt-row .ic { width: 14px; height: 12px; border-radius: 2px; background: var(--x-navtext, #ECEFF4); opacity: .55; }
.bt-row .ic.folder { background: var(--x-border, #7A56C8); opacity: 1; border-radius: 2px 5px 2px 2px; }
.bt-row .ic.hd, .bt-row.hd .ic { background: none; }
.bt-xp-status { padding: 5px 10px; font-size: 12px; background: var(--x-status, #1E222A); border-top: 1px solid var(--x-line, #434C5E); transition: background-color 220ms ease-out; }
.bt-xp.nostatus { grid-template-rows: auto auto minmax(0, 1fr); }
.bt-xp.nostatus .bt-xp-status { display: none; }

/* ---------- live wallpapers: a big stage, the scene's own controls, and a strip of all twenty ---------- */
.bt-livedemo { grid-template-columns: minmax(0, 1fr) 230px; grid-template-rows: minmax(0, 1fr) auto auto; }
.bt-livedemo > .bt-liveside { grid-row: 1 / 3; grid-column: 2; }
.bt-livestage { background: #02050a center / cover no-repeat; background-size: cover, cover; }
.bt-liveside { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--bt-line) transparent; }
.bt-strip { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; }
.bt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-chips button { padding: 5px 12px; border: 1px solid var(--bt-line); border-radius: 999px; background: var(--bt-surface); color: var(--bt-muted); font: 700 12.5px/1.2 var(--bt-ui); cursor: pointer; transition: background-color 100ms ease-out, color 100ms ease-out; }
.bt-chips button:hover { color: var(--bt-text); }
.bt-chips button[aria-pressed="true"] { background: var(--bt-violet); border-color: var(--bt-violet); color: #fff; }
.bt-chips button:focus-visible, .bt-mini:focus-visible { outline: 3px solid var(--bt-lavender); outline-offset: 2px; }
.bt-scenes { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--bt-line) transparent; }
.bt-scenes .bt-scene { position: relative; flex: 0 0 132px; scroll-snap-align: start; }
.bt-scenes .bt-scene[hidden] { display: none; }
.bt-scene em { position: absolute; inset-block-start: 9px; inset-inline-end: 9px; padding: 2px 7px; border-radius: 999px; background: var(--bt-night); border: 1px solid var(--bt-line); color: var(--bt-lavender); font: 700 10.5px/1.2 var(--bt-ui); font-style: normal; }
.bt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 360ms ease-out; background: transparent; }
.bt-frame.on { opacity: 1; }
.bt-livename { position: absolute; z-index: 2; inset-inline: 0; margin-inline: auto !important; width: max-content; max-width: 60%; top: 8px; margin: 0; padding: 5px 10px; font: 800 14px/1.2 var(--bt-ui); color: #fff; background: var(--bt-night); border: 1px solid var(--bt-line); border-radius: 6px; box-shadow: 3px 3px 0 var(--bt-shadow); pointer-events: none; }
.bt-glnote { position: absolute; z-index: 2; inset-inline: 12px; top: 12px; margin: 0; padding: 8px 12px; font: 600 13.5px/1.4 var(--bt-ui); color: var(--bt-text); background: var(--bt-night); border: 1px solid var(--bt-line); border-radius: 6px; }
.bt-props { display: grid; gap: 10px; }
.bt-noctl { margin: 0; font: 600 13px/1.5 var(--bt-ui); color: var(--bt-muted); }
.bt-prop { display: grid; gap: 4px; font: 600 12.5px/1.3 var(--bt-ui); color: var(--bt-muted); }
.bt-prop.bt-switch { grid-template-columns: 1fr auto; align-items: center; }
.bt-prop input[type="range"] { width: 100%; height: 22px; background: none; accent-color: var(--bt-violet); }
.bt-prop input[type="color"] { width: 100%; height: 30px; padding: 2px; background: var(--bt-surface); border: 1px solid var(--bt-line); border-radius: 6px; cursor: pointer; }
.bt-prop select { height: 32px; padding: 0 8px; color: var(--bt-text); background: var(--bt-surface); border: 1px solid var(--bt-line); border-radius: 6px; font: 600 13px/1 var(--bt-ui); }
.bt-liveact { display: flex; gap: 8px; margin-top: 2px; }
.bt-mini { flex: 1; padding: 8px 10px; border: 1px solid var(--bt-line); border-radius: 8px; background: var(--bt-surface); color: var(--bt-text); font: 700 12.5px/1.2 var(--bt-ui); cursor: pointer; transition: border-color 100ms ease-out, transform 100ms ease-out; }
.bt-mini:hover { border-color: var(--bt-lavender); }
.bt-mini:active { transform: translateY(2px); }
/* "My desktop": icons of the real icon packs and a taskbar over the wallpaper, so it reads as the visitor's own desktop. Empty places let the pointer through to the scene. */
.bt-desk { position: absolute; inset: 0; z-index: 2; pointer-events: none; --is: 46px; }
.bt-desk[hidden] { display: none; }
.bt-ic { display: block; flex: none; width: var(--is); height: var(--is); background-image: var(--sprite); background-size: calc(var(--is) * 4) calc(var(--is) * 4); background-position: calc(var(--is) * var(--c, 0) * -1) calc(var(--is) * var(--r, 0) * -1); background-repeat: no-repeat; }
.bt-dgrid { position: absolute; inset-block-start: 8px; inset-inline-start: 6px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); gap: 2px; }
.bt-di { pointer-events: auto; display: grid; justify-items: center; align-content: start; gap: 3px; width: 82px; padding: 5px 2px 4px; border: 1px solid transparent; border-radius: 4px; background: none; color: #fff; text-align: center; text-decoration: none; cursor: default; font: 600 11.5px/1.2 var(--bt-ui); text-shadow: 0 1px 2px #000, 0 0 2px #000; }
.bt-di:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); }
.bt-di.on { background: rgba(122, 86, 200, .55); border-color: rgba(169, 139, 224, .9); }
.bt-di:focus-visible { outline: 2px solid var(--bt-lavender); outline-offset: 1px; }
.bt-di span { max-width: 100%; padding: 0 4px; border-radius: 3px; background: rgba(21, 18, 27, .42); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* readable on a light wallpaper too */
.bt-di img { display: block; width: var(--is); height: var(--is); border-radius: 10px; }
.bt-di-bt { position: absolute; inset-block-start: 8px; inset-inline-end: 6px; cursor: pointer; }
.bt-di-bin { position: absolute; inset-block-end: 40px; inset-inline-end: 6px; }
.bt-tray { pointer-events: auto; position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; background: rgba(21, 18, 27, .8); border-top: 1px solid rgba(255, 255, 255, .12); }
.bt-start { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 18px; height: 18px; flex: none; margin-inline-start: auto; }
.bt-start i { background: var(--bt-lavender); border-radius: 1px; }
.bt-tray-apps { display: flex; align-items: center; gap: 6px; margin-inline-end: auto; }
.bt-tapp { display: block; padding: 2px; border-radius: 4px; }
.bt-tapp:first-child { background: rgba(255, 255, 255, .12); }
.bt-clock { font: 600 12px/1 var(--bt-ui); color: #fff; padding-inline: 4px; }
.bt-mydesk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 2px 2px 0; min-width: 0; }
.bt-ipacks { display: flex; gap: 6px; flex-wrap: wrap; }
.bt-ipack { width: 36px; height: 36px; flex: none; padding: 0; cursor: pointer; background-color: var(--bt-surface); background-size: 144px 144px; background-origin: border-box; background-clip: border-box; background-repeat: no-repeat; border: 1px solid var(--bt-line); border-radius: 8px; transition: border-color 100ms ease-out; }
.bt-ipack:hover { border-color: var(--bt-lavender); }
.bt-ipack[aria-pressed="true"] { border-color: var(--bt-violet); box-shadow: 0 0 0 2px var(--bt-violet); }
.bt-ipack:focus-visible { outline: 3px solid var(--bt-lavender); outline-offset: 2px; }
.bt-ipackname { margin: 0; font: 700 12.5px/1.3 var(--bt-ui); color: var(--bt-lavender); }
/* the loading screen: the scene's own picture is the stage behind it, a flat night veil, the living flame, the name, a bar */
.bt-play { position: absolute; z-index: 2; inset-inline: 0; margin-inline: auto; top: 50%; transform: translateY(-50%); width: max-content; max-width: 90%; padding: 14px 24px; border: 1px solid var(--bt-violet); border-radius: 10px; background: var(--bt-violet); color: #fff; font: 800 16px/1.2 var(--bt-ui); cursor: pointer; box-shadow: 4px 4px 0 var(--bt-shadow); transition: transform 100ms ease-out; }
.bt-play:active { transform: translateY(calc(-50% + 2px)); }
.bt-play:focus-visible { outline: 3px solid var(--bt-lavender); outline-offset: 3px; }
.bt-loading { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; background: rgba(21, 18, 27, .72); opacity: 0; visibility: hidden; transition: opacity 320ms ease-out, visibility 0s 320ms; }
.bt-loading.on { opacity: 1; visibility: visible; transition: opacity 160ms ease-out; }
.bt-flameload { display: block; min-height: 52px; }
.bt-loadname { font: 800 20px/1.3 var(--bt-ui); color: #fff; }
.bt-loadmeta { font: 600 13.5px/1.4 var(--bt-ui); color: var(--bt-lavender); }
.bt-bar { display: block; width: min(260px, 70%); height: 6px; margin-top: 4px; border-radius: 999px; background: var(--bt-line); overflow: hidden; }
.bt-bar u { display: block; width: 6%; height: 100%; border-radius: 999px; background: var(--bt-violet); transition: width 420ms cubic-bezier(.2, .8, .2, 1); }
.bt-loading.bad .bt-loadmeta { color: var(--bt-text); }

/* ---------- the way out: appears at the first real touch ---------- */
.bt-cap { grid-template-areas: "h" "p" "x"; }
.bt-cap h3 { grid-area: h; } .bt-cap > p:not(.bt-pickhint):not(.bt-get) { grid-area: p; }
.bt-pickhint, .bt-getbar { grid-area: x; }
.bt-pickhint { margin: 8px 0 0; font: 600 14px/1.4 var(--bt-ui); color: var(--bt-lavender); transition: opacity 220ms ease-out; }
.bt-getbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin-top: 6px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 260ms ease-out, transform 260ms cubic-bezier(.2, .8, .2, 1), visibility 0s 260ms; }
.bt-getbar .bt-get { margin: 0; font: 700 16px/1.4 var(--bt-ui); color: var(--bt-text); }
.bt-slide.touched .bt-getbar, .bt-getbar.always { opacity: 1; visibility: visible; transform: none; transition: opacity 260ms ease-out, transform 260ms cubic-bezier(.2, .8, .2, 1); }
.bt-slide.touched .bt-pickhint { opacity: 0; }
.bt-slide:not(.on) .bt-getbar { visibility: hidden; }

/* ---------- a phone: the demos stack ---------- */
@media (max-width: 900px) {
  .bt-demo { aspect-ratio: auto; }
  .bt-demo-in { grid-template-columns: 1fr; height: auto; }
  .bt-packs, .bt-scenes { grid-template-columns: repeat(4, 1fr); }
  .bt-pack, .bt-scene { font-size: 11px; } .bt-pack img, .bt-scene img { aspect-ratio: 4 / 3; }
  .bt-pstage { min-height: 250px; }
  .bt-skins { grid-template-columns: repeat(5, 1fr); max-height: 220px; } .bt-skin { font-size: 10.5px; } .bt-side:has(.bt-skins) { overflow: visible; }
  .bt-toggles { grid-template-columns: 1fr 1fr; }
  .bt-xstage { min-height: 380px; }
  .bt-xp-body { grid-template-columns: 90px 1fr; }
  .bt-row, .bt-xp:not(.checks) .bt-row { grid-template-columns: 20px 22px minmax(0, 1fr) 54px; } .bt-xp:not(.checks) .bt-row { grid-template-columns: 22px minmax(0, 1fr) 54px; } .bt-row .s { display: none; }
  .bt-livedemo { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bt-livestage { aspect-ratio: 16 / 9; min-height: 0; }
  .bt-strip { grid-column: auto; order: 1; }
  .bt-liveside { order: 2; overflow: visible; grid-row: auto !important; grid-column: auto !important; }
  .bt-mydesk { order: 1; }
  .bt-desk { --is: 30px; } .bt-di { width: 58px; font-size: 10px; padding: 3px 1px; } .bt-dgrid { grid-template-rows: repeat(2, auto); } .bt-dgrid .bt-di:nth-child(n+5) { display: none; } .bt-di-bin { display: none; } .bt-livename { top: auto; bottom: 38px; font-size: 12px; padding: 3px 8px; } .bt-di-bin { inset-block-end: 36px; } .bt-tray { height: 30px; }
  .bt-scenes .bt-scene { flex-basis: 108px; }
  .bt-side { overflow: visible; }
}
@media (max-width: 520px) {
  .bt-zones { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); }
  .bt-xp-nav { display: none; } .bt-xp-body { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .z-busy::after { animation: none; } .bt-frame, .bt-getbar, .bt-xp, .bt-loading, .bt-bar u { transition: none; } }

/* ---------- pointers: the tabs, the characters, the puppet over the stage ---------- */
.bt-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--bt-line); border-radius: 8px; overflow: hidden; flex: none; }
.bt-tabs button { padding: 9px 6px; border: 0; background: var(--bt-surface); color: var(--bt-muted); font: 700 13.5px/1.2 var(--bt-ui); cursor: pointer; transition: background-color 100ms ease-out, color 100ms ease-out; }
.bt-tabs button[aria-pressed="true"] { background: var(--bt-violet); color: #fff; }
.bt-tabs button:focus-visible { outline: 3px solid var(--bt-lavender); outline-offset: -3px; }
.bt-pside { overflow: hidden; }
.bt-pside .bt-packs { flex: 1 1 0; min-height: 0; overflow: auto; align-content: start; padding: 2px 2px 6px; scrollbar-width: thin; scrollbar-color: var(--bt-line) transparent; }
.bt-pack[hidden] { display: none; }
.bt-portrait { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 5px; background: var(--bt-night); }
.bt-portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 260ms ease-out; }
.bt-pack.ready .bt-portrait canvas { opacity: 1; }
.bt-charcanvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; transition: opacity 160ms ease-out; }
.bt-charcanvas.away { opacity: 0; }
.bt-pstage:not(.is-char) .bt-charcanvas { display: none; }
.bt-pstage.is-char, .bt-pstage.is-char .bt-zone { cursor: none; }
@media (max-width: 900px) {
  .bt-pside { overflow: visible; }
  .bt-pside .bt-packs { flex: none; grid-template-columns: repeat(3, 1fr); max-height: 250px; }
}
.bt-portrait::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; background: var(--bt-surface-2); }
.bt-portrait canvas { transform: scale(1.55); transform-origin: 50% 42%; }
