
.rudiment-frame {
  --rd-accent: #5d367b;
  --rd-tint: #f4ecfa;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(14px, 3vw, 30px);
}
.rudiment-toolbar, .rudiment-controls, .rudiment-round-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.rudiment-toolbar label { display: grid; gap: 4px; font-size: .9rem; font-weight: 650; }
.rudiment-frame select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #b9cac7;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.rudiment-toolbar label:first-child { max-width: 100%; min-width: 0; }
#rudiment-project { margin-left: auto; align-self: end; }
.rudiment-progress { margin: 22px 0; font-size: .9rem; }
.rudiment-progress progress { width: 100%; height: 12px; accent-color: var(--rd-accent); }
.rudiment-progress ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0 0; list-style: none; }
.rudiment-progress li { border: 1px solid var(--line); border-radius: 20px; padding: 5px 10px; }
.rudiment-progress [aria-current] { background: var(--rd-tint); border-color: var(--rd-accent); color: var(--rd-accent); font-weight: 700; }
.rudiment-round-heading h2 { flex: 1 1 220px; font-size: clamp(1.45rem, 3.3vw, 2.15rem); margin: 0; }
.rudiment-round-heading label { font-size: .9rem; font-weight: 650; }
#rudiment-tempo { width: auto; }
#rudiment-pattern { margin: 14px 0; overflow-x: auto; background: #f8f6fa; border-radius: 9px; }
#rudiment-pattern > div { min-width: 490px; max-width: 1050px; margin: auto; }
#rudiment-pattern svg .rudiment-active-note { fill: var(--rd-accent); stroke: var(--rd-accent); }
#rudiment-play-status { color: var(--muted); font-size: .9rem; }
.rudiment-actions { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.rudiment-celebration { background: var(--rd-tint); border-radius: 12px; text-align: center; padding: clamp(20px, 5vw, 54px); }
.rudiment-celebration .rudiment-controls { justify-content: center; }
.rudiment-stars { color: var(--rd-accent); font-size: 3rem; animation: rudiment-pop .55s ease-out both; }
@keyframes rudiment-pop { from { transform: scale(.45); opacity: .3; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rudiment-stars { animation: none; } }

.rudiment-projecting { overflow: hidden; }
.rudiment-projecting :is(.site-header, .skip-link, footer, #rudiments-tool > .tool-heading, #rudiments-tool > .hint) { visibility: hidden; }
.rudiment-projection { position: fixed; inset: 0; z-index: 1000; border: 0; border-radius: 0; overflow: auto; overscroll-behavior: contain; }
.rudiment-projection #rudiment-pattern > div { max-width: 1400px; }
@media (max-width: 820px) {
  #rudiment-project { margin-left: 0; }
}
