:root {
  --paper: #f2f3f1;
  --paper-2: #e9ebe8;
  --surface: #ffffff;
  --ink: #171819;
  --muted: #747874;
  --line: #dfe1dd;
  --accent: #ff6a1a;
  --accent-dark: #e6530c;
  --focus: #111315;
  --focus-soft: #1b1e22;
  --cream: #f1f2ee;
  --success: #5f8066;
  --danger: #b24737;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 18px 48px rgba(25, 28, 27, 0.08);
  --ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --display: var(--ui);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--ui); }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(255, 106, 26, .28); outline-offset: 2px; }

.topbar { min-height: 72px; padding: 0 clamp(22px, 3vw, 44px); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(24px, 3vw, 48px); border-bottom: 1px solid #2c3035; color: var(--cream); background: #15171a; }
.brand { border: 0; background: none; padding: 0; color: #f6f6f2; font-family: var(--display); font-size: 20px; letter-spacing: .16em; font-weight: 900; cursor: pointer; }
.brand--static { font-size: 24px; margin-bottom: 70px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { border: 0; border-radius: 6px; padding: 9px 12px; color: #85898e; background: none; font-size: 13px; font-weight: 700; cursor: pointer; transition: color .16s ease, background .16s ease; }
.nav-link:hover { color: #d5d7d5; background: #202328; }
.nav-link.is-active { color: #fff; background: #292c31; }
.weekly-summary { min-width: 292px; display: grid; grid-template-columns: repeat(3, auto) 64px; gap: 15px; align-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.weekly-summary > div:not(.week-bars) { display: grid; gap: 3px; }
.weekly-summary span { color: #777b80; font-size: 9px; }
.weekly-summary strong { color: #f1f2ee; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.week-bars { height: 30px; display: flex; align-items: end; gap: 4px; padding-left: 12px; border-left: 1px solid #34383d; }
.week-bars i { width: 5px; min-height: 5px; background: #4b4f55; border-radius: 1px 1px 0 0; transition: height .3s ease; }
.week-bars i.is-today { background: var(--accent); }

.workspace { padding: 12px; display: grid; grid-template-columns: minmax(220px, 264px) 1fr; gap: 12px; height: calc(100vh - 72px); min-height: 640px; background: var(--focus); }
.workspace.is-menu-collapsed { grid-template-columns: 48px minmax(0, 1fr); }
.practice-menu { min-width: 0; position: relative; display: flex; flex-direction: column; border: 1px solid #2d3136; border-radius: var(--radius-md); color: #eef0ec; background: #15171a; overflow: hidden; }
.menu-collapse-toggle { position: absolute; z-index: 2; top: 12px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #393d43; border-radius: 50%; color: #8c9095; background: #1d2024; font-size: 17px; line-height: 1; cursor: pointer; }
.menu-collapse-toggle:hover { color: var(--accent); border-color: #865039; }
.collapsed-menu { display: none; }
.workspace.is-menu-collapsed .practice-menu > :not(.menu-collapse-toggle):not(.collapsed-menu) { display: none; }
.workspace.is-menu-collapsed .menu-collapse-toggle { top: 10px; right: 9px; }
.workspace.is-menu-collapsed .collapsed-menu { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #777b80; }
.workspace.is-menu-collapsed .collapsed-menu strong { color: var(--accent); font-family: var(--display); font-size: 19px; }
.workspace.is-menu-collapsed .collapsed-menu span { font-size: 10px; writing-mode: vertical-rl; }
.menu-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 18px 13px; }
.menu-heading { padding-right: 50px; }
.overline { display: block; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.menu-heading h2 { margin: 6px 0 0; font-size: 17px; }
.menu-heading > span { color: #73777c; font-family: var(--mono); font-size: 10px; }
.menu-progress { height: 2px; margin: 0 18px 10px; background: #292d31; overflow: hidden; }
.menu-progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.practice-list { display: grid; }
.practice-row { width: 100%; min-height: 72px; display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; border: 0; border-top: 1px solid #282c31; background: transparent; padding: 10px 14px; color: #e8eae7; text-align: left; cursor: pointer; transition: background .18s; }
.practice-row:hover { background: #1d2024; }
.practice-row.is-active { background: #24272c; box-shadow: inset 3px 0 var(--accent); }
.practice-row.is-done { color: #70747a; }
.practice-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #a4a7ab; background: #2a2d32; font-size: 10px; font-weight: 800; }
.practice-row.is-active .practice-index { color: #111315; background: var(--accent); }
.practice-row strong, .practice-row small { display: block; }
.practice-row strong { font-size: 12px; }
.practice-row small { margin-top: 4px; color: #777b80; font-size: 10px; }
.practice-row > b { color: #777b80; font-family: var(--mono); font-size: 9px; }
.menu-note { margin: auto 16px 16px; padding: 13px 0 0; border-top: 1px solid #2d3136; }
.menu-note span { color: #7f8388; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.menu-note p { margin: 6px 0 0; color: #a5a8ac; font-size: 10px; line-height: 1.55; }

.focus-panel { min-width: 0; position: relative; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(28px, 3.2vw, 52px); border: 1px solid #3e3830; border-radius: var(--radius-md); background: radial-gradient(circle at 72% 42%, #24221e 0, var(--focus) 42%), var(--focus); color: var(--cream); overflow: hidden; }
.focus-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background: repeating-linear-gradient(90deg, transparent 0 92px, rgba(255,255,255,.025) 92px 93px); }
.focus-panel.is-rest { background: radial-gradient(circle at 65% 45%, #2b3327 0, #151814 50%); }
.focus-head { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 28px; }
.focus-head h1 { margin: 12px 0 10px; color: #f4e7d8; font-family: var(--display); font-size: clamp(30px, 3vw, 50px); letter-spacing: .025em; line-height: 1.08; }
.focus-head p { max-width: 720px; margin: 0; color: #bd9f7f; line-height: 1.6; }
.suggestion { width: 210px; align-self: flex-start; padding: 13px; border: 1px solid #5b4635; border-radius: var(--radius-sm); background: rgba(255,255,255,.03); }
.suggestion span, .suggestion small, .suggestion strong { display: block; }
.suggestion span { color: #b58d69; font-size: 11px; }
.suggestion strong { margin: 4px 0; color: var(--cream); font-size: 20px; }
.suggestion small { color: #a88d73; line-height: 1.4; }
.focus-stage { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(160px, .7fr) 1.4fr minmax(190px, .7fr); align-items: center; gap: clamp(24px, 4vw, 70px); }
.bpm-readout { padding-right: 30px; border-right: 1px solid #5d4937; }
.bpm-readout span, .timer-readout span { color: #c39b74; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.bpm-readout div { margin-top: 12px; white-space: nowrap; }
.bpm-readout strong { color: var(--accent); font-family: var(--display); font-size: clamp(64px, 7vw, 104px); line-height: .8; }
.bpm-readout em { color: #c6a07c; font-family: var(--display); font-size: clamp(28px, 3vw, 52px); font-style: normal; }
.bpm-readout small { display: block; margin-top: 14px; color: #c39b74; font-size: 16px; letter-spacing: .12em; }
.timer-readout { text-align: center; }
.timer-readout strong { display: block; color: #f2e3d3; font-family: var(--display); font-size: clamp(80px, 11vw, 170px); letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-readout small { color: #a68b70; }
.metronome { justify-self: center; position: relative; width: clamp(150px, 15vw, 220px); aspect-ratio: 1; display: grid; place-content: center; border: 1px solid #8f6949; border-radius: 50%; background: transparent; color: var(--cream); cursor: pointer; }
.metronome-ring { position: absolute; inset: 9px; border: 1px dashed #a67b56; border-radius: 50%; opacity: .8; }
.metronome strong { color: var(--accent); font-family: var(--display); font-size: clamp(44px, 5vw, 72px); line-height: .9; }
.metronome small, .metronome em { display: block; font-style: normal; }
.metronome small { margin-top: 8px; color: #c3a17f; font-weight: 700; letter-spacing: .1em; }
.metronome em { margin-top: 12px; color: #987b61; font-size: 10px; }
.metronome.is-running { box-shadow: 0 0 0 8px rgba(214, 91, 12, .08), inset 0 0 40px rgba(214, 91, 12, .08); }
.metronome:disabled { cursor: not-allowed; opacity: .55; }
.metronome.is-running .metronome-ring { animation: pulse 1s infinite; }
.focus-controls { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-top: 28px; border-top: 1px solid #5b4533; }
.focus-controls > div { display: flex; gap: 12px; }
.shortcut { color: #96785d; font-size: 12px; }

.button { min-height: 40px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 17px; font-size: 13px; font-weight: 750; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #111315; background: var(--accent); box-shadow: none; }
.button--primary:hover { background: var(--accent-dark); }
.button--outline { color: #4f5350; border-color: #cfd2ce; background: var(--surface); }
.focus-panel .button--outline { color: #d8ab83; }
.button--ghost { border-color: #6a513d; color: #c69b75; background: transparent; }
.button--wide { width: 100%; }
.button--danger { color: var(--danger); border-color: #d9b5ad; background: transparent; }

.onboarding { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) minmax(620px, 1.1fr); background: var(--paper); }
.onboarding-copy { padding: clamp(40px, 6vw, 90px); display: flex; flex-direction: column; justify-content: center; background: var(--focus); color: var(--cream); }
.onboarding-copy h1 { margin: 0; max-width: 650px; font-family: var(--display); font-size: clamp(44px, 4vw, 62px); line-height: 1.05; letter-spacing: -.045em; }
.onboarding-copy p { max-width: 600px; margin: 26px 0 32px; color: #92969a; font-size: 16px; line-height: 1.75; }
.principles { display: flex; gap: 12px; color: #a6aaad; font-size: 12px; }
.principles span + span::before { content: "·"; margin-right: 12px; color: var(--accent); }
.onboarding-form { width: min(720px, calc(100% - 70px)); align-self: center; justify-self: center; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.form-heading { display: flex; gap: 18px; align-items: start; margin-bottom: 30px; }
.form-heading > span { color: var(--accent); font-family: var(--display); font-size: 34px; font-weight: 800; }
.form-heading h2 { margin: 0 0 5px; font-size: 27px; }
.form-heading p, .privacy-note { margin: 0; color: var(--muted); }
fieldset { margin: 0 0 24px; padding: 0; border: 0; }
legend, label { color: #4f4941; font-size: 13px; font-weight: 700; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f7f8f6; cursor: pointer; }
.segmented input:checked + span { color: #b7430b; border-color: var(--accent); background: #fff4ed; box-shadow: inset 0 0 0 1px var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px; }
.form-grid label, .settings-form label, dialog label { display: grid; gap: 8px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; color: var(--ink); background: white; }
textarea { resize: vertical; }
.day-inputs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 10px; }
.day-inputs label { min-width: 0; display: grid; place-items: center; gap: 5px; padding: 9px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f7f8f6; }
.day-inputs input { min-width: 0; padding: 8px 3px; border: 0; background: transparent; text-align: center; font-size: 18px; font-weight: 750; }
.day-inputs small { color: var(--muted); font-weight: 400; }
.privacy-note { margin-top: 13px; text-align: center; font-size: 11px; }

.page { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 38px 0 72px; }
.page--narrow { width: min(1040px, calc(100% - 48px)); }
.page-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 28px; }
.page-heading h1 { margin: 8px 0 7px; font-family: var(--display); font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.04em; }
.page-heading p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.week-plan { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.day-column { min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.day-column:last-child { border-right: 1px solid var(--line); }
.day-column.is-current { border-color: #f0ad88; background: var(--surface); box-shadow: inset 0 3px var(--accent); }
.day-head { width: 100%; min-height: 108px; display: grid; gap: 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 18px; text-align: left; cursor: pointer; }
.day-head span, .day-head small { color: var(--muted); font-size: 12px; }
.day-head strong { font-size: 19px; }
.day-items { padding: 12px; }
.plan-item { padding: 15px 5px; border-bottom: 1px solid var(--line); }
.plan-item span, .plan-item strong, .plan-item small { display: block; }
.plan-item span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.plan-item strong { margin: 5px 0; font-size: 14px; }
.plan-item small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.rest-day { padding: 18px 5px; color: var(--muted); font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-row button { border: 0; border-radius: 999px; padding: 8px 13px; color: var(--muted); background: transparent; cursor: pointer; }
.filter-row button.is-active { color: white; border-color: var(--ink); background: var(--ink); }
.exercise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exercise-card { min-height: 220px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: transform .15s, border-color .15s; }
.exercise-card:hover { transform: translateY(-1px); border-color: #c6c9c5; }
.exercise-card > div, .exercise-card footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.exercise-card > div span { color: var(--accent); font-weight: 800; }
.exercise-card h2 { margin: 28px 0 7px; font-size: 22px; }
.exercise-card p { margin: 0; color: var(--muted); }
.exercise-card footer { margin-top: auto; padding-top: 24px; }
dialog { width: min(560px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(21, 19, 16, .65); backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 18px; padding: 30px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button, .dialog-close { border: 0; background: none; font-size: 28px; cursor: pointer; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: transparent; }
.metric-row > div { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.metric-row > div:last-child { border: 0; }
.metric-row span, .metric-row strong { display: block; }
.metric-row span { color: var(--muted); font-size: 12px; }
.metric-row strong { margin-top: 8px; font-family: var(--mono); font-size: 34px; }
.progress-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.progress-panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.progress-panel h2 { margin: 0; }
.progress-panel > p { color: var(--muted); }
.category-bars { display: grid; gap: 14px; margin-top: 26px; }
.category-bars > div { display: grid; grid-template-columns: 76px 1fr 38px; gap: 12px; align-items: center; font-size: 12px; }
.category-bars i { height: 7px; background: var(--paper-2); }
.category-bars b { display: block; height: 100%; background: var(--accent); }
.record-list > div { display: grid; grid-template-columns: 55px 130px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.record-list span, .record-list small { color: var(--muted); }
.empty-list { color: var(--muted); padding: 30px 0 !important; }
.settings-form section, .data-settings { margin-bottom: 12px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.settings-form h2, .data-settings h2 { margin-top: 0; }
.settings-form .day-inputs { margin: 26px 0; }
.data-settings p { color: var(--muted); }
.data-settings > div { display: flex; flex-wrap: wrap; gap: 10px; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(14, 13, 11, .72); backdrop-filter: blur(5px); }
.review-dialog { position: relative; width: min(560px, 100%); padding: 34px; border: 1px solid #4d443a; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.review-dialog h2 { margin: 9px 0 24px; font-size: 28px; }
.dialog-close { position: absolute; right: 20px; top: 16px; }
.difficulty-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.difficulty-options button { min-height: 45px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; cursor: pointer; }
.difficulty-options button.is-selected { color: white; border-color: var(--accent); background: var(--accent); }
.bpm-field, .note-field { display: grid; gap: 10px; margin-top: 22px; }
.bpm-field > div { display: grid; grid-template-columns: 46px 1fr auto 46px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.bpm-field button { height: 48px; border: 0; background: var(--paper-2); cursor: pointer; }
.bpm-field input { border: 0; text-align: right; font-size: 19px; font-weight: 800; }
.bpm-field span { padding-right: 12px; color: var(--muted); }
.note-field { margin-bottom: 22px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: var(--radius-sm); color: white; background: var(--ink); box-shadow: var(--shadow); opacity: 0; transition: all .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.empty-state { min-height: calc(100vh - 112px); display: grid; place-content: center; justify-items: start; padding: 40px; }
.empty-state span { color: var(--accent); }
.empty-state h1 { margin: 8px 0; font-size: 52px; }
.empty-state p { max-width: 560px; margin: 0 0 24px; color: var(--muted); }

.page-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.inline-error { margin-bottom: 20px; padding: 14px 16px; border: 1px solid #d8aaa2; border-radius: var(--radius-sm); color: var(--danger); background: #fff4f2; }
.score-toolbar { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.score-toolbar .filter-row { margin-bottom: 20px; }
.text-button, .back-button { border: 0; padding: 7px 0; color: var(--accent); background: transparent; font-weight: 750; cursor: pointer; }
.score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.score-card { min-width: 0; min-height: 230px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; transition: transform .15s, border-color .15s; }
.score-card:hover { transform: translateY(-1px); border-color: #c5c8c4; }
.score-card-top { min-height: 57px; display: flex; justify-content: space-between; gap: 12px; align-items: start; padding: 18px 20px 8px; }
.score-card-top > div { display: flex; flex-wrap: wrap; gap: 5px; }
.score-card-top > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.score-stage { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; color: var(--stage-color); background: color-mix(in srgb, var(--stage-color) 10%, white); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.score-stage::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--stage-color); }
.score-stage--empty { --stage-color: #8d8983; }
.score-card-main { width: 100%; display: grid; grid-template-columns: 57px 1fr; gap: 17px; align-items: center; border: 0; padding: 20px; background: transparent; text-align: left; cursor: pointer; }
.score-file-icon { width: 52px; height: 64px; display: grid; place-items: center; border: 1px solid #d9dcd8; border-radius: 8px; color: var(--accent); background: #f6f7f5; font-family: var(--mono); font-size: 12px; font-weight: 850; box-shadow: none; }
.score-card-main strong, .score-card-main small { display: block; }
.score-card-main strong { overflow: hidden; font-family: var(--display); font-size: 19px; line-height: 1.2; text-overflow: ellipsis; }
.score-card-main small { margin-top: 9px; color: var(--muted); line-height: 1.5; }
.score-card footer { display: flex; gap: 15px; margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--line); }
.score-card footer button { border: 0; padding: 0; color: #5d554c; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.score-card footer .danger-link { margin-left: auto; color: var(--danger); }
.score-empty { min-height: 360px; display: grid; place-content: center; justify-items: center; border: 1px dashed #cfd2ce; border-radius: var(--radius-md); background: rgba(255,255,255,.42); text-align: center; }
.score-empty > span { color: #a6aaa6; font-family: var(--display); font-size: 58px; }
.score-empty h2 { margin: 0; font-family: var(--display); font-size: 26px; }
.score-empty p { margin: 10px 0 23px; color: var(--muted); }
.score-empty > div { display: flex; gap: 10px; }
.stage-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stage-checks label { position: relative; }
.stage-checks input { position: absolute; opacity: 0; pointer-events: none; }
.stage-checks span { display: block; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: #6f675d; background: white; cursor: pointer; }
.stage-checks input:checked + span { color: var(--stage-color); border-color: var(--stage-color); background: color-mix(in srgb, var(--stage-color) 9%, white); box-shadow: inset 0 0 0 1px var(--stage-color); }
.rights-check { grid-template-columns: 20px 1fr; align-items: center; }
.rights-check input { width: 16px; }
.dialog-note { color: var(--muted); line-height: 1.5; }
#stage-form input[type="color"] { height: 48px; padding: 5px; }
.linked-score { align-self: flex-start; margin-top: 18px; border: 0; border-radius: 999px; padding: 7px 11px; color: var(--accent); background: #fff0e5; font-size: 11px; font-weight: 750; cursor: pointer; }
.practice-score-button { margin-top: 17px; border: 1px solid #76563d; border-radius: 999px; padding: 9px 14px; color: #efb47f; background: rgba(255,255,255,.035); font-weight: 750; cursor: pointer; }

.score-workspace { width: min(1720px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 52px; }
.score-workspace-head { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 24px; }
.score-workspace-head h1 { margin: 5px 0 4px; font-family: var(--display); font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.035em; }
.score-workspace-head p { margin: 0; color: var(--muted); }
.score-workspace-head .overline { display: flex; flex-wrap: wrap; gap: 5px; }
.score-player-shell { border: 1px solid #2d3136; border-radius: var(--radius-md); background: white; overflow: hidden; box-shadow: 0 18px 50px rgba(24, 27, 26, .1); }
.score-player-controls { position: sticky; z-index: 4; top: 0; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #30343a; color: #eef0ec; background: var(--focus-soft); }
.score-player-controls label { display: grid; gap: 4px; color: #85898e; font-size: 9px; }
.score-player-controls select, .score-player-controls input { width: 116px; min-height: 34px; border-color: #3d4147; padding: 7px 9px; color: #f0f1ed; background: #15171a; }
.score-player-controls input { width: 82px; }
.player-main, .loop-button { min-height: 34px; border: 1px solid #41454b; border-radius: var(--radius-sm); padding: 7px 13px; color: #c9cccf; background: #15171a; font-weight: 750; cursor: pointer; }
.player-main { color: #111315; border-color: var(--accent); background: var(--accent); }
.loop-button.is-active { color: #ff9d68; border-color: #8f4e2c; }
.score-load-state { padding: 13px 18px; color: var(--muted); background: #f5f5f1; font-size: 11px; }
.score-canvas { min-height: 560px; max-height: calc(100vh - 240px); overflow: auto; padding: 20px 24px 50px; background: #fdfdfb; }
.score-canvas .at-surface { overflow: visible !important; }
.at-cursor-bar { background: rgba(214, 91, 12, .12); }
.at-cursor-beat { width: 3px; background: var(--accent); }
.at-highlight * { fill: var(--accent); stroke: var(--accent); }

.editor-meta { display: grid; grid-template-columns: minmax(230px, 1fr) 130px 120px minmax(330px, 1.4fr); gap: 14px; align-items: end; margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.55); }
.editor-meta label { display: grid; gap: 7px; }
.editor-meta fieldset { margin: 0; }
.bar-count { display: grid; gap: 7px; color: #4f4941; font-size: 13px; font-weight: 700; }
.bar-count > div { height: 43px; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; overflow: hidden; text-align: center; }
.bar-count button { height: 100%; border: 0; background: var(--paper-2); cursor: pointer; }
.bar-count button:disabled { cursor: not-allowed; opacity: .4; }
.editor-layout { display: grid; grid-template-columns: minmax(700px, 1.25fr) minmax(480px, .75fr); gap: 16px; align-items: start; }
.tab-grid-panel, .editor-preview { border: 1px solid var(--line); background: white; }
.tab-grid-help, .editor-preview > div:first-child { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tab-grid-help span { color: var(--muted); font-size: 12px; }
.tab-grid { display: grid; gap: 24px; max-height: calc(100vh - 340px); overflow: auto; padding: 24px; background: #f8f8f5; }
.tab-bar { min-width: 620px; display: grid; gap: 0; }
.tab-bar-head { margin-bottom: 9px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.tab-string { height: 38px; display: grid; grid-template-columns: 35px repeat(4, 1fr); align-items: center; border-bottom: 1px solid #989b96; }
.tab-string > span { color: var(--muted); font-family: var(--mono); font-weight: 800; }
.tab-string input { width: 50px; height: 29px; justify-self: center; border-color: #cfd2ce; border-radius: 50%; padding: 2px; color: var(--ink); background: #fff; text-align: center; font-family: var(--mono); font-weight: 850; appearance: textfield; }
.tab-string input:focus { outline: 2px solid #efb47f; border-color: var(--accent); background: white; }
.tab-string input::-webkit-inner-spin-button { appearance: none; }
.beat-numbers { display: grid; grid-template-columns: 35px repeat(4, 1fr); padding-top: 8px; color: #aaa096; text-align: center; font-family: monospace; font-size: 10px; }
.editor-preview { position: sticky; top: 18px; }
.editor-preview .score-canvas { min-height: 620px; max-height: calc(100vh - 260px); padding: 10px 4px; }

.practice-stage { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid #2d3136; border-radius: var(--radius-md); background: var(--focus-soft); overflow: hidden; }
.practice-console { min-height: 70px; display: grid; grid-template-columns: minmax(220px, 1fr) 110px 124px minmax(176px, 220px) auto; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #30343a; color: var(--cream); background: var(--focus-soft); }
.console-title { min-width: 0; display: grid; gap: 3px; }
.console-title > span, .console-metric > span, .console-timer > span { color: #84888d; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.console-title > span { color: var(--accent); }
.console-title strong { overflow: hidden; font-family: var(--display); font-size: 16px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.console-title small { overflow: hidden; color: #85898e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.console-metric, .console-timer { min-height: 44px; display: grid; align-content: center; padding-left: 12px; border-left: 1px solid #34383d; }
.console-metric strong { margin-top: 3px; color: var(--accent); font-family: var(--mono); font-size: 24px; line-height: 1; }
.console-metric strong small { margin-left: 3px; color: #85898e; font-family: var(--mono); font-size: 9px; font-weight: 650; }
.console-timer { text-align: center; }
.console-timer strong { color: #f2f3ef; font-family: var(--mono); font-size: 29px; font-variant-numeric: tabular-nums; line-height: 1; }
.console-timer small { color: #777b80; font-size: 8px; }
.console-metronome-control { display: grid; grid-template-columns: minmax(104px, 1fr) 58px; gap: 6px; align-items: stretch; }
.console-metronome { min-height: 42px; display: grid; grid-template-columns: 13px 1fr; grid-template-rows: 1fr 1fr; column-gap: 7px; align-items: center; border: 1px solid #3c4046; border-radius: var(--radius-sm); padding: 5px 9px; color: #a9acb0; background: #15171a; cursor: pointer; }
.console-metronome i { grid-row: 1 / -1; width: 8px; height: 8px; border-radius: 50%; background: #4c5056; box-shadow: 0 0 0 4px rgba(255,106,26,.05); }
.console-metronome span { align-self: end; color: #808489; font-size: 8px; }
.console-metronome strong { align-self: start; color: #eceeeb; font-family: var(--mono); font-size: 15px; }
.console-metronome.is-running { border-color: var(--accent); background: #211a17; }
.console-metronome.is-running i { background: var(--accent); animation: pulse .5s infinite; }
.console-metronome:disabled { cursor: not-allowed; opacity: .45; }
.console-metronome-control select { width: 100%; height: 42px; border-color: #3c4046; border-radius: var(--radius-sm); padding: 2px 20px 2px 7px; color: #aeb1b5; background-color: #15171a; font-size: 9px; }
.console-actions { display: flex; justify-content: flex-end; gap: 8px; }
.practice-console .button { min-height: 32px; padding: 6px 10px; font-size: 10px; }
.practice-console .button--outline { color: #c0c3c6; border-color: #45494f; background: transparent; }
.practice-console .button--ghost { color: #8f9398; border-color: #3a3e44; }
.practice-main { min-height: 0; display: grid; grid-template-columns: minmax(580px, 1fr) minmax(280px, 320px); background: #f5f5f1; }
.practice-material { min-width: 0; overflow: auto; padding: clamp(24px, 2.5vw, 38px); background: #f5f5f1; }
.coach-rail { min-width: 0; overflow-y: auto; border-left: 1px solid #2c3035; padding: 20px; color: #eef0ec; background: #17191d; }
.coach-progress { padding-bottom: 16px; border-bottom: 1px solid #30343a; }
.coach-progress > span { color: #85898e; font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.coach-progress > div { display: flex; align-items: center; gap: 6px; margin-top: 11px; }
.coach-progress i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #373b41; border-radius: 50%; color: #7c8085; background: transparent; font-size: 9px; font-style: normal; font-weight: 800; }
.coach-progress i.is-active { color: #111315; border-color: var(--accent); background: var(--accent); box-shadow: none; }
.coach-progress i.is-done { color: #8eb296; border-color: #4c6752; background: #1b2920; }
.coach-step { padding: 19px 0 13px; }
.coach-step h2 { margin: 8px 0 9px; font-family: var(--display); font-size: 19px; line-height: 1.18; }
.coach-step p { margin: 0; color: #9a9da1; font-size: 11px; line-height: 1.65; }
.action-cue, .fallback-card, .pass-checks { margin-top: 10px; padding: 13px; border: 1px solid #30343a; border-radius: var(--radius-sm); background: #1d2025; }
.action-cue > span, .fallback-card > span, .pass-checks > span { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.action-cue strong { color: #eceeeb; font-size: 11px; line-height: 1.55; }
.pass-checks > div { display: grid; grid-template-columns: 20px 1fr; gap: 7px; align-items: start; padding: 6px 0; }
.pass-checks i { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #454950; border-radius: 50%; color: #8d9196; font-size: 9px; font-style: normal; }
.pass-checks p, .fallback-card p { margin: 0; color: #a0a3a7; font-size: 10px; line-height: 1.55; }
.fallback-card { border-left: 2px solid var(--accent); background: #211b18; }
.coach-suggestion { margin-top: 14px; padding: 14px; border: 1px solid #75452f; border-radius: var(--radius-sm); background: #221b18; }
.coach-suggestion > span { color: var(--accent); font-size: 10px; font-weight: 800; }
.coach-suggestion > strong { display: block; margin: 7px 0 11px; color: #e6e8e4; font-size: 11px; line-height: 1.55; }
.coach-suggestion > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.coach-suggestion button { min-height: 34px; border: 1px solid #d9a079; border-radius: 5px; color: #7c4a2b; background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.coach-suggestion button:last-child { color: white; border-color: var(--accent); background: var(--accent); }
.tab-sheet-head, .embedded-score-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tab-sheet-head h2, .embedded-score-head h2 { margin: 7px 0 0; font-family: var(--display); font-size: clamp(25px, 2.6vw, 36px); letter-spacing: -.035em; }
.tab-sheet-head > span, .embedded-score-head p { margin: 0; color: var(--muted); font-size: 11px; }
.tab-measures { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; margin-top: 38px; }
.practice-tab-measure { min-width: 230px; }
.practice-tab-measure > b { display: block; margin-bottom: 14px; color: var(--accent); font-size: 10px; letter-spacing: .08em; }
.practice-tab-string { height: 38px; display: grid; grid-template-columns: 28px repeat(4, 1fr); align-items: center; border-bottom: 1px solid #8e918c; }
.practice-tab-string > span { color: var(--muted); font-family: monospace; font-size: 12px; font-weight: 800; }
.practice-tab-string i { width: 27px; height: 27px; display: grid; place-items: center; justify-self: center; border-radius: 50%; color: #171819; background: #f5f5f1; font-family: var(--mono); font-size: 12px; font-style: normal; font-weight: 850; }
.practice-tab-string i:not(:empty) { box-shadow: 0 0 0 1px #bfc2bd; }
.practice-tab-beats { display: grid; grid-template-columns: 28px repeat(4, 1fr); padding-top: 8px; color: #aaa096; text-align: center; font-family: monospace; font-size: 10px; }
.built-in-tab > p { margin: 34px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.material-guide { min-height: 100%; display: grid; place-content: center; justify-items: start; max-width: 780px; margin: 0 auto; }
.material-guide > span { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.material-guide h2 { margin: 14px 0 13px; font-family: var(--display); font-size: clamp(36px, 4.5vw, 62px); line-height: 1.08; }
.material-guide > p { max-width: 650px; color: var(--muted); line-height: 1.75; }
.material-guide > div { display: grid; grid-template-columns: auto auto; gap: 10px 14px; margin-top: 26px; align-items: center; }
.material-guide b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: 10px; }
.material-guide div span { font-size: 13px; font-weight: 700; }
.practice-score-load { padding: 12px 0; color: var(--muted); font-size: 11px; }
.practice-score-canvas { min-height: 480px; margin: 18px -15px 0; overflow: auto; }
.round-checks { display: grid; gap: 8px; margin-bottom: 20px; }
.round-checks legend { margin-bottom: 5px; }
.round-checks label { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #faf7f2; cursor: pointer; }
.round-checks input { width: 16px; height: 16px; }
.round-checks span { font-weight: 600; }
.recipe-library { margin-bottom: 42px; padding: 24px; border: 1px solid #2d3136; border-radius: var(--radius-md); background: var(--focus-soft); color: var(--cream); }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.section-heading h2 { max-width: 800px; margin: 8px 0 0; font-family: var(--display); font-size: clamp(27px, 3vw, 40px); line-height: 1.12; }
.recipe-library .button--outline { color: #dfb28a; }
.recipe-template-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.recipe-template { min-height: 200px; display: flex; flex-direction: column; padding: 18px; border: 1px solid #33373d; border-radius: var(--radius-sm); background: #17191d; }
.recipe-template > div { display: flex; justify-content: space-between; color: #85898e; font-size: 9px; }
.recipe-template > div span { color: var(--accent); font-weight: 800; letter-spacing: .08em; }
.recipe-template h3 { margin: 20px 0 8px; color: #eef0ec; font-family: var(--display); font-size: 18px; }
.recipe-template p { margin: 0; color: #93979b; font-size: 10px; line-height: 1.55; }
.recipe-template > button { align-self: flex-start; margin-top: auto; border: 0; padding: 13px 0 0; color: #ff9a63; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.exercise-section-heading { margin-bottom: 18px; }
.exercise-section-heading h2 { margin: 6px 0 0; font-family: var(--display); font-size: 30px; }
.recipe-editor-dialog { width: min(850px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.recipe-editor-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.recipe-step-editor { display: grid; gap: 10px; }
.recipe-step-editor details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #faf7f2; overflow: hidden; }
.recipe-step-editor summary { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 15px; cursor: pointer; }
.recipe-step-editor summary span { color: var(--accent); font-size: 11px; font-weight: 800; }
.recipe-step-fields { display: grid; gap: 13px; padding: 0 15px 17px; border-top: 1px solid var(--line); padding-top: 15px; }
.recipe-number-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.remove-recipe-step { justify-self: start; border: 0; padding: 4px 0; color: var(--danger); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.recipe-editor-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 5px; }

.material-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.material-title h2 { margin: 7px 0 0; font-family: var(--display); font-size: clamp(27px, 3vw, 42px); }
.material-title > span, .material-title > strong { color: var(--muted); font-size: 12px; }
.note-inspector { min-width: 170px; display: grid; gap: 4px; text-align: right; }
.note-inspector span { color: var(--muted); font-size: 10px; }
.note-inspector strong { color: var(--ink); font-size: 13px; }

.fretboard-scroll { margin-top: 28px; overflow-x: auto; border: 5px solid #292c31; border-radius: var(--radius-md); background: #17191d; box-shadow: inset 0 0 0 1px #3d4147; }
.fretboard { min-width: 920px; padding: 5px 0 0; color: white; background: linear-gradient(90deg, rgba(255,255,255,.02), transparent 12%), #17191d; }
.fretboard-string { height: 52px; display: grid; grid-template-columns: 30px repeat(var(--fret-count), minmax(60px, 1fr)); align-items: center; }
.fretboard-string > span { position: sticky; z-index: 4; left: 0; height: 100%; display: grid; place-items: center; color: #d8dbde; border-right: 2px solid #70747a; background: #111315; font-family: var(--mono); font-size: 10px; font-weight: 800; }
.fretboard-string > i, .fretboard-note { position: relative; height: 100%; min-width: 0; display: grid; place-items: center; border: 0; border-left: 1px solid rgba(235, 235, 235, .68); background: transparent; }
.fretboard-string > i::before, .fretboard-note::before { content: ""; position: absolute; z-index: 0; right: 0; left: 0; top: 50%; height: 1px; background: #d8d4cf; box-shadow: 0 1px rgba(20, 16, 14, .4); }
.fretboard-note { isolation: isolate; color: white; font-family: var(--ui); font-size: 11px; font-weight: 850; cursor: pointer; }
.fretboard-note::after { content: ""; position: absolute; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #4d75d6; box-shadow: 0 2px 7px rgba(0, 0, 0, .32); transition: transform .15s, box-shadow .15s; }
.fretboard-note > span { position: relative; z-index: 2; }
.fretboard-note.is-root::after { background: var(--accent); box-shadow: 0 0 0 5px rgba(255, 106, 26, .12), 0 2px 8px rgba(0,0,0,.35); }
.fretboard-note:hover::after, .fretboard-note.is-sounding::after { transform: scale(1.18); box-shadow: 0 0 0 6px rgba(255,255,255,.13), 0 3px 10px rgba(0,0,0,.42); }
.fretboard-note:disabled { cursor: default; }
.fretboard-numbers { height: 32px; display: grid; grid-template-columns: 30px repeat(var(--fret-count), minmax(60px, 1fr)); align-items: center; color: #a4a8ad; background: #24272c; text-align: center; font-size: 9px; }
.fretboard-numbers span { height: 100%; background: #1b1e22; }
.fretboard-numbers b { font-weight: 650; }
.material-legend { display: flex; align-items: center; gap: 18px; margin-top: 16px; color: #564f47; font-size: 11px; }
.material-legend span { display: flex; align-items: center; gap: 7px; }
.material-legend i { width: 12px; height: 12px; border-radius: 50%; background: #3f6fc9; }
.material-legend i.is-root { background: var(--accent); }
.material-legend small { margin-left: auto; color: var(--muted); }

.tab-note, .chord-note { width: 29px; height: 29px; display: grid; place-items: center; justify-self: center; border: 1px solid #cfd2ce; border-radius: 50%; color: var(--ink); background: #fff; font-family: var(--mono); font-size: 12px; font-weight: 850; cursor: pointer; transition: color .15s, background .15s, transform .15s; }
.tab-note > span, .chord-note > span { pointer-events: none; }
.tab-note:hover, .tab-note.is-sounding, .chord-note:hover, .chord-note.is-sounding { color: white; border-color: var(--accent); background: var(--accent); transform: scale(1.1); }
.tab-note:disabled, .chord-note:disabled { cursor: default; }

.chord-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-top: 30px; }
.chord-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #faf6f0; overflow: hidden; }
.chord-card header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: white; background: #201e1a; }
.chord-card header span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--accent); font-size: 10px; }
.chord-card h3 { margin: 0; font-family: var(--display); font-size: 21px; }
.chord-diagram { display: grid; grid-template-columns: repeat(6, 1fr); padding: 16px 10px; }
.chord-diagram > div { display: grid; justify-items: center; gap: 8px; }
.chord-diagram > div > span { color: var(--muted); font-size: 9px; }
.chord-diagram > div > i { height: 29px; display: grid; place-items: center; color: #9b8e81; font-style: normal; }

.rhythm-grid { display: grid; grid-template-columns: repeat(8, minmax(70px, 1fr)); margin-top: 30px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.rhythm-cell { min-height: 155px; display: grid; place-items: center; align-content: center; gap: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbf7f1; }
.rhythm-cell span { color: var(--muted); font-size: 11px; }
.rhythm-cell strong { font-family: var(--display); font-size: 50px; line-height: 1; }
.rhythm-cell small { min-height: 14px; color: var(--muted); font-size: 9px; }
.rhythm-cell.is-accent { color: var(--accent); background: #fff0e4; }
.rhythm-cell.is-muted strong { text-decoration: line-through; }
.rhythm-cell.is-rest { color: #a89b8d; background: #eee8df; }
.rhythm-guide { display: grid; grid-template-columns: 60px repeat(4, 1fr); align-items: center; margin-top: 20px; color: var(--muted); text-align: center; font-size: 10px; }
.rhythm-guide p { grid-column: 1 / -1; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; line-height: 1.6; }

.score-prompt-material { min-height: 100%; display: grid; place-content: center; justify-items: start; max-width: 720px; margin: 0 auto; }
.score-prompt-material h2 { margin: 14px 0 10px; font-family: var(--display); font-size: clamp(36px, 4.2vw, 58px); line-height: 1.05; }
.score-prompt-material p { color: var(--muted); line-height: 1.7; }
.staff-preview { width: min(620px, 100%); height: 150px; position: relative; display: grid; align-content: center; gap: 13px; margin: 22px 0; color: var(--ink); }
.staff-preview i { height: 1px; background: #a99b8e; }
.staff-preview b { position: absolute; top: 26px; left: 20px; font-size: 70px; font-weight: 400; }
.staff-preview em { position: absolute; top: 48px; font-family: serif; font-size: 35px; font-style: normal; }
.staff-preview em:nth-of-type(1) { left: 150px; }
.staff-preview em:nth-of-type(2) { left: 300px; top: 62px; }
.staff-preview em:nth-of-type(3) { left: 455px; top: 40px; }

@keyframes pulse { 50% { transform: scale(.96); opacity: .45; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

@media (max-width: 1400px) and (min-width: 1181px) {
  .practice-console { grid-template-columns: minmax(150px, 1fr) 102px 108px minmax(154px, 184px) 186px; gap: 7px; }
  .console-actions { gap: 5px; }
  .practice-console .button { padding: 6px 9px; white-space: nowrap; }
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: auto 1fr; min-height: 94px; }
  .weekly-summary { display: none; }
  .workspace { height: calc(100vh - 94px); grid-template-columns: 250px 1fr; }
  .focus-stage { grid-template-columns: 150px 1fr; }
  .metronome { display: none; }
  .focus-controls { align-items: flex-end; }
  .shortcut { display: none; }
  .focus-controls > div { margin-left: auto; }
  .week-plan { grid-template-columns: repeat(7, 175px); }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .score-workspace-head { grid-template-columns: auto 1fr; }
  .score-workspace-head .page-actions { grid-column: 2; justify-content: flex-start; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .editor-preview .score-canvas { min-height: 500px; }
  .practice-console { grid-template-columns: minmax(130px, 1fr) 92px 100px 128px; gap: 9px; }
  .console-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .practice-main { grid-template-columns: minmax(430px, 1fr) 300px; }
  .tab-measures { grid-template-columns: 1fr; }
  .recipe-template-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .topbar { position: sticky; z-index: 10; top: 0; min-height: auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .brand { font-size: 20px; }
  .main-nav { width: 100%; order: 2; justify-content: space-between; overflow-x: auto; }
  .nav-link { padding: 8px 6px 12px; font-size: 13px; white-space: nowrap; }
  .workspace { height: auto; min-height: 0; grid-template-columns: 1fr; padding: 10px; }
  .workspace.is-menu-collapsed { grid-template-columns: 1fr; }
  .practice-menu { height: 320px; max-height: 320px; }
  .workspace.is-menu-collapsed .practice-menu { height: 68px; max-height: 68px; }
  .workspace.is-menu-collapsed .collapsed-menu { flex-direction: row; gap: 4px; }
  .workspace.is-menu-collapsed .collapsed-menu span { writing-mode: initial; }
  .practice-list { min-height: 0; overflow-y: auto; }
  .menu-note { display: none; }
  .practice-row { min-height: 64px; }
  .focus-panel { min-height: 590px; padding: 24px 18px; }
  .focus-head h1 { font-size: 28px; }
  .focus-head p { font-size: 13px; }
  .suggestion { display: none; }
  .focus-stage { grid-template-columns: 1fr; gap: 18px; }
  .bpm-readout { display: none; }
  .timer-readout strong { font-size: 96px; }
  .focus-controls { display: block; }
  .focus-controls > div { display: grid; grid-template-columns: 1fr 1fr; }
  .focus-controls .button--primary { grid-column: 1 / -1; }
  .practice-stage { min-height: 0; overflow: visible; }
  .practice-console { grid-template-columns: 1fr 1fr; padding: 12px; }
  .console-title { grid-column: 1 / -1; }
  .console-title strong { white-space: normal; }
  .console-metric { border-left: 0; padding-left: 0; }
  .console-timer { border-left: 1px solid #34383d; }
  .console-metronome-control { grid-column: 1 / -1; grid-template-columns: 1fr 76px; align-items: stretch; }
  .console-metronome { min-height: 48px; }
  .console-metronome-control select { height: 48px; }
  .console-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .console-actions .button--primary { grid-column: 1 / -1; }
  .practice-main { display: grid; grid-template-columns: 1fr; }
  .practice-material { min-height: 420px; padding: 20px 14px; overflow: visible; }
  .coach-rail { border-top: 1px solid #30343a; border-left: 0; overflow: visible; }
  .tab-measures { gap: 30px; }
  .tab-sheet-head { align-items: start; }
  .material-title { align-items: start; }
  .note-inspector { min-width: 125px; }
  .chord-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .rhythm-grid { grid-template-columns: repeat(8, 76px); overflow-x: auto; }
  .material-legend { flex-wrap: wrap; }
  .material-legend small { width: 100%; margin-left: 0; }
  .practice-score-canvas { min-height: 400px; }
  .recipe-library { padding: 18px 14px; }
  .section-heading { display: block; }
  .section-heading .button { margin-top: 16px; }
  .recipe-template-grid { grid-template-columns: 1fr; }
  .recipe-editor-meta, .recipe-number-grid { grid-template-columns: 1fr 1fr; }
  .onboarding { grid-template-columns: 1fr; }
  .onboarding-copy { min-height: 48vh; padding: 34px 24px; }
  .brand--static { margin-bottom: 45px; }
  .onboarding-copy h1 { font-size: 44px; }
  .onboarding-form { width: calc(100% - 20px); margin: 10px; padding: 24px 18px; }
  .day-inputs { grid-template-columns: repeat(4, 1fr); }
  .page { width: min(100% - 24px, 1500px); padding-top: 34px; }
  .page-heading { display: block; }
  .page-heading .button { margin-top: 20px; }
  .week-plan { grid-template-columns: repeat(7, 165px); }
  .exercise-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric-row > div:nth-child(2) { border-right: 0; }
  .metric-row > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .progress-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .difficulty-options { grid-template-columns: 1fr 1fr; }
  .page-actions { justify-content: flex-start; }
  .score-toolbar { display: block; }
  .score-grid { grid-template-columns: 1fr; }
  .score-empty { min-height: 360px; padding: 30px 18px; }
  .score-empty p { max-width: 300px; }
  .score-workspace { width: calc(100% - 20px); padding-top: 18px; }
  .score-workspace-head { display: block; }
  .score-workspace-head > div { margin: 13px 0 18px; }
  .score-workspace-head .page-actions { display: flex; }
  .score-player-controls { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .score-player-controls .player-main, .score-player-controls .loop-button { grid-column: 1 / -1; }
  .score-player-controls select, .score-player-controls input { width: 100%; }
  .score-canvas { min-height: 480px; max-height: none; padding: 12px 4px 40px; }
  .editor-meta { grid-template-columns: 1fr; align-items: stretch; }
  .editor-layout { display: block; }
  .editor-preview { margin-top: 12px; }
  .tab-grid { max-height: 620px; padding: 16px 12px; }
  .tab-grid-panel { overflow: hidden; }
}
