/* =========================================================
   Mi Piano — adaptaciones
   ---------------------------------------------------------
   Pantallas pequeñas, bajas e impresión. Va SIEMPRE la última: aquí están
   los @media que corrigen todo lo anterior.
   ========================================================= */
@media (max-height:780px){.kb{height:84px}}
@media (max-height:640px){.kb{height:72px}}
@media (max-width:900px){
  .coachgrid{grid-template-columns:1fr}
  .layout{flex-direction:column}
  main{padding:14px 14px 90px}
  header .brand h1{font-size:.98rem}
}
@media (max-width:560px){
  header .sub{display:none}
  .progwrap{min-width:96px}
}
/* cabecera en dos filas: marca y progreso arriba; los botones, abajo,
   en una tira que se desliza con el dedo. Antes, en móvil desbordaba a
   617 px, y en la tablet en vertical partía «Piano Fácil» y cada botón */
@media (max-width:900px){
  header{flex-wrap:wrap;row-gap:8px}
  .hacciones{order:3;flex:1 1 100%;gap:8px;overflow-x:auto;scrollbar-width:none;
    -webkit-overflow-scrolling:touch;padding-bottom:2px}
  .hacciones::-webkit-scrollbar{display:none}
  .hacciones .hbtn{flex:0 0 auto}
}
@media (max-width:620px){
  /* la barra de la partitura, igual: una fila, para que el pentagrama
     quede arriba y no detrás de siete filas de botones */
  .toolbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  .toolbar::-webkit-scrollbar{display:none}
  .toolbar>*{flex:0 0 auto}
  .audiobox{width:calc(100vw - 24px);bottom:calc(10px + env(safe-area-inset-bottom))}
  .dogbtn{width:50px;height:50px;bottom:calc(76px + env(safe-area-inset-bottom))}
  .dogbubble{bottom:calc(134px + env(safe-area-inset-bottom))}
}
/* pantallas bajas: el panel aprovecha mejor el espacio */
@media (max-height:720px){
  .drawer{gap:6px;padding-top:calc(10px + env(safe-area-inset-top))}
  .drawer .btn.wide,.drawer .seg.vert button,.drawer .tempo.wide{height:var(--tap);font-size:.81rem}
  .dsec{padding:9px 11px;gap:7px}
  .dsec .btn{height:var(--tap)}
  .drawer .fhead{font-size:.9rem}
}
@media print{
  header,nav,.toolbar,.navbtns,.audiobox,.kbbox,.warnbox,.sharenote,
  .fbar,.drawer,.scrim,.fab,.dogbtn,.dogbubble{display:none!important}
  main{padding:0;max-width:none}
  body{background:var(--surface)}
  #sheetwrap{border:0;padding:0}
  body.focus .stage{position:static;padding:0}
  .card{break-inside:avoid;page-break-inside:avoid}
}

/* ---------------------------------------------------------
   Dentro de la app Flutter solo se muestra el pentagrama: los
   controles son nativos Material 3. Ver js/puente.js
   --------------------------------------------------------- */
body.solo-pentagrama header,
body.solo-pentagrama nav,
body.solo-pentagrama .toolbar,
body.solo-pentagrama .navbtns,
body.solo-pentagrama .card,
body.solo-pentagrama .kbbox,
body.solo-pentagrama .fbar,
body.solo-pentagrama .dogbtn,
body.solo-pentagrama .fab,
body.solo-pentagrama .audiobox,
body.solo-pentagrama .eyebrow,
body.solo-pentagrama .title,
body.solo-pentagrama .goal,
/* lo del rediseño (raíl, barra de abajo, ⛶) y las barras de «toca tú», el
   canto y el examen: en la app todo eso es nativo (v168) */
body.solo-pentagrama #rail,
body.solo-pentagrama #toolbar,
body.solo-pentagrama #dock,
body.solo-pentagrama #focusbtn,
body.solo-pentagrama #tocabar,
body.solo-pentagrama #cantabar,
body.solo-pentagrama #examenbar,
body.solo-pentagrama #cancionbar,
body.solo-pentagrama #tareabanner,
body.solo-pentagrama #sharenote,
body.solo-pentagrama #regalocinta,
body.solo-pentagrama #portada,
body.solo-pentagrama #drawer,
body.solo-pentagrama #scrim{display:none!important}
body.solo-pentagrama{padding:0!important;margin:0;background:#fffefb}
body.solo-pentagrama main{padding:0}
body.solo-pentagrama .stage{border:0;border-radius:0;padding:0;box-shadow:none}
body.solo-pentagrama .sheetzone{min-height:100vh}
