.recent-dashboard-layout {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
}

/* 기존 슬라이더 영역 유지 */
.recent-dashboard-sliders {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.recent-dashboard-sliders > .slider-section {
    width: 100%;
    min-width: 0;
}

.recent-sidebar-column {
    min-width: 0;
    box-sizing: border-box;
}

/* 최근 본 업체 박스 */
.recent-sidebar-panel {
    position: sticky;
    top: 30px;

    width: 100%;
    max-height: calc(100vh - 60px);

    display: flex;
    flex-direction: column;
    min-height: 0;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;

    box-sizing: border-box;
    box-shadow: 0 5px 22px rgba(15, 23, 42, 0.06);
}

.recent-sidebar-header,
.recent-views-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.recent-sidebar-header {
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f5;
    flex-shrink: 0;
}

.recent-sidebar-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.recent-sidebar-header h2 i {
    margin-right: 5px;
    color: #f58220;
}

.recent-sidebar-note {
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}

.recent-sidebar-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.recent-sidebar-empty {
    margin: 20px 0;
    font-size: 13px;
    text-align: center;
    color: #6b7280;
    line-height: 1.7;
}

/* 개별 업체 */
.recent-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #f1f3f5;
    min-width: 0;
}

/* 업체 상세 페이지 링크 */
.recent-entry-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.recent-entry-link:hover .recent-entry-title {
    color: #e86d0b;
}

.recent-entry-img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;

    border-radius: 7px;

    object-fit: contain;
    object-position: center;

    background: #fff;
    display: block;
}

/* 업체 정보 */
.recent-entry-content {
    min-width: 0;
    flex: 1;
}

.recent-entry-type {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-bottom: 3px;
}

.recent-entry-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.recent-entry-region {
    display: block;
    color: #6b7280;
    font-size: 11px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.recent-sidebar-more {
    border: 0;
    border-top: 1px solid #f1f3f5;
    background: #ffffff;

    font-weight: 700;
    font-size: 13px;
    color: #374151;
    cursor: pointer;

    width: 100%;
    padding: 13px 0 0;
    margin-top: 7px;

    flex-shrink: 0;
}

.recent-sidebar-more:hover {
    color: #e86d0b;
}

.recent-sidebar-more[hidden],
.recent-views-modal[hidden] {
    display: none !important;
}

.recent-views-modal {
    position: fixed;
    z-index: 10050;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.recent-views-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.recent-views-dialog {
    position: relative;
    background: #ffffff;

    width: min(650px, 100%);
    max-height: min(85vh, 850px);

    border-radius: 14px;
    padding: 15px;

    display: flex;
    flex-direction: column;
    min-height: 0;

    box-sizing: border-box;
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.2);
}

.recent-views-dialog-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    flex-shrink: 0;
}

.recent-views-dialog-header h2 {
    margin: 0;
    font-size: 16px;
}

.recent-views-dialog-header h2 span {
    color: #6b7280;
    font-size: 13px;
}

.recent-views-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    font-size: 20px;
}

.recent-views-modal-list {
    overflow-y: auto;
    min-height: 0;
    margin-top: 6px;
    overscroll-behavior: contain;
}

/* 더보기 업체 이미지 */
.recent-views-modal-list .recent-entry-img {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
}

/* 더보기 업체 간격 */
.recent-views-modal-list .recent-entry {
    padding: 9px 0;
    gap: 8px;
}

.recent-views-modal-list .recent-entry-title {
    font-size: 12px;
}

@media (min-width: 1061px) {
    .recent-dashboard-sliders {
        max-width: none;
    }

    /* 오른쪽 최근 본 업체 */
    .recent-sidebar-column {
        position: absolute;

        top: 0;
        bottom: 0;

        left: calc(50% + 530px + 25px);

        width: 240px;

        padding-top: 30px;
        padding-bottom: 30px;

        box-sizing: border-box;
        overflow: visible;
    }

    /* 스크롤 위아래 따라가기 */
    #recentSidebarPanel {
        position: sticky;
        top: 100px;
        bottom: auto;

        width: 100%;
        margin: 0;

        max-height: calc(100vh - 60px);
        box-sizing: border-box;
    }
}

@media (max-width: 1060px) {
    .recent-sidebar-column {
        position: relative;

        top: auto;
        bottom: auto;
        left: auto;

        width: 100%;
        max-width: 1060px;

        margin: 0 auto;
        padding: 10px 20px;

        box-sizing: border-box;
    }

    #recentSidebarPanel {
        position: static;
        width: 100%;
        max-height: none;
        margin: 0;
    }

    .recent-sidebar-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 16px;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .recent-sidebar-column {
        width: 100%;
    }

    .recent-sidebar-list {
        grid-template-columns: 1fr;
    }

    .recent-views-dialog {
        width: min(440px, 100%);
        padding: 14px;
        max-height: 85vh;
    }
}

.advertising-recent-layout,
.tools-recent-layout,
.jobsearch-recent-layout {
    position: relative;
    display: block;

    width: 100%;
    max-width: 1060px;
    min-width: 0;

    margin: 0 auto;
    padding: 0;

    overflow: visible;
}

.advertising-recent-main,
.tools-recent-main,
.jobsearch-recent-main {
    width: 100%;
    min-width: 0;
}

@media (min-width: 1600px) {
    .advertising-recent-layout > .recent-sidebar-column,
    .tools-recent-layout > .recent-sidebar-column,
    .jobsearch-recent-layout > .recent-sidebar-column {
        position: absolute;

        top: 0;
        bottom: 0;
        left: calc(100% + 25px);

        width: 240px;
        height: auto;

        margin: 0;
        padding: 0;

        box-sizing: border-box;
        overflow: visible;
    }

    .advertising-recent-layout #recentSidebarPanel,
    .tools-recent-layout #recentSidebarPanel,
    .jobsearch-recent-layout #recentSidebarPanel {
        position: sticky;

        top: 100px;
        bottom: auto;

        width: 100%;
        margin: 0;

        max-height: calc(100vh - 120px);
        box-sizing: border-box;
    }
}
