@charset "utf-8";
/* [수정] 폰트 웨이트 전체(100~900) 불러오도록 변경 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap');

/* =========================================
   1. Write Form (등록/수정 화면)
   ========================================= */
.keyboard-write-wrap { max-width: 800px; margin: 0 auto; padding: 20px; }
.write-title { font-size: 20px; margin-bottom: 20px; border-bottom: 2px solid #333; padding-bottom: 10px; }
.write-group { margin-bottom: 15px; }
.write-group label { display: block; font-weight: bold; margin-bottom: 5px; color: #555; }
.frm_input.full { width: 100%; box-sizing: border-box; }
.write-row { display: flex; gap: 15px; margin-bottom: 15px; }
.write-line { border: 0; border-top: 1px dashed #ddd; margin: 20px 0; }
.sub-title { font-size: 16px; margin-top: 30px; margin-bottom: 15px; border-left: 4px solid #97c3d1; padding-left: 10px; }
.upload-guide-box { 
    background: #fff; /* 흰색 배경으로 변경 */
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #ddd; /* 회색 테두리로 변경 (깔끔하게) */
}
.upload-guide-box ul { margin: 5px 0 15px 20px; color: #666; font-size: 13px; line-height: 1.6; }
.file-num { display: inline-block; width: 30px; font-weight: bold; color: #333; }
.write-grid-switch { background: #f9f9f9; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.detail-mode .write-group { flex: 1; }
.switch-row { display: flex; gap: 15px; margin-bottom: 10px; }
.btn_confirm { margin-top: 30px; text-align: center; }


/* =========================================
   2. Drawer List (메인 리스트)
   ========================================= */
.list-top-area { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
    padding: 0 20px; 
}

.top-btns { display: flex; gap: 10px; align-items: center; }

.icon-btn {
    display: flex; align-items: center; justify-content: center;
    color: #bbb; text-decoration: none; transition: all 0.2s ease;
    background: transparent; padding: 5px; border-radius: 50%;
    border: none; cursor: pointer; 
}
.icon-btn i { font-size: 22px; }
.icon-btn:hover { color: #333; transform: scale(1.1); background: rgba(0,0,0,0.05); }
.icon-btn.active { color: tomato !important; background: rgba(255, 99, 71, 0.1); transform: rotate(180deg); }

/* 드래그 앤 드롭 스타일 */
.sorting-mode .kb-drawer-card { cursor: move; cursor: grabbing; border: 2px dashed #ffcccb; opacity: 0.9; transform: scale(0.98); }
.sorting-mode .kb-drawer-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.2); transform: scale(1.0); border-color: tomato; }
.sortable-ghost { opacity: 0.4; background-color: #ffe6e6; border: 2px dashed tomato; }
.sortable-drag { cursor: grabbing; opacity: 1; }

/* 리스트 컨테이너 */
.keyboard-drawer-list { 
    display: flex; 
    flex-direction: column; 
    gap: 15px;       
    padding: 0 20px;
    counter-reset: kb-rank; /* [티켓] 카운터 초기화 */
}

/* 카드 스타일 */
.kb-drawer-card { 
    position: relative; 
    width: 100%; 
    height: 250px; 
    background: #f0f0f0; 
    border-radius: 8px; 
    overflow: hidden; 
    cursor: pointer; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: none;
    counter-increment: kb-rank; /* [티켓] 번호 증가 */
}
.kb-drawer-card:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }

.kb-drawer-img { width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform 0.5s ease; display: block; }
.kb-drawer-card:hover .kb-drawer-img { transform: scale(1.03); }

/* 화살표 아이콘 제거 */
.arrow-icon { display: none !important; }

/* =========================================
   [FINAL] 하이브리드 티켓 스타일 (Thin & Large Font)
   ========================================= */

/* 1. 왼쪽 띠 컨테이너 (텍스트용) */
.kb-ticket-no {
    position: absolute;
    left: 0; 
    top: 0;
    width: 60px;      
    height: 100%;
    z-index: 10;
    overflow: hidden; 
    
    /* 배경 그라데이션 */
    background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
    backdrop-filter: blur(5px);
    
    /* 텍스트 정렬 (Flex) */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. 왼쪽 띠 텍스트 디자인 (세로형) */
.kb-ticket-no::before {
    content: attr(data-label);
    
    font-family: 'Montserrat', sans-serif;
    
    /* [수정] 얇고 큰 폰트로 변경 */
    font-weight: 200;       /* Ultra Light ~ Thin 느낌 */
    font-size: 26px;        /* 60px 폭에 꽉 차게 */
    
    color: rgba(255, 255, 255, 0.6);            /* 선명한 흰색 */
    
    text-transform: uppercase; 
    letter-spacing: 2px;    /* 자간 미세 조정 */
    
    /* 세로 회전 (아래 -> 위) */
    transform: rotate(-90deg);
    white-space: nowrap;
    
    opacity: 1;             /* 투명도 제거하여 선명하게 */
    z-index: 2;
}

/* 왼쪽 띠 오른쪽 경계선 (점선) */
.kb-ticket-no::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0; width: 0;
    border-right: 1px dashed rgba(255, 255, 255, 0.3); 
    opacity: 1;
}

/* 3. 뱃지 스타일 (숫자 자동 표시 No.1) */
.kb-badge { 
    position: absolute; top: 12px; 
    left: 75px; 
    background: rgba(0, 0, 0, 0.6); 
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px; 
    border-radius: 20px; 
    
    font-family: 'Montserrat', sans-serif;
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 0.5px;
    
    z-index: 5; 
    backdrop-filter: blur(4px); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* [핵심] 뱃지에 자동 번호 매기기 (No.1, No.2...) */
.kb-badge::before {
    content: "No." counter(kb-rank);
}

/* 4. 텍스트 오버레이 여백 확보 */
.kb-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    display: flex; justify-content: space-between; align-items: flex-end; 
    padding: 15px 20px; box-sizing: border-box;
    padding-left: 75px !important; 
}
.kb-txt-left { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); transform: translateY(0); transition: transform 0.3s ease; }
.kb-drawer-card:hover .kb-txt-left { transform: translateY(-2px); }
.kb-title { font-size: 18px; font-weight: 700; margin: 0 0 3px; line-height: 1.2; letter-spacing: -0.3px; }
.kb-sub { font-size: 13px; font-weight: 300; margin: 0; opacity: 0.9; }


/* =========================================
   3. Detail View (모달 내부)
   ========================================= */
#bo_v_custom { width: 100%; background: #fff; border-radius: 15px; } 
.kb-visual { width: 100%; position: relative; }
.kb-detail-container { display: flex; flex-direction: column; }
.visual-wrapper { width: 100%; position: relative; aspect-ratio: 21 / 9; overflow: hidden; background: #f0f0f0; }
.main-photo { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.visual-actions { position: absolute; bottom: 15px; right: 15px; z-index: 20; display: flex; gap: 6px; }
.v-btn {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    background: rgba(0, 0, 0, 0.4); color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50%; text-decoration: none;
    backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}
.v-btn i { font-size: 16px; }
.v-btn:hover { background: rgba(0, 0, 0, 0.8); color: #fff !important; transform: scale(1.1); }

.visual-overlay { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%); 
    padding: 30px; color: #fff; opacity: 1; transition: opacity 0.3s;
    display: flex; flex-direction: column; justify-content: flex-end; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.5); pointer-events: none; 
}
.visual-wrapper:hover .visual-overlay { opacity: 0; }
.visual-overlay h3 { font-size: 24px; font-weight: 700; margin: 0 0 5px; line-height: 1.2; }
.visual-overlay p { font-size: 14px; font-weight: 300; margin: 0; opacity: 0.9; }

.kb-spec-sheet { padding: 25px 25px 5px 25px; background: #fff; }
.spec-split-container { display: flex; gap: 20px; margin-bottom: 20px; flex-direction: column; }
@media (min-width: 600px) { .spec-split-container { flex-direction: row; } }
.spec-col { flex: 1; }
.spec-section h3 { font-size: 12px; color: #999; text-transform: uppercase; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 10px; }
.compact-list { list-style: none; padding: 0; }
.compact-list li { font-size: 14px; margin-bottom: 8px; display: flex; flex-direction: column; }
.compact-list .label { font-size: 11px; font-weight: bold; color: #888; }
.compact-list .val { font-weight: 500; color: #333; }

.switch-list li { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #f9f9f9; padding-bottom: 6px; margin-bottom: 6px; }
.switch-list .sw-zone { font-size: 13px; color: #666; flex-shrink: 0; margin-right: 10px; padding-top: 2px; }
.switch-list .sw-val { font-size: 13px; font-weight: 600; color: #333; text-align: right; word-break: keep-all; line-height: 1.4; max-width: 70%; }

.spec-footer { margin-top: 20px; padding-top: 0px; margin-bottom: 0; }
.memo { 
    font-size: 13px; 
    color: #666; 
    line-height: 1.6; 
    margin-bottom: 10px; 
    background: #f9f9f9; 
    padding: 15px; 
    border-radius: 8px; 
}

.kb-gallery-area { padding: 20px 25px; background: #f4f6f8; border-top: 1px solid #e0e0e0; margin-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.g-item { border-radius: 8px; overflow: hidden; border: 1px solid #ddd; cursor: pointer; height: 80px; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.g-item:hover img { transform: scale(1.1); }
.kb-gallery-area h3 { font-size: 16px; font-weight: 800; margin-bottom: 20px; color: #222; letter-spacing: 0; }


/* =========================================
   4. Modals & History (히스토리 및 모달)
   ========================================= */
.modal-overlay { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { opacity: 1; }
.detail-modal-wrap { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: 95%; max-width: 550px; max-height: 90vh; background: transparent; z-index: 1001; opacity: 0; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); display: none; }
.detail-modal-wrap.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.detail-content-box { background: #fff; border-radius: 16px; overflow-y: auto; max-height: 90vh; box-shadow: 0 10px 40px rgba(0,0,0,0.3); position: relative; -ms-overflow-style: none; scrollbar-width: none; }
.detail-content-box::-webkit-scrollbar { display: none; }

.img-modal-wrap { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: none; background: rgba(0,0,0,0.95); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.img-modal-wrap.show { opacity: 1; }
.img-modal-content { max-width: 90%; max-height: 90%; border-radius: 4px; box-shadow: 0 0 20px rgba(0,0,0,0.5); transform: scale(0.9); transition: transform 0.3s ease; }
.img-modal-wrap.show .img-modal-content { transform: scale(1); }

/* 네비게이션 버튼 */
.nav-btn { position: absolute; top: 30%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: #fff; border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 24px; cursor: pointer; z-index: 1010; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.nav-btn:hover { background: rgba(255,255,255,0.4); }
.nav-prev { left: -60px; }
.nav-next { right: -60px; }

/* [중요] 900px 이하(태블릿, 모바일)에서는 좌우 이동 화살표 숨기기 */
@media (max-width: 900px) { 
    .nav-btn { display: none !important; } 
}

.modal-close-btn { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.5); color: #fff; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; z-index: 1005; font-size: 18px; line-height: 30px; }
.loader { border: 4px solid #f3f3f3; border-top: 4px solid #333; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 50px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- History Styles --- */
#bo_vc_custom { margin-top: 0; padding: 10px 25px 30px 25px; border-top: none; background: #fff; }
#bo_vc_custom h3 { font-size: 12px; color: #999; text-transform: uppercase; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 10px; }
.history-list { margin-bottom: 20px; }

/* [PC] 히스토리 기본 스타일 (가로 배치) */
.history-item { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed #ddd; font-size: 13px; }
.history-item:last-child { border-bottom: none; }
.h-date { width: 100px; color: #999; font-family: monospace; font-weight: 600; flex-shrink: 0; }
.h-desc { flex: 1; color: #333; padding-left: 15px; border-left: 2px solid #eee; word-break: break-all; }
.h-act { margin-left: 10px; flex-shrink: 0; display: flex; align-items: center; }

/* [수정] 수정 아이콘 (연필) - 조금 작게 설정 */
.btn-edit { 
    color: #999; 
    text-decoration: none; 
    font-size: 13px; /* 18px -> 13px 로 축소 */
    margin-right: 8px; 
    cursor: pointer; 
    transition: color 0.2s;
}
.btn-edit:hover { color: #333; }

/* [수정] 삭제 아이콘 (X) */
.btn-del { 
    color: #d66; 
    text-decoration: none; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    line-height: 1; /* 높이 정렬 보정 */
}
.empty-history { text-align: center; color: #ccc; font-size: 12px; padding: 10px 0; }
.history-write-wrap { background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #eee; }
.h-form-row { display: flex; gap: 10px; }
.h-input-date { width: 120px; text-align: center; border: 1px solid #ddd; padding: 8px; border-radius: 4px; font-size: 13px; }
.h-input-desc { flex: 1; border: 1px solid #ddd; padding: 8px; border-radius: 4px; font-size: 13px; }
.btn-add { background: #333; color: #fff; border: none; padding: 0 20px; border-radius: 4px; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-add:hover { background: #555; }

/* [모바일] 히스토리 스타일 (세로 배치 + 깨짐 방지) */
@media (max-width: 600px) {
    .h-form-row { flex-direction: column; }
    .h-input-date, .h-input-desc, .btn-add { width: 100%; height: 35px; box-sizing: border-box; }
    
    /* [핵심] 모바일에서 강제로 세로 배치 */
    .history-item { display: block; position: relative; padding-top: 35px; }
    .h-date { width: auto; margin-bottom: 5px; color: #97c3d1; font-size: 14px; position: absolute; top: 10px; left: 0; }
    .h-desc { display: block; width: 100%; padding-left: 0; border-left: none; margin-top: 5px; }
    .h-act { position: absolute; right: 0; top: 8px; margin: 0; }
}

/* =========================================
   5. History & Comment (히스토리 스타일)
   ========================================= */

/* 입력 폼 공통 레이아웃 */
.h-form-row {
    display: flex;
    align-items: center;
    gap: 8px;       /* 요소 사이 간격 */
    width: 100%;
}

/* 입력창 & 버튼 높이/폰트 강제 통일 (깨짐 방지 핵심) */
.h-input-date, .h-input-desc, .btn-cmt-submit, .btn-cmt-cancel {
    height: 36px !important;       /* 높이 고정 */
    line-height: normal !important; /* 텍스트 수직 정렬 초기화 */
    box-sizing: border-box !important;
    border-radius: 4px;
    font-family: inherit;          /* 폰트 깨짐 방지 */
    font-size: 13px;
    vertical-align: middle;
}

/* 날짜 입력창 */
.h-input-date { 
    width: 110px; 
    text-align: center; 
    border: 1px solid #ddd; 
    padding: 0 5px;
    color: #555;
    background: #fff;
}

/* 내용 입력창 */
.h-input-desc { 
    flex: 1; 
    border: 1px solid #ddd; 
    padding: 0 10px;
    color: #333;
    background: #fff;
}

/* 버튼 스타일 (등록/수정) */
.btn-cmt-submit {
    border: 0;
    background: #333;
    color: #fff;
    font-weight: 700;
    padding: 0 15px;
    cursor: pointer;
    min-width: 60px;
    transition: background 0.2s;
}
.btn-cmt-submit.edit { background: #97c3d1; } /* 수정 버튼색 (포인트 컬러) */
.btn-cmt-submit:hover { opacity: 0.8; }

/* 취소 버튼 */
.btn-cmt-cancel {
    border: 0;
    background: #ccc;
    color: #fff;
    font-weight: 700;
    padding: 0 15px;
    cursor: pointer;
    min-width: 60px;
}
.btn-cmt-cancel:hover { background: #bbb; }

/* 수정 모드 박스 디자인 */
.edit-mode-box {
    display: none; 
    margin: 10px 0; 
    padding: 15px;           
    border: 1px dashed #97c3d1; 
    border-radius: 8px;      
    background: #f9fcff;     
}

/* 모바일 반응형 (좁은 화면에서 줄바꿈) */
@media (max-width: 600px) {
    .h-form-row { flex-wrap: wrap; }
    .h-input-date { width: 30% !important; }
    .h-input-desc { width: 68% !important; }
    .btn-cmt-submit, .btn-cmt-cancel { flex: 1; margin-top: 5px; }
}