:root {
    color-scheme: light dark;
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #ffffff;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Compose mounts on #compose-root and sizes its canvas from clientHeight,
   which includes padding — so the safe-area insets must live on the outer
   frame, not on the mount node. 100dvh tracks Chrome's collapsing chrome. */
.safe-area-frame {
    box-sizing: border-box;
    width: 100vw;
    height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
}

#compose-root {
    position: relative;
    width: 100%;
    height: 100%;
}

@media (prefers-color-scheme: dark) {
    html, body {
        background-color: #000000;
        color: #e0e0e0;
    }
}

.loader-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 280px;
    max-width: 80vw;
}

.spinner {
    display: block;
}

.progress-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.app-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.2px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(128, 128, 128, 0.18);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: currentColor;
    border-radius: 2px;
    transition: width 0.18s ease-out;
}

.progress-pct {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
    text-align: center;
    width: 100%;
}

.progress-status {
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.6;
    min-height: 1em;
}

.app-promo {
    margin-top: 28px;
    font-size: 12px;
    opacity: 0.55;
    text-align: center;
    line-height: 1.5;
}

.app-promo a {
    color: inherit;
    text-decoration: underline;
}

.app-promo a:hover {
    opacity: 0.85;
}
