/* ==================================================================
   BEATS 2.1.1.0: a deep-space console that sits on the parchment page
   Left ear teal, right ear rose; where they meet, the beat glows.
================================================================== */
#beats-app {
    --b-bg1: #0c0a22;
    --b-bg2: #17123a;
    --b-bg3: #241540;
    --b-ink: #eee8f6;
    --b-muted: #a9a2c6;
    --b-line: rgba(238, 232, 246, 0.12);
    --b-tile: rgba(255, 255, 255, 0.045);
    --b-tile-on: rgba(255, 255, 255, 0.09);
    --b-accent: #f0c77e;
    --b-accent-ink: #2a1d0c;
    --b-left: #4fd1c5;
    --b-right: #ff86bd;
    --b-band: #b77cff;
    --b-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --rk-tray: linear-gradient(180deg, #08071a, #151135);
    --rk-face-hi: #f8f3ea; --rk-face: #e6dece; --rk-face-lo: #cdc2aa; --rk-edge: #6e6450;
    --rk-ink: #241f35; --rk-led: #f0c77e; --rk-stop: #b3261e;
    --rk-lcd: linear-gradient(180deg, #0b0d22, #05060f); --rk-lcd-ink: #f3d39a; --rk-lcd-glow: rgba(243, 206, 140, .4);

    position: relative;
    box-sizing: border-box;
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 20px 22px 16px;
    border-radius: 22px;
    color: var(--b-ink);
    background:
        radial-gradient(1.2px 1.2px at 9% 14%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1px 1px at 31% 71%, rgba(255,255,255,.3), transparent 60%),
        radial-gradient(1.4px 1.4px at 52% 6%, rgba(255,255,255,.45), transparent 60%),
        radial-gradient(1px 1px at 69% 41%, rgba(255,255,255,.3), transparent 60%),
        radial-gradient(1.2px 1.2px at 88% 19%, rgba(255,255,255,.4), transparent 60%),
        radial-gradient(1px 1px at 6% 88%, rgba(255,255,255,.3), transparent 60%),
        radial-gradient(110% 70% at 0% 0%, rgba(79,209,197,.10), transparent 55%),
        radial-gradient(110% 70% at 100% 0%, rgba(255,134,189,.10), transparent 55%),
        linear-gradient(165deg, var(--b-bg1) 0%, var(--b-bg2) 55%, var(--b-bg3) 100%);
    box-shadow: 0 18px 40px rgba(30, 20, 50, 0.3), inset 0 1px 0 rgba(255,255,255,.06);
    font-family: var(--b-ui);
    font-size: 16px;
    line-height: 1.45;
}
#beats-app *, #beats-app *::before, #beats-app *::after { box-sizing: border-box; }
#beats-app [hidden] { display: none !important; }
#beats-app h2, #beats-app h3 { margin: 0; font-family: Georgia, serif; font-weight: normal; color: var(--b-ink); }
#beats-app h2 { font-size: 1.2rem; }
#beats-app h3 { font-size: 1.02rem; }
#beats-app h2:hover, #beats-app h3:hover { color: var(--b-ink); }
#beats-app p { margin: 0; }
#beats-app button, #beats-app input, #beats-app select, #beats-app textarea { font-family: var(--b-ui); font-size: 15px; }
#beats-app a { color: var(--b-accent); }

/* ---------- top ---------- */
.bt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bt-title { font-family: Georgia, serif; font-size: 1.55rem; line-height: 1.1; }
.bt-badge { font-family: var(--b-ui); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; vertical-align: middle;
    padding: 2px 9px; margin-left: 6px; border-radius: 99px; background: rgba(240,199,126,.18); color: var(--b-accent); }
.bt-phones { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--b-muted); letter-spacing: .04em; }
.bt-phones svg { width: 18px; height: 18px; fill: var(--b-left); filter: drop-shadow(0 0 4px rgba(79,209,197,.5)); }
.bt-top-r { display: flex; align-items: center; gap: 12px; }
.bt-fs { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; cursor: pointer;
    background: rgba(255,255,255,.05); border: 1px solid var(--b-line); color: var(--b-muted); transition: color .2s, border-color .2s, background .2s; }
.bt-fs:hover, .bt-fs:focus-visible { color: var(--b-accent); border-color: rgba(240,199,126,.5); background: rgba(240,199,126,.08); }
.bt-fs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bt-fs .i-fs-off, .beats.is-fs .bt-fs .i-fs-on { display: none; }
.beats.is-fs .bt-fs .i-fs-off { display: block; }

/* ---------- console ---------- */
.bt-console { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 210px); align-items: center; gap: 16px; }
.bt-deck .i-pause, #bt-play[aria-pressed="true"] .i-play { display: none; }
#bt-play[aria-pressed="true"] .i-pause { display: block; }
.rk-key.is-locked { opacity: .55; }
.rk-key.is-locked::after { content: "\1F512"; position: absolute; top: -9px; right: -5px; font-size: 11px; }
.bt-lcd { min-width: 0; display: flex; flex-direction: column; gap: 4px; min-height: 64px; justify-content: center; }
.bt-status { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-lcd-row { display: flex; gap: 10px; align-items: center; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.bt-lcd-info { flex: 1 1 auto; min-width: 0; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-clock { font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.bt-rec-time { color: #ff6b61; text-shadow: 0 0 6px rgba(255,80,70,.6); }
.beats.is-playing #bt-play .rk-led { animation: bt-led 4s ease-in-out infinite; }
@keyframes bt-led { 50% { opacity: .45; } }
.bt-dials { display: flex; flex-direction: column; gap: 8px; }
.bt-dial { display: flex; flex-direction: column; gap: 3px; font-size: .74rem; color: var(--b-muted); text-transform: lowercase; letter-spacing: .04em; }
#beats-app .bt-dial select { padding: 5px 8px; font-size: 13px; }

/* ---------- banners ---------- */
.bt-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px;
    padding: 10px 14px; border-radius: 12px; background: rgba(240,199,126,.12); border: 1px solid rgba(240,199,126,.35); font-size: .92rem; }
.bt-banner.is-il { background: rgba(183,124,255,.12); border-color: rgba(183,124,255,.4); }

/* ---------- stage ---------- */
.bt-stage { position: relative; margin: 16px 0 6px; height: clamp(260px, 46vw, 380px); border-radius: 18px; overflow: hidden;
    background: #07061a; box-shadow: inset 0 0 0 1px var(--b-line), inset 0 10px 40px rgba(0,0,0,.6); }
.bt-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bt-readout { position: absolute; left: 16px; top: 14px; pointer-events: none; text-shadow: 0 1px 8px rgba(0,0,0,.8); max-width: var(--bt-band, 40%); overflow-wrap: break-word; }
.bt-band { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--b-band); }
#bt-band-sym { font-family: Georgia, serif; font-size: 1.15rem; letter-spacing: 0; text-transform: none; }
.bt-beat { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 2.3rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bt-beat small { font-size: .9rem; margin-left: 4px; color: var(--b-muted); }
.bt-ears { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .72rem; color: var(--b-muted); margin-top: 2px; }
.bt-ears .l { color: var(--b-left); } .bt-ears .r { color: var(--b-right); }
.bt-lore { font-family: Georgia, serif; font-style: italic; font-size: .9rem; color: var(--b-ink); opacity: .85; margin-top: 6px; }
.bt-breathe { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); pointer-events: none;
    font-family: Georgia, serif; font-style: italic; font-size: 1.05rem; letter-spacing: .08em; color: var(--b-ink); opacity: .85; text-shadow: 0 0 10px rgba(0,0,0,.9); }
.bt-journey-tag { position: absolute; right: 14px; top: 14px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--b-muted);
    background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 12px; border: 1px solid var(--b-line); pointer-events: none;
    max-width: var(--bt-band, 40%); white-space: normal; text-align: right; line-height: 1.35; }
/* what the DJ does, in the dark band right of the figure, up to two minutes each */
.bt-stage-msg { position: absolute; right: 14px; bottom: 16px; max-width: var(--bt-band, 40%); pointer-events: none;
    font-family: Georgia, serif; font-style: italic; font-size: .92rem; line-height: 1.4; color: var(--b-ink); text-align: right;
    text-shadow: 0 1px 10px rgba(0,0,0,.95); overflow-wrap: break-word; opacity: 0; transform: translateY(6px); transition: opacity .8s ease, transform .8s ease; }
.bt-stage-msg.is-in { opacity: .92; transform: none; }
.bt-stage-msg::before { content: "\266B  "; font-style: normal; color: var(--b-accent); }
/* phones: the bands are too narrow, so the words sit on a dark glass strip at the foot of the stage */
#beats-app.is-tight-stage .bt-stage-msg { left: 10px; right: 10px; bottom: 10px; max-width: none; text-align: left; font-size: .82rem;
    background: rgba(5,4,15,.72); padding: 6px 10px; border-radius: 10px; }
#beats-app.is-tight-stage .bt-journey-tag { max-width: 46%; }
.bt-stage-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 78px; height: 78px; border-radius: 50%;
    border: 1px solid rgba(240,199,126,.5); background: radial-gradient(circle at 50% 40%, rgba(240,199,126,.28), rgba(240,199,126,.08));
    color: var(--b-accent); cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 40px rgba(240,199,126,.2); transition: transform .2s ease, opacity .3s ease; }
.bt-stage-play svg { width: 34px; height: 34px; fill: currentColor; margin-left: 4px; }
.bt-stage-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.beats.is-playing .bt-stage-play { opacity: 0; pointer-events: none; }

/* ---------- tabs ---------- */
.bt-tabs { display: flex; gap: 4px; margin: 14px 0 0; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--b-line); overflow-x: auto; scrollbar-width: none; }
.bt-tabs::-webkit-scrollbar { display: none; }
.bt-tab { flex: 1 0 auto; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--b-muted); cursor: pointer; font-size: 14px !important; white-space: nowrap; }
.bt-tab:hover { color: var(--b-ink); }
.bt-tab[aria-selected="true"] { background: rgba(255,255,255,.1); color: var(--b-ink); box-shadow: inset 0 0 0 1px rgba(240,199,126,.35); }
.bt-tab.has-dot::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--b-accent); margin-left: 6px; vertical-align: middle; box-shadow: 0 0 6px var(--b-accent); }
.bt-panel { padding: 16px 2px 4px; }

/* ---------- buttons & fields ---------- */
.bt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
    border: 1px solid var(--b-line); background: rgba(255,255,255,.06); color: var(--b-ink) !important; text-decoration: none !important;
    cursor: pointer; font-size: 14px !important; line-height: 1.2; white-space: nowrap; transition: background .2s ease; }
.bt-btn:hover { background: rgba(255,255,255,.12); }
.bt-btn.is-accent { background: var(--b-accent); color: var(--b-accent-ink) !important; border-color: var(--b-accent); }
.bt-btn.is-accent:hover { background: #f6d595; }
.bt-btn.is-quiet { background: none; border-color: transparent; color: var(--b-muted) !important; padding: 6px 8px; }
.bt-btn.is-quiet:hover { color: var(--b-ink) !important; }
.bt-btn.is-dashed { width: 100%; border-style: dashed; background: none; color: var(--b-muted) !important; margin-top: 8px; }
.bt-btn.is-dashed:hover { color: var(--b-ink) !important; border-color: rgba(238,232,246,.3); }
.bt-btn.is-big { padding: 11px 20px; font-size: 15px !important; }
.bt-lockmark { font-size: .8em; }
.bt-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.bt-row.bt-wrap { flex-wrap: wrap; align-items: flex-end; }
.bt-row.bt-center { justify-content: center; }
.bt-row input[type="text"] { flex: 1 1 auto; min-width: 0; }
.bt-field { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; color: var(--b-muted); }
#beats-app input[type="text"], #beats-app input[type="number"], #beats-app input[type="time"], #beats-app select, #beats-app textarea {
    width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--b-line); background: rgba(255,255,255,.06); color: var(--b-ink); }
#beats-app input[type="time"] { color-scheme: dark; }
#beats-app select option { color: #222; }
#beats-app textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; resize: vertical; margin: 8px 0; }
.bt-help { font-size: .88rem; color: var(--b-muted); margin: 0 0 12px !important; }
.bt-note { font-size: .82rem; color: var(--b-accent); min-height: 1.1em; }
.bt-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.bt-sub-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 10px; }
.bt-sub-head:first-child { margin-top: 0; }
.bt-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bt-keys { margin-top: 16px; color: var(--b-muted); }
#beats-app kbd { font-family: ui-monospace, Menlo, monospace; font-size: .75rem; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--b-line); background: rgba(255,255,255,.06); }

/* ---------- range sliders ---------- */
#beats-app input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 2px 0 0; cursor: pointer; --fill: var(--b-accent); }
#beats-app input[type="range"]:focus { outline: none; }
#beats-app input[type="range"]:focus-visible { outline: 2px solid var(--b-accent); outline-offset: 2px; border-radius: 6px; }
#beats-app input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--fill) var(--value, 0%), rgba(255,255,255,.13) var(--value, 0%)); }
#beats-app input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.13); }
#beats-app input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--fill); }
#beats-app input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--b-ink); border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
#beats-app input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--b-ink); border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* ---------- presets ---------- */
.bt-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-cat { border: 1px solid var(--b-line); background: var(--b-tile); color: var(--b-muted); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 13px !important; }
.bt-cat:hover { color: var(--b-ink); }
.bt-cat[aria-pressed="true"] { background: var(--b-accent); color: var(--b-accent-ink); border-color: var(--b-accent); }
.bt-cat.is-premium { border-color: rgba(183,124,255,.45); }
.bt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px 6px 2px 0;
    scrollbar-width: thin; scrollbar-color: rgba(240,199,126,.35) transparent; overscroll-behavior: contain; }
.bt-cards::-webkit-scrollbar { width: 8px; }
.bt-cards::-webkit-scrollbar-thumb { background: rgba(240,199,126,.3); border-radius: 8px; }
.bt-card { position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px 16px; border-radius: 14px;
    border: 1px solid var(--b-line); background: var(--b-tile); color: var(--b-ink); cursor: pointer; overflow: hidden; transition: background .2s ease, border-color .2s ease, transform .15s ease; }
.bt-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--b-band)); box-shadow: 0 0 12px var(--c, var(--b-band)); }
.bt-card:hover { background: var(--b-tile-on); border-color: rgba(238,232,246,.25); transform: translateY(-1px); }
.bt-card[aria-pressed="true"] { border-color: var(--b-accent); background: linear-gradient(160deg, rgba(240,199,126,.14), rgba(255,255,255,.04)); }
.bt-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bt-card-name { font-family: Georgia, serif; font-size: 1rem; line-height: 1.2; }
.bt-card-hz { flex: 0 0 auto; font-family: ui-monospace, Menlo, monospace; font-size: .72rem; padding: 2px 7px; border-radius: 99px; color: var(--c, var(--b-band)); background: rgba(0,0,0,.3); border: 1px solid color-mix(in srgb, var(--c, #b77cff) 40%, transparent); }
.bt-card-d { font-size: .8rem; color: var(--b-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bt-card-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: .7rem; color: var(--b-muted); text-transform: uppercase; letter-spacing: .06em; }
.bt-card-tags span { opacity: .85; }
.bt-card.is-locked { opacity: .62; }
.bt-card.is-locked .bt-card-name::after { content: "  \1F512"; font-size: .75em; }
.bt-empty { color: var(--b-muted); font-size: .9rem; padding: 10px 0; }

/* ---------- guide ---------- */
.bt-intents { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bt-intent { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--b-line);
    background: var(--b-tile); color: var(--b-ink); cursor: pointer; text-align: left; transition: background .2s ease, border-color .2s ease; }
.bt-intent:hover { background: var(--b-tile-on); }
.bt-intent[aria-pressed="true"] { border-color: var(--b-accent); background: linear-gradient(160deg, rgba(240,199,126,.16), rgba(255,255,255,.04)); }
.bt-intent-icon { font-size: 1.35rem; line-height: 1; color: var(--c, var(--b-accent)); text-shadow: 0 0 12px var(--c, var(--b-accent)); }
.bt-intent-name { font-family: Georgia, serif; font-size: 1rem; }
.bt-intent-d { font-size: .75rem; color: var(--b-muted); line-height: 1.3; }
.bt-intent.is-locked { opacity: .6; }
.bt-intent.is-locked .bt-intent-name::after { content: " \1F512"; font-size: .75em; }
.bt-guide-go { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 14px 0 6px; }
.bt-guide-go .bt-field { min-width: 150px; }
.bt-log { list-style: none; margin: 10px 0 0; padding: 0; font-size: .85rem; color: var(--b-muted); max-height: 210px; overflow: auto; }
.bt-log li { padding: 5px 0 5px 64px; position: relative; border-bottom: 1px solid var(--b-line); }
.bt-log li:first-child { color: var(--b-ink); }
.bt-log time { position: absolute; left: 0; top: 5px; font-family: ui-monospace, Menlo, monospace; font-size: .75rem; color: var(--b-accent); }

/* ---------- studio ---------- */
.bt-layers { display: flex; flex-direction: column; gap: 10px; }
.bt-layer { padding: 12px 14px; border-radius: 14px; background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.025)); border: 1px solid var(--b-line); }
.bt-layer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bt-layer-n { font-family: ui-monospace, Menlo, monospace; font-size: .75rem; color: var(--b-muted); flex: 0 0 auto; }
#beats-app .bt-layer-head select { flex: 1 1 auto; width: auto; min-width: 0; }
.bt-x { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--b-line); background: none; color: var(--b-muted); cursor: pointer; font-size: 18px !important; line-height: 1; }
.bt-x:hover { color: #ff9a8f; border-color: rgba(255,154,143,.4); }
.bt-layer-grid { display: grid; grid-template-columns: 1.1fr 1.6fr 1fr; gap: 12px 16px; align-items: start; }
.bt-ctl { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--b-muted); min-width: 0; }
.bt-ctl-top { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.bt-ctl-top b { font-family: ui-monospace, Menlo, monospace; font-weight: normal; color: var(--b-ink); font-size: .85rem; }
.bt-stepper { display: flex; gap: 4px; align-items: center; }
#beats-app .bt-stepper input { text-align: center; padding: 6px 4px; font-family: ui-monospace, Menlo, monospace; }
.bt-stepper button { flex: 0 0 auto; width: 30px; height: 32px; border-radius: 8px; border: 1px solid var(--b-line); background: rgba(255,255,255,.06); color: var(--b-ink); cursor: pointer; font-size: 16px !important; line-height: 1; padding: 0; }
.bt-stepper button:hover { background: rgba(255,255,255,.14); }
#beats-app .bt-tune { font-size: 12px; padding: 5px 6px; }
.bt-bandkeys { display: flex; gap: 4px; margin-top: 2px; }
.bt-bandkey { flex: 1 1 0; padding: 3px 0; border-radius: 6px; border: 1px solid var(--b-line); background: none; color: var(--c); cursor: pointer; font-family: Georgia, serif; font-size: 14px !important; }
.bt-bandkey:hover, .bt-bandkey[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); }
.bt-earline { font-family: ui-monospace, Menlo, monospace; font-size: .72rem; color: var(--b-muted); margin-top: 8px; }
.bt-earline .l { color: var(--b-left); } .bt-earline .r { color: var(--b-right); }
.bt-sliders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.bt-slider { padding: 8px 12px 10px; border-radius: 12px; background: var(--b-tile); border: 1px solid transparent; transition: background .2s ease, border-color .2s ease; }
.bt-slider.is-on { background: var(--b-tile-on); border-color: color-mix(in srgb, var(--c, #f0c77e) 40%, transparent); }
.bt-slider-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .9rem; }
.bt-slider-top span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.bt-slider-top span:first-child::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--b-accent)); box-shadow: 0 0 8px var(--c, var(--b-accent)); opacity: .5; }
.bt-slider.is-on .bt-slider-top span:first-child::before { opacity: 1; }
.bt-slider-top small { font-family: ui-monospace, Menlo, monospace; color: var(--b-muted); font-size: .72rem; }
.bt-slider input[type="range"] { --fill: var(--c, var(--b-accent)) !important; }
.bt-slider select { margin-top: 4px; }
.bt-slider.is-locked { opacity: .55; cursor: pointer; }
.bt-slider.is-locked .bt-slider-top span:first-child::after { content: " \1F512"; font-size: .75em; }
.bt-slider-hint { font-size: .72rem; color: var(--b-muted); margin-top: 2px; }

/* ---------- journey ---------- */
.bt-timeline { position: relative; height: 170px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--b-line); overflow: hidden; }
.bt-timeline svg { display: block; width: 100%; height: 100%; }
.bt-steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: step; }
.bt-step { display: grid; grid-template-columns: 26px 1fr 1fr 1fr 34px; gap: 8px; align-items: end; padding: 6px 0; border-bottom: 1px solid var(--b-line); }
.bt-step::before { counter-increment: step; content: counter(step); font-family: ui-monospace, Menlo, monospace; color: var(--b-muted); font-size: .8rem; padding-bottom: 9px; }
.bt-step.is-now::before { color: var(--b-accent); content: "\25B6"; }
.bt-step .bt-field span { font-size: .72rem; }

/* ---------- session, mixes ---------- */
.bt-tool { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(0,0,0,.2); border: 1px solid var(--b-line); }
.bt-tool h3 { margin-bottom: 8px; }
.bt-tool.is-locked { background: linear-gradient(160deg, rgba(183,124,255,.1), rgba(0,0,0,.18)); border-color: rgba(183,124,255,.3); }
.bt-panel > .bt-tool:first-child { margin-top: 0; }
.bt-stats { font-size: .92rem; }
.bt-stats strong { color: var(--b-accent); font-weight: 600; }
.bt-streak { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.bt-streak i { width: 14px; height: 14px; border-radius: 4px; background: rgba(255,255,255,.07); }
.bt-streak i.is-on { background: var(--b-accent); box-shadow: 0 0 6px rgba(240,199,126,.5); }
.bt-streak i.is-today { outline: 1px solid var(--b-accent); }
.bt-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.bt-list li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--b-line); font-size: .9rem; }
.bt-list li:last-child { border-bottom: 0; }
.bt-list .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-list .meta { font-family: ui-monospace, Menlo, monospace; font-size: .72rem; color: var(--b-muted); }
.bt-list .empty { color: var(--b-muted); }
.bt-embed { margin-top: 10px; font-size: .88rem; color: var(--b-muted); }
.bt-embed summary { cursor: pointer; }
.bt-circle { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--b-line); }

/* ---------- DJ ---------- */
.bt-dj-tag { font-family: Georgia, serif; font-style: italic; font-size: .98rem; color: var(--b-muted); margin: 0 0 12px !important; letter-spacing: .01em; }
.bt-drawer { margin-top: 18px; border-top: 1px solid var(--b-line); padding-top: 12px; }
.bt-drawer > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--b-muted); }
.bt-drawer > summary::-webkit-details-marker { display: none; }
.bt-drawer > summary::before { content: "\25B8"; color: var(--b-accent); transition: transform .2s ease; }
.bt-drawer[open] > summary::before { transform: rotate(90deg); }
.bt-drawer > summary h3 { display: inline; }
.bt-drawer[open] > summary { margin-bottom: 12px; }

/* ---------- programmes ---------- */
.bt-programmes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.bt-prog { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--b-line);
    background: var(--b-tile); color: var(--b-ink); cursor: pointer; text-align: left; transition: background .2s ease, border-color .2s ease; }
.bt-prog:hover { background: var(--b-tile-on); border-color: rgba(240,199,126,.35); }
.bt-prog.is-active { border-color: var(--b-accent); background: linear-gradient(160deg, rgba(240,199,126,.14), rgba(255,255,255,.03)); }
.bt-prog.is-locked { opacity: .62; }
.bt-prog-sym { flex: 0 0 auto; width: 30px; text-align: center; font-family: Georgia, serif; font-size: 1.4rem; line-height: 1.1; color: var(--b-accent); text-shadow: 0 0 12px rgba(240,199,126,.45); }
.bt-prog-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.bt-prog-name { font-family: Georgia, serif; font-size: .98rem; line-height: 1.2; padding-right: 92px; }
.bt-prog-d { font-size: .76rem; color: var(--b-muted); line-height: 1.3; }
.bt-prog-tag { position: absolute; top: 10px; right: 10px; font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; color: var(--b-accent); padding: 2px 7px; border-radius: 99px; border: 1px solid rgba(240,199,126,.35); white-space: nowrap; }
.bt-prog-tag:empty { display: none; }
.bt-prog:has(.bt-prog-tag:empty) .bt-prog-name { padding-right: 0; }
.bt-prog.is-locked .bt-prog-tag { color: #c9a8ff; border-color: rgba(183,124,255,.45); }
.bt-pdots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 6px 0 12px; }
.bt-pdots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(240,199,126,.25); }
.bt-pdots i.is-on { background: var(--b-accent); border-color: var(--b-accent); box-shadow: 0 0 8px rgba(240,199,126,.55); }
.bt-pdots i.is-now { border-color: var(--b-accent); animation: bt-led 2.4s ease-in-out infinite; }
.bt-pdots.is-many { gap: 3px; }
.bt-pdots.is-many i { width: 8px; height: 8px; }
.bt-myprog { padding: 10px 0; border-bottom: 1px solid var(--b-line); }
.bt-myprog:last-child { border-bottom: 0; }
.bt-myprog-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bt-myprog-head strong { font-family: Georgia, serif; font-weight: normal; font-size: 1rem; }
.bt-myprog .bt-pdots { justify-content: flex-start; margin: 8px 0 2px; }
.bt-myprog .bt-row { margin: 6px 0 0; }
.bt-oldcerts { font-size: .82rem; color: var(--b-muted); margin-top: 8px !important; }
.bt-ptier { font-size: .75rem !important; text-transform: uppercase; letter-spacing: .08em; color: var(--b-accent) !important; }
.bt-pform { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; text-align: left; margin: 4px 0 10px; }
.bt-check { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .86rem; color: var(--b-muted); margin-bottom: 4px; cursor: pointer; }
.bt-check input { accent-color: var(--b-accent); width: 16px; height: 16px; }

/* ---------- me ---------- */
.bt-kudos { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--b-accent); }
.bt-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.bt-badges span { font-size: .78rem; color: var(--b-muted); padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--b-line); }
.bt-badges b { color: var(--b-accent); font-weight: 600; }
.bt-j-ico { flex: 0 0 auto; width: 18px; text-align: center; color: var(--b-accent); }
.bt-tool > .bt-sub-head { margin: 0 0 8px; }

/* ---------- sheets: done, messages, certificates ---------- */
.bt-sheet.is-wide { width: min(780px, calc(100% - 24px)); top: 60px; }
.bt-done-kudos { color: var(--b-accent) !important; font-size: .85rem !important; }
.bt-done-prog { margin: 4px 0 10px; }
.bt-done-prog p { margin-bottom: 8px !important; }
#bt-modal-body { text-align: center; }
.bt-modal-steps { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.bt-modal-steps:empty { display: none; }
.bt-modal-steps i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.2); }
.bt-modal-steps i.is-on { background: var(--b-accent); }
.bt-banner.is-gift { background: linear-gradient(100deg, rgba(183,124,255,.18), rgba(240,199,126,.14)); border-color: rgba(240,199,126,.5); box-shadow: 0 0 24px rgba(183,124,255,.18); }
.bt-cert-art { border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.5); margin: 6px 0 10px; line-height: 0; }
.bt-cert-art svg { width: 100%; height: auto; display: block; }
.bt-cert-check { font-size: .84rem !important; color: #8fd6a0 !important; }
.bt-cert-check.is-bad { color: #ff9a8f !important; }
#bt-cert-own input { max-width: 320px; text-align: center; }
.bt-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bt-help-panel { display: flex; flex-direction: column; gap: 8px; }
.bt-help-panel[hidden] { display: none !important; }
.bt-hd { border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid var(--b-line); padding: 0 14px; }
.bt-hd > summary { cursor: pointer; list-style: none; padding: 11px 0; font-family: Georgia, serif; font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.bt-hd > summary::-webkit-details-marker { display: none; }
.bt-hd > summary::before { content: "\25B8"; color: var(--b-accent); transition: transform .2s ease; }
.bt-hd[open] > summary::before { transform: rotate(90deg); }
.bt-hd p, .bt-hd ul { font-size: .88rem; color: var(--b-muted); margin: 0 0 12px !important; line-height: 1.55; }
.bt-hd ul { padding-left: 1.2em; }
.bt-hd li { margin: 4px 0; }
.bt-hd strong, .bt-hd em { color: var(--b-ink); }
.bt-keylist { list-style: none; padding-left: 0 !important; }
.bt-keylist kbd { min-width: 1.6em; display: inline-block; text-align: center; margin-right: 4px; }

/* ---------- teaser ---------- */
.bt-teaser { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(160deg, rgba(183,124,255,.14), rgba(240,199,126,.06)); border: 1px solid rgba(183,124,255,.35); }
.bt-teaser h2::after { content: " \1F512"; font-size: .8em; }
.bt-teaser ul { margin: 10px 0 14px; padding-left: 1.2em; font-size: .9rem; color: var(--b-muted); }
.bt-teaser li { margin: 5px 0; }
.bt-teaser strong { color: var(--b-ink); font-weight: 600; }

/* ---------- sheets ---------- */
.bt-sheet { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); z-index: 20; width: min(460px, calc(100% - 24px));
    padding: 24px 22px 18px; border-radius: 20px; text-align: center;
    background: radial-gradient(120% 80% at 50% 0%, rgba(183,124,255,.25), transparent 60%), linear-gradient(170deg, #1b1442, #0d0a24);
    border: 1px solid rgba(240,199,126,.35); box-shadow: 0 30px 60px rgba(0,0,0,.6); animation: bt-rise .35s ease; }
@keyframes bt-rise { from { opacity: 0; transform: translate(-50%, 14px); } }
.bt-sheet-x { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border: 0; background: none; color: var(--b-muted); font-size: 24px !important; cursor: pointer; }
.bt-done-sym { font-family: Georgia, serif; font-size: 2.6rem; color: var(--b-accent); text-shadow: 0 0 20px rgba(240,199,126,.5); line-height: 1; margin-bottom: 6px; }
.bt-sheet h2 { margin-bottom: 8px !important; }
.bt-sheet p { font-size: .92rem; color: var(--b-muted); margin: 0 0 12px !important; }
.bt-done-cta { margin: 6px 0 4px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--b-line); }
.bt-done-cta p { margin-bottom: 10px !important; color: var(--b-ink); }

/* ---------- footer, toast ---------- */
#bt-meta { text-align: center; margin-top: 14px; font-size: .78rem; color: var(--b-muted); opacity: .75; }
#bt-meta:hover { opacity: 1; }
#bt-meta a { color: inherit; text-decoration: none; }
#bt-version { font-family: ui-monospace, Menlo, Consolas, monospace; margin-left: 6px; }
.bt-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 13px 24px; border-radius: 16px;
    background: linear-gradient(160deg, #4a3592, #2a1d5c); color: #fff8ea; font-weight: 500; letter-spacing: .01em; line-height: 1.35;
    border: 1.5px solid #f0c77e; font-size: 16.5px; box-shadow: 0 0 0 4px rgba(240,199,126,.14), 0 0 28px rgba(240,199,126,.45), 0 12px 32px rgba(0,0,0,.45);
    text-shadow: 0 1px 2px rgba(0,0,0,.35); opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease; z-index: 10000; max-width: calc(100% - 32px); text-align: center; }
.bt-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- embed ---------- */
.beats.is-embed { margin: 0 auto; border-radius: 16px; }
.beats.is-embed .bt-stage { height: clamp(220px, 40vw, 320px); }

/* ---------- fullscreen (desktop only) ----------
   The stage takes the whole left side at full height; the tabs and
   their panels scroll on their own down the right. */
#beats-app.is-fs { max-width: none; width: 100%; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; overflow: hidden;
    padding: 18px 28px 10px; display: grid; grid-template-columns: minmax(0, 1fr) clamp(470px, 36vw, 680px);
    grid-template-rows: minmax(0, 1fr) auto; column-gap: 28px; box-shadow: none; }
#beats-app.is-fs .bt-main { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
#beats-app.is-fs .bt-stage { flex: 1 1 auto; height: auto; min-height: 280px; margin-bottom: 0; }
#beats-app.is-fs .bt-side { grid-column: 2; grid-row: 1 / span 2; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 8px 16px 2px; scrollbar-width: thin; scrollbar-color: rgba(240,199,126,.3) transparent; }
#beats-app.is-fs .bt-side::-webkit-scrollbar { width: 8px; }
#beats-app.is-fs .bt-side::-webkit-scrollbar-thumb { background: rgba(240,199,126,.3); border-radius: 8px; }
#beats-app.is-fs .bt-tabs { position: sticky; top: 0; z-index: 3; margin-top: 0; background: #120e2c; box-shadow: 0 8px 16px -8px rgba(5,4,15,.9); }
#beats-app.is-fs .bt-tab { padding: 9px 8px; }
#beats-app.is-fs .bt-cards { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
#beats-app.is-fs #bt-meta { grid-column: 1; grid-row: 2; margin-top: 8px; }
#beats-app.is-fs .bt-readout { left: 24px; top: 20px; }
#beats-app.is-fs .bt-beat { font-size: 3.4rem; }
#beats-app.is-fs .bt-band { font-size: .9rem; }
#beats-app.is-fs .bt-ears { font-size: .82rem; }
#beats-app.is-fs .bt-lore { font-size: 1.05rem; }
#beats-app.is-fs .bt-breathe { font-size: 1.35rem; bottom: 28px; }
#beats-app.is-fs .bt-stage-play { width: 96px; height: 96px; }
#beats-app.is-fs .bt-sheet { top: 18vh; }
#beats-app:fullscreen::backdrop { background: #0c0a22; }

/* ---------- small screens ---------- */
@media (max-width: 680px) {
    #beats-app { padding: 16px 12px 12px; border-radius: 16px; margin: 1rem 0; }
    .bt-console { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .bt-deck { justify-self: center; }
    .bt-dials { flex-direction: row; }
    .bt-dial { flex: 1 1 0; }
    .bt-title { font-size: 1.3rem; }
    .bt-beat { font-size: 1.8rem; }
    .bt-lore { display: none; }
    .bt-readout { max-width: 75%; }
    .bt-layer-grid { grid-template-columns: 1fr 1fr; }
    .bt-layer-grid .bt-ctl.is-beat { grid-column: 1 / -1; order: -1; }
    .bt-grid3 { grid-template-columns: 1fr; }
    .bt-cards { grid-template-columns: 1fr; max-height: 62vh; }
    .bt-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; gap: 2px; }
    .bt-tab { padding: 8px 0; font-size: 12.5px !important; }
    .bt-tab.has-dot::after { margin-left: 2px; }
    .bt-sheet.is-wide { top: 40px; }
    .bt-pform { grid-template-columns: 1fr 1fr; }
    .bt-programmes { grid-template-columns: 1fr; }
    .bt-sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bt-step { grid-template-columns: 22px 1fr 1fr 1fr 30px; gap: 6px; }
    .bt-row-head { flex-direction: column; }
    .bt-sheet { top: 60px; }
}
@media (max-width: 380px) {
    .bt-sliders { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .beats.is-playing #bt-play .rk-led { animation: none; }
    .bt-toast, .bt-card, .bt-sheet { transition: none; animation: none; }
}
