@charset "UTF-8";

/*
 * その他専門外来：タブ幅調整
 * style.css の後に読み込み、既存指定を上書きします。
 */

.main-others .tab-area ul.tabs.tabs-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 0 8px;
  text-align: initial;
}

.main-others .tab-area ul.tabs.tabs-fit li,
.main-others .tab-area ul.tabs.tabs-fit li.current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 76px;
  margin: 0;
  padding: 16px 12px;
  font-size: 18px;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.main-others .tab-area ul.tabs.tabs-fit li.current {
  padding: 16px 12px;
  font-size: 20px;
  border-bottom: 2px solid #fff;
}

@media (max-width: 640px) {
  .main-others .tab-area ul.tabs.tabs-fit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.08rem;
    padding: 0;
  }

  .main-others .tab-area ul.tabs.tabs-fit li,
  .main-others .tab-area ul.tabs.tabs-fit li.current {
    width: auto;
    min-width: 0;
    min-height: 1.05rem;
    height: auto;
    margin: 0;
    padding: 0.18rem 0.08rem;
    font-size: 0.2rem;
    line-height: 1.4;
  }

  .main-others .tab-area ul.tabs.tabs-fit li.current {
    padding: 0.18rem 0.08rem;
    font-size: 0.22rem;
    border-bottom: 1px solid #fff;
  }
}
