* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080a0f;
  color: #f7f8fb;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -20%, rgba(90, 110, 255, 0.16), transparent 42%), #080a0f;
}
button, input { font: inherit; }
.app-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card {
  width: min(100%, 620px);
  background: rgba(18, 21, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}
.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #8f98ab; margin-bottom: 12px; }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); line-height: 1; margin: 0 0 14px; letter-spacing: -.04em; }
.intro, .status, .privacy-note, .tune-hint { color: #aeb5c5; }
.intro { margin: 0 0 26px; line-height: 1.55; }
.permission-panel { display: grid; gap: 12px; }
.primary-button, .secondary-button {
  width: 100%; border: 0; border-radius: 16px; padding: 16px 18px; cursor: pointer; font-weight: 750;
  transition: transform 120ms ease, opacity 120ms ease;
}
.primary-button { background: #f7f8fb; color: #0a0c12; }
.secondary-button { margin-top: 22px; background: rgba(255,255,255,0.08); color: #f7f8fb; border: 1px solid rgba(255,255,255,0.08); }
.primary-button:active, .secondary-button:active { transform: scale(.985); }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: default; }
.status { min-height: 1.5em; margin: 0; font-size: .92rem; }
.tuner-panel { text-align: center; padding-top: 6px; }
.note-wrap { display: flex; align-items: flex-start; justify-content: center; gap: 5px; }
.note { font-size: clamp(5.5rem, 26vw, 10rem); line-height: .9; font-weight: 800; letter-spacing: -.07em; }
.octave { margin-top: 12px; font-size: clamp(1.6rem, 7vw, 2.5rem); color: #8f98ab; font-weight: 700; }
.cents { margin-top: 18px; font-size: clamp(2rem, 9vw, 3.6rem); font-weight: 750; letter-spacing: -.04em; }
.frequency { margin-top: 5px; color: #8f98ab; font-variant-numeric: tabular-nums; }
.meter { margin-top: 34px; }
.meter-scale { display: flex; justify-content: space-between; color: #6f788b; font-size: .72rem; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.meter-track {
  position: relative; height: 18px;
  background: linear-gradient(90deg, rgba(244,114,182,.45), rgba(255,255,255,.08) 38%, rgba(74,222,128,.26) 49%, rgba(74,222,128,.26) 51%, rgba(255,255,255,.08) 62%, rgba(244,114,182,.45));
  border-radius: 999px; overflow: hidden;
}
.meter-centre { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); background: #f7f8fb; opacity: .9; }
.meter-needle {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%,-50%);
  border-radius: 50%; background: #f7f8fb; box-shadow: 0 0 16px rgba(255,255,255,.55);
  transition: left 80ms linear, background-color 120ms ease;
}
.tune-hint { margin: 14px 0 0; min-height: 1.5em; }
.debug { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); color: #8f98ab; }
.debug summary { cursor: pointer; user-select: none; }
.debug-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; margin-top: 14px; font-size: .86rem; }
.debug-grid strong { color: #d8dce6; text-align: right; font-variant-numeric: tabular-nums; }
.privacy-note { margin: 22px 0 0; font-size: .78rem; line-height: 1.5; }
@media (max-width: 480px) {
  .card { border-radius: 22px; padding: 22px 18px; }
  .app-shell { padding: 14px; }
}
