@font-face{font-family:OpenSauce;src:url(../assets/fonts/OpenSauceSans-Regular.ttf);font-weight:400;font-display:swap}@font-face{font-family:OpenSauce;src:url(../assets/fonts/OpenSauceSans-Medium.ttf);font-weight:500;font-display:swap}@font-face{font-family:OpenSauce;src:url(../assets/fonts/OpenSauceSans-Bold.ttf);font-weight:700;font-display:swap}
:root{font-family:OpenSauce,Arial,sans-serif;color-scheme:light;--bg:#eee8f6;--surface:#fffcf4;--surface2:#e3d9ef;--ink:#373444;--muted:#70667d;--line:#b6a9c5;--accent:#5b506d;--peach:#f0c5b1;--mint:#bfe1d4;--lilac:#c9b9ee;--lemon:#e6dba9;--blue:#bad9e9;--shadow:#4a365b12;--on-color:#373444}
body[data-theme=dark]{color-scheme:dark;--bg:#292633;--surface:#363140;--surface2:#494054;--ink:#f6f1fc;--muted:#c4b9d0;--line:#776982;--accent:#c9b9ee;--shadow:#15101f20}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:1px solid var(--line);background:transparent;border-radius:22px;min-height:44px;padding:10px 15px;font-weight:500}button:disabled{opacity:.35;cursor:default}button:hover:not(:disabled){filter:brightness(.97)}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--accent);outline-offset:4px}a{color:inherit}svg{display:block}button svg{width:20px;height:20px;flex:none}button{touch-action:manipulation}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.muted{color:var(--muted)}h1,h2,h3,p{margin:0}h1{font-size:22px;letter-spacing:-.8px}h2{font-size:21px;letter-spacing:-.7px}h3{font-size:23px;letter-spacing:-.6px}input,textarea,select{min-height:44px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:12px;padding:10px 12px;max-width:100%}textarea{width:100%;resize:vertical}select{cursor:pointer}input[type=range]{padding:0;accent-color:var(--accent);width:100%;border:none;background:transparent}.icon-btn{width:44px;height:44px;min-height:44px;padding:11px;border:none;display:inline-flex;align-items:center;justify-content:center;flex:none}.primary{background:var(--accent);color:var(--bg);border-color:var(--accent);display:inline-flex;align-items:center;justify-content:center;gap:8px}.secondary{background:var(--surface)}.text-btn{border:none;color:var(--muted);padding:8px}.small-btn{min-width:44px;padding:8px;font-size:12px}.active,.segmented .active{background:var(--accent);color:var(--bg);border-color:var(--accent)}
.app-shell{max-width:1200px;margin:auto;padding:0 28px calc(94px + env(safe-area-inset-bottom));min-height:100svh}.app-head{height:98px;display:flex;align-items:center;justify-content:space-between;gap:12px}.wordmark{font-size:26px;font-weight:700;letter-spacing:-1.35px;text-decoration:none;white-space:nowrap}.wordmark span{display:inline-block;height:7px;width:7px;border-radius:50%;background:var(--muted);vertical-align:top;margin:5px 0 0 5px}.head-actions{display:flex;align-items:center;gap:7px}.theme-btn{font-size:24px}.logo{width:58px;height:58px;object-fit:contain}.page-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 17px}.page-toolbar>div{display:flex;align-items:center}.chord-picker{border:none;background:var(--surface);padding:9px 16px;display:flex;align-items:center;gap:10px;border-radius:24px;max-width:calc(100% - 45px)}.chord-picker b{font-size:19px}.chord-picker .muted{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.family-dot{height:9px;width:9px;flex:none;border-radius:50%;border:1px solid #8f7a93}.family-dot.major{background:var(--peach)}.family-dot.minor{background:var(--mint)}.family-dot.dominant{background:var(--lilac)}.family-dot.altered{background:var(--lemon)}.family-dot.suspended{background:var(--blue)}.relation-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding-bottom:14px}.relation-tabs button{border:none;padding:10px 18px;font-size:13px}.relation-tabs button:not(.active){color:var(--muted)}
.explore-layout{display:grid;grid-template-columns:1.45fr 1fr;gap:68px;align-items:center}.map-column{min-width:0}.orbit-map{position:relative;aspect-ratio:1;max-width:560px;width:100%;margin:10px auto 0;isolation:isolate}.orbit-map>svg{position:absolute;inset:0;width:100%;height:100%;color:var(--muted);z-index:-1}.orbit-map line{stroke:var(--line);stroke-width:1.3}.orbit-guide{fill:none;stroke:var(--line);stroke-width:.7;stroke-dasharray:2 8;opacity:.4}.core,.neighbor{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;flex-direction:column;background:var(--surface);color:var(--on-color);border:1px solid #97859f;box-shadow:0 5px 15px var(--shadow)}.core{left:50%;top:50%;width:128px;height:121px;border-radius:52% 48% 38% 62% / 48% 43% 57% 52%;padding:10px;z-index:2}.core strong{font-size:var(--name-size);letter-spacing:-1.5px;line-height:1.05;overflow-wrap:anywhere;max-width:100%}.core small{font-size:10px;margin-top:8px}.neighbor{height:68px;width:68px;padding:5px;border-radius:43% 57% 48% 52% / 55% 44% 56% 45%;font-size:16px;overflow-wrap:anywhere;line-height:1.1}.major.core,.major.neighbor,.major.play-body,.major.lesson-body{background:var(--peach)}.minor.core,.minor.neighbor,.minor.play-body,.minor.lesson-body{background:var(--mint)}.dominant.core,.dominant.neighbor,.dominant.play-body,.dominant.lesson-body{background:var(--lilac)}.altered.core,.altered.neighbor,.altered.play-body,.altered.lesson-body{background:var(--lemon)}.suspended.core,.suspended.neighbor,.suspended.play-body,.suspended.lesson-body{background:var(--blue)}.sounding.core{outline:4px solid var(--accent);outline-offset:6px}.map-empty{position:absolute;bottom:6%;width:100%;text-align:center;font-size:12px;color:var(--muted)}.map-paging{display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:360px;margin:auto}.all-connections{border:none;font-size:12px;color:var(--muted);display:flex;gap:12px;align-items:center}.map-meta{display:flex;justify-content:center;align-items:center;gap:16px;font-size:10px;color:var(--muted)}.map-meta .text-btn{font-size:11px}.map-meta .icon-btn{width:30px;font-size:15px}.map-meta .icon-btn svg{width:17px}.inspector{background:var(--surface);border-radius:26px 26px 50px 26px;padding:28px}.connection-story{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;min-height:32px;flex-wrap:wrap}.connection-story b{color:var(--ink);font-size:18px}.note-pills{display:flex;gap:8px;margin:18px 0;flex-wrap:wrap}.note-pills button{background:var(--surface2);min-width:44px;border:none;font-size:14px}.note-pills .common{background:var(--mint);color:var(--on-color)}.selected-actions{display:flex;align-items:center;gap:10px}.selected-actions .primary{flex:1}.desktop-tools{margin-top:25px;padding-top:12px;border-top:1px solid var(--line)}.wide-link{border:none;border-radius:0;display:flex;width:100%;align-items:center;justify-content:space-between;text-align:left;padding:15px 0;font-size:13px;gap:16px}.trail{display:flex;gap:8px;overflow-x:auto;padding:16px 0 4px;align-items:center;max-width:100%}.trail-chord{border:1px solid var(--line);background:var(--surface);flex:none;min-width:60px;display:flex;align-items:center;gap:8px;border-radius:14px;font-size:13px}.trail-chord small{font-size:10px;color:var(--muted)}.app-footer{text-align:center;font-size:10px;color:var(--muted);margin:24px 0 0}.bottom-nav{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:6px;padding:6px;width:330px;max-width:calc(100% - 30px);border:1px solid var(--line);background:var(--surface);box-shadow:0 10px 35px var(--shadow);border-radius:28px;z-index:10}.bottom-nav button{flex:1;display:flex;justify-content:center;align-items:center;gap:7px;min-height:44px;border:none;font-size:12px;padding:8px 10px}.bottom-nav button svg{width:17px;height:17px}.bottom-nav button:not(.active){color:var(--muted)}
/* Play */
.play-layout{display:grid;grid-template-columns:1fr 1.1fr;gap:80px;align-items:center;margin:18px 0 10px}.play-left,.play-right{min-width:0}.play-chord{position:relative;width:180px;margin:20px auto 40px}.play-body{width:180px;height:166px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:55% 45% 37% 63% / 54% 40% 60% 46%;color:var(--on-color);border:1px solid #97859f;padding:16px}.play-body strong{font-size:40px;line-height:1.1;letter-spacing:-2px;overflow-wrap:anywhere;max-width:100%}.play-body span{font-size:12px;margin-top:12px}.quality-tabs{display:flex;gap:5px;justify-content:center}.quality-tabs button{flex:1;padding:8px;font-size:12px}.voicing-tools{display:flex;align-items:center;justify-content:center;gap:3px;margin-top:16px}.voicing-tools>span{font-size:12px;color:var(--muted);margin-right:6px}.surface-label{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin:18px 0 16px}.strings{display:flex;flex-direction:column-reverse;gap:12px;touch-action:none;user-select:none;-webkit-user-select:none;padding:4px 0 12px}.string-row{display:flex;align-items:center;gap:6px}.string{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);background:var(--surface2);min-height:57px;width:var(--string-width);border-radius:14px 32px 26px 14px;text-align:left;padding:10px 18px;position:relative}.string b{font-size:21px}.string b small{font-size:10px;margin-left:5px;font-weight:400;color:var(--muted)}.string>span{font-size:11px;color:var(--muted)}.string.extension{background:var(--lilac);color:var(--on-color)}.string.extension>span,.string.extension small{color:#5e506c}.string-row:last-child .string.extension{background:var(--peach)}.string.sounding{background:var(--mint);color:var(--on-color);outline:2px solid var(--accent);outline-offset:2px;transform:translateX(4px)}.note-edit{border:none;width:35px;padding:0;flex:none;font-size:18px}.strum-row{display:flex;gap:8px;margin:12px 0}.strum-row>button:not(.icon-btn){flex:1}.play-actions{display:flex;gap:9px;margin-top:16px}.play-actions>.primary{flex:1}.gesture-trace{min-height:22px;padding-top:10px;font-size:11px;color:var(--muted)}.tool-shortcuts{display:flex;justify-content:center;gap:8px;border-top:1px solid var(--line);margin-top:25px;padding-top:18px}.tool-shortcuts button{border:none;color:var(--muted);font-size:12px}.playing{outline:2px solid var(--accent)!important;outline-offset:-2px}.trail-chord.playing{background:var(--lilac);color:var(--on-color)}
/* Create */
.create-page .page-toolbar{flex-wrap:wrap}.create-page h1 span{font-size:12px;color:var(--muted);font-weight:400}.progression-cards{display:flex;gap:10px;overflow-x:auto;padding:8px 3px 16px;align-items:center}.progression-card{flex:0 0 112px;display:flex;flex-direction:column;gap:10px;align-items:flex-start;background:var(--surface);border-radius:16px;padding:13px 16px}.progression-card small,.progression-card span{font-size:10px;color:var(--muted)}.progression-card b{font-size:22px;letter-spacing:-.7px}.progression-card.selected{background:var(--lilac);color:var(--on-color);border-color:#6a557f}.progression-card.selected span,.progression-card.selected small{color:#62526f}.step-toolbar{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin:8px 0 22px}.step-toolbar select{font-size:12px;padding:8px}.piano-scroll{max-width:100%;overflow:auto;max-height:440px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.piano-scroll>svg{min-width:100%;max-height:none}.piano-row{fill:var(--surface);stroke:var(--line);stroke-width:.25}.piano-row.black-key{fill:var(--surface2)}.pitch-label{font-size:9px;fill:var(--muted)}.step-name{font-size:12px;fill:var(--ink);font-weight:500}.piano-note{fill:var(--peach);cursor:pointer;stroke:#7b6378;stroke-width:.5}.piano-note.minor{fill:var(--mint)}.piano-note.dominant{fill:var(--lilac)}.piano-note.altered{fill:var(--lemon)}.piano-note.suspended{fill:var(--blue)}.voice-path{stroke:var(--accent);stroke-width:1;opacity:.8}.playing .piano-note{stroke:var(--accent);stroke-width:3}.transport{display:flex;align-items:center;gap:10px;margin-top:22px;flex-wrap:wrap}.transport-play{min-width:130px}.loop-btn[aria-pressed=true]{background:var(--accent);color:var(--bg)}.empty-state{text-align:center;padding:90px 12px}.empty-state h2{margin:25px 0}.empty-state>.primary{margin-right:12px}.empty-shapes{display:flex;justify-content:center;align-items:center;gap:14px}.empty-shapes i{width:65px;height:65px;background:var(--peach);border-radius:40% 60% 46% 54%}.empty-shapes i:nth-child(2){background:var(--mint);width:85px;height:85px;border-radius:55% 45% 38% 62%}.empty-shapes i:nth-child(3){background:var(--lilac)}
/* Contextual sheets */
dialog{color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:28px;max-width:min(620px,calc(100vw - 32px));width:620px;max-height:85svh;padding:0;box-shadow:0 30px 100px #1f152b40}dialog::backdrop{background:#21152c66;backdrop-filter:blur(5px)}.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:17px 24px 12px;position:sticky;top:0;background:var(--bg);z-index:3}.sheet-grip{display:none}.sheet-body{padding:10px 24px 30px;overflow-wrap:anywhere}.sheet-body>p{line-height:1.6}.sheet-caption{font-size:12px;color:var(--muted);margin:18px 0}.sheet-inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}.sheet-inline>span:first-child{margin-right:auto}.sheet-actions{display:flex;gap:10px;margin:22px 0 0}.sheet-actions>*{flex:1}.sheet-sticky{position:sticky;bottom:0;padding-top:16px;background:var(--bg)}.sheet-sticky .primary{width:100%}.tools-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tools-grid>button{display:flex;align-items:center;gap:14px;background:var(--surface);text-align:left;border-radius:16px;min-height:78px;padding:18px;font-size:14px}.tools-grid>button svg{width:25px;height:25px}.root-grid,.note-keyboard{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.root-grid button,.note-keyboard button{padding:10px 4px;min-height:47px}.root-grid .selected,.note-keyboard .selected{background:var(--accent);color:var(--bg)}.quality-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:20px}.quality-grid>button{display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-height:75px;background:var(--surface);border-radius:13px;padding:12px}.quality-grid b{font-size:18px}.quality-grid small{font-size:10px;color:var(--muted);text-align:left}.quality-grid .selected{background:var(--lilac);color:var(--on-color);border:2px solid #806393}.quality-grid .selected small{color:#594b69}.connection-results,.chord-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.connection-results button,.chord-results button{display:flex;align-items:flex-start;flex-direction:column;gap:8px;border-radius:14px;padding:14px;background:var(--surface);text-align:left}.connection-results b,.chord-results b{font-size:20px}.connection-results span,.chord-results span{font-size:11px;color:var(--muted);line-height:1.5}.segmented{display:flex;gap:7px;margin:0 0 24px}.segmented button{flex:1}.result-count,.empty-hint{font-size:12px;color:var(--muted);margin:15px 0}.interval-map{aspect-ratio:1;position:relative;max-width:340px;margin:12px auto}.interval-map>svg{position:absolute;inset:0;width:100%;height:100%}.interval-line{stroke:var(--line);stroke-width:1.5}.interval-line.selected{stroke:var(--accent);stroke-width:4}.interval-node{position:absolute;transform:translate(-50%,-50%);width:48px;height:48px;background:var(--lilac);color:var(--on-color);border:1px solid #92809d;border-radius:44% 56% 53% 47%;padding:5px;font-size:16px}.interval-list{display:grid;gap:7px;margin-top:14px}.interval-list button{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;border-radius:12px;background:var(--surface)}.interval-list span{font-size:12px;color:var(--muted)}.interval-list .selected{outline:2px solid var(--accent);outline-offset:-2px}.layer-controls{display:flex;gap:10px;align-items:center;margin:16px 0}.layer-controls>span{font-size:11px;width:36px;color:var(--muted)}.layer-controls .select-wrap:last-child{flex:1}.layer-controls select{width:100%}.layer-block{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;height:100px;padding:25px;border-radius:25px 35px 22px 30px;color:var(--on-color);border:1px solid #8a7998}.layer-block b{font-size:32px}.layer-block span{font-size:12px}.layer-block.upper{background:var(--lilac)}.layer-block.lower{background:var(--peach)}.layer-plus{text-align:center;padding:8px;font-size:22px;color:var(--muted)}.layer-summary{display:flex;gap:8px;flex-wrap:wrap;margin-top:24px}.layer-summary span{background:var(--surface2);border-radius:15px;padding:8px 12px}.scale-selectors>div{display:flex;align-items:center;gap:8px;margin:10px 0}.scale-selectors .select-wrap:nth-child(3){flex:1}.scale-selectors select{width:100%;font-size:12px}.scale-dot{width:9px;height:9px;border-radius:50%;flex:none}.scale-0{background:var(--peach)}.scale-1{background:var(--mint)}.scale-2{background:var(--lilac)}.scale-diagram{position:relative;height:230px;max-width:350px;margin:18px auto}.scale-shape{position:absolute;width:64%;height:86%;top:7%;opacity:.7;border:1px solid #a18bad;border-radius:49% 51% 44% 56%}.scale-shape.a{left:0;background:var(--peach)}.scale-shape.b{right:0;background:var(--mint)}.scale-shape.c{top:28%;left:19%;background:var(--lilac)}.three .scale-shape{width:61%;height:70%;top:0}.three .scale-shape.c{top:30%}.region{position:absolute;transform:translate(-50%,-50%);border:1px solid transparent;padding:5px;min-width:44px;min-height:44px;color:#373444;font-weight:700;font-size:18px}.region.selected{border-color:#554264;background:#fffcf4a6}.sheet-inline button{font-size:12px}.lesson-tabs{display:flex;gap:6px;margin-bottom:20px}.lesson-tabs button{flex:1;padding:8px;min-width:0}.lesson-pair{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:30px 0}.lesson-pair>span{color:var(--muted)}.lesson-body{height:105px;width:115px;font-size:27px;letter-spacing:-1px;border-radius:50% 50% 39% 61%;color:var(--on-color);border:1px solid #927d9e}.lesson-body.selected{outline:2px solid var(--accent);outline-offset:5px}.lesson-notes{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.lesson-notes .stays{background:var(--mint);color:var(--on-color)}.lesson-notes .moves{background:var(--peach);color:var(--on-color)}.lesson-hint{font-size:13px;text-align:center;color:var(--muted);margin:24px 0}form{display:flex;gap:10px;flex-wrap:wrap}form input{flex:1;min-width:0}#paste-form{display:block}#paste-form .primary{width:100%;margin-top:16px}.project-list>div{display:flex;gap:5px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}.project-list>div>button:first-child{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:7px;border:none;border-radius:0;overflow-wrap:anywhere;min-width:0;text-align:left}.project-list span{font-size:11px;color:var(--muted)}.range-label{display:flex;flex-direction:column;gap:16px;margin:22px 0}.error{color:#b33d5a;font-size:12px;margin:12px 0}.help-demo{display:flex;justify-content:center;gap:28px;align-items:center;font-size:30px;margin:20px 0 30px}.help-demo b{background:var(--surface);border-radius:40%;padding:20px}.help-demo span{color:var(--muted)}#toast{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,10px);padding:12px 18px;border-radius:18px;background:var(--ink);color:var(--bg);font-size:12px;max-width:calc(100vw - 35px);z-index:100;opacity:0;pointer-events:none;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:739px){.app-shell{padding:0 18px calc(95px + env(safe-area-inset-bottom))}.app-head{height:76px}.wordmark{font-size:22px}.head-actions{gap:1px}.logo{width:47px;height:47px}.head-actions .icon-btn{width:38px;padding:9px}.page-toolbar{margin:4px 0 12px}.chord-picker{padding:8px 12px;gap:8px}.chord-picker b{font-size:17px}.chord-picker .muted{font-size:10px}.relation-tabs{gap:3px;padding-bottom:9px;justify-content:space-between}.relation-tabs button{padding:8px 11px;font-size:12px;flex:1;white-space:nowrap}.explore-layout{display:block}.orbit-map{margin-top:7px;max-width:420px}.core{width:104px;height:100px}.core strong{font-size:calc(var(--name-size) * .86)}.core small{font-size:9px}.neighbor{width:54px;height:54px;font-size:13px}.map-paging{max-width:290px;margin-top:-4px}.map-meta{height:28px;gap:12px}.inspector{padding:14px 0 0;border-top:1px solid var(--line);background:none;border-radius:0;margin-top:7px}.connection-story{font-size:11px;min-height:19px}.connection-story b{font-size:14px}.note-pills{margin:10px 0;gap:6px}.note-pills button{min-height:40px;min-width:40px;padding:8px 11px;font-size:12px}.selected-actions{gap:8px}.selected-actions>.primary{max-width:230px}.desktop-tools{display:none}.app-footer{margin-top:18px}.trail{padding-top:15px}.play-layout{display:block;margin:0}.play-left{display:flex;flex-direction:column}.play-chord{width:100%;margin:8px 0 18px}.play-body{width:100%;height:auto;min-height:76px;border:none;background:none!important;flex-direction:row;justify-content:space-between;padding:5px 3px;color:var(--ink);border-radius:0;gap:20px}.play-body strong{font-size:40px}.play-body span{font-size:12px;margin:0;color:var(--muted)}.quality-tabs{gap:5px}.quality-tabs button{min-height:41px}.voicing-tools{margin-top:9px}.voicing-tools .icon-btn{width:34px}.surface-label{margin:14px 0 12px}.strings{gap:9px;padding-top:2px}.string{min-height:47px;padding:8px 15px}.string b{font-size:18px}.note-edit{width:30px}.play-actions{margin-top:9px}.strum-row{margin:8px 0}.gesture-trace{min-height:16px}.tool-shortcuts{padding-top:10px;margin-top:13px;gap:4px}.tool-shortcuts button{padding:8px 12px}.create-page h1{font-size:20px}.create-page .page-toolbar>.icon-btn{width:36px}.progression-card{flex-basis:96px}.step-toolbar{gap:0}.step-toolbar .icon-btn{width:35px}.step-toolbar select{font-size:11px;padding:8px}.piano-scroll{max-height:355px}.transport{gap:8px}.transport-play{min-width:100px}.transport .text-btn{font-size:11px}.empty-state{padding-top:70px}dialog{position:fixed;top:auto;bottom:0;margin:0;width:100%;max-width:100%;max-height:91svh;border-radius:26px 26px 0 0;border-bottom:0}.sheet-grip{display:block;margin:10px auto 0;width:34px;height:4px;border-radius:4px;background:var(--line)}.sheet-head{padding:9px 20px 10px}.sheet-body{padding:8px 20px calc(25px + env(safe-area-inset-bottom))}.sheet-head h2{font-size:20px}.quality-grid{gap:7px}.quality-grid>button{padding:10px;min-height:70px}.quality-grid b{font-size:16px}.quality-grid small{font-size:9px}.tools-grid>button{padding:15px;font-size:13px}.tools-grid{gap:10px}.lesson-tabs button{min-height:41px}.layer-controls{gap:7px}.layer-controls>span{width:30px}.layer-controls select{font-size:12px}.scale-selectors{margin:0}.scale-selectors select{padding:8px}.interval-map{max-width:300px}.bottom-nav{bottom:calc(8px + env(safe-area-inset-bottom))}}
@media(max-width:350px){.app-shell{padding-left:12px;padding-right:12px}.neighbor{width:49px;height:49px;font-size:12px}.core{width:94px;height:92px}.relation-tabs button{font-size:11px;padding:8px 6px}.wordmark{font-size:21px}.chord-picker .muted{max-width:100px}.sheet-body{padding-left:15px;padding-right:15px}.note-pills button{min-width:38px;padding:7px}.tools-grid>button{font-size:12px;padding:12px;gap:8px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .13s ease,filter .13s ease}.core{animation:arrive .23s cubic-bezier(.22,1,.36,1)}.string{transition:transform .13s ease,background .08s ease}.neighbor:active{transform:translate(-50%,-50%) scale(.95)}#toast{transition:opacity .2s,transform .2s}@keyframes arrive{from{opacity:.6;scale:.92}to{opacity:1;scale:1}}}
@media(prefers-reduced-motion:reduce){.string.sounding{transform:none}}

.neighbor{padding:2px}.neighbor b{white-space:nowrap;letter-spacing:-.04em}.layer-discover{margin-top:20px}.layer-discover summary{cursor:pointer;padding:14px 0}.layer-discover .select-wrap{margin-bottom:12px}

/* Editable progression tiles: handles own touch dragging; labels remain scrollable. */
.trail-tools{display:flex;align-items:center;justify-content:space-between;margin-top:14px;min-height:34px;color:var(--muted);font-size:10px}.trail-tools .icon-btn{width:36px;min-height:34px;height:34px;padding:8px}.trail-tools+.trail{padding-top:4px}
.chord-tile{position:relative;flex:none;display:flex;align-items:center;border:1px solid var(--line);border-radius:15px;background:var(--surface);isolation:isolate;user-select:none;-webkit-user-select:none}.chord-tile .trail-chord{border:0;background:transparent;padding:12px 3px;min-width:55px;gap:6px}.trail-chord b{font-weight:500;white-space:nowrap}.drag-handle{border:0;border-radius:12px 0 0 12px;min-width:32px;min-height:44px;padding:5px;color:var(--muted);font-size:23px;cursor:grab;touch-action:none}.drag-handle:active{cursor:grabbing}.chord-remove{border:0;min-width:36px;min-height:44px;padding:9px;color:var(--muted)}.chord-remove svg{width:15px;height:15px}.chord-remove:hover{background:var(--peach);color:var(--on-color)}.chord-tile.full{display:block;width:126px;padding-top:27px}.full .drag-handle{position:absolute;top:0;left:0;min-height:34px;z-index:2}.full .chord-remove{position:absolute;right:0;top:0;min-height:34px;z-index:2}.full .progression-card{width:100%;border:0;border-radius:0 0 14px 14px;padding:12px;min-height:105px}.chord-tile.drag-source{opacity:.4}.chord-tile.drop-before:before,.chord-tile.drop-after:after{content:'';position:absolute;top:0;bottom:0;width:3px;background:var(--accent);border-radius:3px}.chord-tile.drop-before:before{left:-6px}.chord-tile.drop-after:after{right:-6px}.core strong{white-space:nowrap;overflow-wrap:normal}.core small{max-width:100%}

.next-chord-list{display:grid;gap:9px}.next-chord-row{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:4px 8px 4px 4px}.next-chord-row>button:first-child{flex:1;min-width:0;display:grid;grid-template-columns:1fr 24px;text-align:left;gap:5px 12px;padding:12px;border-radius:12px}.next-chord-row b{font-size:23px}.next-chord-row span{font-size:11px;color:var(--muted);grid-column:1}.next-chord-row svg{width:22px;height:22px;grid-column:2;grid-row:1/3;align-self:center}.next-chord-row>.icon-btn{flex:none;background:var(--surface2)}
/* Songwriting flow: keep context, sound and the next action together. */
.context-line{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;color:var(--muted);font-size:12px}.connection-caption{font-size:12px;color:var(--muted);margin:0 0 12px}.relation-tabs{overflow-x:auto}.save-status{font-size:11px;line-height:1.5;color:var(--muted);margin-top:5px}.idea-toolbar,.suggestion-context{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 18px}.suggestion-context span{font-size:11px;color:var(--muted)}.key-chip{background:var(--surface);font-size:12px}.next-chord-button{min-width:112px;align-self:stretch;border-style:dashed;background:var(--surface);white-space:nowrap}.step-toolbar{flex-wrap:wrap;margin:18px 0;gap:8px}.step-toolbar>span{font-size:12px;color:var(--muted);flex-basis:100%}.transport{margin:18px 0;flex-wrap:wrap}.compact-transport{padding-bottom:8px}.piano-detail{border-top:1px solid var(--line);padding:15px 0;margin-top:20px}.piano-detail summary{cursor:pointer;font-size:13px;padding:10px 0;min-height:44px;color:var(--muted)}.single-chord svg{width:100%;height:auto}.piano-scroll{margin:12px 0}.empty-state{padding:30px 0;max-width:560px;margin:auto}.empty-state>p{color:var(--muted);font-size:13px;margin:12px 0 24px}.inline-editor{border:1px solid var(--line);background:var(--surface2);border-radius:24px;padding:18px;margin:20px 0}.inline-editor .play-body{background:transparent}.inline-editor .play-layout{gap:24px}.inline-editor .play-chord{margin:0 auto}.inline-editor .tool-shortcuts{margin-top:12px;padding-top:12px}.inversion-caption{text-align:center;color:var(--muted);font-size:12px;margin:16px 0 8px}.voicing-tools{flex-wrap:wrap;gap:8px;justify-content:center}.voicing-tools button{font-size:12px}.note-modes{margin:0 0 12px}.surface-label{gap:10px;line-height:1.5}.surface-label>span:last-child{white-space:nowrap}.move-notes .string{cursor:ns-resize;touch-action:none;position:relative}.pitch-dragging{z-index:4;box-shadow:0 4px 20px var(--shadow);outline:2px solid var(--accent)}.note-edit{width:44px;min-width:44px;min-height:44px}.contextual-results .chord-result{border:1px solid var(--line);background:var(--surface);border-radius:16px;overflow:hidden;text-align:left}.contextual-results .chord-result>button{width:100%;border:0;border-radius:0;min-height:44px}.contextual-results .chord-result>button:first-child{position:relative;display:flex;flex-direction:column;padding:16px 42px 12px 14px;gap:8px;align-items:flex-start}.chord-result>button:first-child svg{position:absolute;right:12px;top:18px;width:18px}.contextual-results .result-use{display:block;padding:10px 14px;border-top:1px solid var(--line);background:var(--surface2);font-size:12px;text-align:center}.next-chord-row{flex-wrap:wrap}.next-chord-row>.text-btn{flex-basis:100%;text-align:left;padding:4px 12px;min-height:36px}.next-chord-row>button:first-child{min-width:150px}.next-chord-row.previewing{outline:2px solid var(--accent)}.current-idea{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:18px}.current-idea b{overflow-wrap:anywhere}#save-error{flex-basis:100%}.global-playback{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);z-index:12;display:flex;align-items:center;gap:12px;padding:7px 14px 7px 7px;background:var(--surface);border:1px solid var(--line);border-radius:28px;box-shadow:0 6px 25px var(--shadow);max-width:calc(100vw - 24px);font-size:12px}.global-playback[hidden]{display:none}.global-playback button{white-space:nowrap}.app-shell{padding-bottom:160px}.full .drag-handle,.full .chord-remove{min-height:44px;min-width:44px}.chord-tile.full{padding-top:44px}.drag-handle{min-width:44px}.chord-remove{min-width:44px}.full .progression-card.selected{outline:2px solid var(--accent);outline-offset:-3px}.lesson-tabs{flex-wrap:wrap}.lesson-tabs button{flex:1 1 120px;font-size:11px}.backup-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.play-page .chord-picker{max-width:calc(100% - 50px)}.play-page .chord-picker b{overflow-wrap:anywhere}.play-body strong{font-size:var(--play-name-size,40px);white-space:nowrap;letter-spacing:-1px}
@media(max-width:739px){.app-shell{padding-bottom:160px}.inline-editor{padding:12px}.inline-editor .play-layout{display:block}.play-chord{margin-bottom:10px}.play-body{min-height:65px}.play-body strong{font-size:min(34px,var(--play-name-size,40px));flex-shrink:0}.step-toolbar .icon-btn{width:44px}.step-toolbar select{font-size:12px;min-height:44px}.step-toolbar>.secondary{font-size:12px}.create-page .page-toolbar{align-items:flex-start;gap:8px}.create-page .page-toolbar>div:first-child{min-width:0}.create-page h1{overflow-wrap:anywhere;font-size:19px}.create-page .page-toolbar>div:last-child{display:flex;flex:none}.create-page .page-toolbar .icon-btn{width:38px}.surface-label{font-size:11px}.relation-tabs{justify-content:flex-start}.relation-tabs button{flex:none;min-width:64px}.note-pills button{min-height:44px}.map-meta .icon-btn{width:44px}.next-chord-row>button:first-child{min-width:110px}.next-chord-row b{font-size:21px}.quality-tabs button{min-height:44px}.empty-state .sheet-actions{flex-direction:column}.global-playback{bottom:88px}.tool-shortcuts{flex-wrap:wrap}.piano-scroll{max-height:300px}}
@media(hover:hover) and (pointer:fine){.next-chord-row:hover{border-color:var(--accent)}}
.import-button{position:relative;display:inline-flex;align-items:center;min-height:44px;padding:10px 15px;border:1px solid var(--line);border-radius:22px;background:var(--surface);cursor:pointer;font-size:14px}.import-button input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}.import-button:focus-within{outline:3px solid var(--accent);outline-offset:3px}
.sheet-audio{display:flex;gap:12px;align-items:center;padding:8px 24px;font-size:12px;background:var(--surface)}.sheet-audio[hidden]{display:none}
.create-page .page-toolbar{flex-wrap:nowrap;gap:12px}.create-page .page-toolbar>div:first-child{display:block;flex:1;min-width:0}.create-page .page-toolbar>div:last-child{display:flex;flex:none;gap:0}.create-page .page-toolbar h1{line-height:1.3}.progression-card b{font-size:var(--tile-name-size,24px);white-space:nowrap;letter-spacing:-.6px}.progression-next{display:flex;justify-content:flex-end;margin:12px 0}.progression-next .next-chord-button{min-height:44px;flex:1;max-width:200px}.create-page .page-toolbar .text-btn{padding-left:5px;padding-right:5px}

.map-paging>.all-connections:only-child{margin-inline:auto}

.explore-inversions{margin:0 0 16px}.inversion-summary{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;font-size:12px}.inversion-summary span{color:var(--muted)}.explore-inversions .voicing-tools{margin-top:10px;gap:8px}.explore-inversions .voicing-tools button{flex:1;min-height:44px}.inversion-hint{font-size:11px;color:var(--muted);margin:8px 0 0;text-align:center}
