:root {
  --room: #1a1714;
  --room2: #2b241d;
  --text: #ece4d6;
  --muted: #a99d8b;
  --body: #e9dcc0;
  --body2: #cdb98f;
  --edge: #8f7a55;
  --ink: #3b2a17;
  --plate: #3b2a17;
  --plate-ink: #f1e3c4;
  --screen: #1d2318;
  --screen2: #10140c;
  --lcd: #c8f08a;
  --lcd-dim: rgba(200, 240, 138, .18);
  --led: #ff4a2a;
  --led-ok: #4dff7a;
  --btn: #f6ecd6;
  --btn-ink: #3b2a17;
  --metal1: #f4f4f2;
  --metal2: #9a9a98;
}

body[data-skin="black"] {
  --body: #2a2b2e; --body2: #141517; --edge: #000; --ink: #d9d9d9; --plate: #d8d8d8; --plate-ink: #141517;
  --screen: #0c1418; --screen2: #050a0c; --lcd: #7fe3ff; --lcd-dim: rgba(127, 227, 255, .16);
  --btn: #3a3c41; --btn-ink: #eee;
}

body[data-skin="green"] {
  --body: #3d8f4c; --body2: #23652f; --edge: #164a20; --ink: #effbe9; --plate: #10351a; --plate-ink: #dff7d3;
  --screen: #161a14; --screen2: #0a0c09; --lcd: #ffcf5a; --lcd-dim: rgba(255, 207, 90, .16);
  --btn: #d9efd2; --btn-ink: #10351a;
}

body[data-skin="red"] {
  --body: #c23a33; --body2: #7c1d1a; --edge: #4d0f0d; --ink: #fff0ec; --plate: #f4e6c8; --plate-ink: #5a1512;
  --screen: #1a1414; --screen2: #0c0909; --lcd: #ff9e7a; --lcd-dim: rgba(255, 158, 122, .16);
  --btn: #f4e6c8; --btn-ink: #5a1512;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(900px 500px at 50% -120px, var(--room2) 0%, var(--room) 70%) no-repeat, var(--room);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: #e8c88f; }

.room { max-width: 460px; margin: 0 auto; padding: 10px 16px 24px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.logo { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.topr { display: flex; align-items: center; gap: 8px; }
.topr select { max-width: 150px; }
.lang { color: var(--muted); text-decoration: none; border: 1px solid #4a4036; border-radius: 6px; padding: 3px 8px; font-size: 13px; }
.inst { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 10px 16px; cursor: pointer; background: linear-gradient(#ffd34d, #f0a83c); color: #2a1c08; border: 2px solid #8a5a14; border-radius: 12px; box-shadow: 0 3px 0 #6b440c, 0 6px 18px rgba(0, 0, 0, .4); text-align: left; }
.inst:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b440c; }
.inst[hidden] { display: none; }
.inst-i { font-size: 28px; line-height: 1; }
.inst-t { display: flex; flex-direction: column; gap: 1px; }
.inst-t b { font: 800 17px/1.1 system-ui, sans-serif; }
.inst-t small { font: 600 12px/1.2 system-ui, sans-serif; opacity: .8; }
.inst-help { max-width: min(420px, calc(100vw - 32px)); border: 0; border-radius: 12px; padding: 20px; background: var(--room2); color: var(--text); font-family: system-ui, sans-serif; }
.inst-help::backdrop { background: rgba(0, 0, 0, .6); }
.inst-help h2 { margin: 0 0 10px; font-size: 18px; }
.inst-help p { margin: 0 0 16px; line-height: 1.5; }
.inst-help button { float: right; cursor: pointer; background: var(--body); color: var(--ink); border: 1px solid var(--edge); border-radius: 6px; padding: 6px 18px; font-weight: 700; }

select {
  background: #2a241e; color: var(--text); border: 1px solid #4a4036; border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 13px;
}

.pedal {
  position: relative;
  border-radius: 22px;
  padding: 26px 18px 22px;
  background: linear-gradient(160deg, var(--body) 0%, var(--body2) 100%);
  border: 2px solid var(--edge);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 -3px 0 rgba(0, 0, 0, .25) inset, 0 18px 40px rgba(0, 0, 0, .55);
  color: var(--ink);
}

.screw {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--metal1), var(--metal2));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 6px; height: 2px; background: rgba(0, 0, 0, .45); transform: rotate(35deg); }
.s1 { top: 10px; left: 10px; } .s2 { top: 10px; right: 10px; } .s3 { bottom: 10px; left: 10px; } .s4 { bottom: 10px; right: 10px; }

.jacks { display: flex; justify-content: space-between; padding: 0 22px; font-size: 10px; font-weight: 700; letter-spacing: .12em; opacity: .7; margin-top: -14px; }

.brandplate {
  margin: 6px auto 14px; width: max-content; padding: 4px 14px 5px; border-radius: 4px;
  background: var(--plate); color: var(--plate-ink); text-align: center; line-height: 1.1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3), 0 -1px 0 rgba(0, 0, 0, .3);
}
.brandplate b { display: block; font: 800 20px/1.1 Georgia, "Times New Roman", serif; letter-spacing: .18em; }
.brandplate small { font-size: 9px; letter-spacing: .3em; }

.screen {
  position: relative;
  border-radius: 10px;
  padding: 8px 10px 10px;
  background: radial-gradient(120% 90% at 50% 0%, var(--screen) 0%, var(--screen2) 100%);
  border: 3px solid #0a0a0a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .15), inset 0 6px 14px rgba(0, 0, 0, .7);
  color: var(--lcd);
}

.meter { display: block; width: 100%; height: auto; }
.tick { stroke: var(--lcd); stroke-width: 1.4; opacity: .55; }
.tick.big { stroke-width: 2.4; opacity: .85; }
.tick.zero { stroke: var(--led-ok); stroke-width: 3.2; opacity: 1; }
.mlab { fill: var(--lcd); font: 600 11px system-ui, sans-serif; opacity: .7; }
.mlab.mid { text-anchor: middle; }
.mlab.end { text-anchor: end; }
#needle { stroke: var(--lcd); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--lcd)); transition: opacity .3s; }
#needle.idle { opacity: .35; }
.hub { fill: #111; stroke: var(--lcd); stroke-width: 2; }

.readout { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -6px; padding: 0 6px; }
.note { font: 700 64px/1 "Courier New", ui-monospace, monospace; text-shadow: 0 0 10px var(--lcd-dim), 0 0 2px var(--lcd); min-width: 2ch; }
.note sub { font-size: 22px; vertical-align: baseline; margin-left: 2px; opacity: .8; }
.info { display: flex; flex-direction: column; align-items: flex-end; font: 600 15px/1.35 "Courier New", ui-monospace, monospace; opacity: .9; }

.screen.tuned .note, .screen.tuned #needle { color: var(--led-ok); stroke: var(--led-ok); text-shadow: 0 0 12px rgba(77, 255, 122, .5); }

.leds { display: flex; justify-content: center; gap: 6px; margin: 10px 0 2px; }
.leds i {
  width: 16px; height: 9px; border-radius: 3px; background: #3a0d08; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7);
}
.leds i.c { background: #0c3a17; width: 22px; }
.leds i.on { background: var(--led); box-shadow: 0 0 8px var(--led), 0 0 2px #fff inset; }
.leds i.c.on { background: var(--led-ok); box-shadow: 0 0 10px var(--led-ok), 0 0 2px #fff inset; }

.msg { min-height: 20px; text-align: center; font: 700 13px/20px system-ui, sans-serif; letter-spacing: .12em; opacity: .85; }

.strings { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.strings[hidden] { display: none; }
.strings button {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--btn) 45%, var(--body2) 100%);
  color: var(--btn-ink); font: 800 16px/1 system-ui, sans-serif; box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center; padding: 0; white-space: nowrap;
}
.strings button sub { font-size: 10px; font-weight: 700; line-height: 0; opacity: .75; margin-left: 1px; }
.strings button.act { box-shadow: 0 0 0 3px var(--led-ok), 0 0 14px var(--led-ok); }
.strings button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }

.knobs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.knobs label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.knobs select { width: 100%; background: var(--btn); color: var(--btn-ink); border-color: var(--edge); font-weight: 600; }
.knobs .wide { grid-column: 1 / -1; }
.diag { margin-top: -4px; font: 600 11px/1.4 system-ui, sans-serif; opacity: .75; overflow-wrap: anywhere; }
.a4 { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; letter-spacing: .1em; }
.a4 b { font: 700 20px "Courier New", ui-monospace, monospace; min-width: 3ch; text-align: center; }
.a4 button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--edge); background: var(--btn); color: var(--btn-ink); font: 800 18px/1 system-ui; cursor: pointer; }

.row2 { display: flex; gap: 10px; margin: 14px 0 6px; }
.row2 button[hidden] { display: none; }
.toggle {
  flex: 1; padding: 8px 6px; border-radius: 8px; border: 2px solid var(--edge); background: var(--btn); color: var(--btn-ink);
  font: 700 12px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; position: relative; padding-left: 22px;
}
.toggle::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #5a1a10; }
.toggle.on::before { background: var(--led); box-shadow: 0 0 6px var(--led); }

.switchwrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.statusled { width: 12px; height: 12px; border-radius: 50%; background: #4a120b; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.pedal.on .statusled { background: var(--led); box-shadow: 0 0 10px var(--led); }
.pedal.on .statusled.tuned { background: var(--led-ok); box-shadow: 0 0 12px var(--led-ok); }
.footswitch {
  width: 86px; height: 86px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 50% 50%, #6d6d6b 0%, #2c2c2b 70%);
  box-shadow: 0 6px 0 #111, 0 10px 18px rgba(0, 0, 0, .5);
  display: flex; align-items: center; justify-content: center;
}
.footswitch span {
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--metal1) 0%, #c9c9c7 40%, var(--metal2) 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .6), inset 0 -3px 6px rgba(0, 0, 0, .25);
}
.footswitch:active, .footswitch[aria-pressed="true"] { transform: translateY(3px); box-shadow: 0 3px 0 #111, 0 6px 12px rgba(0, 0, 0, .5); }
.switchwrap small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 18px 4px 6px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 380px) {
  .note { font-size: 52px; }
  .strings button { width: 40px; height: 40px; }
}

.strobe { display: block; width: 100%; height: auto; margin-bottom: 4px; }
.strobe[hidden] { display: none; }

body[data-skin="studio"] {
  --room: #0e1013; --room2: #161a20; --body: #15181d; --body2: #15181d; --edge: #262b33; --ink: #c9d1dc;
  --plate: transparent; --plate-ink: #7d8794; --screen: #0b0d10; --screen2: #0b0d10; --lcd: #f2f5f8; --lcd-dim: rgba(255, 255, 255, .06);
  --led: #ff5d5d; --led-ok: #00e0a0; --btn: #1e2228; --btn-ink: #dfe5ec;
}
body[data-skin="studio"] .pedal { border-radius: 30px; border-width: 1px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
body[data-skin="studio"] .screw, body[data-skin="studio"] .jacks { display: none; }
body[data-skin="studio"] .brandplate { box-shadow: none; margin-top: -8px; }
body[data-skin="studio"] .brandplate b { font: 300 15px/1.2 system-ui, sans-serif; letter-spacing: .5em; }
body[data-skin="studio"] .screen { border: 0; box-shadow: none; border-radius: 22px; }
body[data-skin="studio"] .note { font: 200 84px/1 system-ui, sans-serif; text-shadow: none; }
body[data-skin="studio"] .info { font: 400 14px/1.4 system-ui, sans-serif; color: #8d97a4; }
body[data-skin="studio"] #needle { filter: none; stroke-width: 2; }
body[data-skin="studio"] .tick { opacity: .25; }
body[data-skin="studio"] .leds i { border-radius: 50%; width: 7px; height: 7px; background: #262b33; box-shadow: none; }
body[data-skin="studio"] .leds i.c { width: 9px; height: 9px; background: #1d3a31; }
body[data-skin="studio"] .strings button { background: #1e2228; border: 1px solid #2f353e; color: #dfe5ec; box-shadow: none; }
body[data-skin="studio"] .strings button.act { background: #00e0a0; color: #06231a; box-shadow: none; }
body[data-skin="studio"] .toggle, body[data-skin="studio"] .a4 button, body[data-skin="studio"] .knobs select { border-width: 1px; border-radius: 12px; }
body[data-skin="studio"] .footswitch { width: 76px; height: 76px; background: #1e2228; box-shadow: 0 0 0 1px #2f353e; }
body[data-skin="studio"] .footswitch span { width: 34px; height: 34px; background: none; border: 3px solid #7d8794; border-top-color: transparent; box-shadow: none; position: relative; }
body[data-skin="studio"] .footswitch span::after { content: ""; position: absolute; left: 50%; top: -9px; width: 3px; height: 17px; margin-left: -1.5px; background: #7d8794; border-radius: 2px; }
body[data-skin="studio"] .pedal.on .footswitch span { border-color: #00e0a0; border-top-color: transparent; }
body[data-skin="studio"] .pedal.on .footswitch span::after { background: #00e0a0; }
body[data-skin="studio"] .footswitch[aria-pressed="true"] { transform: none; }

body[data-skin="analog"] {
  --room: #1b120b; --room2: #2e1d10; --body: #7a4a26; --body2: #4a2a13; --edge: #2e190a; --ink: #f6e7c8;
  --plate: linear-gradient(180deg, #e9c877, #b38a3a); --plate-ink: #3a2408;
  --screen: #f4ecd6; --screen2: #e3d5b0; --lcd: #222; --lcd-dim: transparent; --led: #e02a12; --led-ok: #1f8f3a;
  --btn: #efe1bd; --btn-ink: #3a2408;
}
body[data-skin="analog"] .pedal {
  background: repeating-linear-gradient(97deg, rgba(0, 0, 0, .08) 0 3px, transparent 3px 11px), linear-gradient(160deg, var(--body), var(--body2));
  border-radius: 14px;
}
body[data-skin="analog"] .brandplate { background: var(--plate); }
body[data-skin="analog"] .brandplate b { font-family: Georgia, serif; font-style: italic; }
body[data-skin="analog"] .screen { border: 6px solid #2a1a0c; border-radius: 6px; box-shadow: inset 0 0 30px rgba(120, 80, 20, .35), 0 0 0 2px #c9a253; color: #222; }
body[data-skin="analog"] #needle { stroke: #b3170a; filter: drop-shadow(2px 3px 1px rgba(0, 0, 0, .3)); stroke-width: 2.2; }
body[data-skin="analog"] .hub { fill: #222; stroke: #222; }
body[data-skin="analog"] .tick { stroke: #222; opacity: .8; }
body[data-skin="analog"] .tick.zero { stroke: #1f8f3a; }
body[data-skin="analog"] .mlab { fill: #222; font-family: Georgia, serif; }
body[data-skin="analog"] .note, body[data-skin="analog"] .info { font-family: Georgia, "Times New Roman", serif; text-shadow: none; }
body[data-skin="analog"] .leds i { border-radius: 50%; width: 10px; height: 10px; background: #7a1a0c; }
body[data-skin="analog"] .leds i.c { width: 12px; height: 12px; background: #1d4a26; }
body[data-skin="analog"] .screen.tuned .note { color: #1f8f3a; text-shadow: none; }
body[data-skin="analog"] .footswitch { background: radial-gradient(circle, #e6c46d 0%, #8a6524 75%); box-shadow: 0 6px 0 #2e190a, 0 10px 18px rgba(0, 0, 0, .5); }

body[data-skin="neon"] {
  --room: #0b0220; --room2: #2a0a4a; --body: #12052b; --body2: #090117; --edge: #ff2bd6; --ink: #f6d8ff;
  --plate: transparent; --plate-ink: #00f0ff; --screen: #0d0326; --screen2: #050012; --lcd: #00f0ff; --lcd-dim: rgba(0, 240, 255, .45);
  --led: #ff2bd6; --led-ok: #7dff4a; --btn: #1a0838; --btn-ink: #ffd1f6;
}
body[data-skin="neon"] .pedal { box-shadow: 0 0 18px rgba(255, 43, 214, .55), inset 0 0 22px rgba(255, 43, 214, .25); border-radius: 8px; }
body[data-skin="neon"] .screw { display: none; }
body[data-skin="neon"] .jacks { color: #ff2bd6; }
body[data-skin="neon"] .brandplate { box-shadow: none; }
body[data-skin="neon"] .brandplate b { font: italic 900 28px/1 system-ui, sans-serif; letter-spacing: .08em; color: #ff2bd6; text-shadow: 0 0 8px #ff2bd6, 0 0 24px #ff2bd6; }
body[data-skin="neon"] .brandplate small { color: #00f0ff; text-shadow: 0 0 6px #00f0ff; }
body[data-skin="neon"] .screen {
  border: 1px solid #00f0ff; box-shadow: 0 0 14px rgba(0, 240, 255, .5), inset 0 0 30px rgba(0, 240, 255, .15);
  background: linear-gradient(transparent 60%, rgba(255, 43, 214, .18)), repeating-linear-gradient(90deg, rgba(255, 43, 214, .14) 0 1px, transparent 1px 30px), repeating-linear-gradient(0deg, rgba(255, 43, 214, .14) 0 1px, transparent 1px 30px), #0d0326;
}
body[data-skin="neon"] .note { font: italic 900 70px/1 system-ui, sans-serif; text-shadow: 0 0 10px #00f0ff, 0 0 30px #00f0ff; }
body[data-skin="neon"] .strings button { background: #1a0838; color: #00f0ff; border: 1px solid #00f0ff; box-shadow: 0 0 8px rgba(0, 240, 255, .6); }
body[data-skin="neon"] .strings button.act { background: #ff2bd6; color: #12052b; border-color: #ff2bd6; box-shadow: 0 0 16px #ff2bd6; }
body[data-skin="neon"] .toggle, body[data-skin="neon"] .a4 button, body[data-skin="neon"] .knobs select { border: 1px solid #ff2bd6; box-shadow: 0 0 6px rgba(255, 43, 214, .5); }
body[data-skin="neon"] .footswitch { background: #1a0838; box-shadow: 0 0 0 2px #ff2bd6, 0 0 20px #ff2bd6; }
body[data-skin="neon"] .footswitch span { background: radial-gradient(circle at 40% 35%, #fff, #00f0ff 60%, #006b80); box-shadow: 0 0 14px #00f0ff; }
