        :root {
            --bg-body: #F0F4F8; 
            --sidebar-bg: #FFFFFF;
            --primary: #6C5CE7;
            --primary-light: #A29BFE;
            --text-dark: #2D3436;
            --text-grey: #636E72;
            
            /* 컬러셋 */
            --c-blue: #E3F2FD; --t-blue: #2196F3;
            --c-pink: #FFEBEE; --t-pink: #E91E63;
            --c-orange: #FFF3E0; --t-orange: #FF9800;

            --shadow-card: 0 4px 20px rgba(0,0,0,0.03);
            --shadow-hover: 0 20px 40px rgba(0,0,0,0.12); 
            --radius-card: 24px;
        }

        body {
            font-family: 'Pretendard', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-dark);
            margin: 0; padding: 0;
            overflow: hidden; 
        }

        /* [모바일 기본 숨김] */
        .mobile-menu-btn { display: none; }
        .sidebar-overlay { display: none; }

        /* --- [1] 로그인 화면 --- */
        #login-wrapper {
            display: flex; height: 100vh; width: 100vw;
            background: white; position: fixed; top: 0; left: 0; z-index: 3000;
        }
        .login-art {
            flex: 1.5; background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
            display: flex; justify-content: center; align-items: center;
            flex-direction: column; position: relative; overflow: hidden;
        }
        .circle { position: absolute; border-radius: 50%; opacity: 0.6; filter: blur(40px); animation: float 6s infinite ease-in-out; }
        .c1 { width: 300px; height: 300px; background: #FF9A9E; top: 10%; left: 10%; }
        .c2 { width: 400px; height: 400px; background: #A18CD1; bottom: 10%; right: 10%; animation-delay: -3s;}
        
        .login-keyboard-img { 
            width: 200px; z-index: 10; 
            animation: float 4s infinite ease-in-out; 
            filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
        }

        .login-form-container {
            flex: 1; display: flex; flex-direction: column; 
            justify-content: center; padding: 60px;
            max-width: 500px; background: white; z-index: 2;
            animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
        }
        .login-title { font-size: 3rem; font-weight: 900; margin-bottom: 10px; color: var(--text-dark); letter-spacing: -1px; }
        .login-sub { font-size: 1.1rem; color: var(--text-grey); margin-bottom: 40px; }
        
        .inp-box {
            width: 100%; padding: 20px; border-radius: 16px; background: #F8F9FA;
            border: 2px solid transparent; margin-bottom: 15px; font-size: 1rem; outline: none; 
            transition: all 0.3s; box-sizing: border-box;
        }
        .inp-box:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1); transform: translateY(-2px); }
        
        .btn-login {
            width: 100%; padding: 20px; border-radius: 16px; border: none;
            background: var(--primary); color: white; font-size: 1.1rem; font-weight: 800;
            cursor: pointer; transition: all 0.3s; margin-top: 20px;
            box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
        }
        .btn-login:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 30px rgba(108, 92, 231, 0.4); }

        /* --- [1-b] 로그인 화면 리파인 v2 --- */
        /* 크롬 자동완성 시 파란 배경 제거 */
        .inp-box:-webkit-autofill,
        .inp-box:-webkit-autofill:hover,
        .inp-box:-webkit-autofill:focus {
            -webkit-box-shadow: 0 0 0 1000px #F8F9FA inset !important;
            -webkit-text-fill-color: #2D3436 !important;
            caret-color: #2D3436;
            transition: background-color 999999s ease-in-out 0s;
        }

        /* 컴팩트 푸터: 오른쪽 패널 맨 아래 고정 */
        #login-wrapper .login-form-container { position: relative; padding-bottom: 150px; }
        .login-footer { position: absolute; left: 60px; right: 60px; bottom: 28px; }
        .login-footer-links { display: flex; flex-wrap: wrap; align-items: center; }
        .login-footer-links a { font-size: 0.78rem; color: #A6ACBA; font-weight: 700; text-decoration: none; transition: color .2s; }
        .login-footer-links a:hover { color: var(--primary); }
        .login-footer-links a b { font-weight: 800; color: #8B92A3; }
        .login-footer-links a:not(:last-child)::after { content: '·'; margin: 0 9px; color: #D8DCE4; font-weight: 400; }
        .login-footer-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 9px; }
        .login-biz summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 0.74rem; color: #B9BFCB; font-weight: 700; list-style: none; user-select: none; transition: color .2s; }
        .login-biz summary:hover { color: #8B92A3; }
        .login-biz summary::-webkit-details-marker { display: none; }
        .login-biz summary::after { content: '▾'; font-size: 0.7em; transition: transform .2s; }
        .login-biz[open] summary::after { transform: rotate(180deg); }
        .login-biz-info { margin: 10px 0 6px; font-size: 0.72rem; color: #A6ACBA; line-height: 1.9; word-break: keep-all;
            background: #F8F9FB; border: 1px solid #EEF0F4; border-radius: 12px; padding: 12px 16px; }
        .login-copy { font-size: 0.72rem; color: #C6CBD6; }
        @media (max-height: 720px), (max-width: 900px) {
            #login-wrapper .login-form-container { padding-bottom: 60px; }
            .login-footer { position: static; margin-top: 30px; }
        }


        /* --- [2] 메인 앱 레이아웃 --- */
        #app-wrapper {
            display: none; height: 100vh; width: 100vw;
        }

        /* 사이드바 */
        .sidebar {
            width: 260px; background: var(--sidebar-bg);
            padding: 30px 20px; display: flex; flex-direction: column;
            border-right: 1px solid #EAEAEA; flex-shrink: 0;
            z-index: 10;
        }
        .logo { font-size: 1.4rem; font-weight: 900; color: var(--primary); margin-bottom: 40px; padding-left: 10px; }
        
        .nav-list { list-style: none; padding: 0; margin: 0; flex: 1; }
        .nav-item {
            padding: 14px 18px; margin-bottom: 8px; border-radius: 14px;
            color: var(--text-grey); font-weight: 600; cursor: pointer; 
            display: flex; align-items: center; gap: 12px; transition: 0.2s;
            text-decoration: none;
        }
        .nav-item:hover { background: #F5F6FA; color: var(--primary); transform: translateX(5px); }
        .nav-item.active { background: #EEEBFF; color: var(--primary); }
        .nav-icon { width: 24px; text-align: center; font-size: 1.1rem; }

        .profile-card {
            background: #F8F9FA; padding: 15px; border-radius: 16px;
            display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.3s;
        }
        .profile-card:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
        .avatar { width: 40px; height: 40px; background: #D6A2E8; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }

        /* 메인 콘텐츠 */
        .main-content {
            flex: 1; padding: 40px 50px; overflow-y: auto;
            display: flex; flex-direction: column; gap: 25px;
            position: relative;
        }
        .main-content::before {
            content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
            background: radial-gradient(circle, rgba(108, 92, 231, 0.03) 0%, transparent 40%),
                        radial-gradient(circle, rgba(253, 121, 168, 0.03) 100%, transparent 60%);
            animation: bgMove 20s linear infinite; z-index: -1; pointer-events: none;
        }
        @keyframes bgMove { 0% { transform: translate(0,0); } 50% { transform: translate(-20px, -20px); } 100% { transform: translate(0,0); } }
        @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } }

        /* 요소들 */
        .header { display: flex; justify-content: space-between; align-items: flex-end; opacity: 0; animation: fadeUp 0.8s forwards 0.2s; }
        .welcome h1 { font-size: 2rem; margin: 0; font-weight: 800; color: var(--text-dark); }
        .welcome p { margin: 8px 0 0 0; color: var(--text-grey); font-size: 1rem; }
        .date-badge { background: white; padding: 10px 20px; border-radius: 30px; font-weight: 700; color: var(--primary); box-shadow: var(--shadow-card); transition: 0.3s; }
        .date-badge:hover { transform: translateY(-3px) rotate(2deg); }

        .notice-banner {
            background: white; border-radius: 16px; padding: 18px 25px;
            display: flex; justify-content: space-between; align-items: center;
            box-shadow: var(--shadow-card); border-left: 5px solid #FF7675;
            opacity: 0; animation: fadeUp 0.8s forwards 0.3s;
        }
        .notice-content { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #444; }
        .notice-badge { background: #FFEBEE; color: #D63031; padding: 5px 10px; border-radius: 8px; font-size: 0.8rem; font-weight: 800; }
        .notice-close { cursor: pointer; font-size: 1.2rem; color: #aaa; transition: 0.2s; }
        
        .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; opacity: 0; animation: fadeUp 0.8s forwards 0.4s; }
        .stat-card {
            background: white; border-radius: var(--radius-card); padding: 30px;
            box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: space-between;
            transition: all 0.4s;
        }
        .stat-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-hover); }
        .stat-info h3 { margin: 5px 0 0 0; font-size: 2.2rem; font-weight: 800; color: var(--text-dark); }
        .stat-info p { margin: 0; color: var(--text-grey); font-size: 0.95rem; font-weight: 600; }
        .stat-icon { 
            width: 60px; height: 60px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.875rem; 
            animation: iconFloat 3s ease-in-out infinite;
        }
        @keyframes iconFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
        
        .bg-pink { background: var(--c-pink); color: var(--t-pink); animation-delay: 0s; }
        .bg-blue { background: var(--c-blue); color: var(--t-blue); animation-delay: 0.2s; }
        .bg-orange { background: var(--c-orange); color: var(--t-orange); animation-delay: 0.4s; }

        .mid-section { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; min-height: 320px; opacity: 0; animation: fadeUp 0.8s forwards 0.5s; }
        
        .dashboard-card {
            background: white; border-radius: var(--radius-card); padding: 30px;
            box-shadow: var(--shadow-card); display: flex; flex-direction: column;
            transition: 0.3s;
        }
        .dashboard-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

        .card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
        .card-head h4 { margin: 0; font-size: 1.2rem; font-weight: 800; }
        
        /* 차트 */
        .chart-box { display: flex; align-items: flex-end; justify-content: space-between; flex: 1; padding: 0 15px; }
        .bar-group { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 10%; height: 100%; justify-content: flex-end; }
        .bar { width: 100%; background: #F1F3F5; border-radius: 8px; position: relative; overflow: hidden; height: 100%; }
        .bar-fill { 
            position: absolute; bottom: 0; left: 0; width: 100%; background: var(--primary); border-radius: 8px; 
            height: 0%; transition: height 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        .day-label { font-size: 0.85rem; color: #ADB5BD; font-weight: 600; }

        /* 랭킹 리스트 */
        .rank-card { background: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 100%); color: white; overflow: hidden; }
        .rank-item {
            display: flex; align-items: center; background: rgba(255,255,255,0.15);
            padding: 12px 15px; border-radius: 14px; margin-bottom: 12px;
            backdrop-filter: blur(5px); transition: 0.2s;
            opacity: 0; animation: slideInRight 0.5s forwards;
        }
        .rank-item:nth-child(1) { animation-delay: 0.8s; }
        .rank-item:nth-child(2) { animation-delay: 1.0s; }
        .rank-item:nth-child(3) { animation-delay: 1.2s; }
        .rank-item:hover { background: rgba(255,255,255,0.25); transform: translateX(5px); }
        .rank-num { font-weight: 800; font-size: 1.2rem; margin-right: 15px; width: 20px; text-align: center; }
        .rank-name { flex: 1; font-weight: 600; font-size: 1rem; }
        .rank-score { font-weight: 700; font-size: 0.95rem; opacity: 0.9; background: white; color: var(--primary); padding: 4px 10px; border-radius: 8px;}

        /* 아카데미 카드 */
        .academy-card {
            background: white; border-radius: 20px; padding: 20px 30px;
            display: flex; justify-content: space-between; align-items: center;
            text-decoration: none; color: var(--text-dark);
            box-shadow: var(--shadow-card); transition: 0.3s;
            border: 1px solid rgba(0,0,0,0.03); margin-bottom: 20px;
            opacity: 0; animation: fadeUp 0.8s forwards 0.6s;
        }
        .academy-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(108, 92, 231, 0.15); border-color: var(--primary-light); }
        .ac-content { display: flex; align-items: center; gap: 15px; }
        .ac-icon-img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); transition: 0.3s; }
        .academy-card:hover .ac-icon-img { transform: scale(1.1) rotate(-10deg); }
        .ac-text h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--text-dark); }
        .ac-text p { margin: 2px 0 0 0; color: #888; font-size: 0.9rem; font-weight: 500;}
        .ac-arrow { font-size: 1.5rem; color: #ddd; font-weight: bold; transition: 0.3s; }
        .academy-card:hover .ac-arrow { color: var(--primary); transform: translateX(5px); }

        @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes slideInRight { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

        /* 모달 & 로딩 */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
        .modal-box { background: white; width: 400px; padding: 30px; border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); animation: fadeUp 0.3s; }
        .modal-ta { width: 100%; height: 100px; padding: 15px; margin: 15px 0; border: 2px solid #eee; border-radius: 12px; resize: none; font-family: inherit; box-sizing: border-box;}
        .btn-s { padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer; font-weight: bold; }
        .admin-trigger { margin-top: 20px; border: none; background: none; color: #ccc; cursor: pointer; font-size: 0.8rem; }
        .admin-trigger:hover { color: var(--primary); }

        #loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); z-index: 3000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
        .spinner { width: 40px; height: 40px; border: 4px solid #eee; border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 0.8s infinite linear; }
        @keyframes spin { 100% { transform: rotate(360deg); } }

        /* --- 모바일 반응형 --- */
        @media (max-width: 768px) {
            body { overflow: auto; }
            #login-wrapper { flex-direction: column; overflow-y: auto; }
            .login-art { flex: 0.4; padding: 40px 0; min-height: 250px; }
            .login-form-container { flex: 1; padding: 40px 20px; }
            
            .sidebar { position: fixed; top: 0; left: 0; height: 100%; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 2000; }
            .sidebar.active { transform: translateX(0); } 
            .sidebar-overlay.active { display: block; background: rgba(0,0,0,0.5); z-index: 1500; position: fixed; top: 0; left: 0; width: 100%; height: 100%; }
            .mobile-menu-btn { display: block; position: fixed; top: 15px; left: 15px; z-index: 1600; background: var(--primary); color: white; border: none; border-radius: 8px; padding: 8px 12px; font-size: 1.5rem; cursor: pointer; }
            .main-content { padding: 70px 20px 20px; width: 100%; box-sizing: border-box; }
            .stats-row { grid-template-columns: 1fr; }
            .mid-section { grid-template-columns: 1fr; }
            .chart-box { height: 200px; padding: 0 5px; }
            .bar-group { width: 12%; }
        }
    

/* study-menu-sidebar-tuning: 공부 기능 메뉴 추가 후 사이드바 넘침 방지 */
.sidebar{overflow-y:auto;}
.nav-item{padding-top:12px;padding-bottom:12px;margin-bottom:6px;}
.logo{margin-bottom:24px;}


/* ---------- 소리자바 아카데미 화상강의 배너 ---------- */
.dashboard-ai-teacher-entry.academy-entry {
  border-color:#CBEFDF;
  background:linear-gradient(135deg,#F2FCF8 0%,#EAFBF4 60%,#FDF4F7 100%);
}
.academy-kicker { color:#149a76 !important; }
.portal-btn.academy-entry-link {
  border-color:#149a76; color:#0f8262; background:#fff;
}
.portal-btn.academy-entry-link:hover { background:#149a76; color:#fff; }

/* 핑키온 마을 실시간 입장 카드 */
.dashboard-village-entry{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:0 0 18px;padding:20px 22px;border:1px solid #cfe9df;border-radius:18px;background:linear-gradient(135deg,#effff8 0%,#f4f1ff 100%);box-shadow:0 12px 34px rgba(50,77,72,.08);overflow:hidden;position:relative}
.dashboard-village-entry::after{content:"";position:absolute;right:-38px;top:-65px;width:190px;height:190px;border-radius:50%;background:radial-gradient(circle,rgba(91,61,240,.13),rgba(91,61,240,0) 70%);pointer-events:none}
.dashboard-village-copy{display:flex;align-items:center;gap:16px;min-width:0;position:relative;z-index:1}
.dashboard-village-icon{display:grid;place-items:center;flex:0 0 auto;width:54px;height:54px;border-radius:17px;background:linear-gradient(145deg,#2fc7aa,#6350e8);box-shadow:0 12px 26px rgba(47,199,170,.23);font-size:27px}
.dashboard-village-entry .portal-kicker{margin:0 0 5px;color:#258b76;font-size:10px;font-weight:900;letter-spacing:.1em}
.dashboard-village-entry h2{margin:0;color:#20253a;font-size:18px;line-height:1.35;letter-spacing:-.04em}
.dashboard-village-entry p:not(.portal-kicker){margin:5px 0 0;color:#72788b;font-size:12px;font-weight:650}
.dashboard-village-link{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;height:42px;padding:0 17px;border-radius:12px;background:linear-gradient(145deg,#2fc7aa,#5b3df0);color:#fff;text-decoration:none;font-size:12px;font-weight:850;box-shadow:0 10px 22px rgba(70,91,180,.2);transition:.18s ease}
.dashboard-village-link:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(70,91,180,.26)}
.dashboard-village-link span{font-size:16px}
@media(max-width:760px){.dashboard-village-entry{align-items:flex-start;padding:17px}.dashboard-village-icon{width:46px;height:46px;border-radius:14px;font-size:23px}.dashboard-village-entry h2{font-size:15px}.dashboard-village-entry p:not(.portal-kicker){font-size:11px}.dashboard-village-link{align-self:center;padding:0 13px}.dashboard-village-link{font-size:0}.dashboard-village-link span{font-size:17px}}
