@font-face {
    font-family: "Mitmi";
    src: url("../fonts/ongleip-mitmi.ttf") format("truetype");
}


/* 전체 초기화 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}


html,
body {
    width: 100%;
    min-height: 100%;
}


body {
    font-family: "Mitmi", -apple-system, sans-serif;
    background: #d4efc0;

    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 100vh;
    /* iOS Safari 주소창 높이 변동으로 하단이 잘리는 것 방지 */
    min-height: 100dvh;
    padding: 15px 0 max(15px, env(safe-area-inset-bottom));
}



/* 전체 카드 */

.test-container {
    width: 100%;
    max-width: 400px;

    margin: 0 auto;
    padding: 0 10px;
}


.test-card {
    width: 100%;

    background: #fff;

    border-radius: 24px;

    overflow: hidden;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.15);
}



/* ======================
   시작 화면
====================== */


.start-screen {

    position: relative;

    width: 100%;

    overflow: hidden;

    background: #fff;

}


.start-image {

    width: 100%;

    height: auto;

    display: block;

    /*
    아래쪽 필요없는 부분 제거
    위쪽 기준 표시
    */

    object-fit: cover;

    object-position: top;

}



.start-btn {

    position: absolute;

    left:50%;

    bottom:8%;

    transform:translateX(-50%);


    width:70%;

    max-width:260px;


    border:none;

    background:none;

    padding:0;


    cursor:pointer;

    z-index:10;

}


.start-btn img {

    width:100%;

    display:block;

}



.start-btn:active {

    transform:
    translateX(-50%)
    scale(0.95);

}




/* ======================
   문제 화면
====================== */


.question-screen {

    position:relative;

}


.question-wrapper {

    position:relative;

    width:100%;

    overflow:hidden;

}



.question-image {

    width:100%;

    height:auto;

    display:block;

}




/* 문제 이미지 위 버튼 */

.answer-overlay {
    position:absolute;
    left:50%;
    bottom:8%;
    transform:translateX(-50%);
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:14px;
    z-index:10;
}



.answer-btn {

    width:90%;


    padding:15px;


    border:none;

    border-radius:20px;


    background:rgba(255,255,255,0.92);


    font-family:"Mitmi", sans-serif;

    font-size:23px;

    line-height:1.2;


    cursor:pointer;


    box-shadow:
    0 5px 15px rgba(0,0,0,0.15);

}



.answer-btn:hover {

    background:#ebfaee;

}



.answer-btn:active {

    transform:scale(0.96);

}





/* 문제 화면 뒤로가기 */

.question-back-btn {

    position:absolute;

    top:15px;

    left:15px;

    z-index:20;

    width:40px;

    height:40px;

    padding:0;

    border:none;

    border-radius:50%;

    background:rgba(255,255,255,0.92);

    box-shadow:0 5px 15px rgba(0,0,0,0.15);

    color:#1d2b22;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

}

.question-back-btn svg {

    display:block;

    flex-shrink:0;

}

.question-back-btn:hover {

    background:#ebfaee;

}

.question-back-btn:active {

    transform:scale(0.92);

}

/* 문제 화면 홈 */

.question-home-btn {

    position:absolute;

    top:15px;

    right:15px;

    z-index:20;

    width:40px;

    height:40px;

    padding:0;

    border:none;

    border-radius:50%;

    background:rgba(255,255,255,0.92);

    box-shadow:0 5px 15px rgba(0,0,0,0.15);

    color:#1d2b22;

    text-decoration:none;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

}

.question-home-btn svg {

    display:block;

    flex-shrink:0;

}

.question-home-btn:hover {

    background:#ebfaee;

}

.question-home-btn:active {

    transform:scale(0.92);

}


/* 진행 표시 */

.progress-area {

    position:absolute;

    top:15px;

    left:15px;

    right:15px;

    z-index:5;

}



.progress-text {

    text-align:center;

    font-size:15px;

    color:#555;

    margin-bottom:8px;

}



.progress {

    width:100%;

    height:8px;

    background:#ededed;

    border-radius:999px;

    overflow:hidden;

}



.progress-bar {

    width:0%;

    height:100%;

    background:#58c66c;

    transition:width 0.3s ease;

}





/* ======================
   결과 화면
====================== */


.result-screen {

    width:100%;

}


/* 홈 버튼(.question-home-btn)의 absolute 기준점 */

.result-wrapper {

    position:relative;

    width:100%;

}


.result-image {

    width:100%;

    height:auto;

    display:block;

}



.result-content {

    padding:20px;

}



.result-name {

    text-align:center;

    font-size:28px;

    margin-bottom:10px;

}



.result-desc {

    text-align:center;

    font-size:17px;

    line-height:1.5;

    color:#666;

    margin-bottom:20px;

}



.result-feature {

    text-align:center;

    margin-bottom:20px;

}



.result-buttons {

    display:flex;

    flex-direction:column;

    gap:10px;

}



.result-buttons button {

    border:none;

    border-radius:14px;

    padding:15px;


    font-family:"Mitmi", sans-serif;

    font-size:18px;


    cursor:pointer;

}



.share-btn {

    background:#FEE500;

    color:#000;

}



.retry-btn {

    background:#58c66c;

    color:#fff;

}



/* 작은 화면 */

@media(max-height:700px){

    .test-container {

        max-width:360px;

    }

}

/* 모바일 터치 최적화 (PC 레이아웃 변경 없음) */
@media (max-width: 900px) {
  .answer-btn {
    min-height: 48px;
    font-size: 21px;
  }

  .recommend-btn,
  .share-btn,
  .retry-btn {
    min-height: 48px;
  }

  .result-buttons {
    gap: 10px;
  }

  .test-container {
    width: 100%;
    max-width: 420px;
    padding: 0 12px 20px;
  }
}
