/* ==========================================================================
   스톤칩닥터 - 게시판(목록 보조 / 글쓰기 / 보기) 스타일
   post.css 를 기반으로 하며, 홈에어코리아 디자인 토큰을 그대로 사용합니다.
   ========================================================================== */

/* ---------- 목록 상단 안내 박스 ---------- */
.cg_board_guide {
    width: 100%;
    background: var(--cg-tint, #EEF4FC);
    border-radius: 1vw;
    padding: 2.2vw 2.6vw;
    box-sizing: border-box;
    margin-bottom: 2.4vw;
}

.cg_board_guide_tt {
    font-size: var(--size-21);
    font-weight: 700;
    color: #1D5BBF;
    margin-bottom: 1vw;
}

.cg_board_guide ul li {
    position: relative;
    padding-left: 1vw;
    font-size: var(--size-17);
    font-weight: 400;
    line-height: 1.8;
    color: #5A5A5A;
    word-break: keep-all;
}

.cg_board_guide ul li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #1D5BBF;
    font-weight: 700;
}

.cg_board_guide a {
    color: #1D5BBF;
    font-weight: 700;
    text-decoration: underline;
}

/* ==========================================================================
   글쓰기 폼
   ========================================================================== */
.cg_form_wrap,
.cg_view_wrap {
    width: 62vw;
    margin: 0 auto;
    padding: 6vw 0 12vw;
    box-sizing: border-box;
    font-family: 'Pretendard Variable', 'Suit', sans-serif;
    color: #191414;
}

.cg_form_error {
    background: #FDECEC;
    border: 1px solid #F5C2C2;
    color: #BE0211;
    border-radius: 0.6vw;
    padding: 1.2vw 1.6vw;
    font-size: var(--size-17);
    font-weight: 500;
    margin-bottom: 2vw;
}

.cg_form_sec {
    border: 1px solid #E1E1E1;
    border-radius: 1.2vw;
    padding: 2.6vw 2.8vw;
    box-sizing: border-box;
    margin-bottom: 1.6vw;
}

.cg_form_sec_tt {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    font-size: var(--size-24);
    font-weight: 700;
    margin-bottom: 2vw;
    padding-bottom: 1.2vw;
    border-bottom: 1px solid #EFEFEF;
}

.cg_form_sec_tt span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.2vw;
    height: 2.2vw;
    border-radius: 50%;
    background: #1D5BBF;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: var(--size-14);
    font-weight: 600;
}

.cg_field {
    width: 100%;
    margin-bottom: 1.5vw;
}

.cg_field:last-child {
    margin-bottom: 0;
}

.cg_field_row {
    display: flex;
    gap: 1.2vw;
}

.cg_field_row .cg_field {
    flex: 1;
}

.cg_label {
    display: block;
    font-size: var(--size-17);
    font-weight: 600;
    margin-bottom: 0.6vw;
    color: #191414;
}

.cg_label i {
    color: #BE0211;
    font-style: normal;
    margin-left: 0.2vw;
}

.cg_label em {
    font-style: normal;
    font-size: var(--size-14);
    font-weight: 400;
    color: #9E9E9E;
    margin-left: 0.4vw;
}

.cg_input,
.cg_textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #DDD;
    border-radius: 0.5vw;
    padding: 0 1.1vw;
    height: 3.4vw;
    font-size: var(--size-17);
    font-family: inherit;
    font-weight: 400;
    color: #191414;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.cg_textarea {
    height: auto;
    padding: 1.1vw;
    line-height: 1.7;
    resize: vertical;
    min-height: 9vw;
}

.cg_input::placeholder,
.cg_textarea::placeholder {
    color: #B5B5B5;
}

.cg_input:focus,
.cg_textarea:focus {
    border-color: #1D5BBF;
    box-shadow: 0 0 0 3px rgba(29, 91, 191, 0.1);
}

.cg_help {
    margin-top: 0.6vw;
    font-size: var(--size-15);
    color: #8A8A8A;
    line-height: 1.6;
    word-break: keep-all;
}

/* 라디오 */
.cg_radio_row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6vw;
}

.cg_radio {
    cursor: pointer;
}

.cg_radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cg_radio span {
    display: inline-flex;
    align-items: center;
    height: 2.9vw;
    padding: 0 1.6vw;
    border: 1px solid #DDD;
    border-radius: 50vw;
    font-size: var(--size-17);
    font-weight: 500;
    color: #6B6B6B;
    transition: all 0.2s;
}

.cg_radio input:checked + span {
    background: #1D5BBF;
    border-color: #1D5BBF;
    color: #fff;
    font-weight: 600;
}

/* 파일 */
.cg_file_row {
    display: flex;
    gap: 0.8vw;
}

.cg_file {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.7vw;
    border: 1px dashed #CFCFCF;
    border-radius: 0.5vw;
    padding: 0.9vw 1vw;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s;
    min-width: 0;
}

.cg_file:hover {
    border-color: #1D5BBF;
    background: #F7FBFD;
}

.cg_file.is_selected {
    border-style: solid;
    border-color: #1D5BBF;
    background: #F0F7FB;
}

.cg_file input[type=file] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.cg_file_btn {
    flex: none;
    height: 2.1vw;
    padding: 0 0.9vw;
    border-radius: 0.35vw;
    background: #EEF4FC;
    color: #1D5BBF;
    font-size: var(--size-14);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.cg_file_name {
    font-size: var(--size-15);
    color: #8A8A8A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cg_file.is_selected .cg_file_name {
    color: #191414;
}

/* 동의 */
.cg_agree_box {
    border: 1px solid #EFEFEF;
    background: #FAFAFA;
    border-radius: 0.6vw;
    padding: 1.6vw;
    height: 12vw;
    overflow-y: auto;
    font-size: var(--size-15);
    line-height: 1.8;
    color: #6B6B6B;
    margin-bottom: 1.4vw;
    box-sizing: border-box;
}

.cg_check {
    display: flex;
    align-items: center;
    gap: 0.6vw;
    cursor: pointer;
    margin-bottom: 0.7vw;
    font-size: var(--size-17);
    font-weight: 500;
}

.cg_check input {
    width: 1.1vw;
    height: 1.1vw;
    accent-color: #1D5BBF;
    cursor: pointer;
}

.cg_check i {
    color: #BE0211;
    font-style: normal;
}

/* 버튼 영역 */
.cg_form_btns {
    display: flex;
    justify-content: center;
    gap: 1vw;
    margin-top: 2.6vw;
}

.cg_form_btns .cg_btn {
    min-width: 12vw;
    font-family: inherit;
}

.cg_form_btns button.cg_btn {
    border: none;
}

/* ==========================================================================
   게시글 보기
   ========================================================================== */
.cg_done_box {
    background: #EEF4FC;
    border-radius: 1.2vw;
    padding: 2.6vw;
    text-align: center;
    margin-bottom: 2.4vw;
}

.cg_done_ico {
    width: 3.4vw;
    height: 3.4vw;
    margin: 0 auto 1vw;
    border-radius: 50%;
    background: #1D5BBF;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--size-24);
    font-weight: 700;
}

.cg_done_tt {
    font-size: var(--size-26);
    font-weight: 800;
    margin-bottom: 0.7vw;
}

.cg_done_box p {
    font-size: var(--size-17);
    line-height: 1.75;
    color: #5A5A5A;
}

.cg_view_head {
    border-top: 2px solid #191414;
    border-bottom: 1px solid #E1E1E1;
    padding: 2.2vw 0;
}

.cg_view_ca {
    display: inline-flex;
    align-items: center;
    height: 2vw;
    padding: 0 1vw;
    border-radius: 50vw;
    background: #EEF4FC;
    color: #1D5BBF;
    font-size: var(--size-15);
    font-weight: 700;
    margin-bottom: 0.8vw;
}

.cg_view_tt {
    font-size: var(--size-28);
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 1vw;
    word-break: keep-all;
}

.cg_view_meta {
    display: flex;
    align-items: center;
    gap: 1.2vw;
    font-size: var(--size-16);
    color: #8A8A8A;
}

.cg_view_meta span {
    position: relative;
}

.cg_view_meta span + span::before {
    content: '';
    position: absolute;
    left: -0.6vw;
    top: 20%;
    height: 60%;
    width: 1px;
    background: #DDD;
}

.cg_view_secret {
    color: #1D5BBF !important;
    font-weight: 600;
}

.cg_view_spec {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-bottom: 1px solid #E1E1E1;
}

.cg_spec_item {
    display: flex;
    align-items: flex-start;
    gap: 1vw;
    padding: 1.1vw 0.4vw;
    border-bottom: 1px solid #F3F3F3;
    font-size: var(--size-17);
}

.cg_spec_k {
    flex: none;
    width: 8vw;
    color: #8A8A8A;
    font-weight: 500;
}

.cg_spec_v {
    font-weight: 500;
    word-break: break-all;
}

.cg_view_content,
.cg_view_files,
.cg_reply_wrap {
    padding: 2.4vw 0;
    border-bottom: 1px solid #E1E1E1;
}

.cg_view_content_tt {
    font-size: var(--size-20);
    font-weight: 700;
    margin-bottom: 1.2vw;
}

.cg_view_content_tt span {
    color: #1D5BBF;
}

.cg_view_content_body {
    font-size: var(--size-18);
    line-height: 1.85;
    color: #3A3A3A;
    word-break: break-word;
}

.cg_view_files_row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9vw;
}

.cg_view_file {
    width: 13vw;
    height: 9.5vw;
    border-radius: 0.7vw;
    overflow: hidden;
    background: #F0F0F0;
    display: block;
}

.cg_view_file img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.cg_view_file:hover img {
    transform: scale(1.06);
}

.cg_reply {
    background: #F7FBFD;
    border-left: 3px solid #1D5BBF;
    border-radius: 0 0.7vw 0.7vw 0;
    padding: 1.6vw 1.8vw;
    margin-bottom: 0.9vw;
}

.cg_reply_head {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    margin-bottom: 0.8vw;
}

.cg_reply_badge {
    display: inline-flex;
    align-items: center;
    height: 1.9vw;
    padding: 0 0.9vw;
    border-radius: 50vw;
    background: #1D5BBF;
    color: #fff;
    font-size: var(--size-14);
    font-weight: 600;
}

.cg_reply_date {
    font-size: var(--size-15);
    color: #8A8A8A;
}

.cg_reply_body {
    font-size: var(--size-17);
    line-height: 1.8;
    color: #3A3A3A;
}

.cg_reply_empty {
    background: #FAFAFA;
    border-left-color: #DDD;
    text-align: center;
}

.cg_reply_empty p {
    font-size: var(--size-17);
    line-height: 1.8;
    color: #8A8A8A;
}

.cg_reply_empty a {
    color: #1D5BBF;
    font-weight: 700;
}

/* 비밀글 잠금 */
.cg_lock_box {
    text-align: center;
    border: 1px solid #E1E1E1;
    border-radius: 1.2vw;
    padding: 5vw 3vw;
}

.cg_lock_ico {
    width: 2.6vw;
    margin: 0 auto 1.4vw;
}

.cg_lock_ico img {
    width: 100%;
    display: block;
}

.cg_lock_tt {
    font-size: var(--size-26);
    font-weight: 700;
    margin-bottom: 0.6vw;
}

.cg_lock_desc {
    font-size: var(--size-17);
    color: #8A8A8A;
}

.cg_lock_form {
    display: flex;
    justify-content: center;
    gap: 0.7vw;
    margin-top: 2vw;
}

.cg_lock_form .cg_input {
    width: 18vw;
}

.cg_lock_form button.cg_btn {
    border: none;
    font-family: inherit;
}

/* ==========================================================================
   반응형
   ========================================================================== */
@media screen and (max-width: 979px) {
    .cg_form_wrap,
    .cg_view_wrap {
        width: 88vw;
    }
}

@media screen and (max-width: 599px) {
    .cg_form_wrap,
    .cg_view_wrap {
        width: 92vw;
        padding: 12vw 0 24vw;
    }

    /* 목록 안내 */
    .cg_board_guide {
        border-radius: 3vw;
        padding: 6vw 5vw;
        margin-bottom: 7vw;
    }

    .cg_board_guide_tt {
        font-size: 4.3vw;
        margin-bottom: 3vw;
    }

    .cg_board_guide ul li {
        font-size: 3.4vw;
        padding-left: 3vw;
    }

    /* 폼 */
    .cg_form_error {
        border-radius: 2vw;
        padding: 4vw;
        font-size: 3.5vw;
        margin-bottom: 5vw;
    }

    .cg_form_sec {
        border-radius: 3.2vw;
        padding: 7vw 5.5vw;
        margin-bottom: 4vw;
    }

    .cg_form_sec_tt {
        font-size: 4.8vw;
        gap: 2.4vw;
        margin-bottom: 5.5vw;
        padding-bottom: 3.5vw;
    }

    .cg_form_sec_tt span {
        width: 7vw;
        height: 7vw;
        font-size: 3.2vw;
    }

    .cg_field {
        margin-bottom: 4.5vw;
    }

    .cg_field_row {
        flex-direction: column;
        gap: 0;
    }

    .cg_label {
        font-size: 3.6vw;
        margin-bottom: 2vw;
    }

    .cg_label em {
        font-size: 3vw;
        margin-left: 1.2vw;
    }

    .cg_input,
    .cg_textarea {
        height: 12vw;
        padding: 0 3.6vw;
        border-radius: 1.8vw;
        font-size: 3.7vw;
    }

    .cg_textarea {
        height: auto;
        min-height: 32vw;
        padding: 3.6vw;
    }

    .cg_help {
        font-size: 3.1vw;
        margin-top: 2vw;
    }

    .cg_radio_row {
        gap: 2vw;
    }

    .cg_radio span {
        height: 10vw;
        padding: 0 5vw;
        font-size: 3.5vw;
    }

    .cg_file_row {
        flex-direction: column;
        gap: 2.4vw;
    }

    .cg_file {
        border-radius: 1.8vw;
        padding: 3.2vw 3.4vw;
        gap: 2.6vw;
    }

    .cg_file_btn {
        height: 7.4vw;
        padding: 0 3.2vw;
        border-radius: 1.2vw;
        font-size: 3.1vw;
    }

    .cg_file_name {
        font-size: 3.2vw;
    }

    .cg_agree_box {
        border-radius: 2vw;
        padding: 4.5vw;
        height: 44vw;
        font-size: 3.2vw;
        margin-bottom: 4.5vw;
    }

    .cg_check {
        font-size: 3.6vw;
        gap: 2.2vw;
        margin-bottom: 2.8vw;
        align-items: flex-start;
    }

    .cg_check input {
        width: 4.4vw;
        height: 4.4vw;
        margin-top: 0.4vw;
        flex: none;
    }

    .cg_form_btns {
        flex-direction: column;
        gap: 2.5vw;
        margin-top: 8vw;
    }

    .cg_form_btns .cg_btn {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* 보기 */
    .cg_done_box {
        border-radius: 3.2vw;
        padding: 8vw 5vw;
        margin-bottom: 7vw;
    }

    .cg_done_ico {
        width: 12vw;
        height: 12vw;
        font-size: 5.4vw;
        margin-bottom: 3.5vw;
    }

    .cg_done_tt {
        font-size: 5.2vw;
        margin-bottom: 2.5vw;
    }

    .cg_done_box p {
        font-size: 3.5vw;
    }

    .cg_view_head {
        padding: 6vw 0;
    }

    .cg_view_ca {
        height: 6.6vw;
        padding: 0 3.4vw;
        font-size: 3.1vw;
        margin-bottom: 3vw;
    }

    .cg_view_tt {
        font-size: 5.4vw;
        margin-bottom: 3vw;
    }

    .cg_view_meta {
        font-size: 3.2vw;
        gap: 4vw;
        flex-wrap: wrap;
    }

    .cg_view_meta span + span::before {
        left: -2vw;
    }

    .cg_view_spec {
        grid-template-columns: 1fr;
    }

    .cg_spec_item {
        padding: 3.4vw 1vw;
        font-size: 3.5vw;
        gap: 3vw;
    }

    .cg_spec_k {
        width: 24vw;
    }

    .cg_view_content,
    .cg_view_files,
    .cg_reply_wrap {
        padding: 7vw 0;
    }

    .cg_view_content_tt {
        font-size: 4.3vw;
        margin-bottom: 3.5vw;
    }

    .cg_view_content_body {
        font-size: 3.7vw;
    }

    .cg_view_files_row {
        gap: 2.5vw;
    }

    .cg_view_file {
        width: 28vw;
        height: 21vw;
        border-radius: 2vw;
    }

    .cg_reply {
        border-radius: 0 2vw 2vw 0;
        padding: 5vw 4.5vw;
        margin-bottom: 3vw;
    }

    .cg_reply_badge {
        height: 6.4vw;
        padding: 0 3vw;
        font-size: 3vw;
    }

    .cg_reply_date {
        font-size: 3.1vw;
    }

    .cg_reply_body,
    .cg_reply_empty p {
        font-size: 3.5vw;
    }

    .cg_lock_box {
        border-radius: 3.2vw;
        padding: 14vw 6vw;
    }

    .cg_lock_ico {
        width: 9vw;
        margin-bottom: 4.5vw;
    }

    .cg_lock_tt {
        font-size: 5vw;
        margin-bottom: 2.5vw;
    }

    .cg_lock_desc {
        font-size: 3.5vw;
    }

    .cg_lock_form {
        flex-direction: column;
        gap: 2.5vw;
        margin-top: 7vw;
    }

    .cg_lock_form .cg_input {
        width: 100%;
    }
}
