/*
 * 首屏 splash（純 CSS，不需 JS）。
 *
 * 為什麼要它（Abin 2026-10-18）：手機從 LINE 進來時，React 還沒載入前是白屏，
 * 每次整頁載入都「白閃」一次 → 看起來像跳很多次畫面。
 * 做法：splash 直接寫在 index.html 的 #root 裡，React createRoot().render 會覆蓋掉它，
 * 所以不需要任何 JS 去移除，也不需要 inline style（CSP 友善）。
 */
#app-splash {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #f5f5f4;
    color: #44403c;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    z-index: 9999;
}

html.dark #app-splash {
    background: #1c1917;
    color: #e7e5e4;
}

#app-splash .splash-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

#app-splash .splash-gem {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, #a8a29e, #78716c);
    transform: rotate(45deg);
}

#app-splash .splash-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(120, 113, 108, 0.25);
    border-top-color: #78716c;
    animation: splash-rotate 0.8s linear infinite;
}

html.dark #app-splash .splash-spinner {
    border-color: rgba(231, 229, 228, 0.2);
    border-top-color: #d6d3d1;
}

#app-splash .splash-text {
    font-size: 0.8125rem;
    color: #78716c;
}

html.dark #app-splash .splash-text {
    color: #a8a29e;
}

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