/* Hallmark · v2.0.0 · shape: app-shell · genre: modern-minimal · job: try the wind practice workbench · hero: workspace · nav: side rail and fixed bottom bar · footer: none · signature: interactive 5-line SVG staff and transport · material: real score data */
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R4 V5 · weakest: R, kept modal dialogs crisp over subtle overlay without heavy chrome */
:root {
  --paper: oklch(97.5% 0.006 250);
  --surface: oklch(99.2% 0.005 250);
  --surface-2: oklch(95% 0.008 250);
  --studio: oklch(18% 0.032 258);
  --studio-ink: oklch(98% 0.005 250);
  --studio-muted: oklch(78% 0.02 250);
  --ink: oklch(20% 0.024 255);
  --muted: oklch(46% 0.022 255);
  --rule: oklch(90% 0.01 255);
  --accent: oklch(52% 0.21 258);
  --accent-hover: oklch(45% 0.21 258);
  --accent-soft: oklch(94% 0.035 258);
  --accent-ink: oklch(99% 0.005 250);
  --success: oklch(40% 0.14 155);
  --success-soft: oklch(94% 0.04 155);
  --warn: oklch(45% 0.15 58);
  --warn-soft: oklch(95% 0.05 75);
  --danger: oklch(48% 0.20 24);
  --danger-soft: oklch(95% 0.04 24);
  --part-1: oklch(52% 0.21 258);
  --part-2: oklch(58% 0.14 185);
  --part-3: oklch(52% 0.19 292);
  --part-4: oklch(65% 0.17 58);
  --loop-fill: oklch(54% 0.21 258 / 0.09);
  --backdrop: oklch(18% 0.03 258 / 0.45);
  --shadow-sm: 0 2px 8px oklch(20% 0.02 255 / 0.05);
  --shadow-md: 0 10px 28px oklch(20% 0.02 255 / 0.1);
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text", "Segoe UI", sans-serif;
}

html, body { overflow-x: clip; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.subtext { color: var(--muted); font-size: 13px; }
.status-text { min-height: 20px; font-size: 13px; color: var(--danger); }
.status-text.ok { color: var(--success); }

.app-shell { display: flex; min-height: 100dvh; width: 100%; }
.side-nav {
  display: none;
  width: 224px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  padding: var(--space-lg) var(--space-md);
  flex-direction: column;
  gap: var(--space-lg);
  position: fixed;
  left: 0;
  top: 0;
  height: 100dvh;
}
.side-brand { display: flex; align-items: center; gap: var(--space-sm); padding: 0 var(--space-xs); }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.side-links { display: grid; gap: var(--space-2xs); }
.side-links .nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.side-links .nav-link:hover { background: var(--surface-2); color: var(--ink); }
.side-links .nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
}
.side-user-meta { min-width: 0; display: grid; }
.side-user-meta strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta small { font-size: 12px; color: var(--muted); }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  padding: 0 var(--space-md);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-header-left strong { font-size: 17px; font-weight: 700; }
.mobile-header-actions { display: flex; align-items: center; gap: var(--space-xs); }
.avatar-sm, .avatar-btn, .avatar-lg {
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 0;
  flex-shrink: 0;
}
.avatar-sm, .avatar-btn { width: 32px; height: 32px; font-size: 13px; cursor: pointer; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) 88px;
}
.screen { display: none; }
.screen.active { display: grid; gap: var(--space-md); }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: var(--space-xs) var(--space-xs) calc(var(--space-xs) + env(safe-area-inset-bottom));
}
.bottom-nav .nav-link {
  display: grid;
  justify-items: center;
  gap: var(--space-3xs);
  font-size: 11px;
  color: var(--muted);
  padding: var(--space-2xs) 0;
}
.bottom-nav .nav-link.active { color: var(--accent); font-weight: 600; }

.page-head, .practice-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.practice-topbar-right { display: flex; align-items: center; gap: var(--space-xs); }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.stack-md { display: grid; gap: var(--space-md); }
.stack-sm { display: grid; gap: var(--space-sm); }
.today-grid, .two-col, .practice-controls-grid { display: grid; gap: var(--space-md); }

.goal-card {
  background: var(--studio);
  color: var(--studio-ink);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  box-shadow: var(--shadow-md);
}
.goal-label { font-size: 13px; color: var(--studio-muted); }
.goal-value { display: flex; align-items: baseline; gap: var(--space-xs); margin: var(--space-xs) 0; }
.goal-value strong { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.goal-value span { font-size: 14px; color: var(--studio-muted); }
.goal-meta { font-size: 13px; color: var(--studio-muted); margin-bottom: var(--space-sm); }
.streak-pill {
  display: inline-flex;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
}
.goal-ring { position: relative; width: 112px; height: 112px; flex-shrink: 0; display: grid; place-items: center; }
.goal-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--studio-muted); stroke-width: 10; opacity: 0.25; }
.ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 0.35s ease;
}
.ring-center { position: absolute; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-xs);
  align-items: end;
  height: 120px;
  padding-top: var(--space-sm);
}
.week-col { display: grid; justify-items: center; gap: var(--space-2xs); height: 100%; grid-template-rows: 1fr auto; align-items: end; }
.week-bar-track { width: 100%; max-width: 24px; height: 100%; background: var(--surface-2); border-radius: var(--radius-sm); display: flex; align-items: flex-end; overflow: hidden; }
.week-bar-fill { width: 100%; background: var(--accent); border-radius: var(--radius-sm); min-height: 4px; }
.week-col small { font-size: 11px; color: var(--muted); }

.list-stack { display: grid; gap: var(--space-xs); }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid transparent;
}
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { border-color: var(--accent); }
.list-item-main { min-width: 0; display: grid; gap: var(--space-3xs); }
.list-item-main strong { font-size: 14px; font-weight: 600; }
.list-item-main span { font-size: 12px; color: var(--muted); }
.unread-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent); flex-shrink: 0; }

.filter-bar { display: grid; gap: var(--space-sm); }
.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-sm);
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}
.search-box svg { color: var(--muted); flex-shrink: 0; }
.search-box input { border: 0; background: transparent; width: 100%; outline: none; }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip {
  height: 36px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-full);
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.chip.sm { height: 32px; padding: 0 var(--space-sm); font-size: 12px; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.score-grid, .assignment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); }
.score-card, .assignment-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: grid;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.score-card:hover, .assignment-card:hover { border-color: var(--accent); }
.score-card-top, .assignment-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-xs); }
.score-card-actions { display: flex; gap: var(--space-xs); align-items: center; justify-content: space-between; padding-top: var(--space-xs); border-top: 1px solid var(--rule); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }

.score-stage { display: grid; gap: var(--space-sm); }
.stage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }
.beat-row { display: flex; align-items: center; gap: var(--space-xs); }
.beat-dot { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--rule); transition: transform 0.08s ease, background-color 0.08s ease; }
.beat-dot.on { background: var(--accent); transform: scale(1.25); }
.beat-dot.accent { background: var(--warn); transform: scale(1.35); }
.bpm-readout, .timer-pill {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-full);
  background: var(--surface-2);
}

.staff-viewport {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--paper);
}
.staff-svg { display: block; min-width: 100%; height: 210px; }

.archive-panel { padding: var(--space-sm); background: var(--surface-2); border-radius: var(--radius-md); }
.archive-chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); max-height: 120px; overflow-y: auto; }

.transport-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding-top: var(--space-xs);
}
.transport-btns { display: flex; align-items: center; gap: var(--space-sm); }
.play-fab {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.play-fab:hover { background: var(--accent-hover); }
.rec-btn.recording { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.rec-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--danger); }
.transport-status { display: grid; text-align: right; }
.transport-status span:first-child { font-size: 14px; font-weight: 600; }

.control-block { display: grid; gap: var(--space-xs); }
.control-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.loop-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); }
.inline-field { display: grid; gap: var(--space-2xs); font-size: 12px; color: var(--muted); }
.inline-field input, .inline-field select, .field input, .field textarea, .field select {
  width: 100%;
  min-height: 40px;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.field { display: grid; gap: var(--space-2xs); font-size: 13px; font-weight: 500; }
.field textarea { min-height: 76px; resize: vertical; }
.control-row-split { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }
.stepper { display: flex; align-items: center; gap: var(--space-sm); font-size: 14px; }
.stepper-ctrl { display: flex; align-items: center; gap: var(--space-xs); }
.switch-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-full);
  font-size: 13px;
  cursor: pointer;
}
.switch-pill input { accent-color: var(--accent); }

.parts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.part-pill {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--rule);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.part-pill.active { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.part-dot { width: 10px; height: 10px; border-radius: var(--radius-full); flex-shrink: 0; }
.recording-box { padding: var(--space-sm); border-radius: var(--radius-md); background: var(--surface-2); display: grid; gap: var(--space-xs); }
.waveform-bars { height: 34px; display: grid; grid-template-columns: repeat(24, 1fr); gap: var(--space-2xs); align-items: center; }
.waveform-bars span { background: var(--accent); border-radius: 2px; min-height: 4px; opacity: 0.7; }
.audio-player { width: 100%; height: 36px; }

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: var(--space-3xs);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--rule);
}
.seg-btn {
  border: 0;
  background: transparent;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.segmented.sm .seg-btn { padding: var(--space-2xs) var(--space-sm); font-size: 12px; }
.seg-btn.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.btn {
  min-height: 42px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  cursor: pointer;
  white-space: nowrap;
}
.btn.sm { min-height: 34px; padding: 0 var(--space-sm); font-size: 13px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface); border-color: var(--rule); color: var(--ink); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn:active, .chip:active, .play-fab:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--rule);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn.sm { width: 30px; height: 30px; }
.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 var(--space-2xs);
  border-radius: var(--radius-full);
  background: var(--danger);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.link-btn { border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }

.profile-layout { display: grid; gap: var(--space-md); }
.profile-hero-card { display: grid; gap: var(--space-md); }
.profile-identity { display: flex; align-items: center; gap: var(--space-md); }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); }
.role-switch-box { display: grid; gap: var(--space-xs); padding-top: var(--space-sm); border-top: 1px solid var(--rule); }
.profile-footer-actions { display: flex; justify-content: flex-end; }

.auth-view { min-height: 100dvh; display: grid; place-items: center; padding: var(--space-md); background: var(--paper); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-md); display: grid; gap: var(--space-md); }
.auth-brand { display: flex; align-items: center; gap: var(--space-sm); }
.quick-accounts { display: grid; gap: var(--space-xs); padding-top: var(--space-sm); border-top: 1px solid var(--rule); }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: var(--backdrop); display: grid; place-items: center; padding: var(--space-md); }
.modal-panel { width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-md); display: grid; gap: var(--space-md); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 80; background: var(--studio); color: var(--studio-ink); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-full); font-size: 13px; box-shadow: var(--shadow-md); }

@media (min-width: 840px) {
  .side-nav { display: flex; }
  .workspace { margin-left: 224px; }
  .mobile-header, .bottom-nav { display: none; }
  .main-content { padding: var(--space-xl) var(--space-xl); }
  .today-grid { grid-template-columns: 1.2fr 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .practice-controls-grid { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr 1fr; }
  .profile-hero-card { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
