/* 關於 JoyLife：下載專區（DownLoadFiles/Index）／常見問題（QandA/Index）
   沿用 joylife.co 與會員首頁的品牌色系；兩頁的 markup 都是為這支重寫的，
   選擇器仍加 body.jl-about-page 前綴，避免被版型共用的 style.css 蓋掉。 */

body.jl-about-page .jl-about {
    --ab-green: #07574e;
    --ab-green-hover: #0b6a5f;
    --ab-ink: #163e38;
    --ab-ink-2: #2f4a43;
    --ab-muted: #62736b;
    --ab-line: #d9e1d5;
    --ab-line-soft: #eef2ea;
    --ab-soft: #f5f8f1;
    --ab-citrus: #d4d83d;
    box-sizing: border-box;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 28px 48px;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: var(--ab-ink);
}

    body.jl-about-page .jl-about *,
    body.jl-about-page .jl-about *::before,
    body.jl-about-page .jl-about *::after { box-sizing: border-box; }

    body.jl-about-page .jl-about :is(a, button, input, summary):focus-visible {
        outline: 3px solid #7d8b17;
        outline-offset: 2px;
    }

/* ── 標題區 ── */
body.jl-about-page .jl-about__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 20px;
    padding: 26px 32px;
    background: var(--ab-green);
    color: #fff;
    border-radius: 8px;
}

body.jl-about-page .jl-about__eyebrow {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
    line-height: 1.6;
    color: var(--ab-citrus);
}

body.jl-about-page .jl-about__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .04em;
    color: #fff;
}

body.jl-about-page .jl-about__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: #e3ebe3;
}

body.jl-about-page .jl-about__stat {
    flex-shrink: 0;
    margin: 0;
    padding: 8px 16px;
    border: 1px solid #ffffff33;
    border-radius: 4px;
    background: #ffffff14;
    color: #e3ebe3;
    font-size: 13px;
    white-space: nowrap;
}

    body.jl-about-page .jl-about__stat strong {
        margin: 0 4px;
        color: #fff;
        font-size: 20px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

/* ── 共用：空狀態 ── */
body.jl-about-page .jl-about__empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--ab-muted);
    font-size: 14px;
}

    body.jl-about-page .jl-about__empty i {
        display: block;
        margin-bottom: 8px;
        font-size: 32px;
        color: #c3cfc2;
    }

/* ═══════════════ 下載專區 ═══════════════ */
body.jl-about-page .jl-dl {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

body.jl-about-page .jl-dl__cats {
    position: sticky;
    top: 88px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--ab-line);
    border-radius: 8px;
}

body.jl-about-page .jl-dl__cats-title {
    margin: 4px 8px 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    color: var(--ab-muted);
}

body.jl-about-page .jl-dl__cats ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.jl-about-page .jl-dl__cat {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 4px;
    color: var(--ab-ink-2);
    font-size: 15px;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

    body.jl-about-page .jl-dl__cat:hover {
        background: #edf2e6;
        color: var(--ab-green);
    }

    body.jl-about-page .jl-dl__cat.is-active,
    body.jl-about-page .jl-dl__cat.is-active:hover {
        background: var(--ab-green);
        color: #fff;
        font-weight: 600;
    }

body.jl-about-page .jl-dl__panel {
    background: #fff;
    border: 1px solid var(--ab-line);
    border-radius: 8px;
    box-shadow: 0 4px 18px #1b423808;
    overflow: hidden;
}

body.jl-about-page .jl-dl__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #e3e9de;
    background: var(--ab-soft);
}

body.jl-about-page .jl-dl__panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--ab-ink);
}

    body.jl-about-page .jl-dl__panel-title::before {
        content: "";
        width: 4px;
        height: 18px;
        border-radius: 2px;
        background: var(--ab-green);
    }

body.jl-about-page .jl-dl__panel-meta {
    font-size: 13px;
    color: var(--ab-muted);
}

body.jl-about-page .jl-dl__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.jl-about-page .jl-dl__row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ab-line-soft);
    transition: background-color .15s;
}

    body.jl-about-page .jl-dl__row:last-child { border-bottom: 0; }
    body.jl-about-page .jl-dl__row:hover { background: #f7f9f4; }

    body.jl-about-page .jl-dl__row.is-featured { background: #fafbf2; }

body.jl-about-page .jl-dl__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: #edf2e6;
    color: var(--ab-green);
    font-size: 20px;
}

body.jl-about-page .jl-dl__row.is-featured .jl-dl__icon {
    background: var(--ab-citrus);
    color: var(--ab-ink);
}

body.jl-about-page .jl-dl__name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ab-ink);
    overflow-wrap: anywhere;
}

body.jl-about-page .jl-dl__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 0;
    font-size: 13px;
    color: var(--ab-muted);
}

body.jl-about-page .jl-dl__tag {
    padding: 1px 8px;
    border-radius: 3px;
    background: var(--ab-line-soft);
    color: var(--ab-ink-2);
    font-size: 12px;
}

body.jl-about-page .jl-dl__ext {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    color: #7d8b17;
}

body.jl-about-page .jl-dl__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 108px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--ab-green);
    border-radius: 4px;
    background: #fff;
    color: var(--ab-green);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

    body.jl-about-page .jl-dl__action:hover {
        background: var(--ab-green);
        color: #fff;
    }

    body.jl-about-page .jl-dl__action.is-primary {
        background: var(--ab-green);
        color: #fff;
    }

        body.jl-about-page .jl-dl__action.is-primary:hover { background: var(--ab-green-hover); }

body.jl-about-page .jl-dl__none {
    font-size: 13px;
    color: #8fa196;
    white-space: nowrap;
}

/* ═══════════════ 常見問題 ═══════════════ */
body.jl-about-page .jl-faq {
    max-width: 920px;
    margin: 0 auto;
}

body.jl-about-page .jl-faq__search {
    position: relative;
    margin-bottom: 16px;
}

    body.jl-about-page .jl-faq__search i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #8fa196;
        pointer-events: none;
    }

    body.jl-about-page .jl-faq__search input {
        width: 100%;
        height: 52px;
        margin: 0;
        padding: 0 16px 0 44px;
        border: 1px solid var(--ab-line);
        border-radius: 4px;
        background: #fff;
        color: var(--ab-ink);
        font-family: inherit;
        font-size: 16px;
        box-shadow: none;
        outline: none;
        transition: border-color .15s, box-shadow .15s;
    }

        body.jl-about-page .jl-faq__search input:focus {
            border-color: var(--ab-green);
            box-shadow: 0 0 0 3px #07574e18;
        }

body.jl-about-page .jl-faq__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.jl-about-page .jl-faq__item {
    background: #fff;
    border: 1px solid var(--ab-line);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}

    body.jl-about-page .jl-faq__item[open] {
        border-color: #b9ccbe;
        box-shadow: 0 4px 18px #1b42380d;
    }

body.jl-about-page .jl-faq__summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 14px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

    body.jl-about-page .jl-faq__summary::-webkit-details-marker { display: none; }
    body.jl-about-page .jl-faq__summary::marker { content: ""; }

    body.jl-about-page .jl-faq__summary:hover { background: #f7f9f4; }

body.jl-about-page .jl-faq__q {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--ab-green);
    color: var(--ab-citrus);
    font-size: 14px;
    font-weight: 700;
}

body.jl-about-page .jl-faq__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: .02em;
    color: var(--ab-ink);
    overflow-wrap: anywhere;
}

body.jl-about-page .jl-faq__toggle {
    position: relative;
    width: 28px;
    height: 28px;
    border: 1px solid var(--ab-line);
    border-radius: 50%;
}

    body.jl-about-page .jl-faq__toggle::before,
    body.jl-about-page .jl-faq__toggle::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 10px;
        height: 1.5px;
        background: var(--ab-green);
        transform: translate(-50%, -50%);
        transition: transform .2s;
    }

    body.jl-about-page .jl-faq__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }

body.jl-about-page .jl-faq__item[open] .jl-faq__toggle {
    border-color: var(--ab-green);
    background: var(--ab-green);
}

    body.jl-about-page .jl-faq__item[open] .jl-faq__toggle::before,
    body.jl-about-page .jl-faq__item[open] .jl-faq__toggle::after { background: #fff; }

    body.jl-about-page .jl-faq__item[open] .jl-faq__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }

body.jl-about-page .jl-faq__answer {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 20px 20px;
    border-top: 1px solid var(--ab-line-soft);
    background: #fafbf7;
}

body.jl-about-page .jl-faq__a {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #edf2e6;
    color: var(--ab-green);
    font-size: 14px;
    font-weight: 700;
}

body.jl-about-page .jl-faq__content {
    min-width: 0;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ab-ink-2);
    overflow-wrap: anywhere;
}

    body.jl-about-page .jl-faq__content > :first-child { margin-top: 0; }
    body.jl-about-page .jl-faq__content > :last-child { margin-bottom: 0; }
    body.jl-about-page .jl-faq__content p { margin: 0 0 .8em; }
    body.jl-about-page .jl-faq__content a { color: var(--ab-green); text-underline-offset: 3px; }
    body.jl-about-page .jl-faq__content img { max-width: 100%; height: auto; }

    body.jl-about-page .jl-faq__content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

body.jl-about-page .jl-faq__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--ab-muted);
}

body.jl-about-page .jl-faq__nomatch {
    padding: 32px 16px;
    border: 1px dashed var(--ab-line);
    border-radius: 8px;
    text-align: center;
    color: var(--ab-muted);
    font-size: 14px;
}

/* ── 下載專區手機工具列：左邊分類按鈕、右邊搜尋框（比照選購商品，桌機隱藏） ── */
body.jl-about-page .jl-dl__mtools {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

body.jl-about-page .jl-dl__filter-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px 0 12px;
    border: 1px solid var(--ab-green);
    border-radius: 4px;
    background: #fff;
    color: var(--ab-green);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    cursor: pointer;
}

    body.jl-about-page .jl-dl__filter-btn svg { width: 20px; height: 20px; }

    body.jl-about-page .jl-dl__filter-btn:active {
        background: var(--ab-green);
        color: #fff;
    }

body.jl-about-page .jl-dl__msearch {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 44px;
    border: 1px solid var(--ab-line);
    border-radius: 999px;
    background: #fff;
}

    body.jl-about-page .jl-dl__msearch:focus-within {
        border-color: var(--ab-green);
        box-shadow: 0 0 0 3px #07574e1f;
    }

body.jl-about-page .jl-dl__msearch-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-left: 14px;
    color: var(--ab-muted);
}

body.jl-about-page .jl-dl__msearch input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px 0 8px;
    border: 0;
    background: transparent;
    color: var(--ab-ink);
    font: inherit;
    font-size: 16px; /* iOS 低於 16px 聚焦時會放大頁面 */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

    body.jl-about-page .jl-dl__msearch input::placeholder { color: #8a978f; }
    body.jl-about-page .jl-dl__msearch input::-webkit-search-cancel-button { display: none; }

body.jl-about-page .jl-dl__msearch-clear {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-right: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e8ede3;
    color: var(--ab-ink);
}

    body.jl-about-page .jl-dl__msearch-clear[hidden] { display: none; }
    body.jl-about-page .jl-dl__msearch-clear svg { width: 14px; height: 14px; }

body.jl-about-page .jl-dl__row[hidden],
body.jl-about-page .jl-about__empty[hidden] { display: none; }

/* 類別面板（手機由底部滑出） */
body.jl-about-page .jl-dl-sheet:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: flex-end;
}

body.jl-about-page .jl-dl-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: #0e2d288c;
    opacity: 0;
    transition: opacity .22s;
}

body.jl-about-page .jl-dl-sheet__panel {
    position: relative;
    width: 100%;
    max-height: 75vh;
    max-height: 75dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -12px 40px #0e2d2833;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
    transition: transform .22s ease;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body.jl-about-page .jl-dl-sheet.is-open .jl-dl-sheet__backdrop { opacity: 1; }
body.jl-about-page .jl-dl-sheet.is-open .jl-dl-sheet__panel { transform: translateY(0); }

body.jl-about-page .jl-dl-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 16px 16px 20px;
    background: #07574e;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

body.jl-about-page .jl-dl-sheet__eyebrow {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
    color: #d4d83d;
}

body.jl-about-page .jl-dl-sheet__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .06em;
    color: #fff;
}

body.jl-about-page .jl-dl-sheet__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    background: #ffffff14;
    color: #fff;
    cursor: pointer;
}

    body.jl-about-page .jl-dl-sheet__close svg { width: 16px; height: 16px; }

body.jl-about-page .jl-dl-sheet__list {
    list-style: none;
    margin: 0;
    padding: 10px 12px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    body.jl-about-page .jl-dl-sheet__list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 48px;
        padding: 10px 12px;
        border-bottom: 1px solid #eef2ea;
        color: #163e38;
        font-size: 15px;
        line-height: 1.5;
        text-decoration: none;
    }

    body.jl-about-page .jl-dl-sheet__list li:last-child a { border-bottom: 0; }

    body.jl-about-page .jl-dl-sheet__list a.is-active {
        border-radius: 4px;
        border-bottom-color: transparent;
        background: #edf2e6;
        color: #07574e;
        font-weight: 600;
    }

    body.jl-about-page .jl-dl-sheet__list a svg { flex-shrink: 0; width: 18px; height: 18px; }

/* ── RWD ── */
@media (max-width: 820px) {
    /* 下載專區：類別改由工具列的「分類」面板切換，旁邊加搜尋框（比照選購商品） */
    body.jl-about-page .jl-dl__mtools { display: flex; }
    body.jl-about-page .jl-dl__cats { display: none; }

    body.jl-about-page .jl-about { padding: 16px 16px 24px; }

    body.jl-about-page .jl-about__hero {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
        padding: 18px 20px;
    }

    body.jl-about-page .jl-about__title { font-size: 22px; margin-bottom: 0; }
    body.jl-about-page .jl-about__desc { display: none; }
    body.jl-about-page .jl-about__stat { padding: 4px 12px; }
    body.jl-about-page .jl-about__stat strong { font-size: 16px; }

    /* 下載專區：類別改成可橫向滑動的標籤列 */
    body.jl-about-page .jl-dl { grid-template-columns: minmax(0, 1fr); gap: 12px; }

    body.jl-about-page .jl-dl__cats {
        position: static;
        margin: 0 -16px;
        padding: 0 16px;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    body.jl-about-page .jl-dl__cats-title { display: none; }

    body.jl-about-page .jl-dl__cats ul {
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

        body.jl-about-page .jl-dl__cats ul::-webkit-scrollbar { display: none; }

    body.jl-about-page .jl-dl__cat {
        min-height: 40px;
        padding: 8px 16px;
        border: 1px solid var(--ab-line);
        background: #fff;
        font-size: 14px;
        white-space: nowrap;
    }

    body.jl-about-page .jl-dl__panel-head { padding: 14px 16px; }

    body.jl-about-page .jl-dl__row {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 14px 16px;
    }

    body.jl-about-page .jl-dl__icon { width: 40px; height: 40px; font-size: 18px; }

    body.jl-about-page .jl-dl__action,
    body.jl-about-page .jl-dl__none { grid-column: 2; justify-self: start; }

    body.jl-about-page .jl-dl__action { min-height: 44px; width: 100%; }

    /* 常見問題 */
    body.jl-about-page .jl-faq__summary {
        grid-template-columns: 28px minmax(0, 1fr) 24px;
        gap: 10px;
        min-height: 56px;
        padding: 12px 14px;
    }

    body.jl-about-page .jl-faq__q,
    body.jl-about-page .jl-faq__a { width: 28px; height: 28px; font-size: 13px; }

    body.jl-about-page .jl-faq__toggle { width: 24px; height: 24px; }
    body.jl-about-page .jl-faq__title { font-size: 15px; }

    body.jl-about-page .jl-faq__answer {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px 14px 16px;
    }

    body.jl-about-page .jl-faq__a { display: none; }
    body.jl-about-page .jl-faq__content { font-size: 14px; line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
    body.jl-about-page .jl-about * { transition: none !important; }
}
