@charset "utf-8";
@import url('style.css');


.upskin-version {
    font-size: 0.8em;
    font-family: var(--f-pre);
    color: var(--content-font-color);
    opacity: 0.2;
    margin-right: 5px;
}

/* 요소 */
input[type="text"] {
    width: 200px;
}

.pg_wrap .pg_end:before {
    font-family: var(--f-pre);
    font-size: 12px !important;
}

.cha-ui-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.cha-ui-btn .ui-btn {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* 카테고리 */
nav.cha-board-category {
    grid-column: 2;
    display: flex;
    gap: 5px;
    margin: 0;
    justify-content: center;
    align-items: center;
}

nav.cha-board-category a {
    display: inline-flex;
    border-radius: 10px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 0;
    min-width: 30px;
    max-width: 80px;
    padding: 5px 8px;
    text-align: center;
    font-size: 0.9em;
    font-family: var(--content-font-family);
    align-items: center;
    justify-content: center;
    line-height: 1;
}

nav.cha-board-category a:hover {
    background: var(--btn-accent-bg);
    color: var(--btn-accent-text);
}

nav.cha-board-category #bo_cate_on {
    background: var(--btn-accent-bg);
    color: var(--btn-accent-text);
}

.cha-board-category li::marker {
    content: none;
}

/* 리스트 시작 */
.ra0_cha_board {
    box-sizing: border-box;
    padding-top: 20px;
    margin-top: 20px !important;
}

.cha-guide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    margin-top: 0;
    gap: 10px;
}

.cha-guide-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cha-board-skin {
    padding: 30px 0px;
}

/* 기존 flex 코드를 주석처리하고 grid로 변경 */
.list_row {
    display: grid;
    grid-template-columns: repeat(var(--desktop-cols), 1fr);
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cha_card {
    position: relative;
    overflow: hidden;
    border: 2px groove var(--black);
    border-radius: 15px;
    filter: brightness(0.76) drop-shadow(1px 3px 2px rgb(from var(--black) r g b / 30%));
    transition: filter 0.38s ease, box-shadow 0.38s ease;
}

.cha_card:hover {
    filter: brightness(1.04) drop-shadow(1px 3px 4px rgb(from var(--black) r g b / 48%));
}

/* 편집 모드일 때 카드에 점선 테두리와 배경색 변경 */
.cha_list.editing .cha_card {
    border: 2px dotted var(--warning-color);
    filter: contrast(0.7) drop-shadow(1px 3px 0px rgb(from var(--black) r g b / 70%));
    transition: background-color 0.3s, border 0.3s;
}

#edit-order-btn {
    border-radius: 5px;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    font-size: 12px;
    font-family: var(--f-pre);
    border: 2px groove var(--btn-secondary-bg);
    padding: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
}

#edit-order-btn:hover {
    transform: scale(1.02);
}

/* 편집 모드일 때 편집 버튼 강조 */
#edit-order-btn.editing {
    background-color: var(--warning-color);
    color: var(--white);
}

a.card_link {
    cursor: pointer;
}

.list_box img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    position: relative;
    bottom: 0;
}

.info_overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 108px;
    padding: 28px 12px 13px;
    box-sizing: border-box;
    background: linear-gradient(
        0deg,
        rgb(from var(--black) r g b / 0.94) 0%,
        rgb(from var(--black) r g b / 0.78) 48%,
        rgb(from var(--black) r g b / 0.30) 76%,
        transparent 100%
    );
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    pointer-events: none;
}

.ov-scenario {
    max-width: 100%;
    overflow: hidden;
    color: var(--white);
    font-family: "Noto Sans KR", sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.2px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 5px rgb(from var(--black) r g b / 92%);
}

/* 목록에서는 한글 이름을 항상 크게 표시 */
.ov-kname {
    margin: 0;
    font-family: "Noto Sans KR", sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.8px;
    text-align: center;
    text-shadow: 0 0 5px var(--black), 0 0 15px var(--gray-700), 0 0 35px var(--gray-500), 0 0 40px var(--gray-500);
}

/* 영문명은 한글 이름 아래에 작게 표시 */
.ov-cname {
    margin: 3px 0 0;
    font-family: "Noto Sans KR", sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0.7px;
    text-align: center;
    text-shadow: 0 1px 5px rgb(from var(--black) r g b / 90%);
}

/* 영문명 칸에 일본어·중국어가 입력된 경우의 보조 폰트 */
.ov-cname.cjk-ja {
    font-family: "Zen Antique", serif;
}

.ov-cname.cjk-zh {
    font-family: "Noto Serif SC", serif;
}

@media (max-width: 768px) {
    .list_row {
        grid-template-columns: repeat(var(--mobile-cols), 1fr);
        gap: 6px;
    }

    .cha_list_controls {
        display: none;
    }

    .info_overlay {
        height: 84px;
        padding: 22px 6px 8px;
        gap: 2px;
    }

    .ov-scenario {
        font-size: 8px;
    }

    .ov-kname {
        font-size: 19px;
        letter-spacing: -0.5px;
    }

    .ov-cname {
        font-size: 9px;
        letter-spacing: 0.6px;
    }
}

@media (max-width: 768px) {
    .cha-guide {
        grid-template-columns: 1fr auto;
        row-gap: 10px;
    }

    nav.cha-board-category {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .cha-guide-actions {
        grid-column: 2;
        grid-row: 1;
    }
}

/* 우측 상단 버튼: 호버해도 기존 색상 유지 */
.cha-ui-btn .ui-btn:hover {
    filter: none !important;
}

/* 글쓰기 버튼 */
.cha-ui-btn .ui-btn.point:hover {
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
}

/* 정렬 버튼 */
.cha-ui-btn #edit-order-btn:hover {
    background: var(--btn-secondary-bg) !important;
    color: var(--btn-secondary-text) !important;
}

/* 설정 버튼 */
.cha-ui-btn .ui-btn.admin:hover {
    background: var(--btn-accent-bg) !important;
    color: var(--btn-accent-text) !important;
}

/* =========================================================
   목록 카드 이름 표시 우선순위
   - 한글 이름: 항상 크게
   - 영문 이름: 보조 크기
   기존 캐시나 공통 CSS가 남아 있어도 크기가 뒤집히지 않도록
   새 전용 클래스와 높은 우선순위를 함께 사용합니다.
   ========================================================= */
.info_overlay .ov-name-primary {
    display: block;
    width: 100%;
    margin: 1px 0 0 !important;
    color: var(--white) !important;
    font-family: "Noto Sans KR", sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    letter-spacing: -1px !important;
    text-align: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow:
        0 0 5px var(--black),
        0 0 15px var(--gray-700),
        0 0 35px var(--gray-500),
        0 0 40px var(--gray-500) !important;
}

.info_overlay .ov-name-secondary {
    display: block;
    width: 100%;
    margin: 0 0 1px !important;
    color: var(--white) !important;
    font-family: "Noto Sans KR", sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.6px !important;
    text-align: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 5px rgb(from var(--black) r g b / 90%) !important;
}

.info_overlay .ov-name-secondary.cjk-ja {
    font-family: "Zen Antique", serif !important;
}

.info_overlay .ov-name-secondary.cjk-zh {
    font-family: "Noto Serif SC", serif !important;
}

@media (max-width: 768px) {
    .info_overlay .ov-name-primary {
        font-size: 18px !important;
        letter-spacing: -0.7px !important;
    }

    .info_overlay .ov-name-secondary {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
    }
}
