:root {
  --bg: #17110e;
  --surface: #241a15;
  --surface-2: #32261f;
  --surface-press: #3b2d24;
  --text: #f7ede1;
  --muted: #b5a191;
  --line: #4a3a30;
  --accent: #ff6b2c;
  --accent-text: #ff8a57;
  --on-accent: #17110e;
  --focus: #ffbd4a;
  --chip-bg: #2f231c;
  --chip-ink: #f7ede1;
  --chip-count: #b5a191;
  --glow: rgba(255, 107, 44, .16);
  --rig-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
  --display: 'Bagel Fat One', 'Arial Black', system-ui, sans-serif;
  --body: 'Rethink Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root[data-look="cats"] {
  --bg: #16121f;
  --surface: #221c31;
  --surface-2: #30284a;
  --surface-press: #3a3157;
  --text: #f4eefb;
  --muted: #b6abcb;
  --line: #4a4062;
  --accent: #ff7a9a;
  --accent-text: #ff8fab;
  --on-accent: #16121f;
  --focus: #ffc04d;
  --chip-bg: #2c2540;
  --chip-ink: #f4eefb;
  --chip-count: #b6abcb;
  --glow: rgba(255, 192, 77, .13);
}
:root[data-look="apple"] {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-press: #e5e5ea;
  --text: #000000;
  --muted: #636366;
  --line: rgba(60, 60, 67, .2);
  --accent: #0066cc;
  --accent-text: #0066cc;
  --on-accent: #ffffff;
  --focus: #0066cc;
  --chip-bg: rgba(118, 118, 128, .12);
  --chip-ink: #000000;
  --chip-count: #636366;
  --glow: transparent;
  --rig-shadow: 0 24px 50px -28px rgba(0, 0, 0, .55);
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-look="apple"]:not([data-appearance="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #1c1c1e;
    --surface-press: #2c2c2e;
    --text: #ffffff;
    --muted: #aeaeb2;
    --line: rgba(84, 84, 88, .6);
    --accent: #0a6fe0;
    --accent-text: #4da3ff;
    --focus: #4da3ff;
    --chip-bg: rgba(118, 118, 128, .24);
    --chip-ink: #ffffff;
    --chip-count: #aeaeb2;
    color-scheme: dark;
  }
}
:root[data-look="apple"][data-appearance="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #1c1c1e;
  --surface-press: #2c2c2e;
  --text: #ffffff;
  --muted: #aeaeb2;
  --line: rgba(84, 84, 88, .6);
  --accent: #0a6fe0;
  --accent-text: #4da3ff;
  --focus: #4da3ff;
  --chip-bg: rgba(118, 118, 128, .24);
  --chip-ink: #ffffff;
  --chip-count: #aeaeb2;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--bg); }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(130% 55% at 50% 105%, var(--glow), transparent 62%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
[data-look="apple"] body { background: var(--bg); font-size: 17px; -webkit-font-smoothing: antialiased; }
[data-look="cats"] body { background: var(--bg); }
[data-look="cats"] body { isolation: isolate; }
[data-look="cats"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(130% 55% at 50% 105%, rgba(255, 192, 77, .18), transparent 62%),
    radial-gradient(90% 40% at 50% -5%, rgba(255, 122, 154, .14), transparent 60%);
  transform: scale(1.07);
  will-change: transform, filter;
  animation: cats-ambient 40s ease-in-out infinite alternate;
}
@keyframes cats-ambient {
  from { transform: translate3d(-3%, 1.5%, 0) scale(1.07); filter: hue-rotate(-8deg); }
  to { transform: translate3d(3%, -1.5%, 0) scale(1.1); filter: hue-rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  [data-look="cats"] body::before { animation: none; will-change: auto; }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.haptic-switch { display: none; }
.page {
  max-width: 880px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 36px 56px;
  display: grid; gap: 20px;
}
.back-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: -8px 0 -12px -4px; color: var(--muted); font-weight: 700; text-decoration: none; border-radius: 8px; }
.intro { display: grid; gap: 6px; }
h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 10vw, 56px); line-height: 1.02; }
.intro p { margin: 0; max-width: 46ch; color: var(--muted); }
.finder { display: grid; gap: 12px; }
.search { position: relative; display: block; }
.search-icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 100%; min-height: 48px; padding: 10px 14px 10px 44px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.chip-count { font-size: 12.5px; font-weight: 700; color: var(--chip-count); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip[aria-pressed="true"] .chip-count { color: var(--on-accent); }
.chip:active { transform: scale(.96); }
.count { margin: -4px 4px 0; color: var(--muted); font-size: 15px; font-weight: 700; }
.list { display: grid; gap: 10px; }
.list h2 { margin: 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pedal-link {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center;
  min-height: 56px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface-2); color: inherit; text-decoration: none;
  transition: background-color .15s ease;
}
.pedal-link:active { background: var(--surface-press); }
.swatch { width: 34px; height: 42px; border-radius: 6px; background: linear-gradient(180deg, transparent 62%, var(--accent) 62% 70%, transparent 70%), var(--body); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .3); }
.pedal-link-text { min-width: 0; display: grid; gap: 1px; }
.pedal-link-name { font-weight: 800; font-size: 17px; line-height: 1.2; }
.pedal-link-meta { color: var(--muted); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.back-link:focus-visible, .chip:focus-visible, .pedal-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) {
  .chip:hover { border-color: var(--muted); }
  .pedal-link:hover { background: var(--surface-press); }
}
[data-look="apple"] .page { padding-block: 24px 56px; }
[data-look="apple"] h1 { font-weight: 700; font-size: 34px; line-height: 1.12; letter-spacing: -.02em; }
[data-look="apple"] .back-link { color: var(--accent-text); font-weight: 400; font-size: 17px; }
[data-look="apple"] .search input { border: 0; border-radius: 12px; background: var(--chip-bg); }
[data-look="apple"] .chip { border: 0; font-weight: 600; }
[data-look="apple"] .list h2 { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
[data-look="apple"] .list ul { gap: 0; border-radius: 14px; overflow: hidden; }
[data-look="apple"] .pedal-link { border-radius: 0; }
[data-look="apple"] .list li + li .pedal-link { background-image: linear-gradient(var(--line), var(--line)); background-size: calc(100% - 60px) 1px; background-position: right top; background-repeat: no-repeat; }
[data-look="apple"] .pedal-link-name { font-weight: 600; }
[data-look="apple"] .pedal-link:focus-visible { outline-offset: -3px; }
.rig { position: relative; min-width: 0; }
.board-frame {
  padding: 9px; border-radius: 20px;
  background:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 9px, rgba(255, 210, 160, .05) 9px 10px, transparent 10px 17px),
    linear-gradient(180deg, #4a2c1a, #2a170c 60%, #1f1109);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, .22), inset 0 -2px 0 rgba(0, 0, 0, .5), var(--rig-shadow);
}
.board {
  position: relative; overflow: hidden;
  padding: 14px 24px 34px; border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .4) 0 1px, transparent 1px 3px),
    radial-gradient(120% 70% at 50% 0%, #26262b, #141417 70%);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(255, 255, 255, .05);
  color: #e9e9ee;
  -webkit-user-select: none; user-select: none;
}
.psu {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px; margin-bottom: 30px; border-radius: 8px;
  background: linear-gradient(180deg, #2f3137, #17181b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 5px 0 -1px #060607, 0 10px 16px -6px rgba(0, 0, 0, .9);
}
.psu-led { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #4dff8a; box-shadow: 0 0 0 2px rgba(77, 255, 138, .2), 0 0 10px 2px rgba(77, 255, 138, .6); }
.psu-brand { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #c9ccd3; white-space: nowrap; }
.psu-brand b { color: #4dff8a; }
.psu-outs { display: flex; gap: 6px; margin-left: auto; }
.psu-out { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle, #000 0 32%, #7a7d84 36%, #3a3c42 72%); box-shadow: 0 1px 0 rgba(255, 255, 255, .12); }
.pedals {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  column-gap: 34px; row-gap: 46px; justify-items: center;
}
.board-empty { position: relative; z-index: 2; margin: 0; padding: 48px 0 24px; text-align: center; color: #a7a7b0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.cables { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
.cable path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cable-shadow { stroke: rgba(0, 0, 0, .55); stroke-width: 8; transform: translateY(3px); }
.cable-core { stroke: var(--cable); stroke-width: 5; }
.cable-shine { stroke: rgba(255, 255, 255, .32); stroke-width: 1.4; transform: translateY(-1.2px); }
.cable.power .cable-shadow { stroke-width: 5; }
.cable.power .cable-core { stroke-width: 3; }
.cable.power .cable-shine { stroke: rgba(255, 255, 255, .14); stroke-width: .8; }
.board.is-live .sway { animation: cable-sag 3.6s ease-in-out var(--delay) infinite alternate; }
@keyframes cable-sag {
  from { transform: scaleY(1); }
  to { transform: scaleY(1.16); }
}
.board-tag { font: 800 9px/1 var(--body); letter-spacing: .16em; fill: #a7a7b0; }
.pedal {
  position: relative; display: block; width: 100%; max-width: 156px; aspect-ratio: 100 / 146;
  color: var(--ink); text-decoration: none; cursor: pointer;
  -webkit-touch-callout: none;
}
.pedal.is-treadle { aspect-ratio: 100 / 166; }
.jack { position: absolute; display: block; }
.jack-in, .jack-out { top: 22%; width: 12px; height: 13px; border-radius: 3px; background: linear-gradient(180deg, #e2e4e9, #8d9097 55%, #55585e); box-shadow: 0 2px 3px rgba(0, 0, 0, .6); }
.jack-in { left: -9px; }
.jack-out { right: -9px; }
.jack-dc { top: -6px; left: 50%; width: 12px; height: 9px; margin-left: -6px; border-radius: 3px 3px 0 0; background: #1b1b1e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.pedal-body {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 15% 9% 10%; border-radius: 10px;
  background:
    radial-gradient(circle at 8px 8px, #a6a9b0 0 2px, rgba(0, 0, 0, .35) 2.4px, transparent 3px),
    radial-gradient(circle at calc(100% - 8px) 8px, #a6a9b0 0 2px, rgba(0, 0, 0, .35) 2.4px, transparent 3px),
    radial-gradient(circle at 8px calc(100% - 8px), #a6a9b0 0 2px, rgba(0, 0, 0, .35) 2.4px, transparent 3px),
    radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #a6a9b0 0 2px, rgba(0, 0, 0, .35) 2.4px, transparent 3px),
    linear-gradient(155deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, .16)),
    var(--body);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .3), 0 6px 0 -1px rgba(0, 0, 0, .7), 0 16px 20px -8px rgba(0, 0, 0, .9);
  transition: transform .12s ease;
}
.mini-knobs { display: grid; grid-template-columns: repeat(var(--cols, 3), auto); justify-content: center; gap: 7px 10px; }
.mini-knobs[data-count="1"] { --cols: 1; --k: 34px; }
.mini-knobs[data-count="2"] { --cols: 2; --k: 30px; }
.mini-knobs[data-count="3"] { --cols: 3; --k: 26px; }
.mini-knobs[data-count="4"] { --cols: 2; --k: 22px; gap: 5px 10px; }
.mini-knobs[data-count="5"], .mini-knobs[data-count="6"] { --cols: 3; --k: 19px; gap: 5px 8px; }
.mini-knob {
  position: relative; display: block; width: var(--k); height: var(--k); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .42), transparent 46%), var(--knob);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .28), 0 3px 0 rgba(0, 0, 0, .45);
  transform: rotate(var(--a));
}
.mini-knob::after { content: ""; position: absolute; left: 50%; top: 9%; width: 3px; height: 34%; margin-left: -1.5px; border-radius: 2px; background: var(--body); }
.mini-led { position: absolute; top: 6px; left: 50%; margin-left: -4.5px; display: block; width: 9px; height: 9px; flex: none; border-radius: 50%; background: #4a0d0d; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7), 0 0 0 1.5px rgba(0, 0, 0, .3); transition: background-color .12s ease, box-shadow .12s ease; }
.mini-name {
  display: block; max-width: 100%; padding-bottom: 3px; border-bottom: 3px solid var(--accent);
  font: 900 14px/1.05 'Arial Black', 'Helvetica Neue', Arial, sans-serif; letter-spacing: .01em; text-transform: uppercase; text-align: center;
  color: var(--ink); overflow-wrap: anywhere;
}
.mini-maker { display: block; max-width: 100%; font: 800 8.5px/1.2 'Helvetica Neue', Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; text-align: center; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-switch {
  display: block; flex: none; width: 34px; height: 34px; margin-top: auto; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fbfbfc, #b3b5bb 50%, #6d7077);
  box-shadow: 0 0 0 3px #4f5258, 0 0 0 5px #a3a6ad, 0 4px 0 5px #2a2c31;
  transition: transform .08s ease, box-shadow .08s ease;
}
.pedal.is-pressed .mini-switch, .pedal.is-on .mini-switch { transform: translateY(2px); box-shadow: 0 0 0 3px #4f5258, 0 0 0 5px #a3a6ad, 0 2px 0 5px #2a2c31; }
.pedal.is-on .mini-led { background: #ff3b30; box-shadow: 0 0 0 2px rgba(255, 59, 48, .25), 0 0 12px 3px rgba(255, 59, 48, .75); }
.pedal.is-pressed .pedal-body { transform: translateY(1px); }
.is-treadle .pedal-body { padding: 9% 8% 9%; gap: 8px; }
.mini-treadle {
  display: block; width: 100%; flex: 1; border-radius: 8px;
  background: repeating-linear-gradient(0deg, #2c2c2e 0 3px, #101011 3px 7px);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .12), 0 5px 0 rgba(0, 0, 0, .45);
  transform: perspective(260px) rotateX(10deg);
  transition: transform .12s ease;
}
.pedal.is-pressed .mini-treadle, .pedal.is-on .mini-treadle { transform: perspective(260px) rotateX(18deg); }
.mini-row .mini-led { position: static; margin: 0; }
.mini-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 4px; }
.mini-row .mini-switch { width: 28px; height: 28px; margin: 0 4px 4px 0; }
@media (hover: hover) {
  .pedal:hover .pedal-body { transform: translateY(-2px); }
  .pedal.is-pressed:hover .pedal-body { transform: translateY(1px); }
}
@media (max-width: 420px) {
  .board { padding: 12px 20px 30px; }
  .pedals { column-gap: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .chip:active { transform: none; }
}
