:root {
    color-scheme: dark;
}

body {
    margin: 0;
    font-family: 'Noto Serif KR', serif;
    /* Changed to Serif for more elegance */
    color: white;
    /* Default text color */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    text-align: center;
    max-width: 1200px;
    /* Widened to 1200px */
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    padding: 30px 15px;
    height: auto;
    z-index: 10;
    position: relative;
}

/* Header Section */
.card-header {
    margin-bottom: 0px;
}

.verse-text {
    font-size: 1.2em;
    line-height: 1.6;
    color: #d1b45f;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 60px 0 10px 0;
    /* Adjusted margins */
}

.verse-ref {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #d1b45f;
}

/* Photo Section */
.photo-frame img {
    width: 100%;
    max-width: 800px;
    /* Increased image max-width slightly since container is wider, but kept reasonable */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Greeting Section */
.card-body {
    margin: 0px 0;
}

.greeting-text {
    font-size: 1.3em;
    /* Increased from 1.1em (~ +3px) */
    line-height: 1.8;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
}

.english-greeting {
    font-family: 'pinyon script', cursive;
    font-size: 3.5em;
    margin: 10px 0;

    /* Solid bright color for better visibility on all devices */
    color: #ffd700;
    /* Bright Gold */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 2px 2px 2px rgba(0, 0, 0, 0.8);

    /* Removed complex gradient that was appearing dark */
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: initial;
    animation: none;
}

/* Member List Footer */
.member-list {
    width: 100%;
    font-size: 0.9em;
    text-align: left;
    background: rgba(255, 255, 255, 0.9);
    /* White background like the paper in image */
    color: #1a1a1a;
    /* Dark text for readability on white */
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.member-group,
.member-row {
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    justify-content: center;
    /* Center align title text */
    flex-wrap: wrap;
}

.member-grid,
.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
    margin-right: 25px;
    text-align: center;
}

.role,
strong {
    font-weight: 700;
    color: #006400;
    /* Dark Green for titles */
    margin-right: 5px;
}

.officers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    max-width: 1000px;
    gap: 0;
    margin-top: 15px;
}

/* Mobile Layout Alignment Fix */
@media (max-width: 768px) {
    .officers-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columns for better spacing */
        margin-right: 0;
        gap: 15px;
        /* Add veritcal spacing between rows */
    }

    .officers-grid>div {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .officers-grid {
        grid-template-columns: 1fr !important;
    }
}

.officers-grid>div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fixed-role {
    display: inline-block;
    width: 7.2em;
    /* Increased to prevent '역사기록부서기' wrapping */
    margin-right: 10px;
    font-weight: 700;
    color: #006400;
}

/* Vice President Grid Styles */
.vp-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.vp-grid span {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .vp-grid {
        display: grid;
        grid-template-columns: repeat(4, auto);
        gap: 5px 12px;
        /* row gap, column gap */
        justify-content: center;
        place-items: center;
    }

    /* Mobile Text Size Adjustments */
    .english-greeting {
        font-size: 2.5em;
    }

    .verse-text {
        font-size: 0.8em;
        /* Reduced from 1.2em */
    }

    .greeting-text {
        font-size: 0.9em;
        /* Reduced from 1.3em */
    }
}

.preserve-space {
    white-space: pre-wrap;
}

.divider {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 20px 0;
}

.dept-role {
    font-size: 0.85em;
    color: #555;
    margin-left: 0px;
}

audio {
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Base snow style */
.snow {
    position: fixed;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    /* Below container content (z-10), but visible on bg */
    /* Ensure snow doesn't block clicks */
}