/* =========================
🔥 安定版 TikTokレイアウト
========================= */

/* bodyは触らない（これ重要） */
html, body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;
    background: #000;
}

.video-feed::-webkit-scrollbar {
    display: none;
}

.double-heart {
    display: none;
}

/* =========================
🎯 右側縦アイコン（TikTok風・最適版）
========================= */
/* =========================
🎯 actions完全固定（順序・配置保証）
========================= */
/* =========================
🎯 TikTok風アイコン（完全隔離版）
========================= */

.video-card .actions {
    position: absolute !important;
    right: 12px !important;
    bottom: 70px !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;

    width: 60px !important;
    height: 220px !important;

    align-items: center !important;

    z-index: 100 !important;
    pointer-events: auto !important;
}

/* 子要素すべてリセット */
.video-card .actions * {
    all: unset;
    box-sizing: border-box;
}

/* 各ボタン */
.video-card .actions .action-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100%;
    cursor: pointer;

    color: white !important;
    font-size: 12px !important;

    pointer-events: auto;
}

/* アイコン */
.video-card .actions .icon {
    display: flex !important;
    justify-content: center;
    align-items: center;

    font-size: 26px !important;
}

/* カウント */
.video-card .actions .count {
    font-size: 12px !important;
    margin-top: 4px;
}

/* 👤 外枠（丸＋赤枠） */
.video-card .actions .user-icon {
    width: 48px;
    height: 48px;

    border-radius: 50%;
    border: 2.5px solid #ff2d55;

    overflow: hidden; /* ← ★これが本体（はみ出し防止） */

    display: flex;
    justify-content: center;
    align-items: center;
}

/* 👤 中の画像 */
.video-card .actions .user-avatar {
    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 0; /* ← ★丸は外側でやるので不要 */
}

/* 👍 いいね状態 */
.video-card .actions .like-btn.liked .icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px #ff2d55);
}

/* =========================
💥 ハートばら撒き演出
========================= */
/* ハート本体 */
/* ハート */

.heart-pop {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    z-index: 999;
    animation: heartFloat 0.8s ease-out forwards;
}

/* アニメーション */
@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    100% {
        transform: translateY(-80px) scale(1.4);
        opacity: 0;
    }
}

/* =========================
📝 キャプション（下中央固定）
========================= */
.video-card .caption {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 70px; /* ← ここが必須（基準固定） */
    width: calc(100% - 100px);
    max-width: 520px;
    z-index: 20;
    text-align: left;
    pointer-events: auto;
}

/* テキスト（1行省略） */
.video-card .caption-text {
    margin: 0;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;

    overflow: hidden;

    font-size: 14px;
    line-height: 1.4;

    /* 🔥 視認性UP */
    font-weight: 600; /* ← 太くする */

    color: #fff;

    /* 🔥 黒縁（最重要） */
    text-shadow:
        0 1px 2px rgba(0,0,0,0.9),
        0 -1px 2px rgba(0,0,0,0.9),
        1px 0 2px rgba(0,0,0,0.9),
        -1px 0 2px rgba(0,0,0,0.9);

    /* 🔥 背景強化 */
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0)
    );

    padding: 6px 8px;
    border-radius: 8px;
}

/* 展開時 */
.video-card .caption-text.open {
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* もっと見る */
.video-card .more-btn {
    margin-top: 2px;
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0)
    );

    cursor: pointer;
}

/* =========================
コメント
========================= */
.comment {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

.comment b {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 4px;
}

.comment p {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* モーダル背景 */
.comment-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 999;
}

/* 表示 */
.comment-modal.show {
    display: block;
}

/* ボックス本体 */
.comment-box {
    position: absolute;
    left: 0;
    right: 0;

    bottom: 70px; /* footer回避 */

    background: #111;
    border-radius: 16px 16px 0 0;

    max-height: 70dvh;

    display: flex;
    flex-direction: column;
}

/* コメント一覧 */
.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;

    /* 🔥 視認性の核 */
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.2),
        rgba(0,0,0,0.6)
    );
}

/* 🔥 入力バー固定（footer回避込み） */
.comment-input-wrapper {
    position: sticky;
    bottom: 0;

    background: rgba(17,17,17,0.95);
    backdrop-filter: blur(10px);

    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* 入力UI */
.comment-input {
    display: flex;
    gap: 8px;
}

.comment-input input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 14px;
}

.comment-input button {
    padding: 8px 12px;
    border-radius: 20px;
    background: #ff2d55;
    color: #fff;
    border: none;
}

.comment-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30%;
    padding: 10px 12px;

    border-radius: 999px;

    /* 🔥 TikTok系カラー */
    background: linear-gradient(135deg, #ff2d55, #ff5e62);

    color: #fff;
    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    /* 🔥 立体感 */
    box-shadow:
        0 6px 18px rgba(255, 45, 85, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.2);

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* 👇 押した感 */
.comment-login-btn:active {
    transform: scale(0.96);
    box-shadow:
        0 3px 10px rgba(255, 45, 85, 0.25);
}

/* 広告の高さ固定 */
.ad-card {
    display: flex;
    justify-content: center;
    align-items: center;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* =========================================================
   🎉 募集カード内部だけを装飾
   ※ .video-card / .caption のレイアウトは変更しない
========================================================= */


/* ユーザー */

.recruit-user {
    display: flex;
    align-items: center;

    gap: 9px;

    width: fit-content;

    margin-bottom: 12px;

    color: #fff;
    text-decoration: none;

    cursor: pointer;

    transition: opacity 0.2s ease;
}

.recruit-user:hover {
    opacity: 0.8;
}


/* ユーザーアイコン */

.recruit-user-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    padding: 2px;

    box-sizing: border-box;

    background: linear-gradient(
        135deg,
        #ff2d55,
        #ff5e62
    );

    overflow: hidden;
}


.recruit-user-icon img {
    width: 100%;
    height: 100%;

    display: block;

    border-radius: 50%;

    object-fit: cover;

    background: #222;
}


/* ユーザー名 */

.recruit-username {
    font-size: 14px;

    font-weight: 700;

    color: #fff;

    text-shadow:
        0 1px 3px rgba(0,0,0,0.8);
}


/* =========================================================
   タイトル
========================================================= */

.recruit-caption .recruit-title {
    margin: 8px 0 15px;

    color: #fff;

    font-size: 22px;

    line-height: 1.35;

    font-weight: 800;

    text-shadow:
        0 2px 5px rgba(0,0,0,0.9);
}


/* =========================================================
   情報
========================================================= */

.recruit-info {
    display: flex;

    flex-direction: column;

    gap: 7px;

    margin-bottom: 13px;

    padding: 11px 13px;

    border-radius: 12px;

    background: rgba(0,0,0,0.38);

    border: 1px solid rgba(255,255,255,0.10);

    backdrop-filter: blur(5px);
}


.recruit-info-item {
    display: flex;

    align-items: center;

    gap: 8px;

    color: rgba(255,255,255,0.94);

    font-size: 13px;

    line-height: 1.4;
}


.recruit-info-item strong {
    color: #ff5b78;

    font-size: 16px;
}


/* =========================================================
   説明
========================================================= */

.recruit-description {
    margin-bottom: 13px;

    padding: 10px 12px;

    border-radius: 10px;

    background: rgba(0,0,0,0.30);

    color: rgba(255,255,255,0.90);

    font-size: 13px;

    line-height: 1.55;

    border-left: 3px solid #ff2d55;

    word-break: break-word;

    max-height: 80px;

    overflow: hidden;
}


/* =========================================================
   詳細ボタン
========================================================= */

.recruit-join-btn {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 44px;

    box-sizing: border-box;

    border-radius: 12px;

    background: linear-gradient(
        135deg,
        #ff2d55,
        #ff506c
    );

    color: #fff;

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    box-shadow:
        0 5px 15px rgba(255,45,85,0.25);

    transition:
        transform 0.15s ease,
        filter 0.15s ease;
}


.recruit-join-btn span {
    margin-left: 7px;

    font-size: 21px;

    line-height: 1;
}


.recruit-join-btn:hover {
    filter: brightness(1.08);

    transform: translateY(-1px);
}


.recruit-join-btn:active {
    transform: scale(0.98);
}


/* =========================================================
   スマホ
========================================================= */

@media (max-width: 480px) {

    .recruit-user-icon {
        width: 38px;
        height: 38px;
    }

    .recruit-username {
        font-size: 13px;
    }

    .recruit-caption .recruit-title {
        font-size: 20px;
    }

    .recruit-info {
        padding: 9px 11px;
    }

    .recruit-info-item {
        font-size: 12px;
    }

    .recruit-description {
        font-size: 12px;
    }

    .recruit-join-btn {
        min-height: 42px;

        font-size: 13px;
    }

}

/* =========================================================
   募集カードのプロフィール画像は
   TikTokメディア用 img CSS の対象外にする
========================================================= */

.video-card.recruit-card .recruit-user-icon img {
    position: static !important;
    inset: auto !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;

    border-radius: 50% !important;
}

/* =========================================================
   🤝 募集カード
========================================================= */

.recruit-card {
    position: relative;
    overflow: hidden;
    background: #111;
}


/* 📷 募集写真
   通常のFeed画像・動画と同じ1画面サイズ */

.recruit-background {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;
    z-index: 0;
}


.recruit-background-image {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;

    border-radius: 0 !important;

    filter: brightness(0.7);

    /* 🔥 画像を最前面へ */
    z-index: 2 !important;

    /* 🔥 クリック可能 */
    pointer-events: auto !important;

    cursor: zoom-in;
}


/* 写真の上に薄い暗幕 */

.recruit-background::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.15) 45%,
        rgba(0,0,0,0.85) 100%
    );

    z-index: 1;

    /* 🔥 クリックを邪魔しない */
    pointer-events: none;
}


/* 募集情報を写真より前 */

.recruit-card .recruit-caption {
    position: absolute;
    z-index: 10;
}

/* =========================================================
   📷 募集写真 拡大表示
========================================================= */

.recruit-image-clickable {
    cursor: zoom-in;
}


/* モーダル */

.recruit-image-modal {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.94);

    z-index: 10000;

    padding: 20px;

    box-sizing: border-box;
}


/* 表示状態 */

.recruit-image-modal.show {
    display: flex;
}


/* 拡大画像 */

.recruit-image-modal img {
    max-width: 95vw;
    max-height: 92vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 8px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6);

    animation: recruitImageZoom 0.2s ease-out;
}


/* 閉じるボタン */

.recruit-image-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 44px;
    height: 44px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.15);

    color: #fff;

    font-size: 32px;
    line-height: 1;

    cursor: pointer;

    z-index: 10001;

    backdrop-filter: blur(8px);
}


/* 押したとき */

.recruit-image-close:active {
    transform: scale(0.92);
}


/* 拡大アニメーション */

@keyframes recruitImageZoom {

    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}

/* =========================
📢 A8広告
========================= */

.ad-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* A8広告の画像だけFeed画像CSSから隔離 */
.video-card.ad-card .a8-ad img {
    position: static !important;
    inset: auto !important;

    width: 300px !important;
    height: 250px !important;

    max-width: 100% !important;
    max-height: 250px !important;

    object-fit: contain !important;

    display: block !important;
}

/* A8広告本体 */
.a8-ad {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* A8の計測用1px画像 */
.video-card.ad-card .a8-ad img[width="1"][height="1"] {
    width: 1px !important;
    height: 1px !important;

    position: absolute !important;
    inset: auto !important;

    opacity: 0 !important;
}

/* ==================================================
   🤝 募集ナビ
   最終版
================================================== */

/* --------------------------------------------------
   ナビ全体
-------------------------------------------------- */

.recruit-filter-bar {

    position: fixed;

    top: 68px;
    left: 0;
    right: 0;

    width: 100%;
    height: 42px;

    padding: 0 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    box-sizing: border-box;

    z-index: 9000;

    pointer-events: none;
}


/* --------------------------------------------------
   ボタン共通
-------------------------------------------------- */

.recruit-filter-btn,
.nearby-recruit-btn {

    pointer-events: auto;

    flex: 1 1 0;

    width: 0;

    max-width: 180px;

    height: 38px;

    padding: 0 10px;

    box-sizing: border-box;

    border: 1px solid rgba(255,255,255,0.14);

    border-radius: 11px;

    background: rgba(15,15,22,0.65);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: #fff;

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;

    transition:
        transform .15s ease,
        background .2s ease;
}


/* --------------------------------------------------
   押下
-------------------------------------------------- */

.recruit-filter-btn:active,
.nearby-recruit-btn:active {

    transform: scale(.96);

}


/* --------------------------------------------------
   募集だけ見る ON
-------------------------------------------------- */

.recruit-filter-btn.active {

    background: rgba(255,45,117,0.82);

    border-color:
        rgba(255,255,255,0.22);

}


/* --------------------------------------------------
   近くの募集 ON
-------------------------------------------------- */

.nearby-recruit-btn.active {

    background: rgba(70,120,235,0.82);

    border-color:
        rgba(255,255,255,0.22);

}


/* ==================================================
   📍 近くの募集パネル
================================================== */

.nearby-recruits {

    position: fixed !important;

    top: 112px !important;

    left: 50% !important;

    right: auto !important;

    transform: translateX(-50%) !important;

    width: calc(100% - 20px) !important;

    max-width: 680px;

    height: auto;

    margin: 0 !important;

    padding: 8px 6px 6px !important;

    box-sizing: border-box;

    background: transparent !important;

    border: none !important;

    border-radius: 0 !important;

    box-shadow: none !important;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    z-index: 9999;

    display: none;

    overflow: visible;

}


/* --------------------------------------------------
   表示
-------------------------------------------------- */

.nearby-recruits.is-visible {

    display: block;

}


/* ==================================================
   ヘッダー
================================================== */

.nearby-recruits-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin: 0 4px 5px;

}


.nearby-recruits-header h2 {

    margin: 0;

    color: #fff;

    font-size: 13px;

    font-weight: 700;

}


/* --------------------------------------------------
   閉じるボタン
-------------------------------------------------- */

.nearby-recruit-close {

    width: 28px;
    height: 28px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background:
        rgba(20,20,28,0.75);

    color: #fff;

    font-size: 18px;

    line-height: 28px;

    cursor: pointer;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

}


/* ==================================================
   📍 横スクロール
================================================== */

#nearbyRecruitList {

    display: flex;

    align-items: stretch;

    gap: 7px;

    width: 100%;

    max-width: 100%;

    padding: 0 2px 3px;

    margin: 0;

    box-sizing: border-box;

    overflow-x: auto;

    overflow-y: hidden;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;

    overscroll-behavior-x: contain;

}


#nearbyRecruitList::-webkit-scrollbar {

    display: none;

}


/* ==================================================
   🃏 近くの募集カード
================================================== */

.nearby-recruit-card {

    flex: 0 0 145px;

    width: 145px;

    min-width: 145px;

    min-height: 92px;

    padding: 8px;

    box-sizing: border-box;

    border:
        1px solid rgba(255,255,255,0.12);

    border-radius: 11px;

    background:
        rgba(15,15,22,0.78);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: #fff;

    text-decoration: none;

    overflow: hidden;

    box-shadow:
        0 5px 18px rgba(0,0,0,0.18);

}


/* ==================================================
   👤 ユーザー
================================================== */

.nearby-recruit-user {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 5px;

}


.nearby-recruit-avatar {

    width: 28px;
    height: 28px;

    flex: 0 0 28px;

    border-radius: 50%;

    object-fit: cover;

    background: #222;

}


.nearby-recruit-user-info {

    min-width: 0;

}


.nearby-recruit-username {

    max-width: 100px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 11px;

    font-weight: 700;

}


.nearby-recruit-gender {

    margin-top: 1px;

    color:
        rgba(255,255,255,0.55);

    font-size: 9px;

}


/* ==================================================
   🎉 タイトル
================================================== */

.nearby-recruit-title {

    margin-bottom: 4px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: #fff;

    font-size: 12px;

    font-weight: 700;

}


/* ==================================================
   📍 場所
================================================== */

.nearby-recruit-place {

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color:
        rgba(255,255,255,0.72);

    font-size: 9px;

}


/* ==================================================
   📏 距離
================================================== */

.nearby-recruit-distance {

    margin-top: 3px;

    color:
        rgba(255,255,255,0.5);

    font-size: 9px;

}

/* ==================================================
   📱 スマホ
================================================== */

@media (max-width: 600px) {

    .recruit-filter-bar {

        top: 68px;

        height: 38px;

        padding: 0 8px;

        gap: 5px;

    }


    .recruit-filter-btn,
    .nearby-recruit-btn {

        height: 36px;

        max-width: none;

        border-radius: 10px;

        font-size: 11px;

        padding: 0 7px;

    }


    .nearby-recruits {

        top: 108px !important;

        left: 50% !important;

        width: calc(100% - 16px) !important;

        padding:
            5px
            4px
            5px !important;

    }


    .nearby-recruits-header {

        margin:
            0
            3px
            4px;

    }


    .nearby-recruits-header h2 {

        font-size: 12px;

    }


    .nearby-recruit-close {

        width: 26px;
        height: 26px;

        font-size: 17px;

        line-height: 26px;

    }


    #nearbyRecruitList {

        gap: 6px;

        padding:
            0
            2px
            2px;

    }


    .nearby-recruit-card {

        flex-basis: 138px;

        width: 138px;

        min-width: 138px;

        min-height: 88px;

        padding: 7px;

        border-radius: 10px;

    }


    .nearby-recruit-avatar {

        width: 26px;
        height: 26px;

        flex-basis: 26px;

    }


    .nearby-recruit-title {

        font-size: 11px;

    }


    .nearby-recruit-place,
    .nearby-recruit-distance {

        font-size: 9px;

    }

}

/* =========================================================
   🔥 最終修正版
   通常Feed画像 ＆ 募集フィルター
========================================================= */


/* =========================================================
   📷 通常Feed画像
========================================================= */

.video-card .feed-post-image {

    position: absolute !important;

    top: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    z-index: 2 !important;

    cursor: zoom-in;

}


/* =========================================================
   🔒 全画面中のカード
========================================================= */

.video-card:has(.feed-post-image.image-fullscreen) {

    z-index: 2147483646 !important;

}


/* =========================================================
   🤝 募集だけ見る
   CSS側でも確実に非募集を隠す
========================================================= */

/* 募集カードは表示 */

.video-feed.recruit-only
.video-card.recruit-card {

    display: flex !important;

}

/* =========================================================
   📷 全画面画像が何にも邪魔されないようにする
========================================================= */

body:has(.feed-post-image.image-fullscreen) {

    overflow: hidden !important;

}

/* =========================================================
   🎉 通常募集カード
   縦中央配置 ＋ footer安全領域
========================================================= */

.video-card.recruit-card .recruit-caption {
    position: absolute !important;

    top: 50% !important;
    bottom: auto !important;

    left: 50% !important;

    transform: translate(-50%, -50%) !important;

    width: calc(100% - 40px) !important;
    max-width: 520px;

    max-height: calc(100% - 100px);

    overflow-y: auto;
    overflow-x: hidden;

    box-sizing: border-box;

    z-index: 10 !important;

    scrollbar-width: none;
}

.video-card.recruit-card .recruit-caption::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   📱 スマホ
========================================================= */

@media (max-width: 600px) {

    .video-card.recruit-card .recruit-caption {
        width: calc(100% - 30px) !important;

        max-height: calc(100% - 90px);

    }

}

/* =========================================
   🔥 Feed表示復旧用・最終修正版
========================================= */

/* Feedの表示領域 */
#tiktok-root {
    position: fixed !important;

    top: 50px !important;
    bottom: 60px !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    height: auto !important;

    overflow: hidden !important;
    background: #000 !important;
}

/* スクロール領域 */
#tiktok-root .video-feed {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    scroll-snap-type: y mandatory;
}

/* 内側 */
#tiktok-root .feed-inner {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* カード */
#tiktok-root .video-card {
    position: relative !important;

    width: 100% !important;
    height: calc(100dvh - 130px) !important;
    min-height: calc(100dvh - 130px) !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;

    scroll-snap-align: start;
    scroll-snap-stop: always;

    box-sizing: border-box;
}

/* 通常画像 */
#tiktok-root .video-card > .feed-post-image {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    z-index: 2 !important;
}

/* 動画 */
#tiktok-root .video-card > video {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;

    z-index: 2 !important;
}

/* アクション */
#tiktok-root .video-card .actions {
    z-index: 100 !important;
}

/* キャプション */
#tiktok-root .video-card > .caption {
    z-index: 20 !important;
}


/* =========================================
   📷 画像全画面時のみヘッダー・フッターを隠す
========================================= */

/* 全画面画像を最前面に表示 */
body:has(.feed-post-image.image-fullscreen) .feed-post-image.image-fullscreen {
    position: fixed !important;

    inset: 0 !important;

    width: 100vw !important;
    width: 100dvw !important;

    height: 100vh !important;
    height: 100dvh !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: contain !important;

    background: #000 !important;

    z-index: 2147483647 !important;
}

/* ヘッダーを隠す */
body:has(.feed-post-image.image-fullscreen) header {
    visibility: hidden !important;
}

/* フッターを隠す */
body:has(.feed-post-image.image-fullscreen) footer {
    visibility: hidden !important;
}

/* ヘッダー・フッターの代表的な固定要素 */
body:has(.feed-post-image.image-fullscreen) .bottom-nav,
body:has(.feed-post-image.image-fullscreen) .bottom-navigation,
body:has(.feed-post-image.image-fullscreen) .site-footer {
    visibility: hidden !important;
}

/* ==================================================
⌨️ キーボード表示時：Feed領域を拡張
================================================== */

body.comment-keyboard-open #tiktok-root {
    top: 0 !important;
    bottom: 0 !important;
}

body.comment-keyboard-open .video-feed {
    top: 0 !important;
    bottom: 0 !important;
}

body.comment-keyboard-open .video-card {
    height: 100dvh !important;
    min-height: 100dvh !important;
}


/* ==================================================
📷 Feed 複数画像スライダー
================================================== */

.feed-image-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.feed-image-track {
    display: flex;
    width: 100%;
    transition: transform 0.3s ease;
    touch-action: pan-y;
}

.feed-image-slide {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feed-image-slide .feed-post-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}


/* =========================
左右ボタン
========================= */

.feed-image-prev,
.feed-image-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.45);
    color: #fff;

    font-size: 30px;
    line-height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 20;
}

.feed-image-prev {
    left: 10px;
}

.feed-image-next {
    right: 10px;
}


/* =========================
ドット
========================= */

.feed-image-dots {
    position: absolute;

    left: 50%;
    bottom: 12px;

    transform: translateX(-50%);

    display: flex;
    gap: 6px;

    z-index: 20;
}

.feed-image-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.55);
}

.feed-image-dot.active {
    background: #fff;
    transform: scale(1.2);
}


/* =========================
ボタン・ドットクリック時
カード遷移を防ぐ
========================= */

.feed-image-prev,
.feed-image-next,
.feed-image-dots {
    user-select: none;
    -webkit-user-select: none;
}


/* =========================================================
   📷 複数画像フィード
========================================================= */

.feed-image-slider {
    position: relative;
    width: 100%;
    height: 100%;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-image-track {
    display: flex;
    width: 100%;
    height: 100%;

    align-items: center;

    transition: transform 0.3s ease;
}

.feed-image-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-image-slide .feed-post-image {
    position: static !important;

    display: block;
    width: 100%;
    height: auto;

    max-width: 100%;

    object-fit: contain;

    cursor: pointer;
}

/* =========================================================
   ◀ ▶ ボタン
========================================================= */

.feed-image-prev,
.feed-image-next {
    position: absolute;

    top: 38%;
    transform: translateY(-50%);

    z-index: 20;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.45);
    color: #fff;

    font-size: 30px;
    line-height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    padding: 0;
}

.feed-image-prev {
    left: 10px;
}

.feed-image-next {
    right: 10px;
}

/* =========================================================
   ● ● ● ドット
========================================================= */

.feed-image-dots {
    position: absolute;

    left: 50%;
    bottom: 12px;

    transform: translateX(-50%);

    z-index: 20;

    display: flex;
    gap: 6px;

    pointer-events: none;
}

.feed-image-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.55);
}

.feed-image-dot.active {
    background: #fff;
    transform: scale(1.2);
}


/* =========================================================
   📱 スマホでは左右ボタンを非表示
========================================================= */

@media (max-width: 768px) {

    .feed-image-prev,
    .feed-image-next {
        display: none;
    }

}