/*
Theme Name: Simple Theme
Theme URI: https://example.com/simple-theme
Description: シンプルなカスタムテーマ - コメント機能なし
Author: Your Name
Version: 1.0
*/

/* ============================================
   CSS変数
============================================ */
:root {
    --clear-color: #00b3a4;
}

/* ============================================
   基本スタイル
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f2f3f6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-feature-settings: "palt";
    letter-spacing: .04em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 0 60px;
    flex: 1 0 auto;
    width: 100%;
}

/* ============================================
   ヘッダー
============================================ */
.site-header {
    background: white;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
}

.header-container {
    max-width: 100%;
    margin: 0;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.header-left h1 {
    margin: 0;
}

.header-left h1 a.site-branding {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-left h1 a.site-branding:hover {
    opacity: 0.8;
}

.site-logo {
    height: 20px;
    width: auto;
}

.site-name {
    font-size: 14px;
    font-weight: bold;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ハンバーガーボタン */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 2010;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
    position: absolute;
    left: 10px;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 13px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 21px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 29px;
}

/* アクティブ時（バッテン） */
.mobile-menu-toggle.active {
    background: white;
    border: 2px solid #001be0;
}

.mobile-menu-toggle.active span {
    background-color: #001be0;
}

.mobile-menu-toggle.active span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

/* モバイルメニュー内の閉じるボタン */
.mobile-menu-close {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2010;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-menu-close span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    position: absolute;
    left: 10px;
}

.mobile-menu-close span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.mobile-menu-close span:nth-child(2) {
    top: 21px;
    opacity: 0;
}

.mobile-menu-close span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

.user-menu {
    position: relative;
}

.user-welcome {
    color: #001be0;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    display: block;
    padding: 4px 8px;
}

.user-welcome::before {
    content: "";
    display: none;
    width: 24px;
    height: 24px;
    background-image: url('images/ic_user.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.user-welcome:hover {
    text-decoration: underline;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    min-width: 160px;
    z-index: 1500;
    margin-top: 0;
    padding-top: 5px;
}

.user-menu:hover .user-menu-dropdown {
    display: block;
}

.user-menu-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.user-menu-dropdown a:last-child {
    border-bottom: none;
}

.user-menu-dropdown a:hover {
    background-color: #f2f3f6;
    color: #001be0;
}

.header-right a {
    color: #001be0;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.header-right a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .header-container {
        padding: 2vw 3vw;
    }

    .header-left h1 a.site-branding {
        gap: 10px;
    }

    .site-logo {
        height: 18px;
    }

    .site-name {
        font-size: 4vw;
    }

    /* ハンバーガーボタンを表示 */
    .mobile-menu-toggle {
        display: flex;
    }

    /* ヘッダーのユーザーメニューを非表示 */
    .header-right {
        display: none;
    }

    .user-welcome {
        padding: 4px;
        width: 32px;
        height: 32px;
        display: block;
        overflow: hidden;
        position: relative;
        text-indent: -9999px;
        white-space: nowrap;
    }

    .user-welcome::before {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
    }

    .user-welcome:hover {
        text-decoration: none;
    }

    .header-right a {
        font-size: 12px;
    }

    .user-menu-dropdown a {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* ============================================
   ページタイトルセクション
============================================ */
.page-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    position: relative;
    top: -3px;
}

@media (max-width: 768px) {
.page-title-section {
    display: none;
}   
}
.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 22px;
    }
}


.page-title a {
    color: #333;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.page-title a:hover {
    opacity: 0.7;
}

.page-title-logo {
    height: 30px;
    width: auto;
    vertical-align: middle;
    position: relative;
    top: -3px;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .page-title-logo {
        height: 30px;
        margin-right: 5px;
    }
}

.about-link {
    color: #001be0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.about-link::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url('images/ic_about.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}
.about-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* ============================================
   パンくずナビゲーション
============================================ */
.breadcrumb {
    margin-bottom: 30px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 768px) {
.breadcrumb {
    margin-top: -2vw;
    margin-bottom: 1.5vw;
    padding: .8vw 1.4vw!important;
    display: block;
    line-height: 1.6em;
}

}

.breadcrumb a {
    color: #001be0;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb a:hover:not(.breadcrumb-home) {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
}

.breadcrumb-home {
    display: inline-flex;
    align-items: center;
}

.home-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-image: url('images/ic_home.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.breadcrumb-home:hover .home-icon {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 10px 15px;
        font-size: 13px;
        display: block;
        line-height: 1.6em;
    }

    .breadcrumb a,
    .breadcrumb span {
        display: inline;
    }

    .breadcrumb-home {
        display: inline-flex !important;
        align-items: center;
        vertical-align: middle;
    }

    .home-icon {
        width: 16px !important;
        height: 16px !important;
        display: inline-block !important;
        flex-shrink: 0;
    }
}

/* ============================================
   カテゴリナビゲーション
============================================ */
.category-nav {
    background: white;
    margin-bottom: 15px;
    overflow: hidden;
}

@media (max-width: 768px) {
.category-nav {
    margin-bottom: 2vw;
}
}
.category-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.category-nav li {
    margin: 0;
    width: 100%;
}
.category-nav li:first-child a {
}
.category-nav li:last-child a {
}
@media (max-width: 768px) {
.category-nav ul {
    flex-wrap: wrap;
}
.category-nav li {
    width: 33.33%;
}
    
}

.category-nav a {
    text-align: center;
    display: block;
    padding: 12px 20px;
    background-color: #e5e6ec;
    color: #001be0;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: none;
    border-right: 1px solid white;
}
@media (max-width: 768px) {
    .category-nav a {
        padding: .5em;
        font-size: 14px;
    }
}


.category-nav a:hover {
    background-color: #a9ccff;
    text-decoration: none;
}

.category-nav a.active {
    background-color: #001be0;
    border: none;
    border-right: 1px solid white;
    color: white;
}

.category-nav li:last-child a {
    border-right: none;
}

/* ============================================
   フッター
============================================ */
.site-footer {
    background: white;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-size: 12px;
    text-align: center;
}

.footer-container p {
    margin: 0;
    color: #666;
}

/* ============================================
   2カラムレイアウト
============================================ */
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}
@media (max-width: 768px) {
.content-wrapper {
    margin-top: 4vw;
    padding-left: 1.5vw;
    padding-right: 1.5vw;
    flex-direction: column;
}
    
}
.main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.single .main-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 35px;
}

@media (max-width: 768px) {
.single .main-content {
    padding: 5vw;
}
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    min-height: 600px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-height: 0;
    }
}

/* ============================================
   サイドバー
============================================ */
.sidebar-widget {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    margin: -20px -20px 15px -20px;
    padding: 15px 20px;
    background: #e5e6ec;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 18px;
    font-weight: bold;
}

/* 検索ウィジェット専用スタイル */
.sidebar-widget.search-widget {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

/* 検索フォーム */
.search-form {
    display: flex;
    gap: 0;
    border: 2px solid #001be0;
    overflow: hidden;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-form input[type="search"]:focus {
    outline: none;
}

.search-form button {
    padding: 12px 20px;
    background-color: #001be0;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.search-form button:hover {
    background-color: #0015a8;
}

/* カテゴリ・タグリスト */
.sidebar-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-widget ul li {
    margin-bottom: 8px;
}

.sidebar-widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background-color: #f9f9f9;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-widget ul li a:hover {
    background-color: #001be0;
    color: white;
}

.sidebar-widget ul li a .count {
    font-size: 12px;
    background-color: #e0e0e0;
    padding: 2px 8px;
    border-radius: 12px;
}

.sidebar-widget ul li a:hover .count {
    background-color: rgba(255,255,255,0.3);
    color: white;
}

/* タグウィジェット専用スタイル */
.sidebar-widget.tags-widget ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sidebar-widget.tags-widget ul li {
    margin-bottom: 0;
    display: inline-block;
}

.sidebar-widget.tags-widget ul li a {
    display: inline-flex;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

.sidebar-widget.tags-widget ul li a .count {
    font-size: 10px;
    padding: 1px 5px;
}

/* AI関連ニュースウィジェット */
.sidebar-widget.ai-news-widget {
    min-height: auto;
}

.sidebar-widget.ai-news-widget .ai-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* スクロールバーのスタイル（Webkit系ブラウザ用） */
.sidebar-widget.ai-news-widget .ai-news-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-widget.ai-news-widget .ai-news-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-widget.ai-news-widget .ai-news-list::-webkit-scrollbar-thumb {
    background: #ccc;
}

.sidebar-widget.ai-news-widget .ai-news-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ローディング表示 */
.ai-news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.ai-news-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #001be0;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-news-loading-text {
    color: #999;
    font-size: 13px;
}

.sidebar-widget.ai-news-widget .ai-news-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-widget.ai-news-widget .ai-news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget.ai-news-widget .ai-news-item a {
    display: block;
    padding: 0;
    background-color: transparent;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sidebar-widget.ai-news-widget .ai-news-item a:hover {
    background-color: transparent;
    opacity: 0.7;
}

.sidebar-widget.ai-news-widget .news-title {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-widget.ai-news-widget .news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #999;
}

.sidebar-widget.ai-news-widget .news-source {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.sidebar-widget.ai-news-widget .news-date {
    flex-shrink: 0;
}

/* ============================================
   投稿一覧
============================================ */
.posts-list {
    margin-top: 0;
}

.post-item {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 25px 33px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
    position: relative;
}

@media (max-width: 768px) {

.post-item {
    margin-bottom: 6vw;
    padding: 6vw;
}
}
.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* NEWバッジ */
.new-badge {
    position: absolute;
    top: -10px;
    right: -8px;
    background-color: #FF0;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .new-badge {
        top: -4vw;
        right: -1vw;
        font-size: 10px;
        width: 45px;
        height: 45px;
    }
}

.post-thumbnail {
    float: right;
    width: 30%;
    margin-left: 20px;
    margin-bottom: 15px;
}
@media (max-width: 768px) {
.post-thumbnail {
    margin: 2vw 0 0;
    float: none;
    width: 100%;
    order: 4;
}
    
}

.post-thumbnail img {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .post-item {
        display: flex;
        flex-direction: column;
    }

    .post-categories-meta-wrapper {
        order: 1;
    }

    .post-header {
        order: 2;
    }

    .post-tags {
        order: 3;
    }

    .post-excerpt {
        order: 5;
    }

    .post-footer {
        order: 6;
    }
}
/* カテゴリとメタ情報のラッパー */
.post-categories-meta-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* カテゴリ */
.post-categories-top {
    display: flex;
    gap: 5px;
}

.post-categories-top .category-link {
    display: inline-block;
    padding: 3px 11px;
    background-color: #e1edff;
    color: #001be0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.post-categories-top .category-link:hover {
    background-color: #001be0;
    color: white;
}

.post-header {
    margin-bottom: 15px;
}
@media (max-width: 768px) {
.post-header {
    margin-bottom: 0;
}
    
}

.post-title {
    margin: 0 0 10px 0;
    font-size: 24px;
}

@media (max-width: 768px) {

.post-title {
    margin-bottom: 0;
    font-size: 5vw;
}
}
.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title a:hover {
    color: #001be0;
}

.post-meta {
    display: none;
}
.post-author {
    margin-top: -.18em;
}
.post-author:before {
    content: "";
    margin-right: 2px;
    display: inline-block;
    background-image: url('images/ic_user.svg');
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%);
    position: relative;
    top: 3px;
}
.post-author a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}
.post-author a:hover {
    color: #001be0;
    text-decoration: underline;
}
.post-tags {
    margin: -3px 0 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
.post-tags {
    margin: 3vw 0;
}

}

.post-tags strong {
    color: #555;
    margin-right: 0;
    display: inline-block;
    position: relative;
}

.post-tags strong::before {
    content: "";
    margin-right: 0px;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('images/ic_tag.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(50%) sepia(0%) saturate(0%);
    position: relative;
    top: 2px;
}

.tag-link {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px;
    background-color: #f0f0f0;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.tag-link:hover {
    background-color: #e0e0e0;
}

.post-excerpt {
    margin: 15px 0;
    color: #555;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
.post-excerpt {
    margin: 2vw 0 3vw;
    font-size: 3.2vw;
}
    
}

.post-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
@media (max-width: 768px) {
.post-footer {
    margin-top: 0;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

}
.post-footer-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #001be0;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

@media (max-width: 768px) {
    .read-more {
        width: 100%;
        text-align: center;
        padding: .7em;
    }
}

.read-more:hover {
    background-color: #0015a8;
}

.no-posts {
    text-align: center;
    padding: 40px;
    background: white;
    color: #666;
    font-size: 16px;
}

/* ============================================
   ページネーション
============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 25px 0;
    padding: 20px 0;
}
@media (max-width: 768px) {
.pagination {
    margin: 3vw 0;
}
    
}
.pagination-numbers {
    display: flex;
    gap: 5px;
}

.pagination-prev,
.pagination-next,
.pagination-number {
    display: inline-block;
    padding: 8px 12px;
    background-color: #fff;
    color: #001be0;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.pagination-prev:hover,
.pagination-next:hover,
.pagination-number:hover {
    background-color: #001be0;
    color: white;
    border-color: #001be0;
}

.pagination-current {
    display: inline-block;
    padding: 8px 12px;
    background-color: #001be0;
    color: white;
    border: 1px solid #001be0;
    font-weight: bold;
}

/* ============================================
   アーカイブヘッダー
============================================ */
.archive-header {
    margin-bottom: 28px;
}

@media (max-width: 768px) {
.archive-header {
    margin-bottom: 2vw;
}
    
}
.archive-header h2 {
    margin: 0;
}

/* ============================================
   単一投稿ページ
============================================ */
.single-post {
    padding: 0;
}

.single-post .post-categories-meta-wrapper {
    margin: 0 0 15px 0;
}

.single-post .post-header {
    margin: 0 0 15px 0;
}
@media (max-width: 768px) {
.single-post .post-header {
    margin-bottom: 2vw;
}
}

/* G検定専用: タイトルと本文の間を詰める */
.single-post-gkentei .post-header {
    margin-bottom: 0;
}

.single-post .post-title {
    margin: 0 0 10px 0;
    font-size: 28px;
}
@media (max-width: 768px) {
.single-post .post-title {
    font-size: 6vw;
}
}

.single-post .post-tags {
    margin: 0 0 15px 0;
}

@media (max-width: 768px) {
.single-post .post-tags {
    margin-bottom: 5vw;
}
}
.single-post .post-thumbnail {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
}
.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
}

.single-post .post-content {
    margin: 40px 0;
    line-height: 1.8;
    font-size: 16px;
}

/* G検定ページのみ上マージンを0に */
.single-post-gkentei .post-content {
    margin-top: 0;
}
@media (max-width: 768px) {
.single-post .post-content {
    font-size: 4vw;
}
    
}
.single-post .post-like-section {
    margin: 20px 0;
}

.single-post .post-navigation {
    margin: 20px 0 0 0;
    padding-top: 20px;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.single-post .post-content h2,
.single-post .post-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post .post-content p {
    margin-bottom: 20px;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-post .post-content li {
    margin-bottom: 5px;
}
.single-post table {
    border-collapse: collapse;
}
.single-post table thead {
    border-bottom: 0;
}
.single-post table td,
.single-post table th {
    border: 1px solid;
    padding: .5em;
    box-sizing: border-box;
    line-height: 1.3em;
}
.single-post table th {
    background-color: #efefef;
}
/* ============================================
   投稿ナビゲーション
============================================ */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    color: #001be0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: #0015a8;
    text-decoration: underline;
}

/* ============================================
   高評価ボタン
============================================ */
.like-button-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    outline: none;
}

.like-button:hover:not(:disabled) {
    border-color: #001be0;
    background-color: #f9f9f9;
}

.like-button:hover:not(:disabled) .like-text {
    color: #001be0;
}

.like-button:hover:not(:disabled) .like-icon {
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.like-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.like-button.liked {
    background-color: #f2f3f6;
    border-color: #001be0;
}

.like-icon {
    width: 17px;
    height: 17px;
    display: inline-block;
    background-image: url('images/ic_good.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(50%) sepia(0%) saturate(0%);
}

.like-text {
    font-weight: 400;
    color: #666;
}

.like-button.liked .like-icon {
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.like-button.liked .like-text {
    color: #001be0;
    font-weight: 500;
}

.like-count {
    font-weight: 500;
    color: #666;
    font-size: 12px;
}
.like-button.liked .like-count {
    color: #001be0;
    font-weight: 500;
}

.like-login-message {
    font-size: 11px;
    color: #999;
    font-style: italic;
}

/* 高評価ボタンアニメーション */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.like-button.animate-like .like-icon {
    animation: likeAnimation 0.6s ease;
}

.like-button.processing {
    opacity: 0.6;
    pointer-events: none;
}

/* 投稿詳細ページの高評価セクション */
.post-like-section {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-like-section > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.post-like-bottom {
    padding-top: 25px;
    margin-top: 50px!important;
    border-top: 1px solid #ddd;
    flex-direction: row;
    flex-wrap: wrap;
}

.like-message {
    margin: 0;
    font-size: 16px;
    color: #555;
    width: 100%;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
.like-message {
    font-size: 3.6vw;
    margin-bottom: 1vw;
}
    
}
.post-like-section .like-button,
.post-like-section .bookmark-button {
    font-size: 13px;
    padding: 6px 14px;
    min-height: 32px;
    box-sizing: border-box;
}

.post-like-section .like-icon,
.post-like-section .bookmark-icon {
    font-size: 16px;
}

.post-like-section .like-count {
    font-size: 13px;
}

/* ============================================
   マイページ
============================================ */
.mypage-container {
    background: white;
    padding: 40px;
}

.mypage-title {
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #001be0;
    color: #333;
    font-size: 24px;
}

.mypage-user-info {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
}

.mypage-greeting {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.mypage-email {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.mypage-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.mypage-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

.mypage-button-primary {
    background-color: #001be0;
    color: white;
}

.mypage-button-primary:hover {
    background-color: #0015a8;
    box-shadow: 0 4px 8px rgba(0,27,224,0.3);
}

.mypage-button-secondary {
    background-color: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.mypage-button-secondary:hover {
    background-color: #f2f3f6;
    border-color: #999;
    color: #333;
}

.mypage-button-icon {
    font-size: 20px;
}

@media (max-width: 768px) {
    .mypage-container {
        padding: 20px;
    }

    .mypage-actions {
        flex-direction: column;
    }

    .mypage-button {
        min-width: 100%;
    }
}

/* パスワード変更セクション */
.mypage-password-change {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.mypage-section-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.password-change-form {
    max-width: 500px;
}

.password-change-form .form-group {
    margin-bottom: 20px;
}

.password-change-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.password-change-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.password-change-form input[type="password"]:focus {
    outline: none;
    border-color: #001be0;
}

.password-message {
    margin: 15px 0;
    padding: 12px 15px;
    font-size: 14px;
    display: none;
}

.password-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.password-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.password-change-form .mypage-button {
    margin-top: 10px;
    border: none;
    cursor: pointer;
}

.password-change-form .mypage-button:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .mypage-password-change {
        margin-top: 30px;
        padding-top: 20px;
    }

    .password-change-form {
        max-width: 100%;
    }
}

/* ============================================
   ユーザープロフィールページ
============================================ */
.author-profile {
    background: white;
    padding: 40px;
}

.author-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #001be0;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.author-profile-title {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.author-profile-info {
    margin-bottom: 40px;
}

.author-profile-section {
    margin-bottom: 25px;
}

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

.author-profile-section-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.author-profile-description {
    background: #f9f9f9;
    padding: 15px 20px;
    color: #555;
    line-height: 1.8;
}

.author-profile-website {
    display: flex;
    align-items: center;
    gap: 8px;
}

.globe-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-image: url('images/ic_web.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.author-profile-website a {
    color: #001be0;
    text-decoration: none;
    word-break: break-all;
}

.author-profile-website a:hover {
    text-decoration: underline;
}

.author-posts-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
}

.author-posts-title {
    margin: 0 0 25px 0;
    font-size: 20px;
    color: #333;
}

@media (max-width: 768px) {
    .author-profile {
        padding: 20px;
    }

    .author-profile-header {
        gap: 15px;
    }

    .author-avatar img {
        width: 60px;
        height: 60px;
    }

    .author-profile-title {
        font-size: 20px;
    }

    .author-posts-title {
        font-size: 18px;
    }
}

/* ============================================
   まなびベースとは ページ
============================================ */
.about-page {
    background: white;
    padding: 40px;
}

.about-page-title {
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #001be0;
    color: #333;
    font-size: 28px;
}

.about-page-content {
    line-height: 1.8;
    font-size: 16px;
}

.about-page-content h2,
.about-page-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}
.has-x-large-font-size {
    line-height: 1.3em;
}

.about-page-content p {
    margin-bottom: 20px;
}

.about-page-content ul,
.about-page-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.about-page-content li {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .about-page {
        padding: 20px;
    }

    .about-page-title {
        font-size: 22px;
    }
}

/* 資料サイドバー */
.sidebar-widget .shiryo-title {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.sidebar-widget .shiryo-date {
    display: block;
    font-size: 12px;
    color: #999;
}

.sidebar-widget ul li a {
    display: block;
    padding: 12px 10px;
}

.sidebar-widget ul li a:hover .shiryo-title {
    color: white;
}

.sidebar-widget ul li a:hover .shiryo-date {
    color: rgba(255,255,255,0.8);
}

/* ============================================
   ブックマークボタン
============================================ */
.bookmark-button-wrapper {
    display: inline-flex;
    align-items: center;
}

.bookmark-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    outline: none;
}

.bookmark-button:hover:not(:disabled) {
    border-color: #001be0;
    background-color: #f9f9f9;
}

.bookmark-button:hover:not(:disabled) .bookmark-text {
    color: #001be0;
}

.bookmark-button:hover:not(:disabled) .bookmark-icon {
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.bookmark-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.bookmark-button.bookmarked {
    background-color: #f2f3f6;
    border-color: #001be0;
}

.bookmark-icon {
    width: 17px;
    height: 17px;
    display: inline-block;
    background-image: url('images/ic_bookmark.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(50%) sepia(0%) saturate(0%);
}

.bookmark-text {
    font-weight: 400;
    color: #666;
}

.bookmark-button.bookmarked .bookmark-icon {
    filter: brightness(0) saturate(100%) invert(8%) sepia(100%) saturate(7059%) hue-rotate(246deg) brightness(95%) contrast(143%);
}

.bookmark-button.bookmarked .bookmark-text {
    color: #001be0;
    font-weight: 500;
}

.bookmark-button.processing {
    opacity: 0.6;
    pointer-events: none;
}

/* モバイルメニューオーバーレイ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* モバイルメニューコンテンツ */
.mobile-menu-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 2001;
}

.mobile-menu-overlay.active .mobile-menu-content {
    right: 0;
}

/* モバイルメニューヘッダー */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1vw 2vw 4vw;
    margin: 0;
    min-height: 32px;
}

.mobile-menu-logo {
    height: 18px;
    width: auto;
    filter: brightness(0) invert(1);
    margin: 0;
    padding-left: 0;
}

/* 閉じるボタン */
.mobile-menu-close {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    float: right;
    position: relative;
    font-size: 0;
}

.mobile-menu-close::before,
.mobile-menu-close::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.mobile-menu-close::before {
    transform: rotate(45deg);
}

.mobile-menu-close::after {
    transform: rotate(-45deg);
}

.mobile-menu-close:hover::before,
.mobile-menu-close:hover::after {
    opacity: 0.7;
}

/* モバイルメニューナビゲーション */
.mobile-menu-nav {
    margin-top: 0;
}

.mobile-menu-main {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #333;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-menu-link:hover {
    background-color: #2a2a2a;
}

.menu-arrow {
    font-size: 16px;
    color: white;
}

.has-submenu .mobile-menu-link.active .menu-arrow {
    visibility: hidden;
    position: relative;
}

.has-submenu .mobile-menu-link.active .menu-arrow::after {
    content: 'ー';
    visibility: visible;
    position: absolute;
    left: 0;
}

/* サブメニュー */
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #0d0d0d;
}

.mobile-submenu.active {
    max-height: 1000px;
}

.mobile-submenu li {
    border-top: 1px solid #333;
}

.mobile-submenu li:first-child {
    border-top: none;
}

.mobile-submenu a {
    display: block;
    padding: 16px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.mobile-submenu a:hover {
    background-color: #001be0;
    color: white;
}

/* ネストされたサブメニュー（G検定の大カテゴリ→小カテゴリ） */
.mobile-submenu-item.has-child {
    border-top: 1px solid #333;
}

.mobile-submenu-item.has-child:first-child {
    border-top: none;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-submenu-link:hover {
    background-color: #2a2a2a;
}

.submenu-arrow {
    font-size: 16px;
    color: #ccc;
}

.mobile-submenu-link.active .submenu-arrow {
    visibility: hidden;
    position: relative;
}

.mobile-submenu-link.active .submenu-arrow::after {
    content: 'ー';
    visibility: visible;
    position: absolute;
    left: 0;
}

.mobile-submenu-child {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #050505;
}

.mobile-submenu-child.active {
    max-height: 1000px;
}

.mobile-submenu-child li {
    border-top: 1px solid #222;
}

.mobile-submenu-child li:first-child {
    border-top: none;
}

.mobile-submenu-child a {
    display: block;
    padding: 14px 30px;
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.mobile-submenu-child a:hover {
    background-color: #001be0;
    color: white;
}

/* スマホ表示時の設定 */
@media (max-width: 768px) {
    /* PC用のカテゴリナビ、「まなびベースとは？」を非表示 */
    .category-nav {
        display: none;
    }

}

/* ============================================
   ログイン・登録ページ
============================================ */
.container .page-logo {
    text-align: center;
    margin: 40px auto 30px;
    max-width: 480px;
}

.container .page-logo img {
    height: 40px;
    width: auto;
}

.login-page,
.register-page {
    max-width: 480px;
    margin: 0 auto 60px;
    background: white;
    padding: 50px 40px;
    border: 1px solid #ddd;
}

.login-page h2,
.register-page h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
    text-align: center;
}

.login-message,
.register-message {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-form,
.register-form {
    display: flex;
    flex-direction: column;
}

.login-form > *,
.register-form > * {
    margin-bottom: 20px;
}

.login-form > *:last-child,
.register-form > *:last-child {
    margin-bottom: 0;
}

.login-form label,
.register-form label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.register-form input[type="text"],
.register-form input[type="password"],
.register-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus,
.login-form input[type="email"]:focus,
.register-form input[type="text"]:focus,
.register-form input[type="password"]:focus,
.register-form input[type="email"]:focus {
    outline: none;
    border-color: #001be0;
}

.login-form input[type="submit"],
.register-form input[type="submit"] {
    padding: 14px 20px;
    background-color: #001be0;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.login-form input[type="submit"]:hover,
.register-form input[type="submit"]:hover {
    background-color: #0015a8;
}

.login-links,
.register-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.login-links p,
.register-links p {
    margin: 10px 0;
    color: #666;
}

.login-links a,
.register-links a {
    color: #001be0;
    text-decoration: none;
    font-weight: 500;
}

.login-links a:hover,
.register-links a:hover {
    text-decoration: underline;
}

.error-message {
    padding: 15px;
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c00;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    padding: 15px;
    background-color: #efe;
    border: 1px solid #cfc;
    color: #060;
    margin-bottom: 20px;
    text-align: center;
}

.register-page .names {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.register-page .names > * {
    width: 48%;
}

@media (max-width: 768px) {
    .login-page,
    .register-page {
        margin: 20px auto;
        padding: 30px 20px;
    }

    .login-page h2,
    .register-page h2 {
        font-size: 24px;
    }
}

/* ============================================
   難易度切り替えタブ
============================================ */
.difficulty-tabs-wrapper {
    margin: 30px 0;
    position: relative;
}

/* タブの下の罫線（全体） */
.difficulty-tabs-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #999;
    z-index: 0;
}

.difficulty-tabs {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
    padding: 0 10px;
}

.difficulty-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 20px 10px;
    background: #f0f0f1;
    border: 1px solid #999;
    border-bottom: 1px solid #999;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #50575e;
    transition: all 0.2s ease;
    position: relative;
    flex: 1;
    justify-content: center;
}

.difficulty-tab:hover {
    background: #e8e8e9;
    color: #001be0;
}

.difficulty-tab.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #001be0;
    z-index: 2;
}

.difficulty-tab.active .tab-desc {
    color: #666;
}

.difficulty-tab .tab-label {
    font-size: 14px;
    font-weight: 600;
}

.difficulty-tab .tab-desc {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.difficulty-content {
    display: none;
    padding-top: 20px;
}

.difficulty-content.active {
    display: block;
}

@media (max-width: 768px) {
    .difficulty-tabs-wrapper {
        margin: 20px 0;
    }

    .difficulty-tabs-wrapper::after {
        left: 0;
        right: 0;
    }

    .difficulty-tabs {
        gap: 6px;
        padding: 0 8px;
    }

    .difficulty-tab {
        padding: 10px 12px 8px;
        gap: 2px;
    }

    .difficulty-tab .tab-label {
        font-size: 13px;
    }

    .difficulty-tab .tab-desc {
        font-size: 10px;
    }
}

/* ============================================
   トップページ（フロントページ）
============================================ */
.front-page-body {
    background-color: #f2f3f6;
}

.front-page-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #000e77;
    color: white;
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

.hero-logo {
    margin-bottom: 40px;
}

.hero-logo-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 24px;
    line-height: 1.3;
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 48px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: white;
    color: #667eea;
}

.btn-primary:hover {
    background-color: #f8f9fa;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* トップページ - レスポンシブ対応 */
@media (max-width: 768px) {
    .front-page-hero {
        min-height: calc(100vh - 150px);
        padding: 20px 0;
    }

    .hero-content-simple {
        width: 100%;
        max-width: 100%;
    }

    .hero-logo-image {
        max-width: 280px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 16px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        padding: 14px 32px;
        font-size: 16px;
    }
}

/* トップページ - シンプルな大きなボタンレイアウト */
.hero-content-simple {
    max-width: 900px;
    text-align: center;
}

.hero-buttons-large {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: nowrap;
}

.btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 58px 70px;
    font-size: 42px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 400px;
    height: 207px;
}

.btn-manabibase {
    background-color: white;
    color: #667eea;
}

.btn-manabibase .btn-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.btn-manabibase:hover {
    background-color: #f8f9fa;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.btn-gkentei {
    background-color: white;
    color: #333;
    gap: 16px;
}

.btn-gkentei .btn-icon {
    height: 70px;
    width: auto;
}

.btn-gkentei .btn-text {
    font-size: 42px;
    color: #333;
}

.btn-gkentei:hover {
    background-color: #f8f9fa;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* トップページ - 大きなボタンのレスポンシブ対応 */
@media (max-width: 768px) {
    .hero-buttons-large {
        flex-direction: column;
        gap: 24px;
        padding: 0 10%;
        width: 100%;
        align-items: stretch;
    }

    .btn-large {
        width: 100%;
        max-width: 100%;
        height: 140px;
        padding: 30px 20px;
    }

    .btn-manabibase .btn-logo {
        max-width: 75%;
        max-height: 75%;
    }

    .btn-gkentei .btn-icon {
        height: 50px;
    }

    .btn-gkentei .btn-text {
        font-size: 32px;
    }
}

/* ============================================
   目次ナビゲーション（左サイドバー）
============================================ */
.content-wrapper-with-toc {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.sidebar-toc {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: visible;
}

.main-and-quiz-wrapper {
    flex: 1;
    min-width: 0;
}

.toc-widget {
    background: white;
    padding: 0;
    overflow: visible;
}

.toc-title {
    font-size: 18px;
    font-weight: bold;
    padding: 15px 20px;
    margin: 0;
    background: #e5e6ec;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
}

.toc-post-title {
    font-size: 17px;
    font-weight: 600;
    padding: 20px 20px 15px 30px;
    margin: 0;
    color: #333;
    line-height: 1.5;
    text-align: left;
}

.toc-nav {
    font-size: 14px;
    padding: 4px 20px 15px 20px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item-h2 {
    margin-bottom: 4px;
}

.toc-item-h3 {
    display: none;
}

.toc-link {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 4px 10px;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.toc-link:hover {
    background-color: #f0f0f0;
    color: #001be0;
}

.toc-link.active {
    background-color: transparent;
    color: #1a1a1a;
    font-weight: bold;
}

.toc-empty {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.toc-quiz-button-wrapper {
    background: white;
    padding: 0 20px 20px 20px;
}

/* テストボタン共通スタイル */
.toc-quiz-button,
.btn-gkentei-test,
.btn-workbook-test,
.child-category-open-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #001be0;
    border: 1px solid #001be0;
    font-weight: normal;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 個別スタイル: 目次ナビボタン */
.toc-quiz-button {
    padding: 12px 24px;
    font-size: 16px;
}

.toc-quiz-button:hover {
    background-color: #001be0;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 27, 224, 0.3);
}

.toc-quiz-button-inner {
    position: relative;
    overflow: visible;
    display: inline-block;
    width: 100%;
}

.toc-quiz-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--clear-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: normal;
    z-index: 10;
}

.quiz-cleared .toc-quiz-button {
    border-color: var(--clear-color);
    color: var(--clear-color);
}

.quiz-cleared .toc-quiz-button:hover {
    background-color: var(--clear-color);
    color: white;
    box-shadow: 0 4px 12px rgba(11, 206, 171, 0.3);
}

.main-content-with-toc {
    flex: 1;
    min-width: 0;
}

/* 目次ナビゲーションのスクロールバーカスタマイズ */
.sidebar-toc::-webkit-scrollbar {
    width: 6px;
}

.sidebar-toc::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-toc::-webkit-scrollbar-thumb {
    background: #888;
}

.sidebar-toc::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .content-wrapper-with-toc {
        flex-direction: column;
    }

    .sidebar-toc {
        width: 100%;
        position: static;
        max-height: none;
        order: -1;
        margin-bottom: 20px;
    }

    .main-content-with-toc {
        width: 100%;
    }

    .toc-quiz-button {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* ============================================
   G検定○×問題
============================================ */
.gkentei-quiz-section {
    margin-top: 20px;
    padding: 0;
    background: #fff;
    border: none;
    position: relative;
}

.quiz-section-header {
    background: #e5e6ec;
    padding: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.quiz-section-title {
    font-size: 36px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #1f2937;
    letter-spacing: 0;
    text-transform: none;
}

.quiz-description {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
    font-weight: normal;
}

#gkentei-quiz-container {
    display: flex;
    flex-direction: column;
    padding: 10px 40px 30px;
    margin-bottom: 0;
}

.quiz-question {
    padding: 30px 0;
}

.quiz-question:not(:first-child) {
    border-top: 1px solid #ddd;
}

.quiz-question:last-child {
    border-bottom: 1px solid #ddd;
}


.quiz-question-body {
    display: flex;
    gap: 40px;
    align-items: center;
}

.quiz-question-left {
    flex: 1;
}

.quiz-question-header {
    margin-bottom: 15px;
}

.quiz-number {
    color: white;
    font-size: 14px;
    background: #778;
    padding: 5px 12px;
    border-radius: 16px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.quiz-result {
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    margin-left: 10px;
}

.result-correct {
    color: #22c55e;
}

.result-incorrect {
    color: #ef4444;
}

.quiz-text {
    font-size: 18px;
    line-height: 1.8;
    color: #1a1a1a;
    margin: 0;
}

.quiz-buttons {
    display: flex;
    gap: 15px;
    flex-direction: row;
    flex-shrink: 0;
}

.quiz-btn {
    width: 60px;
    height: 60px;
    padding: 0;
    font-size: 32px;
    font-weight: 900;
    border: 1px solid #aaa;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-btn-maru {
    color: #001be0;
}

.quiz-btn-batsu {
    color: #ea215a;
}

.quiz-btn-maru:hover:not(:disabled) {
    background: #001be0;
    color: white;
    border-color: #001be0;
}

.quiz-btn-batsu:hover:not(:disabled) {
    background: #ea215a;
    color: white;
    border-color: #ea215a;
}

.quiz-btn.selected {
    background: #001be0;
    color: white;
    border-color: #001be0;
}

.quiz-btn-batsu.selected {
    background: #ea215a;
    border-color: #ea215a;
}

.quiz-btn.correct {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
    animation: correctAnswer 0.5s ease;
}

.quiz-btn.incorrect {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    animation: incorrectAnswer 0.5s ease;
}

.quiz-btn.show-correct {
    background: #86efac;
    border-color: #22c55e;
    animation: showCorrect 0.5s ease;
}

.quiz-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}


@keyframes correctAnswer {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes incorrectAnswer {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes showCorrect {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* スコアセクション */
.quiz-score-section {
    background: white;
    padding: 30px;
    text-align: center;
}

.quiz-score-text {
    font-size: 40px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

@media (max-width: 768px) {
.quiz-score-text {
    font-size: 26px;
}
}
.quiz-score-number {
    font-size: 60px;
}


@media (max-width: 768px) {
.quiz-score-number {
    font-size: 40px;
}
}
.quiz-percentage {
    font-size: 22px;
    vertical-align: middle;
    margin-left: 5px;
}

.quiz-perfect-message-text {
    font-size: 24px;
    padding: .3em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    background-color: var(--clear-color);
}

@media (max-width: 768px) {
.quiz-perfect-message-text {
    font-size: 17px;
}   
}
.quiz-reset-btn {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    background: #001be0;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-reset-btn:hover {
    background: #0015b3;
    box-shadow: 0 4px 12px rgba(0,27,224,0.3);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .gkentei-quiz-section {
        margin-top: 20px;
        padding: 0;
    }

    .quiz-section-header {
        padding: 25px 20px;
    }

    .quiz-section-title {
        font-size: 24px;
    }

    .quiz-description {
        font-size: 13px;
    }

    #gkentei-quiz-container {
        padding: 0 5vw;
    }

    .quiz-question {
        padding: 25px 0;
    }

    .quiz-submit-section {
        padding: 5vw 20px 25px!important;
    }

    .quiz-question-body {
        flex-direction: column;
        gap: 2vw;
        align-items: stretch;
    }

    .quiz-question-left {
        width: 100%;
    }

    .quiz-question-header {
        margin-bottom: 12px;
    }

    .quiz-text {
        font-size: 16px;
    }

    .quiz-buttons {
        flex-direction: row;
        justify-content: flex-end;
    }

    .quiz-btn {
        width: 67px;
        height: 56px;
        font-size: 28px;
        border: 1px solid #aaa;
    }

    .quiz-perfect-icon,
    .quiz-good-icon,
    .quiz-ok-icon,
    .quiz-retry-icon {
        font-size: 50px;
    }

    .quiz-perfect-title,
    .quiz-good-title,
    .quiz-ok-title,
    .quiz-retry-title {
        font-size: 20px;
    }
}

/* ============================================
   答え合わせボタン
============================================ */
.quiz-submit-section {
    text-align: center;
    padding: 0 40px 40px 40px;
}

.quiz-submit-btn {
    padding: 20px 80px;
    font-size: 20px;
    font-weight: 900;
    background: #334;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    outline: none;
    border: 0;
}

.quiz-submit-btn:hover:not(:disabled) {
    background: #0015b3;
    color: white;
    border-color: #0015b3;
}

.quiz-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #ccd;
    color: #888;
}

/* ============================================
   クイズ結果モーダル
============================================ */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
@media (max-width: 768px) {
.quiz-modal {
    padding: 6px;
}
}


.quiz-modal-content {
    background: white;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.quiz-modal-header {
    padding: 25px 30px;
    background: white;
    background-color: #f2f3f6;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.quiz-modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0;
    text-align: center;
}

.quiz-modal-close-x {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.quiz-modal-close-x::before,
.quiz-modal-close-x::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 2px;
    background-color: #666;
    transition: all 0.3s ease;
}

.quiz-modal-close-x::before {
    transform: rotate(45deg);
}

.quiz-modal-close-x::after {
    transform: rotate(-45deg);
}

.quiz-modal-close-x:hover::before,
.quiz-modal-close-x:hover::after {
    background-color: #000;
}

.quiz-modal-body {
    padding: 30px;
}

#quiz-modal-score {
    margin-bottom: 30px;
}

.quiz-details-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.quiz-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-detail-number {
    color: white;
    font-size: 12px;
    background: #778;
    padding: .2em .7em;
    border-radius: 16px;
    margin:-.4em 8px 0 0;
    display: inline-block;
    vertical-align: middle;
}


.quiz-detail-result {
    font-weight: bold;
    font-size: 18px;
}



.quiz-detail-answer {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.answer-circle {
    color: #001be0;
}

.answer-cross {
    color: #ef4444;
}

.quiz-detail-explanation {
    margin-top: 12px;
    padding-top: 1em;
    border-top: 1px solid #ddd;
    line-height: 1.6;
    color: #666;
    font-size: 15px;
}

.explanation-icon {
    margin-right: 0.5em;
}

.quiz-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.quiz-modal-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-modal-close-btn {
    background: #6b7280;
    color: white;
}

.quiz-modal-close-btn:hover {
    background: #4b5563;
}

.quiz-retry-btn {
    background: #001be0;
    color: white;
}

.quiz-retry-btn:hover {
    background: #0015b3;
}

@media (max-width: 768px) {
    /* スマホヘッダーを細く */
    .header-container {
        padding: 3vw 4vw;
    }
}

/* ============================================
   G検定章名（装飾なし）
============================================ */
.gkentei-chapter-name {
    margin-bottom: 2px;
}

.gkentei-chapter-name span {
    color: #6b7280;
    font-size: 17px;
}

/* 章ページヘッダー */
.chapter-page-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.chapter-page-title {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}
@media (max-width: 768px) {
.chapter-page-title {
    font-size: 6.5vw;
    margin-top: 8vw;
}
}

/* 個別スタイル: 問題集テストボタン */
.btn-workbook-test {
    padding: 12px 33px 12px 28px;
    font-size: 14px;
    white-space: nowrap;
}

.btn-workbook-test:hover {
    background-color: #001be0;
    color: white;
}

/* クリア済みの「まとめてテストする」ボタン */
.has-cleared .btn-workbook-test {
    border-color: var(--clear-color);
    color: var(--clear-color);
}

.has-cleared .btn-workbook-test:hover {
    background-color: var(--clear-color);
    color: white;
}

.chapter-test-actions {
    position: relative;
}
@media (max-width: 768px) {
.chapter-test-actions {
    width: 100%;
}
.chapter-test-actions a {
    display: block;
    text-align: center;
}
}

.chapter-test-actions .quiz-perfect-badge {
    position: absolute;
    top: -10px;
    right: -10px;
}

@media (max-width: 768px) {
    .chapter-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ============================================
   合格バッジ
============================================ */
.quiz-perfect-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--clear-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: normal;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .quiz-modal-content {
        max-height: 95vh;
    }

    .quiz-modal-header {
        padding: 20px;
    }

    .quiz-modal-title {
        font-size: 20px;
    }

    .quiz-modal-body {
        padding: 15px;
    }

    .quiz-detail-item {
        padding: 15px;
    }

    .quiz-modal-footer {
        flex-direction: column;
    }

    .quiz-modal-btn {
        width: 100%;
    }

    .quiz-submit-btn {
        width: 100%;
        font-size: 18px;
        padding: 18px 40px;
    }
}

/* ============================================
   G検定 章ナビゲーションサイドバー（左）
============================================ */
.content-wrapper-with-left-sidebar {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.main-content-with-left-sidebar {
    flex: 1;
    min-width: 0;
}

.sidebar-left {
    width: 300px;
    flex-shrink: 0;
    order: -1;
}

.gkentei-chapter-nav {
    position: static;
}

.chapter-nav-widget {
    background: white;
    overflow: hidden;
}

.chapter-nav-title {
    font-size: 18px;
    font-weight: bold;
    padding: 15px 20px;
    margin: 0;
    background: #e5e6ec;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
}

.chapter-nav-list {
    padding: 0;
}

.chapter-nav-item {
    border-bottom: 1px solid #e5e7eb;
}

.chapter-nav-item:last-child {
    border-bottom: none;
}

.chapter-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    background: white;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 15px;
}

.chapter-nav-link:hover {
    background-color: #e1edff;
}

.chapter-nav-link.active {
    background-color: #001be0;
    border-left: 4px solid #001be0;
}

.chapter-nav-link.active .chapter-name {
    color: white;
}

.chapter-name {
    font-weight: 600;
    color: #1f2937;
}

.chapter-count {
    color: #6b7280;
    font-size: 13px;
    margin-left: 8px;
    background-color: #e5e7eb;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 「章を選んでください」メッセージ */
.gkentei-select-chapter {
    background: white;
    padding: 80px 40px;
    text-align: center;
}

.select-chapter-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.select-chapter-title {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin: 0 0 15px 0;
}

.select-chapter-message {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* レスポンシブ: タブレット以下 */
@media (max-width: 1024px) {
    .sidebar-left {
        width: 100%;
        order: 0;
    }

    .content-wrapper-with-left-sidebar {
        display: flex;
        flex-direction: column;
    }

    .gkentei-select-chapter {
        display: none;
    }

    .chapter-nav-widget {
        margin-bottom: 20px;
    }

    .select-chapter-message {
        font-size: 14px;
    }
}

/* ============================================
   G検定記事一覧（2カラムレイアウト）
============================================ */
.gkentei-post-item {
    display: flex;
    gap: 50px;
    align-items: stretch;
}

.gkentei-post-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gkentei-post-item .post-header {
    margin-bottom: -3px;
}

.gkentei-post-item .post-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    min-height: calc(1.6em * 3);
    margin: 0;
}

.gkentei-post-right {
    width: 170px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    flex-shrink: 0;
}

.test-button-wrapper {
    position: relative;
}

.test-button-wrapper .quiz-perfect-badge {
    top: -9px;
    right: -8px;
}

/* 勉強するボタン */
.btn-gkentei-study {
    display: block;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    font-weight: normal;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #001be0;
    color: white;
}

.btn-gkentei-study:hover {
    background-color: #0015a8;
    box-shadow: 0 4px 12px rgba(0, 27, 224, 0.3);
}

/* 個別スタイル: G検定テストボタン */
.btn-gkentei-test {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-gkentei-test:hover {
    background-color: #001be0;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 27, 224, 0.3);
}

/* クリア済みの「テストする」ボタン */
.has-cleared .btn-gkentei-test {
    border-color: var(--clear-color);
    color: var(--clear-color);
}

.has-cleared .btn-gkentei-test:hover {
    background-color: var(--clear-color);
    color: white;
    box-shadow: 0 4px 12px rgba(11, 206, 171, 0.3);
}

/* レスポンシブ: スマホでは縦並び */
@media (max-width: 768px) {
    .gkentei-post-item {
        flex-direction: column;
        gap: 20px;
    }

    .gkentei-post-right {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .btn-gkentei-study {
        font-size: 14px;
        padding: 12px 20px;
        width: 100%;
    }

    .test-button-wrapper {
        width: 100%;
    }

    .btn-gkentei-test {
        font-size: 14px;
        padding: 12px 20px;
        width: 100%;
    }

    /* G検定の章ページのみカテゴリナビを非表示（TOPページは表示） */
    .tax-gkentei_chapter .gkentei-chapter-nav {
        display: none;
    }

    .sidebar-toc {
        width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
    }

    .main-content-with-left-sidebar .chapter-page-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    .main-content-with-left-sidebar .gkentei-select-chapter {
        padding-left: 20px;
        padding-right: 20px;
    }

    .main-content-with-left-sidebar .workbook-selected-chapter {
        padding-left: 20px;
        padding-right: 20px;
    }

    .workbook-quiz-page {
        padding: 20px 0!important;
    }

    .workbook-quiz-page .workbook-selected-chapter,
    .workbook-quiz-page .gkentei-quiz-section {
        padding-left: 0;
        padding-right: 0;
    }

    .main-content-with-left-sidebar .gkentei-quiz-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .main-content-with-left-sidebar .no-quizzes {
        padding-left: 20px;
        padding-right: 20px;
    }

    .main-content-with-left-sidebar .pagination {
        padding-left: 20px;
        padding-right: 20px;
    }

    .main-and-quiz-wrapper,
    .main-content-with-toc {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   G検定問題集ページ
============================================ */

/* 選択された章名（メインコンテンツ上部） */
.workbook-selected-chapter {
    margin-bottom: 20px;
}

.workbook-selected-chapter h2 {
    margin: 0;
    font-size: 32px;
    color: #333;
    font-weight: 600;
}
@media (max-width: 768px) {
.workbook-selected-chapter h2 {
    font-size: 26px;
    margin-top: 5vw;
}
}

/* ナビゲーション内のClearバッジ */
.chapter-nav-item {
    position: relative;
}

.chapter-nav-item .chapter-nav-link {
    position: relative;
}

.chapter-nav-item .quiz-perfect-badge {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clear-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: normal;
}

/* 問題集ボタン */
.chapter-workbook-button {
    margin-top: 20px;
}

.btn-workbook {
    display: block;
    padding: 15px 20px;
    background-color: #fff;
    border: 2px solid #001be0;
    color: #001be0;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-workbook:hover {
    background-color: #001be0;
    color: white;
}

/* 章選択画面 */
.workbook-chapter-selection {
    padding: 40px 20px;
}

.workbook-page-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.workbook-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

.workbook-chapters {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.workbook-parent-group {
    margin-bottom: 20px;
}

.workbook-parent-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #001be0;
}

.workbook-chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.workbook-chapter-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.2s;
}

.workbook-chapter-card:hover {
    border-color: #001be0;
    background-color: #f8f9ff;
}

.workbook-chapter-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.workbook-chapter-count {
    font-size: 14px;
    color: #666;
}

/* 問題集表示画面 */
.workbook-quiz-page {
    padding: 20px;
}

.workbook-header {
    margin-bottom: 30px;
}

.workbook-back-link {
    display: inline-block;
    color: #001be0;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 14px;
}

.workbook-back-link:hover {
    text-decoration: underline;
}

.workbook-info {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 500;
    color: #666;
}

.quiz-source {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

.quiz-score-percentage {
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0;
}

.quiz-details {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.quiz-detail-item {
    padding: 23px;
    margin-bottom: 10px;
    position: relative;
}
.quiz-detail-item.correct {
    background-color: #e8f8f7;
}

.quiz-detail-item.incorrect {
    background-color: #fee;
}

.quiz-result-badge {
    position: absolute;
    top: -15px;
    right: -13px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 10;
}

.correct-badge {
    background: var(--clear-color);
}

.incorrect-badge {
    background: #ef4444;
}
.quiz-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}


.quiz-detail-result {
    font-size: 20px;
    font-weight: 600;
}

.quiz-detail-item.correct .quiz-detail-result {
    color: #22c55e;
}

.quiz-detail-item.incorrect .quiz-detail-result {
    color: #ef4444;
}

.quiz-detail-source {
    color: #999;
    margin-bottom: 8px;
}

.quiz-detail-question {
    margin-bottom: 8px;
    color: #333;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.quiz-detail-answers {
    display: flex;
    gap: 20px;
    font-size: 14px;
    margin-bottom: 8px;
}



@media (max-width: 768px) {
    .workbook-chapter-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   G検定TOPページ カテゴリボタン
============================================ */
.gkentei-top-page {
    padding: 40px 20px;
}

.gkentei-category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .gkentei-category-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.gkentei-category-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    background: white;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
    min-height: 180px;
}

@media (max-width: 768px) {
    .gkentei-category-button {
        padding: 7vw 6vw 8vw 25vw;
        min-height: 0;
        display: block;
        position: relative;
    }
}

.gkentei-category-button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-button-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .category-button-icon {
        width: 60px;
        height: 60px;
        position: absolute;
        margin-bottom: 0;
        left: 5vw;
        top: calc(50% - 30px);
        float: left;
        display: block;
    }
}

.category-button-title {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .category-button-title {
        font-size: 24px;
        display: block;
        margin-bottom: 0;
    }
}

.category-button-description {
    font-size: 14px;
    color: #666;
    text-align: center;
}

@media (max-width: 768px) {
    .category-button-description {
        font-size: 13px;
        line-height: 1.4em;
        display: block;
        text-align: left;
        margin-top: 1vw;
    }
}

/* ============================================
   G検定 親カテゴリページ（小カテゴリボタン表示）
============================================ */
.gkentei-parent-category-page {
    padding: 0 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .gkentei-parent-category-page {
        padding: 30px 2vw;
    }
}

.parent-category-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .parent-category-title {
        font-size: 26px;
    }
}

.parent-category-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .parent-category-description {
        font-size: 14px;
        margin-bottom: 30px;
    }
}

.gkentei-child-category-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 768px) {
    .gkentei-child-category-buttons {
        gap: 12px;
    }
}

.gkentei-child-category-button {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: white;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
}

@media (max-width: 768px) {
    .gkentei-child-category-button {
        padding: 20px 20px;
        flex-wrap: wrap;
    }
}

.gkentei-child-category-button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.child-category-button-left {
    display: flex;
    flex-direction: column;
    flex: 1;
}
@media (max-width: 768px) {
.child-category-button-left {
    width: 100%;
}
}

.child-category-button-title {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .child-category-button-title {
        font-size: 23px;
    }
}

.gkentei-child-category-button:hover .child-category-button-title {
    color: #001be0;
}

.child-category-button-description {
    font-size: 14px;
    color: #666;
}

@media (max-width: 768px) {
    .child-category-button-description {
        font-size: 13px;
    }
}

/* 個別スタイル: 章別テストボタン */
.child-category-open-button {
    padding: 10px 32px;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 20px;
}

@media (max-width: 768px) {
    .child-category-open-button {
        padding: 8px 24px;
        font-size: 13px;
        margin-left: 15px;
    }
}

.gkentei-child-category-button:hover .child-category-open-button {
    background-color: #001be0;
    color: white;
}

/* クリア済みの「開く」「テストする」ボタン */
.has-cleared .child-category-open-button {
    border-color: var(--clear-color);
    color: var(--clear-color);
}

.has-cleared .gkentei-child-category-button:hover .child-category-open-button,
.gkentei-child-category-button.has-cleared:hover .child-category-open-button {
    background-color: var(--clear-color);
    color: white;
}

/* 問題集ページ */
.workbook-button-right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .workbook-button-right {
        gap: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
.workbook-button-right .child-category-open-button {
    display: block;
    margin-left: 0;
    margin-top: 4vw;
    width: 100%;
    text-align: center;
}
}

.workbook-button-right .quiz-perfect-badge {
    position: absolute;
    top: -10px;
    right: -10px;
}

@media (max-width: 768px) {
.workbook-button-right .quiz-perfect-badge {
    top: 0;
}
}

/* G検定対策まとめの区切り線 */
.gkentei-summary-divider {
    margin-top: 25px;
    margin-bottom: 25px;
    border: none;
    border-top: 1px solid #ddd;
}

/* テストボタンのアイコン */
.button-icon {
    width: 0.9em;
    height: 0.9em;
    margin-right: calc(0.3em + 1px);
    fill: #001be0;
    vertical-align: middle;
    position: relative;
    top: calc(-0.1em + 1px);
}

/* クリア済のボタンアイコン */
.has-cleared .button-icon,
.quiz-cleared .button-icon {
    fill: var(--clear-color);
}

/* ホバー時のアイコン色 */
.gkentei-child-category-button:hover .button-icon,
.child-category-open-button:hover .button-icon,
.btn-workbook-test:hover .button-icon,
.btn-gkentei-test:hover .button-icon,
.chapter-test-actions:hover .button-icon,
.toc-quiz-button:hover .button-icon {
    fill: white;
}

.has-cleared .gkentei-child-category-button:hover .button-icon,
.has-cleared .child-category-open-button:hover .button-icon,
.has-cleared .btn-workbook-test:hover .button-icon,
.has-cleared .btn-gkentei-test:hover .button-icon,
.has-cleared .chapter-test-actions:hover .button-icon,
.quiz-cleared .toc-quiz-button:hover .button-icon {
    fill: white;
}
