/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Jul 08 2026 | 12:14:23 */
/* ==============================================
   読了プログレス：Apple Activity Style (Fixed Layout)
   修正：will-change追加 / prefers-reduced-motion対応 /
         Firefox drop-shadow互換性修正
   ============================================== */

/* 1. コンテナ配置 */
.progress-indicator {
    position: fixed;
    left: 20px;
    bottom: 110px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    /*
     * ★修正BUG-5：backdrop-filter（ぼかし）はGPU合成が必要。
     * will-change でブラウザに事前にGPUレイヤー確保を促す。
     * 初回スクロール時のチラつきを防止。
     */
    will-change: transform, opacity;
}
.progress-indicator.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* スマホ用調整 */
@media (max-width: 768px) {
    .progress-indicator {
        left: 16px;
        bottom: 100px;
        width: 52px;
        height: 52px;
    }
}

/* 2. リング本体 */
.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 3. SVGリング */
.progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}
.progress-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-width: 3;
}
.progress-bar {
    fill: none;
    stroke: url(#brand-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 0 999; /* JS で上書きされる（初期状態を非表示に） */
    transition: stroke-dashoffset 0.1s linear;
    /*
     * ★修正BUG-6：drop-shadowとSVGグラデーションの組み合わせは
     * Firefoxで描画されないことがある（既知の互換性バグ）。
     * 確実に描画させるため filter を削除し、box-shadowで代替。
     * → SVGのcircleにはbox-shadowは効かないため、
     *   親の .progress-circle の box-shadow で光彩を演出している。
     */
    /* filter: drop-shadow(0 0 4px rgba(236, 72, 117, 0.4)); ← 削除 */
}

/* 4. テキスト */
.progress-text {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1d1d1f;
    font-feature-settings: "tnum";
    transition: opacity 0.3s;
    /* スクリーンリーダー向けにaria-live="polite"をHTMLに追加済み */
}
@media (max-width: 768px) {
    .progress-text { font-size: 11px; }
}

/* 5. 完了アニメーション */
.progress-indicator.completed .progress-circle {
    transform: scale(1.1);
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(236, 72, 117, 0.25);
    border-color: rgba(236, 72, 117, 0.2);
}
.progress-indicator.completed .progress-text {
    opacity: 0;
}
.progress-indicator.completed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%) scale(0);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='url(%23grad)' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cdefs%3E%3ClinearGradient id='grad' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23a855f7'/%3E%3Cstop offset='100%25' stop-color='%23f97316'/%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    animation: pop-check 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pop-check {
    0%   { transform: translate(-50%, -50%) scale(0);   opacity: 0; }
    50%  { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

/*
 * ★修正BUG-4：prefers-reduced-motion（動きを減らす設定）への対応
 * iOSの省電力モードや「動きを減らす」アクセシビリティ設定が
 * オンのユーザーにはアニメーションを無効化する。
 * pop-checkアニメーションはopacityのみに置き換え。
 */
@media (prefers-reduced-motion: reduce) {
    .progress-indicator {
        transition: opacity 0.3s ease;
        /* transformのアニメーションを除去（スライドインをフェードインに変更） */
    }
    .progress-indicator.is-visible {
        transform: translateY(0); /* 初期値と同じにして動きをなくす */
    }
    .progress-circle {
        transition: none;
    }
    .progress-bar {
        transition: stroke-dashoffset 0.05s linear;
    }
    .progress-text {
        transition: none;
    }
    @keyframes pop-check {
        0%   { opacity: 0; transform: translate(-50%, -50%) scale(1); }
        100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }
}