/* SONIQ V10 — RESPONSIVE COMPACT FULLSCREEN */

/* Normal mobile phone screens */
@media (max-width:700px) and (min-height:610px){

 html,body{
  width:100%;
  height:100%;
  overflow-x:hidden;
  overflow-y:hidden;
 }

 .board{
  width:100%;
  height:100dvh;
  min-height:0;
  overflow:hidden;
 }

 .board-shell{
  width:100%;
  height:100dvh;
  min-height:0;
  max-height:100dvh;
  padding:
   max(6px,env(safe-area-inset-top))
   max(7px,env(safe-area-inset-right))
   max(6px,env(safe-area-inset-bottom))
   max(7px,env(safe-area-inset-left));
  gap:clamp(3px,.6dvh,6px);
  overflow:hidden;
 }

 /* Smaller upper heading */
 .brand{
  min-height:25px;
  height:25px;
  flex:0 0 25px;
 }

 .brand-name strong{
  font-size:clamp(11px,3.4vw,17px);
 }

 .power-led{
  width:12px;
  height:12px;
 }

 /* Compact waveform and six real controls */
 .top-section{
  flex:0 0 auto;
  height:clamp(145px,25dvh,195px);
  min-height:0;
  gap:6px;
 }

 .display-zone{
  width:100%;
  min-height:0;
  height:100%;
 }

 .display-outer{
  width:min(100%,25dvh,195px);
  max-width:100%;
  aspect-ratio:1;
  margin:auto;
 }

 .action-grid{
  height:100%;
  min-height:0;
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:5px;
 }

 .action-grid button{
  min-height:0;
  height:100%;
  border-radius:9px;
  font-size:clamp(9px,2.4vw,12px);
  padding:3px;
 }

 .auto-button small{
  font-size:8px;
 }

 /* Compact upload and visitor row */
 .upload-line{
  height:40px;
  flex:0 0 40px;
  gap:6px;
 }

 .upload,
 .live-counter{
  height:40px;
  min-height:0;
  border-radius:9px;
 }

 .upload{
  font-size:clamp(10px,2.8vw,14px);
 }

 .live-counter{
  font-size:clamp(8px,2.2vw,11px);
 }

 /* Song filename and timeline */
 .song-line{
  flex:0 0 auto;
  line-height:13px;
  font-size:10px;
 }

 .playback-progress{
  flex:0 0 auto;
  gap:0;
 }

 #seek{
  height:18px;
 }

 .timestamps{
  font-size:10px;
  line-height:13px;
 }

 /* Signup and login stay inside the board */
 .account-row{
  flex:0 0 39px;
  height:39px;
  gap:6px;
 }

 .account-row a{
  min-height:0;
  height:39px;
  border-radius:9px;
  font-size:clamp(11px,3vw,15px);
 }

 /* Twelve boxes automatically fill remaining space */
 .slots-section{
  flex:1 1 0;
  min-height:0;
  height:auto;
  overflow:hidden;
 }

 .slots-grid{
  width:100%;
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(0,1fr));
  gap:clamp(4px,.6dvh,7px);
 }

 .slots-grid button{
  width:100%;
  height:100%;
  min-height:0;
  border-radius:9px;
  font-size:clamp(11px,3vw,16px);
  padding:2px;
 }

 .message{
  flex:0 0 auto;
  min-height:12px;
  font-size:9px;
  line-height:12px;
  margin:0;
 }
}

/* Very short screens: protect usability instead
   of cutting off upload or login controls. */
@media (max-width:700px) and (max-height:609px){
 html,body{
  height:auto;
  overflow-y:auto;
 }

 .board,
 .board-shell{
  min-height:100dvh;
  height:auto;
  overflow:visible;
 }

 .top-section{
  gap:5px;
 }

 .slots-section{
  min-height:240px;
 }

 .slots-grid{
  grid-template-rows:repeat(4,minmax(52px,1fr));
  gap:5px;
 }

 .slots-grid button{
  min-height:52px;
 }

 .account-row a{
  min-height:39px;
 }
}

/* Landscape phones: scrolling is safer than
   making touch targets too small. */
@media (orientation:landscape) and (max-height:550px){
 html,body{
  height:auto;
  overflow-y:auto;
 }

 .board,.board-shell{
  height:auto;
  min-height:100dvh;
  overflow:visible;
 }
}
