html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #FFFFFF;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

#ComposeTarget {
    width: 100vw;
    height: 100vh;
    display: block;
}

/* === 加载 overlay 样式 === */
/* 覆盖 wasm 下载期白屏；
   背景/边框/文字色与 PhotoStampColors 对齐，
   spinner teal 为加载态专用色（设计系统未定义，来自 favicon.svg 渐变起点） */
#loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #F5F5F4;
    transition: opacity 300ms ease-out;
    z-index: 9999; /* 确保覆盖在 ComposeTarget canvas 之上 */
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E5E5;
    border-top-color: #0D9488;
    border-radius: 50%;
    box-sizing: border-box; /* 外径 = 40px，与 Compose Canvas drawCircle(radius=18dp)+Stroke(4dp) 外径对齐 */
    animation: spin 0.9s linear infinite; /* 0.9s 一圈，与 Compose LoadingScreen 旋转周期对齐 */
}

.loading-text {
    color: #0A0A0A;
    font-size: 13px;
    letter-spacing: 0.1em;
}

/* 跟随系统深色模式 */
@media (prefers-color-scheme: dark) {
    #loading-overlay {
        background: #1C1C1E;
    }
    .spinner {
        border-color: #38383A;
        border-top-color: #14B8A6;
    }
    .loading-text {
        color: #FFFFFF;
    }
}

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