:root {
  --ink: #f8f5ed;
  --muted: #a8a6b5;
  --line: rgba(255, 255, 255, 0.11);
  --panel: rgba(25, 25, 35, 0.78);
  --panel-strong: #20202d;
  --night: #101018;
  --night-2: #171724;
  --coral: #f48b72;
  --gold: #f2c66e;
  --mint: #8fe0c1;
  --blue: #87b5ff;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(244, 139, 114, 0.18), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(135, 181, 255, 0.13), transparent 33%),
    var(--night);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 46px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--coral);
  color: #21151a;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(244, 139, 114, 0.28);
}

.brand-copy strong {
  display: block;
  letter-spacing: -0.02em;
  font-size: 15px;
}

.brand-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 13px var(--mint);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 32px;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 780;
}

.hero p {
  max-width: 610px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
  margin: 22px 0 0;
}

.hero-note {
  padding: 4px 0 4px 18px;
  color: #d2ced5;
  font-size: 13px;
  line-height: 1.6;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.card {
  border: 0;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.player {
  padding: 24px;
  overflow: hidden;
  container-type: inline-size;
  container-name: player;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.card-title {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.card-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 0;
}

.transport-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #171822 0%, #12131b 100%);
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 30px rgba(0, 0, 0, 0.2);
}

.logic-lcd {
  flex: 1 1 290px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 11px;
  background: #080a10;
  border: 0;
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.65);
  font-variant-numeric: tabular-nums;
}

.lcd-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lcd-cell {
  display: grid;
  gap: 2px;
  min-width: 30px;
  text-align: center;
}

.lcd-label {
  color: #757889;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lcd-value {
  color: #9be7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(155, 231, 255, 0.28);
}

.lcd-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.beat-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.beat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.08s ease, background 0.08s ease, box-shadow 0.08s ease;
}

.beat-dot.active {
  background: #9be7ff;
  box-shadow: 0 0 8px #9be7ff;
  transform: scale(1.25);
}

.beat-dot.downbeat.active {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.controlbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tempo-stepper {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #20222d;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-variant-numeric: tabular-nums;
}

.tempo-step-btn {
  width: 38px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #d0d0dc;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.12s ease, color 0.12s ease;
}

.tempo-step-btn:hover {
  background: #2b2e3d;
  color: var(--ink);
}

.tempo-step-btn:active {
  background: #35394c;
}

.tempo-readout {
  min-width: 76px;
  padding: 0 10px;
  text-align: center;
  color: #dceaff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.metronome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #20222d;
  color: #d0d0dc;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metronome-btn:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.28);
  background: #262936;
}

.metronome-btn.active {
  color: #21151a;
  background: var(--gold);
  border-color: var(--gold);
  box-shadow:
    0 0 16px rgba(242, 198, 110, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.now-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.lane-radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(12, 13, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lane-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lane-radio:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.lane-radio input[type="radio"] {
  appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  background: transparent;
  display: grid;
  place-items: center;
  transition: 0.15s ease;
}

.lane-radio input[type="radio"]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #21151a;
  transform: scale(0);
  transition: transform 0.15s ease;
}

.lane-radio:has(input:checked) {
  color: #21151a;
  background: var(--gold);
  box-shadow: 0 4px 12px rgba(242, 198, 110, 0.2);
}

.lane-radio:has(input:checked) input[type="radio"] {
  border-color: #21151a;
  background: rgba(33, 21, 26, 0.12);
}

.lane-radio:has(input:checked) input[type="radio"]::after {
  transform: scale(1);
}

.lane-radio:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.exercise-groups {
  display: grid;
  gap: 8px;
  margin: 0;
}

.exercise-group {
  display: grid;
  gap: 6px;
}

.exercise-group[hidden] {
  display: none;
}

.pre-routine-card {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 21, 31, 0.78);
}

.pre-routine-card.collapsed .pre-routine-body {
  display: none;
}

.pre-routine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pre-routine-title-wrap {
  display: grid;
  gap: 3px;
}

.pre-routine-eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pre-routine-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.pre-routine-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pre-routine-btn {
  min-block-size: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

.pre-routine-btn:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.pre-routine-btn:focus-visible,
.routine-step-btn:focus-visible,
.twister-rep-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pre-routine-body {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.routine-col {
  display: grid;
  gap: 8px;
  align-content: start;
}

.routine-col-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.routine-step-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  cursor: pointer;
  transition: 0.15s ease;
}

.routine-step-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.routine-step-btn[aria-pressed="true"] {
  border-color: rgba(143, 224, 193, 0.4);
  background: rgba(143, 224, 193, 0.08);
}

.routine-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: transparent;
  background: rgba(0, 0, 0, 0.25);
  margin-top: 1px;
}

.routine-step-btn[aria-pressed="true"] .routine-check {
  color: #10211b;
  background: var(--mint);
  border-color: var(--mint);
}

.routine-step-copy strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.routine-step-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.twister-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.twister-card.done {
  border-color: rgba(242, 198, 110, 0.42);
  background: rgba(242, 198, 110, 0.08);
}

.twister-copy {
  min-width: 0;
}

.twister-copy strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.35;
}

.twister-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.twister-rep-btn {
  flex: 0 0 auto;
  min-inline-size: 64px;
  min-block-size: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid rgba(242, 198, 110, 0.35);
  background: rgba(242, 198, 110, 0.1);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: 0.15s ease;
}

.twister-rep-btn:hover {
  background: rgba(242, 198, 110, 0.2);
  color: var(--ink);
}

.twister-card.done .twister-rep-btn {
  background: var(--gold);
  color: #21151a;
  border-color: var(--gold);
}

.exercise-group-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.group-video-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.group-video-link:hover {
  opacity: 1;
  color: var(--ink);
  text-decoration: underline;
}

.exercise-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-tab {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 13px;
  padding: 9px 12px;
  white-space: nowrap;
  font-size: 12px;
  transition: 0.2s ease;
}

.exercise-tab:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.25);
}

.exercise-tab.done {
  color: var(--mint);
  border-color: rgba(143, 224, 193, 0.32);
  background: rgba(143, 224, 193, 0.07);
}

.exercise-tab.active {
  color: #21151a;
  background: var(--coral);
  border-color: var(--coral);
  font-weight: 700;
}

.exercise-tab.session-tab {
  border-color: rgba(242, 198, 110, 0.38);
  color: var(--gold);
  background: rgba(242, 198, 110, 0.07);
  font-weight: 600;
}

.exercise-tab.session-tab.active {
  color: #21151a;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}

.now-playing {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(244, 139, 114, 0.15), rgba(135, 181, 255, 0.08));
  border: 0;
}

.now-details {
  min-width: 0;
}

.now-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.now-label {
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 10px;
  font-weight: 800;
}

.now-video-link {
  display: inline-flex;
  color: var(--gold);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(242, 198, 110, 0.1);
  border: 1px solid rgba(242, 198, 110, 0.3);
  transition: all 0.15s ease;
}

.now-video-link[hidden] {
  display: none;
}

.now-video-link:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(242, 198, 110, 0.2);
}

.now-name {
  margin: 7px 0 6px;
  font-size: 29px;
  letter-spacing: -0.045em;
}

.now-description {
  max-width: 490px;
  margin: 0;
  color: #ccc9d3;
  line-height: 1.5;
  font-size: 13px;
}

.play-button {
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--night);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
  font-size: 21px;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.05);
}

.play-button.playing {
  background: var(--gold);
}

.timeline-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0;
  width: 100%;
}

.time-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #9be7ff;
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(155, 231, 255, 0.2);
}

.time-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.time-slider {
  --slider-track-size: 6px;
  --slider-thumb-size: 16px;
  --slider-track-radius: 999px;
  --slider-thumb-radius: 50%;
  --slider-track-color: rgba(255, 255, 255, 0.14);
  --slider-fill-color: var(--coral);
  --slider-thumb-color: #ffffff;
  --control-progress: 0%;

  appearance: none;
  inline-size: 100%;
  block-size: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.time-slider::-webkit-slider-runnable-track {
  block-size: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: linear-gradient(
    to right,
    var(--slider-fill-color) var(--control-progress),
    var(--slider-track-color) var(--control-progress)
  );
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  margin-block-start: calc((var(--slider-track-size) - var(--slider-thumb-size)) / 2);
  border: 2px solid #1a1622;
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  box-shadow: 0 0 10px rgba(244, 139, 114, 0.7);
  transition: transform 0.12s ease;
}

.time-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}

.time-slider:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
  border-radius: 4px;
}

.time-slider::-moz-range-track {
  block-size: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: var(--slider-track-color);
}

.time-slider::-moz-range-progress {
  block-size: var(--slider-track-size);
  border-radius: var(--slider-track-radius);
  background: var(--slider-fill-color);
}

.time-slider::-moz-range-thumb {
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  border: 2px solid #1a1622;
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  box-shadow: 0 0 10px rgba(244, 139, 114, 0.7);
}

.keyboard-wrap {
  margin-top: 22px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.keyboard {
  position: relative;
  min-width: 980px;
  height: 154px;
  display: block;
  padding: 0 4px 8px;
}

.key {
  position: absolute;
  top: 0;
  border: 1px solid #d4d2ca;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #f5f2e9, #d9d8d1);
  height: 100%;
  box-shadow:
    inset 0 -8px 0 rgba(0, 0, 0, 0.06),
    0 7px 0 #aaa9a3;
  transition: 0.12s ease;
  cursor: pointer;
  user-select: none;
}

.key span.key-label {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: #777680;
  font-size: 10px;
  pointer-events: none;
}

.key.black {
  z-index: 2;
  height: 96px;
  border: 1px solid #101018;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, #373643, #14141e 65%);
  box-shadow:
    inset 0 -7px 0 rgba(255, 255, 255, 0.04),
    0 6px 0 #07070b;
  transform: translateX(-50%);
}

.key.black span.key-label {
  bottom: 8px;
  color: #c4c2d1;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.key.active {
  background: linear-gradient(90deg, #ffd494, #f4a477);
  box-shadow:
    inset 0 -8px 0 rgba(146, 64, 48, 0.15),
    0 7px 0 #bf735d;
}

.key.active span.key-label {
  color: #21151a;
  font-weight: 700;
}

.key.black.active {
  background: linear-gradient(90deg, #f7bb77, #bb6b57);
  box-shadow: 0 6px 0 #703c36;
}

.key.black.active span.key-label {
  color: #21151a;
  font-weight: 700;
}

.key.ground-start {
  box-shadow:
    inset 0 0 0 2px var(--mint),
    0 7px 0 #aaa9a3;
}

.key.black.ground-start {
  box-shadow:
    inset 0 0 0 2px var(--mint),
    0 6px 0 #07070b;
}

.key.ground-end {
  box-shadow:
    inset 0 0 0 2px var(--blue),
    0 7px 0 #aaa9a3;
}

.key.black.ground-end {
  box-shadow:
    inset 0 0 0 2px var(--blue),
    0 6px 0 #07070b;
}

.key-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

.key.ground-start .key-badge {
  background: var(--mint);
  color: #10211b;
}

.key.ground-end .key-badge {
  background: var(--blue);
  color: #0f1b2d;
}

.note-readout {
  margin-top: 9px;
  color: var(--gold);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  min-height: 16px;
}

.phase-readout {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 14px;
}

.grounding-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.grounding-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 0;
  background: rgba(16, 16, 24, 0.48);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.grounding-pill strong {
  color: var(--ink);
  font-weight: 700;
}

.grounding-pill.active-up {
  background: rgba(143, 224, 193, 0.1);
  color: #d6f7ea;
}

.grounding-pill.active-up strong {
  color: var(--mint);
}

.grounding-pill.active-down {
  background: rgba(135, 181, 255, 0.1);
  color: #dceaff;
}

.grounding-pill.active-down strong {
  color: var(--blue);
}

.grounding-shift-tag {
  color: var(--gold);
  font-weight: 700;
}

.scale-shift-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0;
}

.shift-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 16, 24, 0.48);
  border: 0;
  border-radius: 9px;
  padding: 3px 6px 3px 8px;
}

.shift-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shift-stepper {
  display: inline-flex;
  align-items: center;
  background: #13141b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.shift-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
  border-radius: 5px;
}

.shift-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
}

.shift-val {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  padding: 0 4px;
}

.shift-reset-btn {
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: 0.15s ease;
}

.shift-reset-btn:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.shift-reset-btn.hidden {
  opacity: 0.35;
  pointer-events: none;
}

.lane-cues {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-panel[hidden] {
  display: none;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.section-title span {
  color: var(--muted);
  font-size: 11px;
}

.cue-video-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 11px;
  opacity: 0.9;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.cue-video-link:hover {
  color: var(--ink);
  opacity: 1;
  text-decoration: underline;
}

.cue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 18px;
}

.cue {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cue strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.35;
}

.cue p {
  color: var(--muted);
  margin: 5px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
}

.cue p strong {
  display: inline;
  color: var(--gold);
  font-size: inherit;
  font-weight: 600;
}

.footer {
  color: #71717f;
  text-align: center;
  font-size: 11px;
  margin-top: 30px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.top-nav a:hover {
  color: var(--ink);
}

.top-nav a.active {
  color: #21151a;
  background: var(--gold);
}

.route-page[hidden] {
  display: none;
}

/* Song Lab */

.song-lab {
  --song-panel: #1a1a28;
  --song-panel-2: #242435;
}

.song-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.song-hero h1 {
  max-width: 820px;
}

.song-hero-copy {
  max-width: 720px;
}

.song-hero-copy p {
  color: var(--muted);
  line-height: 1.6;
  margin: 18px 0 0;
}

.song-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  white-space: nowrap;
}

.song-status strong {
  color: var(--mint);
  font-weight: 700;
}

.song-shell {
  display: grid;
  gap: 14px;
}

.logic-controlbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, #232533, #181a25);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.logic-controlbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: center;
}

.logic-transport-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #12141e;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.logic-transport-btn {
  min-inline-size: 38px;
  min-block-size: 34px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e5e3dc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.logic-transport-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.logic-transport-btn:focus-visible,
.song-select:focus-visible,
.song-ruler-section:focus-visible,
.coach-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.logic-transport-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.logic-play-btn.playing {
  color: #102318;
  background: #5ce08e;
  border-color: #82f0ab;
  box-shadow: 0 0 14px rgba(92, 224, 142, 0.35);
}

.logic-cycle-btn.active {
  color: #201604;
  background: #dfa928;
  border-color: #f6c957;
  box-shadow: 0 0 14px rgba(223, 169, 40, 0.35);
}

.logic-song-lcd {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-inline-size: 100%;
  gap: 11px;
  min-block-size: 42px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #080a10;
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.72);
  font-variant-numeric: tabular-nums;
  contain: layout style;
}

.logic-song-lcd .lcd-cell,
.logic-song-lcd .lcd-status-cell {
  min-inline-size: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.logic-song-lcd .lcd-divider {
  flex-shrink: 0;
}

.logic-song-lcd .lcd-label,
.logic-song-lcd .lcd-value {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcd-pos-cell {
  inline-size: 5.875rem;
  text-align: left;
}

.lcd-length-cell {
  inline-size: 2.875rem;
}

.lcd-pitch-cell {
  inline-size: 2.375rem;
}

.lcd-register-cell {
  inline-size: 3.625rem;
}

.lcd-value.lcd-sub {
  font-size: 14px;
  color: rgba(155, 231, 255, 0.68);
  text-shadow: none;
}

.lcd-value.lcd-note {
  font-size: 15px;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(242, 198, 110, 0.28);
}

.lcd-value.lcd-register {
  font-size: 12.5px;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.lcd-status-cell {
  display: grid;
  gap: 2px;
  inline-size: 13.5rem;
  text-align: left;
}

.lcd-status-value {
  color: #d6deeb;
  font-size: 11px;
  font-weight: 650;
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-select {
  min-block-size: 36px;
  padding: 6px 32px 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--ink);
  background: #141622;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.song-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.pitch-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #171924;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
}

.tracks-menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  flex-wrap: wrap;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #1f2230;
}

.tracks-menubar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.pitch-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  font-size: 11px;
}

.pitch-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pitch-legend-item b {
  font-weight: 750;
}

.pitch-legend-pitch b {
  color: var(--gold);
}

.pitch-legend-register b {
  color: #6fe3ff;
}

.pitch-legend-vibrato b {
  color: #ff70d2;
}

.pitch-legend-strength b {
  color: var(--coral);
}

.pitch-legend-brightness b {
  color: #7ce8b6;
}

.pitch-legend-breath b {
  color: #ffe178;
}

.pitch-legend-ribbon {
  width: 27px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 48%, #6fe3ff 52%, #6fe3ff 100%);
  box-shadow: 0 0 8px rgba(242, 198, 110, 0.25);
}

.pitch-legend-wave {
  width: 29px;
  height: 10px;
  overflow: visible;
}

.pitch-legend-width {
  width: 29px;
  height: 9px;
  background: var(--coral);
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
}

.pitch-legend-bright-swatch {
  width: 22px;
  height: 7px;
  border-radius: 999px;
  background: #7ce8b6;
  box-shadow: 0 0 8px rgba(124, 232, 182, 0.25);
}

.pitch-legend-breath-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 225, 120, 0.45);
  background: rgba(255, 225, 120, 0.14);
  color: #ffe178;
  font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1;
}

.tracks-area-frame {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  overflow: hidden;
  background: #10111a;
  isolation: isolate;
}

.song-ruler {
  position: relative;
  height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: #12141e;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
  contain: layout style paint;
}

.song-cycle-lane {
  position: absolute;
  inset: 0 0 auto;
  height: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #181a26;
}

.song-ruler-sections {
  position: absolute;
  inset: 0;
}

.song-ruler-section {
  position: absolute;
  top: 2px;
  bottom: 2px;
  min-width: 2px;
  padding: 0 6px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(245, 242, 232, 0.56);
  font-size: 9px;
  font-weight: 750;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.song-ruler-section:hover {
  color: var(--ink);
  background: rgba(244, 196, 83, 0.12);
}

.song-cycle-selection {
  position: absolute;
  top: 2px;
  height: 22px;
  min-width: 3px;
  border: 1px solid #ffe178;
  border-radius: 4px;
  background: linear-gradient(180deg, #e7b532, #c9961a);
  box-shadow: 0 0 12px rgba(231, 181, 50, 0.28);
  pointer-events: none;
}

.song-cycle-selection[hidden] {
  display: none;
}

.song-cycle-selection.inactive {
  opacity: 0.28;
}

.song-cycle-selection::before,
.song-cycle-selection::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: rgba(33, 21, 26, 0.65);
}

.song-cycle-selection::before {
  left: 2px;
}

.song-cycle-selection::after {
  right: 2px;
}

.song-ruler-scale {
  position: absolute;
  inset: 26px 0 0;
  cursor: ew-resize;
}

.song-ruler-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.song-ruler-tick.minor {
  top: auto;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.song-ruler-tick span {
  position: absolute;
  top: 5px;
  left: 5px;
  color: rgba(245, 242, 232, 0.58);
  font: 600 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.song-ruler-playhead {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.song-ruler-playhead::before {
  content: "";
  position: absolute;
  top: 24px;
  left: -5px;
  width: 11px;
  height: 10px;
  background: #e8e9ef;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}

.pitch-stage {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(135, 181, 255, 0.09), rgba(143, 224, 193, 0.02)), #131520;
  contain: layout style paint;
}

#pitchCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.pitch-playhead {
  position: absolute;
  left: 30%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #ffffff;
  box-shadow: 0 0 13px rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.pitch-orb {
  position: absolute;
  left: calc(30% - 9px);
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate3d(0, 201px, 0);
  background: var(--coral);
  box-shadow:
    0 0 0 6px rgba(244, 139, 114, 0.18),
    0 0 18px rgba(244, 139, 114, 0.65);
  pointer-events: none;
}

.lyrics-panel {
  position: relative;
  background: transparent;
}

.lyrics-panel[hidden] {
  display: none;
}

.lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 2px;
  background: transparent;
}

.lyrics-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lyrics-format-badge {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(242, 198, 110, 0.13);
  color: var(--gold);
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}

.lyrics-sync-btn {
  padding: 4px 10px;
  border: 1px solid rgba(242, 198, 110, 0.38);
  border-radius: 999px;
  background: rgba(242, 198, 110, 0.14);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lyrics-sync-btn:hover {
  background: rgba(242, 198, 110, 0.24);
}

.lyrics-sync-btn[hidden] {
  display: none;
}

.lyrics-scroller-frame {
  position: relative;
  contain: layout paint;
}

.lyrics-scroller-frame::before,
.lyrics-scroller-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8px;
  height: 18px;
  pointer-events: none;
  z-index: 2;
}

.lyrics-scroller-frame::before {
  top: 0;
  background: linear-gradient(180deg, #10111a 0%, rgba(16, 17, 26, 0) 100%);
}

.lyrics-scroller-frame::after {
  bottom: 0;
  background: linear-gradient(0deg, #10111a 0%, rgba(16, 17, 26, 0) 100%);
}

.lyrics-scroller {
  --scrollbar-thumb: rgba(245, 242, 232, 0.24);
  --scrollbar-track: rgba(255, 255, 255, 0.03);
  position: relative;
  max-height: 180px;
  overflow-y: auto;
  padding: 14px 18px 16px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@supports not (scrollbar-color: auto) {
  .lyrics-scroller::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .lyrics-scroller::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
  }

  .lyrics-scroller::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

.lyrics-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.lyrics-line-btn {
  width: 100%;
  min-block-size: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: rgba(245, 242, 232, 0.36);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease;
}

.lyrics-line-btn:hover {
  color: rgba(245, 242, 232, 0.78);
}

.lyrics-line-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lyrics-line-btn.past {
  color: rgba(245, 242, 232, 0.46);
}

.lyrics-line-btn.active {
  color: var(--gold);
}

.lyrics-line-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.lyrics-line-text {
  min-width: 0;
}

.lyrics-line-cue {
  display: block;
  min-width: 0;
  color: rgba(155, 231, 255, 0.42);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.18s ease;
}

.lyrics-line-cue strong {
  font-weight: 750;
  color: rgba(244, 139, 114, 0.58);
}

.lyrics-line-btn.past .lyrics-line-cue {
  color: rgba(155, 231, 255, 0.48);
}

.lyrics-line-btn.active .lyrics-line-cue {
  color: rgba(245, 242, 232, 0.86);
}

.lyrics-line-btn.active .lyrics-line-cue strong {
  color: var(--coral);
}

.lyrics-line-time {
  flex-shrink: 0;
  padding-top: 2px;
  color: rgba(245, 242, 232, 0.32);
  font: 600 10.5px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.lyrics-line-btn.active .lyrics-line-time {
  color: var(--gold);
}

.coach-note-banner {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.coach-note-banner[hidden] {
  display: none;
}

.coach-note-banner strong {
  display: inline-block;
  margin-right: 8px;
  color: rgba(245, 242, 232, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.youtube-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 200px;
  height: 200px;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
}

@container player (max-width: 600px) {
  .transport-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .controlbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tempo-stepper {
    width: 100%;
    justify-content: space-between;
  }

  .tempo-readout {
    flex: 1;
  }

  .metronome-btn {
    width: 100%;
  }

  .logic-lcd {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .hero,
  .app-grid,
  .song-workspace,
  .pre-routine-body {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 22px;
  }

  .hero-note {
    max-width: 550px;
  }

  .session-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side,
  .coach-notebook {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .song-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .logic-controlbar-center {
    inline-size: 100%;
    justify-content: space-between;
  }

  .logic-song-lcd {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1.15fr);
    inline-size: 100%;
    gap: 8px 10px;
  }

  .logic-song-lcd .lcd-divider {
    display: none;
  }

  .logic-song-lcd .lcd-cell {
    inline-size: auto;
  }

  .logic-song-lcd .lcd-status-cell {
    grid-column: 1 / -1;
    inline-size: auto;
    padding-block-start: 6px;
    border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .top-nav {
    order: 3;
    width: 100%;
  }

  .top-nav a {
    flex: 1;
    text-align: center;
  }

  .pitch-stage {
    height: 310px;
  }

  .logic-controlbar {
    align-items: stretch;
    flex-direction: column;
  }

  .logic-controlbar-left {
    width: 100%;
    justify-content: space-between;
  }

  .song-select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 22px 15px 38px;
  }

  .topbar {
    margin-bottom: 34px;
  }

  .topbar .pill {
    display: none;
  }

  .player,
  .side .card {
    padding: 17px;
  }

  .now-playing {
    grid-template-columns: 1fr auto;
    padding: 16px;
  }

  .now-name {
    font-size: 24px;
  }

  .play-button {
    width: 58px;
    height: 58px;
  }

  .pitch-card {
    padding: 12px;
  }

  .pitch-stage {
    height: 280px;
  }

  .logic-song-lcd .lcd-value {
    font-size: 0.9375rem;
  }

  .tracks-menubar {
    align-items: flex-start;
    flex-direction: column;
  }
}
