/* Fretline Studio — shared, accessible application chrome.
   Charcoal surfaces, soft text and distinct practice feedback across every page. */
:root {
  color-scheme: dark;
  --bg: #111416;
  --surface: #1b2023;
  --surface-2: #232a2d;
  --surface-3: #30393d;
  --line: #343e42;
  --line-soft: #293236;
  --text: #edf2ef;
  --dim: #abb6b9;
  --dimmer: #89979b;
  --accent: #9fc4ff;
  --accent-dim: #25394f;
  --good: #69d4a5;
  --warn: #efbd62;
  --bad: #ff9588;
  --target: #f6b83c;
  --played: #69a8f5;
  --correct: #30c58d;
  --incorrect: #ef7566;
  --r: 10px;
  --r-lg: 22px;
  --pad: 24px;
  --maxw: 1280px;
  --shadow: 0 3px 20px rgba(0, 0, 0, .16);
}

html { scroll-behavior: smooth; }
body { font-size: 15px; }
button, select, input { touch-action: manipulation; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #75a5e9 !important; }
button:disabled { cursor: not-allowed; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="range"] { accent-color: var(--accent); height: 5px; }
input[type="range"]::-webkit-slider-thumb { width: 17px; height: 17px; background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 17px; height: 17px; background: var(--accent); }
select, input[type="text"], input[type="number"] { min-height: 38px; font-size: 13px; }
select { padding-right: 30px; }
select option { background: var(--surface); color: var(--text); }
.wrap { padding-inline: 40px; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 20px; padding: 12px 20px; border-radius: 10px; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 14px; }
.topbar { height: 76px; border-color: rgba(58,70,74,.7); background: rgba(21,26,29,.94); backdrop-filter: blur(18px); flex: none; }
.topbar-inner { padding-inline: 40px; gap: 28px; }
.brand, .logo { font-size: 20px; font-weight: 700; letter-spacing: -.8px; flex: none; }
.brand .mark { width: 28px; height: 28px; border-radius: 9px; background: #263b33; }
.brand .mark::after { height: 13px; width: 2px; background: var(--surface); box-shadow: 5px 0 0 #fff,-5px 0 0 #fff; }
.brand .mark::before { content: ''; position: absolute; }
.studio-nav { display: flex; align-items: center; gap: 6px; }
.studio-nav a { color: var(--dim); font-size: 13px; font-weight: 500; padding: 9px 13px; border-radius: 9px; white-space: nowrap; }
.studio-nav a:hover { background: var(--surface-2); color: var(--text); }
.studio-nav a[aria-current="page"] { color: var(--text); background: #252e32; }
.topbar .spacer { min-width: 0; }
.page-title { display: none; }
.btn, .ctrl-btn { min-height: 40px; border-color: var(--line); background: var(--surface); padding: 9px 16px; font-size: 13px; font-weight: 550; border-radius: 10px; justify-content: center; }
.btn:hover:not(:disabled), .ctrl-btn:hover:not(:disabled) { background: #2b353a; border-color: #52636b; }
.btn.primary, .ctrl-btn.primary, .sc-code-btn, .sc-copy-btn, .sc-popup-apply { color: #fff; background: #2865bb; border-color: #2865bb; box-shadow: 0 2px 5px rgba(38,108,211,.12); }
.btn.primary:hover:not(:disabled), .ctrl-btn.primary:hover:not(:disabled), .sc-code-btn:hover, .sc-copy-btn:hover, .sc-popup-apply:hover { background: #3474ce; border-color: #3474ce; color: #fff; }
.btn.on, .btn.active, .ctrl-btn.active { background: var(--accent-dim); }
.btn.warn { animation: none; background: #3b301c; }
.btn.ghost { background: transparent; }
.seg { border: none; background: #252e32; padding: 4px; border-radius: 12px; gap: 2px; }
.seg button { min-height: 32px; padding: 5px 14px; border-radius: 9px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 5px rgba(25,40,32,.09); }
.seg.small button { min-height: 30px; padding: 5px 12px; }
.badge { padding: 4px 9px; border-radius: 7px; border-color: transparent; font-size: 10px; letter-spacing: .03em; }
.badge.guitar { background: #293b30; color: #adcf9a; border-color: transparent; }
.badge.piano { background: #263648; color: #aecbfa; border-color: transparent; }
.dot { width: 8px; height: 8px; }
.dot.active { box-shadow: 0 0 0 4px rgba(20,125,87,.09); }
.label { font-size: 10px; letter-spacing: .09em; font-weight: 650; }
.notice { border-radius: 12px; background: #2c281e; border-color: #665434; border-left: 3px solid #d8aa4e; line-height: 1.65; }
.panel, .card { box-shadow: var(--shadow); border-color: #343e42; }

/* Home: a practice destination, then a quiet, browsable music library. */
.studio-home .intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 70px; align-items: center; max-width: none; padding: 62px 0 34px; }
.eyebrow { display: block; margin: 0 0 18px; font-size: 10px; color: #9fbeb0; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.intro h1 { max-width: 600px; font-size: clamp(38px,4.5vw,58px); line-height: 1.06; letter-spacing: -2.9px; font-weight: 650; margin-bottom: 21px; text-wrap: balance; }
.intro p { max-width: 480px; font-size: 15px; line-height: 1.75; color: var(--dim); }
.intro-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 23px; font-size: 13px; font-weight: 650; color: var(--accent); }
.intro-link span { transition: transform .18s ease; }
.intro-link:hover span { transform: translateX(4px); }
.practice-paths { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.practice-path { display: flex; flex-direction: column; min-height: 256px; padding: 25px 22px 21px; border-radius: 24px; overflow: hidden; position: relative; transition: transform .18s ease, box-shadow .18s ease; }
.practice-path:hover { transform: translateY(-3px); box-shadow: 0 14px 24px rgba(33,56,43,.09); }
.practice-path.piano-path { background: #233242; color: #d7e7fc; }
.practice-path.guitar-path { background: #2a372b; color: #d6e6c8; }
.path-overline { font-size: 9px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; opacity: .75; }
.practice-path strong { margin-top: 3px; font-size: 28px; letter-spacing: -1px; font-weight: 600; }
.path-art { display: block; width: 100%; height: 86px; margin: 14px 0 8px; overflow: visible; }
.path-caption { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: 11px; font-weight: 550; }
.path-arrow { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(211,229,220,.3); border-radius: 50%; font-size: 15px; }
.tools { margin-top: 0; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; gap: 8px; }
.tools::before { content: 'YOUR TOOLS'; font-size: 9px; letter-spacing: .12em; font-weight: 700; color: var(--dimmer); margin-right: auto; }
.tools .btn { background: transparent; border-color: transparent; min-height: 38px; font-size: 12px; }
.tools .btn:hover { background: #2b353a; }
.tools .btn.active { background: var(--accent-dim); border-color: #4c6b93; }
.tool-panel { margin-top: 16px; }
.section-head { margin: 42px 0 20px; align-items: center; flex-wrap: wrap; gap: 10px 15px; }
.section-head h2 { font-size: 25px; letter-spacing: -.9px; font-weight: 650; }
.section-head .hint { font-size: 12px; }
.section-head .hint-link { font-size: 12px; }
#song-count { margin-left: auto; }
.songs { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.song { min-height: 160px; border: 1px solid #343e42; border-radius: 17px; padding: 24px 20px 19px; box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.song:hover { transform: translateY(-3px); border-color: #657d70; background: var(--surface); box-shadow: 0 10px 22px rgba(36,49,43,.065); }
.song-top { gap: 7px; margin-bottom: 23px; }
.song-title { font-size: 15px; font-weight: 650; line-height: 1.4; letter-spacing: -.3px; }
.song-artist { margin-top: 6px; font-size: 12px; }
.song-meta { font-size: 10px; gap: 9px; }
.song-range { font-size: 10px; }
.diff i { width: 4px; height: 8px; border-radius: 2px; }
.diff i.on { background: #739480; }
.song-warn { font-size: 10px; padding-top: 13px; }
.scale-head { padding: 23px 24px; gap: 12px; }
.scale-title { font-size: 19px; letter-spacing: -.5px; }
.scale-status-row { padding: 17px 24px; background: #171d20; }
.scale-current-note { color: var(--warn); font-size: 24px; }
.scale-current-label { font-size: 10px; }
.scale-controls, .scale-selector { padding: 15px 24px; }
.scale-selector .ctrl-btn { min-height: 35px; font-size: 12px; padding: 6px 13px; }
.scale-io-row { padding: 11px 24px; }
.scale-positions .pos-btn { width: 34px; height: 34px; }
.scale-fretboard-wrap { margin: 12px; padding: 8px 6px; background: #0c0d10; border-radius: 13px; }
.mini-kb, .kb-wrap, .fb-wrap, .game-lane, .chord-box { background: #0c0d10; border-color: #3b4545; }
.mini-kb.tall { margin: 18px; border-radius: 12px; }
.mini-kb.tall canvas { height: 170px; }
.studio-home footer { margin-top: 48px; font-size: 11px; padding: 22px 0 0; }

/* Practice: separate connection, lesson navigation and the instrument. */
.input-strip { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.input-strip-inner { display: flex; align-items: center; gap: 18px; padding-block: 12px; }
.input-strip .io-bar { flex: 1; justify-content: flex-end; font-size: 12px; flex-wrap: wrap; }
.input-strip .io-status { max-width: 260px; }
.input-strip .io-bar select { max-width: 260px; min-height: 34px; }
.input-strip .io-bar .btn { min-height: 34px; padding: 6px 12px; }
.input-caption { font-size: 12px; color: var(--dim); }
.input-caption strong { color: var(--text); font-weight: 600; }
.tabs { top: 76px; padding: 11px 40px; gap: 5px; background: rgba(17,20,22,.96); backdrop-filter: blur(16px); border-bottom: 0; scrollbar-width: thin; }
.tabs button { padding: 10px 16px; border: 0; border-radius: 9px; font-size: 12px; }
.tabs button[aria-selected="true"] { background: #263b33; color: #fff; }
.tabs button:hover:not([aria-selected="true"]) { background: #2b353a; }
.tab-panel { padding-top: 25px; }
.tab-panel h1 { font-size: 38px; letter-spacing: -1.5px; margin-bottom: 11px; line-height: 1.15; }
.lede { font-size: 14px; line-height: 1.75; max-width: 680px; margin-bottom: 26px; }
.learn-head { align-items: center; margin-bottom: 16px; }
.learn-head .lede { margin-bottom: 0; max-width: 600px; }
.progress-ring { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 16px; text-align: left; padding: 18px 23px; border-radius: 17px; }
.pr-num { font-size: 27px; letter-spacing: -1px; }
.pr-label { font-size: 10px; margin: 0; }
.progress-ring .btn { grid-column: 1 / -1; padding: 2px 0; min-height: 26px; font-size: 11px; justify-content: flex-start; }
.lesson-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-top: 30px; }
.lesson { padding: 24px 20px; min-height: 115px; gap: 15px; border-radius: 17px; border-color: #343e42; }
.lesson:hover { background: var(--surface); border-color: #657d70; box-shadow: var(--shadow); }
.lesson-badge { width: 31px; height: 31px; font-family: var(--font); font-size: 11px; background: #2c3832; border: 0; color: #b5c9bc; }
.lesson-t { font-size: 14px; margin: 1px 0 5px; }
.lesson-d { font-size: 12px; line-height: 1.6; }
.lesson.done { border-color: #3e6954; }
.lesson.done .lesson-badge { background: #203e30; color: var(--good); border: 0; }
.lesson-view { padding-top: 8px; }
.lesson-view h2 { font-size: 30px; letter-spacing: -1px; }
.lesson-body p { max-width: 76ch; }
.card { padding: 23px; border-radius: 19px; }
.controls { gap: 15px 25px; margin-bottom: 17px; }
.ctl { flex-wrap: wrap; gap: 9px; }
.ctl.wide { flex-wrap: nowrap; }
.chips { gap: 6px; }
.chips button { min-height: 36px; padding: 7px 12px; border-radius: 9px; }
.chips.roots button { min-width: 44px; }
.drill { padding: 26px; margin-top: 22px; }
.prompt-main { font-size: 34px; line-height: 1.16; letter-spacing: -1px; color: #f4d99d; }
.prompt-sub { font-size: 13px; line-height: 1.65; margin-top: 9px; }
.drill-stats { gap: 25px; padding: 5px 0; }
.dstat .v { font-size: 22px; }
.dstat .k { margin-top: 5px; font-size: 9px; }
.kb-wrap, .fb-wrap { margin-block: 22px 16px; border-radius: 12px; }
.kb-wrap canvas { height: 184px; }
.drill-foot { gap: 9px; padding-top: 9px; }
.drill-feedback { margin-left: 4px; }
.drill-feedback.right, .drill-feedback.wrong { padding: 7px 11px; border-radius: 8px; }
.drill-feedback.right { background: #203e30; }
.drill-feedback.wrong { background: #442b29; }
.keyboard-register { display: flex; gap: 8px 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin: -4px 0 16px; padding: 10px 13px; background: #25322d; color: #b7cbbf; border: 1px solid #3a5044; border-radius: 9px; font-size: 12px; line-height: 1.5; }
.keyboard-register.is-outside { background: #3b301c; border-color: #786033; color: #f1c873; }
.feedback-legend { display: flex; align-items: center; gap: 10px 19px; flex-wrap: wrap; font-size: 10px; color: var(--dim); }
.feedback-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.feedback-legend b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; font-size: 10px; line-height: 1; color: #17221c; }
.feedback-legend .target b { background: var(--target); }
.feedback-legend .correct b { background: var(--correct); }
.feedback-legend .incorrect b { background: var(--incorrect); }
.feedback-legend .pressed b { background: var(--played); }
.drill .feedback-legend { margin-top: 13px; }
.scale-card > .feedback-legend { padding: 1px 24px 16px; }
.practice-guide { display: flex; align-items: center; gap: 15px; justify-content: space-between; padding-block: 12px 2px; }
.practice-guide > p { font-size: 11px; color: var(--dimmer); margin: 0; }
.finger-map b { background: #273c57; color: #b3d0fa; }
.game-grid { gap: 15px; }
.game-card { padding: 25px 22px 19px; border-radius: 18px; min-height: 181px; }
.game-card:hover { background: var(--surface); border-color: #657d70; }
.gc-name { font-size: 18px; letter-spacing: -.5px; }
.gc-tag { font-size: 8px; padding: 3px 7px; }
.gc-blurb { margin-block: 5px 9px; line-height: 1.65; }
.gc-foot { padding-top: 11px; }
.game-title { font-size: 22px; }
.game-prompt { padding: 24px; }
.ghud { padding: 16px; border-radius: 13px; }
.ghud .v { font-size: 25px; }
.ghud .k { margin-top: 6px; }
.gp-main { font-size: 36px; }
.game-result { border-radius: 17px; background: #20372b; border-color: #40634c; padding: 24px; }
.mono-notice { font-size: 12px; max-width: none; margin: 20px 0; }

/* Player: the stage stays dark while transport and input stay easy to read. */
.studio-player { min-height: 620px; height: 100dvh; }
.studio-player .topbar { height: 60px; position: static; }
.studio-player .topbar-inner { max-width: none; padding-inline: 26px; }
.studio-player .brand { font-size: 17px; }
.studio-player .brand .mark { width: 24px; height: 24px; border-radius: 7px; }
.player-shortcut { font-size: 11px; color: var(--dimmer); }
.player-shortcut kbd { border: 1px solid #414b50; padding: 2px 5px; border-radius: 4px; background: var(--surface); font-family: var(--font); }
.play-head { min-height: 79px; height: auto; padding: 17px 28px 12px; border: 0; gap: 22px; }
.now-playing { flex: 1; }
.now-playing h1 { font-size: 24px; letter-spacing: -.7px; }
.now-playing .sub { margin-top: 6px; font-size: 11px; flex-wrap: wrap; }
.stat .v { font-size: 23px; }
.stat .k { font-size: 9px; margin-top: 6px; }
.stats { gap: 28px; }
.stage { margin: 10px 24px 17px; border-radius: 18px; background: #0c0d10; border-color: #29332e; box-shadow: 0 7px 24px rgba(28,44,35,.1); min-height: 260px; }
.overlay { --text: #edf3ef; --dim: #b2bdb6; --dimmer: #96a59b; --good: #30c58d; --bad: #ef7566; color: var(--text); background: rgba(12,18,15,.91); }
.result h2 { font-size: 22px; letter-spacing: -.5px; }
.result .big { font-size: 65px; }
.result .btn:not(.primary) { color: var(--text); }
.play-foot { padding: 15px 25px 18px; background: var(--surface); gap: 12px 16px; border-top: 1px solid var(--line); }
.play-foot .group:first-child .btn.primary { min-width: 100px; }
.play-foot .io { flex: 1 0 100%; margin: 1px 0 0; border-top: 1px solid var(--line-soft); padding-top: 13px; }
.play-foot .io::before { content: 'YOUR INPUT'; font-size: 9px; letter-spacing: .12em; font-weight: 700; color: var(--dimmer); margin-right: 8px; }
.io .status { max-width: 300px; }
.io select { max-width: 280px; margin-left: auto; }
.live-note { background: #253c2f; color: #b1d9b8; min-width: 45px; border-radius: 7px; padding: 5px 9px; }
.play-foot .group.sep { border: 0; padding-left: 5px; }
.legend { color: var(--dim); }
.player-register { flex: none; margin: -6px 25px 12px; padding: 8px 13px; font-size: 11px; }
#cross-notice { margin: 3px 25px 0; }

/* Creators: spacious tool groups around the original editing canvases. */
.studio-creator { min-height: 680px; height: 100dvh; }
.studio-creator > header { height: 67px; padding-inline: 28px; background: #171d20; }
.studio-creator .logo::before { width: 25px; height: 25px; border-radius: 8px; background: linear-gradient(#f4f7ef, #f4f7ef) 6px 6px / 2px 13px no-repeat, linear-gradient(#f4f7ef, #f4f7ef) 11px 6px / 2px 13px no-repeat, linear-gradient(#f4f7ef, #f4f7ef) 16px 6px / 2px 13px no-repeat, #263b33; }
.studio-creator .sc-page-title { font-size: 11px; letter-spacing: .05em; }
.studio-creator .studio-nav { margin-left: auto; }
.studio-creator .sc-back-btn { margin-left: 0 !important; }
.sc-meta-bar { padding: 20px 28px; gap: 18px 27px; }
.sc-meta-group { gap: 9px; }
.sc-meta-group input[type="text"] { width: 175px; }
.sc-meta-group input, .sc-meta-group select { min-height: 38px; background: #20272b; }
.sc-meta-group label { font-size: 9px; letter-spacing: .1em; }
.sc-toolbar { padding: 13px 28px; gap: 12px 8px; background: #171d20; }
.sc-snap-btn, .sc-dur-btn, .sc-action-btn, .sc-import-btn, .sc-code-btn, .sc-stepper, .sc-tech, .sc-copy-btn, .sc-popup-apply, .sc-popup-delete { min-height: 34px; }
.sc-zoom-btn { width: 30px; height: 34px; }
.sc-tool-label { font-size: 9px; }
.sc-help-strip { padding: 11px 28px; font-size: 10px; background: var(--surface); color: var(--dim); }
.pc-editor, .sc-editor-wrap { background: #0c0d10; margin: 16px 24px 20px; border-radius: 13px; border: 1px solid #29332e; }
.sc-canvas-wrapper, .sc-string-labels { background: #0c0d10; }
.sc-string-labels { --line: #262a31; --line-soft: #1e2127; --dimmer: #a4ada7; }
.sc-popup { box-shadow: 0 15px 50px rgba(30,45,35,.2); border-radius: 15px; }
.sc-modal-overlay { background: rgba(4,8,10,.76); backdrop-filter: blur(8px); }
.sc-modal { border-radius: 21px; box-shadow: 0 20px 90px rgba(25,35,29,.2); }
.sc-modal-header { padding: 21px 23px; }
.sc-modal-header h2 { font-size: 18px; letter-spacing: -.5px; }
.sc-modal-close, .sc-popup-x { min-width: 30px; min-height: 30px; }
.sc-modal-hint { padding: 17px 23px 0; }
.sc-code-block, .sc-import-area { margin: 17px 23px; background: #12191d; }
.sc-modal-actions { padding: 17px 23px; }
.sc-snap-btn.hand-r.active { background: #263b55; border-color: #638bc2; color: #b6d3ff; }
.sc-snap-btn.hand-l.active { background: #3b301c; border-color: #88703f; color: #f1c873; }

@media (min-width: 1440px) {
  .studio-home .intro { gap: 110px; padding-top: 72px; }
  .practice-path { min-height: 280px; padding: 28px 25px; }
  .path-art { height: 98px; }
}
@media (max-width: 1100px) {
  .topbar-inner { gap: 17px; }
  .studio-nav { gap: 0; }
  .studio-nav a { padding-inline: 10px; }
  .studio-home .intro { gap: 30px; }
  .intro h1 { font-size: 46px; letter-spacing: -2px; }
  .practice-path { padding: 21px 17px; min-height: 240px; }
  .path-caption { font-size: 10px; }
  .songs { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .lesson-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-creator .studio-nav a { padding: 7px 9px; }
  .sc-right-tools { margin-left: 0; }
  .play-foot { gap: 10px; }
}
@media (max-width: 820px) {
  .wrap, .topbar-inner { padding-inline: 24px; }
  .topbar { height: 68px; }
  .topbar-inner { gap: 13px; }
  .brand { font-size: 18px; }
  .studio-home .topbar-inner { flex-wrap: wrap; gap: 9px 15px; padding-block: 12px; }
  .studio-home .topbar { height: auto; position: static; }
  .studio-home .studio-nav { margin-left: auto; }
  .studio-home .topbar .spacer { display: none; }
  .studio-home .topbar #instrument-switch { margin-left: auto; }
  .studio-home #creator-link { padding: 8px 11px; min-height: 35px; font-size: 11px; }
  .studio-home .intro { padding-top: 42px; grid-template-columns: 1fr; gap: 30px; }
  .intro h1 { max-width: 600px; font-size: 47px; }
  .intro p { max-width: 600px; }
  .practice-paths { gap: 15px; }
  .practice-path { min-height: 188px; padding: 21px; }
  .path-art { position: absolute; width: 43%; height: 72px; right: 23px; top: 17px; opacity: .8; }
  .path-caption { font-size: 12px; }
  .practice-path strong { font-size: 27px; }
  .songs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tabs { top: 68px; padding-inline: 24px; }
  .tabs button { padding: 9px 13px; }
  .input-strip-inner { gap: 12px; }
  .input-caption { font-size: 11px; }
  .input-strip .io-status { max-width: 150px; }
  .input-strip .io-bar select { max-width: 210px; }
  .practice-guide { flex-direction: column; align-items: flex-start; gap: 8px; }
  .play-head { padding-inline: 23px; gap: 15px; }
  .now-playing h1 { font-size: 19px; }
  .stats { gap: 17px; }
  .stat .v { font-size: 20px; }
  .studio-player .topbar-inner { padding-inline: 23px; }
  .studio-player .player-shortcut { display: none; }
  .studio-player .stage { margin-inline: 17px; }
  .studio-creator > header { flex-wrap: wrap; height: auto; min-height: 67px; padding: 15px 20px; gap: 10px; }
  .studio-creator .sc-page-title { display: none; }
  .sc-meta-bar, .sc-toolbar { padding-inline: 20px; }
  .sc-meta-bar { gap: 12px 20px; }
  .sc-meta-group input[type="text"] { width: 140px; }
  .sc-help-strip { padding-inline: 20px; }
  .pc-editor, .sc-editor-wrap { margin-inline: 15px; }
}
@media (max-width: 580px) {
  .wrap { padding-inline: 18px; }
  .topbar-inner { padding-inline: 18px; gap: 8px; }
  .brand { font-size: 17px; gap: 7px; }
  .brand .mark { width: 24px; height: 24px; border-radius: 7px; }
  .studio-nav a { font-size: 11px; padding: 8px; }
  .studio-practice .topbar .spacer { display: none; }
  .studio-practice .studio-nav { margin-left: auto; }
  .studio-practice .topbar > .topbar-inner > .btn { display: none; }
  .studio-home .intro { padding-top: 33px; gap: 26px; }
  .intro h1 { font-size: 41px; letter-spacing: -1.8px; }
  .intro p { font-size: 14px; }
  .eyebrow { margin-bottom: 14px; font-size: 9px; }
  .practice-paths { gap: 10px; }
  .practice-path { min-height: 212px; padding: 18px 15px; border-radius: 18px; }
  .practice-path strong { font-size: 25px; }
  .path-art { position: static; margin: 12px 0; width: 100%; height: 63px; }
  .path-overline { font-size: 8px; }
  .path-caption { font-size: 10px; gap: 8px; }
  .path-arrow { width: 22px; height: 22px; flex: none; }
  .intro-link { margin-top: 17px; }
  .tools { gap: 3px; padding-block: 10px; }
  .tools::before { display: none; }
  .tools .btn { padding-inline: 9px; font-size: 11px; flex: 1; }
  .tools .btn svg { width: 12px; }
  .section-head { margin-top: 30px; gap: 8px; }
  .section-head h2 { font-size: 23px; }
  .section-head .hint-link { width: 100%; margin-left: 0; }
  .songs { gap: 10px; }
  .song { min-height: 158px; padding: 18px 14px; border-radius: 14px; }
  .song-top { flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
  .song-title { font-size: 13px; }
  .song-artist { font-size: 11px; }
  .song-top .badge { font-size: 8px; padding: 2px 5px; }
  .song-meta { flex-wrap: wrap; font-size: 9px; gap: 6px; }
  .song-range { font-size: 9px; }
  .song-warn { font-size: 9px; }
  .scale-head { padding: 19px 17px; }
  .scale-controls, .scale-selector, .scale-status-row, .scale-io-row { padding-inline: 17px; }
  .scale-title { font-size: 17px; }
  .scale-tab-legend { margin-left: 0; }
  .scale-controls .ctrl-btn { padding-inline: 10px; font-size: 11px; }
  .scale-pos-label { margin-left: 0; }
  .scale-progress { font-size: 10px; }
  .scale-io-hint { flex: 1 0 100%; }
  .scale-card > .feedback-legend { padding-inline: 17px; }
  .scale-selector { gap: 6px; }
  .scale-selector .ctrl-btn { padding: 6px 9px; font-size: 10px; }
  .mini-kb.tall { margin: 12px; }
  .input-strip-inner { flex-wrap: wrap; padding-block: 11px; gap: 8px; }
  .input-strip .io-bar { flex-basis: 100%; justify-content: flex-start; gap: 7px; }
  .input-strip .io-status { display: inline; max-width: 160px; font-size: 11px; }
  .input-strip .io-bar select { max-width: min(200px,57vw); }
  .input-strip #io-voice { max-width: 85px; }
  .input-strip .io-bar .btn { margin-left: auto; }
  .tabs { padding: 10px 18px; gap: 2px; }
  .tabs button { font-size: 11px; padding-inline: 12px; }
  .tab-panel { padding-top: 21px; }
  .tab-panel h1 { font-size: 32px; }
  .lede { font-size: 13px; }
  .learn-head { gap: 18px; }
  .progress-ring { display: flex; align-items: center; gap: 14px; padding: 12px 17px; width: 100%; }
  .pr-num { font-size: 23px; }
  .progress-ring .btn { margin-left: auto; }
  .lesson-list, .game-grid, .song-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 21px; }
  .lesson { min-height: 90px; padding: 20px 17px; }
  .game-card { min-height: 150px; }
  .ctl.wide { flex-wrap: wrap; gap: 8px; }
  .ctl.wide .label { width: 100%; }
  .ctl .label { padding-top: 0; }
  .chips button { font-size: 11px; padding-inline: 11px; }
  .card, .drill { padding: 18px 15px; border-radius: 15px; }
  .drill-top { gap: 14px; }
  .prompt-main { font-size: 29px; }
  .prompt-sub { font-size: 12px; }
  .drill-stats { width: 100%; justify-content: flex-start; gap: 27px; }
  .dstat { text-align: left; }
  .dstat .v { font-size: 20px; }
  .drill-foot .btn { padding-inline: 12px; font-size: 12px; }
  .drill-feedback { margin-left: 0; }
  .drill-goal { font-size: 10px; }
  .feedback-legend { gap: 8px 11px; font-size: 9px; }
  .feedback-legend b { width: 14px; height: 14px; font-size: 9px; }
  .keyboard-register { font-size: 11px; }
  .chord-name { font-size: 23px; }
  .chord-spell { margin-left: 0; font-size: 12px; }
  .studio-player { min-height: 740px; overflow: auto; }
  html:has(.studio-player), html:has(.studio-creator) { overflow: auto; }
  .studio-player .topbar-inner { padding-inline: 16px; gap: 9px; }
  .studio-player .studio-nav { margin-left: auto; }
  .studio-player .topbar .spacer { display: none; }
  .play-head { flex-wrap: wrap; padding: 16px 17px 7px; gap: 12px; }
  .now-playing { flex-basis: calc(100% - 165px); }
  .now-playing h1 { font-size: 17px; }
  .play-head .seg { padding: 3px; }
  .play-head .seg button { padding: 5px 10px; min-height: 28px; font-size: 11px; }
  .stats { flex: 1 0 100%; justify-content: flex-start; gap: 24px; margin: 1px 0; }
  .stat { text-align: left; display: flex; gap: 7px; align-items: baseline; }
  .stat .v { font-size: 18px; }
  .stat .k { font-size: 8px; margin-top: 0; }
  .stage { margin: 10px 12px 12px; border-radius: 13px; flex-basis: 340px; }
  .play-foot { padding: 12px 15px 16px; gap: 9px; }
  .play-foot .group { gap: 7px; }
  .play-foot .btn { min-height: 37px; padding: 7px 11px; font-size: 11px; }
  .play-foot .group:first-child { flex-basis: 100%; }
  .play-foot .group:first-child .btn.primary { flex: 1; }
  .play-foot .group.sep { padding-left: 0; }
  .play-foot .label { font-size: 8px; }
  .play-foot select { font-size: 11px; min-height: 34px; }
  .play-foot .seg.small button { padding-inline: 8px; font-size: 10px; min-height: 27px; }
  .play-foot input[type="range"] { width: 70px; }
  .play-foot .io { flex-wrap: wrap; gap: 8px; }
  .play-foot .io::before { display: none; }
  .player-register { margin: -3px 15px 11px; font-size: 10px; line-height: 1.6; }
  .io .status { max-width: 220px; font-size: 11px; }
  .io select { flex: 1; margin-left: 0; max-width: none; }
  .result { padding: 22px; min-width: 0; }
  .result-grid { gap: 16px; }
  .result-grid .v { font-size: 16px; }
  .result-grid .k { font-size: 8px; }
  .studio-creator { min-height: 930px; overflow: auto; }
  .studio-creator > header { padding-inline: 16px; }
  .studio-creator .logo { font-size: 17px; }
  .studio-creator .studio-nav { gap: 0; }
  .studio-creator .studio-nav a { font-size: 10px; padding: 7px; }
  .studio-creator .sc-back-btn { font-size: 11px; padding: 6px 10px; }
  .sc-meta-bar, .sc-toolbar { padding: 13px 16px; gap: 12px; }
  .sc-meta-group { gap: 6px; }
  .sc-meta-group input[type="text"] { width: 115px; }
  .sc-meta-group label { font-size: 8px; }
  .sc-meta-group select { max-width: 164px; font-size: 11px; }
  .sc-tool-group { flex-wrap: wrap; border-right: 0; padding-right: 0; margin-right: 0; gap: 4px; }
  .sc-toolbar button { font-size: 10px; padding-inline: 8px; }
  .sc-help-strip { padding-inline: 16px; line-height: 1.6; }
  .pc-editor, .sc-editor-wrap { min-height: 360px; margin: 10px 11px; }
  .sc-modal-overlay { padding: 12px; }
  .sc-modal-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
