@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/


/* SF-RANKING-CSS */
/* =========================================================================
   site-factory 標準: 人気記事ランキング CSS
   - [my_custom_ranking]（サイドバー）と 人気記事ページ [wpp ...anm-page-rank...] 用。
   - rebimato を標準化（2026-06-04）。アクセント色は各サイトのメインカラー var(--color_main) に追従。
   - 追加CSS（カスタマイザー）または子テーマ style.css に貼り付け。
   ========================================================================= */

/* ---- タブ切替ランキング（サイドバー） ---- */
.anm-rank-wrap { width: 100%; margin-bottom: 20px; }
.anm-rank-wrap input[type="radio"] { display: none; }
.anm-tab-label {
  display: inline-block; width: calc(100% / 3 - 4px); text-align: center;
  padding: 10px 0; background: #eee; color: #666; font-weight: bold;
  cursor: pointer; border-radius: 4px 4px 0 0; margin-right: 2px; transition: .3s;
}
.anm-rank-wrap input[type="radio"]:checked + .anm-tab-label { background: var(--color_main); color: #fff; }
.anm-rank-panel { display: none; padding: 15px 0; border-top: 3px solid var(--color_main); }
#rank_d:checked ~ #panel_d, #rank_w:checked ~ #panel_w, #rank_m:checked ~ #panel_m { display: block; animation: fade-in .5s ease; }
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }

.anm-rank-card { position: relative; display: flex; align-items: center; border-bottom: 1px dotted #ccc; padding: 10px 0; transition: background-color .3s ease; }
.anm-rank-card:last-child { border-bottom: none; }
.anm-rank-card:hover { background-color: #f7f9fa; }
.anm-rank-thumb { position: relative; width: 120px; height: 67px; flex-shrink: 0; overflow: hidden; border-radius: 4px; }
.anm-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.anm-rank-thumb a { position: relative; z-index: 1; }
.anm-rank-badge { position: absolute; top: 0; left: 0; background: #333; color: #fff; padding: 2px 8px; font-size: .8em; font-weight: bold; }
.anm-rank-card:nth-child(1) .anm-rank-badge { background: #ffd700; color: #333; z-index: 5; }
.anm-rank-card:nth-child(2) .anm-rank-badge { background: #c0c0c0; color: #333; z-index: 5; }
.anm-rank-card:nth-child(3) .anm-rank-badge { background: #c47222; z-index: 5; }
.anm-rank-data { padding-left: 15px; flex-grow: 1; }
.anm-rank-title { font-size: .95em; font-weight: bold; line-height: 1.4; }
.anm-rank-title a::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; }

/* ---- 人気記事ページ用 ランキングリスト（PC3列/SP縦・全体リンク） ---- */
.anm-page-rank-list { display: grid; gap: 15px; margin-bottom: 50px; }
.anm-page-rank-card { position: relative; display: flex; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.1); transition: transform .2s, box-shadow .2s, background-color .2s; }
.anm-page-rank-card:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,.15); background-color: #f7f9fa; }
.anm-page-rank-thumb { position: relative; flex-shrink: 0; z-index: 1; }
.anm-page-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.anm-page-rank-badge { position: absolute; top: 0; left: 0; background: #333; color: #fff; padding: 4px 12px; font-size: .9em; font-weight: bold; z-index: 5; border-radius: 0 0 8px 0; }
.anm-page-rank-card:nth-child(1) .anm-page-rank-badge { background: #ffd700; color: #333; }
.anm-page-rank-card:nth-child(2) .anm-page-rank-badge { background: #c0c0c0; color: #333; }
.anm-page-rank-card:nth-child(3) .anm-page-rank-badge { background: #c47222; }
.anm-page-rank-data { padding: 15px; display: flex; align-items: center; }
.anm-page-rank-title { font-weight: bold; line-height: 1.5; font-size: 1em; }
.anm-page-rank-title a { text-decoration: none !important; color: #333 !important; }
.anm-page-rank-title a::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; }
@media (min-width: 768px) {
  .anm-page-rank-list { grid-template-columns: repeat(3, 1fr); }
  .anm-page-rank-card { flex-direction: column; }
  .anm-page-rank-thumb { width: 100%; aspect-ratio: 16 / 9; }
  .anm-page-rank-data { align-items: flex-start; }
}
@media (max-width: 767px) {
  .anm-page-rank-list { grid-template-columns: 1fr; }
  .anm-page-rank-card { flex-direction: row; align-items: center; }
  .anm-page-rank-thumb { width: 120px; height: 80px; }
  .anm-page-rank-data { padding: 10px; }
  .anm-page-rank-title { font-size: .9em; }
}

/* 長いタイトルは2行で省略 */
.anm-rank-title, .anm-page-rank-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.5; max-height: 3em; }
