/* TaxAI Fit Screen v114.6 */

/* 横はみ出し防止 */
html,
body{
  max-width:100vw!important;
  overflow-x:hidden!important;
}

.taxai-main,
.main-content,
.content-wrapper,
.taxai-content,
.admin-content,
.taxai-v86-page,
.taxai-v86-main,
.taxai-pro-page{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}

/* 本文は画面内に収める */
.taxai-content > *,
.admin-content > *,
main > *,
.taxai-v86-main{
  width:100%!important;
  max-width:calc(100vw - 360px)!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* KPIカードは可変。無理に4列固定しない */
.taxai-pro-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
  gap:18px!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* テーブルだけ横スクロール許可 */
.table-responsive{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
}

.taxai-pro-table,
table{
  width:100%!important;
  max-width:100%!important;
}

/* 以前のwide指定を打ち消し */
@media(min-width:1201px){
  .taxai-pro-grid{
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
  }
}

@media(max-width:1024px){
  .taxai-content > *,
  .admin-content > *,
  main > *,
  .taxai-v86-main{
    max-width:100%!important;
  }

  .taxai-pro-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:640px){
  .taxai-pro-grid{
    grid-template-columns:1fr!important;
  }
}
