html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #F2F1EE;
}

/* ---- Loading screen (until the app's first frame) ---- */
#loading {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #F2F1EE;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: #16181D;
    transition: opacity 0.25s ease;
}
#loading.loading-done { opacity: 0; pointer-events: none; }
.loading-card {
    width: 100%;
    max-width: 320px;
    text-align: center;
}
.loading-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    border-radius: 24px;
    background: #FFFFFF;
    border: 1px solid #E2E0DA;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-name { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.loading-text { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.loading-bar {
    position: relative;
    height: 6px;
    margin: 0 auto;
    max-width: 220px;
    border-radius: 3px;
    background: #E2E0DA;
    overflow: hidden;
}
.loading-bar span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    border-radius: 3px;
    background: #F2B544;
    animation: loading-slide 1.2s ease-in-out infinite;
}
@keyframes loading-slide {
    from { right: -40%; }
    to { right: 100%; }
}
.loading-hint { margin-top: 14px; font-size: 13px; color: #5E616B; line-height: 1.8; }
.loading-stopped .loading-bar { display: none; }
.loading-retry {
    margin-top: 18px;
    padding: 12px 28px;
    border: 0;
    border-radius: 14px;
    background: #F2B544;
    color: #16181D;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
    .loading-bar span { animation-duration: 3s; }
}
