:root {
    /* Colors */
    --color-kakiemon: #D15B1D;
    --color-crafts: #1982C4;
    --color-center: #27A38D;
    --color-visuals: #B9A722;
    --color-links: #6A4C93;

    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f7;

    /* Typography */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Layout */
    --max-width: 980px;
    --header-height: 48px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-sm);
}

.logo {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.site-nav ul {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--color-text);
}

/* Main Content */
.site-main {
    padding-top: calc(var(--header-height) + var(--spacing-lg));
    padding-bottom: var(--spacing-xl);
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    flex: 1;
}

@media (max-width: 768px) {
    .site-main {
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Typography & Markdown Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.03em;
}

/* ページ先頭の見出しは上部余白を相殺して余分な余白を防ぐ */
.site-main>*:first-child,
.site-main>h1:first-child,
.site-main>h2:first-child {
    margin-top: 0 !important;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 3.5rem;
    margin-bottom: 3.0rem;
}

h2 {
    font-size: 1.6rem;
    margin-top: 2.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
    padding-bottom: var(--spacing-xs);
}

h3 {
    font-size: 1.3rem;
    margin-top: 2.00rem;
    margin-bottom: 1.00rem;
}

h4 {
    font-size: 1.1rem;
    margin-top: 1.50rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 2.0rem;
    line-height: 1.9;
    letter-spacing: 0.04em;
}

ul,
ol {
    margin-bottom: 2.0rem;
    padding-left: 1.75rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

li:last-child {
    margin-bottom: 0;
}

blockquote {
    margin: 2.5rem 0;
    padding: 0.75rem 1.5rem;
    border-left: 4px solid #d1d1d6;
    color: #636366;
    background-color: #f2f2f7;
    border-radius: 0 8px 8px 0;
}

blockquote p {
    margin-bottom: 0;
}

hr {
    border: none;
    border-top: 1px solid #e5e5ea;
    margin: 3.5rem 0;
}

a {
    color: var(--color-links);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* Main Visual (Markdown Image) */
.site-main img:not(.news-image) {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin-top: 3.0rem;
    margin-bottom: 3.0rem;
}

/* Ensure paragraph wrapper doesn't add extra space if needed */
.site-main p:has(img) {
    margin-bottom: 0;
}

/* Adjust Main for Top Page */
body.top .site-main {
    padding-top: var(--header-height);
}

/* 記事詳細および固定ページの本文横幅を可読性の高い幅に制限 (620px - 660px の中間の640px) */
body.article .site-main,
body.page .site-main {
    max-width: 640px;
}

/* Nav Button Cards Grid Component */
.nav-buttons-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.nav-button-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 21 / 8;
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: linear-gradient(135deg, #2b303a 0%, #17191e 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-button-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.site-main .nav-button-card img.nav-button-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin: 0;
    transition: transform 0.5s ease;
}

.nav-button-card:hover img.nav-button-card__image {
    transform: scale(1.06);
}

.nav-button-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.65) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem 1.5rem;
}

.nav-button-card__title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .nav-buttons-grid {
        gap: 1.0rem;
    }
    
    .nav-button-card {
        aspect-ratio: 16 / 9;
    }
    
    .nav-button-card__overlay {
        padding: 1.0rem;
    }
    
    .nav-button-card__title {
        font-size: 1.1rem;
    }
}