:root body {
    --freewel-page-gutter: 22px;
}

:root body .sub-visual.sub-visual :is(.breadcrumb-container, .page-title),
:root body .sub-nav-container.orgsite-subnav .sub-nav {
    box-sizing: border-box;
    width: min(1060px, calc(100% - 2 * var(--freewel-page-gutter))) !important;
    max-width: 1060px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}

:root body .sub-visual .breadcrumb-wrap {
    inset-block-start: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding-inline: 0;
}

:root body .sub-visual .breadcrumb-container {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    text-align: left;
}

:root body .sub-visual {
    height: 225px;
}

:root body .sub-visual-img {
    position: relative;
    height: 100%;
}

:root body .sub-visual-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(20 28 25 / 45%), rgb(20 28 25 / 72%) 35% 65%, rgb(20 28 25 / 45%));
    pointer-events: none;
}

:root body .sub-visual.sub-visual .page-title {
    position: static;
    transform: none !important;
    opacity: 1;
    animation: none;
    color: #fff;
    font-size: clamp(30px, 3.5vw, 48px);
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
    -webkit-text-stroke: 2px #17211e;
    paint-order: stroke fill;
    text-shadow: 0 2px 5px rgb(0 0 0 / 50%);
}

:root body .sub-visual nav.breadcrumb[aria-label="현재 위치"] {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-width: none;
    margin: 0;
    padding: 7px 12px;
    background: rgb(0 0 0 / 45%);
    color: #f2eee9;
    opacity: 1;
    transform: none;
    animation: none;
}

:root body .sub-visual .breadcrumb a[aria-label="홈"] .home-icon {
    display: inline-flex;
}

:root body .sub-visual nav.breadcrumb[aria-label="현재 위치"] > a[aria-label="홈"]::before {
    display: none;
}

:root body .sub-visual .breadcrumb a[aria-current="page"] {
    color: #fff;
    font-weight: 700;
}

:root body :is(.content-page-wrap, .history-wrapper, .managed-history-shell, .org-diagram-page) {
    box-sizing: border-box;
    width: min(1000px, calc(100% - 2 * var(--freewel-page-gutter))) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}

:root body .sub-nav-container.orgsite-subnav {
    margin-bottom: 16px !important;
}

:root body .sub-visual + .sub-nav-container.orgsite-subnav {
    margin-top: -12px !important;
}

:root body .freewel-intro-subnav + .content-page-wrap {
    padding-top: clamp(24px, 4vw, 48px) !important;
}

:root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) {
    background-color: #f0e3ce;
}

:root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"])::after {
    background: none;
}

:root body .main-slider .slider-image-container img[src$="/46f0b54dfeda7e1fc9ae.png"] {
    object-fit: contain;
    object-position: center;
    transform: none !important;
}

:root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) .slider-text-overlay {
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    width: calc(100% - 32px);
    transform: translate(-50%, -50%);
    text-align: center;
}

:root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) :is(.slider-title, .slider-subtitle) {
    color: #223b24;
    text-shadow: 0 1px 3px #fff1db, 0 0 14px #fff1db;
}

:root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) .slider-title {
    margin: 0;
    font-size: clamp(28px, 4.2vw, 58px);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.26;
    white-space: pre-line;
    -webkit-text-stroke: 1.4px rgb(255 244 222 / 90%);
    paint-order: stroke fill;
}

:root body .main-slider.freewel-hero-ready .slider-image-container .slider-title:has(.freewel-title-line) {
    white-space: normal;
}

:root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) .slider-subtitle {
    margin: 14px 0 0;
    font-size: clamp(13px, 1.5vw, 19px);
    font-weight: 600;
    line-height: 1.4;
}

/* Set the first painted state before the deferred entrance script runs. */
html.freewel-motion :is(.content-page-wrap, main.history-wrapper, main.org-diagram-page, .board-container, .gimpoil-news-panel):not(.freewel-entry-ready) {
    opacity: 0;
}

html.freewel-motion .main-slider:not(.freewel-hero-ready) :is(.slider-title, .slider-subtitle) {
    opacity: 0;
}

html.freewel-motion .main-slider .slider-item :is(.slider-title, .slider-subtitle) {
    transition: none;
}

.freewel-title-line {
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    .freewel-entry-ready {
        animation: freewel-page-reveal .65s cubic-bezier(.2, .65, .3, 1) both;
    }

    .freewel-hero-ready .is-copy-active .freewel-title-line {
        animation: freewel-hero-reveal .7s cubic-bezier(.2, .65, .3, 1) var(--freewel-line-delay) both;
    }

    .freewel-hero-ready .is-copy-active .slider-subtitle {
        animation: freewel-hero-reveal .65s ease-out .36s both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .freewel-entry-ready,
    .freewel-hero-ready .is-copy-active .freewel-title-line,
    .mainBody .freewel-hero-ready .is-copy-active .slider-subtitle {
        animation: freewel-fade-in .4s ease-out both !important;
    }
}

@keyframes freewel-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes freewel-page-reveal {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes freewel-hero-reveal {
    from { opacity: 0; transform: translateY(-18px); }
    to { opacity: 1; transform: translateY(0); }
}

.freewel-footer-facilities ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.freewel-footer-facilities a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .2em;
}

:root .popup-modal.freewel-residence-popup {
    height: auto !important;
    max-width: min(calc(var(--freewel-popup-width, 630px) / 1.05), 100vw, calc((100dvh - 36px) * 814 / 846)) !important;
    max-height: none !important;
    border-radius: 0;
    cursor: auto;
}

.freewel-residence-popup .popup-content {
    max-height: none;
}

.freewel-residence-popup .popup-content img {
    width: 100%;
}

.freewel-popup-actions.popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border: 0;
    background: #111;
    color: #fff;
}

.freewel-popup-actions button {
    width: auto;
    min-height: 36px;
    height: auto;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.freewel-popup-actions .popup-close {
    margin-inline-start: auto;
}

.freewel-popup-actions button:is(:hover, :focus-visible) {
    transform: none;
    text-decoration: underline;
}

.freewel-submenu,.freewel-mega-panel { display:none; }
@media (min-width:1101px) {
 :root body .header .main-nav:has(.freewel-mega-panel) { position:relative; }
 :root body .header.header .freewel-main-menu { display:grid!important; grid-template-columns:repeat(var(--freewel-menu-count),minmax(0,1fr)); gap:0!important; align-items:stretch; }
 :root body .header.header .freewel-main-menu>li { position:static; display:flex; align-items:center; min-width:0; }
 :root body .header .freewel-main-menu>li:is(:hover,:focus-within)>a { color:#a84b16; text-decoration:underline; text-underline-offset:.45em; text-decoration-thickness:2px; }
 :root body .header .freewel-menu-parent::after { content:""; width:.42em; height:.42em; margin-inline-start:.6em; border-inline-end:2px solid currentColor; border-block-end:2px solid currentColor; transform:translateY(-2px) rotate(45deg); }
 :root body .header .freewel-mega-panel { box-sizing:border-box; position:absolute; top:100%; left:0; right:0; z-index:1100; grid-template-columns:repeat(var(--freewel-menu-count),minmax(0,1fr)); align-items:stretch; gap:0; width:100%; padding:20px 0 24px; margin:0; background:#fff; border-top:2px solid #d57137; border-bottom:1px solid #e6e8e3; border-radius:0 0 6px 6px; box-shadow:0 10px 24px rgb(28 39 33 / 10%); }
 :root body .header .main-nav:not([data-dismissed]):is(:hover,:focus-within)>.freewel-mega-panel { display:grid; }
 :root body .header .freewel-mega-group { box-sizing:border-box; min-width:0; padding:0 12px; }
 :root body .header .freewel-mega-group+.freewel-mega-group { border-inline-start:1px solid #edf0eb; }
 :root body .header .freewel-mega-group.is-empty { visibility:hidden; }
 :root body .header .freewel-mega-group ul { display:grid; gap:2px; padding:0; margin:0; list-style:none; }
 :root body .header .freewel-mega-group a { display:flex; align-items:center; justify-content:center; min-height:44px; padding:9px 8px; color:#293830; font-size:16px; font-weight:500; line-height:1.5; word-break:keep-all; text-align:center; text-decoration:none; }
 :root body .header .freewel-mega-group a:is(:hover,:focus-visible,[aria-current="page"]) { color:#8b3e16; background:#fff4eb; }
 :root body .header .freewel-mega-group a:focus-visible { outline:2px solid #a84b16; outline-offset:-2px; }
}

@media (max-width: 480px) {
    :root .popup-modal.freewel-residence-popup {
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }
}

@media (max-width: 768px) {
    :root body {
        --freewel-page-gutter: 16px;
    }

    :root body .main-slider:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) {
        aspect-ratio: 842 / 595;
        height: auto;
    }

    :root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) .slider-text-overlay {
        box-sizing: border-box;
        padding: 0;
    }

    :root body .main-slider .slider-image-container:has(img[src$="/46f0b54dfeda7e1fc9ae.png"]) .slider-title {
        font-size: clamp(25px, 7vw, 39px);
    }

    :root body .sub-visual {
        height: 150px;
    }

    :root body .sub-visual-img::after {
        background: rgb(20 28 25 / 67%);
    }

    :root body #menuOverlay .overlay-menu > ul > li > ul {
        margin-inline-start: 8px;
        border-inline-start: 2px solid #efc09f;
    }

    :root body .sub-nav-container.orgsite-subnav {
        margin-bottom: 12px !important;
    }

    :root body .sub-nav-container.orgsite-subnav .sub-nav > ul {
        display: flex !important;
        flex-wrap: wrap;
    }

    :root body .sub-nav-container.orgsite-subnav .sub-nav > ul > li {
        flex: 1 0 30% !important;
    }
}

.institution-editorial.editorial-freewel .editorial-prose:has(> .editorial-person-group) {
    width: 100%;
}

.institution-editorial.editorial-freewel .editorial-person-group {
    min-width: 0;
    padding-top: 14px;
    border-top: 2px solid #a1b4a6;
}

.institution-editorial.editorial-freewel .editorial-person-group h3 {
    margin-bottom: 4px;
    color: #356348;
    font-size: clamp(17px, 2vw, 21px);
}

.institution-editorial.editorial-freewel .editorial-person-group li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding-block: 12px;
    line-height: 1.5;
}

.institution-editorial.editorial-freewel .editorial-person-group li strong {
    font-size: 1.02em;
    font-weight: 750;
}

.institution-editorial.editorial-freewel .editorial-person-group li span {
    color: #49594f;
    font-size: .88em;
}

@media (min-width: 650px) {
    .institution-editorial.editorial-freewel .editorial-prose:has(> .editorial-person-group + .editorial-person-group) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: clamp(20px, 3vw, 36px);
        align-items: start;
    }

    .institution-editorial.editorial-freewel .editorial-prose:has(> .editorial-person-group) > h2 {
        grid-column: 1 / -1;
    }

    .institution-editorial.editorial-freewel .editorial-person-group + .editorial-person-group {
        margin-top: 0;
    }

    .institution-editorial.editorial-freewel .editorial-person-group:only-of-type ul {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(20px, 3vw, 36px);
    }
}

body .org-diagram-page .org-diagram-body {
    padding: 0;
    border-color: #dbe5dd;
    border-radius: 14px;
    background: #fff;
}

body .org-diagram-page .org-chart-bar {
    background: #729281;
}

@media (max-width: 767px) {
    body .org-diagram-page .org-diagram-image {
        width: 720px;
        min-width: 720px !important;
    }

    body .org-diagram-page .org-diagram-body::before {
        content: "조직도를 좌우로 움직여 전체 내용을 확인하세요.";
        display: block;
        position: sticky;
        left: 0;
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        padding: 12px 16px;
        border-bottom: 1px solid #dbe5dd;
        color: #49594f;
        font-size: 13px;
    }
}
