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

.test-box-header {
    background-color: var(--color-surface);
    height: 55px; /* 高さ30px */
    width: 100%; /* 親要素の幅に合わせる */
    position: absolute; /* 絶対位置指定 */
    top: 0;
    left: 0;
}

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

.home-page {
  --home-button-primary: #35C6B4;
  --home-button-primary-hover: #2FB6A6;
  --home-button-secondary: #579AB8;
  --home-button-secondary-hover: #4B8FAC;
}

.home-page .page-title {
  font-size: 1.15rem;
  line-height: 1.3;
}

.home-page .home-intro-description {
  font-size: 0.8rem;
  line-height: 1.5;
}

.home-page .home-learning-method-link {
  display: none;
}

@media (max-width: 767.98px) {
  .home-page .page-title {
    font-size: 1rem;
  }

  .home-page .home-intro-description {
    font-size: 0.75rem;
  }
}

.home-page .main-button {
  background-color: var(--home-button-primary);
  color: var(--color-text-inverse) !important;
}

.home-page .secondary-button {
  background-color: var(--home-button-secondary);
  color: var(--color-text-inverse) !important;
}

.home-page .main-button *,
.home-page .secondary-button * {
  color: inherit !important;
}

.home-page .main-button:hover,
.home-page .main-button:focus {
  background-color: var(--home-button-primary-hover);
  filter: none;
}

.home-page .secondary-button:hover,
.home-page .secondary-button:focus {
  background-color: var(--home-button-secondary-hover);
  filter: none;
}

.home-update-container {
  width: 100%;
  max-width: none;
  margin: 0.6rem 0 0.85rem;
  padding: 0 4px;
}

.update-notice-card {
  width: 100%;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  box-shadow: none !important;
  padding: 0.18rem 1rem 0.34rem;
}

.home-update-container-top {
  margin: 0.18rem 0 0.78rem;
  padding: 0 0.25rem;
}

.update-notice-card-compact {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  min-height: 34px;
  padding: 0.16rem 0;
}

.update-notice-strip {
  width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none !important;
}

.update-notice-compact-main {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
}

.update-notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.38rem;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: var(--color-main-soft);
  color: var(--color-success-text);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.update-notice-body-compact {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.45;
}

.update-notice-link {
  flex: 0 0 auto;
}

.home-update-section {
  margin-top: 0.8rem;
}

.home-update-container-bottom {
  margin-top: 0;
  margin-bottom: 0;
}

.home-section {
  padding: 0 0.25rem;
}

.home-section-heading {
  margin-bottom: 1.05rem;
  text-align: center;
}

.home-section-title {
  margin: 0;
  color: var(--color-text-strong);
  font-size: clamp(1.12rem, 1.55vw, 1.36rem);
  font-weight: 700;
  line-height: 1.32;
}

.home-section-heading img {
  width: 16px;
  height: 16px;
  opacity: 0.55;
}

.home-section-heading .link {
  color: var(--color-muted) !important;
  font-weight: 600;
}

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

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

.japanese-exam-card {
  width: 100%;
  min-height: 218px;
  height: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: none !important;
  box-sizing: border-box;
  transition: none;
}

.japanese-exam-card:hover {
  border-color: var(--color-border-soft);
  box-shadow: none !important;
}

.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: var(--color-sector-icon) !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: var(--color-sector-icon);
  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 var(--color-surface);
  border-radius: 50%;
  background-color: var(--color-sector-icon);
  color: var(--color-text-inverse);
  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: var(--color-text-strong);
  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 var(--color-border-soft);
}

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

.japanese-exam-level-button {
  flex: 1 1 0;
  max-width: 138px;
  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: 112px;
  min-height: 40px;
  padding: 0.48rem 0.86rem;
  color: var(--color-white) !important;
  font-size: 0.94rem;
  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: var(--color-surface);
    width: 100%;
    min-height: 218px;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid var(--color-border-soft);
    box-shadow: none !important;
    cursor: default;
    outline: none;
    transition: none;
}

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

.ginou-box:hover {
    border-color: var(--color-border-soft);
    box-shadow: none !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: var(--color-text-strong);
  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 var(--color-border-soft);
}

.ginou-level-actions {
  --ginou-level-gap: 0.48rem;
  width: auto !important;
  max-width: 154px;
  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 0 64px;
  min-width: 64px;
  max-width: 64px;
}

.ginou-level-actions-double .ginou-level-button {
  flex: 0 0 64px;
  min-width: 64px;
  max-width: 64px;
}

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

@media (min-width: 768px) and (max-width: 1199.98px) {
  .japanese-exam-level-actions {
    gap: 0.5rem;
  }

  .japanese-exam-level-button {
    max-width: 124px;
  }

  .japanese-exam-button {
    min-width: 102px;
    min-height: 38px;
    padding: 0.42rem 0.78rem;
    font-size: 0.9rem;
  }

  .ginou-box-body {
    padding-right: 0.58rem;
    padding-left: 0.58rem;
  }

  .ginou-level-actions {
    --ginou-level-gap: 0.42rem;
    width: auto !important;
    max-width: 144px;
  }

  .ginou-level-button {
    min-width: 60px;
    max-width: 60px;
    min-height: 34px;
    padding: 0.34rem 0.38rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 767.98px) {
  .home-section {
    padding: 0;
  }

  .home-update-container {
    padding: 0 4px;
  }

  .update-notice-card-compact {
    align-items: flex-start;
    gap: 0.44rem;
    min-height: 0;
    padding: 0.12rem 0;
  }

  .update-notice-compact-main {
    align-items: flex-start;
  }

  .home-section-heading {
    margin-bottom: 0.7rem;
  }

  .home-section-title {
    font-size: 1.18rem;
  }

  .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: 104px;
    min-height: 38px;
    padding: 0.42rem 0.78rem;
    font-size: 0.9rem;
  }

  .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;
  }

}
