@media (max-width:900px){
  #room-dialog:has(.chamber-stage[data-room=works]){scrollbar-width:none}
  #room-dialog:has(.chamber-stage[data-room=works])::-webkit-scrollbar{display:none}
}
@media (max-width:1024px){
  .studio-detail .portfolio-controls .portfolio-navigation button{
    min-width:44px;
    min-height:44px;
    height:44px;
    padding:4px 10px;
    font-size:20px;
  }
}
@media (max-width:900px) and (max-height:500px) and (orientation:landscape){
  #room-dialog:has(.chamber-stage[data-room=works]) .chamber-toolbar{position:absolute;inset:0 auto auto 0;height:760px}
  #room-dialog:has(.chamber-stage[data-room=works]) #room-back{position:absolute;top:630px!important;bottom:auto!important}
}

/* Keep the approved gallery painting intact on narrow screens; pan the room. */
@media (max-width:900px){
  #room-dialog:has(.chamber-stage[data-room=works]){overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
  #room-dialog:has(.chamber-stage[data-room=works])::-webkit-scrollbar{display:none}
  .chamber-stage[data-room=works]{position:relative;inset:auto;left:0;top:0;transform:none;width:max(1350px,177.6833svh);height:max(760px,100svh);min-height:0;padding:0;container-type:size;overflow:hidden}
  .chamber-stage[data-room=works] #room-art,.chamber-stage[data-room=works] #chamber-world,.chamber-stage[data-room=works] .chamber-atmosphere{inset:0;width:100%;height:100%;object-fit:fill}
  .chamber-stage[data-room=works] #chamber-content{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;container-type:size}
  .chamber-stage[data-room=works] .gallery-sign{left:30%;top:16%;width:40%;padding:14px 18px}
  .chamber-stage[data-room=works] #chamber-content .gallery-sign h2{font-size:2.5cqw!important}
  .chamber-stage[data-room=works] #chamber-content .gallery-sign p{font-size:1.2cqw}
  .chamber-stage[data-room=works] .gallery-label{left:37%!important;top:31.4%;width:26%!important;height:5.5%;padding-top:0;font-size:1.5cqw!important}
  .chamber-stage[data-room=works] .gallery-caption{left:37%!important;top:37.2%!important;width:26%!important;height:3%;font-size:1.05cqw!important}
  .chamber-stage[data-room=works] .gallery-slot-center{display:block;left:37%;top:42.8%;width:26%;height:22%}
  .chamber-stage[data-room=works] .gallery-slot-left{display:block;left:20%;top:43.6%;width:12%;height:20%}
  .chamber-stage[data-room=works] .gallery-slot-right{display:block;left:68%;top:43.6%;width:12%;height:20%}
  .chamber-stage[data-room=works] .gallery-prev,.chamber-stage[data-room=works] .gallery-next{top:69%;width:3.2%;height:5.5%;font-size:1.9cqw;transform:translate(-50%,-50%)}
  .chamber-stage[data-room=works] .gallery-prev{left:45%;right:auto}
  .chamber-stage[data-room=works] .gallery-next{left:55%;right:auto}
  .chamber-stage[data-room=works] .gallery-cta{left:38%;top:77%;width:24%;height:6%;font-size:1.1cqw}
  #room-dialog:has(.chamber-stage[data-room=works]) .chamber-toolbar{position:absolute;inset:0 auto auto 0;transform:none;width:max(1350px,177.6833svh);height:max(760px,100svh)}
  #room-dialog:has(.chamber-stage[data-room=works]) #room-back{position:absolute;left:calc(50% - 45vw)!important;top:auto!important;bottom:3%!important}
  #room-dialog:has(.chamber-stage[data-room=works]) .statistics-settings{top:8px;bottom:auto}
}

@media(max-width:600px){
  .studio-detail .statistics-settings{top:8px;bottom:auto}
}

@media(max-width:900px){
  .chamber-stage[data-room=works] .gallery-sign{
    left:50%;
    width:min(40%, calc(100vw - 24px));
    transform:translateX(-50%);
    padding:8px 12px;
  }
  .chamber-stage[data-room=works] #chamber-content .gallery-sign h2{
    font-size:min(2.5cqw, 8vw)!important;
  }
  .chamber-stage[data-room=works] #chamber-content .gallery-sign p{
    font-size:clamp(13px, 3.5vw, 17px);
  }
  .chamber-stage[data-room=works] .gallery-label,
  .chamber-stage[data-room=works] .gallery-caption{
    left:50%!important;
    width:min(26%, calc(100vw - 24px))!important;
    transform:translateX(-50%);
  }
  .chamber-stage[data-room=works] .gallery-cta{
    left:50%;
    width:min(24%, calc(100vw - 24px));
    transform:translateX(-50%);
  }
}

/* Project name: compact like the discussion button, with a clear gap below the hall sign. */
.chamber-stage[data-room=works] .gallery-sign{top:15%}
.chamber-stage[data-room=works] .gallery-label{
  left:38%;top:31.4%;width:24%;height:4.8%;
  padding:0;font-size:1.1cqw!important;line-height:1.15;
  display:grid;place-items:center;
}
@media(max-width:900px){
  .chamber-stage[data-room=works] .gallery-label{
    left:50%!important;width:min(24%, calc(100vw - 24px))!important;
    font-size:1.1cqw!important;
  }
}

@media (min-width:700px) and (max-width:900px) and (orientation:landscape) and (max-height:500px){
  .chamber-stage[data-room=works] .gallery-sign{top:18.5%!important}
  .chamber-stage[data-room=works] .gallery-label{font-size:1cqw!important;line-height:1.05}
  .chamber-stage[data-room=works] .gallery-caption{font-size:.75cqw!important;line-height:1}
}
