@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-latin-400-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv01", "ss03";
  line-height: 1.5;
  --bg: #05070b;
  --panel: rgba(8, 13, 22, 0.82);
  --panel-strong: rgba(12, 18, 31, 0.96);
  --text: #f6f7fb;
  --soft: #c7cde0;
  --muted: #7f8798;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(178, 166, 255, 0.46);
  --accent: #7768ff;
  --accent-strong: #a89cff;
  --danger: #ff4d5b;
  --danger-soft: #ffc2c8;
  --setup-width: 68rem;
  --action-height: 3.05rem;
  --action-radius: 0.72rem;
  --action-padding: 0.72rem 1.15rem;
  --action-min-width: 9.25rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 18% 6%, rgba(119, 104, 255, 0.22), transparent 24rem),
    radial-gradient(circle at 82% 18%, rgba(81, 145, 255, 0.13), transparent 28rem),
    linear-gradient(180deg, #07101a 0%, var(--bg) 52%, #020306 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  cursor: pointer;
  min-height: 2.45rem;
  transition: border-color 120ms ease, box-shadow 120ms ease, filter 120ms ease, transform 120ms ease;
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(168, 156, 255, 0.9);
  outline-offset: 3px;
}

input {
  appearance: textfield;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--text);
  min-height: 2.7rem;
  outline: none;
  padding: 0 0.85rem;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

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

.app-shell {
  margin: 0 auto;
  min-height: calc(100svh - clamp(2rem, 6vw, 4rem));
  padding: clamp(1rem, 3vw, 2rem);
  width: min(100%, 78rem);
}

.app-shell-setup {
  display: block;
}

.setup-launcher {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
  margin: 0 auto;
  max-width: var(--setup-width);
  position: relative;
}

.setup-app-bar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 2.8rem;
}

.app-shell-practice {
  display: block;
  min-height: calc(100svh - clamp(2rem, 6vw, 4rem));
  overflow: visible;
}

.practice-stage {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  margin: 0 auto;
  max-width: var(--setup-width);
  width: 100%;
}

.app-brand {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 0.7rem;
  justify-self: start;
  margin: 0 0 -0.15rem;
  padding: 0;
  text-align: left;
}

.app-brand:focus-visible {
  border-radius: 0.85rem;
  outline: 2px solid rgba(154, 142, 255, 0.75);
  outline-offset: 0.35rem;
}

.setup-app-bar .shortcut-hint {
  margin: 0;
  text-align: right;
}

.brand-mark {
  inline-size: 2.15rem;
  block-size: 2.15rem;
  filter: drop-shadow(0 0 1.1rem rgba(114, 224, 255, 0.28));
  flex: 0 0 auto;
}

.brand-wordmark {
  color: var(--text);
  display: block;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 520;
  letter-spacing: 0.45em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.brand-subtitle {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin: 0.2rem 0 0;
  text-transform: uppercase;
}

.prompt {
  letter-spacing: 0;
}

.drill-header,
.prompt-deck,
.practice-context,
.practice-display {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 1.3rem 5rem rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.drill-header,
.practice-context {
  display: grid;
  gap: 0;
  overflow: hidden;
  width: 100%;
}

.drill-header {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 0.78fr) minmax(0, 1.04fr) minmax(0, 1.02fr) minmax(0, 1.18fr) minmax(0, 0.86fr);
  justify-self: center;
  position: relative;
}

.drill-cell {
  align-content: center;
  background: rgba(255, 255, 255, 0.025);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--soft);
  display: grid;
  gap: 0.2rem 0.45rem;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  min-height: 3.75rem;
  min-width: 0;
  padding: 0.62rem 1.1rem;
  position: relative;
  text-align: center;
}

.drill-cell:last-child {
  border-right: 0;
}

.drill-cell.is-open,
.drill-cell:not(.drill-cell-static):hover {
  background: rgba(119, 104, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(168, 156, 255, 0.35);
}

.drill-cell-static {
  cursor: default;
}

.drill-cell-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 660;
  grid-column: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drill-cell strong {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 660;
  line-height: 1.12;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drill-cell-chevron {
  color: var(--accent-strong);
  font-size: 1rem;
  opacity: 0.85;
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
}

.drill-cell-static .drill-cell-chevron {
  display: none;
}

.header-popovers {
  inset: 9.35rem auto auto 0;
  justify-self: center;
  min-height: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.header-popover {
  background: #080d16;
  border: 1px solid var(--line);
  border-radius: 1rem;
  display: none;
  max-width: min(100%, 24rem);
  padding: 1rem;
  position: relative;
}

.header-popover[data-popover="bpm"] {
  width: min(100%, 22.5rem);
}

.header-popover[data-popover="fret-range"] {
  margin-left: min(13%, calc(100% - 24rem));
}

.header-popover[data-popover="strings"] {
  margin-left: min(27%, calc(100% - 24rem));
}

.header-popover[data-popover="tuning"] {
  margin-left: min(46%, calc(100% - 24rem));
}

.header-popover[data-popover="targets"] {
  margin-left: min(64%, calc(100% - 24rem));
}

.header-popover[data-open="true"] {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(119, 104, 255, 0.22), 0 1.4rem 4rem rgba(0, 0, 0, 0.42), 0 0 2.5rem rgba(119, 104, 255, 0.13);
  display: block;
  pointer-events: auto;
}

.header-popover[data-open="true"]::before {
  background: #080d16;
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  content: "";
  height: 0.7rem;
  left: 1.4rem;
  position: absolute;
  top: -0.42rem;
  transform: rotate(45deg);
  width: 0.7rem;
}

.header-popover h2,
.prompt-deck h2 {
  color: var(--soft);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.fret-range-inputs,
.quick-picks,
.string-grid,
.preset-row,
.note-grid,
.choice-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fret-range-inputs {
  align-items: center;
}

.fret-range-inputs label,
.tuning-custom-row label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.bpm-field {
  background: #101725;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  margin-top: 0.2rem;
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.bpm-field:focus-within {
  border-color: rgba(190, 181, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(119, 104, 255, 0.22);
}

#bpm {
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 1.75rem;
  font-weight: 520;
  letter-spacing: 0.02em;
  min-height: 3.1rem;
  outline: 0;
  text-align: center;
  width: 100%;
}

.bpm-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.bpm-stepper-button {
  background: #101725;
  border-color: var(--line);
  border-left: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1;
  min-height: 0;
  padding: 0;
}

.bpm-stepper-button:first-child {
  border-radius: 0 0.35rem 0 0;
}

.bpm-stepper-button:last-child {
  border-radius: 0 0 0.35rem 0;
  border-top: 0;
}

.bpm-quick-label {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.11em;
  margin-top: 1rem;
  padding-top: 0.85rem;
  text-transform: uppercase;
}

.fret-range-picker {
  display: grid;
  gap: 0.85rem;
}

.fret-range-quick-label,
.fret-range-custom-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.fret-range-presets {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fret-preset-button {
  align-items: start;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  display: grid;
  gap: 0.12rem;
  justify-items: start;
  min-height: 3.15rem;
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.fret-preset-button strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.1;
}

.fret-preset-button span {
  color: var(--muted);
  font-size: 0.72rem;
}

.fret-preset-button.is-selected,
.quick-picks button.is-selected {
  background: rgba(119, 104, 255, 0.28);
  border-color: rgba(190, 181, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(119, 104, 255, 0.2), 0 0 1.25rem rgba(119, 104, 255, 0.16);
  color: var(--text);
}

.fret-preset-button.is-selected span {
  color: var(--soft);
}

.fret-span-rail {
  align-items: center;
  background: #101725;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--muted);
  display: grid;
  font-size: 0.72rem;
  font-weight: 640;
  gap: 0.55rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.62rem 0.7rem;
}

.fret-span-track {
  background: rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  height: 0.42rem;
  overflow: hidden;
  position: relative;
}

.fret-span-fill {
  background: linear-gradient(90deg, #7768ff, #b5acff);
  border-radius: 999px;
  box-shadow: 0 0 1.25rem rgba(119, 104, 255, 0.55);
  height: 100%;
  left: var(--fret-from);
  position: absolute;
  width: var(--fret-width);
}

.fret-range-custom-label {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

#fret-from,
#fret-to {
  text-align: center;
  width: 5rem;
}

.tuning-custom-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 5rem) minmax(0, 1fr);
  align-items: center;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

#custom-tuning {
  letter-spacing: 0.08em;
  min-width: 0;
  width: 100%;
}

.quick-picks {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(7, minmax(2.45rem, 1fr));
  margin-top: 0.45rem;
}

.quick-picks button,
.preset-button,
.string-chip,
.note-pill {
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  min-width: 0;
  padding: 0.45rem 0.72rem;
}

.quick-picks button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0.45rem 0.35rem;
  text-align: center;
}

.choice-stack {
  flex-direction: column;
}

.choice-row {
  align-items: start;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  display: grid;
  gap: 0.2rem;
  justify-items: start;
  padding: 0.7rem 0.85rem;
  text-align: left;
  width: 100%;
}

.choice-row span,
.microcopy,
.deck-heading p {
  color: var(--muted);
  font-size: 0.78rem;
}

.choice-row.is-selected,
.string-chip.is-selected,
.note-pill.is-selected {
  background: rgba(119, 104, 255, 0.18);
  border-color: rgba(190, 181, 255, 0.54);
  box-shadow: inset 0 0 0 1px rgba(119, 104, 255, 0.12), 0 0 1.3rem rgba(119, 104, 255, 0.08);
  color: var(--text);
}

.preset-button.is-selected {
  background: rgba(119, 104, 255, 0.24);
  border-color: rgba(190, 181, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(119, 104, 255, 0.18), 0 0 1.45rem rgba(119, 104, 255, 0.12);
  color: var(--text);
}

.preset-button:hover {
  background: rgba(119, 104, 255, 0.22);
  border-color: rgba(190, 181, 255, 0.55);
  color: var(--text);
}

.preset-button.is-selected:hover {
  background: rgba(119, 104, 255, 0.28);
  border-color: rgba(190, 181, 255, 0.72);
}

.prompt-deck {
  justify-self: center;
  padding: clamp(1.75rem, 3vw, 2rem);
  width: 100%;
}

.deck-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.deck-heading h2 {
  color: var(--text);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  letter-spacing: 0.01em;
  margin-bottom: 0.1rem;
  text-transform: none;
}

.note-pool-summary {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 660;
  margin: 0;
  white-space: nowrap;
}

.deck-tools {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr));
  justify-content: stretch;
}

.note-pill {
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 2.6rem;
  min-width: 3rem;
}

.microcopy {
  margin: 0.95rem 0 0;
  text-align: center;
}

.deck-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.3rem;
  padding-top: 1.1rem;
}

.deck-footer p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

.deck-footer .primary-action {
  min-width: min(100%, var(--action-min-width));
}

.deck-footer .primary-action:hover {
  filter: brightness(1.06);
}

.primary-action,
.secondary-action,
.danger-action {
  align-items: center;
  border-radius: var(--action-radius);
  box-shadow: none;
  display: inline-flex;
  font-size: 0.96rem;
  font-weight: 640;
  height: var(--action-height);
  justify-content: center;
  letter-spacing: 0.01em;
  line-height: 1.1;
  min-height: var(--action-height);
  min-width: min(100%, var(--action-min-width));
  padding: var(--action-padding);
  text-align: center;
  text-transform: none;
}

.primary-action {
  background: rgba(119, 104, 255, 0.18);
  border-color: rgba(190, 181, 255, 0.58);
  box-shadow: none;
  color: var(--text);
}

.primary-action:disabled,
.primary-action[aria-disabled="true"] {
  cursor: not-allowed;
  filter: saturate(0.35);
  opacity: 0.5;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.danger-action {
  background: rgba(255, 77, 91, 0.075);
  border-color: rgba(255, 77, 91, 0.5);
  color: var(--danger-soft);
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.shortcut-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 640;
  letter-spacing: 0.08em;
  margin: 0.25rem 0 0;
  text-align: center;
  text-transform: uppercase;
}

.shortcut-plain {
  display: none;
}

.touch-first .shortcut-hint {
  display: none;
}

.touch-first.keyboard-seen .shortcut-hint {
  display: block;
}

@media (hover: none) and (pointer: coarse) {
  .shortcut-hint {
    display: none;
  }

  .keyboard-seen .shortcut-hint {
    display: block;
  }
}

kbd {
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--soft);
  padding: 0.1rem 0.35rem;
}

.error,
.field-error {
  color: var(--danger-soft);
  font-weight: 700;
}

.practice-context {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 0.78fr) minmax(0, 1.04fr) minmax(0, 1.02fr) minmax(0, 1.18fr) minmax(0, 0.86fr);
}

.practice-context div {
  align-content: center;
  background: rgba(255, 255, 255, 0.018);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.58rem 1rem;
  text-align: center;
}

.practice-context div:last-child {
  border-right: 0;
}

.practice-context span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 660;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.practice-context strong {
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 640;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-display {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
  margin: auto;
  min-height: 31rem;
  padding: clamp(0.9rem, 3vw, 1.45rem);
  text-align: center;
  width: 100%;
}

.practice-actions {
  flex-wrap: nowrap;
}

.practice-actions .secondary-action,
.practice-actions .danger-action {
  min-width: min(100%, var(--action-min-width));
}

.practice-cue-row {
  align-items: center;
  display: inline-grid;
  gap: 0.45rem;
  grid-template-columns: auto auto;
  justify-content: center;
  max-width: 100%;
}

.practice-string {
  display: grid;
  justify-self: start;
}

.is-reserved {
  visibility: hidden;
}

.current-note span,
.next-note span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-note strong {
  color: var(--accent-strong);
  font-size: clamp(2.5rem, 8vw, 4.1rem);
  line-height: 0.95;
}

.practice-string strong,
.beat-meter strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 700;
  padding: 0.28rem 0.75rem;
}

.practice-string strong {
  color: var(--soft);
}

.beat-meter strong {
  color: var(--muted);
}

.beat-meter,
.beat-meter-slot {
  justify-self: end;
}

.beat-meter-slot {
  min-width: 3.5rem;
  visibility: hidden;
}

.current-note {
  display: grid;
  gap: 0.05rem;
}

.hero-label {
  display: block;
  line-height: 1.5;
  min-height: 1.5em;
}

.current-note strong {
  color: var(--text);
  font-size: clamp(5.5rem, 24vw, 12rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.82;
  text-shadow: 0 0 5rem rgba(119, 104, 255, 0.22);
}

.current-note-done strong {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  line-height: 0.95;
  text-shadow: none;
}

.next-note {
  display: grid;
}

.practice-status {
  border: 1px solid transparent;
  border-radius: 999px;
  color: transparent;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  line-height: 1;
  margin: -0.2rem 0;
  min-height: calc(1em + 0.5rem + 2px);
  padding: 0.25rem 0.8rem;
  text-transform: uppercase;
}

.practice-status.is-paused {
  border-color: var(--line);
  color: var(--soft);
}

.note-progress-rail {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  justify-content: safe center;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
  width: min(100%, max-content);
}

.progress-cell {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.42rem;
  color: #e8ecfb;
  display: inline-grid;
  flex: 0 0 auto;
  font-size: 0.85rem;
  inline-size: 2.65rem;
  justify-content: center;
  min-height: 2.05rem;
  padding: 0.3rem 0.2rem;
}

.progress-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-cell.is-complete {
  background: rgba(255, 255, 255, 0.018);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(127, 135, 152, 0.72);
}

.progress-cell.is-current {
  background: rgba(130, 116, 255, 0.12);
  border-color: rgba(196, 188, 255, 0.72);
  box-shadow: inset 0 -2px 0 rgba(196, 188, 255, 0.85);
  color: var(--text);
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  width: min(100%, 34rem);
}

.done-actions .primary-action,
.done-actions .secondary-action {
  min-width: min(100%, var(--action-min-width));
}

@media (max-height: 700px) and (min-width: 721px) {
  .app-shell {
    padding-bottom: 1rem;
    padding-top: 1rem;
  }

  .practice-stage {
    gap: 0.65rem;
  }

  .practice-context div {
    padding-bottom: 0.4rem;
    padding-top: 0.4rem;
  }

  .practice-display {
    gap: 0.38rem;
    min-height: 25rem;
    padding-bottom: 0.85rem;
    padding-top: 0.85rem;
  }

  .current-note strong {
    font-size: clamp(4.5rem, 15vw, 8.4rem);
  }

  .current-note-done strong {
    font-size: clamp(2.3rem, 7vw, 4rem);
  }

  .next-note strong {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .primary-action,
  .secondary-action,
  .danger-action {
    min-height: 3rem;
    padding-bottom: 0.6rem;
    padding-top: 0.6rem;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0.65rem;
  }

  .app-brand {
    justify-self: start;
    text-align: left;
  }

  .setup-app-bar {
    display: grid;
    gap: 0.55rem;
    justify-items: stretch;
  }

  .setup-app-bar .shortcut-hint {
    justify-self: start;
    text-align: left;
  }

  .brand-wordmark {
    font-size: 1rem;
    letter-spacing: 0.45em;
    text-transform: uppercase;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-mark {
    inline-size: 1.85rem;
    block-size: 1.85rem;
  }

  .setup-launcher {
    gap: 0.65rem;
  }

  .drill-header {
    grid-template-columns: 1fr;
  }

  .header-popovers:not(:has(.header-popover[data-open="true"])) {
    display: none;
  }

  .header-popovers {
    inset: auto;
    justify-self: stretch;
    margin-top: 0;
    position: static;
    width: 100%;
  }

  .header-popover {
    border-radius: 1rem;
    margin-left: 0;
    max-height: min(70svh, 32rem);
    max-width: 100%;
    overflow: auto;
    width: 100%;
  }

  .header-popover[data-popover] {
    margin-left: 0;
  }

  .header-popover[data-popover="bpm"] {
    width: 100%;
  }

  .header-popover[data-open="true"]::before {
    display: none;
  }

  .practice-context {
    grid-template-columns: 1fr 1fr;
  }

  .practice-context div {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0.42rem 0.65rem;
  }

  .practice-context div:nth-child(2n) {
    border-right: 0;
  }

  .practice-context div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .quick-picks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fret-range-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drill-cell {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    gap: 0.3rem 0.85rem;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    justify-items: stretch;
    min-height: 3.3rem;
    padding: 0.55rem 0.75rem;
    text-align: left;
  }

  .drill-cell-label {
    align-self: center;
    justify-self: start;
  }

  .drill-cell strong {
    align-self: center;
    justify-self: start;
  }

  .drill-cell-chevron {
    right: 0.75rem;
  }

  .drill-cell:last-child {
    border-bottom: 0;
  }

  .deck-heading,
  .deck-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .prompt-deck {
    padding: 1rem;
  }

  .deck-heading {
    margin-bottom: 0.75rem;
  }

  .deck-tools {
    gap: 0.5rem;
    margin-bottom: 0.65rem;
  }

  .note-pool-summary {
    white-space: normal;
  }

  .note-grid {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .note-pill {
    min-height: 2.45rem;
  }

  .tuning-custom-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .app-shell-practice {
    height: auto;
    min-height: calc(100svh - 1.7rem);
    overflow: auto;
  }

  .practice-stage {
    gap: 0.65rem;
  }

  .practice-display {
    gap: 0.45rem;
    min-height: 22.5rem;
    padding: 0.75rem;
  }

  .current-note-done strong {
    font-size: clamp(2.1rem, 13vw, 3.6rem);
  }

  .note-progress-rail {
    flex-wrap: nowrap;
    justify-content: safe center;
    overflow-x: auto;
    padding: 0.15rem 0 0.65rem;
    scrollbar-gutter: stable;
    width: 100%;
  }

  .progress-cell {
    flex: 0 0 auto;
  }

  .note-pill,
  .preset-button,
  .string-chip,
  .quick-picks button {
    width: auto;
  }

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

  .done-actions {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .done-actions .primary-action,
  .done-actions .secondary-action {
    font-size: 0.82rem;
    min-width: 0;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    white-space: nowrap;
  }

  .actions {
    width: 100%;
  }

  .primary-action,
  .secondary-action,
  .danger-action {
    width: 100%;
  }

  .deck-footer {
    display: grid;
    justify-content: stretch;
    width: 100%;
  }

  .deck-footer .primary-action {
    min-height: 3.1rem;
    width: 100%;
  }
}
