    .search-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
    .search-bar .form-group { flex: 1; min-width: 150px; }
    .search-bar .form-group label { font-size: .8rem; font-weight: 600; margin-bottom: 2px; display: block; }

    .model-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px; margin-top: 16px;
    }
    @media (max-width: 768px) {
        .model-grid { grid-template-columns: 1fr; }
    }
    .model-card {
        border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden;
        background: #fff; transition: box-shadow .2s, transform .15s; cursor: pointer;
    }
    .model-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); transform: translateY(-2px); }

    .model-card-images {
        display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
        aspect-ratio: 16/9; overflow: hidden; background: #f3f4f6;
    }
    .model-card-images img {
        width: 100%; height: 100%; object-fit: cover;
    }
    .model-card-images.single { grid-template-columns: 1fr; }

    /* 遅延ロード前の画像（src 未割り当て）はプレースホルダー背景を出す */
    .lazy-img:not([src]) {
        background: linear-gradient(110deg, #ececec 30%, #f5f5f5 50%, #ececec 70%);
        background-size: 200% 100%;
        animation: civitai-skeleton 1.4s ease-in-out infinite;
    }
    .model-card-images img.lazy-img:not([src]) { min-height: 100%; }
    .detail-images img.lazy-img:not([src]) { aspect-ratio: 1 / 1; }

    @keyframes civitai-skeleton {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    .model-card-body { padding: 12px; }
    .model-card-name { font-weight: 700; font-size: .95rem; margin-bottom: 4px; color: #111827;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .model-card-meta { font-size: .78rem; color: #6b7280; display: flex; gap: 10px; flex-wrap: wrap; }

    .model-type-badge {
        display: inline-block; font-size: .7rem; font-weight: 600;
        padding: 2px 8px; border-radius: 99px; color: #fff;
    }
    .type-Checkpoint { background: #6366f1; }
    .type-LORA { background: #f59e0b; }
    .type-LoCon { background: #f97316; }
    .type-TextualInversion { background: #10b981; }
    .type-Hypernetwork { background: #8b5cf6; }
    .type-Controlnet { background: #3b82f6; }
    .type-Poses { background: #ec4899; }

    .model-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
    .model-tags .tag { font-size: .7rem; background: #f3f4f6; color: #4b5563; padding: 1px 6px; border-radius: 4px; }

    .trigger-words { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
    .trigger-word {
        font-size: .75rem; background: #fef3c7; color: #92400e;
        padding: 2px 8px; border-radius: 4px; cursor: pointer;
        border: 1px solid #fcd34d; transition: background .15s;
    }
    .trigger-word:hover { background: #fde68a; }

    .model-stats { display: flex; gap: 12px; font-size: .78rem; color: #6b7280; margin-top: 6px; }
    .model-stats span { display: flex; align-items: center; gap: 3px; }

    .pagination-bar { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }

    .detail-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,.6);
        z-index: 10000; display: flex; align-items: center; justify-content: center;
        backdrop-filter: blur(2px);
    }
    .detail-panel {
        background: #fff; border-radius: 12px; max-width: 900px; width: 95%;
        max-height: 90vh; overflow-y: auto; box-shadow: 0 16px 64px rgba(0,0,0,.3);
    }
    .detail-header {
        padding: 14px 20px; border-bottom: 1px solid #e5e7eb;
        display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 1;
    }
    .detail-body { padding: 20px; }
    .detail-images {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 8px; margin-bottom: 16px;
    }
    .detail-images img { width: 100%; border-radius: 6px; cursor: pointer; }

    .detail-section { margin-bottom: 16px; }
    .detail-section h6 { font-weight: 700; margin-bottom: 6px; color: #374151; }

    .prompt-display {
        background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px;
        padding: 10px 12px; font-size: .82rem; color: #374151;
        white-space: pre-wrap; word-break: break-all; max-height: 120px; overflow-y: auto;
        position: relative; cursor: pointer;
    }
    .prompt-display:hover { background: #f3f4f6; }
    .prompt-display::after {
        content: 'クリックでコピー'; position: absolute; top: 4px; right: 8px;
        font-size: .65rem; color: #9ca3af;
    }

    .copy-toast {
        position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
        background: #111827; color: #fff; padding: 8px 20px; border-radius: 8px;
        font-size: .85rem; z-index: 10001; opacity: 0; transition: opacity .3s;
        pointer-events: none;
    }
    .copy-toast.show { opacity: 1; }

    .loading-spinner { text-align: center; padding: 40px; }
    .loading-spinner .spinner-border { width: 2.5rem; height: 2.5rem; }

    .no-results { text-align: center; padding: 40px; color: #9ca3af; }

    .use-prompt-btn {
        display: inline-flex; align-items: center; gap: 4px;
        background: #6366f1; color: #fff; border: none; padding: 6px 14px;
        border-radius: 6px; font-size: .8rem; cursor: pointer; transition: background .15s;
    }
    .use-prompt-btn:hover { background: #4f46e5; }

    /* お気に入り */
    .model-card { position: relative; }
    .card-fav-btn {
        position: absolute; top: 8px; right: 8px; z-index: 2;
        width: 30px; height: 30px; border-radius: 50%;
        background: rgba(255,255,255,.85); border: none;
        display: flex; align-items: center; justify-content: center;
        font-size: 18px; line-height: 1; color: #9ca3af;
        cursor: pointer; transition: transform .12s, background .15s, color .15s;
        box-shadow: 0 1px 4px rgba(0,0,0,.18);
    }
    .card-fav-btn:hover { background: #fff; transform: scale(1.08); }
    .card-fav-btn.is-favorited { color: #f59e0b; }
    .card-fav-btn.is-favorited::before { content: '\2605'; }
    .card-fav-btn:not(.is-favorited)::before { content: '\2606'; }

    .fav-star { display: inline-block; font-size: 1.05em; line-height: 1; }
    #btn-favorites-toggle.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }
    #btn-favorites-toggle.active .fav-star::before { content: '\2605'; }
    #btn-favorites-toggle:not(.active) .fav-star::before { content: '\2606'; }
    #btn-favorites-toggle .fav-star { font-size: 1.1em; }

    #detail-fav-btn.is-favorited { background: #f59e0b; color: #fff; border-color: #f59e0b; }
    #detail-fav-btn.is-favorited .fav-star::before { content: '\2605'; }
    #detail-fav-btn:not(.is-favorited) .fav-star::before { content: '\2606'; }
