/*
Theme Name: AI時間 Theme
Theme URI: https://aijikan.com
Author: ムカイ
Author URI: https://aijikan.com
Description: 個人事業主エンジニア・ムカイのAI×副業ブログ「AI時間」専用のオリジナルテーマ。白背景×ブルー(#2563EB)のクリーン・ライトデザイン。レスポンシブ対応・SEO対応済み。
Version: 2.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aijikan
Tags: dark, one-column, two-columns, right-sidebar, responsive-layout, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, blog
*/

/* ==========================================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================================== */
:root {
    /* Colors (Light theme - high contrast) */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F8FAFC;
    --color-bg-tertiary: #F1F5F9;
    --color-bg-elevated: #FFFFFF;

    --color-accent: #2563EB;
    --color-accent-hover: #1D4ED8;
    --color-accent-dark: #1E40AF;
    --color-accent-soft: #3B82F6;
    --color-accent-glow: rgba(37, 99, 235, 0.18);
    --color-accent-dim: rgba(37, 99, 235, 0.08);

    /* Heading: almost black for max contrast */
    --color-heading: #0F172A;
    /* Body text: slate-800 */
    --color-text-primary: #1E293B;
    /* Sub text: slate-600 */
    --color-text-secondary: #475569;
    /* Muted: slate-500 (AAに近づける) */
    --color-text-muted: #64748B;

    --color-border: rgba(15, 23, 42, 0.1);
    --color-border-strong: rgba(15, 23, 42, 0.18);
    --color-divider: rgba(15, 23, 42, 0.08);

    /* Typography */
    --font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-10: 4rem;
    --space-12: 6rem;

    /* Layout */
    --container-max: 1200px;
    --content-max: 760px;
    --sidebar-width: 300px;

    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    --shadow-glow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-glow-md: 0 4px 14px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
    --shadow-glow-lg: 0 16px 32px rgba(15,23,42,0.12), 0 6px 12px rgba(15,23,42,0.06);
    --shadow-header: 0 2px 12px rgba(15,23,42,0.08);

    /* Header height */
    --header-height: 72px;
}

/* ==========================================================================
   2. 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-sans);
    font-size: var(--text-base);
    line-height: 1.85;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    background-image: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    font-feature-settings: "palt";
}

/* Reading progress bar (top of page) */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #2563EB, #3B82F6, #60A5FA);
    z-index: 10000;
    transition: width 80ms linear;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
    pointer-events: none;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.005em;
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); font-weight: 800; }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl); font-weight: 700; }
h5 { font-size: var(--text-lg); font-weight: 700; }
h6 { font-size: var(--text-base); font-weight: 700; }

p { margin-bottom: var(--space-4); }

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--color-bg-tertiary);
    color: #BE185D;
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

pre {
    font-family: var(--font-mono);
    background-color: #0F172A;
    color: #E2E8F0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    overflow-x: auto;
    font-size: var(--text-sm);
    line-height: 1.7;
}
pre code {
    background: none;
    border: none;
    padding: 0;
    color: #E2E8F0;
}

blockquote {
    border-left: 4px solid var(--color-accent);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-5) 0;
    background-color: var(--color-bg-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--color-text-primary);
}
blockquote p:last-child { margin-bottom: 0; }

hr {
    border: none;
    border-top: 1px solid var(--color-divider);
    margin: var(--space-8) 0;
}

/* ==========================================================================
   4. Layout - Container
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
    position: relative;
    z-index: 1;
}

.site-main {
    min-height: calc(100vh - var(--header-height) - 300px);
    padding: var(--space-10) 0;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   5. Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition-base), background-color var(--transition-base);
}
.site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-header);
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.site-branding {
    display: flex;
    align-items: center;
}
.site-branding a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.site-logo {
    height: 44px;
    width: auto;
    transition: transform var(--transition-base);
}
.site-branding a:hover .site-logo {
    transform: scale(1.03);
}

.site-title {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: 0.02em;
}

/* Primary Nav */
.primary-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.primary-nav ul {
    display: flex;
    gap: var(--space-1);
}
.primary-nav a {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    position: relative;
    transition: all var(--transition-fast);
}
.primary-nav a::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transform: translateX(-50%);
    transition: width var(--transition-base);
    border-radius: 2px;
}
.primary-nav a:hover {
    color: var(--color-accent);
    text-decoration: none;
}
.primary-nav a:hover::before {
    width: calc(100% - var(--space-8));
}
.primary-nav .current-menu-item > a {
    color: var(--color-accent);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    background: transparent;
}
.menu-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.menu-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    margin: 4px auto;
    transition: transform var(--transition-base), opacity var(--transition-base);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   6. Hero (Front / Home top)
   ========================================================================== */
.hero {
    padding: var(--space-12) 0 var(--space-10);
    text-align: center;
    position: relative;
}
.hero__eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.2em;
    color: var(--color-accent);
    text-transform: uppercase;
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    margin-bottom: var(--space-5);
    background: var(--color-accent-dim);
}
.hero__title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    line-height: 1.25;
    margin: 0 0 var(--space-4);
    color: var(--color-heading);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.hero__title .accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__subtitle {
    color: var(--color-text-secondary);
    font-size: var(--text-lg);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ==========================================================================
   7. Post Card (Archive / Index)
   ========================================================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-8);
}
@media (max-width: 960px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

.post-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-glow-sm);
}
.post-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, var(--color-accent) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow-lg);
}
.post-card:hover::before {
    opacity: 1;
}

.post-card__thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-bg-tertiary);
    position: relative;
}
.post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.post-card:hover .post-card__thumb img {
    transform: scale(1.05);
}
.post-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    background:
        linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary)),
        radial-gradient(circle at 30% 30%, var(--color-accent-dim), transparent 50%);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    letter-spacing: 0.15em;
}

.post-card__body {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-3);
}
.post-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}
.post-card__category {
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.post-card__title {
    font-size: var(--text-lg);
    line-height: 1.5;
    margin: 0;
    color: var(--color-heading);
    font-weight: 700;
}
.post-card__title a {
    color: inherit;
}
.post-card__title a:hover {
    color: var(--color-accent);
    text-decoration: none;
}
.post-card__excerpt {
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    line-height: 1.8;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card__footer {
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}
.post-card__read-more {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* ==========================================================================
   8. Single Post
   ========================================================================== */
.single-article {
    max-width: var(--content-max);
    margin: 0 auto;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    position: relative;
    box-shadow: var(--shadow-glow-sm);
}
.single-article__header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-divider);
}
.single-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}
.single-article__meta a {
    color: var(--color-accent);
}
.single-article__title {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
    line-height: 1.3;
    margin: 0 0 var(--space-4);
}
.single-article__thumb {
    margin: 0 calc(-1 * var(--space-8)) var(--space-6);
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.single-article__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.single-article__content {
    font-size: var(--text-base);
    line-height: 1.95;
    color: var(--color-text-primary);
}
.single-article__content > *:first-child { margin-top: 0; }
.single-article__content p {
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
}
.single-article__content h2 {
    position: relative;
    padding-left: var(--space-5);
    margin-top: var(--space-10);
    color: var(--color-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    border-bottom: 1px solid var(--color-divider);
    padding-bottom: var(--space-3);
}
.single-article__content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1em;
    bottom: 0.6em;
    width: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}
.single-article__content h3 {
    color: var(--color-heading);
    font-weight: 700;
    position: relative;
    padding-left: var(--space-4);
    margin-top: var(--space-8);
}
.single-article__content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 10px;
    height: 10px;
    background: var(--color-accent);
    border-radius: 50%;
}
.single-article__content h4 {
    color: var(--color-heading);
    border-left: 3px solid var(--color-accent-soft);
    padding-left: var(--space-3);
}
.single-article__content ul,
.single-article__content ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}
.single-article__content ul li,
.single-article__content ol li {
    margin-bottom: var(--space-2);
}
.single-article__content ul { list-style: none; }
.single-article__content ul li {
    position: relative;
}
.single-article__content ul li::before {
    content: "▸";
    position: absolute;
    left: -1.25rem;
    color: var(--color-accent);
}
.single-article__content ol { list-style: decimal; }
.single-article__content img {
    border-radius: var(--radius-md);
    margin: var(--space-5) 0;
    border: 1px solid var(--color-border);
}
.single-article__content a {
    color: var(--color-accent);
    border-bottom: 1px solid var(--color-accent-soft);
    font-weight: 600;
}
.single-article__content a:hover {
    color: var(--color-accent-hover);
    border-bottom-color: var(--color-accent-hover);
    text-decoration: none;
}
.single-article__content strong {
    color: var(--color-heading);
    font-weight: 700;
}

.single-article__footer {
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-divider);
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.tag-list a {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    transition: all var(--transition-fast);
}
.tag-list a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    text-shadow: none;
}

/* Post Navigation */
.post-navigation {
    margin-top: var(--space-8);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.post-navigation a {
    display: block;
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.post-navigation a:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    text-shadow: none;
}
.post-navigation__label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}
.post-navigation__title {
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
}
.post-navigation .nav-next { text-align: right; }

/* ==========================================================================
   9. Page (static)
   ========================================================================== */
.page-article {
    max-width: var(--content-max);
    margin: 0 auto;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-glow-sm);
}

/* ==========================================================================
   10. Pagination
   ========================================================================== */
.pagination {
    margin-top: var(--space-10);
    display: flex;
    justify-content: center;
    gap: var(--space-2);
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-3);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-dim);
    text-shadow: none;
}

/* ==========================================================================
   11. Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: #FFFFFF;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.btn:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
    text-decoration: none;
}
.btn:active {
    transform: translateY(0);
    background: var(--color-accent-dark);
}
.btn--ghost {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text-primary);
    box-shadow: none;
}
.btn--ghost:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-dim);
    box-shadow: none;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: var(--space-12);
    padding: var(--space-10) 0 var(--space-6);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-primary);
}
.site-footer__top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-divider);
}
.footer-branding__logo {
    height: 36px;
    width: auto;
    margin-bottom: var(--space-3);
}
.footer-branding__text {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    max-width: 360px;
}
.footer-col h4 {
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin: 0 0 var(--space-4);
}
.footer-col ul li {
    margin-bottom: var(--space-2);
}
.footer-col a {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}
.footer-col a:hover {
    color: var(--color-accent);
}

.site-footer__bottom {
    padding-top: var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}
.site-footer__bottom a {
    color: var(--color-text-secondary);
}

/* ==========================================================================
   13. 404 / Search
   ========================================================================== */
.error-404,
.no-results {
    text-align: center;
    padding: var(--space-10) var(--space-5);
    max-width: 640px;
    margin: 0 auto;
}
.error-404__code {
    font-family: var(--font-mono);
    font-size: clamp(5rem, 15vw, 9rem);
    line-height: 1;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: var(--space-3);
}

.search-form {
    display: flex;
    gap: var(--space-2);
    max-width: 480px;
    margin: var(--space-5) auto 0;
}
.search-form input[type="search"] {
    flex: 1;
}

/* ==========================================================================
   14. Table
   ========================================================================== */
.single-article__content table,
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-6) 0;
    font-size: var(--text-sm);
    line-height: 1.6;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.single-article__content table thead,
.entry-content table thead {
    background: #2563EB;
    color: #FFFFFF;
}
.single-article__content table thead th,
.entry-content table thead th {
    padding: 12px 16px;
    font-weight: 600;
    text-align: left;
    border: none;
    white-space: nowrap;
}
.single-article__content table tbody tr,
.entry-content table tbody tr {
    border-bottom: 1px solid #E2E8F0;
    transition: background var(--transition-fast);
}
.single-article__content table tbody tr:last-child,
.entry-content table tbody tr:last-child {
    border-bottom: none;
}
.single-article__content table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even) {
    background: #F8FAFC;
}
.single-article__content table tbody tr:hover,
.entry-content table tbody tr:hover {
    background: #EFF6FF;
}
.single-article__content table td,
.entry-content table td {
    padding: 11px 16px;
    color: var(--color-text-primary);
    border: none;
    vertical-align: middle;
}
.single-article__content table th,
.entry-content table th {
    padding: 11px 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    background: #F1F5F9;
    border: none;
    border-right: 1px solid #E2E8F0;
    vertical-align: middle;
    white-space: nowrap;
}
/* スマホ対応: 横スクロール */
.single-article__content .table-wrap,
.entry-content .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--space-6) 0;
}
.single-article__content .table-wrap table,
.entry-content .table-wrap table {
    margin: 0;
    min-width: 500px;
}
@media (max-width: 640px) {
    .single-article__content table,
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* ============================================================
   15. Comments
   ========================================================================== */
.comments-divider {
    border: none;
    border-top: 2px solid #E2E8F0;
    margin: var(--space-8) 0 0;
}
.comments-area {
    max-width: var(--content-max);
    margin: var(--space-6) auto 0;
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}
.comments-title {
    font-size: var(--text-xl);
    margin: 0 0 var(--space-5);
}
.comment-list {
    list-style: none;
    margin: 0 0 var(--space-6);
}
.comment-list li {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-divider);
}
.comment-list li:last-child { border-bottom: none; }
.comment-form label {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}
.comment-form p { margin-bottom: var(--space-4); }

/* ==========================================================================
   15. WordPress Core Utility Classes
   ========================================================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    clip: auto !important;
    height: auto;
    width: auto;
    top: 5px;
    left: 5px;
    z-index: 100000;
    background-color: var(--color-bg-primary);
    color: var(--color-accent);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
}
.alignleft  { float: left;  margin-right: var(--space-4); margin-bottom: var(--space-3); }
.alignright { float: right; margin-left:  var(--space-4); margin-bottom: var(--space-3); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: var(--space-3); }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-2) 0;
}
.sticky { display: block; }
.bypostauthor { display: block; }

/* ==========================================================================
   16. Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    align-items: center;
}
.breadcrumbs a {
    color: var(--color-text-secondary);
}
.breadcrumbs a:hover {
    color: var(--color-accent);
    text-shadow: none;
}
.breadcrumbs__sep {
    color: var(--color-accent);
    opacity: 0.5;
}

/* ==========================================================================
   17. Archive Title
   ========================================================================== */
.archive-header {
    text-align: center;
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--color-divider);
    margin-bottom: var(--space-8);
}
.archive-header__prefix {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}
.archive-header__title {
    font-size: var(--text-4xl);
    margin: 0;
}
.archive-header__desc {
    color: var(--color-text-secondary);
    margin-top: var(--space-3);
}

/* ==========================================================================
   18. Animations
   ========================================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
    animation: fadeUp 500ms ease both;
}

/* Reveal-on-scroll (JS-driven) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-dim); }
    50%      { box-shadow: 0 0 0 8px transparent; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ==========================================================================
   19. Responsive
   ========================================================================== */
@media (max-width: 960px) {
    .site-footer__top {
        grid-template-columns: 1fr 1fr;
    }
    .footer-branding { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .menu-toggle { display: flex; align-items: center; justify-content: center; flex-direction: column; }

    .primary-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-glow-md);
        padding: var(--space-4) var(--space-5);
        transform: translateY(-120%);
        transition: transform var(--transition-base);
        z-index: 99;
    }
    .primary-nav.is-open {
        transform: translateY(0);
    }
    .primary-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    .primary-nav a {
        display: block;
        padding: var(--space-3);
        border-bottom: 1px solid var(--color-divider);
    }
    .primary-nav a::before { display: none; }

    .site-title { font-size: var(--text-base); }
    .site-logo { height: 36px; }

    .single-article,
    .page-article {
        padding: var(--space-5);
        border-radius: var(--radius-md);
    }
    .single-article__thumb {
        margin: 0 calc(-1 * var(--space-5)) var(--space-5);
    }

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

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
    .site-footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .hero { padding: var(--space-8) 0 var(--space-6); }
}

@media (max-width: 480px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }

    .container { padding: 0 var(--space-4); }
    .site-main { padding: var(--space-6) 0; }
}

/* ==========================================================================
   Affiliate: PR表記 / アフィリエイトボックス / 読了後CTA
   ========================================================================== */

/* 記事冒頭のPR表記バナー（控えめな青系） */
.pr-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #1E40AF;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-left: 4px solid #2563EB;
    border-radius: 6px;
}
.pr-notice__badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    background: #2563EB;
    border-radius: 4px;
    flex-shrink: 0;
}
.pr-notice__text {
    color: #1E3A8A;
}

/* 記事内アフィリエイトボックス（.affiliate-box / .affiliate-btn） */
.affiliate-box {
    margin: 32px 0;
    padding: 20px 22px;
    background: #F8FAFC;
    border: 1px solid #BFDBFE;
    border-left: 4px solid #2563EB;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
}
.affiliate-box__label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    background: #2563EB;
    border-radius: 4px;
}
.affiliate-box__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.4;
}
.affiliate-box__desc {
    margin: 0 0 16px;
    font-size: 14px;
    color: #334155;
    line-height: 1.7;
}
.affiliate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    min-width: 200px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff !important;
    background: #2563EB;
    border: 1px solid #2563EB;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
.affiliate-btn:hover,
.affiliate-btn:focus {
    background: #1D4ED8;
    border-color: #1D4ED8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    color: #ffffff !important;
}
.affiliate-btn::after {
    content: "→";
    font-weight: 700;
}

/* 記事末尾の読了後CTA */
.post-cta {
    margin: 48px 0 8px;
    padding: 24px;
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    border: 1px solid #BFDBFE;
    border-radius: 10px;
}
.post-cta__inner {
    text-align: center;
}
.post-cta__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
}
.post-cta__lead {
    margin: 0 0 16px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}
.post-cta__slots {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.post-cta__slots:empty {
    min-height: 8px;
}

@media (max-width: 480px) {
    .pr-notice { font-size: 12px; padding: 8px 12px; }
    .affiliate-box { padding: 16px; }
    .affiliate-btn { width: 100%; }
    .post-cta { padding: 20px 16px; }
}

/* ============================================================
 * FAQセクション（構造化データ連動）
 * ============================================================ */
.faq-section {
    margin: 48px 0 32px;
    padding: 24px;
    background: #F8FAFC;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
}
.faq-section > h2 {
    margin: 0 0 20px !important;
    padding-bottom: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #1E293B;
    border-bottom: 2px solid #BFDBFE;
    letter-spacing: 0.02em;
}
.faq-item {
    margin: 0 0 16px;
    padding: 18px 20px;
    background: #FFFFFF;
    border-left: 3px solid #2563EB;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.faq-item:last-child { margin-bottom: 0; }
.faq-question {
    margin: 0 0 10px !important;
    font-size: 17px;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.5;
}
.faq-answer {
    color: #475569;
    font-size: 15px;
    line-height: 1.75;
}
.faq-answer p { margin: 0 0 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ============================================================
 * 関連記事セクション
 * ============================================================ */
.related-posts {
    margin: 48px 0 32px;
    padding: 24px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
}
.related-posts > h2 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1E293B;
    border-bottom: 1px solid #E2E8F0;
}
.related-posts ul { list-style: none; margin: 0; padding: 0; }
.related-posts li {
    margin: 0;
    padding: 10px 0 10px 22px;
    position: relative;
    border-bottom: 1px dashed #E2E8F0;
}
.related-posts li:last-child { border-bottom: none; }
.related-posts li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 10px;
    color: #2563EB;
    font-weight: 700;
}
.related-posts a {
    color: #2563EB;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.6;
    transition: color 0.2s ease;
}
.related-posts a:hover {
    color: #1D4ED8;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .faq-section { padding: 20px 16px; }
    .faq-section > h2 { font-size: 20px; }
    .faq-item { padding: 14px 14px; }
    .faq-question { font-size: 16px; }
    .faq-answer { font-size: 14px; }
    .related-posts { padding: 18px 14px; }
    .related-posts > h2 { font-size: 19px; }
}

/* ============================================================
 * フォントサイズ改善（読みやすさ向上: 16px → 17px）
 * ============================================================ */
body {
    font-size: 1.0625rem; /* 17px */
}
.single-article__content {
    font-size: 1.0625rem;
    line-height: 2.0;
}

/* ============================================================
 * 目次（TOC）
 * ============================================================ */
#toc {
    margin: 0 0 32px;
    padding: 20px 24px;
    background: #F0F7FF;
    border: 1px solid #BFDBFE;
    border-left: 4px solid #2563EB;
    border-radius: 10px;
    font-size: 0.9375rem;
}
.toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.toc__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1E3A8A;
    letter-spacing: 0.04em;
    padding-left: 12px;
    border-left: 3px solid #2563EB;
}
.toc__toggle {
    font-size: 0.75rem;
    color: #2563EB;
    background: none;
    border: 1px solid #BFDBFE;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.toc__toggle:hover {
    background: #DBEAFE;
}
.toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-h2;
}
.toc__item {
    margin: 0;
    padding: 0;
}
.toc__item--h2 {
    counter-increment: toc-h2;
    counter-reset: toc-h3;
    margin-top: 6px;
}
.toc__item--h3 {
    counter-increment: toc-h3;
    padding-left: 20px;
    margin-top: 4px;
}
.toc__link {
    display: block;
    padding: 3px 0;
    color: #1E40AF;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.15s;
    border-bottom: none !important;
    font-weight: normal !important;
}
.toc__link:hover {
    color: #2563EB;
    text-decoration: underline;
}
.toc__link.is-active {
    color: #2563EB;
    font-weight: 600 !important;
}
.toc__item--h2 > .toc__link::before {
    content: counter(toc-h2) ". ";
    font-weight: 700;
    color: #2563EB;
    margin-right: 2px;
}
.toc__item--h3 > .toc__link::before {
    content: "└ ";
    color: #93C5FD;
    margin-right: 2px;
}
@media (max-width: 480px) {
    #toc { padding: 16px; }
    .toc__list { font-size: 0.875rem; }
}

/* ============================================================
 * 見出しアンカーリンク
 * ============================================================ */
.single-article__content h2,
.single-article__content h3 {
    position: relative;
}
.heading-anchor {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.75em;
    color: #93C5FD;
    opacity: 0;
    transition: opacity 0.15s;
    text-decoration: none;
    border-bottom: none !important;
    font-weight: normal !important;
    vertical-align: middle;
}
.single-article__content h2:hover .heading-anchor,
.single-article__content h3:hover .heading-anchor {
    opacity: 1;
}
.heading-anchor:hover {
    color: #2563EB !important;
}

/* ============================================================
 * SNSシェアボタン
 * ============================================================ */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 24px 0 0;
}
.share-buttons__label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.15s, box-shadow 0.15s;
}
.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.share-btn--x {
    background: #000000;
    color: #FFFFFF !important;
}
.share-btn--line {
    background: #06C755;
    color: #FFFFFF !important;
}
.share-btn--copy {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}
.share-btn--copy.is-copied {
    background: #D1FAE5;
    color: #065F46;
    border-color: #6EE7B7;
}
@media (max-width: 480px) {
    .share-buttons { gap: 8px; }
    .share-btn { padding: 6px 12px; font-size: 0.75rem; }
}

/* ============================================================
 * 著者ボックス
 * ============================================================ */
.author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 40px 0 0;
    padding: 24px 24px 40px; /* 下を十分に確保 */
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-glow-sm);
}
.author-box__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #BFDBFE;
    flex-shrink: 0;
}
.author-box__avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    border: 3px solid #BFDBFE;
}
.author-box__info {
    flex: 1;
    min-width: 0;
}
.author-box__label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #2563EB;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.author-box__name {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--color-heading);
    margin: 0 0 8px;
}
.author-box__bio {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    margin: 0;
}
.author-box__links {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.author-box__link {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    font-size: 0.75rem;
    font-weight: 500 !important;
    border: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border) !important; /* 下ボーダーを明示指定 */
    border-radius: 4px;
    color: var(--color-text-secondary);
    text-decoration: none !important;
    transition: border-color 0.15s, color 0.15s;
    box-sizing: border-box;
    line-height: 1;
}
.author-box__link:hover {
    border-color: #2563EB !important;
    color: #2563EB;
    text-decoration: none;
}
@media (max-width: 480px) {
    .author-box { flex-direction: column; gap: 14px; padding: 18px; }
    .author-box__avatar,
    .author-box__avatar-placeholder { width: 60px; height: 60px; }
}

/* ============================================================
 * 関連記事（カード型）
 * ============================================================ */
.related-posts-cards {
    margin: 40px 0 0;
}
.related-posts-cards__title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-heading);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}
.related-posts-cards__title::before {
    content: "📖 ";
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.related-post-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    text-decoration: none !important;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    align-items: flex-start;
}
.related-post-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-md);
}
.related-post-card__thumb {
    width: 72px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-bg-tertiary);
    flex-shrink: 0;
}
.related-post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-post-card__thumb-placeholder {
    width: 72px;
    height: 48px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--color-accent-dim), var(--color-bg-tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 20px;
    flex-shrink: 0;
}
.related-post-card__title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 600px) {
    .related-posts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 追加 v2.4: コードブロックの language バッジ
 *   update_boatrace_article.py が <pre class="code-block" data-lang="..."> で出力
 * ============================================================ */
.single-article__content pre.code-block,
.entry-content pre.code-block {
    position: relative;
    padding-top: 36px; /* バッジ分の余白 */
    background: #0F172A;
    border: 1px solid #1E293B;
    border-radius: 10px;
}
.single-article__content pre.code-block::before,
.entry-content pre.code-block::before {
    content: attr(data-lang);
    position: absolute;
    top: 8px;
    left: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #60A5FA;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 4px;
    padding: 2px 8px;
    line-height: 1.4;
}
.single-article__content pre.code-block::after,
.entry-content pre.code-block::after {
    /* macOS風の 3つのドット（装飾） */
    content: "";
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 10px;
    background:
        radial-gradient(circle at 5px 5px, #EF4444 4px, transparent 5px),
        radial-gradient(circle at 19px 5px, #F59E0B 4px, transparent 5px),
        radial-gradient(circle at 33px 5px, #10B981 4px, transparent 5px);
    opacity: 0.8;
}
.single-article__content pre.code-block code,
.entry-content pre.code-block code {
    display: block;
    color: #E2E8F0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    white-space: pre;
    background: none;
    border: none;
    padding: 0;
}

/* ============================================================
 * 追加 v2.4: FAQ ブロックの微調整（Qバッジ）
 * ============================================================ */
.single-article__content .faq-item .faq-question,
.entry-content .faq-item .faq-question {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.single-article__content .faq-item .faq-question::before,
.entry-content .faq-item .faq-question::before {
    content: "Q";
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: #FFFFFF;
    background: #2563EB;
    border-radius: 4px;
    line-height: 1;
    margin-top: 1px;
}
.single-article__content .faq-item .faq-answer,
.entry-content .faq-item .faq-answer {
    margin-left: 34px; /* Qバッジ分のインデント */
    padding-top: 6px;
    border-top: 1px dashed #E2E8F0;
}
.single-article__content .faq-item .faq-answer p,
.entry-content .faq-item .faq-answer p {
    margin: 0 0 8px;
}
.single-article__content .faq-item .faq-answer p:last-child,
.entry-content .faq-item .faq-answer p:last-child {
    margin-bottom: 0;
}
@media (max-width: 480px) {
    .single-article__content .faq-item .faq-answer,
    .entry-content .faq-item .faq-answer {
        margin-left: 0;
    }
}

/* ============================================================
 * スクロールトップボタン
 * ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s, background 0.15s;
    z-index: 9000;
    pointer-events: none;
}
.scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}
@media (max-width: 480px) {
    .scroll-top { bottom: 20px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
}
