/* Header redesign styles: two-row layout + mega menu + drawer */
:root {
    --header-ink-100: #f4f4fa;
    --header-ink-200: #e6e6f0;
    --header-ink-500: #8a8aa3;
    --header-ink-700: #4a4a63;
    --header-ink-900: #1d1c2c;
    --header-event-orange: #ff7f50;
    --header-menu-button: #1f1b4b;
}

/* header-top / menu-top 폭을 본문(.container max-width:1610px)과 통일 */
.header__inner,
.menu-top__row {
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.header__logo {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header__searchForm {
    width: 100%;
}

.header__searchForm input {
    border-radius: 999px;
}

/* 결제(코인) 아이콘 크기 — 28px ≈ 1.75em, CSS 제어, 인라인 스타일 사용 금지 */
.header-paycon-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    flex: 0 0 auto;
}

/* 알림 아이콘 래퍼 — 내부 img(icon-24)가 1.4em×16px≈22px 크기로 자체 제어 */
.header-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-paycon-wrap {
    display: inline-flex;
    align-items: center;
}

.header-paycon-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: var(--header-ink-700);
    transition: color 0.2s ease;
}

.header-paycon-wrap a:hover {
    color: var(--brand1);
}

.header__balance {
    font-size: 1rem;
    color: var(--header-ink-700);
    white-space: nowrap;
}

.header__balance--freepass {
    color: var(--header-ink-700);
    font-weight: 700;
}

.header-auth-buttons {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.header-auth-buttons a {
    border: 0;
    border-radius: 0;
    padding: 0;
    line-height: 1.2;
    color: var(--header-ink-700);
}

.header-auth-register {
    background: transparent;
    color: var(--header-ink-700) !important;
}

.header-auth-sep {
    color: var(--header-ink-500);
    font-size: 0.82rem;
}

.menu-top {
    border-bottom: 1px solid var(--header-ink-200);
    background: #fff;
}

.menu-top__row {
    padding-top: 8px;
    padding-bottom: 8px;
}

.menu-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.header__categoryTrigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    background: #1F1B4B;
    color: #fff;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.header__burgerGlyph {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.header__categoryTrigger:hover,
.header__categoryTrigger[aria-expanded="true"] {
    background: var(--brand1);
    color: #fff;
}

.header__eventSlots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header__eventLink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--header-ink-700);
    font-weight: 600;
    text-decoration: none;
}

.header__eventLink:hover {
    color: var(--brand1);
}

.header__eventBadge {
    border-radius: 999px;
    border: 1px solid var(--header-event-orange);
    color: var(--header-event-orange);
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.header__megaMenu {
    display: none !important;
    margin-top: 10px;
    border-radius: 14px;
    border: 1px solid var(--header-ink-200);
    background: #fff;
    box-shadow: 0 16px 36px rgba(20, 18, 44, 0.12);
    padding: 20px 24px;
    overflow: auto;
}

.header__megaMenu.is-open {
    display: block !important;
}

.headerFlyout {
    display: grid;
    grid-template-columns: 214px 1fr;
    gap: 0;
    min-height: 440px;
}

.headerFlyout__rail {
    margin: 0;
    padding: 8px 0;
    list-style: none;
    border-right: 1px solid var(--header-ink-200);
    background: #fff;
}

.headerFlyout__mainItem {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 11px 14px;
    font-size: 0.95rem;
    color: var(--header-ink-700);
    font-weight: 700;
    text-align: left;
}

.headerFlyout__mainItemIcon {
    width: 22px;
    color: var(--header-ink-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex: 0 0 auto;
}

.headerFlyout__mainItem:hover,
.headerFlyout__mainItem.is-active {
    background: #f7f8fe;
    color: var(--header-ink-900);
}

.headerFlyout__mainItem:hover .headerFlyout__mainItemIcon,
.headerFlyout__mainItem.is-active .headerFlyout__mainItemIcon {
    color: var(--brand1);
}

.headerFlyout__panelWrap {
    padding: 14px 16px;
}

.headerFlyout__panel {
    display: none;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.headerFlyout__panel.is-active {
    display: grid;
}

.headerFlyout__group {
    min-width: 0;
    border-radius: 10px;
    padding: 7px 8px;
}

.headerFlyout__group:hover {
    background: #fafafe;
}

.headerFlyout__midLink {
    display: block;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--header-ink-900);
    margin-bottom: 5px;
    text-decoration: none;
}

.headerFlyout__midLink:hover {
    color: var(--brand1);
}

.headerFlyout__leafList {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
}

.headerFlyout__leafList li a {
    display: block;
    color: var(--header-ink-500);
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.headerFlyout__leafList li a:hover {
    color: var(--brand1);
}

.headerFlyout__leafList + .headerFlyout__midLink {
    margin-top: 14px;
}

/* 헤더 우측 래퍼 수직 정렬: 동전·알림·프로필을 한 줄 중앙 정렬 */
.header-top .wrapperTopMenu {
    display: flex;
    align-items: center;
}

.header-top .ulTopMenu1,
.header-top .ulTopMenu2 {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* 헤더 액션 아이콘은 hover 상승 애니메이션을 비활성화한다. */
.header-info-right .icon:hover {
    transform: none;
}

/* 나의 정보 / 크리에이터 드롭다운을 최소한의 glass-card 톤으로 통일 */
.header-info-right .header-action-icon-2 > a {
    border: 0;
    border-radius: 999px;
    background: transparent;
    padding: 6px 10px;
}

.header-myinfo-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 150px;
}

.header-myinfo-trigger__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.header-avatar-fallback {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8e8f0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--header-ink-200);
    flex: 0 0 auto;
}

.header-myinfo-trigger .lable {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-info-right .account-dropdown {
    margin-top: 10px;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(25, 22, 54, 0.14);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.header-info-right .account-dropdown ul {
    margin: 0;
    padding: 0;
}

.header-info-right .account-dropdown ul li + li {
    margin-top: 4px;
}

.header-info-right .account-dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    padding: 7px 9px;
}

.header-info-right .account-dropdown ul li a:hover {
    background: rgba(104, 95, 255, 0.08);
}

.header-drawer {
    display: none;
}

.header-mobile-toggle {
    border: 0;
    background: transparent;
    color: var(--header-ink-900);
    border-radius: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 오른쪽 알림·결제 아이콘(icon-24)과 동일한 24px 시각 크기 */
.header-mobile-toggle .header__burgerGlyph {
    font-size: 1.8em;
    line-height: 1;
    display: inline-flex;
    /* width: 24px;
    height: 24px; */
    align-items: center;
    justify-content: center;
}

.header-mobile-toggle__text {
    display: none;
}

/* 햄버거 버튼 오른쪽에 붙는 작은 condaa 로고 — 모바일 전용, PC에서는 숨김 */
.header-mobile-toggle__logoText {
    display: none;
}

.header-mobile-events {
    display: none;
}

@media (max-width: 1199.98px) {
    .headerFlyout {
        grid-template-columns: 180px 1fr;
    }

    .headerFlyout__panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .header__inner,
    .menu-top__row {
        padding-left: 1rem;
        padding-right: 1.2rem;
    }

    .headerFlyout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .headerFlyout__rail {
        border-right: 0;
        border-bottom: 1px solid var(--header-ink-200);
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 4px;
    }

    .headerFlyout__mainItem {
        border-radius: 8px;
        justify-content: center;
    }

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

    .headerFlyout__leafList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .header__logo {
        display: none;
    }

    /* 햄버거 오른쪽 condaa 텍스트: 모바일에서만 표시 */
    .header-mobile-toggle__logoText {
        display: inline-block;
        font-size: 1.4rem !important;   /* PC 로고(1.9rem) 대비 축소 */
        line-height: 1;
        margin-left: 6px;
        text-decoration: none;
        /* font-family/color/font-weight는 .logo (etc.css) 에서 상속 */
    }

    .header-mobile-toggle {
        gap: 0;              /* logoText의 margin-left로 간격 제어 */
    }

    .header-top .wrapperTopMenu {
        margin-left: auto;
    }

    .header-top .ulTopMenu2 {
        display: none;
    }

    .header__balance {
        font-size: 0.75rem;
    }

    .menu-top {
        display: none !important;
    }

    .header-mobile-events {
        display: block;
        margin-top: 50px;
        border-bottom: 1px solid var(--header-ink-200);
        background: #fff;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .header-mobile-events::-webkit-scrollbar {
        display: none;
    }

    .header-mobile-events__scroller {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        padding: 9px 1rem;
    }

    .header-mobile-events__scroller .header__eventLink {
        flex: 0 0 auto;
    }

    .header-drawer {
        position: fixed;
        inset: 0;
        z-index: 15000;
    }

    .header-drawer.is-open {
        display: block;
    }

    .header-drawer__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(16, 17, 30, 0.45);
    }

    .header-drawer__panel {
        position: relative;
        z-index: 1;
        width: min(86vw, 360px);
        height: 100%;
        background: #fff;
        padding: 16px;
        overflow-y: auto;
    }

    .header-drawer__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--header-ink-200);
    }

    .header-drawer__topLogo {
        font-size: 1.3rem;
        line-height: 1;
        text-decoration: none;
        margin: 0;
    }

    .header-drawer__closeBtn {
        border: 0;
        background: transparent;
        padding: 4px;
        color: var(--header-ink-700);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        cursor: pointer;
        border-radius: 6px;
    }

    .header-drawer__auth {
        padding: 14px 0;
        border-bottom: 1px solid var(--header-ink-200);
    }

    .header-drawer__search {
        margin-top: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .header-drawer__search input {
        width: 100%;
    }

    .header-drawer__search button {
        border: 0;
        background: transparent;
        box-shadow: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--header-ink-900);
        padding: 0 2px;
        line-height: 1;
        font-size: 1.3rem;
    }

    .header-drawer__authGuest {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--header-ink-500);
    }

    .header-drawer__authGuest a {
        color: var(--header-ink-700);
        text-decoration: none;
        font-weight: 600;
    }

    .header-drawer__authUserPrimary {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--header-ink-900);
        text-decoration: none;
        font-weight: 700;
    }

    .header-drawer__avatar {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        object-fit: cover;
        flex: 0 0 auto;
    }

    .header-drawer__authLinks {
        margin-top: 8px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 10px;
    }

    .header-drawer__authLinks a {
        color: var(--header-ink-700);
        text-decoration: none;
        font-size: 0.84rem;
    }

    .header-drawer__accordion {
        margin-top: 16px;
    }

    .header-drawer__accordionItem + .header-drawer__accordionItem {
        margin-top: 8px;
    }

    .header-drawer__mainButton {
        width: 100%;
        border: 1px solid var(--header-ink-200);
        border-radius: 10px;
        background: #fff;
        color: var(--header-ink-900);
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 12px;
        font-size: 0.95rem;
        font-weight: 700;
        text-align: left;
    }

    .header-drawer__chevron {
        margin-left: auto;
        color: var(--header-ink-500);
        font-size: 0.9rem;
        transition: transform 0.2s ease;
        flex: 0 0 auto;
    }

    .header-drawer__mainButton.is-active .header-drawer__chevron {
        transform: rotate(180deg);
    }

    .header-drawer__mainButton.is-active {
        border-color: rgba(104, 95, 255, 0.35);
        background: rgba(104, 95, 255, 0.06);
    }

    .header-drawer__panelBody {
        display: none;
        margin-top: 8px;
        border: 1px solid var(--header-ink-200);
        border-radius: 10px;
        padding: 10px;
        background: #fff;
    }

    .header-drawer__panelBody.is-active {
        display: block;
    }

    .header-drawer__panelBody .headerFlyout__group + .headerFlyout__group {
        margin-top: 12px;
    }

    .header-drawer__panelBody .headerFlyout__midLink {
        font-size: 0.91rem;
    }

    .header-drawer__panelBody .headerFlyout__leafList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
