/* 使用 Noto Sans TC 作為主要中文字體，Inter 作為英文字體 */
body {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* 移除行動裝置點擊時的藍色背景 */
}

/* 平滑展開/收合：今日市場行情面板 */
#daily-highlight-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 240ms ease, opacity 200ms ease;
    will-change: max-height, opacity;
}

#daily-highlight-panel.is-open {
    /* 交由 JS 以 inline style 控制 max-height，避免內容被截斷 */
    opacity: 1;
}

/* 價格跳動動畫（輕微脈衝） */
@keyframes price-jump {
    0% {
        opacity: 1;
        transform: translateZ(0) scale(1);
    }

    35% {
        opacity: 0.92;
        transform: translateZ(0) scale(1.06);
    }

    70% {
        opacity: 1;
        transform: translateZ(0) scale(0.995);
    }

    100% {
        opacity: 1;
        transform: translateZ(0) scale(1);
    }
}

.animate-price-jump {
    animation: price-jump 800ms ease-in-out 0s 2;
    transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: reduce) {
    .animate-price-jump {
        animation: none !important;
    }
}

/* 浮動最新平均批發價 Bar */
#floating-daily-bar {
    position: fixed;
    top: 0;
    left: 0;
    /* 將以 JS 設定正確 left 與 width */
    z-index: 50;
    display: none;
    /* 依滾動狀態顯示 */
    background: #111827;
    /* gray-900 */
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#floating-daily-bar .bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    /* 高度自適應+適當 padding */
    gap: 12px;
}

#floating-daily-bar .date {
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

#floating-daily-bar .price {
    font-weight: 600;
    font-size: 18px;
}

#floating-daily-bar .unit {
    margin-left: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

/* 頁尾 Footer */
#page-footer {
    margin-top: 24px;
    padding: 16px;
    text-align: center;
    color: #6B7280;
    /* gray-500 */
}

#page-footer button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111827;
    /* gray-900 */
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}