/* Mobile layout fixes for Memory Loop cards/buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:46px;
  line-height:1.18;
  white-space:normal;
  word-break:keep-all;
  overflow-wrap:break-word;
}

.top .row .btn,
.head .row .btn,
.batchactions .btn{
  min-width:104px;
}

/* Schedule/date cards must keep equal size even when a sub label is present. */
.schedule{
  align-items:stretch;
  gap:12px;
}
.schedule div{
  min-height:104px;
  height:104px;
  padding:12px 8px;
  border-radius:16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.schedule span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  font-size:28px;
  font-weight:900;
  line-height:1.05;
  letter-spacing:-.04em;
  word-break:keep-all;
  white-space:normal;
  overflow:visible;
}
.schedule small{
  min-height:16px;
  margin-top:7px;
  font-size:14px;
  font-weight:800;
  line-height:1.15;
  word-break:keep-all;
  white-space:normal;
}

/* Keep card/button labels from being clipped in small mobile widths. */
.stat,
.card,
.panel,
.draftitem,
.batch,
.item{
  overflow:visible;
}

@media(max-width:680px){
  .shell{
    width:min(100% - 20px,940px);
    padding-top:22px;
  }
  h1{
    font-size:34px;
    line-height:1.12;
  }
  .top{
    gap:14px;
  }
  .top .row{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .top .row .btn{
    width:100%;
    min-height:76px;
    border-radius:18px;
    padding:12px 8px;
    font-size:22px;
    line-height:1.15;
  }
  .head .row{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .head .row .btn{
    width:100%;
    min-height:70px;
    border-radius:18px;
    padding:12px 8px;
    font-size:20px;
    line-height:1.18;
  }
  .head .row .btn.pri{
    font-size:19px;
  }
  .schedule{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
  }
  .schedule div{
    min-height:96px;
    height:96px;
    border-radius:16px;
    padding:10px 6px;
  }
  .schedule span{
    font-size:30px;
    min-height:38px;
  }
  .schedule small{
    font-size:13px;
    min-height:16px;
    margin-top:6px;
  }
}

@media(max-width:430px){
  .top .row .btn{
    min-height:72px;
    font-size:20px;
  }
  .head .row .btn{
    min-height:66px;
    font-size:18px;
  }
  .head .row .btn.pri{
    font-size:17px;
  }
  .schedule{
    gap:10px;
  }
  .schedule div{
    min-height:90px;
    height:90px;
    padding:9px 5px;
  }
  .schedule span{
    font-size:27px;
  }
  .schedule small{
    font-size:12px;
  }
}
