/* ================================================
   UmaYosou - 競馬AI予測 Web スタイルシート
   デザインコンセプト: 可愛い × モダン × 競馬
   ================================================ */

/* ── CSS Variables ── */
:root {
    /* メインカラー */
    --primary: #1a7a4c;
    --primary-light: #2aa76a;
    --primary-dark: #0f5a35;
    --primary-bg: #e8f5ee;

    /* アクセントカラー */
    --accent-gold: #d4a017;
    --accent-gold-light: #fef3c7;
    --accent-pink: #ec4899;
    --accent-pink-light: #fce7f3;
    --accent-blue: #3b82f6;
    --accent-blue-light: #dbeafe;

    /* ニュートラル */
    --bg: #faf9f7;
    --bg-card: #ffffff;
    --bg-warm: #fefcf8;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;

    /* 自信度カラー */
    --conf-best: #dc2626;
    --conf-best-bg: #fef2f2;
    --conf-good: #2563eb;
    --conf-good-bg: #eff6ff;
    --conf-fair: #16a34a;
    --conf-fair-bg: #f0fdf4;
    --conf-watch: #d97706;
    --conf-watch-bg: #fffbeb;
    --conf-low: #9ca3af;
    --conf-low-bg: #f9fafb;

    /* レイアウト */
    --container: 1100px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

    /* トランジション */
    --transition: 0.2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ── */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mascot {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform var(--transition);
}

.logo-link:hover .logo-mascot {
    transform: rotate(-10deg) scale(1.1);
}

.logo-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.site-nav-desktop {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-icon {
    font-size: 1rem;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fef3c7 50%, var(--accent-pink-light) 100%);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(26,122,76,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text);
}

.hero-accent {
    color: var(--primary);
    position: relative;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-green {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-blue {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

.badge-pink {
    background: var(--accent-pink-light);
    color: var(--accent-pink);
}

.hero-mascot {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.hero-mascot-img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
    animation: mascotFloat 3s ease-in-out infinite;
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.mascot-speech {
    background: var(--bg-card);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    margin-top: -20px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-dark);
}

.mascot-speech::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--bg-card);
}

/* ── Sections ── */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-icon {
    font-size: 1.3rem;
}

.dates-section {
    padding: 60px 0;
}

.guide-section {
    padding: 60px 0;
    background: var(--bg-warm);
}

/* ── Date Cards ── */
.dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.date-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    border: 1px solid var(--border-light);
}

.date-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.date-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-day {
    font-size: 1.1rem;
    font-weight: 700;
}

.date-place-count {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.date-card-body {
    padding: 20px 24px;
}

.place-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.place-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
}

.place-chip:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.place-icon {
    font-size: 0.9rem;
}

.date-card-footer {
    padding: 0 24px 20px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary-bg);
}

.btn-outline:hover {
    background: var(--primary-bg);
}

/* ── Confidence Guide ── */
.confidence-guide {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.guide-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.guide-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.guide-card h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.guide-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Confidence Badge Colors ── */
.confidence-best {
    color: var(--conf-best);
    background: var(--conf-best-bg);
}

.confidence-good {
    color: var(--conf-good);
    background: var(--conf-good-bg);
}

.confidence-fair {
    color: var(--conf-fair);
    background: var(--conf-fair-bg);
}

.confidence-watch {
    color: var(--conf-watch);
    background: var(--conf-watch-bg);
}

.confidence-low {
    color: var(--conf-low);
    background: var(--conf-low-bg);
}

/* ── Predictions Page ── */
.predictions-header {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fef3c7 100%);
    padding: 32px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--primary);
    transition: opacity var(--transition);
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb-sep {
    color: var(--text-muted);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-stats {
    display: flex;
    gap: 12px;
}

.stat-chip {
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Places Grid ── */
.places-section {
    padding: 48px 0;
}

.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.place-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 2px solid transparent;
}

.place-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.place-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.place-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.place-card-arrow {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ── Race Navigation ── */
.race-nav-section {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 70px;
    z-index: 50;
    padding: 12px 0;
}

.race-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.race-nav::-webkit-scrollbar {
    display: none;
}

.race-nav-item {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
    white-space: nowrap;
    transition: all var(--transition);
    flex-shrink: 0;
}

.race-nav-item:hover, .race-nav-item.active {
    background: var(--primary);
    color: white;
}

/* ── Top Picks ── */
.top-picks-section {
    padding: 32px 0;
    background: var(--bg-warm);
}

.subsection-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-mascot {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.top-picks-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.top-picks-scroll::-webkit-scrollbar {
    display: none;
}

.top-pick-card {
    flex: 0 0 140px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.top-pick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.top-pick-race {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.top-pick-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.top-pick-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.top-pick-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-pick-prob {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

/* ── Race Cards ── */
.races-section {
    padding: 32px 0 60px;
}

.race-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.race-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.race-number-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.race-card-title {
    font-size: 1rem;
    font-weight: 600;
}

.race-card-body {
    padding: 0;
}

/* ── Horse Table ── */
.horse-table {
    width: 100%;
}

.horse-table-header {
    display: grid;
    grid-template-columns: 50px 60px 60px 1fr 80px 120px;
    padding: 12px 24px;
    background: var(--bg);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.horse-row {
    display: grid;
    grid-template-columns: 50px 60px 60px 1fr 80px 120px;
    padding: 14px 24px;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.horse-row:last-child {
    border-bottom: none;
}

.horse-row:hover {
    background: var(--bg);
}

.horse-top3 {
    background: var(--bg-warm);
}

.horse-first {
    background: linear-gradient(90deg, var(--accent-gold-light) 0%, var(--bg-warm) 100%);
}

/* Rank badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: white;
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 6px rgba(245,158,11,0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.rank-3 {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.rank-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Confidence badge in table */
.confidence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
}

/* Horse number */
.horse-number-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    border: 2px solid var(--border);
}

/* Horse name */
.col-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.horse-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.horse-label {
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Probability */
.prob-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

/* Probability bar */
.prob-bar {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.prob-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.prob-bar-fill.confidence-best {
    background: linear-gradient(90deg, var(--conf-best), #ef4444);
}

.prob-bar-fill.confidence-good {
    background: linear-gradient(90deg, var(--conf-good), #60a5fa);
}

.prob-bar-fill.confidence-fair {
    background: linear-gradient(90deg, var(--conf-fair), #4ade80);
}

.prob-bar-fill.confidence-watch {
    background: linear-gradient(90deg, var(--conf-watch), #fbbf24);
}

.prob-bar-fill.confidence-low {
    background: var(--conf-low);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-mascot {
    width: 120px;
    height: 120px;
    object-fit: contain;
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.code-block {
    display: inline-block;
    background: var(--text);
    color: #a5f3fc;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
}

/* ── Error Page ── */
.error-section {
    padding: 80px 0;
}

.error-content {
    text-align: center;
}

.error-mascot {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 24px;
    animation: mascotFloat 3s ease-in-out infinite;
}

.error-content h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ── Footer ── */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-mascot-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: grayscale(0.3);
    opacity: 0.8;
}

.footer-brand {
    font-weight: 700;
    color: white;
    font-size: 1rem;
    margin-bottom: 4px;
}

.footer-disclaimer {
    font-size: 0.75rem;
    line-height: 1.5;
    margin-bottom: 4px;
    color: rgba(255,255,255,0.5);
}

.footer-copy {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

/* ── Race Confidence Badge ── */
.race-confidence-badge {
    margin-left: auto;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.race-conf-s { background: #fef2f2; color: #dc2626; }
.race-conf-a { background: #eff6ff; color: #2563eb; }
.race-conf-b { background: #f0fdf4; color: #16a34a; }
.race-conf-c { background: #fffbeb; color: #d97706; }
.race-conf-d { background: #f9fafb; color: #9ca3af; }

.top-pick-race-conf {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 4px;
}

/* ── Guide Page ── */
.guide-steps-section {
    padding: 60px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: all var(--transition);
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.step-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.guide-text-center {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.guide-race-conf-section {
    padding: 60px 0;
}

.race-conf-guide-grid {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.race-conf-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: var(--shadow);
}

.race-conf-badge {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.race-conf-badge.race-conf-s { background: #fef2f2; color: #dc2626; }
.race-conf-badge.race-conf-a { background: #eff6ff; color: #2563eb; }
.race-conf-badge.race-conf-b { background: #f0fdf4; color: #16a34a; }
.race-conf-badge.race-conf-c { background: #fffbeb; color: #d97706; }
.race-conf-badge.race-conf-d { background: #f9fafb; color: #9ca3af; }

.race-conf-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.race-conf-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* AI Features grid */
.ai-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ai-feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.ai-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.ai-feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.ai-feature-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.ai-feature-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mascot intro */
.guide-mascot-section {
    padding: 60px 0;
    background: var(--bg-warm);
}

.mascot-intro {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.mascot-intro-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    animation: mascotFloat 3s ease-in-out infinite;
}

.mascot-intro-text h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.mascot-intro-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ── Returns Panel (Home) ── */
.returns-section {
    padding: 60px 0;
    background: var(--bg-warm);
}

.returns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.return-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.return-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.return-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.return-card-value {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.return-card-value.positive { color: var(--conf-best); }
.return-card-value.negative { color: var(--text-muted); }
.return-card-value.breakeven { color: var(--conf-fair); }

.return-bar-track {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.return-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease;
}

.return-card-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.returns-section-compact {
    padding: 24px 0;
}

.return-card-sm {
    padding: 14px 10px;
}

.return-card-sm .return-card-value {
    font-size: 1.1rem;
}

.returns-meta {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Login Page ── */
.login-section {
    padding: 80px 0;
    display: flex;
    justify-content: center;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.login-mascot {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}

.login-card h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-google:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* ── Pricing Page ── */
/* ── Pricing Section (松竹梅 4カード) ── */
.pricing-section {
    padding: 60px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1060px;
    margin: 0 auto;
}

.pricing-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    border: 2px solid transparent;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: #27ae60;
    box-shadow: 0 8px 30px rgba(39, 174, 96, 0.2);
}

.popular-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 0 var(--radius-lg) 0 12px;
    z-index: 2;
}

.pricing-card-header {
    padding: 28px 20px 16px;
    text-align: center;
}

.tier-badge {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    width: 52px;
    height: 52px;
    line-height: 52px;
    border-radius: 50%;
    margin-bottom: 10px;
    text-align: center;
}

.pricing-card.featured .pricing-card-header {
    /* featured カードはヘッダ背景なし（tier-badge で色を出す） */
}

.pricing-plan-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.pricing-price {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
}

.pricing-price-period {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.6;
}

.pricing-features {
    padding: 16px 20px;
    list-style: none;
    flex-grow: 1;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.pricing-features li::before {
    content: none;
}

.feature-check {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.pricing-card-footer {
    padding: 0 20px 20px;
    margin-top: auto;
}

.btn-subscribe {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    color: white;
}

.btn-subscribe.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-subscribe.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

.btn-subscribe.btn-current {
    background: var(--border);
    color: var(--text-secondary);
    opacity: 0.7;
    cursor: default;
}

/* ── 松竹梅ティアカラー ── */
.tier-free .pricing-card-header { border-bottom: 3px solid #95a5a6; }
.tier-ume .pricing-card-header { border-bottom: 3px solid #e74c3c; }
.tier-take .pricing-card-header { border-bottom: 3px solid #27ae60; }
.tier-matsu .pricing-card-header { border-bottom: 3px solid #f39c12; }

/* ── プラン比較表 ── */
.plan-comparison {
    margin-top: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 700;
    font-size: 0.8rem;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.tier-col-ume { color: #e74c3c; }
.tier-col-take { color: #27ae60; }
.tier-col-matsu { color: #f39c12; }

.comparison-table tbody tr:hover {
    background: #fafafa;
}

@media (max-width: 900px) {
    .pricing-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .pricing-grid-4 {
        grid-template-columns: 1fr;
    }
    .comparison-table {
        font-size: 0.75rem;
    }
    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }
}

/* Nav auth */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-user-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   モバイルドロワーメニュー
   ══════════════════════════════════════════════════ */
.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.visible {
    display: block;
    opacity: 1;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--bg-card);
    z-index: 210;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.drawer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.drawer-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.drawer-close:hover {
    background: var(--border);
    color: var(--text);
}

/* ── ドロワー: プロフィール ── */
.drawer-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fef3c7 100%);
    flex-shrink: 0;
}

.drawer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.drawer-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.drawer-profile-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-profile-info .nav-tier-badge {
    align-self: flex-start;
}

/* ── ドロワー: ナビリンク ── */
.drawer-nav {
    flex: 1;
    padding: 12px 0;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.drawer-link:hover,
.drawer-link:active {
    background: var(--bg);
    color: var(--text);
}

.drawer-link.active {
    color: var(--primary);
    background: var(--primary-bg);
    font-weight: 700;
}

.drawer-link-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* ── ドロワー: フッター ── */
.drawer-footer {
    border-top: 1px solid var(--border-light);
    padding: 8px 0;
    flex-shrink: 0;
}

.drawer-link-logout {
    color: #dc2626;
}

.drawer-link-logout:hover,
.drawer-link-logout:active {
    background: #fef2f2;
    color: #b91c1c;
}

.drawer-link-login {
    color: var(--primary);
    font-weight: 600;
}

.drawer-link-login:hover,
.drawer-link-login:active {
    background: var(--primary-bg);
}

/* デスクトップではドロワーを非表示 */
@media (min-width: 769px) {
    .drawer,
    .drawer-backdrop,
    .nav-toggle {
        display: none !important;
    }
}

.nav-tier-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.nav-tier-badge.tier-free { background: #95a5a6; }
.nav-tier-badge.tier-ume { background: #e74c3c; }
.nav-tier-badge.tier-take { background: #27ae60; }
.nav-tier-badge.tier-matsu { background: #f39c12; }

/* Flash messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash-msg {
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    animation: flashIn 0.3s ease;
}

.flash-msg.error {
    border-left-color: var(--conf-best);
}

@keyframes flashIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════════════════
   ハンバーガーメニューボタン（モバイル用）
   ══════════════════════════════════════════════════ */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 110;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* ハンバーガー → ✕ アニメーション */
.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ══════════════════════════════════════════════════
   レスポンシブ — タブレット (max-width: 768px)
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── ハンバーガーメニュー表示 ── */
    .nav-toggle {
        display: flex;
    }

    /* デスクトップナビを非表示 */
    .site-nav-desktop {
        display: none;
    }

    /* ── ヘッダー ── */
    .site-header .container {
        height: 60px;
    }

    .logo-mascot {
        width: 40px;
        height: 40px;
    }

    .logo-title {
        font-size: 1.25rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    /* ── ヒーロー ── */
    .hero {
        padding: 40px 0 50px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-mascot {
        flex: 0 0 auto;
    }

    .hero-mascot-img {
        width: 150px;
        height: 150px;
    }

    .hero-badges {
        justify-content: center;
    }

    .mascot-speech {
        font-size: 0.8rem;
        padding: 10px 16px;
    }

    /* ── セクション間隔 ── */
    .dates-section,
    .guide-section,
    .returns-section,
    .pricing-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 24px;
    }

    /* ── 日付カード ── */
    .dates-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .date-card-header {
        padding: 16px 18px;
    }

    .date-day {
        font-size: 1rem;
    }

    .date-card-body {
        padding: 16px 18px;
    }

    /* ── 自信度ガイド ── */
    .confidence-guide {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .guide-card {
        padding: 16px 10px;
    }

    .guide-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .guide-card h4 {
        font-size: 0.8rem;
    }

    .guide-card p {
        font-size: 0.65rem;
    }

    /* ── 予測ページ ── */
    .predictions-header {
        padding: 24px 0;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-chip {
        padding: 8px 14px;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    /* ── 馬テーブル: 5カラムに簡略化 ── */
    .horse-table-header,
    .horse-row {
        grid-template-columns: 36px 36px 36px 1fr 56px;
        padding: 10px 12px;
        font-size: 0.78rem;
        gap: 4px;
    }

    .col-bar {
        display: none;
    }

    .horse-name {
        font-size: 0.78rem;
    }

    .horse-label {
        display: none;
    }

    .prob-value {
        font-size: 0.78rem;
    }

    .confidence-badge {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .horse-number-circle {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .rank-badge {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    /* ── レースカード ── */
    .race-card-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .race-number-badge {
        padding: 4px 12px;
        font-size: 0.8rem;
    }

    .race-card-title {
        font-size: 0.9rem;
    }

    .race-confidence-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
    }

    /* ── レースナビ ── */
    .race-nav-section {
        top: 60px;
        padding: 8px 0;
    }

    .race-nav-item {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* ── 買い目 ── */
    .race-card-bets {
        padding: 12px 14px 10px;
    }

    .bets-title {
        font-size: 0.85rem;
    }

    .bets-tab {
        padding: 7px 10px;
        font-size: 0.75rem;
    }

    /* ── トップピック ── */
    .top-pick-card {
        flex: 0 0 120px;
        padding: 12px;
    }

    /* ── ガイドページ ── */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ai-features-grid {
        grid-template-columns: 1fr;
    }

    .mascot-intro {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .mascot-intro-img {
        width: 120px;
        height: 120px;
    }

    /* ── 回収率 ── */
    .returns-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .return-card {
        padding: 14px 8px;
    }

    .return-card-value {
        font-size: 1.15rem;
    }

    .return-card-label {
        font-size: 0.6rem;
    }

    /* ── フッター ── */
    .site-footer {
        padding: 30px 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-mascot-img {
        width: 48px;
        height: 48px;
    }

    /* ── ログイン ── */
    .login-section {
        padding: 40px 0;
    }

    .login-card {
        padding: 36px 24px;
        margin: 0 16px;
    }
}

/* ==================================================
   おすすめ買い目セクション
   ================================================== */
.race-card-bets {
    border-top: 2px dashed #e9d5f5;
    padding: 16px 20px 12px;
    background: linear-gradient(135deg, #fdf6ff 0%, #f5f0ff 100%);
}

.bets-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #5a3e85;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bets-icon {
    font-size: 1.1rem;
}

.bets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bet-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e0d0f0;
    border-radius: 24px;
    padding: 6px 14px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bet-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(90, 62, 133, 0.15);
    border-color: #b89edb;
}

.bet-ticket-name {
    font-weight: 700;
    color: #fff;
    background: #8b6bba;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.bet-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* 券種別カラー */
.bet-chip-単勝 .bet-ticket-name { background: #e74c3c; }
.bet-chip-複勝 .bet-ticket-name { background: #e67e22; }
.bet-chip-馬連 .bet-ticket-name { background: #2ecc71; }
.bet-chip-ワイド .bet-ticket-name { background: #27ae60; }
.bet-chip-馬単 .bet-ticket-name { background: #3498db; }
.bet-chip-3連複 .bet-ticket-name,
.bet-chip-3renren複 .bet-ticket-name { background: #9b59b6; }
.bet-chip-3連単 .bet-ticket-name,
.bet-chip-3renren単 .bet-ticket-name { background: #e91e63; }

/* ── おすすめ買い目タブUI ── */
.bets-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: #f3f0f7;
    border-radius: 10px;
    padding: 3px;
}

.bets-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #7c6fa0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bets-tab:hover {
    color: #5a3e85;
    background: rgba(255, 255, 255, 0.5);
}

.bets-tab.active {
    background: #fff;
    color: #5a3e85;
    box-shadow: 0 1px 4px rgba(90, 62, 133, 0.15);
}

.tab-icon {
    font-size: 0.95rem;
}

.tier-lock {
    font-size: 0.75rem;
    opacity: 0.7;
}

.bets-panel {
    min-height: 40px;
}

/* ── ロック表示（ティア不足時） ── */
.bets-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #faf7ff 0%, #f0ebf7 100%);
    border-radius: var(--radius);
    text-align: center;
}

.bets-locked p {
    font-size: 0.85rem;
    color: #7c6fa0;
    margin: 0;
}

.btn-upgrade {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, #8b6bba, #a78bda);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-upgrade:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}


/* ══════════════════════════════════════════════════
   レスポンシブ — スマートフォン (max-width: 480px)
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    /* ── ヘッダー ── */
    .site-header .container {
        height: 56px;
    }

    .logo-mascot {
        width: 34px;
        height: 34px;
    }

    .logo-title {
        font-size: 1.1rem;
    }

    .logo-subtitle {
        display: none;
    }

    /* ── ヒーロー ── */
    .hero {
        padding: 28px 0 36px;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-description {
        font-size: 0.82rem;
    }

    .hero-description br {
        display: none;
    }

    .hero-mascot-img {
        width: 120px;
        height: 120px;
    }

    .badge {
        padding: 4px 12px;
        font-size: 0.68rem;
    }

    /* ── セクション ── */
    .dates-section,
    .guide-section,
    .returns-section,
    .pricing-section {
        padding: 32px 0;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    /* ── 自信度ガイド: 2列→スクロール ── */
    .confidence-guide {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .guide-card {
        padding: 14px 8px;
    }

    .guide-badge {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .guide-card h4 {
        font-size: 0.75rem;
    }

    .guide-card p {
        font-size: 0.6rem;
        line-height: 1.4;
    }

    /* ── 会場グリッド ── */
    .places-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .place-card {
        padding: 20px 14px;
    }

    .place-card-name {
        font-size: 1rem;
    }

    /* ── 馬テーブル: 超コンパクト ── */
    .horse-table-header,
    .horse-row {
        grid-template-columns: 28px 28px 28px 1fr 48px;
        padding: 8px 8px;
        font-size: 0.72rem;
        gap: 3px;
    }

    .horse-name {
        font-size: 0.72rem;
    }

    .prob-value {
        font-size: 0.72rem;
    }

    .confidence-badge {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .horse-number-circle {
        width: 22px;
        height: 22px;
        font-size: 0.68rem;
        border-width: 1.5px;
    }

    .rank-badge {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }

    /* ── レースカード ── */
    .race-card {
        border-radius: var(--radius);
    }

    .race-card-header {
        padding: 10px 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .race-number-badge {
        padding: 3px 10px;
        font-size: 0.75rem;
    }

    .race-card-title {
        font-size: 0.82rem;
    }

    /* ── レースナビ ── */
    .race-nav-section {
        top: 56px;
    }

    .race-nav-item {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* ── 買い目 ── */
    .race-card-bets {
        padding: 10px 10px 8px;
    }

    .bets-grid {
        gap: 6px;
    }

    .bet-chip {
        padding: 4px 10px;
        font-size: 0.78rem;
        gap: 6px;
    }

    .bet-ticket-name {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .bet-value {
        font-size: 0.8rem;
    }

    .bets-tab {
        padding: 6px 8px;
        font-size: 0.7rem;
    }

    /* ── 回収率 ── */
    .returns-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .return-card {
        padding: 10px 6px;
    }

    .return-card-value {
        font-size: 1rem;
    }

    .return-card-label {
        font-size: 0.55rem;
    }

    /* ── ログイン ── */
    .login-card {
        padding: 28px 18px;
        margin: 0 10px;
    }

    .login-mascot {
        width: 80px;
        height: 80px;
    }

    .login-card h2 {
        font-size: 1.2rem;
    }

    .btn-google {
        font-size: 0.85rem;
        padding: 12px 18px;
    }

    /* ── フッター ── */
    .site-footer {
        padding: 24px 0;
    }

    .footer-brand {
        font-size: 0.9rem;
    }

    .footer-disclaimer {
        font-size: 0.65rem;
    }

    /* ── 予測ヘッダー ── */
    .page-title {
        font-size: 1.2rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
    }

    .stat-chip {
        padding: 6px 10px;
    }

    .stat-number {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    /* ── トップピック ── */
    .top-pick-card {
        flex: 0 0 110px;
        padding: 10px 8px;
    }

    .top-pick-name {
        font-size: 0.72rem;
    }

    .top-pick-prob {
        font-size: 0.85rem;
    }

    /* ── ブレッドクラム ── */
    .breadcrumb {
        font-size: 0.7rem;
        gap: 4px;
        flex-wrap: wrap;
    }
}
