/* =====================
   投稿ページ レイアウト
   ===================== */
.single-main {
    max-width: 1000px;
}

/* =====================
   パンくず
   ===================== */
.breadcrumb {
    font-size: 11px;
    color: #555;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.breadcrumb a {
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #ccc;
}

.breadcrumb span {
    color: #444;
}

.breadcrumb-current {
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* =====================
   記事ヘッダー
   ===================== */
.post-header {
    margin-bottom: 20px;
}

.post-header .cat-badge {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
    font-size: 11px;
    padding: 3px 10px;
}

.post-title {
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 8px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.post-meta span {
    font-size: 11px;
    color: #555;
}

/* =====================
   本文エリア（投稿テンプレの構造を活かす）
   ===================== */
.post-content {
    margin-bottom: 24px;
}

/* YouTube埋め込み（iframeが直接子要素の場合のみ） */
.post-content .wp-block-embed__wrapper {
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 20px;
}

/* YouTubeのみ：iframeが直接入っている場合にアスペクト比を付与 */
.post-content .wp-block-embed__wrapper > iframe {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* bunny.net等：自前のpadding-topラッパーを持つ場合はそちらに任せる */
.post-content .wp-block-embed__wrapper > div {
    border-radius: 0;
    overflow: visible;
}

/* =====================
   セクション共通
   ===================== */
.post-content .archive-section {
    margin-bottom: 20px;
}

.post-content .archive-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 0.5px solid #1e1e1e;
}

.post-content .archive-heading::before {
    content: '';
    display: block;
    width: 3px;
    height: 14px;
    background: #c0392b;
    border-radius: 1px;
    flex-shrink: 0;
}

/* =====================
   TIMELINE - タイムスタンプクリックで動画ジャンプ
   ===================== */
.post-content .timeline-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    padding: 0;
}

.post-content .timeline-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #1a1a1a;
    border-radius: 6px;
    border: 0.5px solid #222;
    font-size: 12px;
    color: #aaa;
}

.post-content .timeline-list li:empty {
    display: none;
}

.post-content .time {
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    font-family: inherit;
}

.post-content .time:hover {
    background: #a93226;
}

/* =====================
   SNAPSHOT - クリックで拡大モーダル
   ===================== */
.post-content .snapshot-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.post-content .snapshot-wrap {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a1a;
    border: 0.5px solid #222;
    cursor: zoom-in;
}

.post-content .snapshot-wrap img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.post-content .snapshot-wrap:hover img {
    opacity: 0.8;
}

.post-content .snap-time {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* =====================
   RECORD DATA
   ===================== */
.post-content .spec-list {
    border: 0.5px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.post-content .spec-row {
    display: flex;
    border-bottom: 0.5px solid #2a2a2a;
}

.post-content .spec-row:last-child {
    border-bottom: none;
}

.post-content .spec-row dt {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.08em;
    padding: 10px 14px;
    background: #161616;
    width: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 12px;
}

.post-content .spec-row dd {
    font-size: 12px;
    color: #ccc;
    padding: 10px 14px;
    flex: 1;
    line-height: 1.6;
}

/* =====================
   タグ（RECORD DATA下）
   ===================== */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.tag-chip {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    border: 0.5px solid #2a2a2a;
    color: #777;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-chip:hover {
    border-color: #555;
    color: #ccc;
}

/* スナップショット拡大モーダル */
.snap-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.snap-modal-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snap-modal-inner img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.snap-modal-time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
}

.snap-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

.snap-modal-close:hover {
    color: #fff;
}

/* =====================
   前後記事ナビ
   ===================== */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 20px;
    border-top: 0.5px solid #1e1e1e;
    margin-top: 8px;
}

.post-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    border: 0.5px solid #222;
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    transition: border-color 0.2s;
    min-width: 0;
    overflow: hidden;
}

.post-nav-btn:hover {
    border-color: #444;
}

.post-nav-btn.prev {
    grid-column: 1;
    flex-direction: row;
}

.post-nav-btn.next {
    grid-column: 2;
    flex-direction: row-reverse;
}

.nav-arrow {
    font-size: 18px;
    color: #c0392b;
    flex-shrink: 0;
    line-height: 1;
}

.nav-thumb {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #222;
}

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

.nav-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #222;
}

.nav-info {
    flex: 1;
    min-width: 0;
}

.nav-label {
    font-size: 10px;
    color: #555;
    margin-bottom: 2px;
    letter-spacing: 0.06em;
}

.nav-title {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================
   レスポンシブ
   ===================== */
@media (max-width: 600px) {
    .post-title {
        font-size: 15px;
    }

    .post-content .snapshot-box {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .post-nav-btn.next {
        grid-column: 1;
        flex-direction: row;
    }
}

/* =====================
   レスポンシブ
   ===================== */
@media (max-width: 600px) {
    .post-title {
        font-size: 15px;
    }

    .post-content .snapshot-box {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-nav {
        flex-direction: column;
    }
}

/* 動画横並び */
.video-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.video-row figure {
    margin: 0;
}

/* TIMELINE縦並び */
.timeline-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.timeline-row .archive-section {
    margin-bottom: 0;
}

/* スマホは縦積みに */
@media (max-width: 600px) {
    .video-row,
    .timeline-row {
        grid-template-columns: 1fr;
    }
}