body {
    font-family: 'Segoe UI', sans-serif;
    margin: 2em;
    background-color: #fafafa;
    line-height: 1.6;
}
h1 { font-size: 1.6em; margin-bottom: 0.5em; }
h2 { font-size: 1.2em; margin-top: 1.8em; color: #333; }
h3 { font-size: 1.05em; margin-top: 1em; color: #444; }
.breadcrumb a { color: #007bff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.link-group {
    background: white;
    padding: 1em;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    margin-bottom: 2em;
}
.link-group a {
    display: inline-block;
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    margin: 0.2em;
    transition: background 0.2s;
}
.link-group a:hover { background: #0056b3; }
main {
    background: white;
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

/* --- 共通ヘッダーCSS --- */
header {
    background: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

/* スマホ用 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: #34495e;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* レイアウト全体 */
.layout-container {
  display: flex;
  min-height: calc(100vh - 100px); /* ヘッダー・フッター分を除く高さ */
}

/* --- 共通サイドバーCSS --- */
.sidebar {
    background: #f8f8f8;
    padding: 16px;
    border-right: 1px solid #ddd;
    width: 240px;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar ul li {
    margin-bottom: 6px;
}

.sidebar ul li a {
    color: #333;
    text-decoration: none;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}


/* --- 共通フッターCSS --- */
footer {
    background: #2c3e50;
    color: white;
    padding: 24px;
    margin-top: 40px;
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 180px;
}

.footer-section h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
}

.footer-section a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 6px;
}

.footer-section a:hover {
    text-decoration: underline;
}

.copy {
    text-align: center;
    margin-top: 16px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
}