:root {
  --bg: #121316;
  --bg2: #1b1d22;
  --card: #1e2127;
  --line: #2f333b;
  --text: #e8e6e1;
  --muted: #9a9ca3;
  --acc: #ff8a1f;
  --acc2: #ffb35c;
  --ok: #4fd67a;
  --mid: #e6c73c;
  --bad: #ff4d3d;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(1000px 520px at 50% -160px, #2a2219 0%, var(--bg) 70%) no-repeat, var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--acc2); }

.wrap { max-width: 760px; margin: 0 auto; padding: 12px 16px 28px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.lang { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 13px; }

.hero h1 { font-size: 28px; line-height: 1.2; margin: 18px 0 8px; }
.hero p { margin: 0 0 8px; color: #cfccc5; }
.hero .beta { color: var(--muted); font-size: 13px; }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 18px;
  margin: 16px 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

.card h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 10px; }
.card h2 b {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--acc); color: #1a1006; font-size: 15px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 0; }
.row.end { justify-content: flex-end; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 14px; margin: 12px 0; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.grid .wide { grid-column: 1 / -1; }

select, input[type="text"], textarea {
  font: inherit; color: var(--text); background: #14161a; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%;
}
textarea { resize: vertical; }

.btn {
  font: inherit; font-weight: 600; color: var(--text); background: #2a2e36; border: 1px solid #3a3f49; border-radius: 9px;
  padding: 9px 16px; cursor: pointer;
}
.btn:hover:not(:disabled) { background: #333843; }
.btn.main { background: var(--acc); border-color: var(--acc); color: #1a1006; }
.btn.main:hover:not(:disabled) { background: var(--acc2); }
.btn:disabled { opacity: .45; cursor: default; }

.err { color: var(--bad); }
.ok { color: var(--ok); }

.meter { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.bar { position: relative; flex: 1; height: 16px; border-radius: 8px; background: #0d0e10; border: 1px solid var(--line); overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--ok); transition: width 60ms linear; }
.bar i.mid { background: linear-gradient(90deg, var(--ok) 70%, var(--mid)); }
.bar i.hot { background: linear-gradient(90deg, var(--ok) 60%, var(--mid) 80%, var(--bad)); }
.bar i.hold { width: 2px; background: #fff; opacity: .7; transition: none; }
.db { min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.clip { font-size: 12px; font-weight: 800; padding: 2px 7px; border-radius: 5px; background: #3a1512; color: #7a3a33; letter-spacing: .06em; }
.clip.on { background: var(--bad); color: #fff; box-shadow: 0 0 12px var(--bad); }

.hint { margin: 6px 0; font-size: 14px; }
.hint.lvlOk { color: var(--ok); }
.hint.lvlLow, .hint.lvlNone { color: var(--mid); }
.hint.lvlHot { color: var(--bad); }
.diag { color: var(--muted); font-size: 12px; font-family: ui-monospace, Consolas, monospace; margin: 6px 0 0; }

.warn { background: #3a2410; border: 1px solid #6b4318; color: #ffd6a8; border-radius: 9px; padding: 9px 12px; margin: 6px 0 10px; }

.sw { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.sw input { width: 20px; height: 20px; accent-color: var(--acc); }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.vol input { width: 180px; accent-color: var(--acc); }

.loop { display: flex; align-items: center; justify-content: center; gap: 0; margin: 6px 0 12px; }
.loop .box { border: 1px solid #4a4f59; background: #16181c; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.loop .cable { width: 90px; height: 22px; border: 3px solid var(--acc); border-top: none; border-radius: 0 0 40px 40px; margin: 12px -2px 0; }
.steps { margin: 0 0 6px; padding-left: 22px; color: #cfccc5; }
.steps li { margin: 4px 0; }
.progress { color: var(--acc2); font-variant-numeric: tabular-nums; }

.result { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.big { font-size: 46px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: 18px; margin-left: 6px; color: var(--muted); font-weight: 600; }
.verdict { margin: 8px 0; font-weight: 600; }
.verdict.great { color: var(--ok); }
.verdict.playable { color: #a6e06a; }
.verdict.noticeable { color: var(--mid); }
.verdict.toomuch { color: var(--bad); }
.runs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.runs li { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #14161a; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.runs li.bad { color: var(--bad); }
.tips { margin: 8px 0 0; padding-left: 20px; color: #cfccc5; font-size: 14px; }
.tips li { margin: 5px 0; }

.report { font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.45; white-space: pre; overflow: auto; margin-top: 6px; }

.dlg { max-width: 420px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.dlg::backdrop { background: rgba(0, 0, 0, .6); }
.dlg h2 { margin: 0 0 8px; font-size: 19px; }

.foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 520px) {
  .hero h1 { font-size: 23px; }
  .vol input { width: 140px; }
  .loop .cable { width: 50px; }
}

.src, .presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0; }
.lbl { color: var(--muted); font-size: 13px; min-width: 92px; }
.seg { display: inline-flex; border: 1px solid #3a3f49; border-radius: 9px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; color: var(--text); background: #2a2e36; border: none; border-right: 1px solid #3a3f49; padding: 7px 13px; cursor: pointer; }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--acc); color: #1a1006; font-weight: 700; }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.file { position: relative; overflow: hidden; font-size: 14px; padding: 7px 13px; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.board { display: grid; grid-auto-flow: row dense; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; margin-top: 14px; }
.pedal {
  --c: #888;
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 70%, #000));
  border-radius: 12px; padding: 10px 11px 12px; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px rgba(0, 0, 0, .4);
}
.pedal .ph { display: flex; align-items: center; justify-content: space-between; }
.pedal .ph b { font-size: 14px; letter-spacing: .04em; white-space: nowrap; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.pedal .led { width: 11px; height: 11px; border-radius: 50%; background: #3b0d0a; border: 1px solid rgba(0, 0, 0, .5); }
.pedal.on .led { background: #ff3b2a; box-shadow: 0 0 10px #ff3b2a; }
.pedal .sub { font-size: 12px; opacity: .85; }
.knob { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 6px; font-size: 12px; }
.knob span { opacity: .92; }
.knob output { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.knob input { grid-column: 1 / -1; width: 100%; accent-color: #1d1f24; margin: 2px 0 0; }
.pedal .fs {
  margin: auto auto 0; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 40% 35%, #f4f4f2, #8d8d8b 70%); border: 3px solid #4d4d4b;
  box-shadow: 0 3px 0 #2b2b2a, 0 5px 8px rgba(0, 0, 0, .45);
}
.pedal .fs:active { transform: translateY(2px); box-shadow: 0 1px 0 #2b2b2a; }
.pedal:not(.on) { filter: saturate(.55) brightness(.82); }
.pedal.mini { justify-content: flex-start; }
.pedal.eq { grid-column: span 2; color: #24211b; }
.pedal.eq .ph b { text-shadow: none; }
.pedal.eq .led { border-color: rgba(0, 0, 0, .35); }
.bands { display: flex; justify-content: space-between; gap: 2px; padding: 4px 2px 2px; }
.band { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; font-size: 11px; }
.band output { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; }
.band span { font-weight: 700; font-size: 10.5px; }
.band input { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 118px; margin: 0; accent-color: #24211b; }
.band:last-child { border-left: 1px solid rgba(0, 0, 0, .18); padding-left: 3px; }
