/* ==========================================================================
   Pure CSS Styles : No Framework Dependencies
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Reset & Base Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Pretendard", "Inter", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg) !important;
    color: var(--text) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul,
ol {
    padding-left: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* --------------------------------------------------------------------------
   CSS Variables & Dark Mode
   -------------------------------------------------------------------------- */
:root {
    /* 🎨 브랜드 컬러 */
    --primary: #004094;
    --primary-hover: #002d6a;
    --primary-light: #0056c7;
    --secondary: #6c757d;
    --secondary-hover: #5a6268;
    --accent: #e63946;

    /* 🎨 배경 및 텍스트 */
    --bg: #f8f9fa;
    --bg-dark: #1a2332;
    --text: #333;
    --text-dark: #333;
    --text-light: #6c757d;
    --text-inverse: #f8f9fa;
    --card-bg: #ffffff;
    --border: #dee2e6;
    --input-bg: #ffffff;
    --contrast: #f3f4f6;
    --contrast-hover: #e9ecef;

    /* 🎨 그림자 및 효과 */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: 0.3s ease;
    --radius: 4px;

    /* 📐 레이아웃 */
    --container-sm: 650px;
    --container-md: 1000px;
    --container-lg: 1200px;
    --container-width: var(--container-lg);
}

/* 🌙 다크모드 (시스템 설정) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111827;
        --text: #f3f4f6;
        --text-light: #9ca3af;
        --card-bg: #1f2937;
        --border: #374151;
        --input-bg: #1f2937;
        --contrast: #f9fafb;
        --contrast-hover: #ffffff;
    }
}

/* 🌙 다크모드 (수동 설정) */
[data-theme="dark"] {
    --bg: #111827;
    --text: #f3f4f6;
    --text-light: #9ca3af;
    --card-bg: #1f2937;
    --border: #374151;
    --input-bg: #1f2937;
    --contrast: #f9fafb;
    --contrast-hover: #ffffff;
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
/* Override hardcoded WYSIWYG inline colors in dark mode */
[data-theme="dark"] .page-content * {
    color: var(--text) !important;
    background-color: transparent !important;
    border-color: var(--border) !important;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.container-sm {
    max-width: var(--container-sm);
}

.container-md {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-lg);
}

main.container {
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    /* Note: .mega-menu visibility is controlled by Alpine.js x-show */
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-top: 1.5em;
    /* 윗 공간 확보 */
    margin-bottom: 0.75em;
    color: var(--text);
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Page Content Styling */
.page-content {
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Page Content Images - 기본 스타일만 유지 */
.page-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem;
    border-radius: var(--radius);
}

.page-content ul {
    padding-left: 1.5rem;
}

.page-content ul li {
    margin-bottom: 0.5rem;
}

.page-content table {
    margin: 1rem 0;
}

.page-content table th,
.page-content table td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}



.page-content a:not(.btn) {
    text-decoration: underline !important;
    color: var(--primary) !important;
}

.page-content a:not(.btn):hover {
    color: var(--primary-hover) !important;
    text-decoration: underline !important;
}

h1 {
    font-size: 2rem;
}

/* 32px */
h2 {
    font-size: 1.75rem;
}

/* 28px */
h3 {
    font-size: 1.5rem;
}

/* 24px */
h4 {
    font-size: 1.25rem;
}

/* 20px */
p {
    margin-bottom: 1rem;
}

blockquote {
    border-left: 4px solid var(--primary);
    margin: 1.5rem 0;
    padding: 0.5rem 1rem;
    background-color: var(--pico-muted-border-color, #f1f3f5);
    border-radius: 0 4px 4px 0;
    font-style: normal;
    color: var(--text-dark, #333);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-contrast {
    background-color: var(--contrast);
    color: white;
}

.btn-contrast:hover {
    background-color: var(--contrast-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover,
a.btn-outline:hover,
a.btn-outline:hover i {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

.btn-outline.secondary {
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn-outline.secondary:hover,
a.btn-outline.secondary:hover,
a.btn-outline.secondary:hover i {
    background-color: var(--secondary) !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
article,
.card {
    background-color: var(--card-bg) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

article header,
.card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

article header h1,
.card-header h1 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

article header.cover-img {
    padding: 0;
    overflow: hidden;
}

article main,
article footer,
.card-body,
.card-footer {
    padding: 1rem;
}

.hover-zoom {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
    display: block;
}

.hover-zoom:hover {
    transform: scale(1.05);
}



/* --------------------------------------------------------------------------
   Forms (Basic styles for non-PicoCSS)
   -------------------------------------------------------------------------- */
input,
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 64, 148, 0.15);
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Header (Sticky)
   -------------------------------------------------------------------------- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--card-bg);
}

/* --------------------------------------------------------------------------
   Top Block (Header Banner Area)
   -------------------------------------------------------------------------- */
.top-block {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.top-block .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Banners */
.banner {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.banner-img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 4px;
    padding: 2px;
}

.banner-left .banner-img,
.banner-right .banner-img {
    max-height: 40px;
}

.banner-center {
    flex: 1;
    justify-content: center;
}

.banner-center .banner-img {
    max-height: 60px;
}

/* Utility Links */
.utility-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.utility-desktop {
    gap: 0.5rem;
}

.utility-desktop a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    transition: color var(--transition);
}

.utility-desktop a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* English Button */
.btn-eng {
    background-color: var(--primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color var(--transition);
}

.btn-eng:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* Hamburger Button */
.hamburger-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.hamburger-btn:hover {
    color: var(--primary-hover);
}

.hamburger-btn.active {
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Main Navigation Bar
   -------------------------------------------------------------------------- */
.nav-area {
    position: relative;
    display: block;
    width: 100%;
}

.main-nav {
    background-color: var(--primary);
    box-shadow: var(--shadow);
}

.main-nav .container {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    width: 100%;
    justify-content: space-around;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition);
}

.nav-link:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* --------------------------------------------------------------------------
   Mega Menu (Shows ALL categories)
   -------------------------------------------------------------------------- */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border-top: 3px solid var(--primary);
}

/* Mega Menu Transitions */
.mega-menu-enter {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mega-menu-enter-start {
    opacity: 0;
    transform: translateY(-10px);
}

.mega-menu-enter-end {
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-leave {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mega-menu-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-leave-end {
    opacity: 0;
    transform: translateY(-10px);
}

.mega-menu-grid {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    padding: 2rem 0;
}



.mega-menu-column {
    padding: 0 1rem;
}

.mega-menu-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.mega-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-list li {
    margin-bottom: 0.5rem;
}

.mega-menu-list a {
    display: block;
    color: var(--text);
    padding: 0.375rem 0;
    font-size: 1rem;
    transition: color var(--transition), padding-left var(--transition);
}

.mega-menu-list a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
    text-decoration: none;
}

/* Mega Menu User Links (Mobile only) */
.mega-menu-user-links {
    flex-direction: column;
    padding: 1rem 0;
}

.mega-menu-user-links .menu-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--text);
    font-size: 0.9rem;
}

.mega-menu-user-links .menu-link:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Mobile Mega Menu - Right Side Drawer */
@media (max-width: 768px) {
    .mega-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 80%;
        max-width: 320px;
        overflow-y: auto;
        padding-top: 4rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .mega-menu.open {
        transform: translateX(0);
    }

    .mega-menu-grid {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .mega-menu-column {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .mega-menu-column:last-child {
        border-bottom: none;
    }

    /* Close button */
    .mega-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: #999;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10;
        padding: 0.5rem;
        line-height: 1;
        transition: color var(--transition);
    }

    .mega-menu-close:hover {
        color: var(--primary);
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: auto;
}

.site-footer .container {
    text-align: center;
}

.footer-links {
    margin-bottom: 1.25rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-links .divider {
    color: var(--text-muted);
    margin: 0 0.75rem;
}

.footer-info {
    margin-bottom: 1rem;
}

.footer-info p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-info a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-info a:hover {
    color: var(--text-light);
    text-decoration: none;
}

.footer-copyright {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

/* --------------------------------------------------------------------------
   Mobile Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .top-block .container {
        padding: 0.5rem 1rem;
    }

    .banner-center .banner-img {
        max-height: 45px;
    }

    .site-footer {
        padding: 1.5rem 0;
    }

    .footer-links a {
        display: inline-block;
        margin: 0.25rem 0;
    }

    .footer-links .divider {
        display: none;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* --------------------------------------------------------------------------
   Grid System (Simple responsive grid)
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid {
        gap: 0.5rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

thead {
    background-color: #e5e7eb;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
}

tbody tr:hover {
    background-color: rgba(0, 64, 148, 0.03);
}

/* ==========================================================================
   Hero Section & Carousel
   ========================================================================== */

/* Hero Section Container */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 450px;
    max-height: 700px;
    overflow: hidden;
}

/* Slideshow Container */
.slideshow {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Individual Slides */
.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* Dark Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

/* Hero Content */
.hero-content,
.hero-content-en {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.hero-content {
    align-items: center;
    z-index: 3;
}

.hero-content-en {
    align-items: flex-end;
    /* Align to bottom */
    z-index: 10;
    padding-bottom: 5rem;
    /* Space for indicators */
    pointer-events: none;
}

.hero-content-en .hero-link {
    pointer-events: auto;
}

.hero-link {
    text-decoration: none;
    color: white;
}

.hero-link:hover {
    text-decoration: none;
}

/* Hero Card */
.hero-card {
    text-align: center;
    max-width: 700px;
    padding: 3rem 4rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition), box-shadow var(--transition);
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hero-logo {
    width: auto;
    max-width: 250px;
    height: auto;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    background-color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

/* Slide Caption */
.slide-caption {
    position: absolute;
    bottom: 4.5rem;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    text-align: center;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.7) 100%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 400;
    z-index: 3;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.slide-caption.active {
    opacity: 1;
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 4;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

.indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* Slide Navigation Arrows */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.7;
}

.slide-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.slide-arrow-prev {
    left: 2rem;
}

.slide-arrow-next {
    right: 2rem;
}

/* Mobile Adjustments for Hero */
@media (max-width: 768px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero-card {
        padding: 2rem;
        margin: 1rem;
    }

    .hero-logo {
        max-width: 180px;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .slide-arrow {
        width: 40px;
        height: 40px;
    }

    .slide-arrow-prev {
        left: 1rem;
    }

    .slide-arrow-next {
        right: 1rem;
    }

    .slide-indicators {
        bottom: 1.5rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* --------------------------------------------------------------------------
   Information Page (통합 정보 페이지) - 기존 .card 스타일 활용
   -------------------------------------------------------------------------- */
.information-page {
    margin: 0 auto;
    padding: 0.5rem 0;
}

.info-section {
    scroll-margin-top: 140px;
    /* 헤더 높이만큼 오프셋 */
}

/* card-header 내 section-header: 제목과 버튼 정렬 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
}

/* 작은 버튼 스타일 */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.empty-message {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
}

/* --------------------------------------------------------------------------
   Edit Page (편집 페이지) - 기존 .card, 폼 스타일 활용
   -------------------------------------------------------------------------- */
.edit-card {
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.grid .form-group {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* TinyMCE Container 스타일 */
.tox-tinymce {
    border-radius: var(--radius) !important;
}

@media (max-width: 768px) {
    .info-section {
        scroll-margin-top: 80px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Authentication Pages (로그인, 회원가입)
   -------------------------------------------------------------------------- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 480px;
}

.auth-card.wide {
    max-width: 800px;
}

.auth-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--text);
}

.auth-form label i {
    color: var(--primary);
}

.auth-footer {
    text-align: center;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    margin: 0;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Elements */
.required {
    color: #dc2626;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label a {
    color: var(--primary);
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.terms {
    margin-top: 1.5rem;
}

.terms .checkbox-label {
    align-items: flex-start;
}

.terms .checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.btn-full {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert p {
    margin: 0;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.error-text {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        margin: 0;
    }
}

/* --------------------------------------------------------------------------
   Profile Page (프로필 페이지)
   -------------------------------------------------------------------------- */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.profile-card {
    margin-bottom: 1.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 2.5rem;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    color: var(--text);
    margin: 0 0 0.25rem 0;
}

.profile-username {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-group:last-child {
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.detail-label i {
    color: var(--primary);
    font-size: 1.1rem;
}

.detail-value {
    color: var(--text);
    font-weight: 500;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    min-width: 150px;
}

/* Profile Specific Inputs */
.readonly-input {
    background: transparent;
    border: none;
    color: var(--text);
    font-weight: 500;
    width: 100%;
    padding: 0;
    outline: none;
    font-size: inherit;
    font-family: inherit;
    text-align: right;
}

.editable-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    transition: border-color var(--transition);
    text-align: left;
}

.editable-input:focus {
    border-color: var(--primary);
    outline: none;
}

/* Admin Section */
.admin-card {
    border-left: 4px solid var(--primary);
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0;
}

.admin-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
}

.admin-link:hover {
    background-color: var(--contrast);
    color: var(--primary);
    text-decoration: none;
}

.admin-link i {
    font-size: 1.25rem;
    color: var(--primary);
}

@media (max-width: 480px) {
    .profile-container {
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-avatar i {
        font-size: 3rem;
    }

    .detail-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Post Images & Attachments
   -------------------------------------------------------------------------- */
.post-images {
    margin-bottom: 1.5rem;
}

.post-images .post-image {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.post-images .post-image img {
    max-width: 80%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-attachments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-attachments h4 {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-attachments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-attachments li {
    padding: 0.25rem 0;
}

.post-attachments a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.post-attachments a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.post-attachments a i {
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
    .pagination-bar {
        grid-template-columns: 1fr;
    }
}

.pagination-search {
    display: flex;
    align-items: center;
}

.pagination-search form {
    display: flex;
    gap: 0.25rem;
}

.pagination-search input[type="text"] {
    padding: 0.375rem 0.75rem;
    width: 250px;
}

.pagination-search button {
    padding: 0.375rem 0.75rem;
}

.pagination-actions {
    display: flex;
    justify-content: flex-end;
}

.pagination-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 50px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-prev,
.pagination-next {
    display: flex;
    gap: 0.25rem;
    min-width: 80px;
}

.pagination-prev {
    justify-content: flex-end;
}

.pagination-next {
    justify-content: flex-start;
}

.page-info {
    text-align: center;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    min-width: 60px;
}

.pagination-goto {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.pagination-goto input[type="number"] {
    width: 60px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    appearance: textfield;
    /* Remove spinner arrows for clean look */
    -moz-appearance: textfield;
}

.pagination-goto input[type="number"]::-webkit-outer-spin-button,
.pagination-goto input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-goto button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Comments */
.comments-section {
    margin-top: 2.5rem;
    overflow: hidden;
    background-color: var(--contrast) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.comments-section .card-header {
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-bottom: 1px solid var(--border);
}

.comments-section h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comment-count {
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-weight: 500;
}

.comment-list {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment {
    background: #fff;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition), box-shadow var(--transition);
}

.comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.comment-date {
    color: var(--text-muted);
}

.comment-content {
    line-height: 1.6;
    color: var(--text);
    word-break: break-all;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.comment-form textarea:focus {
    border-color: var(--primary);
    background-color: #f8fafc;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-submit-btn {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    transition: all var(--transition);
    border: none;
    outline: none;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.back-to-top i {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }
}

/* --------------------------------------------------------------------------
   Modals (Alpine.js supported)
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    animation: modal-fade-in 0.2s ease-out;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem 1.25rem;
    color: var(--text);
    line-height: 1.5;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: var(--contrast);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: inherit;
    line-height: 1;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Post List Comments
   -------------------------------------------------------------------------- */
.comment-row td {
    border-top: none;
    padding-top: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    /* Apply text-light color to all cells in comment row */
}

/* Ensure no border between post and its first comment if desired, 
   but post row usually has border-bottom.
   We want comments to look like part of the post. */
.post-table tr:has(+ .comment-row) td {
    border-bottom: none;
}

.comment-row .col-title {
    text-align: left;
    padding-left: 1.5rem !important;
    /* Indent comment content */
}

.comment-row .ri-corner-down-right-line {
    margin-right: 0.5rem;
    color: var(--text-light);
}

.comment-row .comment-content {
    word-break: break-all;
    font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   Notice Row (Pinned Posts)
   -------------------------------------------------------------------------- */
.notice-row {
    background-color: rgba(230, 57, 70, 0.08) !important;
}

.notice-row td {
    font-weight: 500;
    background-color: rgba(230, 57, 70, 0.08) !important;
}

.notice-row .col-num {
    color: var(--primary);
}

.notice-row .col-num i {
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Secret Comments
   -------------------------------------------------------------------------- */
.comment-secret {
    background-color: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--text-light);
}

.comment-secret .secret-label {
    font-size: 0.75rem;
    color: var(--text-light);
    background-color: var(--border);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    margin-left: 0.5rem;
}

.comment-hidden .comment-content {
    color: var(--text-light);
    font-style: italic;
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.secret-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-light);
}

.secret-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.secret-checkbox i {
    font-size: 1rem;
}

/* ==========================================================================
   Latest Posts Section Utilities
   ========================================================================== */
/* Header Flex Layout */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Post List Styling */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.post-item:last-child {
    border-bottom: none;
}

/* Flex Utilities (Minimal) */
.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* Text & Spacing Utilities */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-center {
    text-align: center !important;
}

.text-dark {
    color: var(--text) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Bootstrap-like Spacing Helpers (Minimal) */
.m-0 {
    margin: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.p-0 {
    padding: 0 !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Badge for Notice */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    border-radius: 0.25rem;
}

.badge-info {
    background-color: var(--primary-light);
}

.badge-light {
    background-color: var(--border);
    color: var(--text-dark) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

/* Helper for height */
.h-100 {
    height: 100% !important;
}

/* --------------------------------------------------------------------------
   Toast Notification
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex !important;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    position: relative;
    background-color: #333;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 90vw;
    pointer-events: auto;
    font-size: 0.95rem;
    min-width: 300px;
    justify-content: space-between;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.toast span {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
}

.toast-close:hover {
    color: white;
}

/* Toast Types */
.toast-success {
    background-color: #2e7d32;
}

.toast-error {
    background-color: #d32f2f;
}

.toast-warning {
    background-color: #ed6c02;
}

.toast-info {
    background-color: #0288d1;
}

/* Toast Transitions */
.toast-enter {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-enter-start {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

.toast-enter-end {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-leave {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-leave-start {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-leave-end {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

/* Book Detail Styles */
.book-cover img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

.book-cover-placeholder {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #adb5bd;
    border: 1px solid #eaeaea;
}

.book-meta {
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.6;
    border-top: 2px solid #333;
}

.book-meta-item {
    display: flex;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.book-meta-label {
    font-weight: 600;
    width: 120px;
    color: #444;
}

.book-meta-value {
    flex: 1;
    color: #222;
}

/* Explicit flex layout for book_detail */
.book-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.book-layout>.book-cover {
    flex: 0 0 calc(50% - 1.25rem);
    max-width: calc(50% - 1.25rem);
}

.book-layout>.book-info {
    flex: 0 0 calc(50% - 1.25rem);
    max-width: calc(50% - 1.25rem);
}

@media (max-width: 768px) {
    .book-layout {
        flex-direction: column;
    }

    .book-layout>.book-cover,
    .book-layout>.book-info {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
}

/* =========================================
   연혁 (History Table) 스타일
   ========================================= */
#history table {
    border-collapse: collapse;
    width: 100%;
    border: none !important;
}

#history table th,
#history table td,
#history table tr {
    border: none !important;
    /* 표의 모든 선 제거 */
    background-color: transparent !important;
}

/* 첫 번째 열: 연도 */
#history table td:nth-child(1) {
    font-weight: bold;
    font-size: 24px;
    color: var(--primary) !important;
    /* 연도를 파란색으로 */
    text-align: right;
    padding: 15px 15px 15px 0;
    width: 120px;
}

/* 두 번째 열: 날짜 (연도와 날짜 사이 세로선) */
#history table td:nth-child(2) {
    border-left: 2px solid var(--border) !important;
    /* 세로선 살림 */
    padding: 15px 0 15px 20px;
    width: 130px;
    white-space: nowrap;
}

/* 세 번째 열: 내용 */
#history table td:nth-child(3) {
    padding: 15px 0 15px 0;
}

/* =========================================
   Dark Mode Overrides
   ========================================= */

@media (prefers-color-scheme: dark) {

    :root:not([data-theme="light"]) .section-header h2,
    :root:not([data-theme="light"]) #history table td:nth-child(1) {
        color: #60a5fa !important;
        /* 더 밝은 파란색 */
    }

    /* TinyMCE 및 일반 테이블 헤더 배경/글자색 강제 조정 */
    :root:not([data-theme="light"]) .page-content th,
    :root:not([data-theme="light"]) table th {
        background-color: var(--border) !important;
        color: var(--text) !important;
        border-color: var(--border) !important;
    }

    :root:not([data-theme="light"]) .page-content td,
    :root:not([data-theme="light"]) table td {
        border-color: var(--border) !important;
    }
}

[data-theme="dark"] .section-header h2,
[data-theme="dark"] #history table td:nth-child(1) {
    color: #60a5fa !important;
}

[data-theme="dark"] .page-content th,
[data-theme="dark"] table th {
    background-color: var(--border) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .page-content td,
[data-theme="dark"] table td {
    border-color: var(--border) !important;
}