:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dark: #0284c7;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ok: #22c55e;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  /* Lock the page: no scroll, no rubber-band bounce while dragging sliders */
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  user-select: none;
  -webkit-user-select: none;
}

.hidden { display: none !important; }

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  overflow-y: auto; /* scrolls internally on short screens; page itself never moves */
}

header { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.logo { font-size: 2rem; font-weight: 700; }
.logo-small { font-size: 1.3rem; font-weight: 700; flex: 1; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--danger); }
.dot.on { background: var(--ok); }

.icon-btn {
  font-size: 1.6rem; background: var(--card); border: none; color: var(--text);
  border-radius: 14px; width: 56px; height: 56px;
}

section label, .volume-block label { font-size: 1.05rem; color: var(--muted); display: block; margin-bottom: 6px; }

/* Big fat sliders — easy to hit while half-attending */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 56px; background: transparent; margin: 0;
  touch-action: none; /* the drag belongs to the slider, never to page scroll */
}
input[type=range]::-webkit-slider-runnable-track {
  height: 18px; border-radius: 9px; background: var(--card);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); margin-top: -13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.vol-marks { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }

.modes { display: flex; gap: 10px; }
.mode-btn {
  flex: 1; font-size: 1rem; line-height: 1.5; padding: 14px 4px;
  background: var(--card); color: var(--text); border: 3px solid transparent; border-radius: 16px;
}
.mode-btn.active { border-color: var(--accent); background: #164e63; }

.big-btn {
  font-size: 1.3rem; font-weight: 600; padding: 18px; width: 100%;
  border: none; border-radius: 16px; color: #fff; background: var(--card);
}
.big-btn.primary { background: var(--accent-dark); }
.big-btn.warn { background: var(--warn); color: #111; }
.big-btn.mute { background: var(--card); }
.big-btn.mute.active { background: var(--danger); }

.small-btn {
  font-size: 1rem; padding: 10px 18px; border: none; border-radius: 12px;
  background: var(--card); color: var(--text);
}

.overlay {
  position: fixed; inset: 0; background: var(--bg); z-index: 10;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
.overlay-card { max-width: 420px; width: 100%; text-align: center; }
.wizard-card { text-align: left; background: var(--card); padding: 20px; border-radius: 20px; }
.wizard-card h2 { margin: 0 0 4px; }
.wizard-card input[type=range]::-webkit-slider-runnable-track { background: #0f172a; }

.fine { color: var(--muted); font-size: .85rem; }

select {
  width: 100%; font-size: 1.05rem; padding: 14px;
  background: var(--card); color: var(--text);
  border: none; border-radius: 12px;
  -webkit-appearance: none; appearance: none;
}
.mic-block .fine { margin: 6px 0 0; }

.footer-row { text-align: center; margin-top: 4px; }
.link-btn {
  background: none; border: none; color: var(--accent);
  font-size: .85rem; text-decoration: underline; padding: 8px;
}

.banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}

/* Vertical EQ sliders */
.eq-row { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.eq-band { display: flex; flex-direction: column; align-items: center; flex: 1; }
.eq-band input[type=range] {
  writing-mode: vertical-lr; direction: rtl;
  width: 44px; height: 130px;
}
.eq-band input[type=range]::-webkit-slider-runnable-track { width: 18px; }
.eq-band input[type=range]::-webkit-slider-thumb { margin: 0 0 0 -13px; }
.eq-band span { font-size: .75rem; color: var(--muted); margin-top: 4px; }

.wiz-nav { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.wiz-nav .big-btn { flex: 1; }
output { color: var(--text); float: right; }
