:root {
    --h-pink: #FF7BAC;
    --h-pink-deep: #F0558A;
    --h-pink-light: #FFE4EF;
    --h-mint: #06D6A0;
    --h-mint-light: #DFFBF4;
    --h-yellow: #FFD166;
    --h-purple: #9B72CF;
    --h-purple-light: #F0E8FF;
    --h-sky: #74C7EC;
    --h-sky-light: #E3F4FC;
    --h-dark: #2D1B2E;
    --h-mid: #6B4C6E;
    --h-muted: #A08AA3;
    --h-border: #F3E4EC;
    --h-r: 10px;
    --h-r-pill: 999px;
}

.flash-banner {
    padding: 12px 32px;
    font-family: 'Nunito', 'Noto Sans KR', sans-serif;
    font-weight: 600;
    text-align: center;
}

.flash-banner.flash-success {
    background: var(--h-mint-light);
    color: var(--h-mid);
}

.flash-banner.flash-error {
    background: var(--h-pink-light);
    color: var(--h-pink-deep);
}

.gnb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--h-border);
    font-family: 'Nunito', 'Noto Sans KR', sans-serif;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 19px;
    font-weight: 900;
    color: var(--h-dark);
    text-decoration: none;
    margin-right: 20px;
    flex-shrink: 0;
}

.logo em {
    font-style: normal;
    color: var(--h-pink);
}

.logo-paw {
    font-size: 17px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: var(--h-r-pill);
    color: var(--h-mid);
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    cursor: default;
}

a.nav-link {
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    background: var(--h-pink-light);
    color: var(--h-pink-deep);
}

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    align-self: stretch;
}

.dropbtn {
    cursor: pointer;
}

.dropbtn::after {
    content: "▾";
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    transform: translateY(1px);
    opacity: 0.7;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 4px;
    min-width: 190px;
    max-width: 90vw;
    z-index: 9999;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content {
    background-color: #ffffff;
    border: 1px solid var(--h-border);
    border-radius: var(--h-r);
    box-shadow: 0 16px 36px rgba(45, 27, 46, 0.14);
    overflow: hidden;
}

.dropdown-content a {
    display: block;
    padding: 11px 16px;
    color: var(--h-mid);
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid #f7eef3;
    transition: all 0.15s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--h-pink-light);
    color: var(--h-pink-deep);
}

.dropdown-content hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--h-border);
}

.nav-links {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 4px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    border-radius: var(--h-r);
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle:hover {
    background: var(--h-pink-light);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--h-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.gnb-spacer {
    flex: 1;
}

.gnb-username {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--h-mid);
    margin-right: 2px;
    white-space: nowrap;
}

.btn {
    padding: 8px 18px;
    border-radius: var(--h-r-pill);
    font-weight: 800;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    font-family: 'Nunito', 'Noto Sans KR', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-outline {
    border: 2px solid var(--h-pink-light);
    background: transparent;
    color: var(--h-pink);
}

.btn-outline:hover {
    border-color: var(--h-pink);
}

.btn-accent {
    background: linear-gradient(135deg, var(--h-pink), var(--h-pink-deep));
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 18px rgba(255, 85, 138, 0.32);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 85, 138, 0.38);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.fxa {
    display: flex;
    align-items: center;
}

.g12 {
    gap: 10px;
}

.mypage-wrap {
    position: relative;
}

.mypage-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    z-index: 9999;
}

.mypage-wrap:hover .mypage-dropdown {
    display: block;
}

.mypage-dropdown-inner {
    background: #ffffff;
    border: 1px solid var(--h-border);
    border-radius: var(--h-r);
    box-shadow: 0 16px 36px rgba(45, 27, 46, 0.14);
    min-width: 190px;
    overflow: hidden;
}

.mypage-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--h-mid);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s;
}

.mypage-dropdown a:hover {
    background: var(--h-pink-light);
    color: var(--h-pink-deep);
}

.mypage-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--h-border);
}

.logout-btn {
    color: var(--h-pink-deep);
    border-color: var(--h-pink-light);
}

.logout-btn:hover {
    background: var(--h-pink-light);
}

.notification-wrap {
    position: relative;
}

.notification-btn {
    position: relative;
    border: 2px solid var(--h-pink-light);
    background: #ffffff;
    border-radius: var(--h-r-pill);
    padding: 7px 11px;
    cursor: pointer;
    font-size: 14px;
    color: var(--h-mid);
}

.notification-btn:hover {
    border-color: var(--h-pink);
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--h-pink-deep);
    color: #ffffff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 800;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    width: min(280px, calc(100vw - 24px));
    background: #ffffff;
    border: 1px solid var(--h-border);
    border-radius: var(--h-r);
    box-shadow: 0 16px 36px rgba(45, 27, 46, 0.14);
    overflow: hidden;
    z-index: 9999;
}

.notification-wrap:hover .notification-dropdown {
    display: block;
}

.notification-title {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 800;
    border-bottom: 1px solid var(--h-border);
    color: var(--h-dark);
}

.notification-list {
    max-height: 260px;
    overflow-y: auto;
}

.notification-empty {
    padding: 14px;
    font-size: 13px;
    color: var(--h-muted);
    text-align: center;
}

.notification-item {
    display: block;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--h-mid);
    text-decoration: none;
    border-bottom: 1px solid #f7eef3;
}

.notification-item:hover {
    background: var(--h-pink-light);
    color: var(--h-pink-deep);
}

.notification-time {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--h-muted);
}

@media (max-width: 768px) {
    .gnb {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 6px 4px;
        row-gap: 0;
    }

    .logo {
        margin-right: auto;
        font-size: 17px;
    }

    .gnb-username {
        display: none;
    }

    .nav-toggle {
        display: flex;
        order: 2;
    }

    .gnb-spacer {
        display: none;
    }

    .fxa.g12 {
        order: 3;
        flex-wrap: wrap;
        gap: 8px;
        margin-left: auto;
    }

    /* 메뉴들은 토글 버튼을 눌렀을 때만 아래로 펼쳐서 보여준다 */
    .nav-links {
        order: 4;
        flex-basis: 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-links.open {
        max-height: 70vh;
        overflow-y: auto;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--h-border);
    }

    .nav-link,
    .dropbtn {
        width: 100%;
        text-align: left;
        padding: 13px 12px;
        margin: 0;
    }

    /* 좁은 화면에서는 호버 대신 탭으로 하위 메뉴를 연다 */
    .dropdown {
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--h-border);
    }

    .nav-links > .nav-link {
        border-bottom: 1px solid var(--h-border);
    }

    .nav-links > .nav-link:last-child,
    .nav-links > .dropdown:last-child {
        border-bottom: none;
    }

    .dropdown-content {
        display: none;
        position: static;
        left: auto;
        transform: none;
        padding-top: 0;
        margin: 2px 0 6px 14px;
        min-width: 0;
        max-width: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--h-pink-light);
        border-radius: 0;
    }

    .dropdown-content::before {
        display: none;
    }

    .dropdown.open .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        text-align: left;
        border-bottom: none;
        padding: 9px 12px;
    }
}

@media (max-width: 640px) {
    .gnb {
        padding: 10px 12px;
    }

    .logo {
        font-size: 16px;
    }

    .logo-paw {
        font-size: 15px;
    }

    .btn-sm {
        padding: 7px 12px;
        font-size: 12px;
    }

    .mypage-dropdown {
        right: -8px;
    }

    .notification-dropdown {
        right: -8px;
        width: min(260px, calc(100vw - 16px));
    }
}
