/* ============================================
 * header
 * ============================================ */

:root {
    --header-height: 118px;
}

header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--color-bg-base);
}

header.header--overlay {
    background: transparent;
    transition: background .3s ease;
}

header.header--overlay .header-utility,
header.header--overlay > nav {
    background: transparent;
    border-color: transparent;
    transition: background .3s ease, border-color .3s ease;
}


header.header--overlay .header-utility-wrap > li > a,
header.header--overlay .header-nav-wrap > ul > li,
header.header--overlay .gnb-menu-link,
header.header--overlay .header-gnb-actions {
    color: var(--color-text-inverse);
    transition: color .3s ease;
}


/* is-scrolled(스크롤 시) + 메가메뉴 hover로 열렸을 때(is-open) 둘 다 기본(서브페이지) 헤더처럼 흰 배경/기본 텍스트로 전환 — 메가메뉴 패널이 항상 흰 배경이라 그 위 nav도 맞춰줘야 함 */
header.header--overlay.is-scrolled,
header.header--overlay:has(.header-gnb-option.is-open) {
    background: var(--color-bg-base);
}


header.header--overlay.is-scrolled .header-utility,
header.header--overlay.is-scrolled > nav,
header.header--overlay:has(.header-gnb-option.is-open) .header-utility,
header.header--overlay:has(.header-gnb-option.is-open) > nav {
    border-color: var(--color-border-base);
}

header.header--overlay.is-scrolled .header-utility-wrap > li > a,
header.header--overlay.is-scrolled .header-nav-wrap > ul > li,
header.header--overlay.is-scrolled .gnb-menu-link,
header.header--overlay.is-scrolled .header-gnb-actions,
header.header--overlay:has(.header-gnb-option.is-open) .header-utility-wrap > li > a,
header.header--overlay:has(.header-gnb-option.is-open) .header-nav-wrap > ul > li,
header.header--overlay:has(.header-gnb-option.is-open) .gnb-menu-link,
header.header--overlay:has(.header-gnb-option.is-open) .header-gnb-actions {
    color: var(--color-black);
}


/* utility bar — border는 풀영역, 콘텐츠만 wrap으로 container-max-width 제한 */
.header-utility {
    width: 100%;
    background: var(--color-bg-base);
    border-bottom: 1px solid var(--color-border-base);
}

.header-utility-wrap {
    max-width: var(--container-max-width);
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    margin: 0 auto;
}

.header-utility-wrap > li {
    height: 40px;
    display: flex;
    align-items: center;
    font-weight: var(--font-weight-medium);
    font-size: 15px;
    color: var(--color-black);
}

/* gnb (로고 + 메뉴) — border는 풀영역, 콘텐츠만 wrap으로 container-max-width 제한 */
header > nav {
    width: 100%;
    background: var(--color-bg-base);
    border-bottom: 1px solid var(--color-border-base);
}

.header-nav-wrap {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.header-nav-wrap > .logo {
    width: auto;
    height: 44px;
}

.header-nav-wrap > .logo >img {
    height: 100%;
}

.header-nav-wrap > ul {
    display: flex;
    align-items: center;
}

.header-nav-wrap > ul > li {
    padding: 22px 35px;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-label-lg);
    line-height: normal;
    color: var(--color-black);
}

/* 외부링크(mn_type=link2) 표시 아이콘 — 텍스트 옆 인라인 배치 */
.gnb-menu-link,
.gnb-option-item > a,
.gnb-option-depth3 li a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gnb-menu-link .icon-menu-external-link,
.gnb-option-item > a .icon-menu-external-link,
.gnb-option-depth3 li a .icon-menu-external-link {
    width: 14px;
    height: 14px;
}


.header-gnb-actions {
    display: flex;
    align-items: center;
    gap: 34px;
}

.header-gnb-actions button,
.header-gnb-actions .btn-gnb-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    color: inherit;   /* a 태그라 a{color:black} 무력화 — 헤더 텍스트색(search 버튼과 동일) 상속 */
    cursor: pointer;
}

.btn-search-toggle .icon,
.btn-gnb-toggle .icon {
    width: 32px;
    height: 32px;
}

/* gnb-option (메가메뉴) — GNB hover 시 .is-open 붙으면 header 바로 아래에 오버레이로 표시 (콘텐츠 안 밀림) */
.header-gnb-option {
    display: none;
    /* display: flex; */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
}

.header-gnb-option.is-open {
    display: flex;
    min-height: calc((100vh - 152px) * 0.80);
    background: var(--color-white);
    box-shadow: 0 10px 16px -6px rgba(0, 0, 0, 0.2);
}

.header-gnb-option > aside {
    width: 384px;
    padding: 50px;
    background: var(--color-secondary);
    color: var(--color-white);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 38px;
}




/* theme.css의 .icon(width/height:24px)이 common.css보다 나중에 로드되어 같은 우선순위론 덮어써버림 → .icon과 묶어 우선순위를 높여 168px가 항상 이기도록 함 */
.icon.aside-symbol {
    width: 253px;
    height: 253px;
    margin: 0 auto;
    color: rgba(var(--color-bg-symbol-rgb), 0.8);
}

.aside-txt > p {
    margin-bottom: 8px;
    font-size: var(--font-size-heading-sm);
    line-height: var(--line-height-heading-sm);
}

.aside-txt > ul {
    font-size: var(--font-size-body-md);
    line-height: var(--line-height-body-md);
    color: rgba(var(--color-white-rgb), 0.4)
}

.gnb-option-sitemap-btn {
    display: none;
}

.gnb-option-panel {
    display: flex;
    flex: 1;
}

.gnb-option-col {
    width: 100%;
    padding: 0 30px;
    background: var(--color-white);
    border-right: 1px solid var(--color-border-header);
}

.gnb-option-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 63px;
    padding: 18px 0;
    font-weight: var(--font-weight-semibold);
    font-size: 20px;
    color: var(--color-primary);
}

.gnb-option-title .icon-plus {
    display: none;
}

.gnb-option-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 63px;
    padding: 18px 0;
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: var(--color-black);
}

.gnb-option-depth3-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.gnb-option-depth3 {
    display: none;
    width: 100%;
    flex-basis: 100%;
}

.gnb-option-item.has-children.open .gnb-option-depth3 {
    display: block;
}

/* depth3 토글 열렸을 때 아이콘 plus→minus로 교체 (JS는 .open 클래스만 토글, 아이콘 전환은 CSS 변수 오버라이드로 처리) */
.gnb-option-item.open .gnb-option-depth3-toggle .icon-plus {
    --asset-icon-url: url("/assets/icons/minus.svg");
}

.gnb-option-depth3 li {
    height: 48px;
    display: flex;
    align-items: center;
}

.gnb-option-depth3 li a {
    font-weight: var(--font-weight-regular);
    font-size: 16px;
    color: var(--color-text-body);
}

/* ============================================
 * sub layout
 * ============================================ */
.sub_layout {
    margin-top: var(--header-height);
}

.sub-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 260px;
    width: 100%;
    background-position: center center;  /* medicine_sub.png는 건물이 정중앙이라 중앙 기준으로 변경 */
    background-repeat: no-repeat;
    background-size: cover;              /* 배너 영역 꽉 채우고 알아서 조절 */
}

/* 배너 이미지가 없을 때 — 게시판/카드와 같은 crest 빈 상태로 대체한다.
 * .empty-img-* 는 img를 div로 갈아끼우는 방식이라 background-image 인 배너엔 못 쓰고,
 * 같은 마스크 아이콘만 가져와 가상요소로 깐다 */
.sub-banner--empty {
    position: relative;
    background-color: var(--color-gray100);
}

.sub-banner--empty::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 64%;
    aspect-ratio: 1 / 1;
    background: var(--color-text-muted);
    -webkit-mask: url("/assets/icons/empty-crest.svg") center / contain no-repeat;
    mask: url("/assets/icons/empty-crest.svg") center / contain no-repeat;
}

/* 제목이 흰색이라 밝은 빈 배경에선 안 보인다 — 이때만 본문 색으로 돌린다 */
.sub-banner--empty .sub-banner-tit {
    position: relative;
    color: var(--color-text-title1);
}

.sub-banner-tit {
    font-size: var(--font-size-heading-banner);
    line-height: var(--line-height-heading-banner);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin: 0
}

.sub-location-nav {
    width: 100%;
    margin-top: -40px;
}

.sub-location-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 10px 30px;
    background: var(--color-bg-base);
    border: 1px solid var(--color-border-base)
}

.sub-location-crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1 1 auto
}

.sub-location-selects {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1 1 auto
}

/* 선택지가 하나뿐인 뎁스는 드롭다운 없이 링크로만 — 셀렉트박스와 동일 치수/타이포 */
.sub-location-link {
    display: flex;
    align-items: center;
    flex: 0 1 300px;
    min-width: 0;
    height: 63px;
    padding: 0 15px;
    box-sizing: border-box;
    font-size: 18px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-title1);
}

.sub-location-crumbs .select-box-wrap {
    flex-shrink: 1;
    min-width: 0
}

.sub-location-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0
}

.sub-location-btn {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-black);
    cursor: pointer
}

.sub-location-favorite.on {
    color: var(--color-primary)
}

.sub-location-print--mobile,
.sub-location-favorite--mobile {
    display: none;
}

/* 인쇄 + 즐겨찾기 그룹 (crumbs 안, 모바일용) */
.sub-location-crumbs-tools {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sub-location-crumbs .select-box {
    border: none;
    background: none
}

.sub_content_wrap {
    padding-top: 86px;
    padding-bottom: 150px;
}

.sub-page-tit {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    text-align: center;
    margin-bottom: 86px;
}



/* ============================================
 * footer
 * ============================================ */

.footer {
    background: var(--color-bg-footer);
    width: 100%;
}

.footer-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.footer-family-site {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    border-bottom: 1px solid var(--color-border-footer);
}

.family-content{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0;
    background: none;
    border: none;
    cursor: pointer;
}

/* theme.css의 button:hover(--color-gray50) 전역 기본값 제거 — 트리거 버튼은 hover 없음,
 * hover는 안쪽 옵션(.family-dropdown-list a)에만 적용 */
.family-content:hover {
    background: none;
}

.footer-family-site p {
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-inverse)
}

.footer-family-site .icon {
    color: var(--color-text-inverse);
}

.family-dropdown {
    position: relative;
    flex: 1 0 0;
}

.family-dropdown .icon-down {
    transition: transform 0.2s;
}

.family-dropdown.open .icon-down {
    transform: rotate(180deg);
}

.family-dropdown-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    background: var(--color-bg-footer);
    border: 1px solid var(--color-border-footer);
    max-height: 320px;
    overflow-y: auto;
    z-index: 10;
}

.family-dropdown.open .family-dropdown-list {
    display: block;
}

.family-dropdown-list li {
    padding: 30px 0;
}

.family-dropdown-list a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    font-size: var(--font-size-body-md);
    color: var(--color-text-inverse);
}

.family-dropdown-list li:hover {
    background: var(--color-bg-footer-hover);
}


.footer-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 38px;
    padding: 36px 0 56px 0;
}


.footer-logos {
    display: flex;
    align-items: flex-start;
    width: 100%;
    justify-content: space-between
}

.footer-logos li:first-child img {
    height: 60px;
    width: auto
}

.footer-logos li:last-child img {
    height: 48px;
    width: auto
}

.footer-campus {
    display: flex;
    align-items: flex-start;
    gap: 126px
}

.footer-campus-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 422px
}

.footer-campus-item--hwasun {
    width: 486px
}

.footer-campus-addr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-campus-addr li:first-child {
    font-size: var(--font-size-heading-md);
    line-height: var(--line-height-heading-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-footer-accent);
}

.footer-campus-addr li:last-child {
    font-size: var(--font-size-caption);
    line-height: var(--line-height-caption);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-footer)
}

.footer-contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-size: var(--font-size-caption);
    line-height: var(--line-height-caption);
    gap: 0 25px
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 17px
}

.footer-campus-item--hwasun .footer-contact {
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
}

.footer-campus-item--hwasun .footer-contact li:nth-child(3) {
    grid-column: 1;
}

.footer-contact p:first-child {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-footer-inverse)
}

.footer-contact p:last-child {
    font-family: var(--font-number);
    color: var(--color-text-footer)
}

.footer-policy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 60px;
    font-size: var(--font-size-caption);
    line-height: var(--line-height-caption);
}

.footer-policy a {
    color: var(--color-text-footer);
    font-weight: var(--font-weight-medium);
    text-decoration: none
}

.footer-policy a:hover {
    text-decoration: underline
}

.footer-policy li:first-child a {
    color: var(--color-text-footer-inverse);
    font-weight: var(--font-weight-semibold)
}

.footer-copyright {
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-footer);
    line-height: var(--line-height-caption)
}

/* ============================================
 * 레거시 — header / sub nav
 * ============================================ */

html {
    overflow-x: hidden
}

.pc_menu {
    display: block !important
}

.mo_menu {
    display: none !important
}


/* ============================================
 * 반응형 (media queries) — 항상 파일 맨 마지막
 * ============================================ */

/* gnb 반응형 — 1540px 이하: 메가메뉴 aside(브랜드 패널) 숨김
 * 1280px 이하: 상단 GNB 메뉴 목록 숨김(햄버거로만 진입)
 * 1024px 이하: 유틸리티 바(로그인/검색 등) 숨김 + 메가메뉴 컬럼을 세로 리스트로 전환 */
@media (max-width: 1540px) {
    .header-gnb-option > aside {
        display: none;
    }
}

@media (max-width: 1280px) {
    .header-nav-wrap > ul {
        display: none;
    }
}

@media (max-width: 1024px) {
    .gnb-option-panel {
        flex-direction: column;
    }

    .gnb-option-col {
        border-right: none;
        border-bottom: 1px solid var(--color-border-header);
    }

    /* 아코디언 — 타이틀만 보이고 클릭하면 하위 메뉴(gnb-option-item)가 펼쳐짐 */
    .gnb-option-title {
        cursor: pointer;
        color: var(--color-text-title1);
    }

    .gnb-option-title .icon-plus {
        display: inline-block;
    }

    /* 타이틀 열렸을 때 plus→minus 전환 (depth3 토글과 동일 패턴) */
    .gnb-option-col.open .gnb-option-title .icon-plus {
        --asset-icon-url: url("/assets/icons/minus.svg");
    }

    .gnb-option-col .gnb-option-item {
        display: none;
    }

    .gnb-option-col.open .gnb-option-item {
        display: flex;
        padding: 0;
    }

    .gnb-option-item > a {
        flex: 1;
        min-height: 63px;
        padding: 18px 0;
    }

    .gnb-option-depth3-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        min-height: 63px;
        margin-right: -16px;
    }

    .gnb-option-depth3 {
        padding-bottom: 12px;
    }

    .gnb-option-depth3 li a {
        display: flex;
        width: 100%;
        min-height: 48px;
    }

    /* 데스크톱(384w) 패널 대신 축소판 재노출 + 하단 사이트맵 버튼(768px 이하에서 다시 숨김) */
    .header-gnb-option > aside {
        display: flex;
        width: 300px;
        padding: 50px 49px;
        gap: 24px;
    }

    .icon.aside-symbol {
        width: 162px;
        height: 162px;
    }

    .aside-txt > p {
        font-size: 16px;
        line-height: 1.25;
    }

    .aside-txt > ul {
        font-size: 12px;
        line-height: 1.3;
    }

    /* PC용 calc(80vh) 고정 높이 대신 콘텐츠만큼만 차지 + 넘치면 스크롤 */
    .header-gnb-option.is-open {
        min-height: 0;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    /* 메뉴바 열렸을 때 하버거 아이콘 → 닫기(X)로 전환. PC hover-open엔 영향 없음(미디어쿼리 스코프) */
    .gnb-option-sitemap-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 16px;
        height: 50px;
        padding: 0 21px;
        border: 1px solid rgba(var(--color-white-rgb), 0.4);
        font-weight: var(--font-weight-semibold);
        font-size: 16px;
        color: var(--color-white);
    }

    .gnb-option-sitemap-btn .icon {
        background: var(--color-white);
    }

    header:has(.header-gnb-option.is-open) .btn-gnb-toggle .icon-hamburger {
        --asset-icon-url: url("/assets/icons/exit.svg");
    }
}

/* --page-padding 값 자체는 theme.css가 반응형까지 완결된 형태로 정의함(0 → 1520px 이하 40px →
 * 1024px 이하 24px → 768px 이하 16px). margin:auto로 센터링되는 폭에서는 굳이 여기서 다시
 * 선언하지 않고 그대로 참조만 한다 — 값이 두 파일에 중복되면 나중에 한쪽만 고쳤을 때 서로
 * 어긋나는 사고가 나서(실제로 한 번 남) 반응형 breakpoint 안 rule(footer 레이아웃)만 여기서 관리 */
@media (max-width:1520px) {
    .footer-wrap {
        padding-left: var(--page-padding);
        padding-right: var(--page-padding);
    }

    .footer-campus {
        gap: 60px
    }
}

@media (max-width:1023px) {
    .footer-family-site p {
        font-size: 17px
    }

    .footer-campus {
        flex-direction: column;
        gap: 28px
    }

    .footer-campus-item,
    .footer-campus-item--hwasun {
        width: 100%
    }
}

@media (max-width:768px) {
    :root {
        --gap-card: 12px
    }

    /* 테블릿 사이드패널 제거, 사이트맵을 리스트 맨 위 풀폭 바로 전환 */
    .header-gnb-option > aside {
        display: none;
    }

    .sub-location-bar {
        align-items: flex-start;
        padding: 10px 15px;
    }

    .sub-location-actions {
        height: 54px;
    }

    .sub-location-crumbs {
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 8px;
        width: 100%;
        flex-basis: 100%;
    }

    .sub-location-print--desktop,
    .sub-location-favorite--desktop {
        display: none;
    }

    .sub-location-print--mobile,
    .sub-location-favorite--mobile {
        display: flex;
    }

    .sub-location-selects {
        flex: 1 1 100%;
        flex-wrap: wrap;
        row-gap: 8px;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid var(--color-border-base);
    }

    .sub-location-crumbs .select-box-wrap {
        flex-shrink: 0;
        width: 100%;
    }

    /* 셀렉트가 풀폭으로 줄바뀌므로 링크도 같은 폭으로 — anatomy/iacuc의 '홈'과 달리
     * 여기는 실제 위치 정보라 감추지 않는다 */
    .sub-location-link {
        flex: 0 0 100%;
        width: 100%;
        height: 48px;
    }

    .sub_layout:has(#page_content .tab-nav:not([data-keep-title]) > a.tab-btn) .sub-location-selects > :last-child {
        display: none;
    }

    .sub_content_wrap {
        padding-top: 60px;
    }

    .footer-family-site {
        flex-direction: column;
        align-items: stretch;
        gap: 0
    }

    .footer-left,
    .footer-right {
        width: 100%;
        justify-content: center
    }

    .footer-wrap {
        padding: 24px 20px 32px;
        gap: 24px
    }

    .footer-logos {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px
    }

    .footer-logos li:first-child img {
        height: 48px
    }

    .footer-campus {
        flex-direction: column;
        gap: 24px
    }

    .footer-campus-item,
    .footer-campus-item--hwasun {
        width: 100%
    }

    .footer-contact {
        grid-template-columns: 1fr;
        gap: 0
    }

    .footer-campus-item--hwasun .footer-contact {
        grid-template-columns: 1fr;
    }

    .footer-policy {
        gap: 16px 24px
    }
}

@media (max-width:600px) {
    :root {
        --gap-card: 8px
    }

    .footer-family-site {
        flex-direction: column;
        gap: 0
    }

    .footer-left,
    .footer-right {
        width: 100%;
        justify-content: center;
        padding: 24px 0
    }

    .footer-family-site p {
        font-size: 15px
    }

    .footer-wrap {
        gap: 20px
    }

    .footer-logos {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px
    }

    .footer-logos li:first-child img {
        height: 40px
    }

    .footer-logos li:last-child img {
        height: 40px
    }

    .footer-campus {
        flex-direction: column;
        gap: 20px
    }

    .footer-campus-item,
    .footer-campus-item--hwasun {
        width: 100%
    }

    .footer-contact {
        grid-template-columns: 1fr;
        gap: 0
    }

    .footer-contact li {
        gap: 12px
    }

    .footer-policy {
        gap: 10px 16px;
        font-size: 14px
    }

    .footer-copyright {
        font-size: 13px;
        line-height: 1.6
    }
}

/* ============================================
 * 통합검색 오버레이 (검색 버튼 → 상단 딤 패널, header 밖)
 * ============================================ */
body.is-search-open {
    overflow: hidden;            /* 오버레이 열린 동안 페이지 스크롤 잠금 */
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    overflow-y: auto;
    background: rgba(0, 0, 0, .5);   /* 뒤 오버레이 black 50% */
}

.search-overlay__panel {
    position: relative;
    padding: 120px 0;            /* 맨 위 + 컨텐츠 높이만큼 (여백만) */
    background: var(--color-bg-footer);
    text-align: center;
}

.search-overlay__close {
    position: absolute;
    top: 18px;
    right: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--color-white);
    cursor: pointer;
}

.search-overlay__close .icon {
    width: 26px;
    height: 26px;
}

.search-overlay__inner {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 30px;
}

.search-overlay__label {
    margin-bottom: 32px;
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
}

.search-overlay form {
    display: flex;
    align-items: stretch;
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-white);
}

.search-overlay__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 20px;
    background: transparent;
    font-size: 18px;
    color: var(--color-text-title1);
}

.search-overlay__input::placeholder {
    color: var(--color-text-muted);
}

.search-overlay__input:focus {
    outline: none;
}

.search-overlay__submit {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--color-text-body);
    cursor: pointer;
}

.search-overlay__submit .icon {
    width: 22px;
    height: 22px;
}

@media screen and (max-width: 1024px) {
    .search-overlay__panel {
        padding: 40px 0 44px;
    }

    .search-overlay__close {
        top: 16px;
        right: 20px;
    }

    .search-overlay__label {
        margin-bottom: 24px;
        font-size: 24px;
    }
}

@media screen and (max-width: 768px) {
    .search-overlay__panel {
        padding: 32px 0 36px;
    }

    .search-overlay__label {
        font-size: 20px;
    }

    .search-overlay__input {
        font-size: 16px;
        padding: 0 16px;
    }
}


/* ============================================
 * 플로팅 퀵메뉴 (즐겨찾기 / TOP — 뷰포트 우하단 고정, common.html 출력)
 * ============================================ */
.floating-quick-menu {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-quick-btn {
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid var(--color-border-base);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-text-body);
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: color .2s, background-color .2s, border-color .2s;
}

.floating-quick-btn:hover,
.floating-quick-btn:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.floating-quick-btn:active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
}

.floating-top-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s, color .2s, background-color .2s, border-color .2s;
}

.floating-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
}

.floating-top-btn .icon {
    width: 20px;
    height: 20px;
}

.floating-favorite {
    position: relative;
}

.floating-favorite-panel {
    position: absolute;
    right: 92px;
    bottom: 0;
    width: 260px;
    max-height: 320px;
    padding: 18px 8px;
    overflow-y: auto;
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.floating-favorite-title {
    display: block;
    margin: 0 10px 12px;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
}

.floating-favorite-list li + li {
    margin-top: 2px;
}

.floating-favorite-list a {
    display: block;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-white);
}

.floating-favorite-list a:hover,
.floating-favorite-list a:focus-visible {
    color: var(--color-white);
    text-decoration: none;
}

.floating-favorite-empty {
    margin: 0 10px;
    font-size: 14px;
    color: var(--color-white);
}

.floating-favorite-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 10px;
}

.floating-favorite-list li:hover,
.floating-favorite-list li:focus-within {
    background: var(--color-primary-pressed);
}

.floating-favorite-list li > a {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.favorite-delete-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
}

.favorite-delete-btn .icon {
    width: 14px;
    height: 14px;
}

.favorite-delete-btn:hover {
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .floating-quick-menu {
        right: 16px;
        bottom: 16px;
    }

    .floating-favorite-panel {
        right: 0;
        bottom: 92px;
        width: calc(100vw - 32px);
        max-width: 300px;
    }
}
