/* perf-fixes.css — 手機 LCP 修正（批次 C）
   放置：wwwroot/css/perf-fixes.css，在 _Layout 的 site-fixes.css「之後」載入：
   <link rel="stylesheet" href="~/css/perf-fixes.css" asp-append-version="true" />  */

/* 1) 首屏文字不要從 opacity:0 淡入。
      目前 .hero-label/.hero-title/.hero-subtitle/.hero-actions 先是 opacity:0，再用 0.8 秒動畫淡入，
      透明期間的元素不算 LCP 候選，加上主執行緒忙碌（Lighthouse 5.2 秒），LCP 被拖到很後面。
      保留往上滑的動畫，只拿掉透明。 */
.hero-label,
.hero-title,
.hero-subtitle,
.hero-actions {
    opacity: 1 !important;
    animation-name: heroRiseNoFade !important;
}
@keyframes heroRiseNoFade {
    from { transform: translateY(12px); }
    to   { transform: none; }
}

/* 2) 小精靈、動物點綴在 JS 初始化前不顯示，<img> 也就不會被下載，不會變成 LCP 元素。
      fx-idle-loader.js 會在頁面載入完成且瀏覽器空閒時，替 <html> 加上 fx-ready。 */
html:not(.fx-ready) .sp-btn,
html:not(.fx-ready) #toyAccents,
html:not(.fx-ready) .pc-prop {
    display: none !important;
}

/* 3) 地圖 iframe 改成點擊才載入（見 _Layout_效能片段.cshtml 的 map-facade） */
.map-facade {
    display: flex; align-items: center; justify-content: center;
    width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 12px;
    background: #e8f5e9 center / cover no-repeat; cursor: pointer;
    font-weight: 700; color: #14532d;
}
