/* =========================================
   基本設定
   ========================================= */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --main-bg: #fdfdfd;
    --navy: #00254d;
    --gold: #d4af37;
    --red: #e60000;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
    background-color: var(--main-bg);
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 10px;
}

/* =========================================
   ヘッダー・メインビジュアル
   ========================================= */
header {
    background: #fff;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-size: 1rem; /* サイト名を少し強調 */
    margin: 0;
    color: var(--navy);
    font-weight: bold;
}

.main-visual img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   ランキングカード
   ========================================= */
.top-announcement {
    background: #fff9e6;
    border: 1px dashed var(--gold);
    padding: 12px;
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
    font-size: 0.9rem;
    border-radius: 5px;
}

.rank-card {
    background: #fff;
    margin-bottom: 40px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.rank-title-name {
    background: #f8f9fa;
    padding: 12px 15px;
    font-size: 1.1rem;
    color: var(--navy);
    border-left: 6px solid var(--navy);
    margin: 0;
}

.card-content {
    padding: 15px;
}

.item-banner img {
    width: 100%;
    border-radius: 5px;
    height: auto;
    display: block;
}

.item-catch {
    font-size: 0.9rem;
    font-weight: bold;
    margin: 15px 0;
    color: #333;
}

.simple-spec {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.simple-spec th, .simple-spec td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: center;
}

.simple-spec th {
    background: #f1f3f5;
    width: 35%;
    font-weight: normal;
}

.red-bold {
    color: var(--red);
    font-weight: bold;
    font-size: 1.3rem;
}

.official-btn {
    display: block;
    background: linear-gradient(to bottom, #34ce57, #28a745);
    color: #fff;
    text-align: center;
    padding: 18px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 0 #1e7e34;
}

.review-box {
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    padding: 15px;
    margin-top: 10px;
    border-radius: 8px;
}

.review-header {
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--navy);
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

/* =========================================
   ポップアップ（離脱防止）
   ========================================= */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: #fff;
    width: 90%;
    max-width: 360px;
    padding: 40px 15px 25px;
    border-radius: 15px;
    text-align: center;
    position: relative;
}

.popup-tag {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    background: var(--red);
    color: #fff;
    padding: 5px 20px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 0 0 10px 10px;
}

.popup-title {
    font-weight: bold;
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.popup-main-box {
    background: #f8f9fa;
    border: 2px solid var(--navy);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.pop-rate-num {
    color: var(--red);
    font-size: 1.8rem;
    font-weight: bold;
}

.popup-btn-animated {
    display: block;
    background: linear-gradient(to bottom, #ff3300, #cc2900);
    color: #fff;
    padding: 15px 10px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 5px 0 #991f00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.popup-close {
    position: absolute;
    top: 10px; right: 10px;
    width: 30px; height: 30px;
    background: #eee;
    border-radius: 50%;
    line-height: 30px;
    cursor: pointer;
    font-size: 20px;
}

footer {
    text-align: center;
    padding: 40px 10px;
    font-size: 0.75rem;
    color: #999;
}

/* バッジの基本スタイル */
.badge {
    display: inline-block;
    padding: 2px 10px;
    margin-right: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    vertical-align: middle;
}

/* 順位ごとの色設定 */
.rank1 {
    background: linear-gradient(135deg, #ffd700, #ff8c00); /* 金色 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.rank2 {
    background: linear-gradient(135deg, #c0c0c0, #808080); /* 銀色 */
}

.rank3 {
    background: linear-gradient(135deg, #cd7f32, #8b4513); /* 銅色 */
}

/* 親要素の調整（バッジと文字が綺麗に並ぶように） */
.rank-title-name {
    display: flex;
    align-items: center;
    /* 既存のスタイルがある場合は適宜残してください */
}