/* =========================
   test page (mobile base)
========================= */
.test {
  background: #fff;
}

/* hero */
.test_hero {
  background: var(--gradient-blue);
  padding: 34px 20px 30px;
  text-align: center;
}

.test_hero__inner {
  margin: 0 auto;
}

.test_hero__top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
}

.test_hero__symbol {
  flex: 0 0 auto;
}

/* 아이콘 움직임 */
.test_hero__symbol img {
  display: block;
  width: 80px;
  margin: 0;
}

.test_hero__eyebrow {
  margin: 0;
  color: var(--color-yellow);  
  font-size: var( --font-h2);
  font-weight: var(--font-weight-m);
  line-height: 1.28;
  letter-spacing: -0.03em;
  text-align: left;
}

.test_hero__title {
  margin: 6px 0 0;
  color: var(--color-white);
  font-size: var( --font-h1);
  font-weight: var(--font-weight-r);
  line-height: 1.32;
  letter-spacing: -0.04em;
  text-align: center;
}

.test_hero__symbol img {
  animation: heroFloat 1.8s ease-in-out infinite;
}

@keyframes heroFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* yellow 텍스트 살짝 등장하기 */
.test_hero__eyebrow,
.test_hero__title {
  animation: heroFadeUp 0.5s ease-out both;
  animation-delay: 0.2s;  
}

.test_hero__title {
  animation-delay: 0.6s;
}

@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* intro */
.test_intro {
  padding: 44px 0px 10px;
  text-align: center;
}

.test_intro__bubble {
  position: relative;
  display: inline-block;
  background: var(--color-yellow);
  padding: 18px 18px 20px;
  border-radius: var(--radius-m);
  text-align: center;
  font-weight: var(--font-weight-r);
  font-size: var(--font-h5);
  color: var(--color-black);
}

.test_intro__bubble::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);

  right: 112px; /* 숫자 줄이면 더 오른쪽 */
  width: 18px;
  height: 18px;
  background: var(--color-yellow);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transform: rotate(90deg);
}


/* 말풍선 아래 설명 + 소년 */
.test_intro__character {
  margin-top: 4px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.test_intro__character_text {
  margin: 0 0 24px;
  color: var(--color-black);
  font-size: var(--font-h4);
  font-weight: 800;
  line-height: 1.4;
  text-align: left;  
  letter-spacing: -0.02em;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  word-break: keep-all;
}

.test_intro__character_img {
  width: 130px;
  height: 116px;
  overflow: hidden;
  flex: 0 0 130px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.test_intro__character_img img {
  display: block;
  width: 130px; 
  height: auto;
  transform: translateX(2px); 
  transform: translateY(9px); 
}

/* gray box */
.test_feature {
  padding: 0;
  margin-top: -10px;
}

.test_feature__card {
  border-radius: 16px;
  background: #f0f0f0;
  border:solid 2px #e3e3e3;
  padding: 24px 20px;
}

.test_feature__item {
  display: flex;
  gap: 16px;
}

.test_feature__item + .test_feature__item {
  margin-top: 18px;
}

.test_feature__thumb {
  flex: 0 0 92px;
  background: var(--color-white);  
  border-radius: var(--radius-m);
}

.test_feature__title {
  font-size:var(--font-h5);
  font-weight: var(--font-weight-b);
  padding-top: 6px;
}

.test_feature__text {
  margin-top: 2px;
  font-size: var(font-md);
  line-height: 1.3;
}


/* stage */
.test_stage {
  padding: 0;
  margin-top: 40px;
}

.test_stage__grid {
  display: flex;
  gap: 8px;
}

.test_stage__card {
  width:80%;
  box-sizing: border-box;
  flex: 1;
  border-radius: 12px;
  padding: 9px;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease,
    opacity 0.22s ease;
  will-change: transform, box-shadow, filter;
}


/* 카드 전체 hover 마우스 있는 기기에서만 적용 */
@media (hover: hover) and (pointer: fine) {
  .test_stage__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16);
  }

  .test_stage__card:hover .test_stage__btn {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }
}

.test_stage__card--green { background: var(--color-green); }
.test_stage__card--orange { background:var(--color-orange); }
.test_stage__card--blue { background:var(--color-blue);}

.test_stage__card--green:hover  { background-color: #3aa95f; color: #3aa95f;}
.test_stage__card--orange:hover { background-color: #e75602; color:#e75602;}
.test_stage__card--blue:hover   { background-color: #4d71d6; color:#4d71d6;}

.test_stage__count {
  position: relative;
  display: inline-block;
  padding: 6px 4px 0 8px;
  font-size: var(--font-sm);
  font-weight: var(--font-weight-m);
  color: var(--color-white);
  margin-bottom:12px;
}

.test_stage__count::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background-color: var(--color-white);
}

.test_stage__icon {
  position: relative;
  display: inline-block;
  width: 11px;
  bottom: -5px;
}

.test_stage__title {
  color: var(--color-white);
  font-size: var(--font-h5);
  font-weight: var(--font-weight-m);
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  word-break: keep-all;
}

.test_stage__btn {
  display: block;
  margin-top: 12px;
  background: #fff;
  padding: 4px;
  border-radius: var(--radius-xs);
  font-weight: var(--font-weight-b);
  text-decoration: none;
  transition: all 0.25s ease;
  font-size: var(--font-h4);
  white-space: nowrap;
}




.c_btn--dark {  background: #666666;  color: var(--color-white);  margin-top: 60px;}

.c_btn.is_loading {  position: relative;  pointer-events: none;  color: transparent;}

.c_btn.is_loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: c_btn_spinner 0.8s linear infinite;
}

@media (hover: hover) and (pointer: fine) {  .c_btn--dark:hover { background: #555555;  }
}


@keyframes c_btn_spinner {
  to {
    transform: rotate(360deg);
  }
}


/* 진단 새창 */
.test_grade {
  max-width: 485px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* 헤더 */
.test_grade__header {
  padding: 24px;
}

.test_grade__header img {
  width: 150px;
}

/* 히어로 영역 */
.test_grade__hero {
  padding: 30px 30px 20px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: none;
}

.test_grade__hero--basic {
  background: linear-gradient(180deg, #249443 0%, #8ccd63 100%);
}

.test_grade__hero--advanced {
  background: linear-gradient(180deg, #e24902 0%, #fc9e13 100%);
}

.test_grade__hero--reading {
  background: linear-gradient(180deg, #1b47c0 0%, #69a2f7 100%);
}

.test_grade__hero_image {
  position: relative;
}
.test_grade__hero_image img {
  position: relative;
  width: 186px;
  z-index: 2;
}

.test_grade__hero_image::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: rgba(0, 0, 0, 1.2);
  border-radius: 50%;
  filter: blur(4px);
  z-index: 1;
}

.test_grade__title {
  margin: 3px 0 9px;
  font-size: var(--font-h1);
  color: var(--color-white);
  font-weight: var(--font-weight-b);
  line-height: 1.15;
}

.test_grade__badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  background: var(--color-white);
  color: var(--color-text);
  font-size: var(--font-md);
  font-weight: var(--font-weight-b);
}

.test_grade__desc {
  margin: 0;
  font-size: var(--font-h5);
  color: var(--color-black);
  font-weight: var(--font-weight-m);
  line-height: 1.3;
}

/* 학년 버튼 영역 */
.test_grade__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 30px 20px;
}

.test_grade__btn {
  height: 60px;
  border-radius: var(--radius-m);
  border: none;
  background: #888888;
  color: var(--color-white);
  font-size: var(--font-h3);
  font-weight: var(--font-weight-b);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

/* 중학생 한 줄 */
.test_grade__btn--full {
  grid-column: 1 / -1;
}

.test_grade__btn:hover {
  background: var(--color-text);
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.15);
}

.test_grade__btn:active {
  transform: scale(0.97);
}