/* 変数定義：淡い赤・コーラル系 */
:root {
    --primary: #ff6b6b;      /* メインの赤（ボタンやヘッダー用） */
    --primary-hover: #ee5253; /* ホバー時の少し濃い赤 */
    --bg-soft: #fffafa;      /* 全体の背景 */
    --accent: #ffdfdf;       /* 枠線など */
    --text: #333;
    --white: #ffffff;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
    background-color: var(--bg-soft);
    color: var(--text);
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--white);
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid var(--accent);
}

header h1 {
    margin: 0;
    color: var(--primary);
    font-size: 2rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* --- 検索フォーム（前回のデザインをベースに色変更） --- */
.search-section {
    margin-bottom: 40px;
    text-align: center;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

input[type="text"] {
    width: 60%;
    padding: 12px 25px;
    border: 2px solid #ddd;
    border-radius: 30px; /* 丸みのあるデザイン */
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary); /* フォーカス時に赤系へ */
}

button {
    padding: 12px 30px;
    background-color: var(--primary); /* 青から赤へ */
    color: white;
    border: none;
    border-radius: 30px; /* 丸みのあるデザイン */
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--primary-hover);
}


/* --- 検索結果・カード関連 --- */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
}

.actor-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.actor-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.image-link {
    display: block;
    width: 100%;
    height: 80px;
    overflow: hidden;
    position: relative;
    background-color: #eee; /* 画像読み込み前の下地 */
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 画像ホバー時のラベル */
.image-link::after {
    content: "Google画像検索へ";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 107, 107, 0.8);
    color: white;
    text-align: center;
    padding: 5px 0;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-link:hover::after {
    opacity: 1;
}

.info {
    padding: 10px;
}

.anime-title {
    font-size: 10px;
    color: #777;
    margin: 0 0 5px 0;
    line-height: 1.2;
    margin-bottom: 3px;
}

.anime-title, .char-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 従来のブラウザ用 */
    line-clamp: 2;         /* 標準プロパティ（これを追加） */
    overflow: hidden;
}

.char-name {
    font-size: 14px;
    margin: 0;
    color: var(--text);
    font-weight: bold;
    line-height: 1.3;
}

/* もしかしてリスト */
.suggestion-list {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--accent);
}

.suggestion-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 600px) {
    .result-grid {
        grid-template-columns: repeat(4, 1fr); /* タブレットは3列 */
    }
}

/* 本人画像リンクのホバー効果 */
.actor-link {
    display: inline-block;
    transition: opacity 0.3s;
}

.actor-link:hover {
    opacity: 0.8; /* マウスを乗せると少し薄くなる */
}

.actor-icon {
    cursor: pointer; /* マウスカーソルを指の形にする */
}

/* 本人画像用のラッパー設定 */
.actor-image-wrapper {
    width: 100px;  /* actor-iconと同じサイズ */
    height: 100px;
    border-radius: 50%; /* 丸形にする */
    display: inline-block;
    vertical-align: middle;
}

/* 本人画像ホバー時のラベル調整 */
.actor-image-wrapper::after {
    border-radius: 0 0 50px 50px; /* 下半分を丸める */
    height: 30px; /* 少し高さを抑える */
    line-height: 25px;
}

/* もし actor-icon 自体のスタイルが干渉する場合は以下で調整 */
.actor-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    margin: 0; /* 余計な余白を消す */
}

/* カテゴリ見出しのスタイル */
.category-title {
    margin: 40px 0 20px 0;
    padding: 10px 15px;
    background-color: var(--accent); /* 淡い赤系 */
    color: var(--primary);          /* 濃い赤系 */
    border-left: 5px solid var(--primary);
    border-radius: 4px;
    font-size: 1.2rem;
}

/* 最初の見出しの上の余白を調整 */
.actor-header + .category-title {
    margin-top: 20px;
}

.ranking-section {
    margin-top: 30px;
    text-align: center;
}

.ranking-section h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.ranking-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.rank-item {
    background: var(--white);
    border: 1px solid var(--accent);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.rank-count {
    font-size: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 10px;
}

.rank-item:hover .rank-count {
    background: white;
}

/* ナビゲーション */
/* .top-nav {
    text-align: center;
    margin-bottom: 20px;
}
.top-nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
} */

.top-nav {
    display: flex;
    justify-content: space-around; /* 均等に配置 */
    align-items: center;
    width: 100%;
}

.top-nav a {
    flex: 1; /* 幅を均等に分配 */
    text-align: center;
    font-size: 13px; /* スマホ用に少し小さく */
    padding: 8px 2px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
}

.contact-wrapper {
    background: #fff;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.1);
    overflow: hidden; /* 角丸を効かせる */
    max-width: 700px;
    margin: 0 auto;
}

/* 全声優一覧のグリッド */
.actor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* 一覧用のミニカード */
.actor-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    padding: 10px;
    border-radius: 50px; /* カプセル型 */
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--accent);
    transition: 0.3s;
}

.actor-card:hover {
    background: var(--accent);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.actor-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    flex-shrink: 0;
}

.actor-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actor-card-name {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-img-small {
    font-size: 8px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* スマホでは2列にする */
@media (max-width: 500px) {
    .actor-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* プロフィールカード全体 */
.profile-card {
    background: var(--white);
    max-width: 700px;
    margin: 40px auto;
    padding: 50px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.1);
    text-align: center;
    border: 1px solid var(--accent);
}

/* 画像の丸めと装飾 */
.profile-image-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 25px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.admin-name {
    color: var(--text);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.admin-intro {
    color: #666;
    line-height: 1.8;
    text-align: left; /* 紹介文は左寄せが読みやすいです */
    background: var(--bg-soft);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 15px;
}

/* SNSボタンのレイアウト */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    font-size: 14px;
}

/* 各SNSのカラー */
.x-btn {
    background-color: #000;
    color: #fff;
}

.youtube-btn {
    background-color: #ff0000;
    color: #fff;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* スマホ対応 */
@media (max-width: 500px) {
    .profile-card {
        padding: 30px 20px;
    }
    .social-btn {
        width: 100%;
        justify-content: center;
    }
}

.news-section {
    max-width: 700px;
    margin: 40px auto;
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.1);
    border: 1px solid var(--accent);
}

.news-section h3 {
    margin-top: 0;
    /* color: var(--primary); */
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.news-list {
    text-align: left;
}

.news-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--accent);
    display: flex;
    gap: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #888;
    font-family: monospace;
    flex-shrink: 0;
}

.news-tag {
    color: var(--primary);
    font-weight: bold;
    flex-shrink: 0;
}

.news-content {
    color: var(--text);
}

/* 「もっと見る」ボタンのコンテナ */
.news-more {
    margin-top: 20px;
    text-align: center;
}

/* ボタン自体のスタイル */
.more-btn {
    display: inline-block;
    padding: 8px 25px;
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.more-btn:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
}

/* アーカイブページ用の微調整 */
.archive-section {
    max-width: 800px; /* 少し幅を広げる */
}

/* スマホでは日付と内容を縦に並べる */
@media (max-width: 500px) {
    .news-item {
        flex-direction: column;
        gap: 5px;
    }
    .news-tag {
        display: inline-block;
        width: fit-content;
    }
}

.decade-section {
    margin-bottom: 40px;
}

.decade-title {
    font-size: 1.4rem;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 20px;
    text-align: left;
}

/* 年代別ページではリストを少しコンパクトに */
.decade-section .actor-card {
    padding: 12px 20px;
    justify-content: center;
}

/* 年代別カード専用の調整 */
.age-card {
    padding: 15px 10px;
    height: auto;
    min-height: 60px;
}

.actor-info {
    display: flex;
    flex-direction: column; /* 縦に並べる */
    align-items: center;
    width: 100%;
}

.actor-card-name {
    font-size: 15px;
    margin-bottom: 4px;
}

/* 誕生日サブテキスト */
.actor-birth-sub {
    font-size: 11px;
    color: #888;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ホバー時に誕生日の色も少し変える */
.actor-card:hover .actor-birth-sub {
    color: var(--white);
    opacity: 0.9;
}

/* アコーディオン全体の枠 */
.decade-accordion {
    margin-bottom: 15px;
    background: var(--white);
    border: 1px solid var(--accent);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* クリックするヘッダー部分 */
.decade-title {
    padding: 15px 20px;
    background-color: var(--white);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    list-style: none; /* デフォルトの三角を消す */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Chrome/Safariなどでデフォルトの三角を消す */
.decade-title::-webkit-details-marker {
    display: none;
}

/* 人数バッジ */
.count-badge {
    font-size: 0.9rem;
    background: var(--accent);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: auto;
    margin-right: 15px;
}

/* 開いている時のスタイル */
.decade-accordion[open] {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.1);
}

.decade-accordion[open] .decade-title {
    border-bottom: 1px solid var(--accent);
    background-color: var(--bg-soft);
}

.decade-accordion[open] .icon {
    transform: rotate(180deg);
}

/* 中身のグリッドの余白調整 */
.decade-accordion .actor-grid {
    padding: 20px;
    margin-top: 0;
}

/* 矢印アイコンの動き */
.icon {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.bbs-section {
    margin-top: 50px;
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--accent);
}

.bbs-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.bbs-form input, .bbs-form textarea {
    border: 1px solid var(--accent);
    padding: 10px;
    border-radius: 8px;
}

.message-item {
    text-align: left;
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-soft);
}

.message-meta {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.m-name {
    font-weight: bold;
    color: var(--primary);
    margin-right: 10px;
}

.m-date {
    color: #999;
}

.m-text {
    font-size: 14px;
    margin: 0;
}

/* タブボタンの並び */
.tab-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid var(--accent);
}

.tab-btn {
    padding: 12px 30px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #888;
    transition: 0.3s;
    border-radius: 10px 10px 0 0;
}

/* マウスホバー時 */
.tab-btn:hover {
    color: var(--primary);
    background-color: var(--bg-soft);
}

/* アクティブ（選択中）なタブ */
.tab-btn.active {
    color: white;
    background-color: var(--primary);
}

/* コンテンツエリアの制御 */
.tab-content {
    display: none; /* 基本は非表示 */
    animation: fadeEffect 0.5s; /* ふわっと出すアニメーション */
}

.tab-content.active {
    display: block; /* activeクラスがついたものだけ表示 */
}

@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

.recent-comments {
    max-width: 700px;
    margin: 40px auto;
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.1);
    border: 1px solid var(--accent);
}

.recent-comments h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.comment-item {
    text-align: left;
    padding: 15px;
    background: var(--bg-soft);
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.comment-target {
    font-weight: bold;
    font-size: 12px;
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
}

.comment-text {
    font-size: 14px;
    margin: 5px 0;
    color: var(--text);
}

.comment-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #888;
}

.comment-link {
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 5px;
    transition: 0.3s;
}

.comment-link:hover {
    background: var(--primary);
    color: white;
}


/* フォーム全体の設定 */
.bbs-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 入力欄（名前・メッセージ）は横幅いっぱい */
.bbs-form input, 
.bbs-form textarea {
    width: 100%;
    box-sizing: border-box; /* 枠線を含めた計算にする（組み込みのオフセット計算のようなもの） */
}

/* ボタンだけを右に寄せて小さくする */
.submit-btn {
    align-self: flex-end;   /* 親の並びを無視して自分だけ右へ */
    width: 100px;           /* お好みのサイズに */
    padding: 10px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
}

.recent-updates {
    max-width: 700px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.recent-updates h3 {
    font-size: 1.1rem;
    /* color: var(--primary); */
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 5px solid var(--primary); /* アクセントカラー */
}

.update-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.update-item:last-child {
    border-bottom: none;
}

.update-date {
    font-size: 0.9rem;
    color: #888;
    width: 160px;       /* 幅を 100px から 160px 程度に広げる */
    flex-shrink: 0;     /* 幅が勝手に縮まないように固定する */
}

.update-name {
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.update-name:hover {
    text-decoration: underline;
}

.site-logo {
    margin: 20px 0;
    font-size: 2.5rem;
    font-weight: bold;
}

/* リンクのデフォルト装飾を打ち消す */
.site-logo a {
    text-decoration: none;  /* 下線を消す */
    color: var(--primary);   /* 既存のメインカラーを適用 */
    transition: all 0.3s ease; /* 変化を滑らかにする（組み込みのフェードイン的な効果） */
    display: inline-block;
}

/* マウスを乗せた（ホバー）時の演出 */
.site-logo a:hover {
    opacity: 0.8;            /* 少し透明にする */
    transform: scale(1.02);  /* ほんの少し（2%）大きくする */
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 軽い影をつけて浮き上がらせる */
}

/* 投票フォームのコンテナ */
.vote-controls {
    display: flex;
    flex-wrap: wrap;       /* 幅が足りない時に折り返す */
    align-items: center;   /* 垂直方向の中央揃え */
    justify-content: center; /* 中央寄せ */
    gap: 10px;             /* 要素間の余白 */
    margin-top: 20px;
}

/* セレクトボックスとボタンの基本スタイル */
.vote-controls select,
.vote-btn {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    flex: 1;               /* 可能な限り幅を広げる */
    min-width: 200px;      /* スマホでも押しやすい最小幅 */
}

/* 「×」のマーク */
.vs-mark {
    font-weight: bold;
    color: #888;
    flex: 0 0 auto;        /* 幅を固定（縮ませない） */
}

/* スマホ用の微調整（画面幅 600px 以下のとき） */
@media (max-width: 600px) {
    .vote-controls {
        flex-direction: column; /* 縦に並べる */
        align-items: stretch;   /* 横幅いっぱいに広げる */
    }
    
    .vs-mark {
        text-align: center;
        margin: -5px 0;         /* 縦並びの時の間隔を詰める */
    }

    .vote-controls select,
    .vote-btn {
        width: 100%;            /* スマホでは全幅 */
    }
}

.vote-controls select {
    max-width: 300px;         /* 最大幅を制限（環境に合わせて調整してください） */
    overflow: hidden;
    text-overflow: ellipsis; /* 長い場合に「...」で切る設定（ブラウザにより動作が異なります） */
    white-space: nowrap;
}

@media (max-width: 600px) {
    .vote-controls select {
        max-width: 100%;     /* スマホでは画面いっぱいに広げる */
    }
}

/* ランキング全体のコンテナ */
.vote-ranking {
    margin-top: 15px;
}

/* 1つの投票ペアの行 */
.vote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid var(--primary); /* 左側にアクセントライン */
}

/* ペア部分（キャラA ↔ キャラB） */
.pair-container {
    display: flex;
    flex-wrap: wrap; /* 長い場合に折り返す */
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #333;
}

.char-unit {
    font-weight: bold;
}

.vs-separator {
    color: #aaa;
    font-weight: normal;
}

/* 票数バッジ */
.vote-badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap; /* 票数は改行させない */
    margin-left: 10px;
}

/* スマホ用の微調整 */
@media (max-width: 600px) {
    .pair-container {
        flex-direction: column; /* スマホではキャラを縦に並べる */
        align-items: flex-start;
        gap: 2px;
    }
    .vs-separator {
        display: none; /* スマホでは ↔ を消して並べるか、別の記号に */
    }
}

.vote-ranking-top {
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.ranking-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.2s;
}

.ranking-item:hover {
    transform: translateX(5px);
    background: #f0f7ff;
}

/* 順位バッジ */
.rank-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 15px;
    background: #ddd;
    color: #fff;
}

.rank-1 { background: #ffd700; } /* 金 */
.rank-2 { background: #c0c0c0; } /* 銀 */
.rank-3 { background: #cd7f32; } /* 銅 */

.ranking-content {
    flex: 1;
}

.ranking-act {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 3px;
}

.ranking-pair {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.ranking-pair .vs {
    color: #aaa;
    margin: 0 5px;
}

.ranking-votes {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    text-align: right;
}

.ranking-votes span {
    font-size: 0.7rem;
}

/* 項目全体をリンクにするための設定 */
.ranking-link {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* index.php 用のランキングスタイル追加・修正 */

.ranking-item {
    display: flex;
    align-items: flex-start; /* 縦長になっても順位バッジが上に来るように */
    padding: 15px;
    gap: 10px;
}

.ranking-content {
    flex: 1;
    min-width: 0; /* 子要素の ellipsis 等を効かせるための魔法のプロパティ */
}

.ranking-act {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

/* ペア部分のレイアウト */
.ranking-pair-flex {
    display: flex;
    flex-wrap: wrap; /* 幅が狭ければ自動で折り返し */
    align-items: center;
    gap: 4px 8px;
}

.char-unit {
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    word-break: break-all; /* 長いタイトル対策 */
}

.vs-mark {
    font-size: 0.75rem;
    color: #999;
}

/* 投票数部分 */
.ranking-votes {
    min-width: 45px;
    text-align: right;
    align-self: center; /* 票数は中央に配置 */
}

/* --- スマホ専用 (600px以下) --- */
@media (max-width: 600px) {
    .ranking-item {
        padding: 12px 10px;
    }

    .ranking-pair-flex {
        flex-direction: column; /* スマホでは縦に並べる */
        align-items: flex-start;
        gap: 2px;
    }

    .vs-mark {
        display: none; /* スマホの縦並びでは × は不要（または細い線などに変更） */
    }

    .char-unit {
        font-size: 0.85rem; /* スマホでは少しだけフォントを落とす */
        line-height: 1.3;
    }

    .rank-number {
        width: 24px;  /* スマホではバッジを少し小さく */
        height: 24px;
        font-size: 0.75rem;
        margin-right: 8px;
    }
}

.simple-counter {
    display: inline-flex;
    align-items: baseline;
    padding: 4px 12px;
    background-color: #f0f4f8; /* 薄いグレーブルー */
    border-left: 4px solid var(--primary); /* アクセントカラーの縦線 */
    border-radius: 4px;
    color: #444;
    font-family: sans-serif;
    margin: 10px 0;
}

.simple-counter .label {
    font-size: 0.85rem;
    margin-right: 8px;
    font-weight: 600;
}

.simple-counter .count {
    font-size: 1.4rem;
    font-weight: 800;
    color: #222;
    line-height: 1;
}

.simple-counter .unit {
    font-size: 0.75rem;
    margin-left: 2px;
    color: #888;
}

.site-footer {
    margin-top: 50px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    color: #666;
}

.privacy-note {
    font-size: 0.75rem; /* 小さく表示 */
    color: #999;
    margin-top: 10px;
}

