/* ============================
   桜丘大学 - メインスタイルシート
   Design System + Components
   ============================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Primary Colors - Deep Navy & Gold */
    --color-primary: #403999;
    --color-primary-light: #524cc2;
    --color-primary-dark: #2d2870;
    --color-accent: #ffc107;
    --color-accent-light: #ffcd38;
    --color-accent-dark: #d39e00;

    /* Semantic Colors */
    --color-success: #2ecc71;
    --color-error: #e74c3c;
    --color-warning: #f39c12;
    --color-info: #3498db;

    /* Neutrals */
    --color-bg: #f8f9fc;
    --color-bg-alt: #eef1f7;
    --color-surface: #ffffff;
    --color-surface-hover: #f0f2f8;
    --color-text: #1a1a2e;
    --color-text-light: #5a5f7a;
    --color-text-muted: #8e92a8;
    --color-border: #d8dce8;
    --color-border-light: #eceef5;

    /* Category Colors */
    --color-cat-important: #e74c3c;
    --color-cat-event: #3498db;
    --color-cat-student: #2ecc71;
    --color-cat-general: #95a5a6;

    /* Typography */
    --font-family-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    --font-family-en: 'Outfit', 'Noto Sans JP', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3.5rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 27, 61, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 27, 61, 0.08);
    --shadow-lg: 0 8px 30px rgba(15, 27, 61, 0.12);
    --shadow-xl: 0 16px 48px rgba(15, 27, 61, 0.16);
    --shadow-glow: 0 0 30px rgba(200, 164, 92, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --header-height: 80px;
    --header-top-height: 36px;
    --container-max: 1200px;
    --container-narrow: 800px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-ja);
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.4;
    font-weight: 700;
}

/* --- Container --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ============================
   SIDE DRAWER (左サイドメニュー)
   ============================ */
.side-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.side-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--color-primary);
    z-index: 1200;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.45s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    will-change: transform;
}

.side-drawer.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.28);
}

/* Staggered reveal of menu items when the drawer opens */
.side-drawer-list > li {
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.side-drawer.open .side-drawer-list > li {
    opacity: 1;
    transform: translateX(0);
}

.side-drawer.open .side-drawer-list > li:nth-child(1) { transition-delay: 0.10s; }
.side-drawer.open .side-drawer-list > li:nth-child(2) { transition-delay: 0.16s; }
.side-drawer.open .side-drawer-list > li:nth-child(3) { transition-delay: 0.22s; }
.side-drawer.open .side-drawer-list > li:nth-child(4) { transition-delay: 0.28s; }
.side-drawer.open .side-drawer-list > li:nth-child(5) { transition-delay: 0.34s; }

/* モーション低減を希望するユーザーには演出を抑制 */
@media (prefers-reduced-motion: reduce) {
    .side-drawer,
    .side-drawer-list > li,
    .side-drawer.open .side-drawer-list > li,
    .drawer-toggle-bars span {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

.side-drawer-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-lg);
    height: var(--header-height);
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-drawer-title {
    font-family: var(--font-family-en);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.2em;
}

.side-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
    padding: 4px;
}

.side-drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.side-drawer-list {
    list-style: none;
    padding: var(--space-lg) 0;
    flex: 1;
}

.side-drawer-link {
    display: block;
    padding: var(--space-md) var(--space-xl);
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: var(--font-size-base);
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.side-drawer-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff !important;
    border-left-color: var(--color-accent);
    padding-left: calc(var(--space-xl) + 4px);
}

.side-drawer-link.active {
    color: var(--color-accent-light) !important;
    border-left-color: var(--color-accent);
    font-weight: 700;
}

.side-drawer-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-drawer-accordion-toggle {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: var(--font-size-xl);
    padding: var(--space-md);
    cursor: pointer;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.side-drawer-accordion-toggle:hover {
    color: #fff;
}

.side-drawer-accordion-toggle .accordion-icon {
    display: inline-block;
    transition: transform var(--transition-base);
}

.side-drawer-accordion-toggle[aria-expanded="true"] .accordion-icon {
    transform: rotate(135deg);
}

.side-drawer-sublist {
    list-style: none;
    padding: 0 0 0 var(--space-xl);
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.side-drawer-sublink {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.side-drawer-sublink:hover {
    color: #fff;
}

.side-drawer-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--font-size-xs);
}

/* ============================
   EMERGENCY BAR
   ============================ */
.emergency-bar {
    background-color: #ffff00;
    color: #000;
    padding: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    font-weight: 500;
    z-index: 1200;
    position: relative;
}

.emergency-bar strong {
    font-weight: 900;
    margin-right: var(--space-xs);
}

/* ============================
   HEADER
   ============================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.header-main {
    height: var(--header-height);
}

.header-main-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

/* Drawer Toggle Button */
.drawer-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    position: relative;
    z-index: 1201;
}

.drawer-toggle:hover {
    background: var(--color-bg-alt);
}

/* Animated hamburger -> X */
.drawer-toggle-bars {
    position: relative;
    display: block;
    width: 24px;
    height: 16px;
}

.drawer-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: var(--color-primary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                background 0.25s ease;
}

.drawer-toggle-bars span:nth-child(1) { top: 0; }
.drawer-toggle-bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.drawer-toggle-bars span:nth-child(3) { bottom: 0; }

/* Active state: morph into an X (sits over the dark drawer -> white) */
.drawer-toggle.active .drawer-toggle-bars span {
    background: #fff;
}

.drawer-toggle.active .drawer-toggle-bars span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.drawer-toggle.active .drawer-toggle-bars span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0.4);
}

.drawer-toggle.active .drawer-toggle-bars span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.drawer-toggle.active:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: var(--font-size-lg);
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.logo-name-en {
    font-family: var(--font-family-en);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* Navigation */
.nav-list {
    display: flex;
    gap: var(--space-xs);
}

.nav-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--color-text) !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover {
    color: var(--color-primary) !important;
    background: var(--color-bg-alt);
}

.nav-link.active {
    color: var(--color-primary) !important;
    font-weight: 700;
}

/* ============================
   FLASH MESSAGES (Toast Notifications)
   ============================ */
.flash-message {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideUpFade 0.4s ease forwards;
    pointer-events: none;
    max-width: 400px;
}

.flash-message.fade-out {
    animation: fadeOutDown 0.4s ease forwards;
}

.flash-success {
    background: var(--color-surface);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

.flash-error {
    background: var(--color-surface);
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

@keyframes slideUpFade {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOutDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
}

/* ============================
   HERO SECTION
   ============================ */
.hero {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, #2a4080 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(200, 164, 92, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200, 164, 92, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(52, 152, 219, 0.06) 0%, transparent 40%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    background: rgba(200, 164, 92, 0.15);
    border: 1px solid rgba(200, 164, 92, 0.3);
    border-radius: var(--radius-full);
    color: var(--color-accent-light);
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-size: var(--font-size-4xl);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero h1 span {
    display: block;
    font-family: var(--font-family-en);
    font-size: var(--font-size-lg);
    font-weight: 400;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-sm);
}

.hero-description {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.8);
    line-height: 2;
    margin-bottom: var(--space-2xl);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Floating particles decoration */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(200, 164, 92, 0.3);
    border-radius: 50%;
    animation: float-particle linear infinite;
}

.hero-particles span:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 20%; animation-duration: 22s; animation-delay: 2s; }
.hero-particles span:nth-child(3) { left: 35%; animation-duration: 16s; animation-delay: 4s; }
.hero-particles span:nth-child(4) { left: 50%; animation-duration: 20s; animation-delay: 1s; }
.hero-particles span:nth-child(5) { left: 65%; animation-duration: 24s; animation-delay: 3s; }
.hero-particles span:nth-child(6) { left: 75%; animation-duration: 19s; animation-delay: 5s; }
.hero-particles span:nth-child(7) { left: 85%; animation-duration: 17s; animation-delay: 2s; }
.hero-particles span:nth-child(8) { left: 92%; animation-duration: 21s; animation-delay: 4s; }

@keyframes float-particle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-20vh) scale(1.5); opacity: 0; }
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-family-ja);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--color-error);
    color: #fff;
    border-color: var(--color-error);
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: var(--font-size-base);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-border);
}

.btn-ghost:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ============================
   SECTIONS
   ============================ */
.section {
    padding: var(--space-4xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    margin: var(--space-md) auto 0;
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-family: var(--font-family-en);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    margin-bottom: var(--space-xs);
}

.section-description {
    color: var(--color-text-light);
    max-width: 600px;
    margin: var(--space-md) auto 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

/* ============================
   NEWS (お知らせ)
   ============================ */
.news-filter {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    font-family: var(--font-family-ja);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--color-text);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.news-date {
    flex-shrink: 0;
    text-align: center;
    min-width: 70px;
}

.news-date-day {
    font-family: var(--font-family-en);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.news-date-month {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.news-body {
    flex: 1;
    min-width: 0;
}

.news-category {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: var(--space-xs);
}

.category-important {
    background: rgba(231, 76, 60, 0.1);
    color: var(--color-cat-important);
}

.category-event {
    background: rgba(52, 152, 219, 0.1);
    color: var(--color-cat-event);
}

.category-student {
    background: rgba(46, 204, 113, 0.1);
    color: var(--color-cat-student);
}

.category-general {
    background: var(--color-primary);
    color: #ffffff;
}

.news-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.5;
}

.news-excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: var(--space-xs);
    line-height: 1.6;
}

/* News detail */
.news-detail {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-sm);
}

.news-detail-header {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}

.news-detail-title {
    font-size: var(--font-size-xl);
    margin-top: var(--space-md);
}

.news-detail-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-top: var(--space-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.news-detail-content {
    font-size: var(--font-size-base);
    line-height: 2;
    color: var(--color-text);
}

.news-detail-content a {
    color: #403999;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.news-detail-content a:hover {
    color: var(--color-primary);
}

/* ============================
   CARDS (Faculty / Department)
   ============================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(200, 164, 92, 0.15) 0%, transparent 70%);
}

.card-content {
    padding: var(--space-xl);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.card-title-en {
    font-family: var(--font-family-en);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.card-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-accent-dark);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.card-link:hover {
    color: var(--color-primary);
    gap: var(--space-sm);
}

.card-departments {
    border-top: 1px solid var(--color-border-light);
    padding: var(--space-md) var(--space-xl) var(--space-xl);
}

.card-departments-title {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.card-dept-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.card-dept-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    transition: all var(--transition-fast);
}

.card-dept-tag:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ============================
   DEPARTMENT DETAIL PAGE
   ============================ */
.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: var(--space-4xl) 0 var(--space-3xl);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 164, 92, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.breadcrumb {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7) !important;
}

.breadcrumb a:hover {
    color: var(--color-accent-light) !important;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-current {
    color: rgba(255, 255, 255, 0.9);
}

.page-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: 900;
    margin-bottom: var(--space-sm);
}

.page-header .page-subtitle {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.7);
}

.dept-detail-section {
    padding: var(--space-3xl) 0;
}

.dept-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.dept-info-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}

.dept-info-card h3 {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dept-info-card p {
    color: var(--color-text-light);
    line-height: 2;
}

.dept-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.dept-tag {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
}

/* ============================
   CONTACT PAGE
   ============================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.contact-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-card h3 {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
}

.contact-info-content {
    flex: 1;
}

.contact-info-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: 500;
}

.contact-info-value {
    font-size: var(--font-size-base);
    color: var(--color-text);
    font-weight: 500;
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
    margin-top: var(--space-2xl);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* Faculty office contacts table */
.office-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-lg);
}

.office-table th,
.office-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--font-size-sm);
}

.office-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.office-table tr:hover td {
    background: var(--color-surface-hover);
}

/* ============================
   ADMIN PAGES
   ============================ */
.admin-header {
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-xl) 0;
}

.admin-header h1 {
    font-size: var(--font-size-xl);
}

.admin-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.admin-content {
    padding: var(--space-2xl) 0;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}

.admin-table th,
.admin-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.admin-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    white-space: nowrap;
}

.admin-table td {
    font-size: var(--font-size-sm);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: var(--color-surface-hover);
}

.admin-table .actions {
    display: flex;
    gap: var(--space-sm);
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-published {
    background: rgba(46, 204, 113, 0.1);
    color: var(--color-success);
}

.badge-draft {
    background: rgba(149, 165, 166, 0.1);
    color: var(--color-text-muted);
}

/* ============================
   FORMS
   ============================ */
.form-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}

.form-group {
    margin-bottom: var(--space-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.form-label .required {
    color: var(--color-error);
    margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-family-ja);
    font-size: var(--font-size-base);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.15);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.8;
}

.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.form-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

.form-error {
    color: var(--color-error);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

/* ============================
   LOGIN PAGE
   ============================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0EFFF;
    padding: var(--space-xl);
}

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-header .logo-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.login-header h1 {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
}

.login-header p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.login-error {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    color: var(--color-error);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* ============================
   FOOTER
   ============================ */
.site-footer {
    background: #403999;
    color: #ffffff;
    padding: var(--space-4xl) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.footer-logo .logo-name {
    color: #ffffff;
}

.footer-logo .logo-name-en {
    color: rgba(255, 255, 255, 0.5);
}

.footer-address,
.footer-tel {
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

.footer-heading {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.footer-links ul li {
    margin-bottom: var(--space-sm);
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--color-accent-light) !important;
    padding-left: var(--space-sm);
}

.footer-bottom {
    text-align: center;
    padding: var(--space-xl) 0;
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.4);
}

/* ============================
   ANIMATIONS (Fade in on scroll)
   ============================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================
   UTILITY
   ============================ */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xl);
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--color-primary);
    gap: var(--space-md);
}

/* Confirm delete section */
.confirm-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.confirm-card h2 {
    color: var(--color-error);
    margin-bottom: var(--space-lg);
}

.confirm-card p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.confirm-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* Quick stats on admin dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-family: var(--font-family-en);
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* Admin nav */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--color-border-light);
    padding-bottom: var(--space-md);
}

.admin-nav a {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--color-primary);
    color: #fff;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dept-info-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2.25rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
        --space-4xl: 3rem;
        --space-3xl: 2.5rem;
    }

    /* モバイルではヘッダーのナビを非表示にしドロワーのみ使用 */
    .main-nav {
        display: none;
    }

    .hero {
        min-height: 420px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .news-item {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .news-date {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: var(--space-sm);
    }

    .news-date-day {
        font-size: var(--font-size-lg);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .admin-toolbar {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .form-actions {
        flex-direction: column;
    }

    .confirm-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-content {
        padding: var(--space-2xl) var(--space-md);
    }

    .login-card {
        padding: var(--space-xl);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        flex-wrap: wrap;
    }
}

/* ============================
   QUILL EDITOR OVERRIDES
   ============================ */
.ql-editor {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-family-ja) !important;
    line-height: 1.8 !important;
}
