/*
Theme Name: ROBMANIA
Theme URI:
Author: ROBMANIA
Description: YoutuberロブロックスゲームキュレーションサイトROBMANIA専用テーマ
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: robmania
*/

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* キーボード操作時のフォーカスリングは残す（A11y） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 2px;
}

/* 固定ヘッダーで見出しが隠れないように余白確保 */
h2, h3, h4, [id] {
    scroll-margin-top: 70px;
}

/* スキップリンク（A11y） */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    z-index: 10000;
    background: #111;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 0 0 4px 4px;
    font-size: 13px;
    text-decoration: none !important;
    transition: top 0.2s;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
}

ul { list-style: none; }

/* =============================================
   Container
   ============================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   Header
   ============================================= */
.site-header {
    background: #111111;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* 固定ヘッダーの高さ分、通常ページのコンテンツを下げる */
body {
    padding-top: 56px;
}

/* ホームページのヒーローだけをヘッダー分引き上げて背面に潜り込ませる */
/* PC のみヒーローをヘッダーの裏まで引き上げる（スマホは引き上げない） */
@media (min-width: 681px) {
    body.home .hero {
        margin-top: -56px;
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ナビロゴ画像 */
.nav-logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    flex-shrink: 0;
}

.logo-main {
    font-size: 22px;
    font-weight: 900;
    color: #e53e3e;
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.site-nav ul {
    display: flex;
    gap: 24px;
}

.site-nav a {
    color: #ddd;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
    color: #fff;
    border-bottom-color: #e53e3e;
}

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

.header-search-btn {
    background: none;
    border: none;
    color: #ddd;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.2s;
}

.header-search-btn:hover { color: #fff; }

/* Search form (toggle) */
.header-search-form {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #1a1a1a;
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    z-index: 998;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.header-search-form.is-open {
    max-height: 80px;
    padding: 12px 20px;
}

.header-search-form input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #1a1a1a;
    overflow: hidden;
    max-height: 0;
    z-index: 999;
    transition: max-height 0.3s ease;
}

.mobile-menu.is-open {
    max-height: 80vh;
}

.mobile-menu ul {
    padding: 12px 0;
}

.mobile-menu li {
    border-bottom: 1px solid #2a2a2a;
}

.mobile-menu a {
    display: block;
    color: #ddd;
    font-size: 14px;
    padding: 14px 20px;
    transition: background 0.2s;
}

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

/* =============================================
   Hero Section
   ============================================= */
.hero {
    background-color: #1a1a1a;
    position: relative;
    overflow: hidden;
}

/* 画像が比率を保ったまま全体表示される構造 */
.hero-bg-img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(56px + 20px) 20px 20px;
}

/* 画像がない場合の最低高さ確保 */
.hero:not(:has(.hero-bg-img)) .hero-overlay {
    position: relative;
    min-height: 260px;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ヒーロー中央ロゴ画像 */
.hero-logo-img {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 12px;
    object-fit: contain;
}

.hero-logo-main {
    font-size: 52px;
    font-weight: 900;
    color: #e53e3e;
    letter-spacing: 4px;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(229,62,62,0.4);
}

.hero-logo-sub {
    font-size: 18px;
    color: #fff;
    font-weight: 700;
    margin: 6px 0 14px;
    letter-spacing: 4px;
}

.hero-desc {
    font-size: 12px;
    color: #222;
    line-height: 2;
    font-weight: 700;
    text-shadow: none;
}

/* =============================================
   Main Layout
   ============================================= */
.main-content {
    padding: 32px 0 48px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

/* =============================================
   Main column wrapper (front-page)
   ============================================= */
.main-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0; /* グリッド内でのオーバーフロー防止 */
}

/* =============================================
   Section Header
   ============================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.section-icon {
    width: 26px;
    height: 26px;
    background: #e53e3e;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
}

.section-icon.yt-icon {
    border-radius: 8px;
    position: relative;
}

.section-icon.yt-icon::after {
    content: '▶';
    font-size: 9px;
    margin-left: 1px;
}

.view-all-link {
    font-size: 12px;
    color: #666;
    border: 1px solid #ccc;
    padding: 4px 14px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: #e53e3e;
    border-color: #e53e3e;
    color: #fff;
}

/* =============================================
   Game Cards (Youtuber一覧)
   ============================================= */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.game-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.game-card-thumb {
    width: 155px;
    min-height: 115px;
    flex-shrink: 0;
    overflow: hidden;
    background: #ddd;
}

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

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

.game-card-body {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.game-tag {
    display: inline-block;
    background: #e53e3e;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    width: fit-content;
    text-decoration: none !important;
    transition: background 0.2s, opacity 0.2s;
}
a.game-tag:hover {
    background: #c53030;
    opacity: 0.95;
}

.game-category {
    display: inline-block;
    border: 1px solid #ccc;
    color: #777 !important;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
a.game-category:hover {
    border-color: #e53e3e;
    color: #e53e3e !important;
    background: #fff5f5;
}

.game-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
}

.game-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-date {
    font-size: 11px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-card-arrow {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #ccc;
    font-size: 16px;
    flex-shrink: 0;
}

/* View More Button */
.view-more-wrap {
    text-align: center;
    margin-top: 20px;
}

.btn-view-more {
    display: inline-block;
    border: 2px solid #ddd;
    color: #666;
    padding: 10px 48px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-view-more:hover {
    border-color: #e53e3e;
    color: #e53e3e;
    background: #fff5f5;
}

/* =============================================
   Sidebar
   ============================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
}

/* Popular Articles */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: opacity 0.2s;
}

.article-item:first-child { padding-top: 0; }
.article-item:last-child { border-bottom: none; padding-bottom: 0; }

.article-item:hover { opacity: 0.75; }

.article-thumb {
    width: 82px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    background: #ddd;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-tag {
    display: inline-block;
    background: #e53e3e;
    color: #fff !important;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    width: fit-content;
    text-decoration: none !important;
    transition: background 0.2s, opacity 0.2s;
}
a.article-tag:hover {
    background: #c53030;
    opacity: 0.95;
}

.article-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-size: 10px;
    color: #aaa;
}

/* ホーム画面だけサイドバーの記事カードをコンパクトに */
body.home .sidebar .article-item {
    padding: 8px 0;
    gap: 10px;
}
body.home .sidebar .article-item:first-child { padding-top: 0; }
body.home .sidebar .article-item:last-child { padding-bottom: 0; }

body.home .sidebar .article-thumb {
    width: 70px;
    height: 50px;
}

body.home .sidebar .article-info {
    gap: 3px;
    min-width: 0;
}

body.home .sidebar .article-title {
    font-size: 11px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
}

body.home .sidebar .article-tag {
    font-size: 9px;
    padding: 1px 6px;
}

body.home .sidebar .article-date {
    font-size: 10px;
}

/* About Section */
.about-section-inner { }

.about-logo {
    font-size: 20px;
    font-weight: 900;
    color: #e53e3e;
    letter-spacing: 1px;
    line-height: 1;
}

.about-logo-sub {
    font-size: 10px;
    color: #aaa;
    margin: 3px 0 12px;
}

.about-text {
    font-size: 12px;
    color: #666;
    line-height: 1.9;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
    background: #111111;
    color: #fff;
    margin-top: 32px;
}

.footer-main {
    padding: 32px 0 24px;
    border-bottom: 1px solid #2a2a2a;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo .logo-main { font-size: 20px; }
.footer-logo .logo-sub { font-size: 10px; }

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: flex-end;
}

.footer-nav a {
    color: #999;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-nav a:hover { color: #fff; }

.footer-bottom {
    padding: 16px 0;
    text-align: center;
}

.copyright {
    font-size: 11px;
    color: #555;
}

/* =============================================
   Archive / Single Page
   ============================================= */
.page-header {
    background: #222;
    padding: 28px 0;
    margin-bottom: 28px;
}

.page-header h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    padding-bottom: 48px;
}

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

/* Single Post */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    padding: 32px 0 48px;
}

.single-article {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
}

.single-article h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 16px;
    color: #111;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #999;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.single-thumb {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.single-thumb img {
    width: 100%;
    height: auto;
}

.single-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.single-content h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 14px;
    padding: 10px 14px;
    background: #f8f8f8;
    border-left: 4px solid #e53e3e;
    color: #111;
}

.single-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 24px 0 10px;
    padding: 4px 0 4px 12px;
    border-left: 3px solid #e53e3e;
    color: #222;
    line-height: 1.5;
}

.single-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 20px 0 8px;
    color: #222;
    line-height: 1.5;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 4px;
}

.single-content h5,
.single-content h6 {
    font-size: 14px;
    font-weight: 700;
    margin: 18px 0 6px;
    color: #333;
}

.single-content p { margin-bottom: 16px; }
.single-content img { margin: 16px auto; border-radius: 6px; }

/* リスト（記事本文内では通常の箇条書きを表示） */
.single-content ul,
.single-content ol {
    list-style: revert;
    margin: 12px 0 18px;
    padding-left: 28px;
}
.single-content ul { list-style-type: disc; }
.single-content ol { list-style-type: decimal; }
.single-content ul ul { list-style-type: circle; }
.single-content ul ul ul { list-style-type: square; }
.single-content li {
    margin-bottom: 6px;
    line-height: 1.8;
}
.single-content li > ul,
.single-content li > ol {
    margin: 6px 0 6px;
}

/* リンク（青文字＋ホバーで濃い青）
   グローバルの a { color: inherit } と Gutenberg のブロックスタイルに勝つため
   セレクタを複数に広げ、確実にするため !important を付与 */
.single-content a,
.single-content p a,
.single-content li a,
.single-content td a,
.single-content blockquote a,
.single-content .wp-block-paragraph a,
.single-content .wp-block-list a {
    color: #1a73e8 !important;
    text-decoration: underline !important;
    word-break: break-all;
}
.single-content a:hover,
.single-content p a:hover,
.single-content li a:hover {
    color: #0b4ea2 !important;
    text-decoration: underline !important;
}

/* 引用 */
.single-content blockquote {
    border-left: 4px solid #ddd;
    background: #fafafa;
    padding: 12px 16px;
    margin: 16px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    border-radius: 0 4px 4px 0;
}
.single-content blockquote p { margin-bottom: 8px; }
.single-content blockquote p:last-child { margin-bottom: 0; }

/* 引用キャプション・画像キャプション（本文より小さく）
   Gutenberg の .wp-element-caption はコア側で font-size:13px 指定があるため
   !important で確実に上書きする */
.single-content blockquote cite,
.single-content blockquote .wp-block-quote__citation,
.single-content figcaption,
.single-content figure figcaption,
.single-content .wp-element-caption,
.single-content .wp-caption-text,
.single-content .wp-block-image figcaption,
.single-content .wp-block-quote cite,
.single-content .wp-block-pullquote cite {
    display: block !important;
    font-size: 11px !important;     /* 本文15pxより明確に小さく */
    line-height: 1.6 !important;
    color: #888 !important;
    font-style: normal !important;
    margin-top: 6px !important;
    text-align: center;
}

/* テーブル */
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.single-content th,
.single-content td {
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    text-align: left;
}
.single-content th {
    background: #f8f8f8;
    font-weight: 700;
}

/* コード */
.single-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #c7254e;
}
.single-content pre {
    background: #f4f4f4;
    padding: 14px 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 13px;
}
.single-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* =============================================
   Category Index Page
   ============================================= */
.cat-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
    margin: 0;
}

.cat-grid-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px 14px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.cat-grid-item:hover {
    background: #fff5f5;
    border-color: #e53e3e;
    transform: translateY(-1px);
}

.cat-grid-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
}

.cat-grid-item .cat-name {
    flex: 1;
    line-height: 1.4;
}

.cat-grid-item .cat-count {
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.cat-grid-item .cat-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.6;
    margin-top: 6px;
}

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

/* =============================================
   Breadcrumb
   ============================================= */
.breadcrumb {
    margin: 16px 0 8px;
    font-size: 12px;
    color: #777;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumb li {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.breadcrumb li:not(:last-child)::after {
    content: '›';
    color: #ccc;
    margin: 0 0 0 6px;
    font-size: 14px;
}
.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: #e53e3e;
    text-decoration: underline;
}
.breadcrumb [aria-current="page"] {
    color: #222;
    font-weight: 600;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   Post navigation (前後の記事)
   ============================================= */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}
.post-nav-prev,
.post-nav-next {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    color: #444 !important;
    text-decoration: none !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.post-nav-next {
    text-align: right;
}
.post-nav-prev:hover,
.post-nav-next:hover {
    border-color: #e53e3e;
    box-shadow: 0 2px 10px rgba(229,62,62,0.08);
}
.post-nav-label {
    font-size: 11px;
    color: #999;
    font-weight: 600;
}
.post-nav-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   Related Posts
   ============================================= */
.related-posts {
    margin-top: 36px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.related-card {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.related-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #ddd;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.related-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-title a { color: #222 !important; }

@media (max-width: 680px) {
    .related-grid { grid-template-columns: 1fr; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-next { text-align: left; }
}

/* =============================================
   Pagination
   ============================================= */
.pagination,
.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
}

.pagination .page-numbers,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-numbers:hover,
.nav-links .page-numbers:hover {
    border-color: #e53e3e;
    color: #e53e3e;
    background: #fff5f5;
}

.pagination .page-numbers.current,
.nav-links .page-numbers.current {
    background: #e53e3e;
    border-color: #e53e3e;
    color: #fff;
}

.pagination .page-numbers.dots,
.nav-links .page-numbers.dots {
    border: none;
    background: transparent;
    color: #999;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next,
.nav-links .page-numbers.prev,
.nav-links .page-numbers.next {
    padding: 0 14px;
    font-size: 12px;
}

@media (max-width: 680px) {
    .pagination .page-numbers,
    .nav-links .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
}

/* =============================================
   404 / Not Found
   ============================================= */
.not-found-wrap {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 8px;
    margin: 32px auto;
    max-width: 600px;
}

.not-found-wrap h1 {
    font-size: 80px;
    font-weight: 900;
    color: #e53e3e;
    line-height: 1;
}

.not-found-wrap p {
    font-size: 16px;
    color: #666;
    margin: 16px 0 28px;
}

/* =============================================
   Utility
   ============================================= */
.no-posts {
    text-align: center;
    padding: 48px;
    color: #999;
    background: #fff;
    border-radius: 8px;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #444 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 24px;
}

/* =============================================
   Responsive — Tablet (max 960px)
   ============================================= */
@media (max-width: 960px) {
    .content-grid,
    .archive-grid,
    .single-layout {
        grid-template-columns: 1fr;
    }

    .hero-logo-main { font-size: 38px; }
}

/* =============================================
   Responsive — Mobile (max 680px)
   ============================================= */
@media (max-width: 680px) {
    /* Header */
    .site-nav { display: none; }
    .hamburger { display: flex; }

    /* Hero — スマホではヘッダー下から普通に表示 */
    .hero-overlay {
        position: absolute;
        padding: 16px;
        align-items: center;
        overflow: visible;
    }
    .hero-logo-img {
        max-width: 140px; /* スマホ用に縮小 */
        margin-bottom: 8px;
    }
    .hero-logo-main { font-size: 24px; letter-spacing: 2px; }
    .hero-logo-sub { font-size: 13px; margin-bottom: 6px; }
    .hero-desc {
        font-size: 10px;
        line-height: 1.7;
        white-space: normal;
        word-break: break-all;
    }

    /* Game cards */
    .game-card-thumb { width: 110px; min-height: 90px; }
    .game-title { font-size: 13px; }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-nav ul { justify-content: center; }
}
