/* Tablet-only layout patch for AI Content Studio.
   Desktop and mobile layouts remain separate. */
@media (min-width:761px) and (max-width:1180px){
  .app-shell{grid-template-columns:96px minmax(0,1fr)!important}
  .sidebar{padding:16px 10px 14px!important}
  .brand{justify-content:center!important;margin:0 0 22px!important}
  .brand-title{display:none!important}
  .brand-logo{width:46px!important;height:46px!important;flex-basis:46px!important}

  .sidebar nav{gap:8px!important;padding-bottom:150px!important}
  .nav-btn{
    grid-template-columns:1fr!important;
    justify-items:center!important;
    gap:5px!important;
    min-height:62px!important;
    padding:8px 4px!important;
    text-align:center!important;
    font-size:10px!important;
    line-height:1.15!important;
  }
  .nav-btn .nav-icon{width:34px!important;height:34px!important}
  .nav-btn .nav-label{display:block!important;width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

  .main{max-width:none!important;padding:22px 18px 38px!important}
  .topbar{margin-bottom:22px!important}
  .topbar h1{font-size:28px!important}
  .stats{gap:10px!important}
  .stat-card{padding:16px!important}
  .panel{padding:16px!important}

  .cards,.media-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .card{padding:16px!important}
  .project-tabs{gap:6px!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .project-tab{padding:9px 11px!important;font-size:12px!important}
  .project-head{padding:13px 14px!important}
  .project-head h2{font-size:20px!important}

  .scenes-layout{grid-template-columns:180px minmax(0,1fr)!important;gap:12px!important;min-height:520px!important}
  .scene-item{padding:10px 11px!important;font-size:12px!important}
  .control-row{gap:8px!important}
  .control-row label{width:96px!important}
  .control-row button{padding:9px 11px!important;font-size:12px!important}
  .form-row{gap:10px!important}

  .media-card-body{padding:12px!important}
  .media-card-body h3{font-size:14px!important}
  .media-card-body .secondary,.media-card-body .primary{min-height:38px!important;padding:8px 10px!important;font-size:12px!important}

  dialog{width:min(680px,calc(100vw - 36px))!important}
}

/* Chrome on Android tablets can report a wider CSS viewport than expected.
   Coarse pointer keeps these account controls tablet-only without touching desktop. */
@media (pointer:coarse) and (min-width:761px){
  body #acs-lang-switch{
    left:12px!important;
    right:auto!important;
    bottom:70px!important;
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    height:38px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:3px!important;
    padding:3px!important;
    border-radius:11px!important;
    box-sizing:border-box!important;
    transform:none!important;
  }
  body #acs-lang-switch button{min-width:0!important;padding:0!important;font-size:9px!important}

  body #acs-userbar{
    left:12px!important;
    right:auto!important;
    bottom:14px!important;
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    min-height:44px!important;
    height:44px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    padding:5px!important;
    margin:0!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    transform:none!important;
  }
  body #acs-userbar span{display:none!important;width:0!important;max-width:0!important;margin:0!important;padding:0!important;overflow:hidden!important}
  body #acs-userbar #acs-logout,
  body #acs-userbar .acs-btn{
    width:62px!important;
    min-width:62px!important;
    max-width:62px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0 5px!important;
    margin:0!important;
    border-radius:9px!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
}
