/*
Theme Name: jazzguitarstyle
Theme URI: https://jazzguitarstyle.com/
Description: A lightweight, minimalist WordPress theme with a 3-4 column grid layout and beautiful Japanese typography.
Version: 1.0.0
Author: jazzguitarstyle.com
Author URI: https://www.jazzguitarstyle.com/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jazzguitarstyle
*/

:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #4A6785;
    --background-color: #f5f5f5;
    /* Unified professional gray background */
    --card-bg: #fff;
    --text-color: #222;
    --muted-color: #666;
    --border-color: #eee;
    --container-width: 1200px;
    --content-width: 800px;
    --gap: 20px;
    --font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    opacity: 0.8;
}

/* Layout & Container */
.site-container,
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
    box-sizing: border-box;
}

.site-main {
    display: flex;
    flex-direction: column;
    /* Stacked by default for mobile */
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 40px;
}

#primary,
#secondary {
    width: 100%;
    min-width: 0;
}

/* Desktop Layout (min-width: 960px) */
@media screen and (min-width: 960px) {
    .site-main {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 40px;
        justify-content: space-between;
        margin-top: 40px;
        align-items: stretch;
    }

    #primary {
        flex: 1;
    }

    #secondary {
        flex: 0 0 300px;
        width: 300px;
        min-width: 300px;
    }
}


/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #1A2634;
    /* Minimal sharp look */
    padding: 0;
    /* Let branding padding handle the space */
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Logo stays left */
}

.site-branding {
    padding: 10px 0 5px 0;
    width: 100%;
    text-align: left;
    /* Align logo to the left */
}

.site-title {
    margin: 0;
    line-height: 0;
}

.site-logo {
    height: 100px;
    /* "Web Designing Web" Scale */
    width: auto;
    display: block;
    transition: opacity 0.2s ease;
}

.site-title a {
    display: inline-block;
    vertical-align: middle;
    text-decoration: none;
}

.site-title a:hover {
    opacity: 0.85;
}

/* Tablet & Large Phone (Matches 959px request) */
@media screen and (max-width: 959px) {
    .site-branding {
        padding: 20px 0;
    }

    .site-logo {
        height: 55px;
        /* Responsive scaling */
    }
}

@media screen and (max-width: 768px) {
    .site-branding {
        padding: 15px 0;
    }
}

/* Post Slider (Hero Area) */
.site-hero-slider {
    background-color: transparent;
    /* Remove gray tray */
    padding: 0;
    margin: 0 0 10px 0;
    /* Tighten spacer with "Recent Articles" */
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.site-slider-container {
    padding-bottom: 0;
    /* Let dots overlap the image */
}

.slider-item {
    display: block;
    min-height: 400px;
    position: relative;
    background-color: transparent;
    overflow: hidden;
}

.slider-link {
    display: block;
    width: 100%;
    height: 100%;
}

.slider-full-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.slider-item:hover .slider-full-image {
    transform: scale(1.03);
}

.slider-placeholder-image {
    width: 100%;
    height: 400px;
    background: #E2E8F0;
}

/* Swiper Custom Navigation & Pagination */
.swiper .site-slider-pagination {
    bottom: 20px;
    z-index: 10;
}


.site-slider-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #CBD5E1;
    opacity: 1;
    transition: all 0.3s;
}

.site-slider-pagination .swiper-pagination-bullet-active {
    width: 32px;
    border-radius: 6px;
    background: #1A2634;
}

/* Swiper Custom Navigation Buttons */
.site-hero-slider .swiper-button-next,
.site-hero-slider .swiper-button-prev {
    width: 44px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    --swiper-navigation-color: #ffffff;
    --swiper-navigation-size: 24px;
}

.site-hero-slider .swiper-button-next {
    right: 15px;
}

.site-hero-slider .swiper-button-prev {
    left: 15px;
}

.site-hero-slider .swiper-button-next:hover,
.site-hero-slider .swiper-button-prev:hover {
    background-color: #1A2634;
    /* Primary theme color */
}

.site-hero-slider .swiper-button-next:after,
.site-hero-slider .swiper-button-prev:after {
    font-weight: bold;
}

/* Adjust for smaller screens */
@media screen and (max-width: 768px) {

    .site-hero-slider .swiper-button-next,
    .site-hero-slider .swiper-button-prev {
        width: 36px;
        height: 50px;
        --swiper-navigation-size: 20px;
    }
}

/* Slider Responsiveness */
@media screen and (max-width: 1024px) {
    .slider-title {
        font-size: 2.2rem;
    }

    .slider-featured-icon {
        width: 300px;
        height: 300px;
    }

    .slider-info-box {
        padding: 40px;
        max-width: 500px;
    }
}

@media screen and (max-width: 959px) {
    .site-hero-slider {
        margin-bottom: 20px;
    }

    .slider-item,
    .slider-full-image,
    .slider-placeholder-image {
        height: 300px;
        min-height: 300px;
    }

    .site-slider-next,
    .site-slider-prev {
        display: none;
        /* Hide arrows on small mobile */
    }
}

/* Front Page Recent Posts Container */
.front-page-recent-posts-container {
    background-color: #fff;
    padding: 8px 40px 40px;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Front Page Section Title */
.front-page-section-title {
    margin: 0 0 30px 0;
}

.section-title-label {
    font-size: 1.6rem;
    color: #1A2634;
    padding-left: 14px;
    border-left: 6px solid #0e7490;
    /* Sophisticated Teal-Blue Bar */
    line-height: 1.2;
    font-weight: bold;
}

@media screen and (max-width: 959px) {
    .front-page-recent-posts-container {
        padding: 8px 20px 30px;
        margin-top: 30px;
    }

    .front-page-section-title {
        margin-bottom: 20px;
    }

    .section-title-label {
        font-size: 1.4rem;
    }
}

/* Portal Layout Sections Spacing & Container */
.front-page-sections-wrapper {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.portal-section {
    margin-bottom: 80px;
}

.portal-section:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 959px) {
    .front-page-sections-wrapper {
        padding: 30px 20px;
        margin-top: 30px;
    }
    
    .portal-section {
        margin-bottom: 60px;
    }
}

/* View More Button */
.more-posts-container {
    text-align: center;
    margin: 40px 0 60px;
}

.more-posts-button {
    display: inline-block;
    padding: 12px 30px;
    background: #1A2634;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease;
    border-radius: 0;
}

.more-posts-button:hover {
    background: #2b3a8c;
    color: #fff;
    opacity: 1;
}

.more-posts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 44px;
    font-size: 1rem;
    font-weight: bold;
    color: #1e4060;
    text-decoration: none;
    border: 1px solid #1e4060;
    border-radius: 50px;
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

/* Sophisticated Arrow Icon */
.more-posts-button::after {
    content: "→";
    margin-left: 12px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.more-posts-button:hover {
    background-color: #f1f7fe;
    color: #153450;
    border-color: #153450;
    box-shadow: 0 4px 12px rgba(30, 64, 96, 0.1);
}

.more-posts-button:hover::after {
    transform: translateX(6px);
}

@media screen and (max-width: 768px) {
    .more-posts-container {
        margin: 30px 0 5px;
    }

    .more-posts-button {
        padding: 12px 36px;
        font-size: 0.95rem;
    }
}

/* Archive List Page */
.archive-header {
    margin-bottom: 30px;
}

.archive-title {
    font-size: 2rem;
    color: #1A2634;
    font-weight: bold;
    margin: 0;
}

.archive-list-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 0;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.archive-post-list {
    display: flex;
    flex-direction: column;
}

.archive-post-item {
    display: flex;
    gap: 24px;
    padding: 30px 0;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.archive-post-item:first-child {
    padding-top: 0;
}

.archive-post-item:last-child {
    border-bottom: none;
}

.archive-post-item:hover {
    opacity: 0.8;
}

/* High-Specificity Archive Thumbnail Fix: Standard Media Layout (16:9) */
.site-main .archive-list-container .archive-post-list .archive-post-item .archive-post-thumbnail {
    flex: 0 0 280px;
    width: 280px;
}

.site-main .archive-list-container .archive-post-list .archive-post-item .archive-post-thumbnail a {
    display: block;
    width: 280px;
    height: auto;
    /* Remove fixed height */
    aspect-ratio: 16 / 9;
    background-color: #f0f0f0;
    overflow: hidden;
    border-radius: 0;
    position: relative;
}

.site-main .archive-list-container .archive-post-list .archive-post-item .archive-post-thumbnail img,
.site-main .archive-list-container .archive-post-list .archive-post-item .archive-post-thumbnail a img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Pagination Box Styling */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 0;
    padding-top: 40px;
    border-top: 1px solid #f3f4f6;
}

.pagination-container .nav-links,
.pagination-container .pagination {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-container .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #333333;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.pagination-container .page-numbers.current {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.pagination-container .page-numbers:not(.current):hover {
    background: #f3f4f6;
    border-color: #000;
}

.pagination-container .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: 20px;
    padding: 0;
}

/* Mobile Tweaks for Archive */
@media screen and (max-width: 768px) {
    .archive-post-item {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .archive-post-thumbnail {
        flex: 0 0 auto;
    }

    .pagination-container .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

.archive-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.archive-post-meta {
    margin-bottom: 10px;
}

.entry-category-label {
    background: #f0f4f8;
    color: #1e4060;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 10px;
}

.entry-date-label {
    color: #666;
    font-size: 0.9rem;
}

.archive-post-title {
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.4;
}

.archive-post-title a {
    text-decoration: none;
    color: #222;
    transition: color 0.2s;
}

.archive-post-title a:hover {
    color: #0e7490;
}

/* Pagination Styling */
.pagination-container {
    margin-top: 50px;
}

.pagination-container .pagination {
    display: flex;
    justify-content: center;
}

.pagination-container .nav-links {
    display: flex;
    gap: 8px;
}

.pagination-container .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: bold;
}

.pagination-container .page-numbers.current {
    background: #1e4060;
    color: #fff;
    border-color: #1e4060;
}

.pagination-container .page-numbers:hover:not(.current) {
    background: #f0f7fe;
    border-color: #1e4060;
    color: #1e4060;
}

@media screen and (max-width: 959px) {
    .archive-list-container {
        padding: 30px 20px;
    }

    .archive-post-thumbnail {
        flex: 0 0 200px;
    }
}

@media screen and (max-width: 768px) {
    .archive-post-item {
        flex-direction: column;
        gap: 8px;
    }

    .archive-post-thumbnail,
    .site-main .archive-list-container .archive-post-list .archive-post-item .archive-post-thumbnail {
        flex: 0 0 auto;
        width: 100%;
    }

    .site-main .archive-list-container .archive-post-list .archive-post-item .archive-post-thumbnail a {
        width: 100%;
    }

    .archive-post-content {
        justify-content: flex-start;
    }

    .archive-post-title {
        font-size: 1.2rem;
    }
}

/* Navigation */
.main-navigation {
    width: 100%;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Center menu items */
}

.main-navigation li {
    margin: 0 15px;
    /* Balanced spacing for centering */
}

.main-navigation a {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
}

.main-navigation a:hover {
    color: #4A6785;
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: #1A2634;
    border-bottom: 2px solid #1A2634;
    /* Active accent */
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    /* 少し濃いめの背景 */
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-overlay.is-active {
    display: flex;
}

.search-overlay-close {
    color: #999;
    cursor: pointer;
    margin-top: 30px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    /* 数学的な中央 */
    justify-content: center;
    gap: 8px;
    line-height: 1;
    /* ★重要：勝手な余白を消す */
}

.close-icon {
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
}

.close-text {
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    /* 視覚的な中心を揃えるためにわずかに下に押し下げる */
    transform: translateY(2px);
}

.search-overlay-close:hover {
    color: #fff;
}

.search-overlay-content {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-overlay .search-form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #fff;
    /* ★下線のみのミニマルデザイン */
    padding-bottom: 10px;
}

.search-overlay .search-field {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    /* ★ダイナミックな大きさ */
    font-weight: 300;
    outline: none;
    padding: 10px 0;
}

.search-overlay .search-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-overlay .search-submit {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.2s;
}

.search-overlay .search-submit:hover {
    opacity: 0.7;
}

.search-overlay .search-submit svg {
    width: 20px;
    height: 20px;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Controls & Desktop/Mobile Toggles */
.header-controls {
    display: none;
    /* Desktopでは非表示 */
}

.header-controls button {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    /* 初期位置：右側に隠す */
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    padding: 20px;
}

.mobile-drawer.is-active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-navigation li {
    border-bottom: 1px solid #eee;
}

.mobile-navigation a {
    display: block;
    padding: 15px 0;
    color: #333;
    font-weight: bold;
    text-decoration: none;
}

/* Responsive Header */
@media screen and (max-width: 768px) {
    .site-header {
        padding: 10px 0;
        /* スマホは少しコンパクトに */
    }

    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .site-branding {
        margin-bottom: 0;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .main-navigation {
        display: none;
        /* デスクトップメニューを隠す */
    }

    .header-controls {
        display: flex;
        /* ★アイコンを表示 */
        gap: 5px;
    }
}

/* Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Prevent grid blowout */
.card-grid > * {
    min-width: 0;
}

@media screen and (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.post-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 15px;
    flex: 1;
}

.post-card .entry-meta {
    font-size: 0.8rem;
    color: var(--muted-color);
    margin: 0;
}

.post-card .entry-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.post-card .entry-category {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* Single Post */
.single-post-thumbnail {
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.single-post-content {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 0;
}

.single-post-header {
    margin-bottom: 30px;
    text-align: left;
}

.single-post-title {
    font-size: 1.75rem;
    line-height: 1.35;
    font-weight: bold;
    color: #222;
    margin-bottom: 15px;
    text-align: left;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.entry-category-meta {
    background: #e2e8f0;
    color: #475569;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.posted-on,
.updated-on {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    opacity: 0.7;
    vertical-align: middle;
}




/* --- Pochipp Upgrade Style (Final Adjustment) --- */
/* [1] 基本設定：PC・ワイド画面（1024px以上：横並び・ボタン3列） */
.p-book-box {
    display: flex;
    flex-direction: row;
    /* 横並び */
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 24px;
    margin: 2.5em 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    gap: 20px;
    align-items: flex-start;
    overflow: hidden;
    /* はみ出し防止 */
}

/* 左側画像エリア */
.p-book-image {
    width: 160px;
    min-width: 160px;
    flex-shrink: 0;
    /* 絶対に潰さない */
    text-align: center;
}

.p-book-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* 右側情報エリア */
.p-book-content {
    flex: 1;
    min-width: 0;
    /* テキストが溢れるのを防ぐ */
}

.p-book-title {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.p-book-title a {
    color: #333;
    text-decoration: none;
}

.p-book-artist {
    font-size: 0.9rem;
    font-weight: normal;
    color: #555;
}

.p-book-title a:hover {
    color: #0066c0;
    text-decoration: underline;
}

/* 価格・セールエリア */
.p-book-price-area {
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.p-book-price {
    font-size: 1.25rem;
    color: #333;
    font-weight: bold;
}

.p-book-sale-badge {
    background: #c40000;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
}

.p-book-timestamp {
    color: #666;
    font-size: 0.75rem;
}

.p-book-reviews {
    width: 100%;
    margin-top: 5px;
}

.p-book-reviews-link {
    color: #0066c0;
    text-decoration: none;
    font-size: 0.85rem;
}

.p-book-reviews-link:hover {
    text-decoration: underline;
}

/* 버튼エリア：PCは3列横並び */
.p-book-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3列固定 */
    gap: 10px;
    width: 100%;
}

/* New Minimal Outline Buttons */
.p-book-btns a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
    border: none;
    background: #666;
    text-decoration: none;
    min-height: 44px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.p-book-btns a:hover {
    opacity: 0.8;
    color: #fff;
}

.p-book-btns .btn-amazon {
    background-color: #f39d30;
}

.p-book-btns .btn-rakuten {
    background-color: #df584e;
}

.p-book-btns .btn-yahoo {
    background-color: #5a94e7;
}

.p-book-btns .btn-itunes {
    background-color: #007aff;
}

.p-book-box--itunes .p-book-image {
    width: 130px;
    min-width: 130px;
}

/* Specific button overrides removed for clean outline look */

/* [2] タブレット・中サイズ（1024px未満〜768px：横並び維持・ボタン2列） */
@media screen and (max-width: 1024px) {
    .p-book-box {
        padding: 20px;
        gap: 15px;
    }

    .p-book-image {
        width: 120px;
        /* 画像を少し小さくしてバランス調整 */
        min-width: 120px;
    }

    .p-book-title {
        font-size: 1.1rem;
    }

    .p-book-btns {
        grid-template-columns: repeat(2, 1fr);
        /* ボタンを2列に切り替え */
    }
}

/* [3] スマホ・小サイズ（768px以下：縦並び・ボタン1列：image_16.pngのようなバランス） */
@media screen and (max-width: 768px) {
    .p-book-box {
        flex-direction: column;
        /* 縦並びに切り替え */
        align-items: center;
        text-align: center;
        padding: 15px;
        /* 余白を調整 */
    }

    .p-book-image {
        width: 100%;
        max-width: 180px;
        /* ★画像を小さく表示：16px.pngのようなバランス */
        min-width: 0;
        margin-bottom: 20px;
        /* 画像とコンテンツの間隔 */
    }

    .p-book-content {
        width: 100%;
        text-align: center;
    }

    .p-book-price-area {
        justify-content: center;
    }

    .p-book-btns {
        grid-template-columns: 1fr;
        /* スマホは縦1列 */
    }

    .p-book-btns a {
        white-space: normal;
        /* スマホ1列時は幅があるので改行許可 */
    }
}

/* sidebar components */
.sidebar-search {
    display: none;
}

@media screen and (min-width: 960px) {
    .sidebar-search {
        display: block;
    }
}

.sidebar-search .search-form__inner {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-search .search-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: var(--text-color);
    background: #fff;
}

.sidebar-search .search-field::placeholder {
    color: #aaa;
}

.sidebar-search .search-submit {
    background: #fff;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
}

.sidebar-search .search-submit:hover {
    color: var(--accent-color);
}

.widget-area {
    margin-top: 0;
}

.widget {
    margin-bottom: 50px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    letter-spacing: 0.1em;
}

.widget-title-icon {
    width: 20px;
    height: 20px;
    color: #4A6785;
    /* Steel Accent */
    flex-shrink: 0;
}

/* 新着記事・ランキング共通リスト */
.entry-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.entry-item {
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.entry-item:hover {
    background-color: #f9f9f9;
}

.entry-link {
    display: flex;
    align-items: flex-start;
    /* Prevent thumbnail from stretching vertically */
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}


/* High-Specificity Sidebar Thumbnail Fix: Unified 16:9 rectangles */
#secondary .widget .entry-item .entry-thumb {
    flex: 0 0 120px;
    flex-shrink: 0;
    /* Protect thumbnail width from being squished */
    width: 120px;
    height: auto;
    aspect-ratio: 16 / 9;
    background: transparent;
    overflow: hidden;
    border-radius: 0;
    position: relative;
}

#secondary .widget .entry-item .entry-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.entry-item:hover .entry-thumb img {
    transform: scale(1.08);
}

/* Ensure post info container doesn't collapse */
#secondary .entry-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    line-height: 1.8;
}

/* Custom Heading Styles for Single Post Content */
.single .entry-content h2 {
    font-size: 1.5rem;
    border-left: 5px solid #2b3a8c;
    padding-left: 18px;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
    font-weight: bold;
    color: #333;
}

/* Fixed Sidebar Title Clamping */
#secondary .entry-title {
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;

    /* Strict 2-line clamping */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;

    /* Fixed height to align with 16:9 thumbnails (0.95 * 1.5 * 2) */
    height: 2.85rem; 
    
    transition: color 0.3s ease;
}

.entry-item:hover .entry-title {
    color: #2b3a8c; /* Theme accent blue */
}

.entry-date {
    font-size: 0.8rem;
    color: #666;
}


/* Ranking Badge Styling */
.ranking-list .rank-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: #1A2634;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-bottom-right-radius: 4px;
}

/* Medal Badges for Top 3 */
.ranking-list .entry-item:nth-child(1) .rank-number {
    background: #D4AF37;
    /* Gold */
}

.ranking-list .entry-item:nth-child(2) .rank-number {
    background: #C0C0C0;
    /* Silver */
}

.ranking-list .entry-item:nth-child(3) .rank-number {
    background: #AD8A56;
    /* Bronze */
}

/* Widget Icon Styling */
.widget-title-icon {
    width: 20px;
    height: 20px;
    vertical-align: -4px;
    /* Adjust for perfect alignment with text */
    margin-right: 8px;
    color: #1A2634;
}

/* 広告プレースホルダー */
.ad-square,
.ad-vertical {
    background: #f9f9f9;
    border: 1px dashed #ddd;
    color: #aaa;
    padding: 8px;
    text-align: center;
}

.ad-square ins,
.ad-vertical ins {
    display: block;
    width: 100%;
}

.ad-label {
    font-size: 0.7rem;
    margin-bottom: 10px;
}

.ad-vertical {
    min-height: 400px;
}


/* --- Breadcrumb Styles --- */
.breadcrumb-wrapper {
    background: #f7f7f7;
    width: 100%;
    border-bottom: 1px solid #eee;
}

.breadcrumb-nav {
    padding-top: 12px;
    padding-bottom: 12px;
}

.breadcrumb-wrapper .breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* Vertically center all items in the row */
    gap: 8px;
    font-size: 0.8rem;
}

/* 1. Typography: Darker text for high contrast */
.breadcrumb-wrapper .breadcrumbs,
.breadcrumb-wrapper .breadcrumbs a,
.breadcrumb-wrapper .breadcrumbs span {
    color: #333333;
}

.breadcrumb-wrapper .breadcrumbs a:hover {
    color: #000000;
    text-decoration: underline;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-home-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 2. Home Icon Alignment: Center vertically with text */
.breadcrumb-wrapper .breadcrumbs .breadcrumb-home-icon {
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-right: 4px;
}

.breadcrumb-separator {
    color: #ccc;
    display: flex;
    align-items: center;
}

.breadcrumbs a {
    transition: color 0.2s;
}

.breadcrumb-wrapper .breadcrumbs li span:not(.breadcrumb-home-link):not(.breadcrumb-separator) {
    color: #333333;
}

/* --- TOC Section (Unified Style) --- */
.toc-widget {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    /* Height constraint for many items */
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

/* Magazine-style Ultra-thin Scrollbar */
.toc-widget::-webkit-scrollbar {
    width: 4px;
}

.toc-widget::-webkit-scrollbar-track {
    background: transparent;
}

.toc-widget::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.toc-widget:hover::-webkit-scrollbar-thumb {
    background: rgba(74, 103, 133, 0.5);
    /* Slate Blue on hover */
}

/* Base list reset */
.toc-widget .article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-h2;
    position: relative;
}

.toc-widget .article-toc-list::before,
.toc-widget .article-toc-list li::before,
.toc-widget .article-toc-list li::after {
    display: none;
}

.toc-widget .article-toc-list .toc-item {
    list-style: none;
    position: relative;
    margin-bottom: 12px;
}

/* Consistent Link Layout */
.article-toc-list .toc-item a {
    display: flex;
    align-items: flex-start;
    /* Ensure top alignment for multi-line text */
    text-decoration: none;
    color: #333;
    transition: opacity 0.2s;
    line-height: 1.4;
}

.article-toc-list .toc-item a:hover {
    opacity: 0.6;
}

/* CSS Counters & Orange Bar Implementation */
.article-toc-list .toc-level-2 {
    counter-increment: toc-h2;
    counter-reset: toc-h3;
}

.article-toc-list .toc-level-3 {
    counter-increment: toc-h3;
    margin-left: 35px;
    margin-top: -2px;
}

/* The Numbering & Orange Vertical Bar (Unified) */
.toc-widget .article-toc-list .toc-item a::before {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #4A6785;
    /* Slate Blue */
    font-weight: 700;
    font-size: 1.5rem;
    min-width: 1.25em;
    border-right: 1px solid #4A6785;
    /* Thin Sharp Line */
    padding-right: 12px;
    margin-right: 15px;
    line-height: 1;
    height: 1.2em;
    /* Ensure bar length is consistent */
    flex-shrink: 0;
}

.article-toc-list .toc-level-2 a::before {
    content: counter(toc-h2);
}

.article-toc-list .toc-level-3 a::before {
    content: counter(toc-h2) "-" counter(toc-h3);
    font-size: 1.1rem;
}

/* Text Wrapper & Scaling */
.article-toc-list .toc-text-wrap {
    font-weight: 400;
    font-size: 1.05rem;
    color: #333;
    padding-top: 2px;
    /* Optical adjustment for baseline */
}

/* --- Sidebar Specific Adjustments (Small Scale) --- */
.toc-widget .article-toc-list .toc-item {
    margin-bottom: 10px;
}

.toc-widget .article-toc-list .toc-level-3 {
    margin-left: 25px;
    /* Narrower indentation for sidebar */
}

.toc-widget .article-toc-list .toc-item a::before {
    font-size: 1.2rem;
    /* Scaled down for sidebar */
    min-width: 1.1em;
    padding-right: 8px;
    margin-right: 10px;
}

.toc-widget .article-toc-list .toc-level-3 a::before {
    font-size: 1rem;
}

.toc-widget .article-toc-list .toc-text-wrap {
    font-size: 0.95rem;
    /* Slightly smaller text for sidebar */
}

/* --- In-Content TOC Box (article-toc) --- */
.article-toc {
    background: #fdfdfd;
    border: 1px solid #eeeeee;
    border-top: 1px solid #1A2634;
    /* Minimal sharp look */
    border-bottom: 1px solid #1A2634;
    border-radius: 4px;
    padding: 35px 30px;
    margin: 50px 0;
}

.article-toc .article-toc-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
    /* Prevent tight overlap */
}

.article-toc-header .toc-header-right {
    display: flex;
    justify-content: flex-end;
}

.article-toc .toc-toggle-button,
.article-toc #toc-toggle-btn {
    background: #ffffff;
    border: 1px solid #1A2634;
    color: #1A2634;
    padding: 10px 16px;
    /* Increased vertical padding for touch target accessibility */
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.article-toc .toc-toggle-button:hover,
.article-toc #toc-toggle-btn:hover {
    background-color: #1A2634;
    color: #ffffff;
}

.article-toc-list.is-hidden {
    display: none;
}

/* Mobile-Specific TOC Optimizations */
@media screen and (max-width: 480px) {
    .article-toc .article-toc-header {
        grid-template-columns: 1fr;
        /* Stack layout on very narrow screens for better readability */
        justify-items: center;
        gap: 15px;
    }

    .article-toc-header .toc-header-left {
        display: none;
        /* Hide empty counterweight on stacked mobile layout */
    }

    .article-toc-header .toc-header-right {
        justify-content: center;
        width: 100%;
    }

    .article-toc .toc-toggle-button {
        width: 100%;
        /* Full width button on narrow mobile for maximum touch target */
        text-align: center;
    }

    .article-toc-list li {
        line-height: 2.2;
        /* Prevent accidental clicks between links */
        margin-bottom: 8px;
    }
}

.toc-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.toc-svg-icon {
    width: 24px;
    height: 24px;
    color: #333;
    flex-shrink: 0;
}

.toc-title-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.1em;
}

/* --- Professional 3-Column Footer --- */
.site-footer {
    background: #fff;
    padding: 60px 0 0 0;
    border-top: 1px solid #eee;
    color: #333;
    margin-top: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 959px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1A2634;
    display: inline-block;
    color: #1A2634;
}

.footer-categories-dropdown {
    position: relative;
}

.footer-categories-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 10px 40px 10px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.footer-categories-dropdown select:hover {
    border-color: #999;
}

.footer-categories-dropdown::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

/* Column 1: Categories & Tags */
.footer-dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
    background: #f9f9f9;
}

.footer-tags-section {
    margin-top: 30px;
}

.footer-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tag-cloud a {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-tag-cloud a:hover {
    background: #1A2634;
    color: #fff;
}

/* Columns 2 & 3: Posts Lists */
.footer-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-post-item {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-post-thumb {
    width: 100px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: block;
}

.footer-post-thumb a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Ranking Badges */
.footer-post-rank {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
    border-bottom-right-radius: 4px;
}

.rank-1 {
    background: #b68b00;
}

/* Gold */
.rank-2 {
    background: #919191;
}

/* Silver */
.rank-3 {
    background: #a46e3b;
}

/* Bronze */

.footer-post-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-post-info {
    flex: 1;
}

.footer-post-meta {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 4px;
}

.footer-post-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.footer-post-title:hover {
    color: #4A6785;
}

/* Footer Bottom Area (Dark Navy) */
.footer-bottom {
    background: #1A2634;
    /* Dark Navy */
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 30px 0;
    text-align: center;
}

.footer-links-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-link-item {
    color: #fff;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-link-item:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.footer-nav {
    margin-bottom: 30px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links li {
    position: relative;
    padding-right: 15px;
}

.footer-links li:not(:last-child):after {
    content: "|";
    position: absolute;
    right: 0;
    color: rgba(255, 255, 255, 0.3);
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    margin-top: 25px;
}

/* --- Mobile Optimization (Screen width < 768px) --- */
@media (max-width: 767px) {
    .site-footer {
        padding-top: 40px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 40px;
    }

    .footer-widget {
        padding-bottom: 40px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 40px;
    }

    .footer-widget:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .footer-widget-title {
        margin-bottom: 20px;
        font-size: 1.05rem;
    }

    /* Column 1: Categories & Tags */
    .footer-dropdown {
        font-size: 1rem;
        /* Slightly larger for easier selection */
        padding: 12px;
    }

    .footer-tag-cloud {
        gap: 10px;
    }

    .footer-tag-cloud a {
        padding: 10px 16px;
        /* Larger tap target */
        font-size: 13px;
    }

    /* Columns 2 & 3: Posts Lists */
    .footer-post-thumb {
        width: 90px;
        height: 51px;
        min-width: 90px;
    }

    .footer-post-title {
        font-size: 0.95rem;
        line-height: 1.5;
        line-clamp: 2;
        /* Cross-browser support */
    }

    .footer-post-item {
        gap: 12px;
    }

    /* Bottom Area (Dark Section) */
    .footer-bottom {
        padding: 40px 20px 30px;
    }

    .footer-links-row {
        gap: 25px;
        margin-bottom: 35px;
    }

    .footer-links {
        flex-direction: column;
        /* Stack vertically for clarity */
        gap: 0;
    }

    .footer-links li {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .footer-links li:last-child {
        border-bottom: none;
    }

    .footer-links li:not(:last-child):after {
        display: none;
        /* Hide vertical separator on mobile */
    }

    .footer-links a {
        display: block;
        padding: 15px 0;
        font-size: 0.9rem;
    }

    .footer-copyright {
        font-size: 0.75rem;
        padding-top: 20px;
        margin-top: 20px;
        line-height: 1.6;
    }
}

/* --- Knowledge Graph Sitemap Page --- */
.sitemap-template {
    padding: 32px 0 80px;
    background: #fff;
    color: #333;
}

.sitemap-template .page-header {
    margin-bottom: 24px;
    text-align: left;
}

.sitemap-template .page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1A2634;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
}

.sitemap-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    align-items: start;
}

/* Left Column: Sticky Sidebar Nav */
.sitemap-sidebar {
    position: sticky;
    top: 40px;
    height: fit-content;
}

.sitemap-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid #eee;
}

.sitemap-nav-list li {
    margin: 0;
}

.sitemap-nav-link {
    display: block;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    margin-left: -1px;
}

.sitemap-nav-link:hover {
    color: #1A2634;
    background: #fcfcfc;
    border-left-color: #1A2634;
}

.sitemap-nav-link .count {
    font-size: 0.8rem;
    color: #aaa;
    margin-left: 5px;
}

/* Right Column: Content Area */
.sitemap-section {
    margin-bottom: 80px;
    scroll-margin-top: 40px;
    /* Offset for anchor links */
}

.sitemap-category-title {
    font-family: "Georgia", serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #1A2634;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1A2634;
    display: inline-block;
    letter-spacing: 0.02em;
}

.sitemap-post-list {
    list-style: none;
    padding: 0 0 0 24px;
    /* Indent posts under category */
    margin: 0;
    display: flex;
    flex-direction: column;
}

.sitemap-post-item {
    border-bottom: 1px solid #eee;
    margin: 0;
}

.sitemap-post-item:nth-child(even) {
    background: #f9f9f9;
    /* Zebra striping */
}

.sitemap-post-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #444;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px 15px 12px 15px;
    /* Adjusted to accommodate static dot */
    position: relative;
    line-height: 1.6;
}

.sitemap-post-link:before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 50%;
    margin-right: 15px;
    /* Fixed 15px gap */
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sitemap-post-link:hover {
    color: #1A2634;
    padding-left: 20px;
}

.sitemap-post-link:hover:before {
    background: #1A2634;
    transform: scale(1.2);
}

.sitemap-post-link .post-title {
    font-size: 1.05rem;
    font-weight: 500;
}

/* Sitemap Badges */
.sitemap-badges {
    display: inline-flex;
    gap: 8px;
    margin-left: 10px;
}

.sitemap-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
    line-height: 1.4;
}

.badge-beginner {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-intermediate {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-advanced {
    background: #fce4ec;
    color: #c62828;
}

.badge-qa {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Mobile Adjustments for Sitemap */
@media (max-width: 959px) {
    .sitemap-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .sitemap-sidebar {
        position: static;
        margin-bottom: 40px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        background: #fbfbfb;
        padding: 15px;
        border-radius: 4px;
        border: 1px solid #eee;
    }

    .sitemap-nav-list {
        display: flex;
        border-left: none;
    }

    .sitemap-nav-list li {
        margin-right: 15px;
    }

    .sitemap-nav-link {
        padding: 8px 15px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 20px;
        font-size: 0.85rem;
    }

    .sitemap-nav-link:hover {
        border-left-color: #eee;
        background: #1A2634;
        color: #fff;
    }
}

@media (max-width: 767px) {
    .sitemap-template {
        padding: 50px 0;
    }

    .sitemap-template .page-title {
        font-size: 1.8rem;
    }

    .sitemap-post-link {
        padding-left: 15px;
    }

    .sitemap-post-link:hover {
        padding-left: 15px;
    }
}

/* -------------------------------------------------------------------------
 * Contact Page Styles
 * ------------------------------------------------------------------------- */
.contact-page-container {
    max-width: var(--container-width);
    margin: 40px auto;
    background: #fff;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header .page-title {
    font-size: 2rem;
    color: #1A2634;
    font-weight: bold;
    margin: 0;
}

.contact-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.required-note {
    font-size: 0.85rem;
    color: #cc0000;
}

.contact-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    font-weight: bold;
}

.contact-message.success {
    background-color: #f0f9eb;
    color: #67c23a;
    border: 1px solid #e1f3d8;
}

.contact-message.error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

.form-table {
    border-top: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.form-label {
    width: 240px;
    min-width: 240px;
    padding-right: 20px;
    display: flex;
    align-items: center;
}

.form-label label {
    font-weight: bold;
    color: #333;
}

.form-label .required {
    color: #cc0000;
    margin-left: 4px;
}

.form-input {
    flex: 1;
}

.form-input input[type="text"],
.form-input input[type="email"],
.form-input select,
.form-input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-input input:focus,
.form-input select:focus,
.form-input textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #fff;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: #f56c6c;
}

.error-text {
    display: block;
    font-size: 0.85rem;
    color: #f56c6c;
    margin-top: 6px;
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

.submit-button {
    background-color: #1A2634;
    color: #fff;
    border: none;
    padding: 16px 60px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-button:hover {
    background-color: #2c3e50;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-page-container {
        padding: 30px 20px;
        margin: 20px;
    }

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

    .form-label {
        width: 100%;
        min-width: 0;
        padding-right: 0;
        margin-bottom: 10px;
    }
}

/* -------------------------------------------------------------------------
 * Multi-step Contact Form UI (Progress Bar & Confirmation)
 * ------------------------------------------------------------------------- */

/* Progress Bar */
.contact-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.progress-step.is-active {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    background-color: #1A2634;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.step-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #1A2634;
}

.progress-separator {
    flex: 0 0 50px;
    height: 1px;
    background-color: #ddd;
    margin: -25px 15px 0;
}

@media (max-width: 768px) {
    .progress-separator {
        flex: 0 0 20px;
    }

    .step-label {
        font-size: 0.75rem;
    }
}

/* Confirmation Layout */
.confirm-table {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 10px;
}

.confirm-value {
    line-height: 1.6;
    color: #333;
    word-break: break-all;
    white-space: pre-wrap;
    /* For message textarea content */
}

/* Buttons */
.confirm-submit {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.back-button {
    background-color: #e5e7eb;
    color: #374151;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #d1d5db;
}

/* Completion Screen */
.complete-back-home {
    text-align: center;
    margin-top: 30px;
}

.btn-back-home {
    display: inline-block;
    padding: 14px 30px;
    background-color: #f3f4f6;
    color: #1A2634;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-back-home:hover {
    background-color: #e5e7eb;
}

/* Anti-spam Instruction */
.antispam-instruction {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.antispam-instruction strong {
    color: #1A2634;
    font-weight: bold;
    border-bottom: 1px solid #1A2634;
    padding: 0 2px;
}

/* -------------------------------------------------------------------------
 * About the Owner Page (運営者について)
 * ------------------------------------------------------------------------- */

.about-page-container {
    padding-bottom: 80px;
    background-color: #fff;
    color: #333;
    line-height: 1.8;
}

.about-page-container .page-title {
    text-align: center;
    margin: 20px 0 10px;
    font-size: 1.8rem;
    font-weight: 800;
}

.section-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 20px 10px;
}

.alternate-bg {
    background-color: #f8fafc;
}

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #1A2634;
}

.section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.profile-card {
    background-color: #fafafa;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.profile-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.profile-image-container {
    flex: 0 0 200px;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-name {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.name-jp {
    font-size: 1.1rem;
    font-weight: 900;
    color: #1A2634;
}

.name-en {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
    letter-spacing: 0.05em;
}

.profile-bio {
    line-height: 1.8;
    max-width: 700px;
}

.profile-bio p {
    margin-bottom: 1.2em;
}

@media (max-width: 768px) {
    .profile-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Publications Grid */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.book-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #1A2634;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.book-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.book-year {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

.book-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #111827;
    line-height: 1.5;
    margin-bottom: 20px;
}

.amazon-btn {
    display: block;
    background-color: #f39d30;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s;
}

.amazon-btn:hover {
    background-color: #e68a1e;
}

.publications-note {
    text-align: right;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Mobile-only Scoped refinement for Publications */
@media (max-width: 600px) {
    .about-publications .publications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .about-publications .book-thumbnail {
        max-width: 120px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .about-publications .book-title {
        font-size: 0.85rem;
    }
}

/* Timeline */
.timeline-container {
    position: relative;
    padding-left: 30px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.highlight::before {
    border-color: #1A2634;
    background-color: #1A2634;
    transform: scale(1.3);
}

.timeline-item.highlight .timeline-content {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
}

.timeline-date {
    font-weight: 800;
    color: #9ca3af;
    margin-bottom: 5px;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
}

.timeline-item.highlight .timeline-date {
    color: #1A2634;
}

.timeline-content h4 {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #111827;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #4b5563;
}

/* About Page Links */
.about-links-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

.about-links-row .about-link-item {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.about-links-row .about-link-item svg {
    width: 18px;
    height: 18px;
}

.about-links-row .about-link-item:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.about-links-row .lnk-yt {
    background-color: #FF0000;
}

.about-links-row .lnk-xcom {
    background-color: #000;
}

.about-links-row .lnk-mail {
    background-color: #f1f5f9;
    color: #1A2634;
}

/* Spotify Facade */
.spotify-facade {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: #1DB954;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.spotify-facade:hover {
    background-color: #1aa34a;
}

.spotify-facade__label {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Privacy Policy Page Styles */
.privacy-page-container {
    padding-bottom: 80px;
    background-color: #ffffff;
}

.privacy-header {
    margin-bottom: 0;
    padding-bottom: 10px;
}

.privacy-content {
    margin-top: 0;
    padding-top: 10px;
}

.privacy-page-container .page-title {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 0;
}

.privacy-policy-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
}

.privacy-policy-container .intro-text {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 40px;
    line-height: 1.8;
}

.privacy-section {
    margin-bottom: 50px;
}

/* --- ARCHIVE LAYOUT REFINEMENT (MODERN TECHNICAL BLOG) --- */


/* 1. Archive Page Base & Breadcrumbs */

body.archive .breadcrumb-wrapper,
body.category .breadcrumb-wrapper {
    background-color: transparent;
    /* Seamless blend with site-wide gray layout */
}

/* 2. Primary Grid Setup (Flattening the DOM Hierarchy) */
/* Targets #primary.archive-container for the master layout grid */
body.archive #primary.archive-container,
body.category #primary.archive-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    /* Force wide content + fixed sidebar */
    grid-template-rows: auto 1fr;
    gap: 0 40px;
    /* 40px sidebar gap; 0 vertical gap for continuous white column */
    align-items: start;
    max-width: 1280px;
    margin: 1em auto;
    /* Reduced from 2em: Tightens gap between breadcrumbs and H1 */
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Flatten hierarchy: allows header, main, and sidebar to align on the same grid */
/* This bypasses div.site-container and archive-layout while preserving their children */
body.archive .archive-container>div.site-container,
body.archive .archive-layout {
    display: contents;
}

/* 3. Unified Editorial Strip (Left Column) */
/* Shared properties for the vertically connected white strip */
body.archive #primary.archive-container .archive-header,
body.archive #primary.archive-container main#main.archive-main {
    grid-column: 1;
    /* Align both segments to the first column */
    background-color: #ffffff;
    width: 100%;
    /* Essential for article expansion */
    max-width: none;
    /* Critical: Break out of theme container limits */
    box-sizing: border-box;
    float: none;
    /* Stop floats from interfering with grid track */
    margin: 0;
    /* Remove vertical gaps */
    border-radius: 0;
    box-shadow: none;
}

/* Positioning header in the top row with reduced padding for vertical rhythm */
body.archive #primary.archive-container .archive-header {
    grid-row: 1;
    z-index: 2;
    padding: 1.25em 2.5em 0.8em;
    /* 50% reduced top, ~66% reduced bottom gap */
}

/* Clean technical H1 styling */
body.archive .archive-header .page-title {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #555;
    display: inline-block;
    font-size: 24px;
    color: #444;
    font-weight: bold;
}

/* Positioning main articles in the second row - No top padding for vertical connection */
body.archive #primary.archive-container main#main.archive-main {
    grid-row: 2;
    padding: 0 2.5em 2.5em;
}

/* 4. Fixed Sidebar: Positioned from very top (Row 1) */
body.archive #primary.archive-container main#main.archive-main article.category-card,
body.archive #primary.archive-container main#main.archive-main article.post-card {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 2px solid #eaeaea;
    transition: opacity 0.2s ease;
    border-radius: 0;
}

body.archive #secondary.widget-area {
    grid-column: 2;
    /* Position in the side column */
    grid-row: 1 / 3;
    /* Spans H1 row and articles row entirely */
    padding-top: 40px;
    /* Match H1's vertical start position */
    background: transparent;
    background-color: transparent;
    border: none;
    box-shadow: none;
    width: 300px;
    /* Match fixed width track */
    margin: 0;
}

/* 5. Post Grid & Horizontal Individual Article Cards */
/* Enhanced for side-by-side technical editorial look from image_1.png */

/* Target the grid itself for vertical spacing */
body.archive #primary.archive-container main#main.archive-main .post-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 2em;
}

/* Side-by-side article format using high specificity */
body.archive #primary.archive-container main#main.archive-main article.category-card,
body.archive #primary.archive-container main#main.archive-main article.post-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

body.archive #primary.archive-container main#main article.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Standard 300px Fixed Thumbnail Wrapper */
body.archive #primary.archive-container main#main div.post-thumbnail-wrap {
    flex: 0 0 300px;
    width: 300px;
    max-width: 300px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background-color: #eee;
}

body.archive #primary.archive-container main#main div.post-thumbnail-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
}

body.archive #primary.archive-container main#main article.category-card:hover .post-thumbnail-wrap img {
    transform: scale(1.08);
}

/* Flexible Content Block on Right */
body.archive #primary.archive-container main#main div.post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Tight Text Content Spacing */
body.archive #primary.archive-container main#main .post-info .post-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px 0;
    padding: 0;
}

body.archive #primary.archive-container main#main .post-info .post-title a {
    color: #1a1a1a;
    text-decoration: none;
}

body.archive #primary.archive-container main#main .post-info .post-title a:hover {
    color: #2b3a8c;
}

body.archive #primary.archive-container main#main .post-info .post-meta {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 8px 0;
    padding: 0;
}

body.archive #primary.archive-container main#main .post-info .post-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
    padding: 0;
}

/* 6. Sharp Pagination & Sidebar Aesthetics */
.archive-layout .pagination {
    display: block;
    width: 100%;
    text-align: center;
    margin: 1em 0 3em;
    padding: 0;
}

.archive-layout .pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.archive-layout .pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid #1a1a1a;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.archive-layout .pagination .page-numbers.current {
    background: #1a1a1a;
    color: #fff;
}

.archive-layout .pagination a.page-numbers:hover {
    background: #f0f0f0;
}

#secondary .widget {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 3rem;
}

#secondary .widget-title {
    background: transparent;
    padding: 0 0 12px 0;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    border-bottom: 2px solid #2563eb;
    /* Sophisticated blue border */
    display: flex;
    align-items: center;
}

/* High-specificity icon override to match new blue theme */
body.archive #secondary .widget-title .widget-title-icon,
body.category #secondary .widget-title .widget-title-icon {
    color: #2563eb;
    stroke: #2563eb;
}

/* --- HIDE CATEGORY WIDGET GLOBALLY --- */
.widget_categories {
    display: none;
}

/* 7. Category Hub / Learning Guide Styling */
body.archive .category-guide-content,
body.category .category-guide-content {
    margin-bottom: 3.5rem;
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
}

body.archive .category-guide-content h2,
body.category .category-guide-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    border-left: 5px solid #2563eb;
    padding-left: 18px;
    margin: 2.5rem 0 1.2rem;
    line-height: 1.3;
}

body.archive .category-guide-content ul,
body.category .category-guide-content ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    border-top: 1px solid #edf2f7;
}

body.archive .category-guide-content li,
body.category .category-guide-content li {
    padding: 14px 18px;
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

body.archive .category-guide-content li:hover,
body.category .category-guide-content li:hover {
    background-color: #f8fafc;
}

body.archive .category-guide-content li a,
body.category .category-guide-content li a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
    flex: 1;
}

body.archive #primary.archive-container .step-guide-box,
body.category #primary.archive-container .step-guide-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 30px;
    margin: 2.5rem 0;
    border-radius: 8px;
}

body.archive #primary.archive-container .step-guide-box .step-header,
body.category #primary.archive-container .step-guide-box .step-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

body.archive #primary.archive-container .step-guide-box .step-number,
body.category #primary.archive-container .step-guide-box .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
    margin-right: 12px;
}

body.archive #primary.archive-container .step-guide-box .step-title,
body.category #primary.archive-container .step-guide-box .step-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: #1a1a1a;
    margin: 0;
}

body.archive .category-guide-content p,
body.category .category-guide-content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Category Hub Content Styling
   ========================================================================== */

/* Base Typography & Spacing */
/* Base Typography & Container Styling */
.category-hub-content {
    background-color: #ffffff;
    padding: 1.5rem 3rem 3rem 3rem;
    /* Reduced top padding */
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    line-height: 1.8;
    color: #333;
    margin-bottom: 2rem;
}

/* Mobile Padding Adjustment */
@media (max-width: 768px) {
    .category-hub-content {
        padding: 1.5rem;
    }
}

.category-hub-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Headings */
.category-hub-content h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 0;
    /* Removed default top margin */
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eaeaea;
}

.category-hub-content h2 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background-color: #f7f9fa;
    border-left: 5px solid #2c3e50;
    border-radius: 0 4px 4px 0;
}

.category-hub-content h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed #ccc;
    color: #2c3e50;
}

/* Clickable Card Lists for Links with Inline SVG Icon */
.category-hub-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2.5rem;
}

.category-hub-content ul li {
    margin-bottom: 0.8rem;
}

.category-hub-content ul li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    background-color: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Zero-latency Embedded SVG Document Icon */
.category-hub-content ul:not(.article-toc-list) li a::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z' /%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

/* Right Arrow */
.category-hub-content ul:not(.article-toc-list) li a::after {
    content: "→";
    margin-left: auto;
    color: #a0aec0;
    transition: transform 0.2s ease;
}

/* Hover Effects */
.category-hub-content ul li a:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    background-color: #fcfdfd;
}

.category-hub-content ul:not(.article-toc-list) li a:hover::before {
    transform: scale(1.1);
}

.category-hub-content ul:not(.article-toc-list) li a:hover::after {
    transform: translateX(4px);
    color: #2c3e50;
}

/* ============================================================
   SINGLE POST: 記事下エリア
   ============================================================ */

.single-adsense {
    margin: 40px 0;
}

.single-related {
    background: #fff;
    border-top: 2px solid #eee;
    padding-top: 32px;
    margin-top: 100px;
    margin-bottom: 40px;
}

.single-related-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2634;
    padding-left: 12px;
    border-left: 4px solid #4A6785;
    margin: 0 0 20px;
    line-height: 1.3;
}

.single-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.single-after-related-ad {
    margin-top: 32px;
}

.single-related-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.single-related-card__link:hover .single-related-card__title {
    color: var(--accent-color);
}

.single-related-card__thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: var(--background-color);
    margin-bottom: 8px;
}

.single-related-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.single-related-card__link:hover .single-related-card__thumb img {
    transform: scale(1.03);
}

.single-related-card__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 599px) {
    .single-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ============================================================
   FRONT PAGE: New Layout Sections (fp- prefix)
   ============================================================ */

/* ── 1. Hero ── */
.fp-hero {
    background: linear-gradient( 150deg, #2d4a63 0%, #4A6785 100% );
    color: #fff;
    padding: 56px 36px 52px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}

.fp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.03) 40px,
        rgba(255,255,255,0.03) 41px
    );
    pointer-events: none;
}

.fp-hero-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: #a8c8e8;
    margin: 0 0 14px;
    text-transform: uppercase;
    position: relative;
}

.fp-hero-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
    position: relative;
}

.fp-hero-subtitle {
    font-size: 0.95rem;
    color: rgba( 255,255,255,0.90 );
    line-height: 1.8;
    margin: 0 0 36px;
    position: relative;
}

.fp-hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.fp-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 3px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

.fp-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.fp-btn-primary {
    background: #4A6785;
    color: #fff;
}

.fp-btn-white {
    background: #fff;
    color: #2d4a63;
    box-shadow: 0 2px 8px rgba( 0,0,0,0.15 );
}

.fp-btn-ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba( 255,255,255,0.45 );
}

/* ── 2. Pain Points ── */
.fp-troubles {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 36px 32px;
    margin-bottom: 32px;
}

.fp-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 24px;
    padding-left: 14px;
    border-left: 4px solid #4A6785;
    line-height: 1.3;
}

.fp-troubles-grid {
    display: grid;
    grid-template-columns: repeat( 2, 1fr );
    gap: 12px;
    margin-bottom: 24px;
}

@media ( max-width: 600px ) {
    .fp-troubles-grid {
        grid-template-columns: 1fr;
    }
}

.fp-trouble-item {
    display: block;
    background: #f8f9fc;
    border-left: 3px solid #4A6785;
    padding: 14px 18px;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
}

a.fp-trouble-item:hover {
    background: #eef1f7;
    opacity: 1;
}

.fp-trouble-item::before {
    content: '— ';
    color: #4A6785;
    font-weight: 700;
}

.fp-troubles-answer {
    background: #f0f4f8;
    border-radius: 4px;
    padding: 18px 22px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.8;
    margin: 0;
}

/* ── 3. Popular Slider ── */
.fp-popular-section {
    margin-bottom: 32px;
}

.fp-popular-section .site-hero-slider {
    margin-top: 16px;
}

/* ── 4. Level Nav ── */
.fp-levels {
    background: linear-gradient( 150deg, #2d4a63 0%, #4A6785 100% );
    border-radius: 8px;
    padding: 36px 28px;
    margin-bottom: 32px;
}

.fp-levels .fp-section-title {
    color: #fff;
    border-left-color: rgba( 255,255,255,0.6 );
}

.fp-levels-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 16px;
}

@media ( max-width: 680px ) {
    .fp-levels-grid {
        grid-template-columns: 1fr;
    }
}

.fp-level-card {
    background: rgba( 255,255,255,0.06 );
    border: 1px solid rgba( 255,255,255,0.12 );
    border-radius: 6px;
    padding: 24px 20px;
    text-decoration: none;
    color: #fff;
    display: block;
    transition: background 0.2s, transform 0.15s;
    position: relative;
}

.fp-level-card:hover {
    background: rgba( 255,255,255,0.12 );
    transform: translateY(-2px);
    opacity: 1;
}


.fp-level-badge {
    display: inline-block;
    background: #fff;
    color: #fff;
    font-size: 0.68rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.06em;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.fp-level-num {
    font-size: 0.72rem;
    color: #a8c8e8;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.fp-level-card h3 {
    font-size: 1rem;
    margin: 0 0 10px;
    font-weight: 700;
}

.fp-level-card p {
    font-size: 0.83rem;
    color: rgba( 255,255,255,0.88 );
    line-height: 1.7;
    margin: 0 0 16px;
}

.fp-level-link {
    font-size: 0.82rem;
    color: #a8c8e8;
    font-weight: 600;
}

/* ── 5. Category Sections ── */
.fp-categories {
    display: flex;
    flex-direction: column;
    gap: 48px;
    background: #fff;
    padding: 36px 32px;
}

.fp-cat-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.fp-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2634;
    margin: 0;
    padding-left: 12px;
    border-left: 4px solid #4A6785;
    line-height: 1.3;
}

/* Popular section title (outside cat-header) */
.fp-popular-section > .fp-category-title {
    margin-bottom: 0;
}

.fp-cat-more {
    font-size: 0.83rem;
    color: #4A6785;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.fp-cat-more:hover {
    opacity: 0.72;
}

.fp-cat-more-wrap {
    text-align: center;
    margin-top: 20px;
}

.fp-cat-more-wrap .fp-cat-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    border: 2px solid #4A6785;
    border-radius: 50px;
    color: #4A6785;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.fp-cat-more-wrap .fp-cat-more::after {
    content: '▶';
    font-size: 0.7rem;
}

.fp-cat-more-wrap .fp-cat-more:hover {
    background: #4A6785;
    color: #fff;
    opacity: 1;
}

.fp-card-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fp-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transition: box-shadow 0.2s, transform 0.15s;
    list-style: none;
}

.fp-card:hover {
    box-shadow: 0 3px 12px rgba( 0,0,0,0.07 );
    transform: translateY(-1px);
}

.fp-card-thumb-link {
    flex: 0 0 150px;
    width: 150px;
    overflow: hidden;
}

.fp-card-thumb {
    width: 150px;
    height: 100px;
    overflow: hidden;
    background: #f0f0f0;
}

.fp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.fp-card:hover .fp-card-thumb img {
    transform: scale( 1.04 );
}

.fp-card-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.fp-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 6px;
}

.fp-card-title a {
    color: #222;
    text-decoration: none;
}

.fp-card-title a:hover {
    color: #4A6785;
    opacity: 1;
}

.fp-card-date {
    font-size: 0.75rem;
    color: #666;
}

@media ( max-width: 540px ) {
    .fp-card {
        flex-direction: column;
    }

    .fp-card-thumb-link {
        flex: none;
        width: 100%;
    }

    .fp-card-thumb {
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
}
/* ============================================================
 * [card] ショートコード
 * ============================================================ */
.p-card-link {
    margin: 24px 0;
}

.p-card-link__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.p-card-link__inner:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    opacity: 1;
}

.p-card-link__thumb {
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--background-color);
}

.p-card-link__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.p-card-link__body {
    flex: 1;
    min-width: 0;
}

.p-card-link__cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.p-card-link__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .p-card-link__thumb {
        width: 80px;
        height: 45px;
    }
    .p-card-link__title {
        font-size: 0.88rem;
    }
}

/* ============================================================
 * カテゴリハブページ 共通スタイル
 * style.css の末尾に追記してください
 * ============================================================ */

/* セクション区切り */
.hub-section {
    padding: 48px 0;
    border-bottom: 1px solid var(--border-color);
}

.hub-section:last-child {
    border-bottom: none;
}

/* セクションヘッダー */
.hub-section__header {
    margin-bottom: 28px;
}

.hub-section__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 10px;
    padding-left: 14px;
    border-left: 4px solid var(--accent-color);
    line-height: 1.4;
}

.hub-section__lead {
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
    padding-left: 18px;
}

/* サブセクション（h3レベル） */
.hub-subsection {
    margin-top: 36px;
}

.hub-subsection__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-subsection__title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    flex-shrink: 0;
}

/* リンクリスト */
.hub-link-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.hub-link-list li {
    border-bottom: 1px solid var(--border-color);
}

.hub-link-list li:last-child {
    border-bottom: none;
}

.hub-link-list li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.92rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s;
    gap: 8px;
}

.category-hub-content ul.hub-link-list li a::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    background-image: none;
    border-radius: 1px;
    flex-shrink: 0;
    align-self: center;
    margin-right: 0;
}

.hub-link-list li a:hover {
    background: var(--background-color);
    opacity: 1;
    color: var(--accent-color);
}

/* ステップリスト */
.hub-steps {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.hub-steps__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.hub-steps__list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    gap: 6px 24px;
}

.hub-steps__list li {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .hub-steps__list {
        grid-template-columns: 1fr;
    }
    .hub-section {
        padding: 36px 0;
    }
    .hub-section__title {
        font-size: 1.2rem;
    }
}

/* ============================================================
 * 404 Not Found
 * ============================================================ */
.error404-main {
    display: flex;
    justify-content: center;
    padding: 80px 20px;
}

.error404-content {
    width: 100%;
    max-width: 680px;
    text-align: center;
}

.error404-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 32px;
}

.error404-text {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.8;
    margin: 0 0 8px;
}

.error404-search {
    display: flex;
    margin: 40px 0 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.error404-search__input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
    background: #fff;
}

.error404-search__input::placeholder {
    color: #bbb;
}

.error404-search__btn {
    background: var(--primary-color);
    border: none;
    padding: 0 20px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.error404-search__btn:hover {
    background: var(--accent-color);
}

.error404-home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: background 0.2s;
}

.error404-home:hover {
    background: var(--background-color);
    opacity: 1;
}