@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700;900&display=swap');

/* --- 1. 基本設定 --- */
:root {
    --golf-dark: #0a2e12;
    --golf-primary: #1a5d1a;
    --gold: #d4af37;
    --accent: #bf0000;
    --bg-gray: #f0f2f0;
    --white: #ffffff;
    --text-main: #1a1a1a;
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-gray);
    margin: 0;
    color: var(--text-main);
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 12px; }

/* --- 2. サイトヘッダー --- */
.site-header {
    background: var(--white);
    padding: 10px 0;
    border-bottom: 4px solid var(--golf-primary);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo a { text-decoration: none; color: var(--golf-dark); font-size: 1.1rem; font-weight: 900; display: flex; flex-direction: column; line-height: 1.2; }
.logo span { color: var(--gold); font-size: 0.55rem; letter-spacing: 1px; }

/* --- 3. 分析レポートヘッダー --- */
.analysis-header { background: linear-gradient(135deg, #071f0a 0%, #111 100%); color: #fff; padding: 30px 0; border-bottom: 6px solid var(--gold); text-align: center; }
.market-label { background: var(--gold); color: #000; padding: 3px 12px; font-size: 0.7rem; font-weight: 900; border-radius: 3px; display: inline-block; margin-bottom: 12px; }
.analysis-header h1 { font-size: 1.5rem; font-weight: 900; margin: 0 0 15px; padding: 0 10px; line-height: 1.3; }

.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-tile { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 10px; border-radius: 12px; }
.stat-tile:last-child { grid-column: span 2; }
.stat-tile small { display: block; font-size: 0.6rem; color: var(--gold); font-weight: 700; margin-bottom: 3px; }
.stat-tile b { font-size: 1.1rem; font-weight: 900; }

/* --- 4. ソートナビ --- */
.sort-nav { display: flex; gap: 6px; margin: 15px 0; overflow-x: auto; padding: 8px 5px; background: #e9ece9; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.sort-nav::-webkit-scrollbar { display: none; }
.sort-link { background: var(--white); padding: 8px 15px; border-radius: 6px; text-decoration: none; color: #555; font-weight: 700; font-size: 0.75rem; border: 1px solid #ddd; white-space: nowrap; }
.sort-link.active { background: var(--golf-primary); color: var(--white); border-color: var(--golf-primary); }

/* --- 5. プレミアムカード本体 --- */
.premium-card { background: #fff; border-radius: 15px; margin-bottom: 35px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #eee; }
.card-side-label { background: var(--golf-dark); color: #fff; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.card-side-label b { font-size: 1.4rem; color: var(--gold); font-weight: 900; }
.card-visual { position: relative; height: 180px; width: 100%; overflow: hidden; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }
.top-percent { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; padding: 4px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: 900; }

.card-body-info { padding: 15px; }
.card-meta { font-size: 0.7rem; color: #888; margin-bottom: 8px; }
.card-title a { font-size: 1.2rem; font-weight: 900; color: #1a0dab; text-decoration: none; display: block; margin-bottom: 15px; line-height: 1.4; }

/* --- 6. スコア・順位表示 (card_ranking.php) --- */
.premium-score-grid { background: #fff; border: 2px solid #444; border-radius: 12px; padding: 12px; margin-bottom: 20px; }
.score-row { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed #eee; }
.score-row:last-of-type { border-bottom: none; margin-bottom: 0; }
.score-row .label { font-weight: bold; color: #888; font-size: 0.75rem; }
.score-row .val { font-size: 1.8rem; font-weight: 900; color: var(--accent); line-height: 1; }
.rank-display-group { display: flex; flex-wrap: wrap; gap: 5px; }
.rank-item { font-size: 0.7rem; background: #f4f4f4; padding: 4px 8px; border-radius: 4px; border-left: 3px solid var(--golf-primary); }
.rank-item.national { border-left-color: #000; }
.rank-item b { color: #111; }

/* --- 7. GPS距離分析ボックス (card_proximity.php) --- */
.analysis-proximity-box { background: #ffffff; border: 1px solid #d0d7de; border-top: 4px solid var(--golf-primary); border-radius: 10px; padding: 15px; margin-bottom: 20px; }
.analysis-title { font-size: 0.75rem; font-weight: 900; color: var(--golf-dark); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.analysis-title i { color: var(--gold); }
.analysis-list { display: flex; flex-direction: column; gap: 8px; }
.analysis-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f8f9fa; border-radius: 6px; border: 1px solid #eee; }
.item-category { font-size: 0.6rem; font-weight: 900; padding: 3px 6px; border-radius: 3px; min-width: 65px; text-align: center; }
.cat-station { background: #ebf5ff; color: #0056b3; }
.cat-ic { background: #e6f4ea; color: #1a5d1a; }
.cat-spot { background: #fef7e0; color: #2e7d32; }
.cat-heritage { background: #fff4e5; color: #b8860b; }
.item-name { font-weight: bold; font-size: 0.85rem; color: #111; flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-dist { text-align: right; font-size: 0.8rem; color: #666; white-space: nowrap; }
.item-dist b { font-size: 1rem; color: #111; }
.dist-badge { font-size: 0.55rem; font-weight: 900; padding: 1px 4px; border-radius: 2px; color: #fff; margin-right: 4px; vertical-align: middle; }
.dist-badge.hot { background: #e53e3e; }
.dist-badge.mid { background: #3182ce; }
.analysis-expand-btn { width: 100%; background: #fff; border: 1px solid #ddd; color: #0056b3; padding: 6px; margin-top: 8px; border-radius: 4px; font-weight: bold; font-size: 0.75rem; cursor: pointer; }
.analysis-footer { font-size: 0.6rem; color: #999; margin-top: 12px; border-top: 1px dashed #eee; padding-top: 8px; line-height: 1.4; }

/* --- 8. 詳細スコア --- */
.details-grid-expanded { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 20px; }
.m-item { border: 1px solid #ddd; padding: 8px; border-radius: 8px; background: #fdfdfd; }
.m-head { display: flex; justify-content: space-between; align-items: center; }
.m-label { font-size: 0.65rem; color: #777; }
.m-val { font-size: 0.9rem; font-weight: 900; }
.m-ranks { font-size: 0.6rem; color: #888; display: flex; justify-content: space-between; margin-top: 5px; border-top: 1px solid #eee; padding-top: 5px; }

/* --- 9. スペック・ヤーデージ --- */
.course-caption { font-size: 0.85rem; color: #444; margin-bottom: 20px; line-height: 1.6; }
.quick-spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; background: #f8f8f8; padding: 10px; border-radius: 8px; margin-bottom: 20px; text-align: center; }
.q-item small { display: block; font-size: 0.55rem; color: #888; }
.q-item b { font-size: 0.75rem; }

details { border: 1px solid #eee; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
summary { padding: 10px; font-size: 0.8rem; font-weight: bold; cursor: pointer; background: #f9f9f9; list-style: none; display: flex; justify-content: space-between; }
summary::after { content: '▼'; font-size: 0.6rem; color: #999; }
.yardage-table { width: 100%; border-collapse: collapse; font-size: 0.65rem; text-align: center; }
.yardage-table th, .yardage-table td { border: 1px solid #eee; padding: 4px 2px; }

/* --- 10. 予約ボタン --- */
.cta-button {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #ff4d4d 0%, #bf0000 100%);
    color: #fff !important; text-decoration: none; padding: 15px 10px; border-radius: 10px;
    font-weight: 900; box-shadow: 0 4px 0 #8b0000; width: 100%;
}
.cta-button .btn-main