:root {
    --bg: #0f1115; --surface: #181b22; --surface-2: #20242e; --border: #2b303b;
    --text: #eceef2; --muted: #9198a5; --faint: #626a78;
    --accent: #f59e0b; --accent-dim: #b45309; --accent-soft: rgba(245,158,11,.12);
    --ok: #3fb950; --radius: 14px;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  }
  .wrap { max-width: 720px; margin: 0 auto; padding: 0 20px 60px; }
  header { padding: 30px 0 8px; display: flex; align-items: center; gap: 11px; }
  .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; flex: none; }
  .logo svg { width: 19px; height: 19px; }
  .brand { font-size: 17px; font-weight: 680; letter-spacing: -.01em; }
  .brand span { color: var(--faint); font-weight: 400; font-size: 12px; margin-left: 7px; }
  h1 { font-size: clamp(24px, 6vw, 32px); line-height: 1.2; letter-spacing: -.025em; margin: 20px 0 10px; font-weight: 700; }
  h1 em { font-style: normal; color: var(--accent); }
  .lede { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
  .trust { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 26px; }
  .chip { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; }
  .chip b { color: var(--text); font-weight: 600; }

  .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }

  /* beat display */
  .stage { text-align: center; padding: 26px 18px 20px; }
  .pulse {
    width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 20px;
    background: var(--surface-2); border: 2px solid var(--border);
    display: grid; place-items: center; transition: transform .06s ease, background .06s ease, border-color .06s ease;
  }
  .pulse.on { background: var(--accent-soft); border-color: var(--accent); transform: scale(1.08); }
  .pulse-inner { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
  .pulse.on .pulse-inner { color: var(--accent); }
  .dots { display: flex; justify-content: center; gap: 10px; margin-bottom: 4px; min-height: 16px; }
  .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); transition: background .05s, transform .05s; }
  .dot.first { box-shadow: inset 0 0 0 2px var(--surface-2); }
  .dot.on { background: var(--accent); transform: scale(1.3); }

  /* bpm */
  .bpm-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 14px; }
  .stepper { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 24px; cursor: pointer; line-height: 1; }
  .stepper:active { background: var(--border); }
  .bpm-num { font-size: 62px; font-weight: 720; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; min-width: 150px; text-align: center; }
  .bpm-label { display: block; font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: .12em; margin-top: 6px; }
  input[type=range] { width: 100%; accent-color: var(--accent); margin: 4px 0 2px; }
  .range-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }

  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
  fieldset { border: none; margin: 0; padding: 0; }
  label.fld { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 7px; }
  select, .tap {
    width: 100%; padding: 11px 12px; font-size: 15px; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  }
  .toggle-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
  .toggle-row .t { font-size: 14px; }
  .toggle-row .d { font-size: 12px; color: var(--faint); }
  .switch { position: relative; width: 46px; height: 27px; flex: none; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .slider { position: absolute; inset: 0; background: var(--border); border-radius: 999px; cursor: pointer; transition: .2s; }
  .slider:before { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
  .switch input:checked + .slider { background: var(--accent); }
  .switch input:checked + .slider:before { transform: translateX(19px); }

  .go {
    width: 100%; padding: 17px; font-size: 17px; font-weight: 680; cursor: pointer;
    background: var(--accent); color: #1a1205; border: none; border-radius: 12px; margin-top: 4px;
  }
  .go:active { background: var(--accent-dim); color: #fff; }
  .go.stop { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
  .hint { text-align: center; font-size: 12px; color: var(--faint); margin-top: 12px; }

  h2 { font-size: 19px; letter-spacing: -.02em; margin: 30px 0 14px; }
  .feat { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
  .feat:last-child { border-bottom: none; }
  .feat svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }
  .feat b { display: block; font-size: 14px; font-weight: 620; }
  .feat span { color: var(--muted); font-size: 13px; }

  .pro { background: linear-gradient(160deg, #1c1f27, #171a21); border-color: #3a3020; }
  .pro .tag { display: inline-block; font-size: 10px; letter-spacing: .14em; color: var(--accent); border: 1px solid var(--accent-dim); border-radius: 999px; padding: 3px 9px; margin-bottom: 10px; }
  .pro h2 { margin-top: 0; }
  .pro ul { margin: 12px 0 18px; padding-left: 20px; color: var(--muted); font-size: 14px; }
  .pro li { margin: 6px 0; }
  .pro .price { font-size: 22px; font-weight: 700; }
  .pro .price small { font-size: 13px; color: var(--faint); font-weight: 400; }
  .notify { display: flex; gap: 8px; margin-top: 14px; }
  .notify input { flex: 1; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; min-width: 0; }
  .notify button { padding: 12px 16px; background: var(--accent); color: #1a1205; border: none; border-radius: 10px; font-weight: 650; cursor: pointer; font-size: 14px; }
  .notify-msg { font-size: 13px; color: var(--ok); margin-top: 10px; min-height: 18px; }

  details { border-bottom: 1px solid var(--border); padding: 13px 0; }
  details summary { cursor: pointer; font-size: 14px; font-weight: 550; }
  details p { color: var(--muted); font-size: 13px; margin: 9px 0 0; }
  footer { text-align: center; color: var(--faint); font-size: 12px; padding: 30px 0 0; }
