.p-outpatient_list {
  max-width: 62.5rem;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 3rem;

  li {
    flex-basis: calc((100% - 2rem) / 5);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 0.1rem solid #ddd;
    border-radius: 0.8rem;

    img {
      max-width: 70%;
      width: 100%;
      height: auto;
    }
  }

  a {
    padding: 1rem;
    text-decoration: none;
    color: #000;

    p {
      text-align: center;
      line-height: 1.5;

      span {
        font-size: 0.8em;
      }
    }
  }
}

@media screen and (max-width: 670px) {
  .p-outpatient_list {
    li {
      flex-basis: calc((100% - 2rem) / 2);

      img {
        max-width: 50%;
      }
    }
  }
}

.p-entranceSct {
  padding: 5rem 1rem 0;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;

  img {
    width: 100%;
    height: auto;
  }
}

.p-entranceSct_ttl {
  margin-bottom: 1.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  h2 {
    color: #ff0000;
    font-size: 2em;
    font-weight: normal;
    line-height: 1.5;
  }

  p {
    display: inline-block;
    color: #ff0000;
    text-align: center;
    font-weight: bold;
    padding: 0.625em 1.5em;
    background-color: #fff5f9;
    border: 0.1rem solid #ff0000;
    border-radius: 50em;
  }
}

.tab-buttons {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: stretch;
}
.tab-buttons_wrap {
  width: 49%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.tab-buttons_wrap_inner {
  font-size: 1.125rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.5rem;
  dt {
    font-weight: bold;
  }
  dd {
    font-size: 0.9em;
    margin-left: 1.4rem;
    .tab-note_text {
      font-size: 1.08em;
      font-weight: bold;
    }
  }
}
#tab-other-wrap .tab-buttons_wrap_inner {
  dt {
    color: #60a5fa;
  }
  dd {
    .tab-note_text {
      color: #60a5fa;
      border-radius: 100rem;
      display: inline-block;
    }
  }
}
#tab-respiratory-wrap .tab-buttons_wrap_inner {
  dt {
    color: #ff5722;
  }
  dd {
    .tab-note_text {
      color: #ff5722;
      border-radius: 100rem;
      display: inline-block;
    }
  }
}
.tab-buttons_wrap_inner .tab-note {
  margin-top: auto;
}
.tab-btn {
  margin-top: auto;
  width: 100%;
  padding: 1.25em 1.25rem 1em;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.tab-title {
  font-size: 1.625em;
  font-weight: bold;
}

#tab-other {
  position: relative;
  border: 2px solid #60a5fa;
  background-color: #fff;
  color: #60a5fa;
}

#tab-other.active {
  background-color: #60a5fa;
  color: #fff;
  opacity: 1;
}

#tab-other::before {
  position: absolute;
  content: '';
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-top: 0.5rem solid #60a5fa;
  transition: transform 0.2s ease;
}
#tab-other.active::before {
  transform: translateY(-50%) rotate(180deg);
  border-top-color: #fff;
}

#tab-respiratory {
  position: relative;
  border: 2px solid #ff5722;
  background-color: #fff;
  color: #ff5722;
}

#tab-respiratory.active {
  background-color: #ff5722;
  color: #fff;
  opacity: 1;
}

#tab-respiratory::before {
  position: absolute;
  content: '';
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-top: 0.5rem solid #ff5722;
  transition: transform 0.2s ease;
}
#tab-respiratory.active::before {
  transform: translateY(-50%) rotate(180deg);
  border-top-color: #fff;
}

.tab-contents {
  max-width: 41.875rem;
  width: 90%;
  margin: 0 auto;
}
.content-box_inr:not(:last-child)::after {
  content: '';
  margin: 1rem auto;
  display: block;
  bottom: 0;
  width: 0;
  height: 0;
}
#content-other .content-box_inr:not(:last-child)::after {
  border-left: 2rem solid transparent;
  border-right: 2rem solid transparent;
  border-top: 1rem solid #60a5fa;
}
#content-respiratory .content-box_inr:not(:last-child)::after {
  border-left: 2rem solid transparent;
  border-right: 2rem solid transparent;
  border-top: 1rem solid #ff5722;
}
.guide-text {
  font-size: 1.125rem;
  margin-top: 0.5rem;
}
#content-other,
#content-respiratory {
  display: none;
}

.p-utl_dib {
  display: inline-block;
}
.p-sp-only {
  display: none;
}

@media screen and (max-width: 1000px) {
  .p-entranceSct_ttl {
    h2 {
      font-size: 1.6em;

      br {
        display: none;
      }
    }
  }
  .tab-btn {
    padding: 1.25em 1.25rem 1em;
  }

  .tab-title {
    font-size: 1.125em;
  }

  .tab-desc {
    font-size: 0.8em;
    br {
      display: none;
    }
  }
  .guide-text {
    font-size: 0.875rem;
  }
  .tab-buttons_wrap_inner {
    font-size: 0.875rem;
    dd {
      margin-left: 1rem;
      }
  }
  #tab-respiratory::before,
  #tab-other::before {
    right: 0.6rem;
    border-left: 0.4rem solid transparent;
    border-right: 0.4rem solid transparent;
    border-top: 0.4rem solid;
  }
  .p-sp-only {
    display: block;
  }
}
