:root {
  --bg: #0d1b2a;
  --fg: #f8f9fa;
  --accent: #ffd23f;
  --accent2: #3fd97e;
  --danger: #ff5252;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
}
main { width: 100%; max-width: 480px; padding: 20px 16px 40px; }
header { text-align: center; margin-bottom: 28px; }
h1 { font-size: 2rem; }
.tag { opacity: .75; margin-top: 6px; }

.screen { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
.screen[hidden] { display: none; }

.big {
  width: 100%;
  padding: 28px;
  font-size: 2rem;
  font-weight: 800;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  touch-action: manipulation;
  color: #0d1b2a;
}
.primary { background: var(--accent); }
.primary:active { transform: scale(.98); }
.mute { background: var(--accent2); }
.mute.muted { background: var(--danger); color: #fff; }
.small {
  align-self: center;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: var(--fg);
  padding: 8px 20px;
  border-radius: 10px;
  font-size: .9rem;
}

.hint, .note { text-align: center; opacity: .8; line-height: 1.5; }
.note { font-size: .9rem; color: var(--accent); }

.devrow { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
select {
  font-size: 1.1rem;
  padding: 14px;
  border-radius: 12px;
  background: #1b263b;
  color: var(--fg);
  border: 1px solid rgba(255,255,255,.25);
}

.error-box {
  background: #3a1117;
  border: 2px solid var(--danger);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vu-wrap { display: flex; flex-direction: column; gap: 8px; }
.vu-label { font-weight: 700; letter-spacing: .1em; font-size: .85rem; opacity: .8; }
.vu {
  height: 36px;
  background: #1b263b;
  border-radius: 10px;
  overflow: hidden;
}
#vu-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent), var(--danger));
  transition: width 60ms linear;
}

.slider-row { display: flex; flex-direction: column; gap: 10px; }
.slider-row label { font-weight: 700; display: flex; justify-content: space-between; }
input[type=range] {
  width: 100%;
  height: 48px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 6px;
  background: #1b263b;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -12px;
}
input[type=range]::-moz-range-track { height: 12px; border-radius: 6px; background: #1b263b; }
input[type=range]::-moz-range-thumb { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--accent); }

.toggle-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  padding: 10px 0;
}
.toggle-row input { width: 28px; height: 28px; accent-color: var(--accent); }
