/* 전역 그라데이션 및 레이아웃 정렬 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #eef2f7 0%, #fbeeed 100%) !important;
    background-attachment: fixed !important;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Pretendard 폰트 전역 바인딩 지침 */
body, input, button, textarea, select, table, div, p, span, a, li, h1, h2, h3, h4, h5, h6,
.content-area, .index-list-container, .index-list-title, .custom-category-title,
.index-list-group, .index-list-item, .index-list-item a, .index-item-date,
.article-view-area, .article-card, .article-card h2, .article-card h2 a, .article-meta,
.article-body, .article-body p, .article-body span, .article-body a {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
    text-transform: none !important;
}

#minihomepy-wrapper {
    width: 100%;
    max-width: 980px;
    padding: 25px;
    box-sizing: border-box;
}

/* [PC 모드 기본값] 미니홈피 가로 2열 그리드 배치 완벽 유지 */
#minihomepy-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 15px;
    align-items: start;
}

.box {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(165, 180, 252, 0.08);
}

#aside-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-box {
    text-align: center;
}

.profile-img img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 12px;
}

.blog-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px 0;
}

.blog-desc {
    font-size: 0.82rem;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.4;
}

.search-container {
    display: flex;
    position: relative;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 3px;
}

.search-container input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 2px 25px 2px 0;
}

.search-container button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.search-container button::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #94a3b8;
    font-size: 0.85rem;
}

.menu-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-box ul li a {
    font-size: 0.88rem;
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 4px 0;
    transition: color 0.2s;
}

/* [지침 사수] 메뉴 마우스 오버 시 은은한 핑크 계열 변환 및 밑줄 동시 적용 */
.menu-box ul li a:hover {
    color: #db7a95 !important;
    text-decoration: underline !important;
}

#main-content {
    min-height: 540px;
    padding: 35px;
}

h3.index-list-title,
.index-list-title, 
.article-card h2,
.article-card h2 a {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
}

.article-card {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* [지침 사수] 왼쪽 분홍색 포인트 세로선 구현 */
h3.index-list-title,
.index-list-title,
.article-card h2 {
    border-left: 4px solid #db7a95 !important;
    border-bottom: none !important;
    border-right: none !important;
    border-top: none !important;
    padding-left: 10px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    background: none !important;
    display: block !important;
    line-height: 1.2 !important;
}

.index-list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.index-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.index-list-item a {
    font-size: 0.92rem;
    color: #334155;
    text-decoration: none;
    max-width: 75%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

/* [지침 사수] 글 목록 링크 마우스 오버 시 은은한 핑크 계열 변환 및 밑줄 동시 적용 */
.index-list-item a:hover {
    color: #db7a95 !important;
    text-decoration: underline !important;
}

.index-item-date {
    font-size: 0.82rem;
    color: #94a3b8;
}

/* [지침 사수] 본문 글자 크기, 행간, 자간 적용 */
.article-body, .article-body p {
    font-size: 0.94rem !important;
    line-height: 1.85 !important;
    letter-spacing: -0.4px !important;
    color: #333333 !important;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 15px;
}

.page-num, .page-arrow {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.page-num:hover, .page-arrow:hover {
    color: #db7a95 !important;
    text-decoration: underline !important;
}


/* ==========================================================================
   [보완된 핵심 기능 수정을 위한 비어 있던 비밀글 영역 스타일 바인딩]
   ========================================================================== */
.protected-wrap {
    padding: 40px 15px;
    text-align: center;
}

.protected-msg {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    margin-bottom: 20px !important;
}

.protected-form {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.protected-form input[type="password"] {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    font-size: 0.85rem;
    color: #333;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.protected-form input[type="password"]:focus {
    border-color: #db7a95 !important;
    box-shadow: 0 0 0 2px rgba(219, 122, 149, 0.15);
}

.protected-form button[type="submit"] {
    height: 36px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #db7a95;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s;
}

.protected-form button[type="submit"]:hover {
    background-color: #c46580;
}


/* ==========================================================================
   [모바일 최적화 미디어 쿼리] - 스마트폰 가로 해상도(768px 이하) 대응
   ========================================================================== */
@media screen and (max-width: 768px) {
    #minihomepy-wrapper {
        padding: 10px;
    }

    /* 1열 세로 레이아웃 변경으로 데스크탑 붕괴 및 우측 밀림 현상 완전 방어 */
    #minihomepy-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #aside-left {
        width: 100% !important;
    }

    #main-content {
        width: 100% !important;
        min-height: auto !important;
        padding: 20px !important;
    }
    
    .protected-form {
        flex-direction: column;
        gap: 8px;
        max-width: 100%;
    }
    
    .protected-form input[type="password"],
    .protected-form button[type="submit"] {
        width: 100%;
    }
}