@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Gaegu:wght@400;700&family=Nanum+Gothic&display=swap');

/* =========================================================
   공통 버튼 & 카테고리 & 페이징
   ========================================================= */
.ui-btn { 
    display: inline-flex !important; justify-content: center; align-items: center; 
    height: 35px !important; line-height: normal !important; padding: 0 20px; vertical-align: middle;
}
.ui-btn.small { height:26px !important; font-size:11px !important; padding: 0 10px; }
.ui-mmb-button { text-align: center; padding-top: 0; margin-bottom: 10px; position: relative; }

#navi_category { text-align: center; padding: 5px 0; }
#navi_category ul { padding: 0; margin: 0; }
#navi_category li { display: inline-block; padding: 0 5px; }
#navi_category a { display: inline-block; padding: 5px 12px; background: #f5f5f5; border-radius: 15px; font-size: 12px; color: #666; transition: 0.2s; }
#navi_category a:hover, #navi_category li.on a { background: var(--point-color); color: #fff; }

.ui-paging { margin-bottom: 5px; padding-bottom: 0; text-align: center; }
.ui-paging a, .ui-paging strong { 
    display: inline-block; 
    min-width: 20px; height: 20px; line-height: 20px; 
    padding: 0 !important; 
    background: transparent !important; 
    border-radius: 0; 
    margin: 0 2px; 
    color: #ccc; 
    text-decoration: none; border: none; vertical-align: middle; 
    font-size: 11px; 
    transition: 0.2s; 
    box-shadow: none !important; 
}
.ui-paging strong { 
    background: transparent !important; 
    color: #555; 
    font-weight: bold; 
    box-shadow: none; 
}
.ui-paging a:hover { 
    background: transparent !important; 
    color: #555; 
}

/* =========================================================
   갤러리 리스트 영역
   ========================================================= */
.gallery-wrapper {
    display: grid !important; 
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 10px !important; 
    padding: 10px 0 !important; max-width: 700px; 
    margin: 0 auto;
}
.gallery-item {
    position: relative; border-radius: 8px; overflow: hidden; background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.2s;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 5px 12px rgba(0,0,0,0.1); }
.item-link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; }

.thumb-container {
    position: relative; width: 100%; padding-top: 142.86%; background-color: #f9f9f9; overflow: hidden;
}
.thumb-container img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}

.text-thumb-box {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 15px;
    box-sizing: border-box; background-color: #fff !important; color: #444; 
    font-size: 11px; line-height: 1.6; text-align: left; 
    word-break: break-all; overflow: hidden; z-index: 2;
}
.text-thumb-box * { max-width: 100% !important; box-sizing: border-box !important; }
.text-thumb-box img, .text-thumb-box video, .text-thumb-box iframe { display: none !important; }
.text-thumb-box p { margin: 0 0 5px 0; }

.cate-badge {
    position: absolute; top: 5px; right: 5px; background: rgba(151, 195, 209, 0.9); color: #fff;
    padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; z-index: 10;
}

.cmt-toolbar {
    display: flex; gap: 5px; padding: 5px 0 5px 5px;
    background: #fdfdfd; border: 1px solid #f5f5f5; 
    border-bottom: none; 
    border-radius: 10px 10px 0 0;
}
.btn-cmt-tool {
    height: 28px; border-radius: 6px; 
    padding: 0 10px; 
    background: #fff; border: 1px solid #ddd;
    color: #555; font-size: 11px; cursor: pointer; 
    display: flex; justify-content: center; align-items: center;
}
.btn-cmt-tool:hover { background: #eee; color: #000; }

.input-comment textarea { 
    border-top-left-radius: 0 !important; 
    border-top-right-radius: 0 !important;
    margin-top: 0 !important; 
    width: 100% !important; height: 60px; border: none; background: #f5f5f5; 
    padding: 15px; box-sizing: border-box; resize: none; font-size: 13px; outline: none;
    border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;
}

.bottom-control-box {
    max-width: 700px; margin: 20px auto 50px auto; 
    display: flex; justify-content: space-between; 
    gap: 5px; padding: 0 5px;
}
.ctrl-btn {
    width: 32px !important; height: 32px !important; 
    border-radius: 5px; 
    background: transparent !important; 
    border: none; 
    color: #ccc !important; 
    display: flex; justify-content: center; align-items: center;
    text-decoration: none; font-size: 14px; transition: 0.2s;
    box-shadow: none !important;
}

.ctrl-btn.write { background: transparent !important; color: #ccc !important; border-color: transparent; } 

.ctrl-btn:hover { 
    background: transparent !important; 
    color: #333 !important; 
    transform: translateY(-2px); 
}

.ctrl-btn.txtggu:hover { background: transparent !important; color: var(--point-color) !important; }
.ctrl-btn.emoticon:hover { background: transparent !important; color: #ff9f43 !important; }

/* =========================================================
   모달 영역 및 입체감 있는 타공 노트 효과 (격자 무늬 배경)
   ========================================================= */

.log-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 9000; overflow-y: auto; backdrop-filter: blur(5px);
}

/* 1. 모달 박스 overflow 변경 및 타공 구멍 세로 위치 재조정 */
.log-modal-content {
    position: relative !important; 
    width: 90%; 
    max-width: 600px; 
    margin: 30px auto !important; 
    background-color: #ffffff !important;
    /* 세로선은 지우고 20px 간격의 은은한 가로줄만 생성 */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px) !important;
    background-size: 100% 20px !important; /* 줄 간격 (필요시 24px, 28px 등으로 조절) */
    border-radius: 12px !important; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
    
    overflow: visible !important; 
    
    padding-top: 20px !important; 
    padding-bottom: 20px !important; 
    padding-left: 28px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
}

/* 타공 구멍 잘림 방지 (bottom: 0px로 수정하여 끝까지 표시) */
.log-modal-content::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 18px !important;
    width: 1px !important;
    border-left: 2px dashed #ccc !important;
    background: none !important;
    z-index: 10 !important;
    opacity: 0.7;
}

.log-modal-content {
    padding-left: 32px !important;
}

.btn-modal-close {
    position: absolute; top: 15px; right: 15px; background: #f0f0f0; border: none; color: #555;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 32px;
    text-align: center; z-index: 200; transition: 0.2s;
}
.btn-modal-close:hover { background: #d3393d; color: #fff; transform: rotate(90deg); }

#log_list .item { margin: 0 !important; padding: 0 !important; width: 100% !important; border: none !important; }
.item-inner { box-shadow: none !important; margin: 0 !important; border: none !important; background: transparent !important; }

.ui-pic {
    display: flex !important;
    flex-direction: column !important;
}

/* 2. 제목(Header) 영역 하단 여백 제거 */
.ui-pic .pic-header { 
    order: 0 !important; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 10px 0 10px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important; 
    margin-right: 0 !important; 
    border: none !important; 
}

/* 3. 스와이퍼 영역 overflow 해제 (테이프 잘림 방지) */
.ui-pic .swiper,
.ui-pic .mySwiper {
    order: 1 !important; 
    overflow: visible !important; /* 자식 요소(테이프)가 영역 밖으로 나와도 보이도록 변경 */
    padding: 0 10px 10px 10px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box;
}

/* 4. 슬라이드 상단 여백 추가 (테이프가 잘리지 않고 들어갈 공간 확보) */
.swiper-slide { 
    text-align: center; 
    background: transparent; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: relative !important; 
    padding-top: 25px !important; /* 테이프 표시 영역 공간 확보 */
    padding-bottom: 0 !important;
}

/* 이미지 스타일 (직각 및 은은한 그림자) */
.mySwiper .swiper-slide img,
.log-modal-content .swiper-slide img,
.img-tape-wrapper img {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* 제목 손글씨(Gaegu) 폰트 강제 적용 및 크기 확대(30px) */
.ui-pic .pic-header .title-area,
.ui-pic .pic-header .title-area *,
.ui-pic .pic-header h3,
.ui-pic .pic-header h3 a,
.ui-pic .pic-header .title { 
    font-family: 'Gaegu', cursive !important;
    font-size: 30px !important; 
    color: #222 !important; 
    font-weight: 700 !important; 
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.ui-pic .pic-header .title-area {
    display: flex !important; 
    flex-direction: row !important; /* 세로 정렬(column)에서 가로 정렬(row)로 변경 */
    align-items: baseline !important; /* 글자 바닥선 기준 정렬 */
    gap: 10px !important; /* 제목과 날짜 사이 간격 */
    padding-left: 0;
}

/* 날짜 여백 정돈 */
.ui-pic .pic-header .date-area,
.ui-pic .pic-header .date-area * { 
    font-family: 'Gaegu', cursive !important;
    font-size: 16px !important; 
    color: #888 !important; 
    font-weight: 400 !important; 
    margin-top: 0 !important; /* 기존 상단 여백 제거 */
    white-space: nowrap; /* 날짜 줄바꿈 방지 */
}

.ui-pic .pic-header a.del, .ui-pic .pic-header a.mod {
    font-size: 11px; color: #999; background: #f9f9f9; padding: 5px 10px; border-radius: 5px;
    text-decoration: none; margin-left:5px; font-family: 'Nanum Gothic', sans-serif;
}
.ui-pic .pic-header a.del:hover { background: #fee; color: #d3393d; }
.ui-pic .pic-header a.mod:hover { background: #eef; color: var(--point-color); }

.pic-data img { max-width: 100% !important; height: auto !important; border-radius: 0 !important; margin: 0 auto; display: block; cursor: zoom-in; }

/* 본문 텍스트: 손글씨(Gaegu) 폰트 적용 */
.pic-data .theme-box {
    order: 2 !important;
    font-family: 'Gaegu', cursive !important;
    font-size: 18px !important; 
    line-height: 1.6; 
    color: #333; 
    text-align: left; 
    height: auto !important; 
    max-height: none !important; 
    overflow: visible !important;
    padding: 0px 10px 20px 10px !important;
    margin-top: -10px !important; 
    white-space: pre-wrap; 
    word-break: break-all; 
    background: transparent; 
    border: none;
    box-sizing: border-box !important;
}

/* =========================================================
   테이프 연출 (사진 상단 고정)
   ========================================================= */

.img-tape-wrapper {
    position: relative !important;
    display: inline-block !important;
    max-width: 100% !important;
}

.img-tape-wrapper::before {
    content: "" !important;
    position: absolute !important;
    top: -8px !important;
    left: -12px !important;
    width: 75px !important;
    height: 22px !important;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(245, 245, 240, 0.5) 50%, 
        rgba(255, 255, 255, 0.7) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-left: 1px dashed rgba(180, 180, 180, 0.6) !important; 
    border-right: 1px dashed rgba(180, 180, 180, 0.6) !important;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15)) !important;
    transform: rotate(-18deg) !important;
    backdrop-filter: blur(1.5px) !important;
    z-index: 100 !important;
    pointer-events: none !important;
}

.img-tape-wrapper::after {
    content: "" !important;
    position: absolute !important;
    top: -8px !important;
    right: -12px !important;
    width: 75px !important;
    height: 22px !important;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(245, 245, 240, 0.5) 50%, 
        rgba(255, 255, 255, 0.7) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-left: 1px dashed rgba(180, 180, 180, 0.6) !important;
    border-right: 1px dashed rgba(180, 180, 180, 0.6) !important;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15)) !important;
    transform: rotate(18deg) !important;
    backdrop-filter: blur(1.5px) !important;
    z-index: 100 !important;
    pointer-events: none !important;
}

/* =========================================================
   댓글, 검색창 및 타일형 그리드 영역
   ========================================================= */

/* 5. 댓글 영역 상하 여백 절반 축소 */
.ui-comment { 
    margin-top: 10px !important; 
    background: transparent !important; 
    padding: 5px 10px 15px 10px !important; /* 하단 패딩 확보 */
    width: 100% !important; 
    box-sizing: border-box; 
}
.item-comment { 
    position: relative; background: rgba(248, 249, 250, 0.85) !important; border: none !important;
    border-radius: 15px !important; padding: 20px 25px !important; margin-bottom: 12px; 
    width: 100% !important; box-sizing: border-box; display: block !important; box-shadow: none !important;
}
.item-comment.item-reply { margin-left: 15px; background: rgba(249, 249, 249, 0.85) !important; width: auto !important; }
.co-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,0.03); }
.co-header strong { font-size: 13px; color: #444; font-weight: bold; }
.co-footer { text-align: right; margin-top: 5px; }
.co-footer .date { font-size: 11px; color: #aaa; margin-right: 5px; }
.co-footer a.btn-cmt { 
    display: inline-block; font-size: 11px; padding: 2px 7px; 
    background: #fff; border: 1px solid #eee; border-radius: 12px; color: #888; text-decoration: none; margin-left: 3px; font-weight: normal; transition: 0.2s;
}
.co-footer a.btn-cmt:hover { background: var(--point-color); color: #fff; border-color: var(--point-color); }
.co-content { font-size: 13px; color: #555; line-height: 1.6; margin: 10px 0 5px 0; padding: 0 2px; }

.comment-img-grid {
    display: grid; gap: 2px;
    width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid #eee;
    margin-top: 5px; margin-bottom: 10px;
}
.comment-img-grid img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; transition: 0.2s; }
.comment-img-grid img:hover { filter: brightness(0.95); }

.grid-1 { grid-template-columns: 1fr; aspect-ratio: 16/9; }
.grid-2 { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; height: 200px !important; }
.grid-3 { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: 1fr !important; height: 200px !important; } 
.grid-3 img:nth-child(1), .grid-3 img:nth-child(2), .grid-3 img:nth-child(3) { grid-area: auto !important; height: 100% !important; }
.grid-4 { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; grid-template-rows: 1fr !important; height: 200px !important; aspect-ratio: auto !important; }

.item-comment-form-box { display: none; margin-top: 10px; padding: 0; }
.btn_confirm .ui-comment-submit {
    background: var(--point-color); 
    color: #333;
    border: 1px solid rgba(0,0,0,0.1); 
    padding: 0 25px; height: 35px;
    border-radius: 20px; cursor: pointer; font-weight: bold; font-size: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05); display: inline-flex; align-items: center; justify-content: center;
}
.btn-cmt-toggle {
    display: block; width: 100%; padding: 10px 0; text-align: center;
    background: rgba(253, 253, 253, 0.8); border: 1px dashed #ddd; border-radius: 10px;
    color: #888; font-size: 12px; cursor: pointer; transition: 0.2s; margin-top: 5px; 
}
.btn-cmt-toggle:hover { background: #f5f5f5; color: #555; border-style: solid; }

#img-lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 99999;
    justify-content: center; align-items: center; flex-direction: column;
}
#img-lightbox .lightbox-swiper { width: 100%; height: 100%; }
#img-lightbox .swiper-slide { display: flex; justify-content: center; align-items: center; height: 100%; }
#img-lightbox img { max-width: 90%; max-height: 90vh; object-fit: contain; }
#img-lightbox .close-btn {
    position: absolute; top: 30px; right: 30px; color: #fff; font-size: 50px;
    cursor: pointer; opacity: 0.8; transition: 0.2s; line-height: 1; z-index: 100000;
}
#img-lightbox .close-btn:hover { opacity: 1; transform: scale(1.1); color: #d3393d; }

@keyframes modalUp {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
@keyframes modalDown {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(50px); opacity: 0; }
}
@keyframes bgFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bgFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }

.log-modal-overlay.open-anim { animation: bgFadeIn 0.4s forwards; }
.log-modal-overlay.close-anim { animation: bgFadeOut 0.3s forwards; }

.log-modal-content.open-anim { animation: modalUp 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.log-modal-content.close-anim { animation: modalDown 0.3s ease-in forwards; }

.log-modal-overlay { cursor: pointer; }
.log-modal-content { cursor: default; }

.item-overlay {
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    padding: 20px; 
    box-sizing: border-box; 
    z-index: 5;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 40%);
}

.item-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0; 
    z-index: -1; 
    transition: opacity 0.8s ease;
}

.gallery-item:hover .item-overlay::before { opacity: 1; }

.ov-title { 
    color: #fff; 
    font-size: 13px; 
    font-weight: bold; 
    margin-bottom: 5px; 
    line-height: 1.5; 
    display: block;
    max-height: 1.5em;
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis; 
    transition: max-height 2s ease;
}

.ov-date { 
    color: rgba(255,255,255,0.7); 
    font-size: 9px; 
    opacity: 0.7; 
    transition: opacity 0.5s ease;

}

.gallery-item:hover .ov-title {
    white-space: normal; 
    text-overflow: clip; 
    max-height: 200px; 
}

.gallery-item:hover .ov-date { opacity: 1; }
.gallery-item .item-link::after { display: none !important; }

#img-lightbox .swiper-slide::after,
#img-lightbox .swiper-slide:hover::after {
    content: none !important;
    display: none !important;
}

.sch_simple_box form {
    display: flex;
    align-items: center;
    background: transparent !important; 
    border: none !important; 
    box-shadow: none !important;
    padding: 0;
    gap: 5px;
}

.sch_simple_box form:hover, 
.sch_simple_box form:focus-within {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.sch_input {
    border: 1px solid rgba(0,0,0,0.08); 
    background: rgba(255, 255, 255, 0.5);
    height: 30px; 
    width: 110px; 
    font-size: 12px;
    color: #555;
    outline: none;
    border-radius: 15px;
    padding: 0 12px; 
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.sch_input:hover, .sch_input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0,0,0,0.2);
    width: 130px; 
}
.sch_input::placeholder { color: #bbb; }

.sch_btn {
    width: 32px; height: 32px;
    background: transparent !important;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #ccc; 
    display: flex; justify-content: center; align-items: center;
    font-size: 14px;
    transition: 0.2s;
}

.sch_btn:hover {
    color: #333;
    transform: translateY(-2px);
}

.tile-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px 0 !important;
}

.tile-wrapper .item-box {
    flex-grow: 1 !important;
    height: 250px !important;
    margin: 0 !important;
    border-radius: 12px;
    overflow: hidden; 
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background-color: #eee;     
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.tile-wrapper .tile-span-3 { flex-basis: 20%; } 
.tile-wrapper .tile-span-4 { flex-basis: 30%; } 
.tile-wrapper .tile-span-6 { flex-basis: 50%; flex-grow: 2; } 
.tile-wrapper .tile-span-8 { flex-basis: 70%; flex-grow: 3; } 

.tile-wrapper .thumb-container {
    width: 100%; height: 100% !important;
    padding-top: 0 !important;
    background: transparent !important;
    overflow: hidden;
}

.gallery-wrapper .thumb-container img,
.tile-wrapper .thumb-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    display: block;
    transform: scale(1.02); 
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden; 
    -webkit-font-smoothing: subpixel-antialiased;
    transition: transform 0.5s ease;
}

.gallery-wrapper .item-box:hover .thumb-container img,
.tile-wrapper .item-box:hover .thumb-container img {
    transform: scale(1.1);
}

.tile-wrapper .item-overlay { opacity: 0 !important; transition: opacity 0.3s ease; }
.tile-wrapper .item-box:hover .item-overlay { opacity: 1 !important; }
.tile-wrapper .cate-badge { opacity: 0 !important; transition: opacity 0.3s ease; }
.tile-wrapper .item-box:hover .cate-badge { opacity: 1 !important; }

.theme-box img {
    display: inline-block !important; 
    margin: 0 !important;             
    vertical-align: middle !important;
    border-radius: 0 !important;      
    cursor: default !important; 
    pointer-events: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
}

.gallery-wrapper .thumb-container,
.tile-wrapper .thumb-container {
    background-color: #ffffff !important; 
    border: 1px solid #eee;
    box-sizing: border-box;
}

/* 모바일 및 반응형 미디어 쿼리 정돈 */
@media all and (max-width: 1024px) {
    .gallery-wrapper { grid-template-columns: repeat(2, 1fr) !important; padding: 0 10px !important;}
    .bottom-control-box { padding: 0 20px; } 
    .log-modal-content { 
        width: 95%; 
        margin: 40px auto; 
        padding-left: 24px !important;
    }
    .log-modal-content::before { left: 8px !important; }
    .tile-wrapper .item-box { 
        height: 200px !important; 
        flex-basis: 48% !important; 
    }
}

@media all and (max-width: 400px) {
    .sch_input { width: 80px; }
    .sch_input:hover, .sch_input:focus { width: 100px; }
}
/* =========================================================
   노트 더미(스택) 목록 - 겹쳐진 노트 중 한 장을 뽑는 느낌
   위치(left)는 list.skin.php 의 스크립트가 계산합니다.
   ========================================================= */
.note-stack {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 24px;
}
.note-stack .note-row { position: relative; }

.note-card {
    position: absolute;
    top: 0; left: 0;
    width: var(--card-w, 190px);
    height: var(--card-h, 266px);
    transform: rotate(var(--rot, 0deg));
    transform-origin: 50% 100%;
    transition: transform 0.38s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 종이 한 장: 모달과 같은 줄노트 + 점선 여백 */
.note-link {
    display: block;
    position: relative;
    width: 100%; height: 100%;
    background-color: #fff;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
    background-size: 100% 14px;
    border-radius: 8px;
    box-shadow: -7px 0 14px -7px rgba(0,0,0,0.30), 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none !important;
    color: #333;
    overflow: hidden;
    transition: box-shadow 0.38s ease;
}
.note-link::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 30px;
    border-left: 2px dashed #ccc;
    opacity: 0.7;
}

/* 왼쪽 여백에 세로로 쓴 제목 (겹쳐 있어도 보이는 부분) */
.note-spine {
    position: absolute;
    top: 12px; bottom: 12px; left: 5px;
    width: 22px;
    writing-mode: vertical-rl;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Gaegu', 'Nanum Pen Script', cursive;
    line-height: 22px;
}
.note-spine b { font-size: 16px; font-weight: 700; color: #222; }
.note-spine small { font-size: 12px; color: #999; margin-top: 8px; }

/* 붙여놓은 사진 */
.note-photo {
    position: absolute;
    top: 14px; bottom: 14px; left: 40px; right: 12px;
    display: block;
}
.note-photo img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.note-photo img.is-empty { object-fit: contain; opacity: 0.25; box-shadow: none; }
.note-photo .textggu-preview-content {
    width: 100%; height: 100%;
    overflow: hidden;
    font-size: 11px; line-height: 14px;
    color: #444;
    word-break: break-all;
}
.note-photo .textggu-preview-content img { display: none; }

/* 마스킹 테이프 */
.note-tape {
    position: absolute;
    top: -7px; left: -12px;
    width: 52px; height: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(245,245,240,0.55) 50%, rgba(255,255,255,0.75) 100%);
    border-left: 1px dashed rgba(180,180,180,0.6);
    border-right: 1px dashed rgba(180,180,180,0.6);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
    transform: rotate(-18deg);
    pointer-events: none;
}
.note-card.is-text .note-tape { display: none; }

/* 뽑기: 마우스 올림 / 키보드 포커스 / 터치 첫 탭 */
@media (hover: hover) {
    .note-row .note-card:hover { transform: translateY(calc(var(--lift, 58px) * -1)) rotate(0deg); }
    .note-row .note-card:hover ~ .note-card { transform: translateX(var(--shift, 60px)) rotate(var(--rot, 0deg)); }
    .note-row .note-card:hover .note-link { box-shadow: -7px 0 14px -7px rgba(0,0,0,0.30), 0 10px 22px rgba(0,0,0,0.18); }
    /* 올라간 만큼 아래쪽에 투명한 영역을 둬서 커서가 빠져 떨리는 현상 방지 */
    .note-row .note-card:hover::after {
        content: "";
        position: absolute;
        left: 0; right: 0;
        top: 100%;
        height: var(--lift, 58px);
    }
}
.note-row .note-card.is-pulled,
.note-row .note-card:focus-within { transform: translateY(calc(var(--lift, 58px) * -1)) rotate(0deg); }
.note-row .note-card.is-pulled ~ .note-card,
.note-row .note-card:focus-within ~ .note-card { transform: translateX(var(--shift, 60px)) rotate(var(--rot, 0deg)); }
.note-link:focus-visible { outline: 2px solid var(--point-color, #97c3d1); outline-offset: 2px; }

/* =========================================================
   모달 좌우에 앞/뒤 글 종이 미리보기
   ========================================================= */
.log-modal-overlay .log-modal-content { z-index: 2; }

.post-nav-btn.peek-paper {
    --half: min(300px, 47.5vw);          /* 모달 너비의 절반 */
    display: block !important;
    position: fixed;
    top: 50%;
    width: 300px; height: 420px;
    padding: 0; margin: 0;
    background: none; border: 0;
    font-size: inherit; color: inherit; text-shadow: none;
    z-index: 1;
    cursor: pointer;
    filter: brightness(0.86);
    transition: transform 0.38s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
}
/* 모달 밑으로 60px 정도 깔려 있도록 배치 */
.post-nav-prev.peek-paper { left: calc(50% - var(--half) + 60px - 300px); right: auto; transform: translateY(-50%) rotate(-4deg); }
.post-nav-next.peek-paper { left: calc(50% + var(--half) - 60px);         right: auto; transform: translateY(-50%) rotate(3deg); }
.post-nav-prev.peek-paper:hover,
.post-nav-prev.peek-paper:focus-visible { transform: translateY(-50%) translateX(-18px) rotate(-6deg); filter: none; color: inherit; text-shadow: none; }
.post-nav-next.peek-paper:hover,
.post-nav-next.peek-paper:focus-visible { transform: translateY(-50%) translateX(18px) rotate(5deg); filter: none; color: inherit; text-shadow: none; }

.peek-sheet {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: block;
    background-color: #fff;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
    background-size: 100% 20px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    overflow: hidden;
    text-align: left;
}
.peek-sheet::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 18px;
    border-left: 2px dashed #ccc;
    opacity: 0.7;
}
.peek-photo {
    position: absolute;
    top: 24px; bottom: 62px; left: 36px; right: 22px;
    display: block;
}
.peek-photo img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.peek-photo.is-text .textggu-preview-content {
    height: 100%; overflow: hidden;
    font-size: 13px; line-height: 20px; color: #444;
    word-break: break-all;
}
.peek-photo.is-text .textggu-preview-content img { display: none; }
.peek-title {
    position: absolute;
    left: 36px; right: 22px; bottom: 18px;
    font-family: 'Gaegu', cursive;
    font-size: 24px; font-weight: 700; line-height: 1.2;
    color: #222;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 오른쪽 종이는 보이는 쪽(오른쪽)에 제목 정렬, 좁은 화면에선 가장자리만 살짝 */
.post-nav-next .peek-title { text-align: right; }
@media all and (max-width: 700px) {
    .peek-title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .note-card, .note-link, .post-nav-btn.peek-paper { transition: none; }
}
