::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: #f1f1f1; }
        ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
        
        .wall-wrapper { perspective: 1500px; margin-bottom: 2rem; animation: fadeIn 0.4s ease-out; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        .wall-3d {
            background: linear-gradient(145deg, #f1f5f9, #cbd5e1);
            border: 8px solid #94a3b8; border-radius: 8px;
            box-shadow: 10px 12px 22px rgba(0,0,0,0.18), inset 0 0 18px rgba(255,255,255,0.45);
            transition: box-shadow 0.25s ease;
        }
        .wall-3d:hover { box-shadow: 10px 12px 22px rgba(0,0,0,0.18), inset 0 0 18px rgba(255,255,255,0.45); }

        .niche-cell {
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 2px 2px 5px rgba(0,0,0,0.2);
            border-top-color: rgba(255, 255, 255, 0.9) !important; border-left-color: rgba(255, 255, 255, 0.9) !important;
            border-bottom-color: rgba(0, 0, 0, 0.2) !important; border-right-color: rgba(0, 0, 0, 0.2) !important;
            transform-style: preserve-3d;
        }
        .niche-cell:hover:not(.empty-niche) {
            transform: scale(1.04);
            box-shadow: inset 0 0 5px rgba(255,255,255,0.8), 6px 8px 14px rgba(0,0,0,0.24); z-index: 20;
        }
        
        .empty-niche {
            background-image: repeating-linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%, #e2e8f0), repeating-linear-gradient(45deg, #e2e8f0 25%, #f8fafc 25%, #f8fafc 75%, #e2e8f0 75%, #e2e8f0);
            background-position: 0 0, 10px 10px; background-size: 10px 10px; opacity: 0.6; cursor: not-allowed; box-shadow: inset 2px 2px 10px rgba(0,0,0,0.2);
        }

        /* 🖨️ 인쇄 전용 스타일 및 A4 미리보기 */
        .a4-wrapper {
            width: 210mm;
            min-height: 297mm;
            background: white;
            color: black;
            box-sizing: border-box;
            margin: 0 auto;
            box-shadow: 0 0 15px rgba(0,0,0,0.3);
            position: relative;
            transform-origin: top center;
        }
        
        /* 화면이 작을 경우 A4 용지를 축소하여 보여줌 */
        @media screen and (max-width: 1024px) { .a4-wrapper { transform: scale(0.8); margin-bottom: -60mm; } }
        @media screen and (max-width: 768px) { .a4-wrapper { transform: scale(0.6); margin-bottom: -120mm; } }

        @media screen and (max-width: 1180px) {
            #view-dashboard > aside { width: 8.5rem !important; }
            #dashboard-container { padding: 0.9rem !important; }
            .wall-wrapper { margin-bottom: 1rem; }
            .wall-3d { padding: 0.7rem !important; }
            .wall-3d h3 { font-size: 0.95rem !important; margin-bottom: 0.7rem !important; }
            #dashboard-container .niche-cell { height: 2.35rem !important; }
            #dashboard-container .niche-cell.w-12 { width: 2.15rem !important; }
            #dashboard-container .niche-cell.w-24 { width: 4.3rem !important; }
            #dashboard-container .niche-cell span:first-child { font-size: 0.52rem !important; }
            #dashboard-container .niche-cell span:last-child { font-size: 0.42rem !important; }
        }

        @media screen and (max-width: 900px) {
            #view-dashboard > aside { width: 7.25rem !important; }
            #dashboard-container { padding: 0.65rem !important; }
            .wall-3d { padding: 0.55rem !important; }
            .wall-3d h3 { font-size: 0.88rem !important; }
            #dashboard-container .niche-cell { height: 2.05rem !important; }
            #dashboard-container .niche-cell.w-12 { width: 1.9rem !important; }
            #dashboard-container .niche-cell.w-24 { width: 3.75rem !important; }
            #dashboard-container .niche-cell span:first-child { font-size: 0.48rem !important; }
            #dashboard-container .niche-cell span:last-child { font-size: 0.38rem !important; }
        }

        @media screen { 
            #print-area { display: none !important; } 
        }
        @media print {
            body { background-color: white !important; margin: 0; padding: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
            #login-container, #app-container, div[id$="-modal"], #custom-msg-modal { display: none !important; }
            #print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; background: white; color: black; z-index: 9999; }
            .a4-wrapper { box-shadow: none; transform: scale(1); margin: 0; width: 210mm; height: 297mm; min-height: 297mm; page-break-after: auto; break-after: avoid-page; overflow: hidden; }
            @page { size: A4 portrait; margin: 0; }
        }
