@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;700&display=swap');

/* =========================================================
   1. 기본 설정
   ========================================================= */

* {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: #121418;
    color: #e1e1e1;
    overflow-x: hidden;
}

.accent-khaki {
    color: #8a9a5b;
}

.bg-card {
    background-color: #1c1f26;
    border: 1px solid #2d333e;
}

.btn-khaki {
    background-color: #8a9a5b;
    color: #121418;
    font-weight: bold;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 전체 스크롤바 */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #121418;
}

::-webkit-scrollbar-thumb {
    background: #2d333e;
    border-radius: 5px;
}

/* =========================================================
   2. 공통 애니메이션
   ========================================================= */

@keyframes marquee-optimized {
    0% {
        transform: translateX(80vw);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes iconPopupShow {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-pulse-soft {
    animation: pulse-soft 1.5s infinite ease-in-out;
}

/* =========================================================
   3. 헤더 / 인증 영역
   ========================================================= */

header.max-w-7xl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

#authArea,
#authButtonsWrap,
#userProfileArea {
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    flex-shrink: 0;
}

#authArea,
#authButtonsWrap {
    display: flex;
    justify-content: flex-end;
}

.auth-btn {
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.auth-icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

#userNameBadge {
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    max-width: 160px;
    background: rgba(138, 154, 91, 0.10);
    border: 1px solid rgba(138, 154, 91, 0.20);
    flex-shrink: 1;
    min-width: 0;
}

#userNameDisplay {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

/* =========================================================
   4. 메뉴 / 공지 / 배너
   ========================================================= */

#mainMenu {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#mainMenu::-webkit-scrollbar {
    display: none;
}

.menu-item.active {
    color: #8a9a5b !important;
}

.menu-item.active::after {
    content: "";
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #8a9a5b;
    border-radius: 2px 2px 0 0;
}

.animate-marquee-notice {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-optimized 25s linear infinite;
}

.animate-marquee-notice:hover {
    animation-play-state: paused;
}

.banner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    transition: all 0.2s ease;
    border-radius: 1.25rem;
    scroll-snap-align: start;
    height: 50px;
    width: calc((100vw - 70px) / 2.2);
    min-width: calc((100vw - 70px) / 2.2);
    cursor: pointer;
    text-decoration: none;
}

.banner-box:hover {
    border-color: #8a9a5b !important;
}

.banner-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 2px;
}

.banner-desc {
    font-size: 10px;
    color: #8a9a5b;
    font-weight: 600;
}

/* =========================================================
   5. 이미지 슬라이더
   ========================================================= */

#imageSliderTrack {
    display: flex;
    transition: transform 0.5s ease-in-out;
    user-select: none;
    -webkit-user-drag: none;
}

#imageSliderTrack a,
#imageSliderTrack img {
    display: block;
    width: 100%;
    height: 100%;
}

#imageSliderTrack img {
    object-fit: cover;
    pointer-events: none;
}

.slider-thumb {
    opacity: 0.65;
}

.slider-thumb:hover {
    opacity: 1;
}

.slider-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   6. 채팅
   ========================================================= */

#msgBox {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 8px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 14px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #8a9a5b transparent;
}

#msgBox::-webkit-scrollbar {
    width: 8px;
}

#msgBox::-webkit-scrollbar-thumb {
    background-color: #8a9a5b;
    border-radius: 9999px;
}

#msgBox::-webkit-scrollbar-track {
    background: transparent;
}

#chatSendBtn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#chatSendBtn:not(:disabled) {
    opacity: 1 !important;
    cursor: pointer;
}

#chatSendBtn:active {
    transform: scale(0.9);
    background-color: #626f3d !important;
}

/* =========================================================
   7. 모달 / 스크롤 잠금
   ========================================================= */

html.modal-open,
body.modal-open {
    overflow: hidden !important;
}

#postDetailBody,
#commentList,
#editCommentInput,
#editPostContent,
#postContent,
#writeModalScroll {
    overscroll-behavior: contain;
}

/* 아이콘 획득 팝업 */
#iconRewardPopup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

#iconRewardPopup.show {
    display: flex;
}

#iconRewardPopupCard {
    width: 100%;
    max-width: 360px;
    background: #1c1f26;
    border: 1px solid rgba(138, 154, 91, 0.35);
    border-radius: 22px;
    padding: 24px 20px 18px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: iconPopupShow 0.22s ease;
}

#iconRewardPopupImage {
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}

#iconRewardPopupTitle {
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
}

#iconRewardPopupName {
    font-size: 14px;
    font-weight: 800;
    color: #8a9a5b;
    margin-bottom: 10px;
    line-height: 1.5;
}

#iconRewardPopupDesc {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 16px;
}

#iconRewardPopupCloseBtn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 9999px;
    background: #8a9a5b;
    color: #121418;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

#iconRewardPopupCloseBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

/* 외부 브라우저 선택 모달 */
.browser-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.browser-modal-overlay.hidden {
    display: none;
}

.browser-modal {
    width: 100%;
    max-width: 360px;
    background: #1b1b1b;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.browser-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.browser-modal-desc {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 16px;
    line-height: 1.5;
}

.browser-option-btn,
.browser-cancel-btn {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

.browser-option-btn {
    background: #8a9a5b;
    color: #111;
}

.browser-cancel-btn {
    background: #2a2a2a;
    color: #fff;
}

/* =========================================================
   8. 버튼
   ========================================================= */

.action-btn {
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.action-btn-edit,
.action-btn-delete {
    border-width: 1px;
}

.action-btn-edit {
    background-color: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

.action-btn-edit:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 0.26);
    color: #dbeafe;
}

.action-btn-delete {
    background-color: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.action-btn-delete:hover:not(:disabled) {
    background-color: rgba(239, 68, 68, 0.26);
    color: #fecaca;
}

.comment-action-btn {
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.comment-action-edit {
    background-color: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.28);
    color: #93c5fd;
}

.comment-action-edit:hover {
    background-color: rgba(59, 130, 246, 0.24);
    color: #dbeafe;
}

.comment-action-delete {
    background-color: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

.comment-action-delete:hover {
    background-color: rgba(239, 68, 68, 0.24);
    color: #fecaca;
}

/* =========================================================
   9. 출석 / 아이콘 툴팁
   ========================================================= */

.attendance-day {
    min-height: 78px;
    border-radius: 14px;
    border: 1px solid #2d333e;
    background: rgba(255,255,255,0.03);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
}

.attendance-day.empty {
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.06);
}

.attendance-day.today {
    border-color: #8a9a5b;
    box-shadow: 0 0 0 1px rgba(138,154,91,0.25) inset;
}

.attendance-day.attended {
    background: rgba(138,154,91,0.12);
    border-color: rgba(138,154,91,0.45);
}

.attendance-day .day-num {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}

.attendance-day .day-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 9999px;
    background: rgba(138,154,91,0.18);
    color: #cbd5e1;
}

.icon-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.icon-name-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
    background: rgba(20, 24, 28, 0.96);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(138, 154, 91, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.icon-name-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.icon-name-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(20, 24, 28, 0.96) transparent;
}

/* =========================================================
   10. 댓글
   ========================================================= */

/* 일반 댓글 클래스가 실제 HTML에 붙어 있을 때 적용됩니다. */
.comment-item,
.reply-item {
    color: #e5e7eb;
}

.comment-content,
.reply-content {
    color: #e5e7eb;
    font-weight: 500;
}

.comment-author,
.reply-author {
    color: #ffffff;
    font-weight: 700;
}

.comment-date,
.reply-date {
    color: #9ca3af;
}

.comment-edited,
.reply-edited {
    color: #aeb87a;
}

.comment-card,
.reply-card {
    background-color: rgba(255,255,255,0.06);
    border-color: #2d333e;
}

/* 당직 댓글 클래스가 실제 HTML에 붙어 있을 때 적용됩니다. */
.duty-comment-card {
    background-color: rgba(255,255,255,0.06) !important;
    border-color: #2d333e !important;
}

.duty-comment-author {
    color: #ffffff !important;
}

.duty-comment-content {
    color: #e5e7eb !important;
    font-weight: 600;
}

.duty-comment-date {
    color: #9ca3af !important;
}

/* =========================================================
   11. 라이트모드
   ========================================================= */

.site-logo-title {
    color: #ffffff;
}

.site-logo-desc {
    color: #6b7280;
}

html.light .site-logo-title {
    color: #4a4032 !important;
}

html.light .site-logo-desc {
    color: #6f6555 !important;
}

html.light body {
    background-color: #f2ebdc !important;
    color: #4a4032 !important;
}

html.light header {
    border-bottom-color: #e2e8f0 !important;
}

html.light .bg-card {
    background-color: #faf4e8 !important;
    border: 1px solid #d8cdb8 !important;
    color: #4a4032 !important;
}

html.light .accent-khaki {
    color: #7a6a42 !important;
}

html.light .btn-khaki {
    background-color: #8b7a4d !important;
    color: #fffaf0 !important;
}



html.light .text-gray-300,
html.light .text-gray-400,
html.light .text-gray-500,
html.light .text-gray-600 {
    color: #6f6555 !important;
}

html.light .bg-black,
html.light .bg-black\/20,
html.light .bg-black\/30,
html.light .bg-black\/40 {
    background-color: #f7f0e3 !important;
    color: #1e293b !important;
    border-color: #d8cdb8 !important;
}

html.light .bg-black\/80 {
    background-color: rgba(250,244,232,0.96) !important;
}

html.light .bg-white\/5 {
    background-color: #ffffff !important;
}

html.light .bg-gray-800 {
    background-color: #e2e8f0 !important;
}

html.light .border-gray-800,
html.light .border-white\/10 {
    border-color: #dbe2ea !important;
}

html.light .bg-gray-800.text-gray-400,
html.light .bg-gray-800 .text-gray-400 {
    color: #475569 !important;
}

html.light .hover\:text-white:hover {
    color: #1e293b !important;
}

html.light input,
html.light textarea,
html.light select {
    background-color: #fffaf0 !important;
    color: #4a4032 !important;
    border-color: #d8cdb8 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
    color: #94a3b8 !important;
}

html.light #loginBtn,
html.light .auth-btn,
html.light .auth-icon-btn {
    background-color: #ffffff !important;
    border-color: #dbe2ea !important;
    color: #334155 !important;
}

html.light #loginBtn:hover,
html.light .auth-btn:hover,
html.light .auth-icon-btn:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

html.light #userNameBadge {
    background: #f8fafc !important;
    border-color: #dbe2ea !important;
}

html.light .menu-item:not(.active) {
    color: #64748b !important;
}

html.light .animate-marquee-notice a {
    color: #475569 !important;
}

html.light .animate-marquee-notice a:hover {
    color: #626f3d !important;
}

html.light #msgBox {
    background-color: #f7f0e3 !important;
}

html.light #chatOverlay {
    background-color: rgba(248, 250, 252, 0.95) !important;
}

html.light .chat-bubble-me {
    background-color: #8a9a5b !important;
    color: #1f2413 !important;
}

html.light .chat-bubble-other {
    background-color: #5f6b3a !important;
    color: #fffaf0 !important;
}

html.light .chat-bubble-other * {
    color: #fffaf0 !important;
}

html.light #waList h4,
html.light #aptNoticeList p {
    color: #1e293b !important;
}

html.light footer {
    border-top-color: #e2e8f0 !important;
}

/* 라이트모드 버튼 */
html.light .action-btn-edit {
    background-color: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
}

html.light .action-btn-edit:hover:not(:disabled) {
    background-color: #bfdbfe !important;
    color: #1e40af !important;
}

html.light .action-btn-delete {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

html.light .action-btn-delete:hover:not(:disabled) {
    background-color: #fecaca !important;
    color: #991b1b !important;
}

html.light .comment-action-edit {
    background-color: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
}

html.light .comment-action-edit:hover {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

html.light .comment-action-delete {
    background-color: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

html.light .comment-action-delete:hover {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

/* 라이트모드 출석 */
html.light .attendance-day {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html.light .attendance-day.empty {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html.light .attendance-day .day-num {
    color: #1e293b !important;
}

/* 라이트모드 아이콘 팝업 / 툴팁 */
html.light .icon-name-tooltip {
    background: rgba(255, 255, 255, 0.98);
    color: #1e293b;
    border-color: #dbe2ea;
}

html.light .icon-name-tooltip::after {
    border-color: transparent transparent rgba(255, 255, 255, 0.98) transparent;
}

html.light #iconRewardPopupCard {
    background: #ffffff !important;
    border-color: #dbe2ea !important;
}

html.light #iconRewardPopupTitle {
    color: #1e293b !important;
}

html.light #iconRewardPopupDesc {
    color: #64748b !important;
}

html.light #iconRewardPopupImage {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* 라이트모드 댓글 */
html.light .comment-item,
html.light .reply-item {
    color: #4a4032 !important;
}

html.light .comment-content,
html.light .reply-content {
    color: #3f3528 !important;
    font-weight: 500;
}

html.light .comment-author,
html.light .reply-author {
    color: #2f2418 !important;
    font-weight: 700;
}

html.light .comment-date,
html.light .reply-date {
    color: #6f6555 !important;
}

html.light .comment-edited,
html.light .reply-edited {
    color: #8b7a4d !important;
}

html.light .comment-card,
html.light .reply-card {
    background-color: #d8d2c7 !important;
    border-color: #c5bcae !important;
}

html.light .duty-comment-card {
    background-color: #ddd6c8 !important;
    border-color: #c8bda8 !important;
}

html.light .duty-comment-author {
    color: #2f2418 !important;
}

html.light .duty-comment-content {
    color: #3f3528 !important;
}

html.light .duty-comment-date {
    color: #6f6555 !important;
}

/* =========================================================
   12. 반응형
   ========================================================= */

@media (max-width: 640px) {
    .animate-marquee-notice {
        animation-duration: 15s;
    }
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    header.max-w-7xl {
        gap: 8px;
        flex-wrap: nowrap;
    }

    #authArea,
    #authButtonsWrap {
        gap: 6px;
    }

    .auth-btn {
        height: 36px;
        min-height: 36px;
        padding: 0 10px;
        font-size: 11px;
        gap: 6px;
    }

    .auth-icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    #userNameBadge {
        height: 36px;
        min-height: 36px;
        padding: 0 10px;
        max-width: 120px;
    }

    #userNameDisplay {
        max-width: 78px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    header.max-w-7xl {
        gap: 6px;
    }

    .auth-btn {
        height: 34px;
        min-height: 34px;
        padding: 0 9px;
        font-size: 10px;
    }

    .auth-icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    #userNameBadge {
        height: 34px;
        min-height: 34px;
        max-width: 92px;
        padding: 0 8px;
    }

    #userNameDisplay {
        max-width: 58px;
        font-size: 10px;
    }
}

@media (min-width: 1280px) {
    .banner-box {
        width: calc((300px - 40px) / 2);
        min-width: calc((300px - 40px) / 2);
    }
}


/* =========================
   영외마트 카드
   ========================= */

.mart-card {
    background-color: rgba(0, 0, 0, 0.20);
    border-color: #1f2937;
}

.mart-title {
    color: #ffffff;
}

.mart-address {
    color: #9ca3af;
}

.mart-holiday,
.mart-tel {
    color: #6b7280;
    font-size: 9px;
}

/* 라이트모드 */
html.light .mart-card {
    background-color: #f7f0e3 !important;
    border-color: #d8cdb8 !important;
}

html.light .mart-title {
    color: #2f2418 !important;
}

html.light .mart-address {
    color: #5f5446 !important;
}

html.light .mart-holiday,
html.light .mart-tel {
    color: #756b5c !important;
}

/* =========================
   게시글 상세모달 제목
   ========================= */

.post-detail-title,
.post-detail-title-wrap {
    color: #ffffff;
}

/* 라이트모드 */
html.light .post-detail-title,
html.light .post-detail-title-wrap {
    color: #2f2418 !important;
}

/* =========================================================
   라이트모드 전체 가독성 일괄 보정
   - text-white가 남아 있는 제목/본문을 한 번에 보정
   ========================================================= */

html.light .bg-card .text-white,
html.light .bg-black\/10 .text-white,
html.light .bg-black\/20 .text-white,
html.light .bg-black\/30 .text-white,
html.light .bg-black\/40 .text-white,
html.light .bg-white\/5 .text-white {
    color: #4a4032 !important;
}


html.light .bg-card h1,
html.light .bg-card h2,
html.light .bg-card h3,
html.light .bg-black\/10 h1,
html.light .bg-black\/10 h2,
html.light .bg-black\/10 h3,
html.light .bg-black\/20 h1,
html.light .bg-black\/20 h2,
html.light .bg-black\/20 h3 {
    color: #2f2418 !important;
}

html.light .bg-card .text-gray-100,
html.light .bg-card .text-gray-200,
html.light .bg-card .text-gray-300,
html.light .bg-card .text-gray-400,
html.light .bg-card .text-gray-500,
html.light .bg-card .text-gray-600 {
    color: #6f6555 !important;
}

html.light .chat-bubble-other,
html.light .chat-bubble-other *,
html.light .btn-khaki,
html.light .btn-khaki * {
    color: #fffaf0 !important;
}

html.light .accent-khaki {
    color: #7a6a42 !important;
}

html.light .text-red-400 {
    color: #f87171 !important;
}

html.light .text-blue-400 {
    color: #2563eb !important;
}

html.light .text-green-400 {
    color: #16a34a !important;
}

html.light .text-amber-300 {
    color: #b45309 !important;
}

#boardNavBar {
    overflow-y: hidden;
    overscroll-behavior-y: none;
}

#boardNavBar > div {
    overflow-y: hidden;
}

#mainMenu {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    max-height: 48px;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

#mainMenu .menu-item {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ==============================
   모바일 상단 로그인 영역 최적화
============================== */
@media (max-width: 640px) {
    header {
        gap: 6px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    header > div:first-child {
        flex: 1 1 auto;
        min-width: 0;
        gap: 6px !important;
    }

    header > div:first-child img {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    .site-logo-text {
        min-width: 0;
        overflow: hidden;
    }

    .site-logo-title {
        font-size: 22px !important;
        line-height: 1 !important;
        white-space: nowrap;
    }

    .site-logo-title .text-\[40px\] {
        font-size: 30px !important;
    }

    .site-logo-desc {
        font-size: 7px !important;
        letter-spacing: 0.12em !important;
        white-space: nowrap;
    }

    #authArea {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 4px !important;
    }

    #authButtonsWrap {
        display: flex;
        align-items: center;
        gap: 4px !important;
    }

    .auth-icon-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        padding: 0 !important;
        border-radius: 999px !important;
    }

    .auth-icon-btn i {
        font-size: 11px !important;
    }

    #notificationEnableBtn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }

    #userProfileArea {
    display: flex;
    align-items: center;
    gap: 4px !important;
    min-width: 0;
}

#userNameBadge {
    width: auto !important;
    max-width: 120px !important;
    min-width: 72px !important;
    padding: 0 10px !important;
    height: 30px !important;
    border-radius: 999px !important;
    overflow: hidden;
    flex-shrink: 1;
}

#userNameDisplay {
    display: block;
    min-width: 0;
    max-width: 88px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px !important;
    line-height: 30px !important;
}

    #notificationDropdownMenu,
    #loginDropdownMenu {
        right: 0 !important;
    }
}

@media (max-width: 420px) {
    #userNameBadge {
        max-width: 105px !important;
        min-width: 68px !important;
        padding: 0 9px !important;
    }

    #userNameDisplay {
        max-width: 75px !important;
    }

    .site-logo-title {
        font-size: 20px !important;
    }

    .site-logo-title .text-\[40px\] {
        font-size: 28px !important;
    }
}

.main-content-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    align-self: start;
}

#userProfileArea.auth-hidden {
    display: none !important;
}

#userProfileArea.auth-visible {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

#loginBtn.auth-hidden {
    display: none !important;
}

#notificationEnableBtn.auth-hidden {
    display: none !important;
}

#adminLatestPostList > div > div:first-child,
#adminLatestCommentList > div > div:first-child {
    min-width: 0;
}

#adminLatestPostList > div > div:first-child > p,
#adminLatestCommentList > div > div:first-child > p {
    min-width: 0;
    flex: 1 1 auto;
}

#adminLatestPostList > div > div:first-child > span,
#adminLatestCommentList > div > div:first-child > span {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: 8px;
}

/* =========================================================
   휴가관리 라이트모드 가독성 보정
   ========================================================= */

html.light #leaveCalendarView,
html.light #leaveListView {
    color: #4a4032;
}

html.light #leaveCalendarView .text-white,
html.light #leaveListView .text-white,
html.light #leaveListContainer .text-white {
    color: #2f2418 !important;
}

html.light #leaveCalendarView .text-gray-300,
html.light #leaveListView .text-gray-300,
html.light #leaveListContainer .text-gray-300 {
    color: #4f4639 !important;
}

html.light #leaveCalendarView .text-gray-400,
html.light #leaveListView .text-gray-400,
html.light #leaveListContainer .text-gray-400 {
    color: #625747 !important;
}

html.light #leaveCalendarView .text-gray-500,
html.light #leaveListView .text-gray-500,
html.light #leaveListContainer .text-gray-500 {
    color: #756957 !important;
}

html.light #leaveCalendarView .text-gray-600,
html.light #leaveListView .text-gray-600,
html.light #leaveListContainer .text-gray-600 {
    color: #817563 !important;
}

html.light #leaveCalendarView .text-red-400 {
    color: #dc2626 !important;
}

html.light #leaveCalendarView .text-blue-400 {
    color: #2563eb !important;
}

html.light #leaveCalendarView .text-green-400 {
    color: #15803d !important;
}

html.light #leaveCalendarView .text-yellow-400,
html.light #leaveListView .text-yellow-400 {
    color: #a16207 !important;
}

html.light #leaveCalendarView .border-gray-800,
html.light #leaveListView .border-gray-800,
html.light #leaveListContainer .border-gray-800 {
    border-color: #d8cdb8 !important;
}

html.light #leaveCalendarView .border-gray-700,
html.light #leaveListView .border-gray-700,
html.light #leaveListContainer .border-gray-700 {
    border-color: #c9bdab !important;
}

html.light #leaveCalendarView .bg-black\/10,
html.light #leaveCalendarView .bg-black\/20,
html.light #leaveListView .bg-black\/10,
html.light #leaveListView .bg-black\/20,
html.light #leaveListContainer .bg-black\/10,
html.light #leaveListContainer .bg-black\/20 {
    background-color: rgba(255, 250, 240, 0.65) !important;
}

html.light #postList .text-gray-200 {
    color: #3f3528 !important;
}

html.light #postList .text-white {
    color: #2f2418 !important;
}

html.light #housingDetailWrap .text-gray-200 {
    color: #3f3528 !important;
}

html.light #housingDetailWrap .text-gray-300 {
    color: #4a4032 !important;
}

html.light #housingDetailWrap .text-gray-500 {
    color: #6f6555 !important;
}