:root {
  --bg-top: var(--site-bg-top, #1f3360);
  --bg-bottom: var(--site-bg-bottom, #26406e);
  --muted: #b9c8de;
  --tools-shell: rgba(255, 255, 255, 0.08);
  --tools-shell-border: rgba(255, 255, 255, 0.14);
  --tools-soft: rgba(255, 255, 255, 0.72);
  --tools-muted: rgba(245, 247, 251, 0.64);
  --tools-amber: #f0c45b;
  --tools-teal: #2a9db5;
  --tools-red: #f08080;
  --tools-green: #9ce19a;
}

body {
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(111, 87, 255, 0.18), transparent 35%),
    radial-gradient(circle at top right, rgba(90, 170, 220, 0.14), transparent 28%),
    radial-gradient(circle at 70% 80%, rgba(240, 196, 91, 0.07), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.tools-wrap {
  padding-bottom: 48px;
}

.tools-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.88fr);
  gap: 12px;
  align-items: center;
  margin: 0 24px 14px;
  padding: 10px 14px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(240, 196, 91, 0.08), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(42, 157, 181, 0.09), transparent 32%),
    var(--tools-shell);
  border: 1px solid var(--tools-shell-border);
  box-shadow: 0 30px 60px rgba(7, 14, 30, 0.28);
}

.tools-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -140px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 157, 181, 0.08), transparent 72%);
  pointer-events: none;
}

.hero-kicker,
.tool-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 196, 91, 0.92);
}

.tools-hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: #f7fbff;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.hero-sub,
.tool-copy,
.flow-step p,
.tool-note {
  color: var(--tools-soft);
  line-height: 1.5;
}

.hero-sub-steps {
  margin-top: 8px;
  font-size: 0.98rem;
  color: rgba(245, 247, 251, 0.82);
}

.tools-hero-visual {
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pulse-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.orbit-large {
  width: 190px;
  height: 190px;
}

.orbit-small {
  width: 132px;
  height: 132px;
}

.hero-device {
  position: relative;
  z-index: 1;
  width: min(100%, 242px);
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 27, 54, 0.96), rgba(10, 18, 38, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(6, 12, 28, 0.32);
}

.hero-device-screen {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(42, 157, 181, 0.12), transparent 34%),
    rgba(18, 34, 68, 0.88);
}

.hero-device-link {
  display: grid;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.hero-device-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-device-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 157, 181, 0.16);
  border-color: rgba(42, 157, 181, 0.34);
}

.hero-device-link-metronome:hover {
  box-shadow: 0 0 20px rgba(42, 157, 181, 0.14);
}

.hero-device-link-tuner:hover {
  box-shadow: 0 0 20px rgba(240, 196, 91, 0.12);
}

.hero-device-link-game:hover {
  box-shadow: 0 0 20px rgba(240, 196, 91, 0.1);
}

.hero-device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.hero-device-row-accent {
  margin-top: 4px;
}

.hero-label {
  color: var(--tools-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-value {
  font-size: 14px;
  font-weight: 800;
  color: #f7fbff;
}

.hero-device-link .hero-value::before {
  content: "\2192";
  margin-right: 8px;
  color: rgba(240, 196, 91, 0.92);
}

.hero-pulse-bar,
.hero-dot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hero-pulse-bar span {
  display: block;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(42, 157, 181, 0.92), rgba(42, 157, 181, 0.92));
}

.hero-pulse-bar span:first-child {
  background: linear-gradient(180deg, rgba(240, 196, 91, 0.96), rgba(214, 148, 37, 0.96));
}

.hero-tuner-line {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-tuner-line span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--tools-amber);
  box-shadow: 0 0 18px rgba(240, 196, 91, 0.5);
}

.hero-dot {
  display: block;
  margin-inline: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff3c1 0%, #f0c45b 72%);
}

.hero-dot-lg { width: 26px; height: 26px; }
.hero-dot-md { width: 20px; height: 20px; }
.hero-dot-sm { width: 14px; height: 14px; }

.flow-step,
.tool-card {
  position: relative;
  padding: 24px;
  border-radius: 28px;
  background: var(--tools-shell);
  border: 1px solid var(--tools-shell-border);
}

.tool-card {
  display: flex;
  flex-direction: column;
}

.metronome-card,
.tuner-card {
  padding-bottom: 20px;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
}

.flow-step h2,
.tool-card h2 {
  margin: 6px 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.flow-step h2 {
  color: #f7fbff;
  margin: 2px 0 6px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.flow-step p {
  font-size: 0.98rem;
  line-height: 1.5;
}

.flow-number {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #122244;
  background: linear-gradient(180deg, rgba(240, 196, 91, 0.98), rgba(214, 148, 37, 0.98));
}

.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 0.9fr);
  gap: 20px;
  margin: 0 24px;
}

.rhythm-card {
  grid-column: 1 / -1;
}

.tool-card-head,
.tool-controls-row,
.tool-actions,
.tool-actions-split,
.rhythm-top-row,
.game-scoreboard {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-card-head {
  justify-content: space-between;
  align-items: flex-start;
}

.tool-chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(18, 34, 68, 0.92);
  background: linear-gradient(180deg, rgba(240, 196, 91, 0.96), rgba(214, 148, 37, 0.92));
}

.tool-meter {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 20px 0 12px;
}

.tool-meter-label,
.score-label,
.tuner-reference span,
.tool-control span:first-child {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tools-muted);
}

.tool-meter-value,
.inline-meter {
  font-size: 1.6rem;
  font-weight: 800;
}

.inline-meter-tempo {
  gap: 4px;
}

.inline-meter-tempo #gameTempoValue {
  font-size: 2rem;
  line-height: 1;
  color: #f7fbff;
}

.inline-meter-unit {
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.68);
}

.range-input {
  width: 100%;
  accent-color: #2a9db5;
}

.tool-controls-row,
.rhythm-top-row {
  flex-wrap: wrap;
  margin-top: 20px;
}

.tool-control {
  display: grid;
  gap: 8px;
  min-width: 150px;
  flex: 1 1 0;
  position: relative;
}

.tool-control select,
.tool-toggle,
.inline-meter {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7fb;
}

.tool-control select,
.inline-meter {
  padding: 0 14px;
}

.picker-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.picker-trigger {
  min-height: 48px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7fb;
  padding: 0 42px 0 14px;
  font: inherit;
  text-align: left;
  position: relative;
  cursor: pointer;
}

.picker-trigger::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(245, 247, 251, 0.86);
  border-bottom: 2px solid rgba(245, 247, 251, 0.86);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.14s ease;
}

.tool-control.is-open .picker-trigger::after {
  transform: translateY(-25%) rotate(-135deg);
}

.picker-trigger:focus-visible {
  outline: 2px solid rgba(42, 157, 181, 0.55);
  outline-offset: 2px;
}

.picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 28, 58, 0.98);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.picker-menu[hidden] {
  display: none;
}

.picker-option {
  min-height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(245, 247, 251, 0.92);
  font: inherit;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.picker-option:hover,
.picker-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.picker-option.is-selected {
  background: rgba(42, 157, 181, 0.14);
  color: #f7fbff;
}

.tool-control select option {
  color: #122244;
  background: #f5f7fb;
}

.tool-toggle,
.inline-meter {
  display: inline-flex;
  align-items: center;
}

.tool-toggle {
  gap: 10px;
  padding: 0 16px;
  cursor: pointer;
}

.tool-toggle input {
  accent-color: #2a9db5;
}

.range-input-hidden {
  margin-top: 18px;
  opacity: 0.82;
}

.metronome-playface {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  justify-items: center;
  margin-top: 10px;
}

.beat-ring-wrap,
.tempo-dial-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.beat-ring-wrap {
  gap: 44px;
}

.tempo-dial-wrap {
  margin-top: 64px;
}

.beat-ring-label,
.tempo-dial-kicker {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tools-muted);
}

.beat-ring-label strong,
.tempo-dial-kicker strong {
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: #f7fbff;
}

.beat-ring {
  position: relative;
  width: min(100%, 214px);
  aspect-ratio: 1;
  margin-left: -10px;
  border-radius: 50%;
  background: transparent;
  border: none;
  box-shadow: none;
}

.pulse-dot {
  --ring-radius: 82px;
  --slot-angle: 0deg;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 rgba(101, 214, 200, 0);
  transform:
    rotate(calc(var(--slot-angle) - 90deg))
    translateY(calc(var(--ring-radius) * -1))
    rotate(calc(var(--slot-angle) * -1 + 90deg))
    scale(1);
  transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.pulse-dot.is-down {
  background: linear-gradient(180deg, rgba(147, 230, 145, 0.92), rgba(58, 155, 74, 0.92));
  box-shadow: 0 0 10px rgba(88, 189, 106, 0.22);
}

.pulse-dot.is-up {
  background: linear-gradient(180deg, rgba(152, 211, 255, 0.92), rgba(46, 115, 201, 0.92));
  box-shadow: 0 0 10px rgba(72, 140, 233, 0.22);
}

.pulse-dot[data-slot="0"] { --slot: 0; }
.pulse-dot[data-slot="1"] { --slot: 1; }
.pulse-dot[data-slot="2"] { --slot: 2; }
.pulse-dot[data-slot="3"] { --slot: 3; }
.pulse-dot[data-slot="4"] { --slot: 4; }
.pulse-dot[data-slot="5"] { --slot: 5; }

.pulse-dot.is-hidden {
  opacity: 0.2;
}

.pulse-dot-active,
.pulse-dot.is-lit {
  background: linear-gradient(180deg, rgba(144, 248, 233, 0.98), rgba(45, 139, 159, 0.94));
  box-shadow: 0 0 18px rgba(101, 214, 200, 0.44), 0 0 8px rgba(101, 214, 200, 0.3);
  transform:
    rotate(calc(var(--slot-angle) - 90deg))
    translateY(calc(var(--ring-radius) * -1))
    rotate(calc(var(--slot-angle) * -1 + 90deg))
    scale(1.28);
}

.pulse-dot.is-lit {
  opacity: 1;
}

.pulse-dot.is-lit.is-down,
.pulse-dot-active.is-down {
  background: linear-gradient(180deg, rgba(182, 255, 171, 0.98), rgba(68, 179, 88, 0.96));
  box-shadow: 0 0 20px rgba(95, 217, 120, 0.45), 0 0 8px rgba(95, 217, 120, 0.3);
}

.pulse-dot.is-lit.is-up,
.pulse-dot-active.is-up {
  background: linear-gradient(180deg, rgba(182, 225, 255, 0.98), rgba(57, 132, 227, 0.96));
  box-shadow: 0 0 20px rgba(86, 159, 245, 0.45), 0 0 8px rgba(86, 159, 245, 0.3);
}

.pulse-dot.is-bar {
  background: linear-gradient(180deg, rgba(255, 234, 162, 0.98), rgba(214, 148, 37, 0.96));
  box-shadow: 0 0 20px rgba(240, 196, 91, 0.4);
}

.pulse-dot.is-rest {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.tempo-dial {
  width: 100%;
  display: grid;
  justify-items: center;
  cursor: pointer;
}

.tempo-dial-face {
  --dial-turn: -130deg;
  position: relative;
  width: 162px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.22), transparent 20%),
    linear-gradient(180deg, rgba(42, 63, 96, 0.96), rgba(13, 28, 57, 0.98));
  border: 4px solid rgba(240, 196, 91, 0.9);
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.08),
    inset 0 -18px 26px rgba(0, 0, 0, 0.28),
    0 16px 30px rgba(0, 0, 0, 0.22);
}

.tempo-dial-face::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tempo-dial-pointer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 250, 224, 0.98), rgba(240, 196, 91, 0.94));
  box-shadow: 0 0 14px rgba(240, 196, 91, 0.28);
  transform-origin: 50% calc(100% - 8px);
  transform: translate(-50%, -100%) rotate(var(--dial-turn));
}

.tempo-dial-core {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.2), transparent 26%),
    linear-gradient(180deg, rgba(23, 43, 77, 0.98), rgba(7, 17, 41, 0.98));
  border: 2px solid rgba(240, 196, 91, 0.34);
  box-shadow: 0 0 0 8px rgba(240, 196, 91, 0.08);
}

.tempo-dial-core strong {
  font-size: 2rem;
  line-height: 1;
  color: #f7fbff;
}

.tempo-dial-core span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.72);
}

.tool-actions {
  margin-top: 18px;
}

.tool-actions-split {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tuner-card {
  overflow: hidden;
}

.metronome-card .tool-actions,
.tuner-card .tool-actions {
  padding-top: 8px;
}

.metronome-card .tool-actions {
  margin-top: auto;
}

.metronome-card .tool-controls-row {
  align-items: end;
  margin-top: 18px;
}

.tuner-card h2 {
  color: #f7fbff;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.tuner-card .tool-copy {
  color: rgba(245, 247, 251, 0.88);
}

.tuner-display {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 12px 0 8px;
}

.tuner-note {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #f7fbff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

.tuner-string {
  min-height: 24px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #122244;
  background: linear-gradient(180deg, rgba(240, 196, 91, 0.96), rgba(214, 148, 37, 0.92));
  box-shadow: 0 12px 20px rgba(214, 148, 37, 0.18);
}

.tuner-frequency,
.tuner-cents {
  color: var(--tools-soft);
}

.tuner-frequency {
  font-size: 0.88rem;
  color: rgba(245, 247, 251, 0.72);
}

.tuner-cents {
  min-height: 24px;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(245, 247, 251, 0.9);
}

.tuner-field {
  position: relative;
  width: min(100%, 248px);
  aspect-ratio: 1;
  align-self: center;
  margin: 8px auto 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(240, 196, 91, 0.08), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(101, 214, 200, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(14, 25, 47, 0.98), rgba(8, 18, 39, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.18);
}

.tuner-field-band {
  position: absolute;
  top: 50%;
  width: 46%;
  height: 72%;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.7;
  transform: translateY(-50%);
}

.tuner-field-band-flat {
  left: -8%;
  background: radial-gradient(circle, rgba(240, 128, 128, 0.22), rgba(240, 128, 128, 0.04) 62%, transparent 78%);
}

.tuner-field-band-center {
  left: 27%;
  width: 46%;
  height: 78%;
  background: radial-gradient(circle, rgba(101, 214, 200, 0.22), rgba(101, 214, 200, 0.08) 58%, transparent 78%);
}

.tuner-field-band-sharp {
  right: -8%;
  background: radial-gradient(circle, rgba(240, 196, 91, 0.22), rgba(240, 196, 91, 0.04) 62%, transparent 78%);
}

.tuner-field-line {
  position: absolute;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.tuner-field-line-flat { left: 32%; }
.tuner-field-line-center {
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 250, 224, 0.38);
}
.tuner-field-line-sharp { right: 32%; }

.tuner-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%) scale(0.4);
  border-radius: 50%;
  border: 2px solid rgba(101, 214, 200, 0.2);
  opacity: 0;
  pointer-events: none;
}

.tuner-ripple.is-live {
  animation: tunerRipple 0.6s ease-out;
}

.tuner-magnet {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 246, 210, 0.42);
  background: radial-gradient(circle at 50% 38%, rgba(255, 252, 240, 0.96), rgba(255, 243, 202, 0.72) 28%, rgba(159, 233, 221, 0.42) 58%, rgba(81, 131, 168, 0.28) 100%);
  box-shadow: 0 0 34px rgba(240, 196, 91, 0.22), 0 0 24px rgba(101, 214, 200, 0.18);
}

.tuner-magnet::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 18px rgba(255, 250, 220, 0.62);
}

.tuner-magnet.is-locked {
  border-color: rgba(255, 250, 220, 0.8);
  box-shadow: 0 0 38px rgba(156, 225, 154, 0.3), 0 0 24px rgba(255, 226, 145, 0.28);
}

.tuner-state-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.tuner-state-rail {
  gap: 14px;
}

.tuner-state-pill {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(245, 247, 251, 0.52);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  transition: transform 0.12s ease, color 0.12s ease, text-shadow 0.12s ease;
}

.tuner-state-pill.is-active {
  transform: translateY(-1px);
  color: #f7fbff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.16);
}

.tuner-state-pill.is-flat {
  color: #ff8f8f;
  background: transparent;
  box-shadow: none;
}

.tuner-state-pill.is-center {
  color: #8fea81;
  background: transparent;
  box-shadow: none;
}

.tuner-state-pill.is-sharp {
  color: #ff8f8f;
  background: transparent;
  box-shadow: none;
}

.tuner-float-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(211, 255, 247, 0.98) 0%, rgba(101, 214, 200, 0.94) 72%);
  box-shadow: 0 0 24px rgba(101, 214, 200, 0.38);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.tuner-float-dot::before {
  content: attr(data-cents);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(245, 247, 251, 0.92);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.tuner-float-dot.is-readout::before {
  opacity: 1;
}

.tuner-float-dot.is-readout-flat::before {
  color: #ff8f8f;
}

.tuner-float-dot.is-readout-center::before {
  color: #8fea81;
}

.tuner-float-dot.is-readout-sharp::before {
  color: #ff8f8f;
}

.tuner-float-dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(101, 214, 200, 0.18);
  opacity: 0.7;
}

.tuner-float-dot.is-locked {
  background: radial-gradient(circle at 34% 30%, rgba(255, 251, 220, 0.98) 0%, rgba(240, 196, 91, 0.96) 72%);
  box-shadow: 0 0 24px rgba(240, 196, 91, 0.34);
}

.tuner-reference {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  margin-top: 8px;
}

.reference-notes {
  font-size: 0.94rem;
  font-weight: 700;
  color: rgba(245, 247, 251, 0.9);
}

.tuner-card .tool-note {
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}

@keyframes tunerRipple {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.45);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4);
  }
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.game-sidebar,
.game-main {
  display: grid;
  gap: 14px;
}

.game-main {
  min-width: 0;
}

.game-settings {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-settings .tool-control {
  min-width: 0;
}

.game-settings .range-input {
  margin-top: 2px;
}

.game-scoreboard {
  display: grid;
  gap: 10px;
}

.game-scoreboard-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.score-panel {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 247, 251, 0.92);
}

.score-panel strong {
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  line-height: 1;
  color: #f7fbff;
}

.game-feedback {
  min-height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: rgba(245, 247, 251, 0.76);
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.game-feedback.feedback-perfect {
  color: rgba(16, 30, 35, 0.84);
  background: linear-gradient(180deg, rgba(162, 240, 211, 0.92), rgba(101, 214, 200, 0.9));
  box-shadow: 0 0 24px rgba(101, 214, 200, 0.26);
}

.game-feedback.feedback-good {
  color: rgba(38, 39, 56, 0.84);
  background: linear-gradient(180deg, rgba(250, 216, 118, 0.92), rgba(240, 196, 91, 0.9));
  box-shadow: 0 0 24px rgba(240, 196, 91, 0.22);
}

.game-feedback.feedback-miss {
  color: #fff3f3;
  background: linear-gradient(180deg, rgba(240, 128, 128, 0.9), rgba(204, 79, 79, 0.92));
  box-shadow: 0 0 20px rgba(204, 79, 79, 0.18);
}

.game-feedback.feedback-live {
  transform: scale(1.01);
}

.game-lane-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(101, 214, 200, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(16, 29, 57, 0.96), rgba(12, 23, 47, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
  overflow: hidden;
}

.game-lane-topline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.game-lane-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 196, 91, 0.92);
  font-weight: 800;
}

.game-track {
  display: grid;
}

.game-track-inline {
  grid-template-columns: repeat(var(--game-track-columns, 16), minmax(0, 1fr));
  gap: 0;
  padding: 10px 0 6px;
  width: 100%;
  min-width: 0;
}

.game-slot {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 14px 4px 6px;
}

.game-slot::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101, 214, 200, 0.35) 0%, rgba(101, 214, 200, 0.1) 42%, transparent 72%);
  transform: translateX(-50%) scale(0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.16s ease, opacity 0.16s ease, filter 0.16s ease;
}

.game-slot::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 1px;
  height: calc(100% - 4px);
  background: rgba(255, 255, 255, 0.08);
}

.game-slot.bar-start::before {
  background: rgba(255, 255, 255, 0.28);
}

.game-dot {
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff3c1 0%, #f0c45b 72%);
  box-shadow: 0 2px 10px rgba(240, 196, 91, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

.game-dot.game-dot-down {
  background: radial-gradient(circle at 34% 30%, #ecfccb 0%, #65a30d 76%);
  box-shadow: 0 2px 10px rgba(101, 163, 13, 0.24);
}

.game-dot.game-dot-up {
  background: radial-gradient(circle at 34% 30%, #bfdbfe 0%, #2563eb 76%);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.24);
}

.game-dot-rest {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.game-dot-size-sixteenth { width: 8px; height: 8px; }
.game-dot-size-eighth { width: 12px; height: 12px; }
.game-dot-size-quarter { width: 16px; height: 16px; }
.game-dot-size-half { width: 21px; height: 21px; }
.game-dot-size-whole { width: 26px; height: 26px; }


.game-slot.is-active .game-dot {
  transform: scale(1.5);
  box-shadow: 0 0 28px rgba(42, 157, 181, 0.48), 0 0 10px rgba(42, 157, 181, 0.42);
  background: radial-gradient(circle at 34% 30%, #d3fff7 0%, #2a9db5 70%);
}

.game-slot.is-active .game-dot.game-dot-down {
  box-shadow: 0 0 28px rgba(101, 163, 13, 0.46), 0 0 10px rgba(101, 163, 13, 0.4);
  background: radial-gradient(circle at 34% 30%, #f0ffd8 0%, #84cc16 72%);
}

.game-slot.is-active .game-dot.game-dot-up {
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.46), 0 0 10px rgba(37, 99, 235, 0.4);
  background: radial-gradient(circle at 34% 30%, #dbeafe 0%, #3b82f6 72%);
}

.game-slot.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scale(1.35);
  filter: blur(2px);
}

.game-slot.is-trail .game-dot {
  transform: scale(1.18);
  opacity: 0.76;
  box-shadow: 0 0 14px rgba(101, 214, 200, 0.22);
  background: radial-gradient(circle at 34% 30%, rgba(211, 255, 247, 0.92) 0%, rgba(101, 214, 200, 0.7) 72%);
}

.game-slot.is-trail .game-dot.game-dot-down {
  box-shadow: 0 0 14px rgba(101, 163, 13, 0.24);
  background: radial-gradient(circle at 34% 30%, rgba(236, 252, 203, 0.94) 0%, rgba(101, 163, 13, 0.7) 72%);
}

.game-slot.is-trail .game-dot.game-dot-up {
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.24);
  background: radial-gradient(circle at 34% 30%, rgba(191, 219, 254, 0.94) 0%, rgba(37, 99, 235, 0.7) 72%);
}

.game-slot.is-trail::after {
  opacity: 0.56;
  transform: translateX(-50%) scale(0.92);
  filter: blur(4px);
}

.game-slot.is-hit .game-dot {
  background: radial-gradient(circle at 34% 30%, #f7ffd8 0%, #9ce19a 72%);
}

.game-slot.is-missed .game-dot {
  background: radial-gradient(circle at 34% 30%, #ffd2d2 0%, #f08080 72%);
}

.tap-pad {
  min-width: 0;
  position: relative;
  width: 152px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid rgba(240, 196, 91, 0.92);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), transparent 18%),
    radial-gradient(circle at 50% 42%, rgba(101, 214, 200, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(17, 32, 67, 0.98), rgba(7, 17, 41, 0.98));
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.06),
    inset 0 -14px 22px rgba(0, 0, 0, 0.32),
    0 14px 28px rgba(0, 0, 0, 0.24);
  color: transparent;
  overflow: hidden;
  transition: transform 0.08s ease, box-shadow 0.1s ease, background 0.12s ease, border-color 0.12s ease;
}

.tap-pad::before,
.tap-pad::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.tap-pad::before {
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tap-pad::after {
  inset: 30px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(101, 214, 200, 0.06) 45%, transparent 72%);
}

.tap-pad:focus-visible {
  outline: none;
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.06),
    inset 0 -14px 22px rgba(0, 0, 0, 0.32),
    0 0 0 4px rgba(101, 214, 200, 0.18),
    0 14px 28px rgba(0, 0, 0, 0.24);
}

.tap-pad:active {
  transform: translateY(3px) scale(0.985);
  box-shadow:
    inset 0 14px 24px rgba(0, 0, 0, 0.24),
    inset 0 -8px 14px rgba(255, 255, 255, 0.05),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

.game-sidebar-actions {
  display: grid;
  gap: 10px;
}

.game-sidebar-actions .btn-primary {
  width: 100%;
  justify-content: center;
}

.game-track-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.game-track-actions .tap-pad {
  justify-content: center;
}

.tap-pad.tap-live {
  border-color: rgba(101, 214, 200, 0.88);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 50% 42%, rgba(101, 214, 200, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(26, 57, 86, 0.98), rgba(8, 24, 54, 0.98));
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.08),
    inset 0 -14px 22px rgba(0, 0, 0, 0.2),
    0 0 0 6px rgba(101, 214, 200, 0.16),
    0 0 28px rgba(101, 214, 200, 0.24);
}

.tap-pad.tap-perfect {
  border-color: rgba(240, 196, 91, 0.98);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.22), transparent 18%),
    radial-gradient(circle at 50% 42%, rgba(240, 196, 91, 0.24), transparent 52%),
    linear-gradient(180deg, rgba(41, 54, 70, 0.98), rgba(17, 28, 46, 0.98));
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.08),
    inset 0 -14px 22px rgba(0, 0, 0, 0.18),
    0 0 0 7px rgba(240, 196, 91, 0.16),
    0 0 30px rgba(240, 196, 91, 0.26);
}

.tap-pad.tap-miss {
  animation: tapPadShake 0.22s ease;
}

.tool-note {
  margin: 14px 0 0;
  font-size: 0.96rem;
}

.score-panel.spark {
  animation: scorePulse 0.38s ease;
}

@keyframes scorePulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes tapPadShake {
  0% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

@media (max-width: 1080px) {
  .tools-hero,
  .tools-grid {
    margin-left: 16px;
    margin-right: 16px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-scoreboard-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .tools-hero {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .tools-hero-visual {
    min-height: 180px;
    justify-content: center;
  }

  .metronome-playface {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tools-hero,
  .tool-card {
    border-radius: 18px;
    padding: 12px;
  }

  .tool-card-head,
  .tool-actions-split {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-chip {
    align-self: flex-start;
  }

  .tool-actions .btn-primary,
  .tool-actions-split .btn-primary,
  .tool-actions-split .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .metronome-pulses {
    gap: 8px;
  }

  .tuner-state-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tuner-string,
  .tuner-cents,
  .tuner-state-pill {
    min-height: 32px;
  }

  .tuner-state-pill {
    font-size: 0.86rem;
  }

  .game-lane-shell {
    padding: 14px;
  }

  .tap-pad {
    width: 128px;
  }

  .game-track-inline {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 28px;
    min-width: 100%;
    justify-content: start;
    transform: translateX(0);
    transition: transform 0.18s ease-out;
    will-change: transform;
    padding: 10px 2px 6px;
  }

  .game-slot {
    padding: 14px 2px 6px;
  }

}
