/* =============================================
   お気に入りボタン
   ============================================= */
.fav-btn-wrap {
    text-align:right;
    margin:1em 0;
}

.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.6em 1.6em;
    border: 2px solid #e74c3c;
    border-radius: 999px;
    background: #fff;
    color: #e74c3c;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

.fav-btn:hover {
    background: #fef0f0;
}

.fav-btn:focus-visible {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

/* 未お気に入り時：♡ */
.fav-btn__icon::before {
    content: '\2661'; /* ♡ */
    font-size: 1.2em;
    line-height: 1;
}

/* お気に入り済み：♥ + 色反転 */
.fav-btn.is-favorited {
    background: #e74c3c;
    color: #fff;
}

.fav-btn.is-favorited .fav-btn__icon::before {
    content: '\2665'; /* ♥ */
}

/* =============================================
   一覧表示（お気に入り / 閲覧履歴ページ共通）
   ============================================= */
.fav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.fav-list__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.fav-list__item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fav-list__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.fav-list__thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background-color: #f0f0f0; /* 画像読み込み前のプレースホルダー */
}

.fav-list__title {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.6;
}

.fav-list__remove {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #999;
    transition: border-color 0.2s, color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fav-list__remove:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.fav-list__remove:focus-visible {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

.fav-empty {
    text-align: center;
    color: #999;
    padding: 2em;
}

/* =============================================
   レスポンシブ対応
   ============================================= */
@media (max-width: 480px) {
    .fav-list__thumb {
        width: 80px;
        height: 45px;
    }

    .fav-list__item {
        padding: 0.6rem;
        gap: 0.6rem;
    }

    .fav-list__title {
        font-size: 0.82rem;
    }
}