:root {
  --bg: #07070b;
  --panel: rgba(14, 14, 18, 0.86);
  --line: rgba(255, 210, 240, 0.12);
  --pink: #ff3cad;
  --pink-2: #ff7ad8;
  --ink: #f6eef8;
  --muted: #a394aa;
  --sans: "Outfit", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.noise,
.wash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}
.noise {
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.wash {
  background:
    radial-gradient(900px 520px at 85% 8%, rgba(255, 60, 173, 0.28), transparent 55%),
    radial-gradient(700px 480px at 12% 0%, rgba(120, 40, 90, 0.32), transparent 50%),
    url("/img/atmosphere.jpg") center top / cover no-repeat;
  opacity: 0.42;
  mask-image: linear-gradient(to bottom, black 0%, black 42%, transparent 78%);
}

.mascot {
  position: fixed;
  right: max(-80px, calc(50vw - 760px));
  top: 88px;
  width: min(48vw, 560px);
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 56px rgba(255, 60, 173, 0.4));
  mask-image:
    linear-gradient(to left, transparent 0%, black 8%, black 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 8%, black 90%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to left, transparent 0%, black 8%, black 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 8%, black 90%, transparent 100%);
  -webkit-mask-composite: source-in;
}

.promo {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: linear-gradient(90deg, #2a0a1c, #4a1230 40%, #2a0a1c);
  border-bottom: 1px solid rgba(255, 60, 173, 0.35);
  font-size: 14px;
  color: #f7d7ee;
}
.promo img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.promo strong {
  color: #fff;
  font-weight: 600;
}
.promo:hover strong { color: var(--pink-2); }

.top {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  padding: 14px 32px 8px;
  max-width: 1120px;
  margin: 0 auto;
  overflow: visible;
}
.brand {
  display: block;
  overflow: visible;
  flex: 0 0 auto;
  line-height: 0;
}
.brand img {
  height: 84px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 6px 18px rgba(255, 60, 173, 0.35));
}
.top nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}
.top nav a:hover,
.top nav a.is-on { color: var(--ink); }

.kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-2);
  font-weight: 600;
}
.lede {
  color: var(--muted);
  max-width: 36rem;
  font-size: 16px;
}

.stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 32px 48px;
}
.intro {
  text-align: center;
  padding-top: 10px;
  padding-bottom: 16px;
  max-width: 40rem;
}
.intro h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--pink-2);
  text-shadow: 0 0 28px rgba(255, 60, 173, 0.35);
}
.intro .lede { margin: 0 auto; }

.panel {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 22px 22px;
  backdrop-filter: blur(18px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-result {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border: 0;
  padding: 22px 8px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.hero-result .num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}
.hero-result .val {
  font-family: var(--mono);
  font-size: clamp(56px, 14vw, 84px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.hero-result .unit {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--pink-2);
  font-weight: 500;
}
.hero-result .copy-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}
.hero-result:hover .val { color: #fff; }

.bpm-row label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
.block { margin: 18px 0 8px; }

.bpm-wrap {
  display: flex;
  gap: 8px;
}
#bpm {
  flex: 1;
  background: #0a0a0e;
  border: 1px solid #3a7afe;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 22px;
  outline: none;
}
#bpm:focus { box-shadow: 0 0 0 3px rgba(58, 122, 254, 0.25); }
#tap {
  width: 76px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #1a1a22;
  font-weight: 650;
  letter-spacing: 0.08em;
  transition: transform 0.08s ease, background 0.08s;
}
#tap.hit,
#tap:active {
  background: var(--pink);
  color: #1a0512;
  transform: scale(0.96);
}

.length-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
#length {
  width: 100%;
  accent-color: var(--pink);
  height: 28px;
}

.more,
.foot,
.app-hero,
.app-show,
.app-points {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 56px;
}

.more h2 { margin: 8px 0 18px; max-width: 28rem; }
.more { padding-top: 8px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 16, 0.72);
  min-height: 180px;
}
.tool:hover { border-color: var(--pink); }
.tool .ico { font-size: 22px; }
.tool h3 { font-size: 17px; letter-spacing: -0.02em; }
.tool p { color: var(--muted); font-size: 14px; flex: 1; }
.tool .go { font-size: 13px; color: var(--pink-2); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 13px;
}
.mini-ad {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini-ad img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.mini-ad b { color: var(--ink); font-weight: 600; }
.foot a:hover { color: var(--pink-2); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: #fff;
  color: #111;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: 0.2s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-page .wash {
  opacity: 0.4;
  mask-image: none;
}
.app-hero {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 8px;
}
.app-icon {
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(255, 60, 173, 0.28);
}
.app-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 10px 0 14px;
}
.app-hero .lede { margin: 0 auto 22px; }
.cta-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.btn.solid {
  background: var(--pink);
  color: #1a0512;
}
.btn.solid:hover { background: var(--pink-2); }
.btn.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--pink); }
.fine { margin-top: 12px; font-size: 12px; color: var(--muted); }

.app-show figure {
  max-width: 520px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.app-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.app-points h2 { font-size: 18px; margin-bottom: 8px; }
.app-points p { color: var(--muted); font-size: 14px; }
.more.compact .cards { margin-top: 14px; }

.nf {
  min-height: 70vh;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 980px) {
  .mascot { width: min(70vw, 380px); right: -40px; top: 120px; opacity: 0.55; }
  .cards, .app-points { grid-template-columns: 1fr; }
  .lede { font-size: 15px; }
}

@media (max-width: 640px) {
  .top, .stage, .more, .foot, .app-hero, .app-show, .app-points {
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand img { height: 62px; }
  .hero-result .val { font-size: 56px; }
}
