/* -- css/analysis.css -- */

/* ============================================================
   [1] 기본 레이아웃, 탭 메뉴, 솔루션 헤더
   ============================================================ */ 

/* 탭 메뉴 컨테이너 */
.solution-menu { display: flex; gap: 12px; margin-bottom: 35px; width: 100%; flex-wrap: wrap; }

/* 탭 버튼 스타일 */
.sol-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 15px 10px; border-radius: 10px; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #64748b; cursor: pointer; font-size: 0.95rem; font-weight: 600;
    transition: all 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.05); min-width: 120px;
}
.sol-btn i { font-size: 1.2rem; margin-bottom: 8px; color: #94a3b8; transition: color 0.2s; }
.sol-btn:hover:not(.active) { background: white; border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.sol-btn.active { background: white; color: #2563EB; border: 2px solid #2563EB; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.1); }
.sol-btn.active i { color: #2563EB; }

/* PRO 버튼 (Silver-Blue 테마) */
.sol-btn.pro-btn { 
    background: linear-gradient(145deg, #ffffff, #f1f5f9); 
    color: #334155; border: 1px solid #cbd5e1; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.sol-btn.pro-btn i { color: #3b82f6; }
.sol-btn.pro-btn:hover {
    background: #fff; border-color: #3b82f6; color: #2563eb;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
.sol-btn.pro-btn.active { 
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%); 
    color: #ffffff; border: 1px solid #1e3a8a; box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4); 
}
.sol-btn.pro-btn.active i { color: #93c5fd; }

/* 콘텐츠 영역 전환 애니메이션 */
.sol-content { display: none; }
.sol-content.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 솔루션 페이지 공통 헤더 */
.sol-header { text-align: center; margin-bottom: 30px; border-bottom: 1px solid #f1f5f9; padding-bottom: 20px; display: flex; flex-direction: column; align-items: center; }
.sol-title { font-size: 1.8rem; font-weight: 800; color: #1e293b; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 15px; }
.sol-icon-box { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 14px; font-size: 1.4rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.sol-desc { color: #64748b; font-size: 1.05rem; line-height: 1.6; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sol-badge { padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 0.9rem; border: 1px solid transparent; }

/* 테마별 색상 (아이콘 등) */
.theme-univ .sol-icon-box { background: #eff6ff; color: #2563eb; }
.theme-sim .sol-icon-box { background: #eff6ff; color: #3b82f6; }
.theme-sim .sol-badge { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.theme-coach .sol-icon-box { background: #fff7ed; color: #ea580c; }


/* ============================================================
   [2] 좌측 사이드바 (기초조사서 상태 & 점수)
   ============================================================ */

.user-tier-badge { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 800; margin-bottom: 20px; letter-spacing: 0.5px; border: none; }
.tier-badge-free { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.tier-badge-basic { background: linear-gradient(135deg, #3B82F6, #60A5FA); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25); }
.tier-badge-standard { background: linear-gradient(135deg, #94A3B8, #CBD5E1); color: #0F172A; box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25); }
.tier-badge-pro { background: linear-gradient(135deg, #F59E0B, #FCD34D); color: #78350f; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.survey-status-box h4 { font-size: 1.1rem; color: #1e293b; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.status-detail-container { text-align: left; margin-bottom: 20px; background: #f8fafc; border-radius: 8px; padding: 15px; border: 1px solid #e2e8f0; }
.detail-group { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #cbd5e1; }
.detail-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.detail-title { font-size: 0.9rem; color: #64748b; margin: 0 0 8px 0; font-weight: 700; }
.detail-title i { margin-right: 5px; color: #3b82f6; }
.detail-list { padding: 0; margin: 0; list-style: none; }
.detail-list li { font-size: 0.85rem; margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.detail-list .label { color: #94a3b8; font-weight: 500; }
.detail-list .val-text { color: #334155; font-weight: 600; text-align: right; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-msg { font-size: 0.8rem; color: #cbd5e1; text-align: center; padding: 10px 0; }
.btn-go-survey i { margin-right: 6px; }

/* 1, 2지망 표시 */
.target-univ-box { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.target-row { display: flex; align-items: center; font-size: 0.9rem; color: #334155; background: #fff; padding: 6px 10px; border-radius: 6px; border: 1px solid #e2e8f0; }
.target-badge { font-size: 0.75rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-right: 8px; white-space: nowrap; }
.target-badge.first { background-color: #dbeafe; color: #1e40af; }
.target-badge.second { background-color: #f3e8ff; color: #6b21a8; }

/* 점수 상세 박스 */
.quan-select-wrapper { margin-bottom: 10px; }
.quan-dropdown { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem; color: #334155; background-color: #fff; outline: none; cursor: pointer; }
.quan-dropdown:focus { border-color: #3b82f6; }
.score-detail-view { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; }
.side-score-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.side-score-table td { padding: 6px 0; vertical-align: middle; border-bottom: 1px dashed #f1f5f9; }
.side-score-table tr:last-child td { border-bottom: none; }
.subj-label { font-weight: 700; color: #475569; width: 40px; }
.score-info { text-align: right; color: #334155; font-family: 'Roboto', sans-serif; font-weight: 600; letter-spacing: -0.3px; }
.opt-badge { font-size: 0.75rem; color: #94a3b8; margin-right: 4px; font-weight: normal; }
.grade-circle { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background-color: #1e293b; color: #fff; border-radius: 50%; font-size: 0.7rem; margin-left: 6px; font-weight: bold; }


/* ============================================================
   [3] 기능 1: 목표 대학 설정 & 분석
   ============================================================ */
.univ-sub-header { margin: 25px 0 15px 0; border-bottom: 1px dashed #e2e8f0; padding-bottom: 10px; }
.univ-sub-header h3 { margin: 0 0 5px 0; font-size: 1.1rem; color: #1e293b; }
.univ-sub-header p { margin: 0; font-size: 0.9rem; color: #64748b; }

/* --- 목표대학 횟수 차감 및 업그레이드 배너 --- */
.quota-info-box {
    background: #f8fafc; border: 1px solid #e2e8f0; padding: 12px 16px;
    border-radius: 8px; display: flex; justify-content: space-between; 
    align-items: center; margin-bottom: 15px; font-size: 0.95rem; color: #334155;
}
.quota-info-box .remain-count { font-weight: 900; color: #2563eb; font-size: 1.1rem; }
.quota-info-box.warning .remain-count { color: #ef4444; }

.upgrade-promo-banner {
    background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #bfdbfe;
    padding: 15px 20px; border-radius: 8px; margin-bottom: 15px; 
    display: flex; align-items: center; justify-content: space-between;
    animation: fadeIn 0.3s ease-in-out;
}
.upgrade-promo-banner p { margin: 0; color: #1e3a8a; font-size: 0.9rem; line-height: 1.5; }
.upgrade-promo-banner strong { color: #1d4ed8; }
.upgrade-btn-small {
    background: #2563eb; color: white; padding: 10px 16px; border-radius: 6px;
    font-size: 0.85rem; font-weight: bold; border: none; cursor: pointer; 
    white-space: nowrap; margin-left: 15px; box-shadow: 0 2px 4px rgba(37,99,235,0.2);
}
.upgrade-btn-small:hover { background: #1d4ed8; transform: translateY(-1px); }

/* 대학 슬롯 그리드 */
.univ-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 20px; }
.univ-slot { border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px; background: #f8fafc; position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.univ-slot label { font-size: 0.85rem; font-weight: bold; color: #334155; }
.univ-slot .slot-msg { font-size: 0.8rem; color: #ef4444; font-weight: 500; margin-top: 5px; }
.univ-select-btn { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: white; color: #334155; text-align: left; cursor: pointer; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; }
.univ-select-btn:hover { border-color: #2563EB; color: #2563EB; }
.univ-select-btn span.placeholder { color: #94a3b8; }

/* --- 목표대학 슬롯 삭제 버튼 --- */
.univ-delete-btn { position: absolute; top: 12px; right: 12px; background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.75rem; transition: all 0.2s ease; z-index: 10; }
.univ-delete-btn:hover { background: #ef4444; color: white; transform: scale(1.1); }

/* 잠긴 슬롯 스타일 */
.univ-slot.locked-tier { background: #f1f5f9; opacity: 0.6; pointer-events: none; justify-content: center; align-items: center; border: 1px dashed #cbd5e1; min-height: 100px; }
.univ-slot.locked-tier::after { content: attr(data-msg); color: #94a3b8; font-weight: bold; font-size: 0.9rem; }
.univ-slot.locked-tier label, .univ-slot.locked-tier button { display: none; }
.warning-text { color: #ef4444; font-size: 0.9rem; background: #fef2f2; padding: 10px; border-radius: 6px; }

/* 저장 버튼 */
#btnSaveTarget { display: block; width: 100%; padding: 16px 20px; margin-top: 30px; background-color: #2563EB; color: white; border: none; border-radius: 10px; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.5px; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3); }
#btnSaveTarget:hover { background-color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4); }
#btnSaveTarget:active { transform: translateY(0); box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3); }
#btnSaveTarget:disabled { background-color: #cbd5e1; color: #64748b; cursor: not-allowed; transform: none; box-shadow: none; }

/* 대학 선택 모달 내부 */
.select-modal-content { max-width: 700px; height: 80vh; max-height: 600px; display: flex; flex-direction: column; }
.selection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 20px; overflow-y: auto; flex: 1; }
.selection-item { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px 10px; text-align: center; cursor: pointer; font-size: 0.95rem; color: #334155; font-weight: 500; transition: all 0.2s; display: flex; align-items: center; justify-content: center; min-height: 50px; }
.selection-item:hover { border-color: #2563EB; background: #eff6ff; color: #2563EB; }
.back-step-btn { background: transparent; border: none; color: #64748b; font-weight: 600; cursor: pointer; font-size: 0.9rem; padding: 8px 12px; transition: color 0.2s; }
.back-step-btn:hover { color: #2563EB; text-decoration: underline; }

/* 대학 분석 카드 */
.analysis-card { margin-bottom: 20px; background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-left: 6px solid #e2e8f0; transition: transform 0.2s; } 
.score-bar-container { position: relative; width: 100%; padding-bottom: 30px; } 
.score-bar-bg { position: relative; height: 12px; background: #f1f5f9; border-radius: 6px; margin: 10px 0; overflow: visible; } 
.score-bar-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 6px; transition: width 1s ease-out; z-index: 1; } 
.score-labels { font-size: 0.75rem; color: #94a3b8; height: 40px; position: relative; } 
.score-labels > span { position: absolute; transform: translateX(-50%); color: #64748b; font-weight: 600; white-space: nowrap; line-height: 1; top: 5px; } 
.label-min { left: 0; transform: none !important; } 
.label-max { right: 0; transform: none !important; left: auto !important; } 
.label-pass { left: 40%; } 
.label-stable { left: 60%; } 


/* ============================================================
   [4] 기능 2: 점수 상승 시뮬레이션
   ============================================================ */
.sim-container-new { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.sim-controls { display: flex; justify-content: flex-end; }
.chart-toggle-group { background: #f1f5f9; padding: 4px; border-radius: 8px; display: flex; gap: 4px; }
.toggle-btn { border: none; background: transparent; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; color: #64748b; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.toggle-btn.active { background: white; color: #2563EB; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

/* 차트 컨테이너 */
.sim-chart-wrapper { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); min-height: 480px; box-sizing: border-box; display: flex; flex-direction: column; }
.chart-scroll-container { flex: 1; overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; padding-bottom: 10px; }
.chart-inner-container { display: flex; flex-direction: column; height: 360px; width: max-content; min-width: 100%; overflow: visible !important; }
.mobile-legend-area { display: none; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 40px; padding: 10px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.mobile-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #475569; font-weight: 600; }

/* 그래프 & 라벨 영역 */
.chart-graph-area { position: relative; height: 260px; border-bottom: 2px solid #cbd5e1; display: flex; align-items: flex-end; padding: 30px 60px 0 20px; padding-bottom: 0 !important; box-sizing: border-box; gap: 10px; overflow: visible !important; z-index: 1;}
.chart-label-area { height: 100px; display: flex; align-items: flex-start; padding: 10px 60px 0 20px; gap: 10px; box-sizing: border-box; }

/* 기준선 및 라벨 */
.chart-guide-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #cbd5e1; z-index: 0; pointer-events: none; width: 100%; }
.chart-guide-label { position: absolute; left: auto; right: 5px; top: -22px; font-size: 0.75rem; font-weight: 700; text-align: right; padding: 2px 0; background: rgba(255, 255, 255, 0.8); z-index: 10; }
.guide-150 { border-top-color: #10b981; } 
.guide-150 .chart-guide-label { color: #10b981; }

/* 막대 차트 스타일 */
.sim-bar-item, .sim-label-item { position: relative; flex: 1 1 0px; width: auto; min-width: 60px; max-width: 100px; display: flex; justify-content: center; cursor: pointer; z-index: 5; }
.sim-bar-item { height: 100%; align-items: flex-end; transition: transform 0.2s; }
.sim-bar-item:hover { transform: translateY(-5px); }
.sim-bar { width: 40px; background: #e2e8f0; border-radius: 6px 6px 0 0; position: relative; transition: height 0.5s ease-out; }
.sim-bar-item.active .sim-bar { background: #2563EB !important; box-shadow: 0 0 10px rgba(37, 99, 235, 0.3); }
.sim-score-label { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 0.85rem; color: #64748b; font-weight: 600; }
.sim-bar-item.active .sim-score-label { color: #2563EB; font-weight: 800; }

/* 하단 라벨 */
.sim-label-item { text-align: center; font-size: 0.8rem; color: #475569; line-height: 1.4; }
.sim-label-item strong { color: #1e293b; display: block; margin-bottom: 2px; }
.label-pc { display: block; }
.label-mobile { display: none; font-weight: bold; }

/* 꺾은선 그래프 전용 스타일 */
.sim-line-container { width:100%; height:100%; display:flex; flex-direction:column; overflow: visible !important; }
.sim-line-chart-area { flex:1; position:relative; height:180px; min-height:180px; overflow: visible !important; }
.sim-univ-scroll-box{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; padding:15px 0; width:100%; box-sizing:border-box }
.univ-select-btn { width: 100%; display: flex; justify-content: center; align-items: center; gap: 6px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #64748b; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; line-height: 1.2; }
.univ-select-btn.active { background: #2563EB; color: #fff; border-color: #2563EB; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); font-weight: 600; }
.sim-svg-layer { width:100%; height:100%; overflow:visible !important; display:block; }
.sim-grid-line { stroke:#e2e8f0; stroke-width:1; stroke-dasharray:4; }
.sim-guide-line { stroke-width:1.5; stroke-dasharray:3; opacity:0.7; transition:all 0.5s ease; }
.sim-guide-text { font-size:10px; font-weight:bold; text-anchor:end; transition:all 0.5s ease; }
.sim-path { fill:none; stroke:#2563EB; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; transition:d 0.5s cubic-bezier(0.4, 0, 0.2, 1); filter:drop-shadow(0 4px 3px rgba(37,99,235,0.2)); will-change: d; }
.sim-point{ r:5; fill:#93c5fd; stroke:#2563EB; stroke-width:3; cursor:pointer; transition:cx .4s cubic-bezier(.25,.46,.45,.94),cy .4s cubic-bezier(.25,.46,.45,.94),r .2s,stroke-width .2s,fill .2s; will-change:cx,cy }
.sim-point:hover { r: 7; fill: #2563EB; stroke: #fff; }
.sim-point-label { font-size:11px; fill:#1e293b; font-weight:700; text-anchor:middle; opacity:0; transition:all 0.3s; pointer-events:none; }
.sim-point:hover + .sim-point-label, .sim-point.active + .sim-point-label { opacity:1; transform:translateY(-8px); }
.sim-info-badge { width: 100%; text-align: right; margin-bottom: 10px; font-size: 0.8rem; color: #64748b; padding-right: 5px; box-sizing: border-box; }
.sim-info-badge span { background: #f1f5f9; padding: 4px 8px; border-radius: 4px; display: inline-flex; align-items: center; gap: 5px; }

/* 상세 분석 카드 */
.sim-result-card { background: #fff; border: 1px solid #2563EB; border-radius: 12px; padding: 25px; box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.15); margin-top: 20px; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.sim-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 15px; margin-bottom: 20px; }
.sim-univ-title { font-size: 1.2rem; font-weight: 800; color: #1e293b; }
.sim-univ-dept { font-size: 0.95rem; color: #64748b; font-weight: normal; margin-left: 5px; }
.score-badge { font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; background: #f1f5f9; color: #64748b; font-weight: 600; }
.score-diff { font-size: 1.4rem; font-weight: 800; color: #2563EB; display: block; margin-top: 5px; text-align: right; }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }
.sim-item { background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; position: relative; overflow: hidden; }
.sim-item.best-pick { background: #eff6ff; border-color: #bfdbfe; }
.sim-item.best-pick::after { content: "추천"; position: absolute; top: 0; right: 0; background: #3b82f6; color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 0 0 0 6px; font-weight: bold; }
.sim-item-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; font-weight: 700; color: #334155; }
.sim-item-body { font-size: 0.9rem; color: #475569; line-height: 1.5; }
.sim-item-body strong { color: #2563EB; }
.sim-warning { margin-top: 20px; padding: 15px; background: #fff1f2; border: 1px solid #fecaca; border-radius: 8px; color: #991b1b; font-size: 0.9rem; display: flex; align-items: center; gap: 12px; }


/* ============================================================
   [5] 기능 3: 코칭 및 주간 점검
   ============================================================ */
.coach-container { display: flex; flex-direction: column; gap: 20px; }
.coach-box { border: 1px solid #e2e8f0; padding: 20px; border-radius: 8px; position: relative; background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: all 0.2s; }
.box-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.coach-box.clickable { cursor: pointer; }
.coach-box.clickable:hover { transform: translateY(-3px); border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1); }
.coach-box.disabled { opacity: 0.7; cursor: not-allowed; background-color: #f8fafc; border-color: #e2e8f0; }

.badge-status { padding: 4px 10px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; }
.badge-status.pending { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.badge-status.submitted { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-status.locked { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* [수정] 피드백 박스 및 리스트 (잘림 방지 포함) */
.feedback-box { border-left: 4px solid #8b5cf6; background: linear-gradient(to bottom right, #fbfbfe, #fff); }
.feedback-history-area { margin-top: 20px; border-top: 1px solid #e2e8f0; padding-top: 15px; }
.feedback-filter select { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.9rem; color: #334155; margin-bottom: 12px; width: 100%; max-width: 200px; }
.feedback-list { 
    display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; 
    /* 중요: hover 시 잘림 방지를 위한 패딩 처리 */
    padding: 5px; margin: -5px; 
}
.feedback-tile { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.feedback-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: #3b82f6; background: #f8fafc; }
.feedback-tile .fb-title { font-weight: 700; color: #334155; font-size: 1rem; }
.feedback-tile .fb-status { font-size: 0.9rem; }
.empty-feedback { font-size: 0.9rem; color: #94a3b8; text-align: center; padding: 20px; }

/* 주간점검 입력 폼 (모달 내부) */
.check-section { background: white; margin-bottom: 30px; }
.check-section h4 { border-left: 4px solid #2563EB; padding-left: 12px; margin: 0 0 10px 0; color: #1e293b; font-size: 1.1rem; }
.check-section .desc { font-size: 0.9rem; color: #64748b; margin: 0 0 15px 0; padding-left: 16px; }
.req { color: #ef4444; margin-left: 4px; }

/* 테이블, 파일업로드 등 Form 요소 */
.table-wrap { overflow-x: auto; width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; }
.study-time-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 500px; }
.study-time-table th { background: #f8fafc; padding: 12px 10px; text-align: center; color: #475569; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.study-time-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; text-align: center; vertical-align: middle; }
.study-time-table tr:last-child td { border-bottom: none; }
.study-time-table input[type="text"], .study-time-table input[type="number"], .custom-subj { width: 90%; padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; text-align: center; font-size: 0.9rem; outline: none; transition: border 0.2s; }
.study-time-table input:focus { border-color: #3b82f6; }
.main-sub { font-weight: 700; color: #334155; }
.rate-txt { font-weight: bold; color: #334155; }
.total-row { background: #f0f9ff; font-weight: bold; color: #0369a1; }

.file-upload-box.small-type { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.upload-action { display: flex; align-items: center; gap: 10px; }
#mockExamProof { display: none !important; }
.mini-upload-btn { background: white; border: 1px solid #cbd5e1; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; color: #475569; cursor: pointer; font-weight: 600; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mini-upload-btn:hover { background: #f1f5f9; border-color: #94a3b8; color: #1e293b; }
.file-name-text { font-size: 0.8rem; color: #94a3b8; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-upload-wrapper { border: 2px dashed #cbd5e1; padding: 20px; border-radius: 8px; background: #fdfdfd; text-align: center; transition: background 0.2s; }
.file-upload-wrapper:hover { background: #f8fafc; border-color: #94a3b8; }
.file-upload-btn { display: inline-block; padding: 8px 16px; background: #3b82f6; color: white; border-radius: 6px; font-size: 0.9rem; cursor: pointer; transition: 0.2s; }
.file-upload-btn:hover { background: #2563eb; }
.file-list-box { margin-top: 15px; text-align: left; font-size: 0.9rem; }
.file-item { display: flex; justify-content: space-between; background: #f1f5f9; padding: 8px 12px; margin-bottom: 6px; border-radius: 6px; border: 1px solid #e2e8f0; }
.file-remove { color: #ef4444; cursor: pointer; font-weight: bold; margin-left: 10px; }

.mock-tile-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 15px; }
.mock-tile { border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px 5px; text-align: center; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 5px; background: #fff; }
.mock-tile:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.mock-tile.selected { border-color: #2563EB; background: #eff6ff; color: #2563EB; font-weight: bold; box-shadow: 0 2px 5px rgba(37, 99, 235, 0.1); }
.mock-tile .icon { font-size: 1.2rem; margin-bottom: 4px; }

.score-input-grid.enhanced { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 15px; }
.score-item { display: flex; flex-direction: column; gap: 6px; }
.score-item .main-label { text-align: center; font-size: 0.85rem; font-weight: 700; color: #475569; margin-bottom: 2px; }
.sub-input { width: 100%; height: 32px; padding: 0 5px; font-size: 0.8rem; border: 1px solid #e2e8f0; border-radius: 6px; text-align: center; background: #fff; color: #334155; box-sizing: border-box; }
.sub-input.disabled-input { background: #f1f5f9; border: 1px solid #f1f5f9; color: #cbd5e1; }
.sub-input::placeholder { font-weight: normal; font-size: 0.8rem; color: #cbd5e1; }
.score-val { width: 100%; height: 38px; padding: 0 5px; font-size: 0.95rem; font-weight: 700; border: 1px solid #cbd5e1; border-radius: 6px; text-align: center; background: #fff; box-sizing: border-box; }
.score-val::placeholder { font-weight: normal; font-size: 0.8rem; color: #cbd5e1; }
.score-val:focus, .sub-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }

.trend-radio-group { display: flex; gap: 20px; background: #f8fafc; padding: 15px; border-radius: 8px; justify-content: center; border: 1px solid #e2e8f0; }
.trend-radio-group label { cursor: pointer; font-weight: 500; color: #334155; display: flex; align-items: center; gap: 6px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 15px; margin: 10px 0; }
.sub-label { font-size: 0.9rem; font-weight: bold; color: #b91c1c; display: block; margin-bottom: 8px; }

/* 코칭 등급 제한 오버레이 */
.coach-container.tier-locked > .coach-box { filter: blur(5px); pointer-events: none; user-select: none; opacity: 0.6; }
.tier-lock-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; }
.lock-message-box { background: rgba(255, 255, 255, 0.95); padding: 30px 40px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); text-align: center; border: 1px solid #e2e8f0; animation: fadeIn 0.3s ease-out; }
.lock-message-box i { font-size: 2.5rem; color: #94a3b8; margin-bottom: 15px; }
.lock-message-box h3 { margin: 0 0 8px 0; color: #1e293b; font-size: 1.2rem; }
.lock-message-box p { margin: 0 0 20px 0; color: #64748b; font-size: 0.95rem; line-height: 1.5; }


/* ============================================================
   [6] 피드백 문서/모달 디자인
   ============================================================ */
/* 모달 배경 및 레이아웃 */
.custom-modal { position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(15, 23, 42, 0.8); backdrop-filter: blur(6px); }

/* PC 환경의 카드 레이아웃 기본 스타일 (모바일 뿐만 아니라 PC에서도 예쁘게 보이도록 밖으로 뺐습니다) */
.subject-card-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; }
.subject-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.subject-card .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed #e2e8f0; }
.subject-card .main-sub { font-weight: 800; color: #1e293b; font-size: 1.05rem; }
.subject-card .btn-del-card { background: #fef2f2; border: 1px solid #fecaca; color: #ef4444; border-radius: 6px; padding: 4px 8px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.subject-card .btn-del-card:hover { background: #ef4444; color: #fff; }
.subject-card .sub-detail { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.95rem; margin-bottom: 10px; box-sizing: border-box; }
.subject-card .time-inputs { display: flex; gap: 10px; align-items: flex-end; }
.subject-card .input-group { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.subject-card .input-group label { font-size: 0.8rem; color: #64748b; font-weight: 600; }
.subject-card .input-group input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; text-align: center; font-size: 1rem; box-sizing: border-box; }
.subject-card .rate-display { flex: 0.8; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; background: #f8fafc; padding: 8px; border-radius: 6px; border: 1px solid #e2e8f0; }
.subject-card .rate-display label { font-size: 0.8rem; color: #64748b; font-weight: 600; }
.subject-card .rate-txt { font-size: 1.1rem; font-weight: 800; color: #334155; }
.btn-add-card { width: 100%; padding: 12px; background: #f8fafc; border: 2px dashed #cbd5e1; color: #64748b; border-radius: 8px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; margin-bottom: 15px; }
.btn-add-card:hover { background: #eff6ff; border-color: #3b82f6; color: #3b82f6; }
.total-summary-box { display: flex; justify-content: space-between; background: #f0f9ff; padding: 15px; border-radius: 10px; border: 1px solid #bae6fd; }
.summary-item { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.summary-item span { font-size: 0.85rem; color: #0369a1; font-weight: 600; }
.summary-item strong { font-size: 1.2rem; color: #0f172a; }
.summary-item.total-rate strong { color: #1d4ed8; font-size: 1.3rem; }

/* 모달 컨텐츠 박스 */
.custom-modal-content { background-color: transparent; margin: 3vh auto; border-radius: 12px; width: 95%; max-width: 900px; position: relative; border: none; }
.custom-modal-content .close-btn { display: none; } 
.modal-body { padding: 0; }

/* 문서(워드) 형식 바탕 (좌우 여백 축소) */
.modal-document { 
    width: 100%; background: #ffffff; padding: 40px 30px; box-sizing: border-box; border-radius: 16px; 
    position: relative; min-height: 800px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3); z-index: 1; 
}

/* 🎯 워터마크 로고: ::before 대신 ::after를 써서 모든 요소 '위'에 덮어씌움 */
.modal-document::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/assets/backgrounds/bg_studycrack_logo.png');
    background-repeat: no-repeat; background-position: center 40%; background-size: 500px;
    opacity: 0.06; z-index: 9999; /* 맨 위로 */
    pointer-events: none; /* 클릭이나 드래그 방해 안 함 */
}

/* 문서 상단 컨트롤 */
.doc-controls { position: absolute; top: 15px; right: 25px; display: flex; gap: 10px; align-items: center; z-index: 10000; }
.btn-pdf { background: #1e293b; color: white; border: none; padding: 10px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-pdf:hover { background: #0f172a; transform: translateY(-2px); }
.close-btn-doc { font-size: 2rem; color: #94a3b8; cursor: pointer; line-height: 1; background: none; border: none; padding: 0 5px; transition: 0.2s; }
.close-btn-doc:hover { color: #ef4444; }

/* 리포트 헤더 (제목) */
.doc-header { border-bottom: 3px solid #1e293b; padding-bottom: 15px; margin-bottom: 25px; margin-top: 10px; display: flex; justify-content: space-between; align-items: flex-end; page-break-inside: avoid; }
.doc-subtitle { font-size: 0.85rem; font-weight: 800; color: #3b82f6; letter-spacing: 1px; margin: 0 0 5px 0; display: inline-block; background: #eff6ff; padding: 3px 8px; border-radius: 4px; }
.doc-title { font-size: 2.2rem; font-weight: 900; color: #0f172a; margin: 5px 0 0 0; letter-spacing: -1px; }
.doc-meta { font-size: 0.95rem; color: #64748b; text-align: right; font-weight: 600; line-height: 1.6; }
.doc-meta strong { color: #1e293b; }

/* 1:1 매칭 박스 디자인 */
.doc-matched-box { background: rgba(255,255,255,0.85); border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 4px 15px -3px rgba(0,0,0,0.05); overflow: hidden; margin-bottom: 25px; transition: transform 0.2s, box-shadow 0.2s; page-break-inside: avoid !important; }
.doc-matched-box:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08); border-color: #cbd5e1; }
.doc-matched-header { background: #f8fafc; padding: 14px 20px; border-bottom: 1px solid #e2e8f0; font-weight: 800; font-size: 1.1rem; color: #1e293b; display: flex; align-items: center; gap: 10px; page-break-inside: avoid; }
.doc-matched-header i { color: #3b82f6; font-size: 1.2rem; }

.doc-matched-body { display: flex; flex-direction: column; }
@media (min-width: 768px) { .doc-matched-body { flex-direction: row; } }

/* 학생 데이터 (좌측) / 튜터 피드백 (우측) */
.doc-student-data { flex: 1; padding: 20px; border-bottom: 1px solid #e2e8f0; position: relative; }
.doc-tutor-feedback { flex: 1.2; padding: 20px; background: #fafafa; position: relative; }
@media (min-width: 768px) {
    .doc-student-data { border-bottom: none; border-right: 1px dashed #cbd5e1; }
}

/* 뱃지 및 테이블 */
.doc-badge { display: inline-block; padding: 4px 10px; background: #f1f5f9; color: #475569; border-radius: 6px; font-size: 0.8rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -0.5px; border: 1px solid #e2e8f0; }
.doc-badge.tutor-badge { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.doc-badge.qna-badge { background: #fdf4ff; color: #c026d3; border-color: #e879f9; }

.doc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 10px; page-break-inside: auto; }
.doc-table tr { page-break-inside: avoid; page-break-after: auto; }
.doc-table th, .doc-table td { padding: 8px 4px; border-bottom: 1px solid #f1f5f9; text-align: center; }
.doc-table th { color: #94a3b8; font-weight: 600; font-size: 0.8rem; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-text { font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; color: #334155; }

/* 심층 QnA 섹션 */
.qna-pair-container { display: flex; flex-direction: column; gap: 20px; page-break-inside: avoid; }
.qna-student { background: #fff1f2; padding: 18px; border-radius: 8px; border: 1px solid #fecaca; }
.qna-tutor { background: #f0fdf4; padding: 18px; border-radius: 8px; border: 1px solid #bbf7d0; }


/* ============================================================
   [7] 기능 5: PRO EXCLUSIVE
   ============================================================ */
.pro-theme { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); padding: 40px; border-radius: 16px; color: white; border: 1px solid #3b82f6; box-shadow: 0 10px 30px rgba(30, 58, 138, 0.25); position: relative; overflow: hidden; }
.pro-theme::before { content: ''; position: absolute; top: -50px; right: -50px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%); z-index: 0; }
.pro-header { position: relative; z-index: 1; margin-bottom: 30px; text-align: center; }
.pro-badge { display: inline-block; background: #3b82f6; color: white; font-size: 0.8rem; font-weight: 800; padding: 4px 12px; border-radius: 20px; margin-bottom: 10px; letter-spacing: 1px; }
.pro-title { font-size: 1.8rem; font-weight: 800; margin: 0 0 10px 0; color: #fff; letter-spacing: -0.5px; }
.pro-desc { color: #cbd5e1; font-size: 1rem; font-weight: 400; word-break: keep-all; }

/* 🚀 무조건 1열(상하) 배치 & PC에서 너무 넓어지지 않게 650px 고정 */
.pro-promo-grid{ display:grid; grid-template-columns:1fr; gap:20px; margin:0 auto 30px auto; max-width:650px; position:relative; z-index:1; word-break:keep-all }
.pro-feature-card{ background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius:12px; padding:25px 20px; transition:transform .3s; display:flex; flex-direction:column; align-items:center; text-align:center; word-break:keep-all }
.pro-feature-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); }
.pro-feature-card.highlight { border: 1px solid #f59e0b; background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), transparent); }
.feat-icon { font-size: 2.2rem; margin-bottom: 12px; display: block; }
.feat-title { font-size: 1.15rem; font-weight: 700; color: #60a5fa; margin-bottom: 10px; display: block; word-break: keep-all; }
.feat-desc { font-size: 0.95rem; color: #e2e8f0; line-height: 1.6; margin: 0; word-break: keep-all; }

.pro-cta-btn { display: block; width: 100%; max-width: 400px; margin: 0 auto; padding: 16px 24px; background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%); color: #1e3a8a; border: 1px solid #bfdbfe; font-size: 1.1rem; font-weight: 800; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); position: relative; z-index: 1; text-align: center; }
.pro-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.2); background: #fff; border-color: #60a5fa; }
.pro-cta-btn div { font-size: 0.85rem; color: #64748b; margin-top: 4px; font-weight: 500; word-break: keep-all; }

.pro-feature-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); }
.pro-feature-card.highlight { border: 1px solid #f59e0b; background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), transparent); }
.pro-feature-card.highlight .feat-title { color: #fbbf24; }
.feat-icon { font-size: 1.5rem; margin-bottom: 15px; display: block; }
.feat-title { font-size: 1.1rem; font-weight: 700; color: #60a5fa; margin-bottom: 8px; display: block; }
.feat-desc { font-size: 0.9rem; color: #e2e8f0; line-height: 1.5; margin: 0; }

.pro-dashboard-layout { display: flex; flex-direction: column; gap: 30px; position: relative; z-index: 1; }
.dashboard-actions { text-align: center; background: rgba(255,255,255,0.05); padding: 25px; border-radius: 12px; }
.req-btn { background: white; color: #1e3a8a; font-weight: 700; padding: 12px 30px; border-radius: 8px; border: none; cursor: pointer; font-size: 1rem; transition: all 0.2s; }
.req-btn:hover { background: #eff6ff; box-shadow: 0 0 15px rgba(255,255,255,0.3); }

.report-list-container { background: rgba(0,0,0,0.2); border-radius: 12px; padding: 20px; }
.report-year-group { margin-bottom: 20px; }
.report-year-title { font-size: 0.9rem; color: #94a3b8; margin-bottom: 10px; border-bottom: 1px solid #334155; padding-bottom: 5px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.report-item { background: #1e293b; border: 1px solid #334155; padding: 15px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; transition: border-color 0.2s; cursor: pointer; }
.report-item:hover { border-color: #3b82f6; }
.rep-info strong { display: block; color: #fff; font-size: 0.95rem; margin-bottom: 2px; }
.rep-info span { font-size: 0.8rem; color: #94a3b8; }
.rep-icon { color: #3b82f6; }

/* 심층 코칭 카드 */
.pro-input-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.card-title { font-weight: 700; color: #1e293b; margin-bottom: 8px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.card-title i { color: #3b82f6; }
.card-desc { font-size: 0.9rem; color: #64748b; margin: 0 0 12px 0; line-height: 1.5; }
.pro-textarea { width: 100%; height: 100px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; resize: none; font-size: 0.95rem; line-height: 1.5; transition: border 0.2s; }
.pro-textarea:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.char-count { text-align: right; font-size: 0.85rem; color: #94a3b8; margin-top: 5px; }

/* 저장 버튼 */
.save-btn { display: block; width: 100%; padding: 16px 20px; margin-top: 20px; background-color: #2563EB; color: white; border: none; border-radius: 10px; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.5px; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3); }
.save-btn:hover { background-color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4); }
.save-btn:active { transform: translateY(0); box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3); }
.save-btn:disabled { background-color: #cbd5e1; color: #64748b; cursor: not-allowed; transform: none; box-shadow: none; }


/* ============================================================
   [8] 공통 모달 (일반 폼, 대학선택 등)
   ============================================================ */
/* 모달 배경 */
.modal { display: none; position: fixed; z-index: 2000 !important; left: 0; top: 0; width: 100%; height: 100%; height: -webkit-fill-available; background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); align-items: center; justify-content: center; }

/* 모달 컨텐츠 (공통) */
.modal-content { background-color: white; margin: 8vh auto; border-radius: 12px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); display: flex; flex-direction: column; overflow: hidden; animation: modalSlideIn 0.3s ease-out; max-height: 85vh; max-height: calc(-webkit-fill-available * 0.85); }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 모달 내부 구성요소 */
.modal-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; background: #fff; flex-shrink: 0; }
.modal-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.close-btn { font-size: 1.8rem; cursor: pointer; color: #94a3b8; line-height: 1; transition: color 0.2s; background: transparent; border: none; }
.close-btn:hover { color: #ef4444; }
.modal-body { padding: 24px; background: #fff; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-desc { font-size: 0.95rem; color: #475569; margin-bottom: 20px; line-height: 1.6; word-break: keep-all; }
.modal-footer { padding: 16px 24px; background: #f8fafc; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; z-index: 10; }

/* 탭 메뉴 (모달 내부) */
.tab-menu { display: flex; border-bottom: 1px solid #e2e8f0; background: #f8fafc; margin-bottom: 0; border-radius: 12px 12px 0 0; overflow: hidden; flex-shrink: 0; }
.tab-btn { flex: 1; padding: 15px; border: none; background: transparent; cursor: pointer; font-weight: bold; color: #64748b; border-bottom: 2px solid transparent; transition: 0.2s; font-size: 0.95rem; }
.tab-btn:hover { color: #334155; background: #f1f5f9; }
.tab-btn.active { color: #2563EB; border-bottom: 2px solid #2563EB; background: white; color: #2563EB; }
.tab-content { display: none; padding: 25px; animation: fadeIn 0.2s; }
.tab-content.active { display: block; }

/* 주간점검 모달 전용 */
.check-modal-content { max-width: 800px; height: 85vh; display: flex; flex-direction: column; padding: 0; }
.modal-body.scrollable { overflow-y: auto; flex: 1; background: #fff; padding: 0; }

/* 공통 폼 버튼 */
.btn-common { padding: 10px 20px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-cancel { background: white; color: #64748b; border: 1px solid #cbd5e1; }
.btn-cancel:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }
.btn-confirm { background: #2563eb; color: white; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); }
.btn-confirm:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3); }
.common-textarea { width: 100%; height: 140px; padding: 14px; border: 1px solid #cbd5e1; border-radius: 8px; background-color: #fff; font-size: 0.95rem; line-height: 1.6; resize: none; transition: all 0.2s; outline: none; font-family: inherit; }
.common-textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.common-textarea::placeholder { color: #94a3b8; }

/* PRO 모달 전용 테마 */
.pro-modal-content { border: 1px solid #3b82f6; }
.pro-modal-content .modal-header { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); border-bottom: 1px solid rgba(255,255,255,0.1); }
.pro-modal-content .modal-title { color: white; }
.pro-modal-content .close-btn { color: rgba(255,255,255,0.7); }
.pro-modal-content .close-btn:hover { color: white; transform: rotate(90deg); }
.pro-modal-content .modal-body { background: #f8fafc; }
.pro-modal-content .common-textarea { background: white; border: 1px solid #e2e8f0; }
.pro-modal-content .common-textarea:focus { border-color: #2563eb; }
.pro-modal-content .modal-footer { background: #fff; border-top: 1px solid #e2e8f0; }

/* --- 대학/학과 검색창 스타일 --- */
.modal-search-box { padding: 15px 24px 0 24px; position: relative; background: #fff; flex-shrink: 0; }
.modal-search-box i { position: absolute; left: 38px !important; top: 35px; color: #94a3b8; font-size: 1rem; z-index: 5; }
.modal-search-input { width: 100%; padding: 14px 15px 14px 50px !important; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.95rem; color: #334155; transition: all 0.2s; box-sizing: border-box; background-color: #f8fafc; position: relative; }
.modal-search-input:focus { outline: none; border-color: #3b82f6; background-color: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.modal-body.with-search { padding-top: 15px; }
.empty-search-result { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: #64748b; font-size: 0.95rem; display: flex; flex-direction: column; align-items: center; gap: 10px; }


/* ============================================================
   [9] 로딩 및 기타 유틸리티
   ============================================================ */
/* 섹션 로딩 오버레이: #sol-univ 전용 */
#sol-univ { position: relative; min-height: 300px; }
.page-loading-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.95); z-index: 50; display: flex; justify-content: center; align-items: center; border-radius: 12px; transition: opacity 0.4s ease, visibility 0.4s ease; }
.page-loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-content { text-align: center; color: #2563EB; }
.loading-content i { font-size: 3rem; margin-bottom: 15px; filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.2)); }
.loading-content p { font-size: 1.1rem; font-weight: 700; color: #334155; animation: pulseText 1.5s infinite ease-in-out; }
@keyframes pulseText { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* 숫자 입력 스피너 제거 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* ============================================================
   [10] 모바일 반응형 및 인쇄 설정
   ============================================================ */
   
/* 🎯 모바일 화면 제어 */
.mobile-only-msg { display: none; }

@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUpBottom { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (max-width: 768px) {
    /* =======================================
       0. 모바일 마법사(Wizard) 모드 전용 스타일 및 안내창
       ======================================= */    
    .modal-document { display: none !important; }
    .mobile-only-msg { display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; background: #ffffff; border-radius: 12px; margin: 0 auto; width: 100%; box-sizing: border-box; }
    .mobile-only-msg i { font-size: 3rem; color: #3b82f6; margin-bottom: 15px; }
    .mobile-only-msg h3 { margin: 0 0 10px 0; color: #1e293b; font-size: 1.4rem; }
    .mobile-only-msg p { color: #64748b; font-size: 0.95rem; margin-bottom: 25px; line-height: 1.5; word-break: keep-all; }
    .mobile-pdf-btn { width: 100%; padding: 14px 20px; font-size: 1.05rem; background: #3b82f6; color: white; border: none; border-radius: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; cursor: pointer; }
    .mobile-close-btn { width: 100%; padding: 14px; font-size: 1rem; background: #f1f5f9; border: none; border-radius: 8px; color: #475569; font-weight: 700; cursor: pointer; }

    .mobile-wizard-mode .tab-menu { display: none !important; }
    .mobile-wizard-mode .tab-content { display: block !important; padding: 10px 0 !important; }
    .mobile-wizard-mode .pro-body { padding: 0 15px !important; }
    .mobile-wizard-mode .pro-body > p { display: none; }
    .mobile-wizard-mode .check-section { display: none; margin-bottom: 0; padding: 15px; border: none; box-shadow: none; }
    .mobile-wizard-mode .pro-input-card { display: none; margin-bottom: 0; padding: 15px; border: none; box-shadow: none; }
    .mobile-wizard-mode .active-step { display: block !important; animation: fadeInRight 0.3s ease-out; }
    .mobile-wizard-mode .check-section h4 { font-size: 1.25rem; margin-bottom: 12px; }
    .mobile-wizard-mode .card-title { font-size: 1.25rem; margin-bottom: 12px; }
    .mobile-wizard-mode .check-section .desc { font-size: 1rem; color: #475569; margin-bottom: 20px; line-height: 1.5; }
    .mobile-wizard-mode .card-desc { font-size: 1rem; color: #475569; margin-bottom: 20px; line-height: 1.5; }
    .mobile-wizard-mode input[type="text"] { font-size: 1rem; padding: 12px; }
    .mobile-wizard-mode input[type="number"] { font-size: 1rem; padding: 12px; }
    .mobile-wizard-mode select { font-size: 1rem; padding: 12px; }
    .mobile-wizard-mode textarea { font-size: 1rem; padding: 12px; }
    .mobile-wizard-mode #weeklyModalFooter { display: flex; gap: 10px; justify-content: space-between; }
    .mobile-wizard-mode #wizardPrevBtn { flex: 1; margin-top: 0; }
    .mobile-wizard-mode #wizardNextBtn { flex: 2; margin-top: 0; }
    .mobile-wizard-mode #wizardSubmitBtn { flex: 2; margin-top: 0; }

    /* =======================================
       1. 메인 헤더 & 네비게이션 탭 다이어트
       ======================================= */
    .sol-header { margin-bottom: 20px; padding-bottom: 15px; }
    .sol-title { font-size: 1.5rem; gap: 10px; margin-bottom: 10px; }
    .sol-icon-box { width: 40px; height: 40px; font-size: 1.2rem; border-radius: 10px; }
    .sol-desc { font-size: 0.9rem; }
    
    .solution-menu { flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
    .sol-btn { flex: 1 1 45%; font-size: 0.85rem; padding: 10px 5px; min-width: 0; }
    .sol-btn i { font-size: 1.1rem; margin-bottom: 5px; }

    /* =======================================
       2. 카드 및 박스 UI 여백 다이어트
       ======================================= */
    .univ-grid { grid-template-columns: 1fr; gap: 12px; }
    .univ-slot { padding: 15px 12px; gap: 6px; }
    .univ-select-btn { padding: 12px 10px; font-size: 0.9rem; }
    
    .m-line { display: block; margin-top: 4px; } 
    .score-labels > span { text-align: center; line-height: 1.2; } 
    .label-pass { color: #3b82f6; } 
    
    .sim-chart-wrapper { padding: 15px; padding-bottom: 20px; min-height: auto; }
    .sim-result-card { padding: 15px; margin-top: 15px; }
    .sim-univ-title { font-size: 1.1rem; }
    .score-diff { font-size: 1.2rem; margin-top: 0; }
    
    .sim-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .sim-score-change { width: 100%; display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 10px; border-radius: 8px; box-sizing: border-box; }
    
    .coach-box { padding: 15px; }
    .coach-box .box-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .feedback-tile { padding: 12px 15px; }

    /* =======================================
       3. PRO 테마 섹션 축소
       ======================================= */
    .pro-theme { padding: 25px 20px; border-radius: 12px; width: 100%; box-sizing: border-box; }
    .pro-promo-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; padding-bottom: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .pro-promo-grid::-webkit-scrollbar { display: none; }
    .pro-feature-card { display: grid; grid-template-columns: min-content 1fr; grid-template-rows: auto auto; column-gap: 15px; row-gap: 5px; padding: 18px 20px; align-items: start; text-align: left; word-break: break-word; flex: 0 0 90%; scroll-snap-align: center; box-sizing: border-box; }
    .pro-title { font-size: 1.4rem; word-break: keep-all; line-height: 1.3; }
    .pro-desc { font-size: 0.9rem; word-break: keep-all; line-height: 1.5; margin-bottom: 20px; }
    .pro-cta-btn { padding: 14px 20px; font-size: 1rem; margin-top: 20px; width: 100%; box-sizing: border-box; }
    .pro-input-card { padding: 15px; margin-bottom: 15px; }
    .feat-icon { grid-column: 1; grid-row: 1 / 3; margin-bottom: 0; font-size: 2rem; margin-top: 2px; }
    .feat-title { grid-column: 2; grid-row: 1; margin-bottom: 0; font-size: 1.05rem; line-height: 1.3; }
    .feat-desc { grid-column: 2; grid-row: 2; font-size: 0.85rem; line-height: 1.5; margin: 0; white-space: normal; }
    #btnSaveTarget, .save-btn { padding: 14px 20px; font-size: 1rem; margin-top: 20px; }

    /* =======================================
       4. 공통 모달 및 폼 요소 다이어트
       ======================================= */
    .modal { position: fixed; z-index: 2000 !important; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh; background-color: rgba(15, 23, 42, 0.6); }
    .modal-content { position: absolute; bottom: 0; left: 0; margin: 0; width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; animation: slideUpBottom 0.3s ease-out; }
    .modal-header { padding: 15px 20px; flex-shrink: 0; }
    .modal-title { font-size: 1.05rem; }
    .modal-body { padding: 15px 20px; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .modal-footer { padding: 12px 20px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 10px rgba(0,0,0,0.05); position: relative; flex-shrink: 0; z-index: 10; }
    .save-btn, .btn-confirm, .btn-cancel { width: 100%; margin-top: 0; padding: 14px; font-size: 1rem; }
    .tab-btn { padding: 12px 10px; font-size: 0.85rem; }
    .tab-content { padding: 15px; padding-bottom: 25px; }
    
    /* 주간점검 폼 최적화 */
    .check-modal-content { height: 95vh; height: 95dvh; max-height: 95dvh; }

    /* =======================================
       5. 차트 모바일 전용 설정 (기존 레이아웃 조정)
       ======================================= */
    .label-pc { display: none; }
    .label-mobile { display: block; }
    .sim-bar { width: 28px; } 
    .sim-bar-item, .sim-label-item { min-width: 40px; }
    .chart-graph-area, .chart-label-area { padding-left: 10px; padding-right: 10px; gap: 5px; }
    .chart-graph-area { padding-top: 10px !important; height: 200px; } /* 차트 높이 축소 */
    .chart-guide-label { display: none !important; }
    .mobile-legend-area { display: flex; margin-top: 20px; }
    .sim-line-chart-area { min-height: 220px; overflow: visible !important; margin: 10px 0; }
    .sim-univ-scroll-box { flex-direction: column; gap: 8px; padding: 10px 0; overflow-x: hidden; grid-template-columns: 1fr; }
}

@media (min-width: 600px) and (max-width: 768px) {
    /* 태블릿급 화면에서는 대학 슬롯 2개 유지 */
    .univ-grid { grid-template-columns: repeat(2, 1fr); }
}