/* ===== CSS RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', 'Arial', 'Noto Sans JP', sans-serif;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: #2ECC71;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #27AE60;
    text-decoration: underline;
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.page-header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.last-updated {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ===== HEADER ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-transparent {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

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

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-size: 1.5rem;
    color: #2ECC71;
    font-weight: 700;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2ECC71;
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.language-switcher select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 10px;
    background: white;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    /* 視認性向上: より濃い背景色とボックスシャドウで強調 */
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    border: 2px solid #047857;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.5);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    /* 視認性向上: より濃いゴールドグラデーション */
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    border: 2px solid #B8860B;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.5);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: white;
    color: #047857;
    border: 2px solid #059669;
    font-weight: 600;
}

.btn-outline:hover {
    background: #059669;
    color: white;
    text-decoration: none;
    border-color: #047857;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-xl {
    padding: 20px 40px;
    font-size: 1.2rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/golf-bg.jpg') center/cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 204, 113, 0.8);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    /* 視認性向上: 強力なテキストシャドウでコントラスト確保 */
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.5),
        4px 4px 8px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 0, 0, 0.2);
}

.hero-title .highlight {
    color: #F1C40F;
    text-shadow:
        2px 2px 6px rgba(0, 0, 0, 0.6),
        4px 4px 12px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 1.0;
    line-height: 1.6;
    /* 視認性向上: サブタイトルにもテキストシャドウ */
    text-shadow:
        1px 1px 3px rgba(0, 0, 0, 0.5),
        2px 2px 6px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #F1C40F;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== FORM STYLES ===== */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.progress-bar {
    width: 100%;
    /* 視認性向上: プログレスバーを太く */
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    /* 視認性向上: より鮮やかな緑のグラデーションとシャドウ */
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.5);
}

.step-indicator {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
    /* 視認性向上: ダークグレーで読みやすく */
    color: #1f2937;
    font-weight: 600;
}

.current-step {
    /* 視認性向上: より濃い緑色 */
    color: #059669;
    font-weight: 700;
    font-size: 1.3rem;
}

.question-group {
    margin-bottom: 30px;
}

.question-group h3 {
    color: #2C3E50;
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2ECC71;
}

.question {
    margin-bottom: 20px;
}

.question label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2C3E50;
}

.question input,
.question select,
.question textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #BDC3C7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.question input:focus,
.question select:focus,
.question textarea:focus {
    outline: none;
    border-color: #2ECC71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-group input,
.checkbox-group input {
    width: auto;
    margin-right: 8px;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Gradient Backgrounds */
.bg-gradient-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.text-gradient-gold {
    background: linear-gradient(to right, #cfc09f 0%, #ffecb3 20%, #d4af37 40%, #c5a028 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-premium {
    /* P50: Aurelius仕様に更新 */
    background: linear-gradient(135deg, #D4AF37 0%, #A67C00 100%);
    color: #1A3D2B;
    font-family: var(--font-en);
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    /* Full rounded */
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4), 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #D4AF37;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    letter-spacing: 0.025em;
}

.btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), 0 12px 40px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #F0D060 0%, #D4AF37 100%);
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-gold {
    /* P50: Aureliusゴールドカラーに更新 */
    background: linear-gradient(135deg, #D4AF37, #A67C00);
    color: #1A3D2B;
    font-family: var(--font-en);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4), 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    border: 2px solid #D4AF37;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #F0D060, #D4AF37);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px) scale(1.02);
}

/* Cards */
.card-premium {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.5s ease;
}

.card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15);
    border-color: var(--accent-color);
}

/* Quiz Options */
.quiz-option {
    background: white;
    /* 視認性向上: より濃い境界線 */
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:hover {
    /* 視認性向上: より濃い緑色でhover時を強調 */
    border-color: #059669;
    background-color: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.quiz-option.selected {
    /* 視認性向上: 選択状態をより明確に */
    border: 2px solid #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}

.quiz-option.selected::before {
    content: '\f00c';
    /* FontAwesome Check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    /* 視認性向上: より濃い緑色 */
    color: #059669;
    font-size: 1.2rem;
}

/* Form Elements */
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    outline: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

input[type="number"]:focus,
select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    border-radius: 50%;
}

.feature-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.feature-card h3 {
    font-size: 1.4rem;
    color: #2C3E50;
    margin-bottom: 15px;
}

.feature-card p {
    color: #7F8C8D;
    line-height: 1.6;
}

/* ===== PROCESS SECTION ===== */
.process-section {
    padding: 80px 0;
    background: white;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -20px;
    width: 40px;
    height: 2px;
    background: #2ECC71;
    z-index: 1;
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
}

.step-content h3 {
    font-size: 1.3rem;
    color: #2C3E50;
    margin-bottom: 10px;
}

.step-content p {
    color: #7F8C8D;
    line-height: 1.6;
}

/* ===== CLUBS PREVIEW SECTION ===== */
.clubs-preview-section {
    background: #F8F9FA;
    padding: 80px 0;
}

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.club-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.club-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.club-card h3 {
    font-size: 1.3rem;
    color: #2C3E50;
    margin: 20px 20px 10px;
}

.club-card p {
    color: #7F8C8D;
    margin: 0 20px 15px;
    line-height: 1.6;
}

.club-card ul {
    list-style: none;
    margin: 0 20px 20px;
}

.club-card li {
    color: #2ECC71;
    margin-bottom: 5px;
    position: relative;
    padding-left: 20px;
}

.club-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2ECC71;
    font-weight: bold;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content>p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-icon {
    color: #2ECC71;
    font-size: 1.2rem;
    font-weight: bold;
}

.cta-note {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 20px;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 80px 0;
    background: white;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #ECF0F1;
    margin-bottom: 20px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #2ECC71;
}

.faq-question h3 {
    font-size: 1.1rem;
    margin: 0;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2ECC71;
}

.faq-answer {
    display: none;
    padding: 0 0 20px 0;
    color: #7F8C8D;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
    background: #2C3E50;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #2ECC71;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #BDC3C7;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2ECC71;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #BDC3C7;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2ECC71;
}

.footer-copy {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495E;
    color: #95A5A6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #BDC3C7;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #2ECC71;
}

/* ===== LOADING OVERLAY (Diagnosis) ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
    /* 暗さ/不安感を避け、背景を薄く */
    background: rgba(248, 250, 252, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    /* フェード制御 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

.loading-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.loading-card {
    width: min(520px, 100%);
    border-radius: 18px;
    padding: 24px 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(5, 150, 105, 0.18);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.loading-title {
    margin-top: 14px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #064e3b;
    letter-spacing: 0.02em;
}

.loading-message {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #334155;
    min-height: 2.6em; /* 文言が変わってもレイアウトがガタつかない */
}

.loading-progress {
    margin-top: 16px;
}

.loading-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 9999px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 9999px;
    background: linear-gradient(90deg, #059669 0%, #10b981 60%, #34d399 100%);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15), 0 8px 18px rgba(5, 150, 105, 0.22);
    transition: width 140ms ease;
    position: relative;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: translateX(-100%);
    animation: loadingShimmer 1.4s ease-in-out infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%); }
    60% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.loading-progress-text {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 700;
}

/* Golf-ball motif spinner */
.golf-ball-spinner {
    position: relative;
    width: 72px;
    height: 88px; /* 下に影を置く分だけ余白 */
    margin: 0 auto;
    animation: golfBallBounce 1.05s ease-in-out infinite;
}

.golf-ball-spinner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background-image:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 40%, rgba(226, 232, 240, 0.95) 75%, rgba(203, 213, 225, 0.95) 100%),
        radial-gradient(circle, rgba(15, 23, 42, 0.10) 1px, transparent 1px);
    background-size: auto, 12px 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12), inset 0 2px 6px rgba(255, 255, 255, 0.9);
    animation: golfBallRoll 1.15s linear infinite;
}

.golf-ball-spinner::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    width: 58px;
    height: 12px;
    background: rgba(15, 23, 42, 0.14);
    filter: blur(6px);
    border-radius: 9999px;
    animation: golfBallShadow 1.05s ease-in-out infinite;
}

@keyframes golfBallRoll {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes golfBallShadow {
    0%, 100% { width: 58px; opacity: 0.18; }
    50% { width: 44px; opacity: 0.10; }
}

/* Legacy spinner (kept for other pages/components) */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ECF0F1;
    border-top: 5px solid #2ECC71;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== LEGAL DOCUMENTS ===== */
.legal-document {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

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

.legal-section h2 {
    color: #2C3E50;
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2ECC71;
}

.legal-section h3 {
    color: #34495E;
    font-size: 1.3rem;
    margin: 25px 0 15px;
}

.legal-section h4 {
    color: #34495E;
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.article {
    margin-bottom: 25px;
    padding: 20px;
    background: #F8F9FA;
    border-left: 4px solid #2ECC71;
    border-radius: 0 8px 8px 0;
}

.legal-section ol,
.legal-section ul {
    margin: 15px 0 15px 30px;
}

.legal-section li {
    margin-bottom: 8px;
}

.contact-info {
    background: #E8F5E8;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.important-note {
    background: #FFF3CD;
    border: 1px solid #FFEAA7;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.warning-box {
    background: #F8D7DA;
    border: 1px solid #F5C6CB;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* ===== CONTACT FORM ===== */
.contact-form-section {
    padding: 40px 0;
}

.pre-contact-section {
    background: #F8F9FA;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.faq-quick {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.faq-item-quick ul {
    list-style: none;
}

.faq-item-quick li {
    padding: 8px 0;
    border-bottom: 1px solid #ECF0F1;
}

.response-time {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form {
    background: white;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2C3E50;
}

.required::after {
    content: ' *';
    color: #E74C3C;
}

.field-note {
    font-size: 0.9rem;
    color: #7F8C8D;
    margin-top: 5px;
}

.char-count {
    text-align: right;
    font-size: 0.9rem;
    color: #7F8C8D;
    margin-top: 5px;
}

.error-message {
    color: #E74C3C;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.success-message {
    background: #D4EDDA;
    border: 1px solid #C3E6CB;
    color: #155724;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.success-content h3 {
    color: #155724;
    margin-bottom: 15px;
}

.success-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ===== GUIDE STYLES ===== */
.guide-section {
    margin-bottom: 50px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.guide-section h2 {
    color: #2C3E50;
    font-size: 2rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2ECC71;
}

.guide-content h3 {
    color: #34495E;
    font-size: 1.4rem;
    margin: 25px 0 15px;
}

.info-checklist {
    margin: 20px 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
}

.checklist-item .check-icon {
    color: #2ECC71;
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 3px;
}

.tip-box {
    background: #E8F5E8;
    border-left: 4px solid #2ECC71;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.process-flow {
    margin: 30px 0;
}

.step-detailed {
    display: flex;
    margin-bottom: 30px;
    padding: 25px;
    background: #F8F9FA;
    border-radius: 12px;
}

.step-detailed .step-number {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 25px;
    flex-shrink: 0;
}

.step-detailed .step-content {
    flex: 1;
}

.step-detailed h3 {
    color: #2C3E50;
    margin-bottom: 10px;
}

.swing-guide {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

/* ===== SPEC STYLES ===== */
.spec-section {
    margin-bottom: 50px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.spec-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.version,
.updated {
    background: #2ECC71;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.key-features,
.system-metrics {
    margin: 30px 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.metric-item {
    text-align: center;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
}

.metric-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2ECC71;
    margin-bottom: 5px;
}

.metric-label {
    color: #7F8C8D;
    font-size: 1rem;
}

.table-of-contents {
    background: #F8F9FA;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.table-of-contents ol {
    columns: 2;
    column-gap: 40px;
    margin-top: 20px;
}

.table-of-contents li {
    margin-bottom: 10px;
    break-inside: avoid;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-0 {
    margin-top: 0;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ===== LANDING PAGE SPECIFIC ===== */
.landing-page .header {
    position: absolute;
    width: 100%;
    background: transparent;
    box-shadow: none;
}

.landing-page .header-content {
    padding: 20px 0;
}

.landing-page .logo span {
    color: white;
}

.landing-page .nav a {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495E;
    margin-top: 20px;
    color: #95A5A6;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for accessibility */
.btn:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 3px solid #2ECC71;
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== AFFILIATE BUTTONS ===== */
.affiliate-btn {
    text-decoration: none;
    color: white !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.affiliate-btn:hover {
    color: white !important;
    text-decoration: none;
}

/* Amazon Design */
.amazon-btn {
    background: linear-gradient(to bottom, #f0c14b, #f79c34);
    border: 1px solid #a88734;
    color: #111 !important;
    /* Amazon uses black text on yellow/orange buttons often, but keeping white for now as per user request overrides or standardizing */
}

/* Override for better readability if needed, or stick to the requested style */
.amazon-btn {
    background: linear-gradient(to bottom, #FF9900, #FFAD33);
    /* Slightly brighter orange/yellow */
    color: white !important;
    border: none;
}

.amazon-btn:hover {
    background: linear-gradient(to bottom, #FFAD33, #FF9900);
}

/* Rakuten Design */
.rakuten-btn {
    background: linear-gradient(to bottom, #bf0000, #b30000);
    color: white !important;
    border: none;
}

.rakuten-btn:hover {
    background: linear-gradient(to bottom, #ff3333, #bf0000);
}

/* Pulse Animation */
@keyframes pulse-attention {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.affiliate-container:hover .affiliate-btn {
    animation: pulse-attention 1s infinite;
    animation-play-state: paused;
    /* Pause by default, play on hover specific button or container? */
}

/* Actually, the request was: container hover -> button animation. */
.affiliate-container:hover .affiliate-btn {
    animation: pulse-attention 2s infinite;
}

/* Stop animation on button hover to allow click */
.affiliate-btn:hover {
    animation: none !important;
    transform: translateY(-2px) !important;
}

/* ===== COMPARISON FEATURE STYLES ===== */
.comparison-checkbox-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.comparison-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comparison-checkbox:checked {
    background: #059669;
    border-color: #059669;
}

.comparison-checkbox:checked::after {
    content: '✓';
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.comparison-checkbox:hover {
    border-color: #059669;
}

/* Tooltip for checkbox */
.comparison-checkbox-wrapper:hover::after {
    content: '比較する';
    position: absolute;
    left: 30px;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
}

/* Ensure club card has relative positioning for absolute checkbox */
.club-card {
    position: relative;
}

/* ===== HERO CTA OPTIMIZATION ===== */
/* ヒーローセクションのCTAボタン最適化 */
.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
}

/* プライマリCTA: より目立つスタイル */
#startDiagnosisBtn {
    position: relative;
    overflow: visible;
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 255, 255, 0.4), 0 8px 30px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 25px rgba(255, 255, 255, 0.5), 0 10px 35px rgba(0, 0, 0, 0.2);
    }
}

/* セカンダリCTA: 控えめなスタイル */
#viewHistoryBtn {
    cursor: pointer;
    transition: all 0.3s ease;
}

#viewHistoryBtn:hover {
    opacity: 1 !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

#viewHistoryBtn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ===== TOOLTIP STYLES ===== */
.help-icon {
    transition: all 0.3s ease;
}

.help-icon:hover {
    transform: scale(1.15);
    color: #047857 !important;
}

.tooltip-popup {
    position: absolute;
    z-index: 9999;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(8px);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 320px;
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.tooltip-popup.tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-popup.tooltip-below {
    transform: translateY(5px);
}

.tooltip-popup.tooltip-below.tooltip-visible {
    transform: translateY(0);
}

.tooltip-content {
    position: relative;
}

.tooltip-content p {
    margin: 0;
    white-space: pre-line;
}

/* Arrow for tooltip */
.tooltip-popup::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-bottom-color: rgba(31, 41, 55, 0.95);
}

.tooltip-popup.tooltip-below::before {
    bottom: auto;
    top: 100%;
    border-bottom-color: transparent;
    border-top-color: rgba(31, 41, 55, 0.95);
}

/* Quiz option unknown style */
.quiz-option-unknown {
    border-style: dashed;
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.quiz-option-unknown:hover {
    border-color: #6b7280;
    background-color: #f3f4f6;
}

.quiz-option-unknown.selected {
    border-style: solid;
    border-color: #6b7280;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .tooltip-popup {
        max-width: calc(100vw - 40px);
        font-size: 0.85rem;
        padding: 14px 16px;
    }
    
    .help-icon {
        font-size: 1.25rem !important;
    }
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Field error styles */
.field-error {
    animation: shake 0.5s ease-in-out;
}

/* ===== RESULT DISPLAY 3-STAGE LAYOUT STYLES ===== */

/* Best Match Card */
.best-match-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Comparison Table Cards */
.comparison-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Detailed Card */
.detailed-card {
    transition: all 0.3s ease;
}

/* Accordion Animations */
.accordion-item {
    animation: slideInFromLeft 0.5s ease-out;
}

.accordion-header {
    user-select: none;
}

.accordion-content {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Result Summary Section */
.result-summary {
    animation: fadeIn 0.6s ease-out;
}

/* Comparison Table Container */
.comparison-table-container {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Details Section */
.details-section {
    animation: fadeIn 1s ease-out 0.4s both;
}

/* User Input Section */
.user-input-section {
    animation: fadeIn 1s ease-out 0.6s both;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In From Left Animation */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Performance Bar Fill Animation */
@keyframes fillBar {
    from {
        width: 0;
    }
    to {
        width: var(--bar-width);
    }
}

/* Amazon Button Styles */
.amazon-btn {
    background: linear-gradient(135deg, #FF9900 0%, #FF7700 100%);
    transition: all 0.3s ease;
}

.amazon-btn:hover {
    background: linear-gradient(135deg, #FF7700 0%, #FF5500 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 153, 0, 0.4);
}

/* Rakuten Button Styles */
.rakuten-btn {
    background: linear-gradient(135deg, #BF0000 0%, #990000 100%);
    transition: all 0.3s ease;
}

.rakuten-btn:hover {
    background: linear-gradient(135deg, #990000 0%, #770000 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(191, 0, 0, 0.4);
}

/* Scale on Hover */
.transform {
    transition: transform 0.3s ease;
}

.hover\:scale-102:hover {
    transform: scale(1.02);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .best-match-card {
        border-width: 2px;
    }
    
    .comparison-table-container .grid {
        gap: 16px;
    }
    
    .accordion-item {
        margin-bottom: 12px;
    }
}

/* Loading State */
.skeleton-card {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
/* ====== P20: 印刷スタイル ====== */
@media print {
    header, footer, nav, #gia-favorites-section, #history,
    .no-print, #shareResultsBtn, #saveResultsBtn, #copyResultsTextBtn,
    #gia-miss-drills, #gia-shaft-guide, #gia-distance-table,
    #gia-checklist, .affiliate-banner, .btn-gold, .btn-premium,
    #progressBar, #gia-topclub-cta, #gia-iron-set + *, .mobile-only {
        display: none !important;
    }
    body { background: #fff !important; color: #000 !important; font-size: 12pt; }
    #results { display: block !important; }
    .card-premium, .detailed-card { border: 1px solid #ccc; box-shadow: none !important; }
    #gia-iron-set, #gia-score-breakdown, #resultsContainer { display: block !important; }
    a[href]::after { content: none !important; }
    .comparison-table { page-break-inside: avoid; }
}
