/* The animations' controls (public/fx-controls.js; registry v3, public/fx.js), shared by the Studio and the panel's
   editor: under the signature a chip per animation with a live sample of it, and "Animations"; a chip opens the tray
   over the conversation (a bottom sheet on a phone – the signature stays in sight), the controls of one animation
   generated from its preset's knobs. Every change animates: chips come and go, the tray slides, values cross-fade,
   thumbs glide. The page's tokens (site.css / styles.css); --fx-brand: his brand colour. */
.st-fx { display: flex; gap: 8px; justify-content: safe center; max-width: 100%; overflow-x: auto; padding: 2px 4px 4px; scrollbar-width: none; cursor: default; --acc: var(--fx-brand, #1d1d1f); }
.st-fx::-webkit-scrollbar { display: none; }
.st-fx[hidden] { display: none; }
.st-fxchip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; max-width: 240px; padding: 0 14px 0 6px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font: 400 .875rem var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; cursor: pointer; transition: transform .15s ease, opacity .2s ease, box-shadow .2s ease; }
.st-fxchip:active { transform: scale(.97); }
.st-fxchip small { color: var(--ink-2); font-size: .8125rem; }
.st-fxchip.off { opacity: .55; }
.st-fxchip.all { padding: 0 14px; gap: 6px; background: var(--ink); color: #fff; box-shadow: none; }
.st-fxchip[hidden] { display: none; }
/* the hand's chip (fx-controls.js mountHintChip): its dot green while the hand plays, its outline firmer */
.st-hintchip { padding: 0 14px 0 12px; gap: 7px; color: var(--ink-2); transition: transform .15s ease, box-shadow .2s ease, color .2s ease; }
.st-hintchip svg { flex: none; transition: opacity .2s ease; opacity: .55; }
.st-hintchip[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.st-hintchip[aria-pressed="true"] svg { opacity: 1; }
.st-hint-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #c7c7cc; transition: background-color .2s ease, transform .3s var(--st-ease, cubic-bezier(.2, 0, 0, 1)); transform: scale(.85); }
.st-hintchip[aria-pressed="true"] .st-hint-dot { background: #30a46c; transform: none; }
.fx-chip-smp { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; overflow: visible; }
.fx-chip-smp > * { zoom: .78; }
.fx-smp-dot { display: block; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #d9dce3, #9aa3b5); }
.fx-smp-pill { display: block; width: 30px; height: 12px; border-radius: 999px; background: var(--acc); }
.fx-smp-text { display: block; font-weight: 650; font-size: 15px; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); --fx-ink: #1d1d1f; }
.fx-smp-row { display: flex; gap: 3px; } .fx-smp-row i { display: block; width: 7px; height: 7px; border-radius: 2px; background: var(--ink); }
.fx-smp-lines { display: grid; gap: 4px; width: 26px; } .fx-smp-lines i { display: block; height: 4px; border-radius: 2px; background: #8e8e93; } .fx-smp-lines i + i { width: 70%; }
.fx-veil { position: absolute; inset: 0; z-index: 8; background: var(--veil, rgba(0, 0, 0, .1)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.fx-veil.on { opacity: 1; pointer-events: auto; }
.fx-tray { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 9; max-height: calc(100% - 20px); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; border-radius: 20px; background: var(--surface); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35), 0 0 0 .5px var(--hair-2); --acc: var(--fx-brand, #1d1d1f);
  transform: translateY(calc(100% + 20px)); opacity: 0; visibility: hidden; transition: transform .35s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), opacity .2s ease, visibility 0s .35s; }
.fx-tray.open { transform: none; opacity: 1; visibility: visible; transition: transform .35s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), opacity .2s ease, visibility 0s; }
.fx-grab { display: none; }
.fx-tray-head { display: flex; align-items: center; gap: 6px; padding: 10px 6px 4px 12px; min-width: 0; }
.fx-tabs { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fx-x { flex: none; align-self: start; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.fx-x:hover { background: var(--bg-2); color: var(--ink); }
.fx-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: var(--bg-2); font: 400 .8125rem var(--sans); color: var(--ink); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.fx-tabs button small { color: var(--ink-2); transition: color .2s ease; }
.fx-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.fx-tabs button[aria-selected="true"] small { color: rgba(255, 255, 255, .7); }
.fx-tabs .fx-chip-smp { background: #fff; }
.fx-body { min-height: 0; overflow-y: auto; scrollbar-width: none; padding-top: 8px; }
.fx-body::-webkit-scrollbar { display: none; }
.fx-order-row { padding: 2px 14px 10px; }
.fx-order-row[hidden] { display: none; }
.fx-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 8px 8px 4px; border-top: .5px solid var(--hair); }
.fx-on { display: flex; align-items: center; gap: 2px; font-size: .8125rem; color: var(--ink-2); }
.fx-del { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: 400 .8125rem var(--sans); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.fx-del:hover { background: var(--bg-2); color: var(--danger, #d92d20); }
.fx-ctl { display: grid; gap: 16px; padding: 4px 14px 10px; transition: opacity .2s ease; }
.fx-ctl.off { opacity: .55; }
.fx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.fx-lbl { font-size: .8125rem; font-weight: 500; }
.fx-val { font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-sld { position: relative; height: 28px; --p: 0; }
.fx-sld-trk { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: #e5e5ea; overflow: hidden; }
.fx-sld-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(11px + var(--p) * (100% - 22px)); border-radius: 2px; background: var(--ink); }
.fx-sld-ticks i { position: absolute; top: 11px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #c7c7cc; pointer-events: none; }
.fx-sld-thumb { position: absolute; top: 3px; left: calc(var(--p) * (100% - 22px)); width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .18); pointer-events: none; transition: transform .15s ease; }
.fx-sld:active .fx-sld-thumb { transform: scale(1.1); }
.fx-sld.glide .fx-sld-fill, .fx-sld.glide .fx-sld-thumb, .fx-sld.stepped .fx-sld-fill, .fx-sld.stepped .fx-sld-thumb { transition: width .3s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), left .3s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), transform .15s ease; }
.fx-sld input { position: absolute; left: 0; right: 0; top: -8px; width: 100%; height: 44px; margin: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; background: none; }
.fx-sld input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 44px; }
.fx-sld input::-moz-range-thumb { width: 22px; height: 44px; border: 0; }
.fx-sld:has(input:focus-visible) .fx-sld-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--focus, #0a66ff); }
.fx-ruler { position: relative; height: 18px; margin-top: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; --beat: var(--ink); }
.fx-beats i { position: absolute; top: 5px; height: 8px; min-width: 4px; border-radius: 4px; background: var(--beat); opacity: 0; transform: scaleY(.3); transition: left .3s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), width .3s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), opacity .2s ease, transform .3s var(--st-ease, cubic-bezier(.2, 0, 0, 1)), background-color .2s ease; }
.fx-beats i.on { opacity: .8; transform: none; }
.fx-head-line { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.fx-head-line::after { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.fx-cap { display: flex; justify-content: space-between; margin-top: 4px; font-size: .6875rem; line-height: 14px; color: var(--ink-3); }
.fx-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-swatches button { position: relative; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); cursor: pointer; transition: transform .15s ease; }
.fx-swatches button:active { transform: scale(.92); }
.fx-swatches button::before { content: ""; position: absolute; inset: -6px; } /* a 44 px hit area */
.fx-swatches button::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); opacity: 0; transform: scale(.85); transition: opacity .2s ease, transform .2s var(--st-ease, cubic-bezier(.2, 0, 0, 1)); }
.fx-swatches button[aria-checked="true"]::after { opacity: 1; transform: none; }
/* .fx-seg, the segmented control (fx-controls.js segmented): gallery.css, which every page with a tray loads too */
.fx-switch { flex: none; width: 48px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.fx-switch i { position: relative; width: 40px; height: 24px; border-radius: 12px; background: #d2d2d7; transition: background-color .2s ease; }
.fx-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .25s var(--st-ease, cubic-bezier(.2, 0, 0, 1)); }
.fx-switch[aria-checked="true"] i { background: var(--ink); }
.fx-switch[aria-checked="true"] i::after { transform: translateX(16px); }
/* in the conversation: "Fine-tune" under an answer, and the quiet note of a change made with the controls */
.st-fine { margin-top: 2px; }
.st-note { font-size: .75rem; line-height: 16px; color: var(--ink-3); text-align: right; padding: 0 4px; }
@media (prefers-reduced-motion: reduce) { .fx-tray, .fx-seg-ind, .fx-sld-thumb, .fx-sld-fill, .fx-beats i { transition-duration: 1ms !important; } }
@media (max-width: 899px) {
  .st-fx { align-self: stretch; justify-content: flex-start; mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .fx-tray { left: 0; right: 0; bottom: 0; max-height: 100%; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .fx-grab { display: grid; place-items: center; height: 14px; padding-top: 6px; }
  .fx-grab i { width: 36px; height: 5px; border-radius: 3px; background: #d2d2d7; }
  .fx-tray-head { padding-top: 4px; }
}
