@charset "UTF-8";

/* =========================================
 * 共通変数 & リセット
 * ========================================= */
.oncle-wrap, .oncle-rec-container {
    --color-gold: #d4af37;
    --color-gold-light: #f9f5e0;
    --color-gray-border: #e5e7eb;
    --color-text-main: #333;
    --color-star: #ffbc00;
    --font-base: "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}
.oncle-wrap *, .oncle-rec-container * { box-sizing: border-box; }
.oncle-wrap img, .oncle-rec-container img { max-width: 100%; height: auto; display: block; margin: 0; padding: 0; }
.oncle-wrap ul { margin: 0; padding: 0; list-style: none; }

/* =========================================
 * [oncle_table] グリッドスタイル
 * ========================================= */
.oncle-grid {
    display: grid;
    width: 100%;
    margin: 1.5em auto;
    gap: 16px;
}
.oncle-grid[data-cols="1"] { grid-template-columns: minmax(0, 360px); justify-content: center; }
.oncle-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.oncle-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }

/* SP: Single Column Stack */
@media (max-width: 767px) {
    .oncle-grid[data-cols="1"],
    .oncle-grid[data-cols="2"],
    .oncle-grid[data-cols="3"] {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 24px;
    }
}

/* Card Design */
.oncle-card {
    background: #fff;
    border: 1px solid var(--color-gray-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.oncle-card.rank-1 {
    border: 2px solid var(--color-gold);
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 1;
}

/* Header */
.oncle-card-header {
    background: #f9fafb;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding: 12px 6px 9px 6px;
}
.oncle-card.rank-1 .oncle-card-header { background: var(--color-gold-light); }

/* PC Title Style */
.oncle-title-pc { 
    display: none; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}
.oncle-title-pc .main { 
    display: block; 
    font-size: 17px;
    font-weight: bold; 
    line-height: 1.3 !important;
    color: #333; 
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent !important;
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
    border: none !important;
}
.oncle-title-pc .sub { 
    display: block; 
    font-size: 11px;
    color: #777; 
    font-weight: normal; 
    line-height: 1.2 !important;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* SP Title Style */
.oncle-title-sp { 
    display: none; 
    margin: 0 !important; padding: 0 !important; border: none !important; 
    background: transparent !important; 
    font-size: 18px !important; font-weight: bold !important; 
    color: #333 !important; line-height: 1.4 !important;
    text-align: center;
}

/* Media Query for Title Display */
@media (min-width: 768px) {
    .oncle-title-pc { display: flex !important; }
    .oncle-title-sp { display: none !important; }
}
@media (max-width: 767px) {
    .oncle-title-pc { display: none !important; }
    .oncle-title-sp { display: block !important; }
}

/* Body */
.oncle-card-body { 
    padding: 8px 8px 12px 8px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

.oncle-card-img { text-align: center; margin-bottom: 9px; }
.oncle-card-img img { max-height: 120px; width: auto; margin: 0 auto; border-radius: 8px; transition: transform .2s; }
.oncle-card-img:hover img { transform: scale(1.05); }

.oncle-card-stars { 
    text-align: center; 
    margin-top: 6px; margin-bottom: 9px;
    line-height: 1; 
}
.oncle-stars { color: var(--color-star); letter-spacing: 2px; font-size: 1.1em; }

/* Features List */
.oncle-card-feat { 
    margin-top: 4px; margin-bottom: 9px; 
    background: #fafafa; 
    padding: 6px; 
    border-radius: 8px; 
    flex-grow: 1;
    text-align: center; 
}
.oncle-features { 
    display: inline-block; 
    width: auto;
    font-size: 13px; 
    line-height: 1.45; 
    text-align: left; 
}
.oncle-features li { 
    position: relative; 
    padding: 3px 0 3px 26px; 
    margin: 0 0 2px 0; 
    border-bottom: 1px solid var(--feat-50, #9ecdf8);
    color: #444;
}
.oncle-features li:last-child { border-bottom: none !important; margin-bottom: 0 !important; }

/* Diamond Icon */
.oncle-features li::before {
    content: ""; position: absolute; left: 4px; top: 6px;
    width: 10px; height: 10px;
    border: 2px solid var(--feat-50, #9ecdf8);
    transform: rotate(45deg);
}
/* Check Icon */
.oncle-features li::after {
    content: ""; position: absolute; left: 8px; top: 8px;
    width: 12px; height: 12px;
    background: var(--feat-30, #cfe7fb);
    transform: rotate(60deg);
}

/* SP Specific List Tweaks */
@media (max-width: 767px) {
    .oncle-card-body { padding: 16px; }
    .oncle-card-feat { 
        padding: 12px; 
        text-align: center; 
    }
    .oncle-features { 
        font-size: 15px; 
        display: inline-block; 
        width: 100%;
        text-align: left;
    } 
    .oncle-features li { 
        padding: 4px 0 4px 28px; 
        margin-bottom: 0; 
        border-bottom-width: 1px;
    }
    .oncle-features li::before { top: 7px; width: 11px; height: 11px; }
    .oncle-features li::after { top: 9px; width: 13px; height: 13px; }
}

/* Button */
.oncle-cta { margin-top: auto; padding-top: 6px; }
.buttonIconText02, .buttonIconText02:link, .buttonIconText02:visited {
    --btn-h: 38px; --btn-side: 36px;
    display: grid; grid-template-columns: var(--btn-side) 1fr var(--btn-side);
    align-items: center; width: 100%; max-width: 260px; height: var(--btn-h);
    padding: 0 6px 0 10px; margin: 0 auto;
    font-family: var(--font-base); font-size: 14px; font-weight: 700;
    color: #fff !important; text-decoration: none !important;
    border-radius: 99px; background-color: var(--btn-base,#333);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: transform .2s, box-shadow .2s;
    border: none;
}
.buttonIconText02:hover { transform: translateY(-2px); box-shadow: 0 6px 12px -2px rgba(0,0,0,0.15); }
.buttonIconText02_text { grid-column: 2; text-align: center; white-space: nowrap; overflow: hidden; }
.buttonIconText02_icon { grid-column: 3; justify-self: end; display: flex; align-items: center; justify-content: center; }
.buttonIconText02_icon svg { transition: transform .25s ease; width: 18px; height: 18px; }
.buttonIconText02:hover .buttonIconText02_icon svg { transform: translateX(4px); }

.buttonIconText02.is-overflow .buttonIconText02_text .inner {
    display: inline-block; white-space: nowrap;
    animation: oncle-slide 8s linear infinite;
}
@keyframes oncle-slide { 0%,15% { transform: translateX(0); } 100% { transform: translateX(calc(-100% + 180px)); } }

@media(max-width: 767px){
    .buttonIconText02 { width: 100%; max-width: 100%; }
    .buttonIconText02:hover { transform: none; }
}

/* =========================================
 * [oncle_recommend] カードスタイル
 * ========================================= */
.oncle-rec-container {
    display: flex; flex-direction: column; gap: 16px; margin: 24px 0;
}
.oncle-rec-card {
    display: flex; align-items: center;
    background: #fff; border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative; overflow: hidden;
    padding: 22px; 
    border: none !important;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.oncle-rec-card::before {
    content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 6px;
    background-color: var(--theme-color, #333); z-index: 1;
}
.oncle-rec-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

/* Rank Tag */
.oncle-rec-rank {
    position: absolute; top: 0; left: 0;
    background: var(--theme-color, #333); color: #fff;
    font-weight: bold; font-size: 12px; padding: 2px 10px;
    border-bottom-right-radius: 8px; z-index: 2;
}
.oncle-rec-rank .rank-num { font-size: 15px; margin-right: 1px; }

/* ★調整: margin-topを増やしてタグとの距離を確保 */
.oncle-rec-icon { 
    flex-shrink: 0; width: 80px; height: 80px; 
    margin-right: 12px; 
    margin-top: 16px; 
}
/* ★修正: バナー画像対応のため、object-fit: containに変更 */
.oncle-rec-icon img {
    width: 100%; height: 100%; 
    object-fit: contain; /* cover -> contain */
    background-color: #fff; /* 余白が出たときに不自然にならないよう白背景 */
    border-radius: 16px;
    border: 1px solid #eee; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: block !important; margin: 0 !important; padding: 0 !important;
}

.oncle-rec-info { flex-grow: 1; margin-right: 16px; min-width: 0; }

.oncle-rec-name { 
    font-size: 18px !important; 
    font-weight: bold !important; 
    color: #333 !important; 
    margin: 0 0 6px 0 !important; 
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    line-height: 1.3 !important;
}
.oncle-rec-desc { 
    font-size: 14px; 
    color: #555; 
    line-height: 1.5; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.oncle-rec-action { flex-shrink: 0; width: 200px; }
.oncle-rec-btn {
    display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding: 12px 0;
    background: linear-gradient(135deg, #ff9a00 0%, #ff5e00 100%);
    color: #fff !important; text-decoration: none !important; border-radius: 50px;
    font-weight: bold; font-size: 15px; box-shadow: 0 4px 6px rgba(255, 100, 0, 0.3);
    position: relative; overflow: hidden;
    border: none !important;
    transition: opacity 0.2s, transform 0.1s;
}
.oncle-rec-btn::after {
    content: ""; position: absolute; top: -50%; left: -50%; width: 20px; height: 200%;
    background: rgba(255,255,255,0.4); transform: rotate(45deg);
    animation: shine 3s infinite ease-in-out;
}
@keyframes shine { 0% { left: -50%; } 20% { left: 150%; } 100% { left: 150%; } }

.oncle-rec-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(255, 94, 0, 0.4);
}

@media (max-width: 767px) {
    .oncle-rec-card { flex-wrap: wrap; padding: 14px 14px 18px 14px; }
    
    /* ★調整: スマホでもタグと被らないようmargin-top確保 */
    .oncle-rec-icon { 
        width: 64px; height: 64px; 
        margin-right: 12px; 
        margin-top: 16px; 
    }
    
    .oncle-rec-info { width: calc(100% - 76px); margin-right: 0; margin-bottom: 20px; margin-top: 10px; }
    .oncle-rec-name { font-size: 16px !important; margin-top: 0 !important; }
    .oncle-rec-desc { font-size: 11px; -webkit-line-clamp: 3; }
    .oncle-rec-action { width: 100%; }

    /* ★調整: ボタンのpaddingを減らして高さを縮小 */
    .oncle-rec-btn {
        padding: 9px 0; 
    }
}



/* =========================================
 * [oncle_grid] コンパクトグリッドスタイル
 * ========================================= */

/* --- Grid Layout --- */
.tb-oncle-compact-grid {
    display: grid;
    /* PC: 5列固定 (5個表示) */
    grid-template-columns: repeat(5, 1fr); 
    gap: 12px;
    margin: 1.5em 0;
}

/* --- Card Style --- */
.tb-compact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.tb-compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.1);
}

/* --- Icon --- */
.tb-compact-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    /* ★修正: バナー画像対応のため contain に変更 */
    object-fit: contain; /* cover -> contain */
    background-color: #fff; /* 背景色追加 */
    margin: 0 0 8px 0 !important; /* WPの自動スタイル打ち消し */
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    display: block;
}

/* --- Text --- */
.tb-compact-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* マイクロコピー */
.tb-compact-micro-copy {
    font-size: 10px;
    color: #777;
    margin-bottom: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
    min-height: 1.2em; /* 空でも高さ確保した方が揃う場合あり */
}

/* --- Button --- */
.tb-compact-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: #ff5722;
    color: #fff !important;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    padding: 7px 0;
    border-radius: 50px;
    line-height: 1;
    margin-top: auto;
}

/* --- Brand Colors --- */
.tb-compact-card[data-color="red"] .tb-compact-btn { background: #dc3545; }
.tb-compact-card[data-color="blue"] .tb-compact-btn { background: #0d6efd; }
.tb-compact-card[data-color="purple"] .tb-compact-btn { background: #7b1fa2; }
.tb-compact-card[data-color="green"] .tb-compact-btn { background: #22c55e; }
.tb-compact-card[data-color="pink"] .tb-compact-btn { background: #ec4899; }
.tb-compact-card[data-color="yellow"] .tb-compact-btn { background: #fbbf24; color:#333 !important; }
.tb-compact-card[data-color="black"] .tb-compact-btn { background: #333; }

/* --- 表示個数制御 (PC) --- */
/* 6個目以降を非表示 (PCは5個まで) */
.tb-compact-card:nth-child(n+6) {
    display: none;
}

/* --- SP (スマホ) 最適化 --- */
@media (max-width: 768px) {
    .tb-oncle-compact-grid {
        /* スマホ: 2列 */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* アイコンサイズ維持 */
    .tb-compact-icon {
        width: 60px;
        height: 60px;
    }

    /* --- 表示個数制御 (SP) --- */
    /* PCの制限を解除し、6個目まで表示 */
    .tb-compact-card:nth-child(n+6) {
        display: flex; 
    }
    /* 7個目以降を非表示 (3行分まで) */
    .tb-compact-card:nth-child(n+7) {
        display: none;
    }
}