/* Final mobile polish pass: compact, readable touch layouts without changing desktop. */
@media screen and (max-width: 900px){
  html,body{overflow-x:hidden}
  .container{width:calc(100% - 32px)}
  img,video,canvas,svg{max-width:100%}
  .page-heading,.song-heading{max-width:100%}
  .page-heading h1,.song-heading h1,.collection-heading h1{overflow-wrap:anywhere;hyphens:auto}
  .form-grid{grid-template-columns:minmax(0,1fr)!important}
  .form-grid label,.form-card label{min-width:0}
  .form-grid input:not([type=checkbox]):not([type=radio]),.form-grid select,.form-grid textarea{width:100%}
  .admin-actions{gap:10px}
  .admin-actions .button,.admin-actions form{min-width:0}
  .lineup-export-controls .transpose-form{max-width:none;width:100%}
  .lineup-export-controls .transpose-form>.text-link{border:1px solid var(--line);border-radius:8px;min-height:44px;padding:10px 14px;justify-content:center;text-align:center}
}

@media screen and (max-width: 760px){
  .container{width:calc(100% - 24px)}
  main{padding-bottom:48px}
  .header-inner{height:auto;min-height:66px;padding:10px 0;align-items:center}
  .brand{font-size:27px;min-width:0}
  .brand-symbol{width:28px;height:32px;font-size:29px;margin-right:7px}
  .header-actions{margin-left:auto;gap:4px;min-width:0}
  .mobile-toggle{width:44px;height:44px}
  .mobile-nav:not([hidden]){grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 0 16px}
  .mobile-nav a{display:flex;align-items:center;justify-content:center;text-align:center;min-height:46px;padding:10px 8px;line-height:1.25}

  .page-heading{margin:18px 0 18px;padding:14px 0 10px}
  .page-heading h1,.song-heading h1{font-size:clamp(28px,8vw,34px);line-height:1.12;letter-spacing:0}
  .page-heading p,.song-heading p{font-size:14px;line-height:1.55}
  .eyebrow{letter-spacing:.08em;line-height:1.35}
  .breadcrumbs{display:flex;flex-wrap:wrap;gap:6px 8px;font-size:13px;line-height:1.4;padding-top:12px}

  .button,.button.small,input,select,textarea{font-size:16px}
  .button,.button.small{min-height:46px;padding:10px 14px;line-height:1.25;text-align:center}
  .text-link{min-height:44px;align-items:center}
  .icon-button{width:44px;height:44px}

  .filter-panel{grid-template-columns:minmax(0,1fr)!important;padding:12px;gap:10px}
  .filter-search,.filter-panel select,.filter-panel .button{grid-column:1/-1;width:100%}
  .search-bar{gap:8px;padding:6px 6px 6px 12px}
  .search-bar input{font-size:16px;min-width:0}
  .song-suggestions{max-height:320px;overflow:auto}
  .song-suggestion{padding:13px 12px}

  .collection-heading.page-heading{padding:18px 0 16px;gap:12px}
  .collection-heading .lineup-heading-actions,.lineup-heading-actions{display:grid;grid-template-columns:1fr;gap:8px;width:100%}
  .collection-heading .lineup-heading-actions .button,.lineup-heading-actions .button{width:100%}

  .event-grid{grid-template-columns:minmax(0,1fr)!important;gap:14px}
  .event-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:14px;padding:16px}
  .event-date{min-width:0;width:64px;padding:10px 6px}.event-date strong{font-size:29px}.event-date span{font-size:11px}
  .event-card h2{font-size:23px;line-height:1.18;margin:6px 0}.event-card .admin-actions{display:grid;grid-template-columns:1fr;margin-top:12px}.event-card .admin-actions form,.event-card .admin-actions .button,.event-card .admin-actions .text-link{width:100%;justify-content:center;text-align:center}

  .lineup-actions{padding:12px;margin-bottom:16px}
  .lineup-actions-main,.lineup-actions-manage{display:grid;grid-template-columns:1fr;gap:8px}
  .lineup-actions-main .button,.lineup-actions-manage a{width:100%;justify-content:center;text-align:center}
  .lineup-actions>.field-help{font-size:12px;line-height:1.45}

  .lineup-song{display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:8px 10px;align-items:start;padding:15px 0}
  .lineup-song>.song-number{grid-column:1;grid-row:1;width:26px;padding-top:2px;font-size:12px}
  .lineup-song>.song-name{grid-column:2;grid-row:1;min-width:0}
  .lineup-song>.key-badge{grid-column:3;grid-row:1;margin:0;white-space:nowrap}
  .lineup-song>.text-link{grid-column:2 / 4;display:flex;justify-content:center;text-align:center;border:1px solid var(--line);border-radius:8px;padding:8px 10px;min-height:44px;background:var(--surface)}
  .lineup-song>.text-link + .text-link{margin-top:0}
  .lineup-song .artist-name{display:block;margin-top:3px;line-height:1.35}
  .lineup-song .entry-note{font-size:13px;line-height:1.45;overflow-wrap:anywhere}

  .lineup-entry{padding:14px;margin:16px 0;border-radius:10px}
  .entry-heading{display:grid;grid-template-columns:1fr;gap:10px}
  .entry-heading h3{font-size:16px;line-height:1.3;overflow-wrap:anywhere}
  .section-editor-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}
  .section-editor-actions button{width:100%;padding:8px 4px;font-size:12px;line-height:1.2}
  .entry-settings{grid-template-columns:1fr!important;gap:12px;margin-top:14px}
  .song-picker{padding:14px;margin:22px 0;border-radius:10px}
  .picker-search{display:grid;grid-template-columns:1fr;gap:8px}.picker-search input,.picker-search button{width:100%}
  .picker-result{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0}.picker-result .button{width:100%}

  .song-heading{display:grid;gap:12px;margin:18px 0}.song-heading-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:8px}.song-heading-actions .button{width:100%;min-width:0;padding-left:8px;padding-right:8px;line-height:1.2}
  .song-metadata{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px 0;margin:18px 0;gap:12px}.song-metadata dt{font-size:10px}.song-metadata dd{font-size:14px}
  .lineup-reader-nav{padding:12px;gap:10px}.lineup-reader-nav>div{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}.lineup-reader-nav .button{width:100%}

  .reader-view-tabs{display:flex!important;gap:6px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:4px;margin-bottom:14px}.reader-view-tabs a{flex:0 0 auto;min-width:112px;scroll-snap-align:start;white-space:normal;line-height:1.2;padding:10px 12px;font-size:12px}
  .sheet-part-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important;background:transparent!important;padding:0!important}.sheet-part-tabs button{min-height:44px;font-size:12px;line-height:1.15;padding:8px 5px!important;white-space:normal!important}
  .sheet-editor{padding:12px;margin:14px 0}.sheet-editor textarea[data-part-sheet]{height:70svh;min-height:520px;font-size:15px}.sheet-editor .sheet-cue-input{grid-template-columns:1fr!important}.sheet-editor .sheet-cue-input button{width:100%}.sheet-live-preview{padding:12px}.sheet-live-preview pre.aligned-chart{max-height:420px;overflow:auto}
  .sheet-edit-actions,.preview-size{display:grid;grid-template-columns:1fr 1fr;gap:8px}.preview-size span,.preview-size output{display:flex;align-items:center;justify-content:center}.sheet-edit-actions button,.preview-size button{width:100%}

  .editor-save{display:grid!important;grid-template-columns:1fr;align-items:stretch;padding:12px;gap:8px}.editor-save .button,.editor-save .text-link{width:100%;justify-content:center;text-align:center}.schedule-save-bottom{position:sticky!important;bottom:0;border-radius:10px 10px 0 0;margin-left:-12px;margin-right:-12px}

  .lineup-export-controls.page-heading{padding-top:8px}.lineup-export-controls .transpose-form{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}.lineup-export-controls .transpose-form>*{grid-column:1/-1!important;width:100%}.export-font-control{width:100%;justify-content:space-between}.lineup-export-controls .transpose-form>.text-link{width:100%;justify-content:center}

  .account-page .account-actions{display:grid;grid-template-columns:1fr;gap:8px}.account-page .account-actions .button,.account-page .account-actions form,.account-page .account-actions form button{width:100%}.account-page .account-manage .button{width:100%}.account-password-heading{margin-top:34px!important;margin-bottom:14px!important;font-size:27px!important;line-height:1.12}.account-password-form{padding:16px}

  nav.admin-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}nav.admin-nav>a,nav.admin-nav button{min-height:44px;text-align:center;justify-content:center;line-height:1.2;overflow-wrap:anywhere}
  .admin-table{font-size:13px}.admin-table th,.admin-table td{padding:10px 8px}.song-admin-actions{display:grid;grid-template-columns:1fr;gap:6px}.song-admin-actions a{justify-content:center;border:1px solid var(--line);border-radius:7px;padding:8px}
}

@media screen and (max-width:380px){
  .container{width:calc(100% - 20px)}
  .song-heading-actions{grid-template-columns:1fr}
  .lineup-song{grid-template-columns:22px minmax(0,1fr)}
  .lineup-song>.key-badge{grid-column:2;grid-row:2;justify-self:start}.lineup-song>.text-link{grid-column:1 / -1}
  .section-editor-actions{grid-template-columns:1fr}
}

@media screen and (max-width:1100px){
  .mobile-nav:not([hidden]){display:block;padding:8px 0 18px}
  .mobile-nav-list{list-style:none;margin:0;padding:0}
  .mobile-nav-list>li{margin:0;padding:0}
  .mobile-nav-list a,.mobile-nav-list button{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:45px;padding:10px 4px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font:inherit;font-size:14px;font-weight:400;line-height:1.35;text-align:left;text-decoration:none;box-shadow:none}
  .mobile-nav-list a:hover,.mobile-nav-list button:hover{background:var(--soft);color:var(--green);filter:none}
  .mobile-nav-list a:focus-visible,.mobile-nav-list button:focus-visible{outline:2px solid var(--green);outline-offset:-2px}
  .mobile-nav-divider{height:1px;margin:9px 0;background:var(--line)}
  .mobile-nav-section-label{padding:17px 4px 4px!important;color:var(--muted);font-size:10px;font-weight:650;letter-spacing:1px;text-transform:uppercase}
  .mobile-nav-list .mobile-nav-admin-overview{color:var(--green);font-weight:650}
  .mobile-nav-signout{margin-top:10px!important;padding-top:10px!important;border-top:1px solid var(--line)}
  .mobile-nav-signout form{margin:0}
  .mobile-nav-list .mobile-nav-signout button{gap:9px;border-bottom:0;color:var(--muted);cursor:pointer}
}
