/* ==========================================================================
   書けた年末調整 - はじめてのスタートガイド（LP風オンボーディングモーダル）
   ========================================================================== */

.start-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.start-guide-overlay.active {
    opacity: 1;
    visibility: visible;
}

.start-guide-modal {
    background: #FFFFFF;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    animation: guideModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.start-guide-overlay.active .start-guide-modal {
    transform: scale(1) translateY(0);
}

@keyframes guideModalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(15px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* モーダルヘッダー */
.start-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-bottom: 1px solid #FDE68A;
}

.start-guide-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 0;
}

.start-guide-logo-badge {
    background: #F59E0B;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.start-guide-header-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #92400E;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.start-guide-skip-btn {
    background: transparent;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: #92400E;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.start-guide-skip-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #78350F;
}

/* スライドカルーセル */
.start-guide-body {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.start-guide-body::-webkit-scrollbar {
    display: none;
}

.start-guide-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: 500%;
}

.start-guide-slide {
    width: 20%;
    padding: 24px 22px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* スライド画像・ビジュアル枠 */
.guide-visual-wrap {
    width: 100%;
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
}

.guide-visual-bg {
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(254, 243, 199, 0.9) 0%, rgba(254, 243, 199, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.guide-img {
    max-height: 155px;
    max-width: 90%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.12));
    animation: guideFloat 3s ease-in-out infinite alternate;
}

@keyframes guideFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

/* ステップバッジ */
.guide-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.guide-step-badge.step-5 {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

/* 見出しと説明文 */
.guide-heading {
    font-size: 1.15rem;
    font-weight: 900;
    color: #1E293B;
    line-height: 1.45;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    text-align: center;
}

.guide-heading span.highlight {
    color: #D97706;
    background: linear-gradient(transparent 70%, #FEF3C7 70%);
    display: inline-block;
}

.guide-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}

/* ガイド内ミニリスト・特徴ボックス */
.guide-feature-box {
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    text-align: left;
}

.guide-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #334155;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

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

.guide-feature-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #E0F2FE;
    color: #0284C7;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.start-guide-slide[data-slide-index="4"] .guide-feature-icon {
    background: #D1FAE5;
    color: #059669;
}

.guide-tip-row {
    font-size: 0.76rem;
    color: #D97706;
    font-weight: 700;
    display: block;
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.45;
}

.guide-tip-label {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 900;
    background: #F59E0B;
    color: #FFFFFF;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* モーダルフッター（操作ボタンとインジケーター） */
.start-guide-footer {
    padding: 14px 20px 18px;
    background: #FFFFFF;
    border-top: 1px solid #F1F5F9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.guide-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.guide-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #CBD5E1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.guide-dot.active {
    width: 24px;
    background: #F59E0B;
}

.guide-btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.guide-btn-prev {
    background: #F1F5F9;
    color: #475569;
    border: none;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.guide-btn-prev:hover {
    background: #E2E8F0;
}

.guide-btn-next {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
    border: none;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

.guide-btn-start {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.guide-btn-start:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

/* 次回から表示しないチェック */
.guide-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748B;
    padding-top: 4px;
}

.guide-dont-show-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.guide-dont-show-label input {
    cursor: pointer;
    accent-color: #F59E0B;
}

/* スマホ最適化 */
@media (max-width: 480px) {
    .start-guide-modal {
        max-height: 92vh;
        border-radius: 20px;
    }
    .start-guide-header {
        padding: 10px 14px;
        gap: 8px;
    }
    .start-guide-title-wrap {
        gap: 6px;
    }
    .start-guide-logo-badge {
        font-size: 0.7rem;
        padding: 2px 7px;
    }
    .start-guide-header-title {
        font-size: 0.92rem;
    }
    .start-guide-skip-btn {
        font-size: 0.78rem;
        padding: 4px 6px;
    }
    .start-guide-slide {
        padding: 10px 14px 6px;
    }
    .guide-visual-wrap {
        height: 95px;
        margin-bottom: 4px;
    }
    .guide-img {
        max-height: 90px;
    }
    .guide-heading {
        font-size: 0.98rem;
        line-height: 1.35;
        margin-bottom: 4px;
    }
    .guide-desc {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    .guide-feature-box {
        padding: 6px 10px;
        margin-bottom: 4px;
        border-radius: 10px;
    }
    .guide-feature-item {
        font-size: 0.74rem;
        margin-bottom: 3px;
        line-height: 1.35;
    }
    .guide-tip-row {
        font-size: 0.66rem;
        display: block;
        text-align: center;
        margin-top: 3px;
        margin-bottom: 4px;
        line-height: 1.4;
    }
    .start-guide-footer {
        padding: 10px 16px 14px;
        gap: 8px;
    }
    .guide-btn-next {
        white-space: nowrap;
    }
    .guide-btn-start {
        white-space: nowrap;
        font-size: 0.84rem;
        padding: 10px 14px;
    }
    .guide-btn-prev {
        white-space: nowrap;
        padding: 10px 12px;
    }
}
