/*
 * Compatibility layer between the Golden front foundation and GnuBoard skins.
 * Load this after the stock and skin stylesheets.
 */

html,
body {
    min-width: 320px;
}

#hd,
#wrapper,
#ft {
    min-width: 0;
}

#hd {
    background: transparent;
}

#container {
    position: relative;
    float: none;
    width: 100%;
    min-height: 500px;
    height: auto !important;
    margin: 0;
    font-size: inherit;
    zoom: normal;
}

#container::after {
    display: table;
    clear: both;
    content: '';
}

#container_title {
    width: 90%;
    max-width: var(--layoutwidth);
    height: auto;
    margin: 3rem auto 0;
    padding: 0;
    color: var(--deep-gray);
    background: transparent;
    font-size: 1.5rem;
    line-height: 1.4;
}

#container_title span {
    display: block;
    margin: 0;
    line-height: inherit;
}

.ext-main {
    min-height: 1px;
}

/* Restore a visible keyboard focus after the legacy reset stylesheet. */
:is(a, button, input, select, textarea, summary, [tabindex], [contenteditable="true"]):focus-visible {
    outline: 0.1875rem solid #0b57d0;
    outline-offset: 0.1875rem;
    box-shadow: 0 0 0 0.375rem #fff;
}

/* Preserve readable stock functional screens inside the full-width shell. */
.mbskin,
.register,
#sch_result,
#faq_wrap,
#new_sch,
#new_list,
#current_connect,
#ctt {
    max-width: var(--layoutwidth);
}

/*
 * Member screens keep the current GnuBoard form and validation markup.
 * This layer only connects those screens to the Golden layout tokens.
 */
.mbskin {
    width: min(90%, 520px);
    margin: 5rem auto 8rem;
}

.register {
    width: min(90%, 1100px);
    margin: 5rem auto 8rem;
}

.mbskin_box,
.register .register_form_inner {
    border-color: #e2e2e2;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.06);
}

.mbskin .frm_input:focus,
.register .frm_input:focus,
.register textarea:focus,
#bo_w .frm_input:focus,
#bo_w textarea:focus {
    border-color: var(--pointcolor);
    box-shadow: 0 0 0 3px rgba(var(--pointcolor-rgb), 0.12);
}

.mbskin .btn_submit,
.register .btn_submit,
#bo_w .btn_submit {
    border-radius: 0.35rem;
    background: var(--pointcolor);
}

.mbskin .btn_submit:hover,
.register .btn_submit:hover,
#bo_w .btn_submit:hover {
    filter: brightness(0.92);
}

/* Stock board skins remain updateable; Golden supplies only their shared frame. */
:where(#bo_list, #bo_gall, #bo_v, #bo_w) {
    width: 90% !important;
    max-width: var(--layoutwidth) !important;
    margin: var(--borderMargin) !important;
}

:where(#bo_list, #bo_gall, #bo_v, #bo_w) :where(.frm_input, textarea, select) {
    max-width: 100%;
}

:where(#bo_list, #bo_gall) .tbl_head01 thead th,
:where(#bo_list, #bo_gall) .tbl_head01 tbody td {
    border-color: #e5e5e5;
}

:where(#bo_list, #bo_gall) .pg_current {
    border-color: var(--pointcolor);
    background: var(--pointcolor);
}

#bo_v_title,
#bo_v_info,
#bo_v_con,
#bo_w .write_div {
    border-color: #e5e5e5;
}

/* Both bundled editors must fit the responsive write form. */
#bo_w :where(.cheditor-container, .se2_inputarea, iframe),
.qa_write :where(.cheditor-container, .se2_inputarea, iframe) {
    max-width: 100%;
}

/* Stock skins sometimes expect images to remain inline with labels or text. */
.tbl_wrap img,
.sv_wrap img,
.profile_img img,
.chk_box img {
    display: inline-block;
}

@media (max-width: 768px) {
    #container {
        min-height: 300px;
    }

    #container_title {
        margin-top: 2rem;
        font-size: 1.8rem;
    }

    .mbskin,
    .register,
    :where(#bo_list, #bo_gall, #bo_v, #bo_w) {
        margin-top: 3rem !important;
        margin-bottom: 5rem !important;
    }
}

/* AOS가 준비되지 않으면 효과보다 콘텐츠 표시를 우선한다. */
html:not(.ext-aos-ready) [data-aos],
html [data-aos]:focus-within {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html [data-aos] {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        clip-path: none !important;
        filter: none !important;
        animation: none !important;
        transition: none !important;
    }
}
