/* 전체 배경 및 폰트 설정 */
.report-container {
    width: 100%; 
    position: relative; 
    top: 0;
    left: 0;
    min-height: 100dvh; 
    height: auto !important;
    overflow-y: visible !important; 
    overflow-x: hidden;
    background-color: #E4F4F5; 
    font-family: 'NanumSquareRound', sans-serif;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    z-index: 9999;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 헤더 */
.report-header {
    width: 100%; 
    height: 70px; 
    background-color: #3C4AB0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
}
.report-header h1 { 
    color: white;
    font-family: 'NanumSquareRound', sans-serif;
    font-size: 28px; 
    font-weight: 700; 
    margin: 0; 
}

/* 탭 버튼 영역 */
.report-tabs {
    width: 333px;
    height: 43px;
    background-color: #E4F4F5;
    margin-top: -6px; 
    display: flex;
    align-items: center; 
    padding: 0 4px;      
    box-sizing: border-box;
    border-radius: 22px;
    flex-shrink: 0;
    position: fixed;
    top: 70px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001; 
}

/* 개별 탭 버튼 */
.tab-btn {
    width: 105px;
    height: 35px;
    border-radius: 18px;
    border: none;
    background-color: #BDE2E7;
    font-family: 'NanumSquareRound', sans-serif;
    color: #747474;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 5px; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.tab-btn:last-child { margin-right: 0; }
.tab-btn.active {
    background-color: #10BC5B;
    border: 1px solid #CDCDCD;
    border-radius: 20px;
    color: white;
}

/* 콘텐츠 영역 */
.tab-content {
    display: none; 
    width: 100%;
    padding: 0 17px; 
    box-sizing: border-box; 
    flex-direction: column;
    align-items: center;
    padding-top: 127px;
    height: auto !important;
    overflow: visible !important;
    flex: none; 
}
.tab-content.active {
    display: flex;
}

.report-detail-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 20개 문항 그리드 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    width: 100%; 
    max-width: none; /*341px;*/ 
    gap: 11px; 
    padding: 0 0 25px;
    box-sizing: border-box;
    margin: 0 auto;
}

/* 개별 문항 박스 */
.grid-item {
    width: 100%;
    max-width: none; /*75px;*/
    min-width: 75px;
    height: 90px;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15); 
    border-radius: 12.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'NanumSquareRound', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #444;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}
.grid-item.active {
    background: rgba(255, 255, 255, 0.6) !important; 
    border: 2px solid #FFA34E !important; 
    box-shadow: 0 0 6px rgba(255, 163, 78, 0.8) !important; 
}

/* 채점 마크 */
.grid-item.correct::after {
    content: ''; position: absolute; width: 49px; height: 47px;
    background: url('../images/mark_o.png') no-repeat center/contain;
}
.grid-item.wrong::after {
    content: ''; position: absolute; width: 49px; height: 47px;
    background: url('../images/mark_x.png') no-repeat center/contain; opacity: 0.8;
}

/* 정답 및 해설 카드 */
.question-detail-card {
    width: 100%; 
    background: white; 
    border-radius: 25px;
    padding: 24px 18px; 
    margin-bottom: 20px; 
    flex-shrink: 0; 
    box-sizing: border-box;
}
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* 객관식 번호(원문자) 특성 상 상하단 여백 발생으로 단답형일 때와 헤더 높이가 달라지는 것 수정 */
.detail-header .header-left {
    display: flex;
    align-items: center;
    height: 32px;
    line-height: 1;
    gap: 5px;
}

.q-num { font-family: 'NanumSquare', sans-serif; font-size: var(--fs-19); font-weight: 800; }
.q-num-lg { font-family: 'NanumSquare', sans-serif; font-size: 24px; font-weight: 800; }
.q-ans-label { font-family: 'NanumSquare', sans-serif; font-size: 24px; font-weight: 700; color: #10BC5B; }
.q-tag { 
    width: 57px; height: 24px;
    background-color: #FAFADF; color: #000000;
    padding: 0; border: solid 1px #DFDF8E; border-radius: 5px; font-size: 17px; font-weight: 400;
    text-align: center; padding-top: 1px;
}
.detail-body { border-top: 1px solid #EEE; padding-top: 10px; }
.exp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.exp-icon { color: #A374F2; height: 22px; }
.exp-title { color: #002BFF; font-weight: 700; font-size: 18px; }
.exp-text { font-size: var(--fs-18); line-height: 1.6; color: #000; margin: 0; text-align: justify; text-justify: inter-word; word-break: break-all; overflow-wrap: break-word; }

/* 리포트 해설 단락 스타일 */
.exp-para {
    font-size: var(--fs-18);
    line-height: 1.6;
    color: #000;
    margin-bottom: 10px; /* 단락 사이의 간격 */
    text-align: justify; 
    text-justify: inter-word;
    word-break: break-all;
    overflow-wrap: break-word;
}
.exp-para:last-child { margin-bottom: 0; }

/* 문제 보기/닫기 버튼 */
.btn-purple {
    width: 105px; 
    height: 39px; 
    background-color: var(--color-btn-question);
    font-family: 'NanumSquareRound', sans-serif;
    color: white; 
    border: none; 
    border-radius: 22px;
    font-size: 18px; 
    font-weight: 700; 
    cursor: pointer;
    display: block; 
    margin: 0 auto 21px; 
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}
.btn-purple.active {
    background-color: var(--color-btn-passage) !important;
}

/* 문제 보기 버튼 숨김 */
.btn-purple.hidden, .original-content.hidden {
    display: none !important;
}

/* 문제 내용 출력 영역 */
.original-content {
    width: 100%; 
    margin: 0 auto 40px;   
    flex-shrink: 0;
}

/******************************************************/
/****************** 복수 정답용 정답 표기 ****************/
/******************************************************/
/* 리포트 전용: 맞힌 정답의 이중 테두리 */
.option-item.selected.is-correct {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 2px solid #FFA34E !important;
    outline: 2px solid #10BC5B !important;
    outline-offset: 1px;
    box-shadow: 0 0 12px rgba(16, 188, 91, 0.8) !important;
    
    /* 이중 테두리로 인해 늘어난 부피만큼 하단 여백 보정 */
    margin-bottom: 16px !important; 
    position: relative;
    z-index: 2;
}

/* 리포트 전용: 선택하지 않은 정답 */
.option-item.is-correct:not(.selected) {
    outline: 2px solid #10BC5B !important; 
    box-shadow: 0 0 10px rgba(16, 188, 91, 0.8) !important;
    background: rgba(255, 255, 255, 0.6) !important; 
}
/******************************************************/


/* 영역 분석 탭 전용 스타일 */
.analysis-top-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

/* 내려 받기 버튼 */
.btn-download {
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0;
    outline: none; 
    box-shadow: none !important;
    display: block;
    cursor: pointer;
    line-height: 0;
}
.btn-download:hover, 
.btn-download:active, 
.btn-download:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
}
.btn-download img {
    display: block;
    width: 100px;
    height: auto;
}

.analysis-category-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-bottom: 50px;
}

.analysis-section { width: 100%; }

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.category-title {
    font-family: 'Gmarket Sans', sans-serif;
    font-size: var(--fs-20);
    font-weight: 400;
    color: #000;
}

.btn-toggle-analysis {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.btn-toggle-analysis img { width: 24px; height: 24px; }

.star-rating-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 450px; 
    margin-left: 0;
    margin-right: auto;
    background-color: white;
    border-radius: clamp(35px, 9.33vw, 45px); /* 곡률 창 크기 375px 기준 35px, 최대 45px */
    border: 1px solid #E0E0E0;
    padding: clamp(8px, 2.1vw, 12px) clamp(10px, 2.6vw, 15px); 
    display: flex; 
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
    overflow: hidden;
}

.star-rating-container img {    
    width: 10.28%; /* 컨테이너 내부 폭 기준 % 크기 (10개일 때 우측 꽉 차도록 함) */
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    max-width: 47px; 
}

.star-rating-container img + img {    
    margin-left: -0.31%; /* 별 사이 여백끼리 -0.31% 겹치도록 함(375px에서 약 -1px) */
}

.analysis-details {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
}

/* 세부 유형별 피드백 카드 */
.feedback-card {    
    position: relative;
    background-color: white;
    border-radius: 25px;
    padding: 20px 18px;
    text-align: justify; 
    text-justify: inter-word;
    word-break: break-all;
    overflow-wrap: break-word;
}
.feedback-card:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background: #E6E6E6;
}

.assessment-sentence {
    color: #7F05BC;
    font-size: var(--fs-18);
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 12px 0;
}

.guide-box {
    border-top: 1px dashed #E6E6E6; 
    padding-top: 12px;
}

.guide-tag {
    display: inline-block;
    background-color: #FAFADF;
    border: 1px solid #DFDF8E;
    border-radius: 5px;
    padding: 2px 4px;
    font-size: 17px;
    font-weight: 400;
    color: #000;
    margin-bottom: 10px;
}

.guide-text {
    font-size: var(--fs-18);
    line-height: 1.55;
    color: #000;
    margin: 0;
    text-align: justify; 
    text-justify: inter-word;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 넓은 화면 대응 (가로 2단 레이아웃 전환) */
@media (min-width: 700px) {
    .report-container {
        overflow-y: visible !important; 
        position: relative; 
    }
    .tab-content.active {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 20px;
        /*max-width: 1300px;*/
        margin: 0 auto;
        padding: 127px 20px 10px; 
        height: auto !important; 
        overflow: visible !important;
    }

    /* 영역 분석 및 종합 평가 탭은 넓은 화면에서도 세로 1단 유지 */
    #tab-analysis.active, #tab-total.active {
        flex-direction: column;
        align-items: center;
        gap: 0px !important;
    }

    .result-grid {
        /*flex: 0 0 341px;*/
        flex: 1;
        margin: 0;
        height: auto !important;
        overflow: visible !important;
        max-width: none;
    }
    .grid-item { max-width: none; }

    .report-detail-area {
        flex: 1;
        height: auto !important;
        overflow: visible !important;
        padding-right: 0;
        align-items: flex-start;
    }
    .btn-purple { display: block; }

    .original-content {
        width: 100%;
        margin-top: 0; 
    }
}

/* 종합 평가 탭 전용 스타일 */

/* 상단 다운로드 버튼 바 */
.total-top-bar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* 총점 표시 영역 */
.total-score-area {
    display: flex;
    align-items: baseline; /* 텍스트 하단 정렬 */
    justify-content: center;
    gap: 8px;
    margin: 6px 0 14px;
    font-family: 'Gmarket Sans', sans-serif;
}

.total-label {
    font-size: var(--fs-20);
    font-weight: 400;
    color: #000;
}

.total-points {
    font-size: var(--fs-42);
    font-weight: 400;
    color: #000;
}

.total-points strong {
    font-size: var(--fs-42);
    font-weight: 400;
    letter-spacing: -2px;
}

.total-max {    
    font-size: var(--fs-20);
    font-weight: 300;
    color: #000;
}

/* 종합 피드백 카드 */
.total-feedback-card {
    width: 100%;
    background-color: white;
    border-radius: 30px;
    padding: 20px 18px;
    box-sizing: border-box;
    text-align: justify; 
    text-justify: inter-word;
    word-break: break-all;
    overflow-wrap: break-word;
    margin-bottom: 20px;
}

.total-feedback-title {
    font-size: var(--fs-18);
    font-weight: 700;
    color: #7F05BC;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.total-feedback-desc {
    font-size: var(--fs-18);
    font-weight: 400;
    line-height: 1.6;
    color: #000;
    margin-bottom: 8px;
}

/* 카드 내 점선 구분선 */
.card-divider {
    width: 100%;
    border-top: 1px dashed #E6E6E6;
    margin-bottom: 12px;
}

/* 학습 제안 태그 */
.guide-tag-yellow {
    display: inline-block;
    background-color: #FAFADF;
    border: 1px solid #DFDF8E;
    border-radius: 5px;
    padding: 2px 4px;
    font-size: 17px;
    font-weight: 400;
    color: #000;
    margin-bottom: 12px;
}

/* 학습 제안 리스트 */
.total-guide-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.total-guide-list li {
    font-size: var(--fs-18);
    font-weight: 400;
    line-height: 1.5;
    color: #000;
    position: relative;
    padding-left: 15px;
    margin-bottom: 6px;
}

/* 리스트 앞의 가운뎃점(·) */
.total-guide-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-size: var(--fs-18);
    font-weight: 800;
}