/*********/
/* 선택지 */
/*********/
.options-list, .options-container { width: 100%; }
.option-item { 
    border-radius: 18px; outline: 1px solid rgba(0, 0, 0, 0.15); 
    padding: 14px 16px 12px 0; margin-bottom: 12px; 
    display: flex; cursor: pointer; background: transparent; transition: all 0.2s ease; 
}

/* 사용자가 선택한 보기 - 정답인 경우 주황색 유지 */
.option-item.selected { 
    background: rgba(255, 255, 255, 0.6) !important; 
    outline: 2px solid #FFA34E !important; 
    box-shadow: 0 0 12px rgba(255, 163, 78, 0.8) !important; 
}

/* 오답인 경우 녹색으로 표시 */
.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; 
    position: relative;
    z-index: 1;
}

.option-num { 
    font-family: 'NanumSquareRound', sans-serif !important; 
    width: 30px; font-weight: 800;
    font-size: var(--fs-18);
    text-align: center !important; flex-shrink: 0; padding-top: 2px;
}
.option-text { 
    font-family: 'NanumSquareRound', sans-serif !important; 
    flex: 1;
    font-size: var(--fs-18);
    font-weight: 400; 
    line-height: 1.4; color: #000; 
    text-align: justify; 
    text-justify: inter-word;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 보기 이미지 */
.option-content-img img{
    width: 100%;
    max-width: 360px;
}

/* 보기 이미지 개별 출처 */
.option-img-source {
    width: 100%;
    text-align: right;
    font-size: var(--fs-16);
    color: #666;
    margin-top: 12px;
    font-weight: 400;
}
/* 보기 영역 하단 공통 출처 */
.options-all-source {
    width: 100%;
    text-align: right;
    font-size: var(--fs-14);
    color: #666;
    margin-top: 5px;
    margin-bottom: 20px;
    padding-right: 5px;
    font-weight: 400;
}

/* 단답형 입력창 - 투명 레이어 방식 */
.short-answer-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 30px 0 45px auto;
    width: fit-content;
    margin: 0 !important; /* 컨테이너에서 정렬을 잡으므로 개별 마진은 제거 */
}

/* 하단 디자인 격자 상자(비주얼만 담당) */
.visual-grid { display: flex; gap: 0px; pointer-events: none; }

.visual-box {
    width: 55px;
    height: 55px;
    border: 1px solid rgba(0,0,0,0.15);
    margin-left: -1px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'NanumGothic', sans-serif !important;
    font-size: 26px;
    font-weight: 800;
    color: #333;
    pointer-events: none;
    position: relative;
}
.visual-box:first-child { margin-left: 0; }
/* 가상 커서가 위치할 박스(active)의 스타일 */
.visual-box.active { position: relative; } /* 커서의 기준점 */

/* 가상 커서 본체 (깜빡이는 막대기) */
/* 가상 커서 공통 설정 */
.visual-box.active::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* 세로 중앙만 유지 */
    width: 2px;
    height: 30px;
    background-color: #FFA34E;
    border-radius: 2px;
    z-index: 10;
    animation: cursor-blink 1s step-end infinite;
}

/* 0번 위치: 첫 번째 칸 좌측 10% 지점 */
.visual-box.pos-start::after { left: 10%; }

/* 입력 후: 해당 칸 우측 90% 지점 (글자 바로 뒤) */
.visual-box.pos-end::after { left: 90%; }

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 보고서 문제보기에서 단답형 오답 시 하단 정답 피드백 문자 */
.feedback-correct-char {
    position: absolute;
    bottom: -28px; 
    left: 50%;
    transform: translateX(-50%);   
    font-family: 'NanumSquareRound', sans-serif !important; 
    font-size: var(--fs-18);
    font-weight: 700;
    color: #10BC5B;
    pointer-events: none;
    white-space: nowrap;
}

/* 공백일 때 격자 숨기기 */
.visual-box.is-space { border: none; background: transparent; box-shadow: none; }

/* 상단 실제 투명 인풋창 */
.overlay-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    font-family: 'Nanum Gothic Coding', monospace !important;
    font-size: 26px; /*32px;*/
    color: transparent; 
    text-shadow: none;
    padding-left: 16px; /*12px;*/ /*6px*/
    letter-spacing: 26px; /*22px;*/ /*12*/
    caret-color: transparent; /*#FFA34E;*/
}

/* 입력 활성화 시 격자 색상 강조 */
.short-answer-wrapper:focus-within .visual-box:not(.is-space) {
    border: 2px solid #FFA34E;
    box-shadow: 0 0 5px rgba(255, 163, 78, 0.8);
    background: rgba(255, 255, 255, 0.6);
    margin-left: -2px;
    position: relative;
    z-index: 1;
}
.short-answer-wrapper:focus-within .visual-box:first-child {
    margin-left: 0;
}

/**** 입력 문제 2개 이상인 경우 ****/
.multi-short-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    margin-top: 25px;
    padding-right: 10px;
}

.short-answer-group { display: flex; align-items: center; margin-bottom: 15px; }

.short-multi-label {
    width: 35px; /* 고정 너비를 주어 (1)과 (2)의 시작 위치를 맞춤 */
    text-align: left; /* 번호 자체는 왼쪽 정렬 */
    font-family: 'NanumSquareRound', sans-serif !important;
    font-weight: 800;
    font-size: var(--fs-18);
    color: #333;
}

/* 단답형 해설지의 번호 (1), (2) 전용 스타일 */
.short-ans-num { font-size: 0.85em; color: #10BC5B; vertical-align: baseline; }
.ans-comma { color: #10BC5B; }


/* 선택지 내부 기호 박스 스타일 */
.symbol-box {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 26px; height: 26px;    
    background-color: #C6EFFF; border: 1px solid #D0D2FF; border-radius: 6px;    
    font-family: 'NanumSquareRound', sans-serif !important; font-weight: 700; font-size: var(--fs-16); color: #000;
    vertical-align: middle; margin: 0 2px; padding-top: 0px; position: relative; top: -1px;
    font-variant-east-asian: proportional-widths; font-feature-settings: "palt";
}
/* 박스 사이의 콤마 스타일 */
.symbol-comma { font-size: var(--fs-16); font-weight: 700; color: #000; margin: 0 1px; vertical-align: middle; }


/* 푸터 문항 네비게이션 */
.footer { margin-top: auto; padding: 30px 17px; display: flex; justify-content: space-between; align-items: center; width: 100%; }
.nav-btn-box { 
    display: flex; align-items: center; gap: 8px; cursor: pointer; 
    font-size: var(--fs-16);
    font-family: 'NanumSquareRound', sans-serif !important; 
    font-weight: 700; color: #898989; 
}
.nav-icon { width: 20px; height: 30px; background-size: contain; background-repeat: no-repeat; background-position: center; flex-shrink: 0; }
.nav-icon.prev { background-image: url('../images/btn_prev.svg'); }
.nav-icon.next { background-image: url('../images/btn_next.svg'); }

.btn-submit { 
    width: 105px; height: 39px; background: var(--nav-green); color: white; border-radius: 22px; border: none; 
    font-weight: 700; cursor: pointer; font-size: 18px; box-shadow: 0 2px 2px rgba(0,0,0,0.2); 
    font-family: 'NanumSquareRound', sans-serif !important;
}


/* 디버그 툴(문항 및 보고서 바로 이동) */
.debug-tool {
    position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.7); padding: 8px 12px;
    border-radius: 10px; display: flex; align-items: center; gap: 8px; z-index: 10000; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.debug-tool input {
    width: 50px; height: 32px; border: 1px solid #ccc; border-radius: 6px; text-align: center;
    font-family: 'NanumSquareRound', sans-serif !important; font-weight: 700; font-size: 14px;
}
.debug-tool button {
    height: 32px; padding: 0 10px; background: #FFD54F; border: none; border-radius: 6px;
    font-family: 'NanumSquareRound', sans-serif !important; font-weight: 800; font-size: 13px; cursor: pointer; color: #333;
}
.debug-tool.hidden { display: none; }