.test-box {
    position: relative;
    padding-left: 25px;
    transition: all 0.3s; /* smooth transition */
}

.test-box-header {
    background-color: #F7F4F4; /* 背景グレー */
    height: 55px; /* 高さ30px */
    width: 100%; /* 親要素の幅に合わせる */
    position: absolute; /* 絶対位置指定 */
    top: 0;
    left: 0;
}

/* .test-box内のテキストスタイル */
.test-box p {
    margin: 0; /* デフォルトのマージンを削除 */
    /* その他のテキストスタイル */
}

.japanese-exam-grid {
  row-gap: 1rem;
}

.japanese-exam-card-outline {
  margin: 0;
}

.japanese-exam-card {
  width: 100%;
  min-height: 218px;
  height: 100%;
  background-color: #FFFFFF;
  border: 1px solid #E7ECF4;
  box-shadow: 0 10px 26px rgba(27, 39, 51, 0.08) !important;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.japanese-exam-card:hover {
  box-shadow: 0 14px 30px rgba(27, 39, 51, 0.12) !important;
  transform: translateY(-1px);
}

.japanese-exam-card-body {
  min-height: 218px;
  height: 100%;
  padding: 1.15rem 1.35rem 1rem;
  box-sizing: border-box;
}

.japanese-exam-icon {
  min-height: 38px;
  margin-bottom: 0.62rem;
  color: #4C66A4 !important;
  font-size: 2.35rem;
  line-height: 1;
}

.japanese-exam-study-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 48px;
  min-height: 46px;
  margin-bottom: 0.58rem;
  color: #4C66A4;
  line-height: 1;
}

.japanese-exam-study-icon i {
  color: inherit;
  font-size: 2.45rem;
}

.japanese-exam-study-icon span {
  position: absolute;
  right: -0.08rem;
  bottom: -0.02rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background-color: #4C66A4;
  color: #FFFFFF;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}

.japanese-exam-title {
  width: 100%;
  min-height: 1.55rem;
  margin: 0;
  color: #1A2433;
  font-size: 1.16rem;
  font-weight: 500;
  line-height: 1.18;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.japanese-exam-desc {
  margin: 0.55rem 0 0;
  line-height: 1.35;
}

.japanese-exam-card-divider {
  width: 100%;
  margin: 0.72rem 0 0.72rem;
  border-top: 1px solid #E6EAF0;
}

.japanese-exam-level-actions {
  gap: 0.75rem;
}

.japanese-exam-level-button {
  flex: 1 1 0;
  max-width: 156px;
  min-width: 0;
}

.japanese-exam-note-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 330px;
  margin-top: 0.55rem;
}

.japanese-exam-note {
  margin: 0;
  line-height: 1.3;
}

.japanese-exam-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  min-height: 44px;
  padding: 0.58rem 1rem;
  color: #F5FCFC !important;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1;
}

.japanese-exam-button span {
  color: inherit;
}

.japanese-exam-resource-link {
  display: inline-block;
}

.ginou-box-outline {
  margin: 12px 0;
}

.ginou-box {
    background-color: #FFFFFF;
    width: 100%;
    min-height: 236px;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid #E7ECF4;
    box-shadow: 0 10px 26px rgba(27, 39, 51, 0.08) !important;
    cursor: default;
    outline: none;
}

.ginou-box-body {
  min-height: 236px;
  padding: 1.45rem 0.95rem 0.9rem;
  box-sizing: border-box;
}

.ginou-box:hover {
    box-shadow: 0 14px 30px rgba(27, 39, 51, 0.12) !important;
}

.ginou-icon-wrap {
  min-height: 60px;
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.home-sector-icon {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.ginou-sector-title {
  width: 100%;
  min-height: 3rem;
  margin: 0;
  padding: 0 0.2rem;
  color: #1A2433;
  font-size: clamp(0.98rem, 1.1vw, 1.12rem);
  font-weight: 500;
  line-height: 1.16;
  display: block;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  text-wrap: balance;
}

html:not([lang^="ja"]):not([lang^="zh"]) .home-sector-grid .ginou-sector-title {
  min-height: 3.35rem;
  font-size: clamp(0.86rem, 0.96vw, 0.98rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.ginou-card-divider {
  width: 100%;
  margin: auto 0 0.7rem;
  border-top: 1px solid #E6EAF0;
}

.ginou-level-actions {
  --ginou-level-gap: 0.68rem;
  width: calc(100% - 1.2rem) !important;
  max-width: 100%;
  gap: var(--ginou-level-gap);
  margin-inline: auto;
  margin-top: 0;
}

.ginou-level-actions-double {
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: stretch;
}

.ginou-level-actions-single .ginou-level-button {
  flex: 0 1 calc((100% - var(--ginou-level-gap)) / 2);
  min-width: 0;
  max-width: calc((100% - var(--ginou-level-gap)) / 2);
}

.ginou-level-actions-double .ginou-level-button {
  flex: 1 1 calc((100% - var(--ginou-level-gap)) / 2);
  min-width: 0;
  max-width: calc((100% - var(--ginou-level-gap)) / 2);
}

.ginou-level-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.48rem 0.72rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .ginou-box-body {
    padding-right: 0.58rem;
    padding-left: 0.58rem;
  }

  .ginou-level-actions {
    --ginou-level-gap: 0.36rem;
    width: calc(100% - 0.12rem) !important;
  }

  .ginou-level-button {
    min-height: 46px;
    padding: 0.46rem 0.42rem;
  }
}

@media (max-width: 767.98px) {
  .japanese-exam-grid {
    row-gap: 0.8rem;
  }

  .japanese-exam-card {
    min-height: 188px;
  }

  .japanese-exam-card-body {
    min-height: 188px;
    padding: 1rem 0.9rem 0.9rem;
  }

  .japanese-exam-icon {
    min-height: 34px;
    margin-bottom: 0.5rem;
    font-size: 2.1rem;
  }

  .japanese-exam-study-icon {
    width: 50px;
    height: 42px;
    min-height: 40px;
    margin-bottom: 0.46rem;
  }

  .japanese-exam-study-icon i {
    font-size: 2.1rem;
  }

  .japanese-exam-study-icon span {
    width: 1.28rem;
    height: 1.28rem;
    font-size: 0.76rem;
  }

  .japanese-exam-title {
    min-height: 0;
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .japanese-exam-desc {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .japanese-exam-card-divider {
    margin: 0.58rem 0 0.58rem;
  }

  .japanese-exam-level-actions {
    gap: 0.5rem;
  }

  .japanese-exam-note-row {
    gap: 0.5rem;
    margin-top: 0.45rem;
  }

  .japanese-exam-note {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .japanese-exam-button {
    min-width: 112px;
    min-height: 38px;
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
  }

  .ginou-box-outline {
    margin: 7px 0;
  }

  .ginou-box {
    min-height: 186px;
    height: 186px;
  }

  .ginou-box-body {
    min-height: 186px;
    height: 186px;
    padding: 0.82rem 0.42rem 0.45rem;
    display: flex !important;
    flex-direction: column;
    align-items: center;
  }

  .ginou-icon-wrap {
    min-height: 46px;
    margin-top: 0.16rem;
    margin-bottom: 0.34rem;
  }

  .home-sector-icon {
    width: 46px;
    height: 46px;
  }

  .ginou-sector-title {
    min-height: 1.9rem;
    padding: 0 0.1rem;
    font-size: 0.96rem;
    line-height: 1;
  }

  html:not([lang^="ja"]):not([lang^="zh"]) .home-sector-grid .ginou-sector-title {
    min-height: 2.24rem;
    font-size: 0.81rem;
    line-height: 1.01;
  }

  .ginou-card-divider {
    margin: auto 0 0.38rem;
  }

  .ginou-level-button {
    min-height: 42px;
    padding: 0.45rem 0.4rem;
    font-size: 0.8rem;
  }

  .ginou-level-actions {
    --ginou-level-gap: 0.42rem;
    width: calc(100% - 0.72rem) !important;
    gap: var(--ginou-level-gap);
    margin-inline: auto;
    margin-top: 0;
  }

  .ginou-level-actions-single .ginou-level-button {
    flex: 0 1 calc((100% - var(--ginou-level-gap)) / 2);
    min-width: 0;
    max-width: calc((100% - var(--ginou-level-gap)) / 2);
  }

  .ginou-level-actions-double {
    flex-direction: row;
    align-items: stretch;
  }

  .ginou-level-actions-double .ginou-level-button {
    flex: 1 1 calc((100% - var(--ginou-level-gap)) / 2);
    max-width: calc((100% - var(--ginou-level-gap)) / 2);
    min-width: 0;
    min-height: 42px;
    padding: 0.45rem 0.28rem;
    font-size: 0.74rem;
  }

}
