/* ================================================
   グローバル設定
================================================ */
:root {
    /* カラーパレット */
    --primary-color: #D4AF37; /* ゴールド */
    --secondary-color: #2c3e50; /* ダークグレー */
    --dark-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-color: rgba(212, 175, 55, 0.3);
    
    /* タイポグラフィ */
    --font-primary: 'Noto Sans JP', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    
    /* スペーシング */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* ボーダー */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    /* シャドウ */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* ================================================
   リセット & ベース
================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ================================================
   コンテナ
================================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-sm);
    min-height: 100vh;
}

/* ================================================
   画面切り替え
================================================ */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* ================================================
   Intro画面
================================================ */
.intro-content {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.logo {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 900;
    display: none;
}



.main-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary-color), #f4d47c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: var(--spacing-md);
    background: #ffffff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    min-width: 120px;
    box-shadow: var(--shadow-sm);
}

.badge span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cta-button {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), #f4d47c);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.5);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(5px);
}

.disclaimer {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(212, 175, 55, 0.08);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    display: block;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}



/* ================================================
   プログレスバー
================================================ */
.progress-container {
    margin-bottom: var(--spacing-xl);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #f4d47c);
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-gold);
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-color);
}

/* ================================================
   フォームステップ
================================================ */
.form-step {
    display: none;
    animation: slideIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

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

/* ================================================
   カード
================================================ */
.card {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.step-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.step-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 0.95rem;
}

/* ================================================
   フォーム要素
================================================ */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    color: var(--text-primary);
}

.form-sublabel {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 600;
    pointer-events: none;
}

.input-wrapper .form-input {
    padding-right: 4rem;
}

/* ラジオボタン */
.radio-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.radio-option:hover {
    background: #ffffff;
    border-color: var(--primary-color);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
    border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked ~ .radio-label {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label {
    font-size: 0.95rem;
}

/* ツールチップ */
.tooltip {
    position: relative;
    display: inline-flex;
    cursor: help;
    color: var(--primary-color);
    font-weight: 700;
    margin-left: 4px;
    font-size: 0.85rem;
}



.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: #ffffff;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    width: 250px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
}

/* 情報ボックス */
.info-box {
    display: flex;
    align-items: center;
    gap: 0;
    padding: var(--spacing-md);
    background: rgba(212, 175, 55, 0.08);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
}



.info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

/* ボタン */
.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    flex-direction: row-reverse; /* PCサイズ時：戻るを左、次へを右に */
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-family: var(--font-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #f4d47c);
    color: #ffffff;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-primary);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #ffffff;
    border-color: var(--primary-color);
}

/* ================================================
   結果画面
================================================ */
.result-content {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.result-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    display: none;
}



.result-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-md);
}

.result-title.success {
    color: var(--success-color);
}

.result-title.warning {
    color: var(--text-primary);
}

.result-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.tax-amount {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(212, 175, 55, 0.08);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-gold);
    font-family: var(--font-secondary);
}

.tax-amount span {
    display: block;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.2;
}

.result-details {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

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

.detail-item.highlight {
    background: rgba(212, 175, 55, 0.08);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-color);
}

.detail-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

.advice-section {
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    text-align: left;
}

.advice-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background: #ffffff;
    border-left: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
}

.advice-item:last-child {
    margin-bottom: 0;
}

.advice-item strong {
    color: var(--primary-color);
}

.cta-section {
    margin-bottom: var(--spacing-lg);
}

/* ================================================
   レスポンシブ
================================================ */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .card {
        padding: var(--spacing-lg);
    }

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

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .progress-steps {
        gap: var(--spacing-xs);
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .tooltip-text {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .trust-badges {
        gap: var(--spacing-sm);
    }

    .badge {
        min-width: 100px;
        padding: var(--spacing-sm);
    }

    .badge i {
        font-size: 1.5rem;
    }
}
