:root {
  --lime: #b6ff2e;
  --orange: #ff6b1a;
  --bg: #0b0b0b;
  --card: #141414;
  --card2: #101010;
  --border: #262626;
  --text: #f2f2f2;
  --muted: #a8a8a8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; padding: 0 16px 40px;
  display: flex; flex-direction: column; align-items: center;
}
main { width: 100%; max-width: 560px; }

/* Home bar — matches /432/ */
.homebar { width: 100%; max-width: 560px; display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.hb-brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.4px; display: inline-flex; align-items: center; min-height: 44px; }
.hb-bolt { color: var(--lime); margin-right: 8px; font-size: 1.15rem; }
.hb-brand b { color: var(--lime); }
.hb-nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.92rem; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.hb-nav a:hover { color: var(--lime); }

h1 { text-align: center; font-size: 2.6rem; line-height: 1.05; margin-top: 22px; letter-spacing: 0.5px; }
h1 .hz { color: var(--lime); }
.tag { text-align: center; color: var(--muted); margin-top: 6px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 2px; }
.lede { text-align: center; color: #dcdcdc; line-height: 1.55; margin: 14px auto 0; max-width: 48ch; }
.lede strong { color: var(--text); }

.iphone-card {
  margin-top: 24px; background: rgba(255,107,26,0.07);
  border: 1px solid var(--orange); border-radius: 16px; padding: 18px 20px;
}
.iphone-title { font-weight: 800; font-size: 1.05rem; color: var(--orange); }
.iphone-card p { color: #dcdcdc; line-height: 1.55; margin-top: 6px; font-size: 0.95rem; }
.iphone-card strong { color: var(--text); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 20px; margin-top: 22px;
}
.card-title { font-size: 1.3rem; letter-spacing: 0.3px; }
.card-sub { color: var(--muted); line-height: 1.5; margin-top: 6px; font-size: 0.94rem; }
.card-sub strong { color: #dcdcdc; }
.honest-line { color: var(--muted); line-height: 1.55; font-size: 0.88rem; margin-top: 18px; }

/* --- Music player --- */
.add-btn {
  display: block; text-align: center; margin-top: 16px; cursor: pointer;
  background: var(--lime); color: #000; font-weight: 800; font-size: 1.08rem;
  padding: 16px 20px; border-radius: 12px; min-height: 56px;
}
.add-btn:active { transform: scale(0.98); }
.privacy { text-align: center; margin-top: 12px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.privacy strong { color: var(--lime); }

.track { text-align: center; margin-top: 20px; }
.track .label { color: var(--muted); font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; }
.track .name { font-size: 1.15rem; font-weight: 700; margin-top: 5px; line-height: 1.35; overflow-wrap: anywhere; }
.track .sub { color: var(--muted); font-size: 0.85rem; margin-top: 3px; }

.ab { display: flex; gap: 10px; margin-top: 20px; }
.ab button {
  flex: 1; appearance: none; cursor: pointer; border-radius: 14px; padding: 16px 6px 12px; min-height: 76px;
  background: var(--card2); border: 2px solid var(--border); color: var(--muted);
  font-family: inherit; transition: border-color .15s, color .15s, background .15s, transform .05s;
}
.ab button:active { transform: scale(0.98); }
.ab button .big { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: 0.5px; }
.ab button .small { display: block; font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px; }
.ab button.on-440 { border-color: var(--orange); color: var(--orange); background: rgba(255,107,26,0.08); }
.ab button.on-432 { border-color: var(--lime); color: var(--lime); background: rgba(182,255,46,0.08); }
.now { text-align: center; margin-top: 12px; font-size: 0.95rem; color: var(--muted); min-height: 1.4em; }
.now strong.a440 { color: var(--orange); }
.now strong.a432 { color: var(--lime); }

.transport { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
#playBtn {
  flex: 0 0 auto; width: 68px; height: 68px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--lime); color: #000; font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform .05s, opacity .15s;
}
#playBtn:active { transform: scale(0.96); }
#playBtn:disabled { opacity: 0.45; }
.tbtn {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: var(--card2); border: 1px solid var(--border); color: var(--text); font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}
.tbtn:active { transform: scale(0.96); }
.progress-wrap { flex: 1; min-width: 0; }
.bar { height: 14px; background: #232323; border-radius: 7px; overflow: hidden; cursor: pointer; }
.bar .fill { height: 100%; width: 0%; background: var(--lime); border-radius: 7px; }
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.82rem; margin-top: 6px; font-variant-numeric: tabular-nums; }

.playlist { list-style: none; margin-top: 16px; }
.playlist li { margin-top: 8px; }
.playlist button {
  width: 100%; text-align: left; cursor: pointer; min-height: 48px;
  background: var(--card2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 0.95rem; padding: 12px 14px;
  overflow-wrap: anywhere;
}
.playlist button .idx { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.playlist button.active { border-color: var(--lime); color: var(--lime); }
.playlist button.active .idx { color: var(--lime); }
.status { color: var(--muted); font-size: 0.9rem; margin-top: 12px; min-height: 1.3em; line-height: 1.45; }
.status.error { color: #ff7a7a; }

/* --- Tones & binaural --- */
.freq-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.freq-btn {
  flex: 1 1 30%; min-height: 56px; cursor: pointer; border-radius: 12px;
  background: var(--card2); border: 2px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 1.05rem; font-weight: 800; padding: 12px 4px;
}
.freq-btn .hz-small { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.freq-btn.on { border-color: var(--lime); color: var(--lime); background: rgba(182,255,46,0.08); }
.freq-btn:active { transform: scale(0.97); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.now-small { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.stop-btn, .start-btn {
  flex: 0 0 auto; min-height: 48px; cursor: pointer; border-radius: 10px; padding: 12px 20px;
  font-family: inherit; font-weight: 800; font-size: 0.98rem;
}
.stop-btn { background: transparent; color: #ff7a7a; border: 1px solid #5a2b2b; }
.start-btn { background: var(--lime); color: #000; border: none; }
.start-btn.playing { background: transparent; color: #ff7a7a; border: 1px solid #5a2b2b; }
.stop-btn:active, .start-btn:active { transform: scale(0.97); }

.slider-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.88rem; margin-top: 18px; letter-spacing: 0.4px; }
.slider-val { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.slider { width: 100%; min-height: 40px; accent-color: var(--lime); cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  flex: 1 1 40%; min-height: 52px; cursor: pointer; border-radius: 999px; padding: 12px 10px;
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
}
.chip.on { border-color: var(--orange); color: var(--orange); background: rgba(255,107,26,0.08); }
.chip:active { transform: scale(0.97); }

/* --- CTA / footer --- */
.cta {
  margin-top: 24px; background: var(--card); border: 1px solid var(--lime); border-radius: 16px;
  padding: 26px 22px; text-align: center;
}
.cta h2 { font-size: 1.5rem; }
.cta h2 .hz { color: var(--lime); }
.cta p { color: var(--muted); line-height: 1.55; margin-top: 8px; }
a.btn {
  display: block; margin: 18px auto 4px; background: var(--lime); color: #000; font-weight: 800;
  font-size: 1.1rem; text-decoration: none; padding: 16px 24px; border-radius: 12px; max-width: 360px;
}
a.btn:active { transform: scale(0.98); }

footer { margin-top: 30px; color: #6f6f6f; font-size: 0.8rem; line-height: 1.6; text-align: center; max-width: 60ch; }

/* --- v2 additions --- */
.mini-btn {
  min-height: 44px; cursor: pointer; border-radius: 10px; padding: 10px 14px;
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-weight: 700; font-size: 0.92rem;
}
.mini-btn:active { transform: scale(0.97); }
.mini-select {
  min-height: 44px; border-radius: 10px; padding: 10px 12px;
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 0.95rem;
}
.row-btn { padding: 8px 10px; min-height: 40px; }
.plist-row { display: flex; gap: 8px; align-items: stretch; }
.plist-row > button:first-child { flex: 1; }
#viz { width: 100%; height: 120px; background: #0b0b0b; border: 1px solid var(--border); border-radius: 12px; margin-top: 14px; }
.freq-btn.locked { opacity: 0.55; }
.member-check { display: block; margin-top: 16px; color: #dcdcdc; font-size: 0.92rem; line-height: 1.5; cursor: pointer; }
.member-check input { accent-color: var(--lime); width: 18px; height: 18px; vertical-align: middle; margin-right: 8px; }
.tour {
  position: fixed; inset: 0; background: rgba(0,0,0,0.78); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tour[hidden] { display: none; }
.tour-box {
  background: var(--card); border: 1px solid var(--lime); border-radius: 16px;
  padding: 24px 20px; max-width: 420px; width: 100%;
}
.tour-step { color: #dcdcdc; line-height: 1.6; margin-bottom: 18px; }
.tour-step strong { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  #viz { display: none; }
}
