/* ==========================================
   JYComputer Tistory Responsive Skin
========================================== */

:root,
html {
    color-scheme: light only;
    -webkit-text-size-adjust: 100%;
}

html,
body,
#wrap,
#header,
#sidebar,
#container,
#content,
.welcome-box,
.post-card > a,
.article {
    forced-color-adjust: none !important;
    -webkit-forced-color-adjust: none !important;
}

* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #f5f6f8 !important;
    color: #202124 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Noto Sans KR", Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

#wrap {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 8px;
    background: #f5f6f8 !important;
}

/* 헤더 */
#header {
    position: fixed;
    top: -62px;
    left: 0;
    width: 100%;
    height: 68px;
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    transition: top 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

#header:hover {
    top: 0;
}

.logo a {
    display: flex;
    align-items: center;
    height: 68px;
}

.logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 8px;
    flex-shrink: 0;
}

.logo strong {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: #202124 !important;
}

.top-search form {
    display: flex;
}

.top-search input {
    width: 200px;
    height: 36px;
    border: 1px solid #dcdfe4;
    border-radius: 6px 0 0 6px;
    padding: 0 10px;
    background: #ffffff !important;
    color: #202124 !important;
}

.top-search button {
    height: 36px;
    border: 0;
    background: #202124 !important;
    color: #ffffff !important;
    padding: 0 12px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

/* 컨테이너 및 사이드바 */
#container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex: 1;
    min-width: 0;
    background: #f5f6f8 !important;
    align-items: flex-start;
}

#sidebar {
    width: 245px;
    min-width: 245px;
    background: #ffffff !important;
    border-right: 1px solid #e5e7eb;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 15px;
    height: fit-content;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
}

.side-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100%;
    text-decoration: none;
}

.side-logo-img {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    object-fit: contain !important;
    margin: 0 8px 0 0 !important;
    flex-shrink: 0 !important;
}

.side-title-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
}

.side-title span {
    display: block !important;
    font-size: 18px;
    color: #777777 !important;
    font-weight: 800;
    line-height: 1.2;
}

.side-title small {
    display: block;
    color: #9aa0a6 !important;
    font-size: 11px;
    margin-top: 2px;
}

/* 카테고리 */
.menu-category {
    margin-top: 20px;
}

.menu-category ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-category > ul.tt_category > li > a.link_tit,
.menu-category > ul.category_list > li > a.link_tit {
    display: none !important;
}

.menu-category .sub_category_list,
.menu-category .category_list {
    padding: 0 !important;
    margin: 0 !important;
}

.menu-category .sub_category_list > li > a,
.menu-category .category_list > li > a {
    display: block !important;
    padding: 8px 6px !important;
    margin: 0 !important;
    color: #7e0127 !important;
    font-weight: 800 !important;
    font-size: inherit !important;
    line-height: 1.5;
    text-indent: 0 !important;
}

.menu-category .sub_category_list > li > a .c_cnt,
.menu-category .category_list > li > a .c_cnt {
    display: none !important;
}

.menu-category .sub_category_list > li > ul,
.menu-category .category_list > li > ul {
    padding: 0 !important;
    margin: 0 !important;
}

.menu-category .sub_category_list > li > ul > li,
.menu-category .category_list > li > ul > li {
    padding: 0 !important;
    margin: 0 !important;
}

.menu-category .sub_category_list > li > ul > li > a,
.menu-category .category_list > li > ul > li > a {
    display: block !important;
    padding: 6px 6px !important;
    margin: 0 !important;
    color: #333333 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    line-height: 1.5;
    text-indent: 0 !important;
}

.menu-category .sub_category_list > li > ul > li > a .c_cnt,
.menu-category .category_list > li > ul > li > a .c_cnt {
    display: inline !important;
    font-size: 11px;
    color: #999999 !important;
    font-weight: normal;
    margin-left: 4px;
}

.menu-category a:hover {
    background: #f1f3f4;
    border-radius: 6px;
}

/* 본문 및 대문 */
#content {
    flex: 1;
    min-width: 0;
    padding: 35px;
    overflow: hidden;
    background: #f5f6f8 !important;
}

#content::after {
    content: "";
    display: block;
    clear: both;
}

.welcome-box {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 30px 0;
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    color: #202124 !important;
}

.welcome-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    border: 0;
    background: #ffffff;
}

.pc-title-img { display: block !important; }
.mobile-title-img { display: none !important; }

.welcome-content {
    position: absolute;
    left: 35px;
    top: 35px;
    z-index: 2;
    line-height: normal;
}

.welcome-label {
    font-size: 12px;
    font-weight: 800;
    color: #777777 !important;
}

.welcome-box h1 {
    margin: 8px 0;
    font-size: 22px;
    color: #202124 !important;
}

.welcome-box p {
    margin: 0;
    color: #777777 !important;
    font-size: 14px;
}

/* 홈화면 글 목록 카드 레이아웃 */
.post-card {
    float: left;
    width: 25%;
    margin: 0;
    padding: 6px;
    background: transparent;
    border: 0;
}

.post-card > a {
    display: block;
    width: 100%;
    height: auto;
    padding: 8px;
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px !important;
    overflow: hidden;
    text-align: center;
}

.post-image {
    width: 100%;
    height: 220px;
    margin: 0 auto 8px;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f3f4 !important;
}

.post-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info h3 {
    margin: 0;
    padding: 2px 0;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    color: #202124 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 상세글 레이아웃 */
.article {
    clear: both;
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 35px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.article-header {
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 26px;
    color: #202124 !important;
    margin: 0 0 10px 0;
}

.article-date {
    font-size: 13px;
    color: #888888 !important;
}

.article-body,
.entry-content,
.tt_article_useless_p_margin {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #202124 !important;
    background-color: #ffffff !important;
}

.entry-content p,
.entry-content div,
.entry-content span {
    display: block;
    color: #202124 !important;
    background-color: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.entry-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
}

/* 댓글 영역 개선 스타일 */
.comments,
.comment-area,
.comment-list {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 30px !important;
    border-top: 1px solid #e5e7eb !important;
    padding-top: 20px !important;
}

.comment-list ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

.comment-list li {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-list .author {
    font-size: 14px;
    font-weight: 700;
    color: #202124 !important;
}

.comment-list .date {
    font-size: 12px;
    color: #999999 !important;
}

.comment-action-btn {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.comment-action-btn a {
    font-size: 12px;
    color: #666666 !important;
    background: #f1f3f4;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
}

.comment-action-btn a:hover {
    background: #e5e7eb;
}

.comment-list .desc {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #333333 !important;
}

/* 대댓글(답글) 영역 스타일 */
.sub-comment-list {
    margin: 12px 0 0 24px !important;
    padding: 12px 0 0 16px !important;
    border-left: 2px solid #e5e7eb;
    background: #fafafa;
    border-radius: 0 6px 6px 0;
}

.sub-comment-list li {
    border-bottom: 1px dashed #e5e7eb;
    padding: 10px 8px;
}

.sub-comment-list li:last-child {
    border-bottom: none;
}

/* 댓글 작성 폼 */
.comment-write {
    margin-top: 20px;
}

.guest-info {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.guest-info input {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dcdfe4;
    border-radius: 6px;
    outline: none;
    font-size: 13px;
}

.write-box {
    display: flex;
    gap: 10px;
}

.write-box textarea {
    flex: 1;
    height: 80px;
    padding: 10px;
    border: 1px solid #dcdfe4;
    border-radius: 6px;
    resize: vertical;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.write-box button {
    width: 90px;
    height: 80px;
    background: #202124 !important;
    color: #ffffff !important;
    border: 0;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

/* 페이지네이션 및 푸터 */
.paging {
    clear: both;
    margin-top: 30px;
    text-align: center;
}

.paging a,
.paging span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #dddddd;
    background: #ffffff !important;
    color: #202124 !important;
    margin: 0 2px;
}

#footer {
    margin-top: auto;
    padding-top: 30px;
}

.footer-inner {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
    font-size: 11px;
    color: #777777 !important;
    text-align: center;
}

.footer-inner strong {
    display: block;
    color: #444444 !important;
    font-size: 12px;
}

/* Responsive */
@media screen and (max-width: 1000px) {
    .post-card { width: 33.333333%; }
}

@media screen and (max-width: 1024px) {
    #menubar_wrapper,
    [data-tistory-react-app="Menubar"] {
        display: none !important;
    }
}

@media screen and (max-width: 700px) {
    #header {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 68px !important;
        padding: 0 16px !important;
        background: #ffffff !important;
        display: flex !important;
    }

    #wrap { padding-top: 0 !important; }
    #container { display: block !important; width: 100% !important; max-width: none !important; }

    #sidebar {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
        border-right: 0 !important;
        border-bottom: 1px solid #e5e7eb;
        padding: 20px 18px !important;
        background: #ffffff !important;
    }

    .pc-title-img { display: none !important; }
    .mobile-title-img { display: block !important; }

    .post-card {
        width: 100% !important;
        float: none !important;
        padding: 4px 0 !important;
    }

    .post-card > a {
        display: flex !important;
        align-items: center !important;
        text-align: left !important;
        padding: 10px !important;
    }

    .post-image {
        width: 100px !important;
        height: 80px !important;
        min-width: 100px !important;
        margin: 0 12px 0 0 !important;
        flex-shrink: 0 !important;
    }

    .post-info h3 {
        font-size: 14px !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .article {
        padding: 20px !important;
        border-radius: 10px !important;
    }

    .guest-info { flex-direction: column; }
    .write-box { flex-direction: column; }
    .write-box button { width: 100%; height: 40px; }
}