:root {
    --primary: #ff6747;
    --primary-dark: #ef5437;
    --primary-soft: #fff0e9;
    --cream: #fff9f5;
    --text: #172d39;
    --sub: #6c7b84;
    --line: #eee2db;
    --white: #fff;
    --green: #60923e;
    --blue: #379ad6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; min-width: 0; }

body {
    color: var(--text);
    background: #fff;
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

.app-page { min-height: 100vh; }
.app-main { min-height: calc(100vh - 194px); }

.content-inner, .header-inner {
    width: min(1440px, calc(100% - 64px));
    margin: 0 auto;
}

/* MEMBER HEADER */
.main-header { position: sticky; z-index: 100; top: 0; overflow: visible; border-bottom: 1px solid #eeeee7; background: #fffffff5; backdrop-filter: blur(12px); }
.header-inner { width: min(1280px, calc(100% - 64px)); min-height: 82px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 24px; }
.header-logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.logo-heart { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#ff987d,#ff5d3f); font-size: 18px; }
.logo-text { display: flex; flex-direction: column; }
.logo-text strong { color: #263c35; font-size: 20px; line-height: 1; font-weight: 800; }
.logo-text small { margin-top: 5px; color: #8a9389; font-size: 8px; font-weight: 700; letter-spacing: .2px; }
.desktop-nav { display: flex; align-items: center; justify-content: center; min-width: 0; gap: 4px; }
.nav-link { display: flex; align-items: center; justify-content: center; padding: 11px 14px; border-radius: 24px; color: #687366; font-size: 14px; font-weight: 650; white-space: nowrap; transition: background .15s,color .15s; }
.nav-link:hover { background: #f6f7f2; color: #3d5641; }
.nav-link.active { color: #d8775c; background: #fff1e9; }
.header-actions { display: flex; align-items: center; gap: 12px; justify-self: end; min-width: 0; }
.profile-menu-wrap { position: relative; }
.profile-menu-btn { display: flex; align-items: center; gap: 9px; min-height: 43px; max-width: 240px; padding: 5px 12px 5px 6px; border: 1px solid #e8ece2; border-radius: 25px; color: #4a5e49; background: #f9faf6; transition: background .15s,border-color .15s; }
.profile-menu-btn:hover, .profile-menu-btn.active { background: #f1f5eb; border-color: #d8e2cf; }
.profile-avatar, .dropdown-avatar, .mobile-user-avatar { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; color: #8b9e79; background: #eaf0e2; }
.profile-avatar svg, .dropdown-avatar svg, .mobile-user-avatar svg { width: 18px; height: 18px; }
.profile-display-name { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-honorific { margin-left: 2px; font-weight: 400; color: #8a9684; }
.profile-arrow { display: flex; color: #929d89; margin-left: 4px; transition: transform .15s; }
.profile-arrow svg { width: 14px; height: 14px; }
.profile-menu-btn.active .profile-arrow { transform: rotate(180deg); }
.profile-dropdown { position: absolute; z-index: 150; top: calc(100% + 12px); right: 0; width: 254px; padding: 12px; border: 1px solid #e7ebdf; border-radius: 17px; background: #fff; box-shadow: 0 14px 40px #35452d12; }
.profile-dropdown[hidden], .mobile-menu[hidden] { display: none; }
.profile-dropdown-head { display: flex; align-items: center; gap: 12px; padding: 9px 8px 12px; }
.dropdown-avatar { width: 39px; height: 39px; }
.dropdown-avatar svg { width: 22px; height: 22px; }
.profile-dropdown-head div, .mobile-user-info div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-dropdown-head small, .mobile-user-info small { color: #98a08e; font-size: 10px; }
.profile-dropdown-head strong, .mobile-user-info strong { color: #455741; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.profile-dropdown-line, .mobile-menu-line { height: 1px; margin: 6px 5px; background: #edf0e7; }
.profile-dropdown-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 9px; border: 0; border-radius: 11px; color: #56654d; background: transparent; text-align: left; }
.profile-dropdown-item:hover { background: #f6f8f1; }
.profile-dropdown-item > span { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; color: #8c9d7d; }
.profile-dropdown-item svg { width: 21px; height: 21px; }
.profile-dropdown-item div { display: flex; flex-direction: column; gap: 4px; }
.profile-dropdown-item strong { font-size: 12px; font-weight: 600; }
.profile-dropdown-item small { color: #9ca591; font-size: 10px; }
.profile-dropdown form { margin: 0; }
.logout-item { color: #969b8c; }
.logout-item > span { color: #a1a893; }
.mobile-menu-btn { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 9px; border: 0; border-radius: 12px; color: #52654a; background: #f5f7f0; }
.mobile-menu-btn svg { width: 24px; height: 24px; }
.mobile-menu-btn.active { background: #eaf0e2; }
.mobile-menu { position: absolute; z-index: 160; top: calc(100% + 9px); right: 16px; width: min(280px, calc(100vw - 32px)); max-height: calc(100dvh - 150px); overflow-y: auto; padding: 12px; border: 1px solid #e7ebdf; border-radius: 17px; background: #fff; box-shadow: 0 14px 40px #35452d1a; }
.mobile-user-info { display: flex; align-items: center; gap: 11px; padding: 8px 10px 11px; }
.mobile-user-avatar { width: 38px; height: 38px; }
.mobile-menu nav > a, .mobile-logout-btn { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px; border: 0; border-radius: 10px; color: #64725b; background: transparent; text-align: left; font-size: 13px; font-weight: 550; }
.mobile-menu nav > a svg, .mobile-logout-btn svg { width: 20px; height: 20px; }
.mobile-menu nav > a:hover { background: #f6f8f1; }
.mobile-menu nav > a.active { color: #d07f61; background: #fff3eb; }
.mobile-menu form { margin: 0; }
.mobile-logout-btn { color: #9ba28f; }
.main-header a:focus-visible, .main-header button:focus-visible, .mobile-bottom-nav a:focus-visible { outline: 2px solid #af8b66; outline-offset: 3px; }
/* FOOTER */
.main-footer {
    border-top: 1px solid #eee5df;
    background: #fff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 112px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.footer-left p { color: #899299; font-size: 10px; }

.footer-logo .logo-heart {
    width: 31px;
    height: 31px;
}

.footer-logo .logo-text strong { font-size: 16px; }

.footer-links {
    display: flex;
    gap: 22px;
    color: #78848b;
    font-size: 10px;
}

.footer-links a:hover { color: var(--primary); }
.mobile-bottom-nav { display: none; }

@media (max-width: 1050px) {
 .content-inner { width: calc(100% - 40px); }
 .header-inner { gap: 15px; }
 .nav-link { padding: 10px 8px; font-size: 12px; }
 .profile-menu-btn { max-width: 160px; }
}
@media (max-width: 760px) {
 body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--cream); }
 .content-inner { width: 100%; }
 .app-main { min-height: calc(100vh - 64px); }
 .header-inner { width: 100%; min-height: 64px; grid-template-columns: 1fr auto; padding: 0 18px; }
 .header-logo .logo-heart { width: 30px; height: 30px; font-size: 14px; }
 .header-logo .logo-text strong { font-size: 17px; }
 .header-logo .logo-text small { font-size: 6px; }
 .desktop-nav, .profile-menu-wrap { display: none; }
 .mobile-menu-btn { display: flex; }
 .mobile-bottom-nav { position: fixed; z-index: 90; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #e8ecdf; background: #fffffff5; backdrop-filter: blur(10px); box-shadow: 0 -4px 20px #35452d06; }
 .bottom-nav-item { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #99a18f; }
 .bottom-nav-item svg { width: 21px; height: 21px; }
 .bottom-nav-item small { font-size: 9px; font-weight: 550; white-space: nowrap; }
 .bottom-nav-item.active { color: #d78566; }
}
@media (max-width: 380px) { .header-inner { padding: 0 14px; } }
@media (prefers-reduced-motion: reduce) { .nav-link, .profile-menu-btn, .profile-arrow { transition: none; } }

/* Shared blue/lavender theme for the member home and my-page views. */
body.account-theme { --primary: #576ee5; --primary-dark: #465cd2; --primary-soft: #edf2ff; --cream: #f5f6fb; --text: #28324c; --sub: #8794ad; --line: #e3e8f3; background: #f5f6fb; }
.account-theme .main-header { border-color: #eceff7; }
.account-theme .logo-text strong { color: #28324c; }
.account-theme .desktop-nav .nav-link { color: #78849e; }
.account-theme .profile-menu-btn { color: #536487; background: #f7f9fd; border-color: #e6ebf6; }
.account-theme .profile-avatar, .account-theme .dropdown-avatar, .account-theme .mobile-user-avatar { color: #8c9bc4; background: #edf1fc; }
.account-theme .profile-honorific, .account-theme .profile-arrow { color: #98a7c0; }
.account-theme .profile-dropdown { border-color: #e3e8f4; }
.account-theme .mobile-menu-btn { color: #788cb8; background: #f2f5fc; }
.account-theme .mobile-bottom-nav { border-color: #e5eaf5; }
.account-theme .bottom-nav-item { color: #9ca9c3; }
.account-theme .bottom-nav-item.active { color: #647ce3; }
.account-theme .profile-menu-btn:hover, .account-theme .profile-menu-btn.active { background: #eff3fc; border-color: #dfe6f7; }
.account-theme .profile-dropdown-head strong, .account-theme .mobile-user-info strong { color: #53627f; }
.account-theme .profile-dropdown-item, .account-theme .mobile-menu nav > a { color: #7a88a4; }
.account-theme .profile-dropdown-item > span { color: #8c9dc8; }
.account-theme .profile-dropdown-item:hover, .account-theme .mobile-menu nav > a:hover { background: #f5f7fd; }
.account-theme .profile-dropdown-line, .account-theme .mobile-menu-line { background: #edf0f8; }
.account-theme .mobile-menu nav > a.active { color: #667cde; background: #f0f3ff; }
.account-theme .desktop-nav .nav-link.active { color: #647ce3; background: #eef2ff; }
.account-theme .desktop-nav .nav-link:hover { color: #647ce3; background: #f1f4ff; }
.account-theme .main-footer { border-color: #e5eaf5; }
.account-theme .main-header a:focus-visible, .account-theme .main-header button:focus-visible, .account-theme .mobile-bottom-nav a:focus-visible { outline-color: #8b9ee8; }
