/* ==========================================================================
   EZup /start 新增樣式（只新增，不覆寫既有區塊）
   1) .import-demo  固定範例匯入互動展示
   2) .bc-anim      四張功能卡的純 CSS 動畫
   色彩沿用 start.html :root 變數（--blue / --cta / --line-green / --border）
   ========================================================================== */

/* ==========================================================================
   1) 固定範例匯入互動展示
   ========================================================================== */
.import-demo {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.import-demo .demo-head { text-align: center; }

.demo-tag {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 2rem;
    margin-bottom: 0.6rem;
}

.import-demo h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 0.4rem;
}

.demo-lead {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
}

.demo-note {
    font-size: 0.78rem;
    color: #767676;
    margin-top: 0.35rem;
}

/* 桌機左右雙欄：左 42% 操作、右 58% 預覽 */
.demo-layout {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 1.1rem;
    max-width: 720px;
    margin: 1.5rem auto 0;
    align-items: start;
}

.demo-pane {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 1.1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    min-width: 0;
}

/* ---- 左欄：固定網址 + 兩顆按鈕 + 狀態 ---- */
.demo-url-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.demo-url {
    width: 100%;
    font-family: inherit;
    font-size: 16px; /* 手機不觸發自動縮放 */
    color: var(--text);
    background: #f6f8fa;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.7rem 0.7rem;
    line-height: 1.4;
}

.demo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.demo-action { display: block; }

/* 步驟指引文字 */
.demo-hint {
    margin-top: 0.3rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: #6b7580;
}

/* 按鈕內的步驟編號 */
.demo-step {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}
.demo-btn-primary .demo-step { background: #fff; color: var(--blue); }
.demo-btn-secondary .demo-step { background: var(--blue); color: #fff; }
.demo-btn:disabled .demo-step { background: #cfd5db; color: #46505a; }

/* 該步驟完成後，編號轉為綠色 */
.import-demo[data-state="imported"] #demoImportBtn .demo-step,
.import-demo[data-state="converting"] #demoImportBtn .demo-step,
.import-demo[data-state="converted"] #demoImportBtn .demo-step,
.import-demo[data-state="converted"] #demoConvertBtn .demo-step {
    background: var(--line-green);
    color: #fff;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.demo-btn-primary { background: var(--blue); color: #fff; }
.demo-btn-primary:hover:not(:disabled) { background: #003a69; }

.demo-btn-secondary {
    background: #fff;
    color: var(--blue);
    border-color: var(--blue);
}
.demo-btn-secondary:hover:not(:disabled) { background: var(--blue-light); }

/* 停用狀態仍需清楚可辨識（對比 > 4.5:1） */
.demo-btn:disabled {
    background: #eceff2;
    color: #5f6b76;
    border-color: #d5dae0;
    cursor: not-allowed;
}

/* 鍵盤 focus 樣式 */
.import-demo .demo-btn:focus-visible,
.import-demo .demo-url:focus-visible {
    outline: 3px solid #1d6fd6;
    outline-offset: 2px;
}

/* 載入中的旋轉圖示：只在 aria-busy 時出現 */
.demo-spinner {
    display: none;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0.75;
    animation: demoSpin 0.7s linear infinite;
}
.demo-btn[aria-busy="true"] .demo-spinner { display: block; }

@keyframes demoSpin { to { transform: rotate(360deg); } }

.demo-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.7rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-light);
}
.demo-status::before {
    content: '';
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #c2c8cf;
}
.import-demo[data-state="importing"] .demo-status::before,
.import-demo[data-state="converting"] .demo-status::before { background: var(--cta); }
.import-demo[data-state="imported"] .demo-status,
.import-demo[data-state="converted"] .demo-status { color: #05863c; font-weight: 600; }
.import-demo[data-state="imported"] .demo-status::before,
.import-demo[data-state="converted"] .demo-status::before { background: var(--line-green); }

/* ---- 右欄：預覽 ---- */
.demo-pane-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.6rem;
}

/* 閒置引導：只在還沒點擊任何按鈕時出現 */
.demo-idle-hint {
    display: none;
    margin-bottom: 0.7rem;
    padding: 0.5rem 0.7rem;
    background: var(--blue-light);
    border: 1px dashed #b9d5ec;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue);
    text-align: center;
}
.import-demo[data-state="idle"] .demo-idle-hint { display: block; }
.demo-idle-mobile { display: none; }

/* 骨架：idle / importing 顯示 */
.demo-skeleton { display: none; }
.import-demo[data-state="idle"] .demo-skeleton,
.import-demo[data-state="importing"] .demo-skeleton { display: block; }

.sk-photo {
    height: 84px;
    border-radius: 0.6rem;
    background: #eceff2;
    margin-bottom: 0.7rem;
}
.sk-row {
    height: 11px;
    border-radius: 6px;
    background: #eceff2;
    margin-bottom: 0.55rem;
}
.sk-row-short { width: 55%; }
.sk-row-mid { width: 78%; }

.import-demo[data-state="importing"] .sk-photo,
.import-demo[data-state="importing"] .sk-row {
    background-image: linear-gradient(90deg, #eceff2 25%, #f7f9fb 37%, #eceff2 63%);
    background-size: 400% 100%;
    animation: demoShimmer 1.2s ease-in-out infinite;
}
@keyframes demoShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* 物件資料：imported 之後持續顯示 */
.demo-listing { display: none; }
.import-demo[data-state="imported"] .demo-listing,
.import-demo[data-state="converting"] .demo-listing,
.import-demo[data-state="converted"] .demo-listing { display: block; }

.dl-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.dl-rows { list-style: none; padding: 0; margin: 0; }

.dl-rows li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text);
}
.dl-rows li .dl-key {
    flex: 0 0 3.1rem;
    color: var(--text-light);
    font-size: 0.82rem;
}
.dl-rows li .dl-val { font-weight: 600; }

/* 照片列：CSS 骨架縮圖，不引用第三方圖片 */
.dl-photos {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.dl-thumb {
    width: 38px;
    height: 29px;
    border-radius: 0.3rem;
    background: var(--blue-light);
    border: 1px solid #d0e3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.dl-thumb svg {
    width: 26px;
    height: 20px;
    stroke: var(--blue);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dl-thumb-more {
    background: #eceff2;
    border-color: #d5dae0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #5f6b76;
}
.dl-photo-text { font-size: 0.8rem; color: var(--text-light); }

/* 欄位依序淡入（每項 85ms） */
.dl-item { opacity: 0; }
.import-demo[data-state="imported"] .dl-item,
.import-demo[data-state="converting"] .dl-item,
.import-demo[data-state="converted"] .dl-item {
    animation: demoFadeUp 0.38s ease forwards;
    animation-delay: calc(var(--i, 0) * 85ms);
}

@keyframes demoFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* FB 文案區：converting 起出現 */
.demo-fb { display: none; margin-top: 0.9rem; padding-top: 0.85rem; border-top: 1px dashed var(--border); }
.import-demo[data-state="converting"] .demo-fb,
.import-demo[data-state="converted"] .demo-fb { display: block; }

.demo-fb-skeleton { display: none; }
.import-demo[data-state="converting"] .demo-fb-skeleton { display: block; }
.import-demo[data-state="converting"] .demo-fb-skeleton .sk-row {
    background-image: linear-gradient(90deg, #eceff2 25%, #f7f9fb 37%, #eceff2 63%);
    background-size: 400% 100%;
    animation: demoShimmer 1.2s ease-in-out infinite;
}

.demo-fb-body { display: none; }
.import-demo[data-state="converted"] .demo-fb-body { display: block; }

.fb-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.fb-points { list-style: none; padding: 0; margin: 0; }
.fb-points li {
    font-size: 0.86rem;
    line-height: 1.75;
    color: var(--text);
    padding-left: 1.1rem;
    position: relative;
}
.fb-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--line-green);
    font-weight: 700;
}
.fb-contact {
    margin-top: 0.6rem;
    background: #f0fff4;
    border-left: 3px solid var(--line-green);
    border-radius: 0.4rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #05863c;
}

/* 文案依序淡入（每項 140ms） */
.demo-fb-body .fb-step { opacity: 0; }
.import-demo[data-state="converted"] .fb-step {
    animation: demoFadeUp 0.34s ease forwards;
    animation-delay: calc(var(--i, 0) * 140ms);
}

/* ==========================================================================
   2) 四張功能卡動畫（純 HTML + CSS，無 GIF / 影片 / 外部套件）
   容器固定高度避免 CLS；預設暫停，卡片進入可視範圍才播放
   ========================================================================== */
.bc-anim {
    position: relative;
    height: 122px;
    margin-bottom: 0.7rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: #fff;
    overflow: hidden;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--text);
}

/* 動畫中依序出現的元素，預設隱藏 */
.bc-step { opacity: 0; }

.bc-anim ul { list-style: none; padding: 0; margin: 0; }

/* 完成標記（四張卡共用外觀） */
.bc-done {
    position: absolute;
    right: 0.5rem;
    bottom: 0.45rem;
    background: #e8f7ee;
    color: #05863c;
    border: 1px solid #b7e3c8;
    border-radius: 2rem;
    padding: 0.12rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
}

/* ---------- 卡 1：貼連結，資料自動帶入（7.2s） ---------- */
.a1-bar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.a1-url {
    flex: 1 1 auto;
    min-width: 0;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    background: #f6f8fa;
    padding: 0 0.35rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.a1-url i {
    font-style: normal;
    white-space: nowrap;
    color: #5f6b76;
    animation: a1Url 7.2s linear infinite;
    clip-path: inset(0 100% 0 0);
}
.a1-btn {
    flex: 0 0 auto;
    height: 22px;
    padding: 0 0.45rem;
    border-radius: 0.3rem;
    display: flex;
    align-items: center;
    font-weight: 700;
    background: #eceff2;
    color: #9aa2ab;
    animation: a1Btn 7.2s linear infinite;
}
.a1-prog {
    height: 4px;
    border-radius: 2px;
    background: #eceff2;
    overflow: hidden;
    margin-bottom: 0.45rem;
}
.a1-prog i {
    display: block;
    height: 100%;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left center;
    animation: a1Prog 7.2s linear infinite;
}
.a1-fields li {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.a1-fields b { color: var(--line-green); }
.a1-f1 { animation: a1F1 7.2s linear infinite; }
.a1-f2 { animation: a1F2 7.2s linear infinite; }
.a1-f3 { animation: a1F3 7.2s linear infinite; }
/* 末列：照片張數在左、完成標記在右，避免絕對定位的標記蓋住文字 */
.a1-lastrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    margin-top: 0.15rem;
}
.a1-photo {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    animation: a1Photo 7.2s linear infinite;
}
.a1-done { position: static; }
.a1-count {
    position: relative;
    display: inline-block;
    width: 1.4em;
    height: 1.35em;
    font-weight: 700;
    color: var(--blue);
}
.a1-count i {
    position: absolute;
    inset: 0;
    font-style: normal;
    opacity: 0;
}
.a1-count .c0 { animation: a1c0 7.2s linear infinite; }
.a1-count .c1 { animation: a1c1 7.2s linear infinite; }
.a1-count .c2 { animation: a1c2 7.2s linear infinite; }
.a1-count .c3 { animation: a1c3 7.2s linear infinite; }
.a1-done { animation: a1Done 7.2s linear infinite; }

@keyframes a1Url {
    0%, 5.5%      { clip-path: inset(0 100% 0 0); }
    19.4%, 96%    { clip-path: inset(0 0 0 0); }
    100%          { clip-path: inset(0 100% 0 0); }
}
@keyframes a1Btn {
    0%, 19%    { background: #eceff2; color: #9aa2ab; }
    21%, 96%   { background: var(--blue); color: #fff; }
    100%       { background: #eceff2; color: #9aa2ab; }
}
@keyframes a1Prog {
    0%, 27.8%    { transform: scaleX(0); }
    38.9%, 96%   { transform: scaleX(1); }
    100%         { transform: scaleX(0); }
}
@keyframes a1F1 {
    0%, 38.9%  { opacity: 0; transform: translateY(4px); }
    43%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a1F2 {
    0%, 48.6%  { opacity: 0; transform: translateY(4px); }
    53%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a1F3 {
    0%, 58.3%  { opacity: 0; transform: translateY(4px); }
    62%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a1Photo {
    0%, 63%    { opacity: 0; transform: translateY(4px); }
    67%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
/* 照片張數 0 → 6 → 12 → 18（4.9s 起） */
@keyframes a1c0 { 0%, 67.5% { opacity: 1; } 69%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes a1c1 { 0%, 68% { opacity: 0; } 69.5%, 70.5% { opacity: 1; } 72%, 100% { opacity: 0; } }
@keyframes a1c2 { 0%, 70.5% { opacity: 0; } 72%, 73% { opacity: 1; } 74.5%, 100% { opacity: 0; } }
@keyframes a1c3 { 0%, 73% { opacity: 0; } 74.5%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes a1Done {
    0%, 77.8%  { opacity: 0; transform: translateY(4px); }
    81%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}

/* ---------- 卡 2：AI 秒寫售屋文案（7.2s） ---------- */
.a2-box {
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: #fbfcfd;
    /* 底部留白給右下角的完成標記 */
    padding: 0.4rem 0.45rem 1.2rem;
}
.a2-title {
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
    overflow: hidden;
}
.a2-title span {
    display: inline-block;
    white-space: nowrap;
    clip-path: inset(0 100% 0 0);
    animation: a2Title 7.2s linear infinite;
}
.a2-list li { color: #4a5560; }
.a2-b1 { animation: a2B1 7.2s linear infinite; }
.a2-b2 { animation: a2B2 7.2s linear infinite; }
.a2-b3 { animation: a2B3 7.2s linear infinite; }
.a2-contact {
    margin-top: 0.3rem;
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 0.25rem;
    padding: 0.1rem 0.35rem;
    font-weight: 700;
    animation: a2Contact 7.2s linear infinite;
}
.a2-done { animation: a2Done 7.2s linear infinite; }

@keyframes a2Title {
    0%, 9.7%    { clip-path: inset(0 100% 0 0); }
    20.8%, 96%  { clip-path: inset(0 0 0 0); }
    100%        { clip-path: inset(0 100% 0 0); }
}
@keyframes a2B1 {
    0%, 25%    { opacity: 0; transform: translateY(4px); }
    29%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a2B2 {
    0%, 36.1%  { opacity: 0; transform: translateY(4px); }
    40%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a2B3 {
    0%, 47.2%  { opacity: 0; transform: translateY(4px); }
    51%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a2Contact {
    0%, 61.1%  { opacity: 0; transform: translateY(4px); }
    65%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}
@keyframes a2Done {
    0%, 72.2%  { opacity: 0; transform: translateY(4px); }
    76%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}

/* ---------- 卡 3：智慧間隔，分批排程（8s） ---------- */
.a3-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    height: 17px;
}
.a3-name { color: #4a5560; }
.a3-st {
    flex: 0 0 auto;
    border-radius: 2rem;
    padding: 0.05rem 0.4rem;
    font-weight: 700;
    background: #eef2f5;
    color: #5f6b76;
}
.a3-st-done { background: #e8f7ee; color: #05863c; }
.a3-st-time { background: var(--blue-light); color: var(--blue); }
.a3-s1 { animation: a3S1 8s linear infinite; }
.a3-s2 { animation: a3S2 8s linear infinite; }
.a3-s3 { animation: a3S3 8s linear infinite; }
.a3-s4 { animation: a3S4 8s linear infinite; }
.a3-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 12px;
    margin-top: 0.35rem;
    padding: 0 2px;
}
.a3-line::before {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    top: 50%;
    height: 2px;
    background: #eceff2;
    border-radius: 2px;
}
.a3-line b {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d5dae0;
}
.a3-d1 { animation: a3D1 8s linear infinite; }
.a3-d2 { animation: a3D2 8s linear infinite; }
.a3-d3 { animation: a3D3 8s linear infinite; }
.a3-d4 { animation: a3D4 8s linear infinite; }
.a3-done { animation: a3Done 8s linear infinite; }

@keyframes a3S1 {
    0%, 10%    { opacity: 0; }
    13%, 96%   { opacity: 1; }
    100%       { opacity: 0; }
}
@keyframes a3S2 {
    0%, 25%    { opacity: 0; }
    28%, 96%   { opacity: 1; }
    100%       { opacity: 0; }
}
@keyframes a3S3 {
    0%, 40%    { opacity: 0; }
    43%, 96%   { opacity: 1; }
    100%       { opacity: 0; }
}
@keyframes a3S4 {
    0%, 55%    { opacity: 0; }
    58%, 96%   { opacity: 1; }
    100%       { opacity: 0; }
}
@keyframes a3D1 { 0%, 65% { background: #d5dae0; } 67%, 96% { background: var(--blue); } 100% { background: #d5dae0; } }
@keyframes a3D2 { 0%, 68% { background: #d5dae0; } 70%, 96% { background: var(--blue); } 100% { background: #d5dae0; } }
@keyframes a3D3 { 0%, 71% { background: #d5dae0; } 73%, 96% { background: var(--blue); } 100% { background: #d5dae0; } }
@keyframes a3D4 { 0%, 74% { background: #d5dae0; } 76%, 96% { background: var(--blue); } 100% { background: #d5dae0; } }
@keyframes a3Done {
    0%, 77.5%  { opacity: 0; transform: translateY(4px); }
    80.5%, 96% { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}

/* ---------- 卡 4：舊文到期自動下架（8s） ---------- */
.a4-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    height: 17px;
}
.a4-day { color: #4a5560; font-weight: 700; }
.a4-list em {
    font-style: normal;
    border-radius: 2rem;
    padding: 0.05rem 0.4rem;
    font-weight: 700;
    background: #eef2f5;
    color: #5f6b76;
    white-space: nowrap;
}
.a4-p1 { background: var(--blue-light); color: var(--blue); }
.a4-p2 { background: var(--blue-light); color: var(--blue); animation: a4P2 8s linear infinite; }
.a4-p3 { background: #fff3e0; color: #b35c00; animation: a4P3 8s linear infinite; }
.a4-slot { position: relative; flex: 0 0 auto; width: 5.4em; height: 15px; }
.a4-slot em { position: absolute; right: 0; top: 0; }
.a4-p4 { background: #ffe6cc; color: #a04b00; animation: a4P4 8s linear infinite; }
.a4-p5 { background: #eceff2; color: #4a5560; animation: a4P5 8s linear infinite; }
.a4-done { animation: a4Done 8s linear infinite; }

@keyframes a4P2 {
    0%, 18.75% { opacity: 0; transform: translateY(3px); }
    22%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(3px); }
}
@keyframes a4P3 {
    0%, 37.5%  { opacity: 0; transform: translateY(3px); }
    41%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(3px); }
}
/* Day 7：先橘色「到期」，5.5s 後換成「已自動下架」 */
@keyframes a4P4 {
    0%, 56.25% { opacity: 0; }
    59%, 66%   { opacity: 1; }
    68.75%, 100% { opacity: 0; }
}
@keyframes a4P5 {
    0%, 66%      { opacity: 0; }
    68.75%, 96%  { opacity: 1; }
    100%         { opacity: 0; }
}
@keyframes a4Done {
    0%, 78.75% { opacity: 0; transform: translateY(4px); }
    82%, 96%   { opacity: 1; transform: none; }
    100%       { opacity: 0; transform: translateY(4px); }
}

/* ---------- 播放控制 ----------
   注意：上方各元素使用 animation 簡寫，簡寫會把 animation-play-state
   重設為初始值 running，因此暫停規則必須放在所有簡寫「之後」，
   並用較高權重（:not(.is-active) 為 0-3-0）才能生效。
   未取得 .is-active 的卡片（含尚未進入可視範圍時）一律暫停。 */
.benefit-card:not(.is-active) .bc-anim * {
    animation-play-state: paused;
}

/* ==========================================================================
   3) 響應式：手機改上下排列，不使用橫向捲動
   ========================================================================== */
@media (max-width: 768px) {
    .import-demo { padding: 2rem 0; }
    .import-demo h2 { font-size: 1.2rem; }
    .demo-lead { font-size: 0.88rem; }

    .demo-layout {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        max-width: 460px;
    }

    /* 手機主要操作按鈕加高，方便點擊 */
    .demo-btn { min-height: 52px; font-size: 1.02rem; }

    /* 手機版按鈕在預覽區上方，改用向上箭頭文案 */
    .demo-idle-desktop { display: none; }
    .demo-idle-mobile { display: inline; }

    .dl-rows li { font-size: 0.86rem; }
    .dl-rows li .dl-key { flex-basis: 3rem; }
}

/* ==========================================================================
   4) 減少動畫偏好：不跑循環動畫，直接顯示完成狀態
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    /* 互動展示：立即顯示結果，仍可點擊 */
    .import-demo .dl-item,
    .import-demo .fb-step {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .demo-spinner,
    .import-demo .sk-photo,
    .import-demo .sk-row { animation: none !important; }

    /* 功能卡：停止循環，直接呈現完成畫面 */
    .bc-anim *,
    .benefit-card.is-active .bc-anim * { animation: none !important; }
    .bc-anim .bc-step { opacity: 1 !important; transform: none !important; }
    .bc-anim .a1-url i,
    .bc-anim .a2-title span { clip-path: none !important; }
    .bc-anim .a1-btn { background: var(--blue); color: #fff; }
    .bc-anim .a1-prog i { transform: scaleX(1); }
    .bc-anim .a1-count .c0,
    .bc-anim .a1-count .c1,
    .bc-anim .a1-count .c2 { opacity: 0 !important; }
    .bc-anim .a1-count .c3 { opacity: 1 !important; }
    .bc-anim .a3-line b { background: var(--blue); }
    .bc-anim .a4-p4 { opacity: 0 !important; }
    .bc-anim .a4-p5 { opacity: 1 !important; }
}
