/* prism-fx rack. Layout: a sticky transport bar over two columns, the effect list and the chain.
   Palette: near-black ground, panel green-black, one signal green for anything audio. */
:root {
  color-scheme: dark;
  --ground: #0a0b0a;
  --panel: #111512;
  --panel2: #171c18;
  --line: #242b25;
  --ink: #e8f0e9;
  --muted: #8d998f;
  --sig: #7ce386;
  --sig-dim: #2f5a34;
  --hot: #ff6b5a;
  --link: #8f9dff;
  --f-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-num: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0 }
html { background: var(--ground) }
body { background: var(--ground); color: var(--ink); font: 15px/1.45 var(--f-ui); min-height: 100vh;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 40px }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer; background: none; border: 0 }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px }
.skip { position: absolute; left: -999px } .skip:focus { left: 16px; top: 8px; background: var(--sig); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 9 }

.top { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; max-width: 1480px; margin: 0 auto; padding: 22px 0 18px }
.brand { font-size: 28px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap }
.brand span { color: var(--sig); font-weight: 500 }
.lede { color: #c7d0c8; max-width: 70ch; text-wrap: balance }
.lede b { color: var(--sig); font-family: var(--f-num) }
.back { color: var(--link); text-decoration: none; border-bottom: 1px solid #4a5290; padding-bottom: 1px; white-space: nowrap }
.back:hover { color: #b9c1ff }

.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; max-width: 1480px; margin: 0 auto; display: grid;
  grid-template-columns: auto auto auto auto auto auto 1fr; grid-template-areas: "play src kit byp vol met scope" "chain chain chain chain chain chain chain";
  gap: 10px 14px; align-items: center; background: rgba(10, 11, 10, .92); backdrop-filter: blur(10px); padding: 12px 0; border-bottom: 1px solid var(--line) }
.play { grid-area: play; background: var(--sig); color: #041006; font-weight: 750; border-radius: 999px; padding: 11px 26px; min-width: 96px }
.play.on { background: #e8f0e9 }
.seg { grid-area: src; display: flex; background: var(--panel); border-radius: 999px; padding: 3px; box-shadow: inset 0 0 0 1px var(--line) }
.seg button { padding: 8px 14px; border-radius: 999px; color: var(--muted); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis }
.seg button.on { background: var(--panel2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sig-dim) }
#bypass { grid-area: byp; justify-self: start }
.kit { grid-area: kit; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px }
.kit select { padding: 8px 10px; border-radius: 10px; min-width: 190px; background: var(--panel) }
.kit.off { opacity: .4 }
.pill { border-radius: 999px; padding: 8px 14px; box-shadow: inset 0 0 0 1px #344036; color: var(--muted); font-size: 13.5px; font-weight: 600 }
.pill.on { color: #041006; background: var(--sig); box-shadow: none }
#bypass.on { background: #f2c14e }
.vol { grid-area: vol; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px }
.vol input { width: 110px }
.meter { grid-area: met; display: grid; gap: 4px; width: 90px }
.meter i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--sig) calc(var(--u, 0) * 100%), var(--panel2) 0) }
.meter i.hot { background: linear-gradient(90deg, var(--sig) 80%, var(--hot) 80% calc(var(--u, 0) * 100%), var(--panel2) 0) }
#scope { grid-area: scope; width: 100%; height: 48px; background: var(--panel); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0 }
.chain { grid-area: chain; font: 12.5px var(--f-num); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.note { grid-column: 1 / -1; color: #f2c14e; font-size: 14px } .note:empty { display: none }

.main { max-width: 1480px; margin: 22px auto 0; display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start }
h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650 }
.browser { position: sticky; top: 132px; background: var(--panel); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 150px) }
.bhead { display: flex; justify-content: space-between; align-items: baseline } .bhead span { color: var(--muted); font-size: 13px }
#q { width: 100%; background: var(--ground); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; padding: 10px 12px }
.cats { display: flex; flex-wrap: wrap; gap: 6px }
.cats button { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted) }
.cats button.on { background: var(--sig); color: #041006; box-shadow: none }
.list { list-style: none; overflow: auto; margin: 0 -8px; padding: 0 8px; flex: 1; min-height: 120px }
.list button { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; padding: 9px 8px; border-radius: 9px; gap: 0 8px }
.list button:hover { background: var(--panel2) }
.list b { font-weight: 600; font-size: 14.5px }
.list small { grid-column: 1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.list i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: var(--sig); font-size: 20px; opacity: .45 }
.list button:hover i { opacity: 1 }

.rhead { display: flex; gap: 18px; align-items: baseline; margin-bottom: 12px }
.rhead p { color: var(--muted); font-size: 13.5px; flex: 1 }
.rack { display: grid; gap: 14px }
.empty { background: var(--panel); border-radius: 16px; padding: 40px 28px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line) } .empty b { color: var(--ink) }
.fx { background: var(--panel); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px 14px; transition: opacity .2s }
.fx.off { opacity: .5 }
.fx header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px }
.ttl { flex: 1; min-width: 0 } .ttl b { font-size: 18px; font-weight: 700; display: flex; gap: 10px; align-items: baseline }
.ttl .num { font: 12px var(--f-num); color: var(--sig) }
.ttl small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tele { font: 12.5px var(--f-num); color: #f2c14e }
.acts { display: flex; gap: 6px; align-items: center }
.icon { width: 32px; height: 32px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 16px }
.icon:hover:not(:disabled) { color: var(--ink); background: var(--panel2) } .icon:disabled { opacity: .3; cursor: default }
.body { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start }
.body:not(:has(.padwrap)) { grid-template-columns: 1fr }
.pad { width: 260px; height: 178px; display: block; background: #070907; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--sig-dim); cursor: crosshair; touch-action: none }
.ctls { display: grid; gap: 12px; min-width: 0 }
.grp { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px }
.grp > small { grid-column: 1 / -1; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px }
.grp:first-child > small { border-top: 0; padding-top: 0 }
.ctl { display: grid; grid-template-columns: 96px 1fr 84px; gap: 10px; align-items: center; min-height: 30px }
.ctl.dim { opacity: .35 }
.lab { font-size: 13.5px; color: #cbd5cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ctl output { font: 12.5px var(--f-num); color: var(--sig); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums }
.ctl.toggle, .ctl.choice { grid-template-columns: 96px 1fr }
.ctl .seg { grid-area: auto; justify-self: start } .ctl .seg button { padding: 4px 10px; font-size: 12.5px }
.tog { justify-self: start; padding: 4px 14px; border-radius: 999px; font-size: 12.5px; box-shadow: inset 0 0 0 1px #344036; color: var(--muted) }
.tog[aria-pressed="true"] { background: var(--sig); color: #041006; box-shadow: none }
select { background: var(--ground); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 8px; padding: 5px 8px; max-width: 100% }
.more { margin-top: 12px; color: var(--link); font-size: 13.5px } .more:hover { color: #b9c1ff }
.none { color: var(--muted); font-size: 13px; margin-top: 6px }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; min-width: 0 }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--sig) calc(var(--u, .5) * 100%), #2a332b 0) }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--sig) calc(var(--u, .5) * 100%), #2a332b 0) }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); margin-top: -4px; box-shadow: 0 0 0 3px var(--ground) }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 0 }
#vol { --u: .67 }

.foot { max-width: 1480px; margin: 30px auto 0; color: var(--muted); font-size: 13.5px }
body.drop::after { content: "Drop to play it through the chain"; position: fixed; inset: 12px; border: 2px dashed var(--sig); border-radius: 20px; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: var(--sig); background: rgba(10, 11, 10, .85); z-index: 20 }

@media (max-width: 1100px) {
  .bar { grid-template-columns: auto auto auto 1fr; grid-template-areas: "play src kit byp" "vol met scope scope" "chain chain chain chain" }
  .top { grid-template-columns: 1fr; gap: 8px }
}
@media (max-width: 820px) {
  .main { grid-template-columns: 1fr }
  .browser { position: static; max-height: 360px }
  .body { grid-template-columns: 1fr } .pad { width: 100%; height: 160px }
  .bar { position: static; grid-template-columns: 1fr 1fr; grid-template-areas: "play byp" "src src" "kit kit" "vol met" "scope scope" "chain chain" }
  .kit select { flex: 1 }
  .seg { justify-self: start; max-width: 100%; overflow-x: auto }
}
@media (max-width: 480px) { .ctl { grid-template-columns: 84px 1fr 72px } .grp { grid-template-columns: 1fr } .fx header { flex-wrap: wrap } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }
