.teacher-app{max-width:1000px;padding:20px 16px 40px}
.teacher-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.teacher-header h1{display:flex;align-items:baseline;gap:10px;font-size:24px}
.teacher-header h1 span{font-size:14px;font-weight:500;color:#aebbd1}
.teacher-status{font-size:13px;color:#9dafcc;margin:8px 0 18px;min-height:20px}
.teacher-app .panel{padding:24px}
.library-heading{display:flex;align-items:flex-end;gap:16px}
.exercise-picker{flex:1;min-width:0}.exercise-picker label{display:block;font-weight:700;margin-bottom:8px}
.library-tools{margin-top:28px;padding-top:18px;border-top:1px solid #2c3b55}
.library-tools summary,.exercise-settings summary,.note-options summary{cursor:pointer;color:#aebbd1;font-size:13px;padding:8px 0}
.library-tools>.row{margin-top:12px}
.exercise-title{font-size:24px;line-height:1.35;margin:0 0 20px;min-width:0;overflow-wrap:anywhere}
.sequence-heading{margin-bottom:12px}
.sequence-heading h3{font-size:15px;margin:0}.sequence-heading .pill{margin-left:6px}
.quiet-button{background:transparent;border-color:#344968;font-size:13px;padding:8px 12px}
.sequence-area{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch;margin-bottom:24px}
.note-sequence{display:contents}
.note-card{display:flex;align-items:center;gap:9px;background:#1b2940;border-color:#344968;padding:10px 12px;text-align:left;min-width:105px}
.note-card strong{display:block;font-size:14px}.note-card small{display:block;font-size:11px;margin-top:3px}
.note-card small span+span::before{content:' · '}
.note-index{display:grid;place-items:center;min-width:22px;height:22px;border-radius:50%;background:#0b1428;color:#9dafcc;font-size:11px}
.note-card.picked{border-color:#fbbf24;background:#4b3b20}.note-card.picked strong{color:#fbbf24}.note-card.picked .note-index{background:#fbbf24;color:#151515}
.add-note{border-style:dashed;border-color:#64748b;background:transparent;font-size:13px;min-height:58px}
.add-note.active{background:#4b3b20;border-color:#fbbf24}
.note-context{padding-top:20px;border-top:1px solid #344968}
.note-navigation{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;align-items:center}
.note-navigation button{min-height:44px;padding:8px;font-size:20px}
.note-context h3{margin:0;font-size:17px;color:#fbbf24}.note-context p{margin:7px 0 0;line-height:1.5}
.note-actions{margin:12px 0 4px}
.note-actions>button{min-height:44px;font-size:13px}
.note-actions #insertAfter{border-color:#b48a30;background:#3b321f;color:#fbbf24}
.mobile-board,.mobile-sequence-hint{display:none}
.exercise-editor .fretwrap{margin:12px 0 16px}
.exercise-editor .fretboard{min-width:680px}
.note-properties{padding-bottom:10px}
.note-properties .fingerrow{margin:10px 0}
.note-properties .fingerrow button{font-size:13px;padding:9px 12px}
.note-options{margin-top:12px}.note-options>.row{margin-top:8px}
.exercise-settings{margin:20px 0;padding-top:14px;border-top:1px solid #344968}
.exercise-settings>label{display:block;font-size:13px;margin:12px 0 7px}
.exercise-settings>.row{margin-top:12px}
.danger-button{margin-top:12px;background:transparent;border-color:#77434a;color:#fda4af;font-size:12px}
.save-bar{position:sticky;bottom:12px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin:20px -8px -8px;background:#1b2940;border:1px solid #405271;border-radius:13px;box-shadow:0 6px 24px #0005}
.save-bar .primary{white-space:nowrap}
.teacher-app footer{font-size:11px;line-height:1.6;max-width:650px}
@media(max-width:760px){
  .teacher-app{font-size:17px;line-height:1.5;padding:12px max(10px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));-webkit-text-size-adjust:100%}
  .teacher-app .panel{padding:16px;min-width:0}
  .teacher-app button,.teacher-app input,.teacher-app select{max-width:100%;font-size:16px;min-height:48px}
  .teacher-app .muted,.teacher-status{font-size:16px;color:#bdcbe0;line-height:1.5}
  .teacher-header{flex-wrap:wrap;gap:4px}.teacher-header h1{margin:4px 0;font-size:23px}.teacher-header h1 span{font-size:16px}
  .teacher-header>.pill{display:none}
  .teacher-status{margin:12px 0 16px}
  .library-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}
  .library-heading>button{padding:10px}
  .exercise-title{font-size:22px;overflow-wrap:anywhere}
  .sequence-heading{margin-bottom:8px}.sequence-heading h3{font-size:20px}.sequence-heading .pill{font-size:15px}
  .mobile-sequence-hint{display:block;margin:0 0 16px}
  .sequence-area{display:block;margin-bottom:16px;min-width:0}
  .note-sequence{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;min-width:0}
  .sequence-pane .note-card{min-width:0;width:100%;min-height:52px;padding:8px 6px;gap:5px;align-items:center}
  .note-caption{min-width:0}.note-card strong{font-size:18px;line-height:1.3;margin:0}
  .note-card small{display:none}
  .note-index{min-width:20px;height:20px;font-size:12px}
  .add-note{width:100%;margin-top:14px;font-size:17px}
  .note-pane{display:block}
  .note-context{padding-top:20px}.note-context h3{font-size:19px}.note-context p{font-size:16px}
  .note-navigation{grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}
  .note-actions{gap:8px;margin:16px 0}.note-actions>button{font-size:16px;padding:10px}
  .exercise-editor #board{display:none}
  .mobile-board{display:block;margin:22px 0}
  .mobile-neck-title{font-size:21px;margin:0 0 10px}
  .mobile-board .neck-selection{padding:12px;background:#263450;border:1px solid #536781;border-radius:10px;color:#f8fafc;font-size:16px;line-height:1.5;margin:16px 0}
  .mobile-neck{display:grid;grid-template-columns:26px repeat(6,minmax(0,1fr));width:100%;min-width:0;border:1px solid #586176;border-radius:10px;overflow:hidden;background:#34281e}
  .neck-corner,.neck-string-label{background:#1b2940;min-width:0;border-bottom:5px solid #d1c7b6;text-align:center;display:flex;flex-direction:column;justify-content:center;min-height:60px;padding:4px 0}
  .neck-corner{font-size:10px;color:#bdcbe0;border-bottom-color:#1b2940}
  .neck-string-label strong{font-size:16px;color:#f8fafc}.neck-string-label>span{font-size:12px;color:#c7d4e8}
  .neck-fret-label{display:grid;place-items:center;font-size:15px;font-weight:700;background:#1b2940;color:#d7e2f3}
  .teacher-app .mobile-neck .neck-cell{position:relative;isolation:isolate;display:grid;place-items:center;min-width:0;width:100%;min-height:56px;max-width:none;padding:0;border:0;border-radius:0;background:transparent;font-size:13px;touch-action:manipulation}
  .neck-cell::before{content:'';position:absolute;z-index:-1;top:0;bottom:0;left:calc(50% - 1px);width:2px;background:linear-gradient(90deg,#928776,#eee1c8)}
  .neck-cell[data-s="6"]::before{width:4px;left:calc(50% - 2px)}.neck-cell[data-s="5"]::before{width:3px}.neck-cell[data-s="1"]::before{width:1px}
  .neck-cell::after{content:'';position:absolute;z-index:-1;bottom:0;left:0;right:0;height:4px;background:linear-gradient(#d4d8dc,#747d88)}
  .neck-note{padding:5px 2px;border:1px solid transparent;border-radius:8px;background:#151d2bd9;font-size:13px;font-weight:600;line-height:1.4;max-width:100%;color:#d0d9e7}
  .neck-used .neck-note{border-color:#52c9b4;color:#98f5df;background:#133c36}
  .neck-picked .neck-note{border-color:#fff;background:#fbbf24;color:#151515;font-weight:800;box-shadow:0 0 0 2px #fbbf2455}
  .mobile-neck .neck-cell:focus-visible{outline:3px solid #38d9a9;outline-offset:-3px;z-index:1}
  .mobile-board .neck-legend{font-size:14px;line-height:1.5;margin:12px 0 20px}
  .guided-picker{border-top:1px solid #405271;padding-top:8px}
  .guided-picker summary{cursor:pointer;font-size:16px;min-height:48px;padding:12px 0;color:#c7d4e8}
  .guided-picker>label{display:block;font-size:18px;font-weight:700;margin:12px 0 8px}
  .mobile-board select,.exercise-settings input{font-size:18px}
  .mobile-board>p{margin:18px 0 10px;font-size:16px}
  .mobile-frets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .mobile-frets button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:10px 4px;min-height:76px;touch-action:manipulation}
  .mobile-frets button span{font-size:15px;color:#c7d4e8}.mobile-frets button strong{font-size:22px}
  .mobile-frets button.active{background:#fbbf24;color:#151515;border-color:#fff}.mobile-frets button.active span{color:#3b321f}
  .note-properties .fingerrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .note-properties .fingerrow button{font-size:16px;min-height:52px}
  .note-options summary,.exercise-settings summary,.library-tools summary{font-size:16px;min-height:48px;display:list-item;padding:12px 0;overflow-wrap:anywhere}
  .exercise-settings>label,.switchline{font-size:16px}
  .switchline input{min-height:24px;min-width:24px;flex:none}
  .save-bar{position:static;align-items:stretch;flex-direction:column;gap:12px;padding:16px 0 0;margin:24px 0 0;border:0;border-top:1px solid #405271;border-radius:0;box-shadow:none;background:transparent}
  .save-bar .primary{width:100%;min-height:56px;font-size:17px;white-space:normal}
  .teacher-app footer{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
  .teacher-import{display:block;max-width:100%}.teacher-import input{min-width:0}
}

@media(min-width:1100px){
  .teacher-app{max-width:1240px}
  .editor-content{display:grid;grid-template-columns:280px minmax(0,1fr);gap:26px;align-items:start}
  .sequence-pane{padding-right:22px;border-right:1px solid #344968}
  .sequence-pane .note-card{flex:0 0 calc(50% - 4px);min-width:0;padding:8px;gap:6px}
  .sequence-pane .note-card small{font-size:10px}
  .sequence-pane .note-index{min-width:18px;height:18px;font-size:10px}
  .sequence-pane .add-note{width:100%;min-height:45px}
  .sequence-pane .quiet-button{font-size:12px;padding:6px 8px}
  .note-pane .note-context{padding-top:0;border-top:0;align-items:flex-start}
  .note-pane .fretboard{min-width:710px}
  .exercise-title{margin-bottom:28px}
}
