@charset "utf-8";

/* ══════════════════════════════════════════════════════════════════
   contest 스킨 — 공모전 정보 게시판

   목록은 "마감이 언제인가"를 한눈에 읽는 것이 전부다.
   그래서 카드형 그리드가 아니라 왼쪽에 D-day 를 고정한 리스트형으로 짰다
   (그리드는 이미지가 있어야 값을 하는데, 공모전은 포스터가 없는 경우가 많다).
   ══════════════════════════════════════════════════════════════════ */

.ct_wrap { margin-bottom: 30px; }

/* ── 분야 탭 ─────────────────────────────────────────── */
.ct_cate h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ct_cate #bo_cate_ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.ct_cate #bo_cate_ul li { margin: 0; }
.ct_cate #bo_cate_ul a {
    display: inline-block; padding: 7px 14px; border: 1px solid #e0e3e8; border-radius: 999px;
    background: #fff; color: #555; font-size: 13px; text-decoration: none; line-height: 1.2;
}
.ct_cate #bo_cate_ul a:hover { border-color: #b9c0cc; color: #222; }
.ct_cate #bo_cate_ul li.bo_cate_on a,
.ct_cate #bo_cate_ul a.bo_cate_on { border-color: #2b5cff; background: #2b5cff; color: #fff; font-weight: 600; }

/* ── 상단 바 ─────────────────────────────────────────── */
.ct_top {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 0 0 12px; margin-bottom: 12px; border-bottom: 2px solid #22252b;
}
.ct_total { font-size: 14px; color: #555; }
.ct_total strong { color: #2b5cff; font-size: 16px; }
.ct_page { margin-left: 6px; color: #999; font-size: 12px; }

.ct_sort { display: flex; gap: 4px; margin-left: 8px; }
.ct_sort a {
    padding: 5px 12px; border: 1px solid #e0e3e8; border-radius: 4px;
    background: #fff; color: #666; font-size: 12.5px; text-decoration: none;
}
.ct_sort a:hover { border-color: #b9c0cc; color: #222; }
.ct_sort a.ct_sort_on { border-color: #22252b; background: #22252b; color: #fff; font-weight: 600; }

.ct_top .btn_bo_user { margin-left: auto; }
.ct_btn_tx { margin-left: 3px; }

.ct_allchk { margin: 0 0 8px; }

/* ── 목록 ────────────────────────────────────────────── */
.ct_list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #eceef1; }

.ct_item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px 8px; border-bottom: 1px solid #eceef1; position: relative;
}
.ct_item:hover { background: #fafbfd; }
.ct_item_notice { background: #fffdf3; }
.ct_item_now { background: #f2f6ff; }

/* 마감된 건은 흐리게 — 지우기 전 며칠 동안만 남아 있는 상태다 */
.ct_item_end { opacity: .55; }
.ct_item_end:hover { opacity: .8; }

.ct_chk { flex: 0 0 auto; padding-top: 4px; }

/* 포스터 썸네일 — 공모전 포스터는 세로가 긴 것이 많아 4:5 로 잡는다 */
.ct_thumb {
    flex: 0 0 96px; display: block; width: 96px; height: 120px; overflow: hidden;
    border: 1px solid #e6e9ef; border-radius: 6px; background: #f5f6f9;
}
.ct_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct_item:hover .ct_thumb { border-color: #c9d2e2; }

/* 포스터가 없는 공고용 대체 카드 (기관 공고는 텍스트만인 경우가 많다) */
.ct_thumb_none {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; width: 100%; height: 100%;
    background: linear-gradient(160deg, #eef2fb 0%, #e4e9f5 100%); color: #97a1b8;
}
.ct_thumb_none i { font-size: 20px; }
.ct_thumb_none em {
    font-style: normal; font-size: 11px; font-weight: 600; text-align: center;
    padding: 0 6px; line-height: 1.3; word-break: keep-all;
}

/* D-day 열 — 폭을 고정해 세로로 눈이 흐르게 한다 */
.ct_dday_wrap { flex: 0 0 76px; text-align: center; }
.ct_dday_date { display: block; margin-top: 5px; font-size: 11.5px; color: #999; }

.ct_dday_badge {
    display: inline-block; min-width: 62px; padding: 6px 8px; border-radius: 6px;
    font-size: 13px; font-weight: 700; line-height: 1.1; letter-spacing: -.3px;
    background: #eef1f6; color: #5a6272;
}
.ct_dday_hot   { background: #ffe9e9; color: #d92c2c; }   /* D-3 이내 */
.ct_dday_today { background: #d92c2c; color: #fff; }      /* 오늘 마감 */
.ct_dday_soon  { background: #fff3e0; color: #d97706; }   /* 1주 이내 */
.ct_dday_end   { background: #eceef1; color: #9aa1ad; }   /* 마감 */
.ct_dday_none  { background: #eef7ee; color: #3d8b40; }   /* 상시 */

.ct_body { flex: 1 1 auto; min-width: 0; }

.ct_tit_row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.ct_notice_tag {
    padding: 2px 7px; border-radius: 3px; background: #f0b429; color: #fff;
    font-size: 11px; font-weight: 700;
}
.ct_cate_link {
    padding: 2px 8px; border: 1px solid #d8dde6; border-radius: 3px;
    color: #6b7280; font-size: 11.5px; text-decoration: none; white-space: nowrap;
}
.ct_cate_link:hover { border-color: #2b5cff; color: #2b5cff; }

.ct_tit {
    display: inline-block; max-width: 100%; color: #16181d;
    font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none;
}
.ct_tit:hover { color: #2b5cff; text-decoration: underline; }

.ct_meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font-size: 13px; color: #6b7280; }
.ct_meta i { margin-right: 3px; color: #9aa1ad; }
.ct_prize { color: #b45309; font-weight: 500; }
.ct_prize i { color: #d97706; }

.ct_tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ct_tag {
    padding: 3px 9px; border-radius: 999px; background: #f2f4f8;
    color: #6b7280; font-size: 11.5px;
}

.ct_side {
    flex: 0 0 150px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
    font-size: 12px; color: #9aa1ad; text-align: right;
}
.ct_period { color: #555; font-size: 12.5px; }
.ct_more {
    margin-top: 3px; padding: 5px 12px; border: 1px solid #d8dde6; border-radius: 4px;
    color: #444; font-size: 12px; text-decoration: none; white-space: nowrap;
}
.ct_more:hover { border-color: #2b5cff; background: #2b5cff; color: #fff; }

.ct_empty { padding: 70px 20px; text-align: center; color: #9aa1ad; border-bottom: 1px solid #eceef1; }
.ct_empty i { font-size: 40px; color: #dfe3ea; }
.ct_empty p { margin: 12px 0 0; font-size: 15px; }
.ct_empty_hint { font-size: 12.5px; color: #b0b6bf; }
.ct_empty_hint code { padding: 1px 5px; border-radius: 3px; background: #f2f4f8; font-size: 11.5px; }

/* ══════════════════════════════════════════════════════
   상세
   ══════════════════════════════════════════════════════ */

.ct_view { margin-bottom: 30px; }

.ct_v_head {
    padding: 22px 24px; margin-bottom: 18px; border: 1px solid #e6e9ef; border-radius: 10px;
    background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}
.ct_v_head.is-end { background: #f7f8fa; }

.ct_v_head_top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ct_v_cate {
    padding: 3px 10px; border: 1px solid #d8dde6; border-radius: 3px;
    color: #6b7280; font-size: 12px;
}

.ct_v_tit { margin: 0 0 8px; font-size: 22px; font-weight: 700; line-height: 1.35; color: #16181d; }
.ct_v_host { margin: 0 0 16px; font-size: 14px; color: #6b7280; }
.ct_v_host i { margin-right: 4px; color: #9aa1ad; }

.ct_v_key {
    display: flex; flex-wrap: wrap; gap: 10px 30px;
    padding: 14px 0; border-top: 1px solid #eceef1; border-bottom: 1px solid #eceef1;
}
.ct_v_key_item { min-width: 150px; }
.ct_v_key_lb { display: block; margin-bottom: 3px; font-size: 12px; color: #9aa1ad; }
.ct_v_key_item strong { font-size: 14.5px; font-weight: 600; color: #22252b; }

.ct_v_tags { margin-top: 14px; }

/* 상세 포스터 — 원본 비율을 지킨다. 자르면 포스터에 적힌 조건 글자가 날아간다. */
.ct_v_poster { margin: 0 0 20px; text-align: center; }
.ct_v_poster img {
    max-width: 100%; max-height: 780px; height: auto; display: inline-block;
    border: 1px solid #e6e9ef; border-radius: 8px;
}
.ct_v_poster a:hover img { border-color: #2b5cff; }

.ct_v_cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }
.ct_cta_btn {
    display: inline-block; padding: 12px 24px; border-radius: 6px;
    background: #2b5cff; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none;
}
.ct_cta_btn:hover { background: #1f47d4; color: #fff; }
.ct_cta_btn i { margin-left: 4px; font-size: 13px; }
.ct_v_src_name { font-size: 12.5px; color: #9aa1ad; }

.ct_v_ended {
    margin: 16px 0 0; padding: 11px 14px; border-radius: 6px;
    background: #f2f4f8; color: #6b7280; font-size: 13px;
}

.ct_v_conf { color: #9aa1ad !important; font-size: 12px; }

/* 본문 안 정보 표 (자동 등록분과 손으로 쓴 글이 같은 모양이 되도록 플러그인 쪽 HTML 과 짝) */
#bo_v_con .ct_post { font-size: 15px; line-height: 1.75; }
#bo_v_con .ct_summary { margin-bottom: 20px; color: #33373f; }

#bo_v_con .ct_info { width: 100%; margin: 0 0 20px; border-top: 2px solid #22252b; border-collapse: collapse; }
#bo_v_con .ct_info th,
#bo_v_con .ct_info td { padding: 11px 14px; border-bottom: 1px solid #eceef1; text-align: left; font-size: 14px; }
#bo_v_con .ct_info th { width: 120px; background: #fafbfd; color: #6b7280; font-weight: 600; white-space: nowrap; }
#bo_v_con .ct_info td { color: #22252b; }

#bo_v_con .ct_src { margin: 0 0 12px; }
#bo_v_con .ct_src a { color: #2b5cff; font-weight: 600; }
#bo_v_con .ct_src_name { color: #9aa1ad; font-size: 12.5px; }

#bo_v_con .ct_disclaimer {
    margin: 0; padding: 11px 14px; border-left: 3px solid #dfe3ea;
    background: #fafbfd; color: #8b919c; font-size: 12.5px; line-height: 1.6;
}

/* ── 마감 임박 목록 (상세 하단) ───────────────────────── */
.ct_relsec { margin: 34px 0 10px; }
.ct_relsec_h { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.ct_relsec_h a { color: #16181d; text-decoration: none; }
.ct_relsec_h span { color: #9aa1ad; }

.ct_relgrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px; margin: 0; padding: 0; list-style: none;
}
.ct_relgrid li { margin: 0; }
.ct_relgrid a {
    display: block; padding: 14px; border: 1px solid #e6e9ef; border-radius: 8px;
    background: #fff; text-decoration: none; height: 100%;
}
.ct_relgrid a:hover { border-color: #2b5cff; background: #fafbff; }
.ct_relgrid .ct_dday_badge { min-width: 0; padding: 3px 8px; font-size: 11.5px; }
.ct_reltitle {
    display: block; margin: 8px 0 4px; color: #22252b; font-size: 14px; font-weight: 600; line-height: 1.45;
    /* 두 줄로 자른다 — 카드 높이가 들쭉날쭉하면 그리드가 지저분해진다 */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ct_relhost { display: block; color: #9aa1ad; font-size: 12px; }

/* ══════════════════════════════════════════════════════
   관리자 도구 바 (최고관리자에게만 출력된다)

   일반 사용자에게는 아예 렌더링되지 않으므로 눈에 띄는 색을 써도 된다.
   오히려 "지금 관리자 모드로 보고 있다" 가 분명해야 실수가 줄어든다.
   ══════════════════════════════════════════════════════ */
.ct_adminbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
    margin: 26px 0 0; padding: 13px 15px;
    border: 1px dashed #c9b8e8; border-radius: 8px; background: #faf7ff;
}
.ct_adminbar_lb { margin-right: 4px; color: #7c5cc4; font-size: 12px; font-weight: 700; }
.ct_adminbar_lb i { margin-right: 3px; }

.ct_ab_btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 13px; border: 1px solid #ddd6ee; border-radius: 5px;
    background: #fff; color: #4b3a75; font-size: 12.5px; text-decoration: none; line-height: 1.3;
}
.ct_ab_btn:hover { border-color: #7c5cc4; color: #4b3a75; background: #f5f0ff; }

/* 주 동작 — 사용자가 여기를 누르러 온다 */
.ct_ab_main {
    border-color: #6b46c1; background: #6b46c1; color: #fff; font-weight: 600;
}
.ct_ab_main:hover { border-color: #58369f; background: #58369f; color: #fff; }

/* 처리할 것이 남아 있을 때 */
.ct_ab_alert { border-color: #d97706; background: #fffaf2; color: #92500a; }
.ct_ab_alert:hover { border-color: #b45309; background: #fff3e0; color: #92500a; }
.ct_ab_btn b {
    padding: 1px 7px; border-radius: 9px; background: #d97706; color: #fff;
    font-size: 11px; font-weight: 700;
}
.ct_ab_btn em {
    padding: 1px 6px; border-radius: 9px; background: #c02626; color: #fff;
    font-size: 10.5px; font-style: normal; font-weight: 700;
}

.ct_ab_sub { color: #8b83a0; font-size: 12px; }

.ct_adminbar_note { flex: 1 1 100%; margin-top: 2px; color: #9b93ad; font-size: 11.5px; }

@media (max-width: 767px) {
    .ct_adminbar { padding: 11px; gap: 6px; }
    .ct_ab_btn { padding: 6px 10px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════════
   작성·수정
   ══════════════════════════════════════════════════════ */

.ct_write .write_div { margin-bottom: 16px; }
.ct_w_label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #444; }
.ct_w_hint { margin: 6px 0 0; font-size: 12px; color: #9aa1ad; }

.ct_w_dates { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ct_w_dates .frm_input { width: auto; min-width: 150px; }
.ct_w_dates .frm_input.is-off { background: #f2f4f8; color: #b0b6bf; }
.ct_w_tilde { color: #9aa1ad; }
.ct_w_always { margin-left: 6px; }

.ct_w_file .frm_file { display: block; margin-bottom: 6px; }
.ct_w_filenow { display: inline-block; margin-bottom: 8px; font-size: 12.5px; color: #6b7280; }

/* ══════════════════════════════════════════════════════
   모바일 — 리스트가 3열이라 좁은 화면에서는 세로로 접는다
   ══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .ct_top { gap: 8px; }
    .ct_sort { margin-left: 0; order: 3; width: 100%; }
    .ct_top .btn_bo_user { margin-left: auto; }

    .ct_item { flex-wrap: wrap; gap: 10px; padding: 14px 4px; }

    /* D-day 를 가로로 눕혀 제목 위에 올린다 */
    .ct_dday_wrap { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; text-align: left; order: 1; }
    .ct_dday_date { margin-top: 0; }
    .ct_dday_badge { min-width: 0; padding: 4px 9px; font-size: 12px; }

    /* 모바일에서는 썸네일을 좀 줄이고 본문과 나란히 둔다 */
    .ct_thumb { flex: 0 0 72px; width: 72px; height: 90px; order: 3; }
    .ct_body { flex: 1 1 calc(100% - 88px); order: 4; }
    .ct_side {
        flex: 1 1 100%; order: 5; flex-direction: row; align-items: center; justify-content: space-between;
        text-align: left; padding-top: 4px;
    }
    .ct_more { margin-top: 0; }
    .ct_chk { order: 2; padding-top: 0; }

    .ct_tit { font-size: 15px; }
    .ct_meta { font-size: 12.5px; gap: 3px 12px; }

    .ct_v_head { padding: 18px 16px; }
    .ct_v_tit { font-size: 19px; }
    .ct_v_key { gap: 12px 20px; }
    .ct_v_key_item { min-width: 120px; }
    .ct_cta_btn { display: block; text-align: center; }

    #bo_v_con .ct_info th { width: 88px; padding: 9px 10px; font-size: 13px; }
    #bo_v_con .ct_info td { padding: 9px 10px; font-size: 13.5px; }
}
