/* CBON Home Page - 首頁樣式
   設計原則：與 shop 頁共用同一個 design system
   - 背景：白底 / 淺色漸層（跟 esim-shop / game-shop 一致）
   - 圓角白卡 + 統一 token
   - hero 區用 mesh 漸層 + 漸層裝飾條，跟 shop hero 視覺一致
*/

:root {
    /* 🔶 首頁主色：橙色（僅首頁生效，覆蓋 design-tokens；不影響其他頁面） */
    --cbon-primary: #ea580c;
    --cbon-primary-600: #ea580c;
    --cbon-primary-700: #c2410c;
    --cbon-primary-50: #fff7ed;
    --cbon-primary-100: #ffedd5;
    --cbon-gradient: linear-gradient(135deg, #ea580c 0%, #ff6b35 50%, #f59e0b 100%);
    --cbon-gradient-soft: linear-gradient(135deg, rgba(234,88,12,0.10) 0%, rgba(255,107,53,0.10) 50%, rgba(245,158,11,0.10) 100%);
    --cbon-shadow-primary: 0 8px 24px rgba(234, 88, 12, 0.22);

    --bg: var(--cbon-bg);
    --surface: var(--cbon-bg-soft);
    --surface-strong: var(--cbon-surface-strong);
    --border: var(--cbon-border);
    --border-soft: var(--cbon-border-soft);
    --text: var(--cbon-text);
    --muted: var(--cbon-text-muted);
    --primary: var(--cbon-primary);
    --primary-deep: var(--cbon-primary-700);
    --accent: var(--cbon-accent);
    --gradient: var(--cbon-gradient);
    --gradient-soft: var(--cbon-gradient-soft);
    --shadow: var(--cbon-shadow-md);
    --shadow-strong: var(--cbon-shadow-lg);
    --radius: var(--cbon-radius-lg);
    /* 手機：滿版留 16px 邊距；桌機統一最大寬對齊所有段落 */
    --shell: calc(100% - 32px);
}

@media (min-width: 768px) {
    :root {
        --shell: min(1100px, calc(100% - 48px));
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, var(--cbon-bg-soft) 50%, #ffffff 100%);
    color: var(--text);
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shell {
    width: var(--shell);
    margin: 0 auto;
}

/* --- 1. Header（手機優先、淺色毛玻璃）--- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border-soft);
}

.header-stack {
    padding: 10px 0 10px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(234, 88, 12, 0.15);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}

.utility-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.utility-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.utility-link:hover {
    background: var(--cbon-primary-50);
    color: var(--primary);
}

.utility-link svg {
    width: 14px;
    height: 14px;
}

.lang-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0 4px;
}

.lang-label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0 6px;
}

.lang-btn {
    padding: 4px 10px;
    background: transparent;
    color: var(--muted);
    border: none;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lang-btn.active {
    background: var(--text);
    color: white;
}

/* --- 2. Hero（淺底 + mesh 漸層裝飾）--- */
.hero {
    padding: 32px 0 24px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: center;
    padding: 28px 22px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-layout::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.hero-layout::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-soft);
    opacity: 0.4;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-block;
    padding: 4px 10px;
    background: var(--cbon-primary-50);
    color: var(--primary-deep);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

.hero-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.hero-side {
    position: relative;
    z-index: 1;
}

.hero-side-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px;
}

/* --- 種植大師 · 全寬圖片按鍵（外站導流） --- */
.hero-feature-banner {
    max-width: 1280px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.hero-feature {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(5, 95, 70, 0.22);
    text-decoration: none;
    color: #ffffff;
    transition: transform var(--cbon-duration-base, 0.2s) var(--cbon-ease, ease),
                box-shadow var(--cbon-duration-base, 0.2s) var(--cbon-ease, ease);
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
}

.hero-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(5, 95, 70, 0.35);
}

.hero-feature-picture {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1024 / 651;
}

.hero-feature-picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--cbon-ease, ease);
}

.hero-feature:hover .hero-feature-picture img {
    transform: scale(1.03);
}

/* 底層漸層蒙版（讓文字清晰可讀；僅在有 overlay 文字的 slide 上套用，避免純圖海報被壓暗） */
.hero-feature.has-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,
        rgba(4, 47, 36, 0.55) 0%,
        rgba(4, 47, 36, 0.30) 18%,
        rgba(4, 47, 36, 0) 42%);
    pointer-events: none;
    z-index: 1;
}

.hero-feature-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 18px 22px;
    z-index: 2;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-feature-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.hero-feature-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.hero-feature-sub {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.92;
    line-height: 1.2;
}

.hero-feature-tag {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #4a2c00;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.hero-carousel {
    position: relative;
}

.hero-carousel-track {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(5, 95, 70, 0.22);
}

.hero-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.hero-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 0;
}

/* --- 載入中骨架屏（首次訪問、尚無快取時顯示） --- */
.hero-carousel-skeleton {
    aspect-ratio: 1024 / 651;
    border-radius: 18px;
    background: linear-gradient(110deg,
        rgba(6, 78, 59, 0.85) 0%,
        rgba(6, 95, 70, 0.85) 40%,
        rgba(4, 120, 87, 0.95) 50%,
        rgba(6, 95, 70, 0.85) 60%,
        rgba(6, 78, 59, 0.85) 100%);
    background-size: 250% 100%;
    background-position: 100% 0;
    box-shadow: 0 12px 32px rgba(5, 95, 70, 0.22);
    animation: hero-skeleton-shimmer 1.4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.hero-carousel-skeleton::after {
    content: "載入中…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes hero-skeleton-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-skeleton {
        animation: none;
        background-position: 50% 0;
    }
}

/* --- 快速選看其它海報（計數 + 縮圖橫向列表） --- */
.hero-carousel-quicknav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 4px;
    margin-top: 4px;
    border-top: 1px dashed rgba(5, 95, 70, 0.18);
}

.hero-carousel-counter {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted, #6b7280);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hero-carousel-counter::before {
    content: "海報 ";
}

.hero-carousel-thumbs {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(5, 95, 70, 0.35) transparent;
}

.hero-carousel-thumbs::-webkit-scrollbar {
    height: 6px;
}

.hero-carousel-thumbs::-webkit-scrollbar-thumb {
    background: rgba(5, 95, 70, 0.35);
    border-radius: 999px;
}

.hero-carousel-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.hero-carousel-thumb {
    flex-shrink: 0;
    width: 96px;
    padding: 0;
    border: 2px solid rgba(5, 95, 70, 0.15);
    border-radius: 10px;
    background: var(--surface, #fff);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s var(--cbon-ease, ease),
                border-color 0.2s var(--cbon-ease, ease),
                box-shadow 0.2s var(--cbon-ease, ease);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    font: inherit;
    color: inherit;
}

.hero-carousel-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1024 / 651;
    object-fit: cover;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
}

.hero-carousel-thumb-label {
    display: block;
    padding: 4px 6px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-carousel-thumb:hover {
    border-color: rgba(5, 95, 70, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 95, 70, 0.18);
}

.hero-carousel-thumb.is-active {
    border-color: #047857;
    box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.25),
                0 4px 12px rgba(5, 95, 70, 0.25);
}

.hero-carousel-thumb.is-active .hero-carousel-thumb-label {
    color: #047857;
    font-weight: 800;
}

.hero-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.hero-carousel-dot:hover {
    border-color: #ffffff;
}

.hero-carousel-dot.is-active {
    background: #ffffff;
    border-color: #ffffff;
}

@media (max-width: 640px) {
    .hero-feature-banner {
        padding: 0 12px;
        margin-bottom: 16px;
    }
    .hero-feature {
        border-radius: 14px;
    }
    .hero-feature-overlay {
        padding: 14px 16px;
        gap: 10px;
    }
    .hero-feature-title {
        font-size: 1.15rem;
    }
    .hero-feature-sub {
        font-size: 0.78rem;
    }
    .hero-feature-tag {
        padding: 3px 8px;
        font-size: 0.68rem;
    }
    .hero-carousel-track {
        border-radius: 14px;
    }
    .hero-carousel-dots {
        padding: 8px 0 0;
        gap: 6px;
    }
    .hero-carousel-dot {
        width: 8px;
        height: 8px;
    }
    .hero-carousel-quicknav {
        gap: 8px;
        padding: 10px 0 2px;
    }
    .hero-carousel-counter {
        font-size: 0.72rem;
    }
    .hero-carousel-thumb {
        width: 72px;
        border-radius: 8px;
    }
    .hero-carousel-thumb-label {
        font-size: 0.62rem;
        padding: 3px 4px;
    }
}

.hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.hero-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.hero-action:hover {
    background: var(--cbon-primary-50);
    border-color: var(--primary);
    color: var(--primary-deep);
    transform: translateY(-1px);
}

.hero-action svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.hero-action--primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.hero-action--primary svg {
    color: white;
}

.hero-action--primary:hover {
    background: var(--primary-deep);
    color: white;
    border-color: var(--primary-deep);
}

@media (min-width: 640px) {
    .hero-layout {
        grid-template-columns: 1.4fr 1fr;
    }
}

/* --- 3. Sections --- */
.section {
    padding: 24px 0;
}

.section.section-muted {
    background: var(--cbon-bg-soft);
    border-radius: var(--cbon-radius-lg);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}

.section-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
}

.section-head .section-sub {
    font-size: 0.78rem;
    color: var(--muted);
}

/* --- 4. 服務卡片網格（兩層）--- */
.primary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

@media (min-width: 640px) {
    .primary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .secondary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.15);
}

.service-card:hover::before {
    opacity: 1;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.card-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cbon-primary-50);
    color: var(--primary);
    border-radius: 10px;
}

.card-icon svg {
    width: 20px;
    height: 20px;
}

.card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 2px;
    line-height: 1.3;
}

.card-body p {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

/* tone 變體（卡片強調色，用在 icon 背景與邊條） */
.tone-blue .card-icon { background: #dbeafe; color: #1d4ed8; }
.tone-blue::before { background: #1d4ed8; }

.tone-green .card-icon { background: #d1fae5; color: #047857; }
.tone-green::before { background: #047857; }

.tone-violet .card-icon { background: #ede9fe; color: #6d28d9; }
.tone-violet::before { background: #6d28d9; }

.tone-amber .card-icon { background: #fef3c7; color: #b45309; }
.tone-amber::before { background: #b45309; }

.tone-rose .card-icon { background: #ffe4e6; color: #be123c; }
.tone-rose::before { background: #be123c; }

.tone-teal .card-icon { background: #ccfbf1; color: #0f766e; }
.tone-teal::before { background: #0f766e; }

.tone-cyan .card-icon { background: #cffafe; color: #155e75; }
.tone-cyan::before { background: #155e75; }

.tone-indigo .card-icon { background: #e0e7ff; color: #3730a3; }
.tone-indigo::before { background: #3730a3; }

.tone-slate .card-icon { background: #f1f5f9; color: #475569; }
.tone-slate::before { background: #475569; }

/* --- 5. 關於我們 --- */
.about {
    padding: 32px 0 16px;
}

.about-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 20px;
    box-shadow: var(--shadow);
}

.about-card h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.about-card p {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0 0 10px;
}

.about-card .about-lead {
    color: var(--muted);
    font-size: 0.85rem;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
}

@media (min-width: 640px) {
    .about-values {
        grid-template-columns: repeat(3, 1fr);
    }
}

.value-item {
    padding: 12px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border-soft);
}

.value-item h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}

.value-item p {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

/* --- 6. Footer --- */
.site-footer {
    padding: 24px 0 80px;
    border-top: 1px solid var(--border-soft);
    background: var(--surface);
    margin-top: 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-item {
    padding: 12px 14px;
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-item strong {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-item span {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
}

/* --- 7. AI 客服懸浮按鈕 --- */
#aiChatWidget {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: var(--cbon-z-modal);
}

.ai-chat-btn {
    width: 64px;
    height: 64px;
    border-radius: var(--cbon-radius-full);
    background: var(--cbon-surface);
    padding: 3px;
    border: 2px solid var(--cbon-accent);
    box-shadow: var(--cbon-shadow-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--cbon-duration-base) var(--cbon-ease), box-shadow var(--cbon-duration-base) var(--cbon-ease);
    overflow: hidden;
}

.ai-chat-btn:hover {
    transform: translateY(-2px) scale(1.03);
}

.ai-chat-btn:focus-visible {
    outline: 3px solid var(--cbon-primary-100);
    outline-offset: 3px;
}

.ai-chat-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    display: block;
}

/* --- 7b. AI 客服全螢幕/浮動視窗 --- */
.ai-chat-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    background: var(--cbon-bg-soft);
    display: flex;
    flex-direction: column;
    z-index: var(--cbon-z-modal);
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--cbon-duration-base) var(--cbon-ease-out), opacity var(--cbon-duration-base) var(--cbon-ease-out);
}

@media (min-width: 768px) {
    .ai-chat-window {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        transform: translateY(100%);
        transform-origin: center bottom;
    }
}

.ai-chat-window:not(.hidden) {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.ai-chat-window.hidden {
    display: none !important;
}

.ai-chat-header {
    background: var(--cbon-gradient);
    color: var(--cbon-text-inverse);
    padding: var(--cbon-space-3) var(--cbon-space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cbon-space-3);
    flex-shrink: 0;
    box-shadow: var(--cbon-shadow-sm);
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .ai-chat-header {
        border-radius: 0;
    }
}

.ai-header-left {
    display: flex;
    align-items: center;
    gap: var(--cbon-space-3);
    min-width: 0;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--cbon-radius-full);
    background: var(--cbon-surface);
    padding: 2px;
    flex-shrink: 0;
    box-shadow: var(--cbon-shadow-sm);
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--cbon-radius-full);
    object-fit: cover;
    display: block;
}

.ai-title {
    font-size: var(--cbon-text-base);
    font-weight: var(--cbon-weight-bold);
    line-height: var(--cbon-leading-tight);
}

.ai-status {
    font-size: var(--cbon-text-xs);
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: var(--cbon-space-1);
    line-height: var(--cbon-leading-tight);
    margin-top: 2px;
}

.ai-status::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--cbon-success);
    border-radius: var(--cbon-radius-full);
    display: inline-block;
    box-shadow: 0 0 4px var(--cbon-success);
}

.ai-header-right {
    display: flex;
    align-items: center;
    gap: var(--cbon-space-2);
    flex-shrink: 0;
}

.ai-login-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--cbon-text-inverse);
    height: 32px;
    border-radius: var(--cbon-radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--cbon-space-1);
    font-size: var(--cbon-text-xs);
    font-weight: var(--cbon-weight-medium);
    line-height: 1;
    padding: 0 var(--cbon-space-3);
    flex-shrink: 0;
    transition: background var(--cbon-duration-fast) var(--cbon-ease);
    max-width: 120px;
}

.ai-login-btn svg {
    flex-shrink: 0;
}

.ai-login-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-login-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ai-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--cbon-text-inverse);
    width: 32px;
    height: 32px;
    border-radius: var(--cbon-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--cbon-text-xl);
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: background var(--cbon-duration-fast) var(--cbon-ease);
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--cbon-space-4);
    background: var(--cbon-bg-soft);
    display: flex;
    flex-direction: column;
    gap: var(--cbon-space-4);
    min-height: 0;
    scroll-behavior: smooth;
}

.ai-chat-body > .ai-message,
.ai-chat-body > .quick-buttons {
    width: min(100%, 960px);
    margin-right: auto;
    margin-left: auto;
}

.ai-chat-body > .quick-buttons {
    box-sizing: border-box;
}

/* Custom Scrollbar for Chat Body */
.ai-chat-body::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.ai-chat-body::-webkit-scrollbar-thumb {
    background: var(--cbon-border);
    border-radius: var(--cbon-radius-full);
}
.ai-chat-body::-webkit-scrollbar-thumb:hover {
    background: var(--cbon-text-soft);
}

.ai-message.bot,
.ai-message.user {
    display: flex;
    width: 100%;
    flex-direction: column;
}

.ai-message.user {
    align-items: flex-end;
}

.ai-message.bot {
    align-items: flex-start;
}

.ai-bubble {
    padding: var(--cbon-space-3) var(--cbon-space-4);
    border-radius: var(--cbon-radius-xl);
    font-size: var(--cbon-text-sm);
    line-height: var(--cbon-leading-relaxed);
    max-width: 85%;
    word-wrap: break-word;
    background: var(--cbon-surface);
    border: 1px solid var(--cbon-border-soft);
    box-shadow: var(--cbon-shadow-sm);
}

.ai-bubble-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cbon-text-soft);
    font-size: var(--cbon-text-xs);
}

.ai-bubble-loading .typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-bubble-loading .typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--cbon-primary);
    border-radius: var(--cbon-radius-full);
    animation: ai-typing 1.4s infinite ease-in-out;
}

.ai-bubble-loading .typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-bubble-loading .typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.ai-bubble-loading .typing-dots span:nth-child(3) { animation-delay: 0s; }

.ai-message.bot .ai-bubble {
    border-bottom-left-radius: var(--cbon-radius-sm);
    color: var(--cbon-text);
}

.ai-message.user .ai-bubble {
    background: var(--cbon-gradient);
    color: var(--cbon-text-inverse);
    border: none;
    border-bottom-right-radius: var(--cbon-radius-sm);
    box-shadow: var(--cbon-shadow-primary);
}

.scroll-to-bottom-btn {
    position: absolute;
    right: var(--cbon-space-4);
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 36px;
    height: 36px;
    border-radius: var(--cbon-radius-full);
    background: var(--cbon-surface);
    color: var(--cbon-text);
    border: 1px solid var(--cbon-border);
    box-shadow: var(--cbon-shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity var(--cbon-duration-fast) var(--cbon-ease), transform var(--cbon-duration-fast) var(--cbon-ease);
}

.scroll-to-bottom-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-bottom-btn svg {
    width: 16px;
    height: 16px;
}

.ai-chat-footer {
    border-top: 1px solid var(--cbon-border-soft);
    padding: var(--cbon-space-3) var(--cbon-space-4) calc(var(--cbon-space-3) + env(safe-area-inset-bottom));
    display: block;
    background: var(--cbon-surface);
    flex-shrink: 0;
    box-shadow: var(--cbon-shadow-md);
    position: relative;
    z-index: 2;
}

.ai-composer-shell {
    display: flex;
    align-items: center;
    gap: var(--cbon-space-2);
    width: min(100%, 960px);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .ai-chat-footer {
        padding-bottom: var(--cbon-space-3);
    }
}

#aiChatInput {
    flex: 1;
    min-width: 0;
    padding: var(--cbon-space-2) var(--cbon-space-4);
    border: 1px solid var(--cbon-border);
    border-radius: var(--cbon-radius-full);
    font-size: var(--cbon-text-sm);
    outline: none;
    transition: border-color var(--cbon-duration-fast) var(--cbon-ease), box-shadow var(--cbon-duration-fast) var(--cbon-ease);
    background: var(--cbon-bg-soft);
    color: var(--cbon-text);
}

#aiChatInput:focus {
    border-color: var(--cbon-primary);
    background: var(--cbon-surface);
    box-shadow: 0 0 0 3px var(--cbon-primary-50);
}

#aiSendBtn {
    width: 40px;
    height: 40px;
    border-radius: var(--cbon-radius-full);
    background: var(--cbon-gradient);
    color: var(--cbon-text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: transform var(--cbon-duration-fast) var(--cbon-ease), box-shadow var(--cbon-duration-fast) var(--cbon-ease);
    box-shadow: var(--cbon-shadow-primary);
}

#aiSendBtn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

#aiSendBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    background: var(--cbon-text-soft);
}

#aiSendBtn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* 防止任何 AI 對話框內的 SVG 因為 <use> 預設尺寸而爆框 */
#aiChatWidget svg {
    max-width: 100%;
}

.hidden {
    display: none !important;
}

body.chat-open {
    overflow: hidden;
}

/* --- 8. Support-list（底部支援連結：icon + 文字）--- */
.support-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--cbon-border-soft);
    border-radius: var(--cbon-radius-md);
    color: var(--cbon-text);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.support-link:hover {
    transform: translateY(-1px);
    border-color: var(--cbon-primary-100);
    box-shadow: var(--cbon-shadow-md);
}

.support-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cbon-primary-50);
    color: var(--cbon-primary);
    border-radius: var(--cbon-radius-sm);
    flex-shrink: 0;
}

.support-icon svg {
    width: 18px;
    height: 18px;
}

.support-copy {
    flex: 1;
    min-width: 0;
}

.support-copy strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cbon-text);
}

/* --- 9. 語言切換條（與 shop 頁一致）--- */
.lang-switcher-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
}

/* --- 8. 響應式微調 --- */
@media (min-width: 640px) {
    .brand-subtitle {
        font-size: 0.78rem;
    }
    .hero-text {
        font-size: 1.6rem;
    }
    .section {
        padding: 32px 0;
    }
}

/* ==========================================================================
   首頁美化（中度整理）— 載入於 referral-capture.css 之後，覆蓋雙 CTA 視覺
   原則：保留 JS hook、保留連結、只動 CSS + 結構 class
   ========================================================================== */

/* --- A. Header 拋光（移除 index.html inline style） --- */
.mobile-header {
    padding: 12px 16px;
    gap: 12px;
}

.mobile-header .logo-area .home-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.mobile-header .home-logo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1;
}

.mobile-header .home-logo-title .home-logo-word {
    display: inline-block;
}

.mobile-header .home-logo-title .home-logo-word--top {
    background: var(--cbon-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

.mobile-header .home-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(234, 88, 12, 0.18);
    object-fit: cover;
}

/* --- B. Hero 強化 --- */
.hero {
    padding: 24px 0 16px;
}

.hero-layout {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 26px 22px 24px;
    border-radius: var(--cbon-radius-2xl);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(124, 58, 237, 0.10) 0%, transparent 45%),
        radial-gradient(120% 120% at 100% 0%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
        #ffffff;
}

.hero-layout::before {
    height: 5px;
    background: var(--gradient);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-text {
    font-size: 1.55rem;
    line-height: 1.25;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

.eyebrow {
    background: var(--cbon-primary-100);
    color: var(--primary-deep);
    padding: 5px 12px;
}

/* 信任數據帶 */
.hero-trust {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px dashed var(--border);
}

.hero-trust-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.hero-trust-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-deep);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.hero-trust-label {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
}

/* quick action 更立體 */
.hero-side-label {
    margin: 0 0 10px;
}

.hero-actions {
    gap: 10px;
}

.hero-action {
    padding: 16px 10px;
    border-radius: var(--cbon-radius-lg);
    gap: 7px;
    box-shadow: var(--cbon-shadow-sm);
}

.hero-action svg {
    width: 24px;
    height: 24px;
}

.hero-action--primary {
    box-shadow: var(--cbon-shadow-primary);
}

/* --- C. 推薦卡（已升為主推） --- */
.referral-cta {
    padding: 36px 0;
    background:
        radial-gradient(110% 130% at 0% 0%, rgba(124, 58, 237, 0.10) 0%, transparent 55%),
        linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    border-block: 1px solid var(--cbon-primary-100);
}

.referral-cta-shell {
    width: var(--shell);
    max-width: none;
    margin: 0 auto;
    gap: 28px;
}

.referral-cta-eyebrow {
    background: var(--cbon-primary-100);
    color: var(--primary-deep);
    margin-bottom: 14px;
}

.referral-cta-copy h2 {
    color: var(--text);
}

.referral-cta-copy p {
    color: var(--muted);
}

.referral-cta-steps li {
    border-color: var(--cbon-primary-100);
    background: rgba(255, 255, 255, 0.7);
}

.referral-cta-steps li strong {
    color: var(--primary);
}

/* 推薦卡按鈕改靛紫系 */
.referral-cta-actions .btn-primary {
    background: var(--cbon-gradient);
    box-shadow: var(--cbon-shadow-primary);
}

.referral-cta-actions .btn-primary:hover {
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.38);
}

.referral-cta-actions .btn-ghost {
    color: var(--primary);
    border-color: var(--primary);
}

.referral-cta-actions .btn-ghost:hover {
    background: var(--cbon-primary-50);
}

/* 推薦卡硬幣改靛紫、淡化縮小（次要視覺） */
.referral-cta-visual {
    height: 200px;
}

.referral-cta .cta-coin {
    background: var(--cbon-gradient);
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.28);
    opacity: 0.92;
}

.referral-cta .cta-coin--lg { width: 116px; height: 116px; font-size: 32px; }
.referral-cta .cta-coin--md { width: 78px; height: 78px; font-size: 18px; }
.referral-cta .cta-coin--sm { width: 54px; height: 54px; font-size: 24px; }

/* --- D. 服務卡片拋光 --- */
.primary-grid,
.secondary-grid {
    gap: 14px;
}

.service-card {
    padding: 18px 16px;
    border-radius: var(--cbon-radius-xl);
    min-height: 108px;
}

.service-card:hover {
    box-shadow: var(--cbon-shadow-lg);
}

.card-head {
    margin-bottom: 12px;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--cbon-radius-md);
}

.card-icon svg {
    width: 22px;
    height: 22px;
}

.card-body h3 {
    font-size: 1rem;
}

.card-body p {
    font-size: 0.8rem;
}

/* --- E. 支援連結 + Footer 拋光 --- */
.support-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.support-link {
    padding: 14px 16px;
    border-radius: var(--cbon-radius-lg);
}

.support-icon {
    width: 40px;
    height: 40px;
}

.support-icon svg {
    width: 20px;
    height: 20px;
}

.support-copy strong {
    font-size: 0.92rem;
}

.site-footer {
    padding-top: 28px;
}

.footer-item {
    padding: 14px 16px;
    border-radius: var(--cbon-radius-lg);
    gap: 6px;
}

.footer-item strong {
    font-size: 0.74rem;
}

.footer-item span {
    font-size: 0.86rem;
}

/* --- F. 桌機版面（≥768px 統一最大寬、兩欄 CTA、卡片放大） --- */
@media (min-width: 768px) {
    .mobile-header {
        padding: 14px 24px;
    }

    .mobile-header .home-logo-title {
        font-size: 1.5rem;
    }

    .mobile-header .home-logo-img {
        width: 48px;
        height: 48px;
    }

    .hero {
        padding: 36px 0 20px;
    }

    .hero-layout {
        grid-template-columns: 1.5fr 1fr;
        gap: 32px;
        padding: 36px 32px;
        align-items: center;
    }

    .hero-text {
        font-size: 2.1rem;
    }

    .hero-trust-num {
        font-size: 1.35rem;
    }

    .hero-trust-label {
        font-size: 0.78rem;
    }

    .referral-cta {
        padding: 48px 0;
    }

    .section {
        padding: 40px 0;
    }

    .section-head h2 {
        font-size: 1.35rem;
    }

    .primary-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .secondary-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .service-card {
        padding: 22px 18px;
        min-height: 120px;
    }

    .support-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- G. 小螢幕微調 --- */
@media (max-width: 360px) {
    .hero-text {
        font-size: 1.35rem;
    }
    .hero-action {
        padding: 12px 6px;
        font-size: 0.72rem;
    }
    .hero-trust-num {
        font-size: 0.98rem;
    }
    .hero-trust-label {
        font-size: 0.64rem;
    }
    .referral-cta-copy h2 {
        font-size: 1.35rem;
    }
}

/* ==========================================================================
   首頁活力升級（v3）— 更鮮活配色 + 更強層次感
   原則：純 CSS、0 額外資源、不動 HTML 結構 / i18n / JS hooks / 連結
        維持秒開；只加互動動效（hover/active/transform，GPU 加速）
   ========================================================================== */

/* --- V1. 多彩渐層 token（給色塊卡片用）--- */
:root {
    --tone-blue-grad: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --tone-green-grad: linear-gradient(135deg, #059669 0%, #34d399 100%);
    --tone-violet-grad: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --tone-amber-grad: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    --tone-rose-grad: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
    --tone-teal-grad: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
    --tone-cyan-grad: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%);
    --tone-indigo-grad: linear-gradient(135deg, #4338ca 0%, #818cf8 100%);
    --tone-pink-grad: linear-gradient(135deg, #db2777 0%, #f472b6 100%);
    --tone-amber2-grad: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
    --tone-slate-grad: linear-gradient(135deg, #475569 0%, #94a3b8 100%);
}

/* --- V2. Hero 多點 mesh 柔光（暖色系） --- */
.hero-layout {
    background:
        radial-gradient(60% 70% at 8% 0%, rgba(234, 88, 12, 0.16) 0%, transparent 55%),
        radial-gradient(55% 65% at 100% 5%, rgba(245, 158, 11, 0.16) 0%, transparent 55%),
        radial-gradient(60% 70% at 0% 100%, rgba(255, 107, 53, 0.12) 0%, transparent 55%),
        radial-gradient(55% 65% at 100% 95%, rgba(217, 70, 239, 0.08) 0%, transparent 55%),
        #ffffff;
}

.hero-layout::before {
    height: 6px;
    background: var(--gradient);
    box-shadow: 0 2px 12px rgba(234, 88, 12, 0.25);
}

/* 標題放大、暖色渐層 */
.hero-text {
    font-size: 1.7rem;
    line-height: 1.22;
    font-weight: 800;
    background: linear-gradient(120deg, #ea580c 0%, #ff6b35 45%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
    letter-spacing: -0.015em;
}

/* eyebrow 更鮮活（橙色渐層） */
.eyebrow {
    background: var(--gradient);
    color: #fff;
    padding: 5px 13px;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.22);
}

/* 信任數據帶 — 暖色渐層數字 */
.hero-trust {
    border-top: 1px solid var(--border-soft);
    padding-top: 16px;
}

.hero-trust-item:nth-child(1) .hero-trust-num {
    background: linear-gradient(120deg, #ea580c, #ff8a3d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-trust-item:nth-child(2) .hero-trust-num {
    background: linear-gradient(120deg, #d97706, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-trust-item:nth-child(3) .hero-trust-num {
    background: linear-gradient(120deg, #dc2626, #f87171);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-trust-num {
    font-size: 1.2rem;
    font-weight: 800;
}

/* Quick action — 主按鈕全漸層 + 次按鈕玻璃化 */
.hero-actions {
    gap: 10px;
}

.hero-action {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    transition: transform var(--cbon-duration-base) var(--cbon-ease),
                box-shadow var(--cbon-duration-base) var(--cbon-ease),
                border-color var(--cbon-duration-base) var(--cbon-ease);
}

.hero-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--cbon-shadow-lg);
}

/* 次按鈕各自的彩色 icon + 細邊（首個為 primary 不覆蓋） */
.hero-action:not(.hero-action--primary):nth-child(2) svg { color: #d97706; }
.hero-action:not(.hero-action--primary):nth-child(2):hover { border-color: #d97706; }

.hero-action:not(.hero-action--primary):nth-child(3) svg { color: #ea580c; }
.hero-action:not(.hero-action--primary):nth-child(3):hover { border-color: #ea580c; }

.hero-action--primary {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.32);
}

.hero-action--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.42);
}

/* --- V3. 服務卡 → 渐層色塊卡 --- */
.service-card {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    color: #fff;
    min-height: 116px;
    transition: transform var(--cbon-duration-base) var(--cbon-ease),
                box-shadow var(--cbon-duration-base) var(--cbon-ease);
}

/* 卡片底色 = 各 tone 渐層 */
.tone-blue .card-body h3 { color: #fff; }
.service-card.tone-blue { background: var(--tone-blue-grad); }
.service-card.tone-green { background: var(--tone-green-grad); }
.service-card.tone-violet { background: var(--tone-violet-grad); }
.service-card.tone-amber { background: var(--tone-amber-grad); }
.service-card.tone-rose { background: var(--tone-rose-grad); }
.service-card.tone-teal { background: var(--tone-teal-grad); }
.service-card.tone-cyan { background: var(--tone-cyan-grad); }
.service-card.tone-indigo { background: var(--tone-indigo-grad); }
.service-card.tone-slate { background: var(--tone-slate-grad); }

/* 討論區用 pink（index.html 是 tone-violet，這裡保留 violet 不誤改）*/

/* 卡片光暈裝飾（偽元素，GPU 友善） */
.service-card::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -30%;
    width: 130%;
    height: 130%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 60%);
    pointer-events: none;
    transition: transform var(--cbon-duration-slow) var(--cbon-ease-out);
}

.service-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 18px 40px rgba(15, 17, 38, 0.22);
}

.service-card:hover::after {
    transform: translate(-8%, 8%);
}

/* icon 圈改白玻璃 */
.service-card .card-icon {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.service-card .card-body p {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

/* 覆蓋舊的 ::before 彩色頂條（渐層卡不需要頂條） */
.service-card::before {
    display: none;
}

/* --- V4. 支援連結 + footer 拋光（彩色化）--- */
.support-link {
    border: 1px solid var(--border);
    transition: transform var(--cbon-duration-base) var(--cbon-ease),
                box-shadow var(--cbon-duration-base) var(--cbon-ease),
                border-color var(--cbon-duration-base) var(--cbon-ease);
}

.support-link:nth-child(1) .support-icon { background: #eef2ff; color: #4338ca; }
.support-link:nth-child(2) .support-icon { background: #fff7ed; color: #ea580c; }
.support-link:nth-child(3) .support-icon { background: #ecfdf5; color: #059669; }
.support-link:nth-child(4) .support-icon { background: #f0f9ff; color: #2563eb; }
.support-link:nth-child(5) .support-icon { background: #fdf2f8; color: #db2777; }
.support-link:nth-child(6) .support-icon { background: #f5f3ff; color: #7c3aed; }

.support-link:nth-child(1):hover { border-color: #4338ca; transform: translateY(-2px); }
.support-link:nth-child(2):hover { border-color: #ea580c; transform: translateY(-2px); }
.support-link:nth-child(3):hover { border-color: #059669; transform: translateY(-2px); }
.support-link:nth-child(4):hover { border-color: #2563eb; transform: translateY(-2px); }
.support-link:nth-child(5):hover { border-color: #db2777; transform: translateY(-2px); }
.support-link:nth-child(6):hover { border-color: #7c3aed; transform: translateY(-2px); }

/* footer 標題渐層化（橙色） */
.site-footer .section-head h2 {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

.footer-item {
    border-left: 3px solid var(--primary);
    transition: box-shadow var(--cbon-duration-base) var(--cbon-ease);
}

.footer-item:hover {
    box-shadow: var(--cbon-shadow-md);
}

.footer-item:nth-child(1) { border-left-color: #ea580c; }
.footer-item:nth-child(2) { border-left-color: #d97706; }
.footer-item:nth-child(3) { border-left-color: #c2410c; }
.footer-item:nth-child(4) { border-left-color: #f59e0b; }

/* --- V5. 桌機放大（v3） --- */
@media (min-width: 768px) {
    .hero-text {
        font-size: 2.6rem;
    }
    .hero-trust-num {
        font-size: 1.5rem;
    }
    .service-card {
        min-height: 132px;
    }
}

/* --- V6. 區段標題渐層化（橙色）--- */
.section-head h2 {
    background: linear-gradient(120deg, #ea580c, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

/* --- V7. AI 客服按鈕微脈動（橙色光暈）--- */
@keyframes cbon-chat-pulse {
    0%, 100% { box-shadow: var(--cbon-shadow-accent); }
    50% { box-shadow: var(--cbon-shadow-lg), var(--cbon-shadow-accent); }
}

.ai-chat-btn {
    animation: cbon-chat-pulse 2.6s var(--cbon-ease) infinite;
}

.ai-chat-btn:hover {
    animation-play-state: paused;
}

/* --- V8. 尊重 reduced-motion（無障礙 + 省電）--- */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .hero-action,
    .support-link,
    .service-card::after {
        transition: none;
    }
    .ai-chat-btn {
        animation: none;
    }
}

/* ==========================================================================
   WhatsApp QR — 整列變大觸控區
   把 .cbon-trust-item--wa 整個 badge 列變成 <a>，點擊範圍從 40×40px
   擴大到整個 grid cell（手機上一整列可點）。
   ========================================================================== */
.cbon-trust-item--wa-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--tb-bg, #ffffff);
    border: 1px solid transparent;
    border-radius: var(--tb-radius-md, 12px);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
    -webkit-tap-highlight-color: rgba(234, 88, 12, 0.12);
}

.cbon-trust-item--wa-link:hover,
.cbon-trust-item--wa-link:focus-visible {
    border-color: var(--tb-border, #e3e6f0);
    transform: translateY(-1px);
    outline: none;
}

.cbon-trust-item--wa-link:focus-visible {
    border-color: var(--tb-accent, #ff6b35);
}

.cbon-trust-item--wa-link:active {
    transform: translateY(0);
    background: var(--tb-bg-soft, #f8f9ff);
}

/* 內部 QR 圖示 span 仍保留原本外觀（白底+邊框） */
.cbon-trust-item--wa-link .cbon-trust-icon--qr {
    flex-shrink: 0;
    padding: 3px;
    background: #ecfdf5;
    border: 1px solid var(--tb-border, #e3e6f0);
    overflow: hidden;
    transition: transform 200ms ease, border-color 200ms ease;
}

.cbon-trust-item--wa-link:hover .cbon-trust-icon--qr {
    border-color: var(--tb-accent, #ff6b35);
    transform: scale(1.05);
}

.cbon-trust-item--wa-link .cbon-trust-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* reduced motion：取消 transform 動畫 */
@media (prefers-reduced-motion: reduce) {
    .cbon-trust-item--wa-link,
    .cbon-trust-item--wa-link .cbon-trust-icon--qr {
        transition: none;
    }
    .cbon-trust-item--wa-link:hover .cbon-trust-icon--qr {
        transform: none;
    }
}
