    @import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

    :root {
      color-scheme: only light;
      --primary-color: #1a4f91; /* Trustworthy blue */
      --secondary-color: #eb4d55; /* Warm red/pink */
      --accent-color: #fbd636; /* Bright yellow */
      --bg-color: #f8fafc;
      --surface-color: #ffffff;
      --text-main: #1e293b;
      --text-muted: #64748b;
      --border-color: #e2e8f0;

      --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
      --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
      --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

      --transition: all 0.3s ease;
      --header-height: 80px;
      --app-vh: 1vh;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'Pretendard', 'Noto Sans KR', sans-serif; color: var(--text-main); background-color: var(--bg-color); line-height: 1.6; overflow-x: hidden; }
    a { text-decoration: none; color: inherit; }
/* 부드러운 스크롤 이동 설정 */
html {
    scroll-padding-top: 80px; /* 고정 헤더(80px)가 콘텐츠를 가리지 않도록 여백 설정 */
    scroll-behavior: smooth; /* 네비게이션 메뉴 클릭 시 부드럽게 이동 */
}
    /* Header */
    header {
        position: fixed;
        top: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
        forced-color-adjust: none;
    }
    .nav-container {
        margin: 0 auto;
        padding: 1rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-left-section {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary-color);
        cursor: pointer;
        white-space: nowrap;
    }
    .logo img {
        height: 50px;
        width: auto;
        object-fit: contain;
    }

    .header-meta-info {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .datetime-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        line-height: 1.2;
        padding-right: 1rem;
        border-right: 1px solid var(--border-color);
        white-space: nowrap;
    }
    .datetime-info .current-time {
        font-size: 1.6rem;
        font-weight: 600;
        color: var(--primary-color);
    }
    .datetime-info .current-date {
        font-size: 0.85rem;
        color: var(--text-muted);
    }

    .visitor-info {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    .visitor-info div {
        display: flex;
        align-items: center;
        font-size: 0.85rem;
    }
    .visitor-info span {
        font-weight: 600;
        color: var(--primary-color);
        margin-left: 0.3rem;
    }

    .staff-badge {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding-left: 1rem;
        border-left: 1px solid var(--border-color);
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--secondary-color);
        white-space: nowrap;
    }
    .staff-badge i { font-size: 0.9rem; }

    /* ----- 네비게이션 및 서브 메뉴 스타일 시작 ----- */
    .nav-links {
        display: flex;
        list-style: none;
        position: relative;
        z-index: 1001;
        flex-grow: 1;
        justify-content: flex-end;
    }

    .nav-links > li {
        position: relative;
        flex: 0 1 auto;
        margin: 0 1rem;
    }

    .nav-links a {
        font-weight: 500;
        color: var(--text-main);
        transition: var(--transition);
        position: relative;
        padding: 0.5rem 0;
        display: block;
        white-space: nowrap;
    }
    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--secondary-color);
        transition: var(--transition);
    }
    .nav-links a:hover {
        color: var(--primary-color);
    }
    .nav-links a:hover::after {
        width: 100%;
    }

    /* 서브 메뉴 스타일 (데스크탑) */
    .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        min-width: 180px;
        background-color: var(--surface-color);
        box-shadow: var(--shadow-md);
        border-radius: 8px;
        list-style: none;
        padding: 0.5rem 0;
        border: 1px solid var(--border-color);
        white-space: nowrap;
    }

    .sub-menu li a {
        padding: 0.8rem 1.5rem;
        color: var(--text-main);
        font-size: 0.95rem;
        font-weight: 400;
        display: block;
        text-align: left;
    }
    .sub-menu li a:hover {
        background-color: var(--bg-color);
        color: var(--primary-color);
    }

    @media (hover: hover) and (pointer: fine) {
    .nav-links > li:hover > .sub-menu {
        display: block;
    }
}

/* 좌측 스크롤 위치 표시 점 */
.side-dots {
    position: fixed;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    z-index: 900;
}
.side-dots .dot-item {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}
.side-dots .dot-item:hover {
    background-color: var(--primary-color);
    opacity: 0.7;
}
.side-dots .dot-item.active {
    background-color: var(--primary-color);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 4px rgba(26, 79, 145, 0.15);
}
@media (max-width: 992px) {
    .side-dots { display: none; }
}

/* 우측 플로팅 도구모음 */
.side-toolbar-wrap {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(calc(100% - 14px));
    z-index: 900;
    transition: transform 0.35s ease;
}
.side-toolbar-wrap:hover {
    transform: translateY(-50%) translateX(0);
}
.side-toolbar-handle {
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
}
.side-toolbar {
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    border-radius: 8px 0 0 8px;
    overflow: hidden;
}
.side-toolbar button {
    width: 76px;
    padding: 0.9rem 0.4rem;
    border: none;
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.side-toolbar button:last-child { border-bottom: none; }
.side-toolbar button i { font-size: 1.3rem; }
.side-toolbar button:hover { filter: brightness(1.1); }
.side-toolbar .tool-donation { background-color: #eb4d55; }
.side-toolbar .tool-volunteer { background-color: #ec9a3d; }
.side-toolbar .tool-appsheet { background-color: #1a4f91; }
.side-toolbar .tool-intranet { background-color: #374151; }
@media (max-width: 768px) {
    .side-toolbar-wrap { transform: translateY(-50%) translateX(calc(100% - 10px)); }
    .side-toolbar-handle { width: 16px; height: 46px; left: -16px; font-size: 0.7rem; }
    .side-toolbar button { width: 58px; font-size: 0.66rem; padding: 0.7rem 0.3rem; }
    .side-toolbar button i { font-size: 1.05rem; }
}

/* 좌측 하단 홈으로 이동 버튼 */
.back-to-top-btn {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 900;
}
.back-to-top-btn:hover {
    background-color: #153c70;
    transform: translateY(-3px);
}

    /* 햄버거 메뉴 */
    .hamburger-menu {
        display: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--primary-color);
    }
    /* ----- 네비게이션 및 서브 메뉴 스타일 끝 ----- */

    /* Hero Section */
    .hero { 
      position: relative; 
      overflow: hidden; 
      margin-top: var(--header-height);
      height: calc(var(--app-vh) * 100 - var(--header-height));
      min-height: 600px; 
      background: linear-gradient(rgba(26, 79, 145, 0.7), rgba(26, 79, 145, 0.7)), url('https://cdn.jsdelivr.net/gh/jmk-beep/bandibul-assets@main/homepageloading.mp4') no-repeat center center/cover; 
      display: flex; align-items: center; justify-content: center; text-align: center; color: white; padding: 0 2rem; }
    /* 배경 동영상: HERO_VIDEO_FILE_ID를 설정했을 때만 이 위에 재생됩니다.
       (설정 안 하면 <video> 태그 안에 소스가 없어서 아무것도 안 보이고,
        위 .hero의 사진 배경이 그대로 보입니다.) */
    .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
    .hero-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: linear-gradient(rgba(26, 79, 145, 0.55), rgba(26, 79, 145, 0.55));
        z-index: 1;
    }
    .hero-content { position: relative; z-index: 2; max-width: 800px; animation: fadeInUp 1s ease-out; }
    .hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; }
    .hero p { font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9; }
    .btn { display: inline-block; padding: 1rem 2rem; border-radius: 50px; font-weight: 600; transition: var(--transition); cursor: pointer; }
    .btn-primary { background-color: var(--secondary-color); color: white; border: 2px solid var(--secondary-color); }
    .btn-primary:hover { background-color: transparent; color: white; border-color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }

    /* Section Common */
    .section { min-height: calc(100vh - 80px); box-sizing: border-box; padding: 1rem 2rem 3rem; max-width: 1200px; margin: 0 auto; background-color: var(--surface-color); border-bottom: 1px solid var(--border-color); }
    .section:last-of-type { border-bottom: none; }
    .section-title { text-align: center; font-size: 2.5rem; color: var(--primary-color); margin-bottom: 0.4rem; position: relative; }
    .section-title::after { content: ''; display: block; width: 60px; height: 4px; background-color: var(--accent-color); margin: 0.25rem auto 0; border-radius: 2px; }

    /* 스크롤 앵커 역할 div 스타일 */
    .section-anchor {
        display: block;
        height: 0;
        margin-top: -80px;
        padding-top: 80px;
        visibility: hidden;
        pointer-events: none;
    }

    /* 기관소개 섹션 - 탭 메뉴 스타일 (알림마당/반딧불이야기와 공용) */
    .intro-container {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }
    .intro-nav {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 0.2rem;
        flex-wrap: wrap;
    }
    .intro-nav button {
        background-color: var(--bg-color);
        border: 1px solid var(--border-color);
        padding: 0.8rem 1.5rem;
        border-radius: 50px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-main);
        cursor: pointer;
        transition: var(--transition);
        white-space: nowrap;
    }
    .intro-nav button:hover {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    .intro-nav button.active {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        box-shadow: var(--shadow-sm);
    }
    .intro-content {
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.25rem 1.5rem;
        background-color: var(--surface-color);
        box-shadow: var(--shadow-sm);
        min-height: 300px;
        display: none;
    }
    .intro-content.active {
        display: block;
        animation: fadeIn 0.5s ease-out;
    }
    .intro-content h3 {
        font-size: 1.8rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }
    .intro-content p {
        font-size: 1.05rem;
        color: var(--text-muted);
        margin-bottom: 1.5rem;
        text-align: left;
    }
    .intro-content img {
        max-width: 100%;
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
        margin-top: 0;
        box-shadow: var(--shadow-md);
    }
    .intro-content .director-sign {
        margin-top: 2rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--primary-color);
        text-align: right;
    }

    /* 인사말 - 사진 + 메시지 2단 레이아웃 */
    .greeting-flex {
        display: flex;
        gap: 2.5rem;
        align-items: flex-start;
    }
    .greeting-photo {
        flex: 0 0 42%;
    }
    .greeting-photo img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
        box-shadow: var(--shadow-md);
        margin-top: 0;
    }
    .greeting-photo .photo-caption {
        text-align: center;
        color: var(--text-muted);
        font-size: 0.9rem;
        margin-top: 0.8rem;
        margin-bottom: 0;
    }
    .greeting-text {
        flex: 1;
        min-width: 0;
    }
    .greeting-text h3 {
        font-size: 1.7rem;
        color: var(--primary-color);
        margin-bottom: 1.2rem;
    }
    @media (max-width: 768px) {
        .greeting-flex {
            flex-direction: column;
        }
        .greeting-photo {
            flex: 1;
            width: 100%;
        }
    }

    /* 시설현황 - 현황 표 스타일 */
    .facility-subtitle {
        text-align: center;
        font-weight: 700;
        color: var(--primary-color);
        font-size: 1.15rem;
        margin: 2rem 0 1rem;
        position: relative;
    }
    .facility-subtitle:first-of-type {
        margin-top: 0.5rem;
    }
    .facility-subtitle::after {
        content: '';
        display: block;
        width: 40px;
        height: 3px;
        background-color: var(--accent-color);
        margin: 0.5rem auto 0;
        border-radius: 2px;
    }
    .facility-table-wrap {
        overflow-x: auto;
        margin-bottom: 1rem;
        border-radius: 10px;
        box-shadow: var(--shadow-sm);
    }
    .facility-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.95rem;
        text-align: center;
        min-width: 480px;
    }
    .facility-table th, .facility-table td {
        padding: 0.75rem 0.5rem;
        border: 1px solid var(--border-color);
    }
    .facility-table thead th {
        background-color: var(--primary-color);
        color: white;
        font-weight: 600;
        white-space: nowrap;
    }
    .facility-table tbody th {
        background-color: var(--bg-color);
        color: var(--primary-color);
        font-weight: 700;
    }
    .facility-table tbody td {
        color: var(--text-main);
    }
    .facility-table tbody tr:nth-child(even) {
        background-color: #fbfcfe;
    }
    @media (max-width: 768px) {
        .facility-table { font-size: 0.85rem; min-width: 420px; }
        .facility-table th, .facility-table td { padding: 0.6rem 0.4rem; }
    }

    /* 알림마당 / 반딧불이야기 표 스타일 (공용) */
    .announcement-table-container {
        overflow-x: auto;
        padding: 0.4rem;
        background-color: var(--surface-color);
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
    }
    .announcement-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.95rem;
    }
    .announcement-table thead th {
        background-color: var(--primary-color);
        color: white;
        padding: 0.6rem 0.8rem;
        text-align: center;
        font-weight: 600;
        border-bottom: 2px solid var(--primary-color);
        white-space: nowrap;
    }
    .announcement-table tbody td {
        padding: 0.6rem 0.8rem;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
        vertical-align: middle;
        color: var(--text-main);
    }
    .announcement-table tbody tr:hover {
        background-color: var(--bg-color);
        cursor: pointer;
    }
    .announcement-table .col-no { width: 8%; }
    .announcement-table .col-type { width: 13%; }
    .announcement-table .col-title { text-align: left; width: auto; }
    .announcement-table .col-date { width: 14%; }
    .announcement-table .col-file { width: 10%; }
    .announcement-table .col-manage { width: 11%; white-space: nowrap; }

    .announcement-table .file-link {
        color: var(--primary-color);
        font-weight: 500;
        white-space: nowrap;
    }
    .announcement-table .file-link:hover {
        text-decoration: underline;
    }
    .empty-announcement-message {
        text-align: center;
        padding: 3rem;
        color: var(--text-muted);
        font-size: 1.1rem;
    }
    .pagination-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.4rem;
        margin-top: 0.8rem;
        flex-wrap: wrap;
    }
    .pagination-controls button {
        min-width: 34px;
        height: 34px;
        padding: 0 0.4rem;
        border: 1px solid var(--border-color);
        background-color: var(--surface-color);
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.9rem;
        color: var(--text-main);
        transition: var(--transition);
    }
    .pagination-controls button:hover:not(:disabled) {
        background-color: var(--bg-color);
    }
    .pagination-controls button.active {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    .pagination-controls button:disabled {
        opacity: 0.4;
        cursor: default;
    }

    /* 관리자 전용 UI (글쓰기 버튼, 삭제 버튼, 폼) */
    .admin-bar {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 1rem;
    }
    .btn-admin {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 0.7rem 1.4rem;
        border-radius: 50px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .btn-admin:hover {
        background-color: #153c70;
        transform: translateY(-1px);
    }
    .delete-icon-btn {
        background: none;
        border: none;
        color: var(--secondary-color);
        cursor: pointer;
        font-size: 1rem;
        padding: 0.3rem 0.5rem;
        transition: var(--transition);
        flex-shrink: 0;
    }
    .delete-icon-btn:hover {
        transform: scale(1.15);
    }

    /* 상단 고정 글 (등대의집 스타일: 파스텔톤 강조 행 + 핀 아이콘 + "중요" 배지) */
    .announcement-table tbody tr.pinned-row {
        background-color: #eaf2fb;
    }
    .announcement-table tbody tr.pinned-row:hover {
        background-color: #dcebfa;
    }
    .pin-marker {
        color: var(--secondary-color);
        font-size: 0.95rem;
    }
    .badge-important {
        display: inline-block;
        padding: 0.15em 0.55em;
        border-radius: 4px;
        font-size: 0.75em;
        font-weight: 700;
        color: white;
        background-color: var(--primary-color);
        margin-right: 0.4em;
        vertical-align: middle;
    }
    .badge-new {
        display: inline-block;
        padding: 0.15em 0.5em;
        border-radius: 4px;
        font-size: 0.72em;
        font-weight: 700;
        color: white;
        background-color: var(--secondary-color);
        margin-left: 0.4em;
        vertical-align: middle;
        white-space: nowrap;
    }
    .pin-icon-btn {
        background: none;
        border: none;
        color: #b8c2cc;
        cursor: pointer;
        font-size: 1rem;
        padding: 0.3rem 0.5rem;
        transition: var(--transition);
        flex-shrink: 0;
    }
    .pin-icon-btn:hover {
        color: var(--primary-color);
        transform: scale(1.15);
    }
    .pin-icon-btn.active {
        color: var(--secondary-color);
    }
    .admin-form-group {
        margin-bottom: 1.2rem;
        text-align: left;
    }
    .admin-form-group label {
        display: block;
        margin-bottom: 0.4rem;
        font-weight: 600;
        color: var(--text-main);
        font-size: 0.9rem;
    }
    .admin-form-group input[type="text"],
    .admin-form-group input[type="url"],
    .admin-form-group input[type="file"],
    .admin-form-group input[type="date"],
    .admin-form-group select,
    .admin-form-group textarea {
        width: 100%;
        padding: 0.7rem 0.9rem;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        font-family: inherit;
        font-size: 0.95rem;
        color: var(--text-main);
    }
    .admin-form-group textarea {
        min-height: 130px;
        resize: vertical;
    }
    .admin-form-hint {
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 0.3rem;
    }

    /* 리치 텍스트 에디터 (알림마당 / 반딧불이야기 공용) */
    .rich-content-editor {
        width: 100%;
        min-height: 240px;
        max-height: 55vh;
        overflow-y: auto;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 0.7rem 0.9rem;
        font-family: inherit;
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--text-main);
        position: relative; /* 이미지 크기조절 툴바의 위치 기준 */
    }
    .rich-content-editor:empty::before {
        content: attr(data-placeholder);
        color: var(--text-muted);
    }
    .rich-content-editor img {
        max-width: 100% !important;
        height: auto !important;
        display: inline-block;
        vertical-align: top;
        margin: 0.4rem 0.5rem 0.4rem 0;
        border-radius: 6px;
        box-shadow: var(--shadow-sm);
        cursor: grab;
    }
    .image-upload-placeholder {
        color: var(--text-muted);
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    /* 게시물 등록/삭제 중 화면 전체를 덮는 로딩 오버레이 */
.submit-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    color: white;
    z-index: 3000; /* 모든 모달(2000)보다 위에 오도록 */
}
.submit-loading-overlay.active { display: flex; }
.submit-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: submitSpin 0.8s linear infinite;
}
@keyframes submitSpin { to { transform: rotate(360deg); } }
.submit-loading-text {
    font-size: 1.05rem;
    font-weight: 600;
}
    /* 본문에 삽입된 이미지 크기 조절 (클릭 시 툴바 노출) */
    .content-resizable-img {
        cursor: pointer;
    }
    .content-resizable-img.img-selected {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    .image-resize-toolbar {
        position: absolute;
        display: flex;
        gap: 0.3rem;
        background-color: rgba(17, 24, 39, 0.85);
        padding: 0.3rem;
        border-radius: 6px;
        z-index: 10;
    }
    .image-resize-toolbar button {
        width: 28px;
        height: 28px;
        border: none;
        border-radius: 4px;
        background-color: rgba(255,255,255,0.15);
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
    }
    .image-resize-toolbar button:hover { background-color: var(--primary-color); }

    /* 검색창 (알림마당 / 반딧불이야기 공용) */
    .search-box {
        position: relative;
        max-width: 360px;
        margin: 0 auto 1.5rem;
    }
    .search-box input[type="text"] {
        width: 100%;
        padding: 0.7rem 1rem 0.7rem 2.5rem;
        border: 1px solid var(--border-color);
        border-radius: 50px;
        font-family: inherit;
        font-size: 0.95rem;
        color: var(--text-main);
        transition: var(--transition);
    }
    .search-box input[type="text"]:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(26, 79, 145, 0.1);
    }
    .search-box i {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }
    .search-empty-message {
        text-align: center;
        padding: 3rem;
        color: var(--text-muted);
        font-size: 1.05rem;
    }

    /* 제목 오른쪽에 글쓰기 버튼 + 검색창 배치, 카테고리 탭은 아래 줄 가운데 정렬 */
    .section-header {
        position: relative;
        margin-bottom: 0.5rem;
    }
    .section-header .section-title {
        margin-bottom: 0;
    }
    .section-header-actions {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    .section-header-actions .btn-admin {
        flex-shrink: 0;
    }
    .section-header-actions .search-box {
        margin: 0;
        max-width: 220px;
        flex-shrink: 0;
    }
    @media (max-width: 768px) {
        .section-header-actions {
            position: static;
            transform: none;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 1rem;
        }
    }

/* 반딧불일정 캘린더 */
.calendar-wrap {
    max-width: 100%;
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
}
.calendar-nav-btn {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
}
.calendar-nav-btn:hover {
    background-color: var(--primary-color);
    color: white;
}
.calendar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 140px;
    text-align: center;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: auto;
    gap: 4px 4px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3rem;
    background-color: var(--surface-color);
}
.calendar-day-num-cell {
    grid-row: 1;
    min-height: 22px;
    padding: 0.2rem 0.3rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.calendar-day-num-cell:hover {
    background-color: var(--bg-color);
}
.calendar-day-num-cell.outside {
    cursor: default;
}
.calendar-day-num-cell.outside:hover {
    background-color: transparent;
}
.calendar-day-num-cell.outside .calendar-day-num {
    color: #cbd5e1;
    font-weight: 500;
}
.calendar-day-num-cell.today {
    background-color: rgba(26, 79, 145, 0.1);
    box-shadow: 0 0 0 1px var(--primary-color);
}
.calendar-day-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}
.calendar-day-num-cell.holiday .calendar-day-num {
    color: var(--secondary-color);
}
.calendar-holiday-name {
    font-size: 0.62rem;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-event-bar {
    margin-top: 2px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 0 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: var(--transition);
}
.calendar-event-bar:hover {
    filter: brightness(1.1);
}
.calendar-event-bar.range-start { border-top-left-radius: 5px; border-bottom-left-radius: 5px; }
.calendar-event-bar.range-end { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }

.calendar-event-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}
.calendar-event-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
}
.calendar-event-list li:last-child { border-bottom: none; }

/* 찾아오시는 길 - 지도 + 안내 */
.map-embed-wrap {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.direction-section {
    margin-bottom: 1.4rem;
}
.direction-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 0.8rem;
}
.direction-text {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}
.direction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.direction-list li {
    display: flex;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.5;
}
.direction-list li:last-child {
    border-bottom: none;
}
.direction-label {
    flex-shrink: 0;
    width: 90px;
    font-weight: 700;
    color: var(--primary-color);
}
    /* 알림마당 모달 - 첨부파일 다운로드 영역 */
    .modal-attachment {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-top: 1.5rem;
        padding: 0.9rem 1.2rem;
        background-color: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    .modal-attachment a {
        color: var(--primary-color);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .modal-attachment a:hover {
        text-decoration: underline;
    }

    /* 소식지(카드형) - 카드형 그리드 (반딧불이야기 '소식지' 카테고리에서 사용) */
    .newsletter-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }
    .newsletter-card {
        position: relative;
        background-color: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        text-align: center;
        transition: var(--transition);
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }
    .newsletter-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }
    .newsletter-cover {
        background: linear-gradient(135deg, var(--primary-color), #2a6bb8);
        color: white;
        height: 130px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.4rem;
    }
    .newsletter-card .newsletter-info {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 0.5rem;
    }
    .newsletter-card .newsletter-title {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--text-main);
    }
    .newsletter-card .newsletter-date {
        font-size: 0.8rem;
        color: var(--text-muted);
    }
    .newsletter-card .newsletter-delete-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: none;
        background-color: rgba(17, 24, 39, 0.55);
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        transition: var(--transition);
    }
    .newsletter-card .newsletter-delete-btn:hover {
        background-color: var(--secondary-color);
    }

    /* 팝업 모달 스타일 */
    .modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .modal-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
    .modal-content {
        background-color: white;
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
        padding: 2rem;
        width: 90%;
        max-width: 700px;
        max-height: 80vh;
        overflow-y: auto;
        position: relative;
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .modal-backdrop.active .modal-content {
        transform: translateY(0);
        opacity: 1;
    }
    .modal-content-lg {
        max-width: 900px;
        max-height: 88vh;
    }
    .modal-content h3 {
        font-size: 1.7rem;
        color: var(--primary-color);
        margin-bottom: 1.5rem;
        padding-right: 2.5rem;
    }
    .modal-content .modal-body {
        font-size: 1rem;
        color: var(--text-main);
        line-height: 1.8;
        white-space: pre-wrap;
    }
    .modal-content .close-button {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.8rem;
        color: var(--text-muted);
        cursor: pointer;
        transition: var(--transition);
    }
    .modal-content .close-button:hover {
        color: var(--secondary-color);
        transform: rotate(90deg);
    }

    /* Footer */
    footer { background-color: #111827; color: white; padding: 4rem 2rem 2rem; }
    .footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3rem; margin-bottom: 3rem; }
    .footer-info h4 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--accent-color); }
    .footer-info p { color: #9ca3af; margin-bottom: 0.5rem; }
    .footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #374151; color: #6b7280; font-size: 0.9rem; }

    /* Animations */
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    /* Responsive Design */
    @media (max-width: 992px) {
        .header-meta-info {
            display: none;
        }
        .nav-container {
            justify-content: space-between;
        }
        .header-left-section {
            gap: 0;
        }
        .logo {
            margin-right: auto;
        }
        .nav-links > li.has-sub-menu > a::after {
            width: 0 !important;
        }
        .nav-links {
            justify-content: flex-end;
        }
        .nav-links > li {
            margin: 0 0.5rem;
        }
    }

    @media (max-width: 768px) {
        .nav-links {
            display: none;
            flex-direction: column;
            width: 100%;
            position: absolute;
            top: var(--header-height);
            left: 0;
            background-color: rgba(255, 255, 255, 0.98);
            box-shadow: var(--shadow-lg);
            padding: 1rem 0;
            border-top: 1px solid var(--border-color);
            align-items: center;
            z-index: 999;
            max-height: calc(var(--app-vh) * 100 - var(--header-height));
            overflow-y: auto;
            forced-color-adjust: none;
        }
        .nav-links.active {
            display: flex;
        }

        .nav-links > li {
            width: 100%;
            text-align: center;
            border-bottom: 1px solid var(--border-color);
            margin: 0;
        }
        .nav-links > li:last-child {
            border-bottom: none;
        }
        .nav-links a {
            padding: 1rem 0;
        }

        .sub-menu {
            position: static;
            display: none;
            width: 100%;
            box-sizing: border-box;
            box-shadow: none;
            border: none;
            background-color: transparent;
            padding: 0.6rem 1rem;
            margin-top: 0.3rem;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
            transform: none;
        }
        .sub-menu::after {
            content: '';
            display: block;
            clear: both;
        }
        .sub-menu li {
            list-style: none;
            margin: 0;
            box-sizing: border-box;
        }
        .sub-menu li a {
            display: block;
            width: 100%;
            box-sizing: border-box;
            padding: 0.7rem 0.3rem;
            font-size: 0.82rem;
            text-align: center;
            color: var(--text-main);
            background-color: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            white-space: normal !important;
            word-break: keep-all;
            overflow-wrap: break-word;
            line-height: 1.3;
        }
        .sub-menu li a:hover {
            background-color: var(--border-color);
        }
        .sub-menu li.divider {
            display: none;
        }
        .nav-links > li.has-sub-menu.active > .sub-menu {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem 3%;
            max-height: 900px;
        }
        .nav-links > li:hover > .sub-menu {
            display: none;
        }
        .hamburger-menu {
            display: block;
        }
        .hero {
         min-height: 500px; /* 작은 화면에서 600px 고정값 때문에 버튼이 화면 밖으로 밀리던 문제 해결 */
        }
        .hero-video {
            object-fit: contain;
        }
        .hero h1 { font-size: 2.5rem; }
        .logo {
            justify-content: flex-start;
        }

        .intro-nav {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
        }
        .intro-nav button {
            width: auto;
            max-width: none;
            padding: 0.45rem 0.9rem;
            font-size: 0.82rem;
        }

        .announcement-table thead {
            display: none;
        }
        .announcement-table tbody tr {
            display: block;
            margin-bottom: 1rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background-color: var(--surface-color);
        }
        .announcement-table tbody td {
            display: block;
            text-align: right;
            padding: 0.8rem 1rem;
            border-bottom: none;
            position: relative;
        }
        .announcement-table tbody td::before {
            content: attr(data-label);
            position: absolute;
            left: 1rem;
            font-weight: 600;
            color: var(--primary-color);
        }
        .announcement-table tbody td:first-child { border-top-left-radius: 8px; border-top-right-radius: 8px; }
        .announcement-table tbody td:last-child { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
        .announcement-table .col-title {
            text-align: right;
        }
    }
    @media (max-width: 480px) {
        .datetime-info {
            border-right: none;
            padding-right: 0;
        }
    }
/* --- 푸터(관련기관선택) --- */
.policy-bar {
    background-color: transparent;
    border-bottom: 1px solid #374151;
    padding: 1.5rem 2rem;
}

.policy-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fbd636;
}

.footer-family-site {
    position: absolute;
    right: 5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-family-site select {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #4b5563;
    background-color: #1f2937;
    color: #e5e7eb;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.btn-go {
    background-color: #1a4f91;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-go:hover {
    background-color: #153c70;
}

@media (max-width: 992px) {
    .policy-bar-inner {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-family-site {
        position: static;
    }
}
/* --- 여기까지 --- */

/* 반딧불이야기 섹션: 좌우 여백을 줄여 더 넓게 사용 */
#gallery.section {
    max-width: 1600px;
}

/* 기관소개 섹션: 인사말처럼 내용이 짧은 탭에서도 조직미션 같은 이미지 탭과
   비슷한 높이가 되도록 박스 자체를 넉넉하게 키우고, 그 박스 안에서 내용
   (사진+글 등)을 세로 가운데로 배치합니다. 탭 메뉴 위치는 그대로입니다. */
#introduction .intro-content {
    min-height: 600px;
}
#introduction .intro-content.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 768px) {
    #introduction .intro-content {
        min-height: auto;
    }
}
/* 반딧불이야기 상세 화면 (StoryFragment.html) - index.html에 끼워넣거나 story.html 단독 페이지 둘 다에서 사용 */
.story-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}
.story-main {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow-sm);
}
.story-detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.2rem;
}
.story-category-badge {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background-color: var(--primary-color);
    margin-bottom: 0.8rem;
}
.story-title { font-size: 1.9rem; color: var(--text-main); margin-bottom: 0.8rem; line-height: 1.4; }
.story-meta { display:flex; gap:1.2rem; color: var(--text-muted); font-size:0.9rem; padding-bottom:1.2rem; border-bottom: 1px solid var(--border-color); margin-bottom:1.5rem; flex-wrap: wrap; }
.story-meta span { display:flex; align-items:center; gap:0.4rem; }
.story-thumbnail-hero { width:100%; max-height:420px; object-fit:cover; border-radius:10px; margin-bottom:1.5rem; }
.story-content-body { font-size:1.05rem; line-height:1.9; color: var(--text-main); word-break: break-word; }
.story-content-body img { max-width:100% !important; height:auto !important; border-radius:8px; margin: 0.4rem 0.5rem 0.4rem 0; display:inline-block; vertical-align:top; cursor: zoom-in; }

.story-pdf-embed-wrap {
    margin-bottom: 1.5rem;
}
.story-pdf-embed {
    width: 100%;
    height: 75vh;
    min-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-color);
}
.story-pdf-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.7rem;
}
.story-pdf-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}
.story-pdf-actions a:hover { text-decoration: underline; }

/* 글 본문 이미지 확대보기(라이트박스) */
.image-lightbox-backdrop {
    background-color: rgba(10, 15, 25, 0.92);
    z-index: 2600; /* 다른 팝업(2000)보다 항상 위에 오도록 */
}
.image-lightbox-backdrop .modal-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.image-lightbox-backdrop img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: zoom-in;
}

/* 이미지를 한 번 더 클릭하면 실제 크기로 확대되고, 화면보다 크면
   스크롤해서 세부를 볼 수 있게 됩니다. 다시 클릭하면 원래대로 돌아갑니다. */
.image-lightbox-backdrop.zoomed .modal-content {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    overflow: auto;
    display: block;
    padding: 2rem;
    text-align: center;
}
.image-lightbox-backdrop.zoomed img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    cursor: zoom-out;
}
.image-lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.2rem;
    color: white;
    cursor: pointer;
    z-index: 2600;
    transition: var(--transition);
}
.image-lightbox-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}
.story-actions-row { display:flex; justify-content:flex-end; gap:0.6rem; margin-top:1.5rem; }
.story-prev-next { margin-top:2rem; border-top:1px solid var(--border-color); }
.story-prev-next a {
    display:flex; align-items:center; gap:0.6rem;
    padding: 1rem 0; color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    cursor: pointer;
}
.story-prev-next a:hover { color: var(--primary-color); }
.story-prev-next .pn-label { color: var(--text-muted); font-size:0.8rem; width:60px; flex-shrink:0; }
.story-sidebar {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}
.story-sidebar h4 { color: var(--primary-color); font-size:1.05rem; margin-bottom:1rem; padding-bottom:0.6rem; border-bottom:2px solid var(--primary-color); }
.story-sidebar-item { display:flex; gap:0.8rem; padding:0.7rem 0; border-bottom:1px solid var(--border-color); cursor:pointer; }
.story-sidebar-item:last-child { border-bottom:none; }
.story-sidebar-item img { width:56px; height:56px; object-fit:cover; border-radius:6px; flex-shrink:0; background-color: var(--bg-color); }
.story-sidebar-item .ss-title { font-size:0.88rem; color: var(--text-main); line-height:1.35; }
.story-sidebar-item .ss-date { font-size:0.75rem; color: var(--text-muted); margin-top:0.2rem; }
.story-sidebar-item:hover .ss-title { color: var(--primary-color); }
@media (max-width: 900px) {
    .story-page-wrap { grid-template-columns: 1fr; }
    .story-sidebar { position: static; }
}
/* index.html 안에서 글 상세를 보여주는 패널(다른 .intro-content 탭과 같은 자리에 표시됨) */
#story-detail-view.intro-content {
    padding: 1.5rem;
}
#story-detail-view .story-page-wrap {
    margin: 0 auto;
}