/* --- リセット＆ベース設定 --- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0; padding: 0;
}

:root {
    --header-height: 160px;
    --bg: #ffffff;
    --text-main: #333333;
    --text-sub: #888888;
    --border: #eeeeee;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* --- ヘッダー（色反転デザイン） --- */
.global-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    z-index: 2000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.4s ease;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 30px; width: 100%; }

.brand-logo { font-weight: 200; letter-spacing: 0.4em; font-size: 1.8rem; margin: 0 0 20px 0; text-align: center; }

.nav-list { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; gap: 30px; }

.nav-list a {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    padding: 10px 20px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-list a:hover { color: var(--text-main); background-color: #f8f8f8; }

/* 選択中のメニュー（色反転） */
.nav-list a.current {
    color: #ffffff;
    background-color: var(--text-main);
    font-weight: 500;
}

main.container, main.home-main { padding-top: var(--header-height); }

.global-footer { padding: 100px 0 60px; text-align: center; font-size: 0.8rem; color: var(--text-sub); letter-spacing: 0.1em; }

/* --- スマホ最適化 --- */
@media (max-width: 768px) {
    :root { --header-height: 100px; }
    .container { padding: 0 20px; }
    .brand-logo { font-size: 1.3rem; letter-spacing: 0.2em; margin: 0 0 10px 0; }
    
    .nav-list { 
        gap: 10px; 
        justify-content: flex-start;
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        padding-bottom: 2px; 
        -ms-overflow-style: none; 
        scrollbar-width: none; 
    }
    .nav-list::-webkit-scrollbar { display: none; }
    
    .nav-list li:first-child { margin-left: auto; }
    .nav-list li:last-child { margin-right: auto; }
    
    .nav-list a { 
        font-size: 0.65rem; 
        letter-spacing: 0.1em; 
        padding: 6px 10px; 
        white-space: nowrap; 
        flex-shrink: 0; 
        display: block;
    }
    
    .global-footer { padding: 60px 0 40px; }
}

.copyright {
    font-size: 0.85rem;
    color: #666;
}

.copyright a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.copyright a:hover {
    text-decoration: underline;
}

/* --- ローディングスピナー --- */
#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--text-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}