/* The first paint precedes the application's CSS reset. */
html, body {
    margin: 0;
    background: #fff7ed;
}

.qook-boot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    background: #fff7ed;
    color: #382519;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    text-align: center;
}

.qook-boot.qook-boot--full {
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(24px, var(--app-safe-top, 0px)) max(24px, var(--app-safe-right, 0px)) max(24px, var(--app-safe-bottom, 0px)) max(24px, var(--app-safe-left, 0px));
}

.qook-boot--content {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
}

.qook-boot__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    width: 100%;
    padding-top: 30px;
    margin-block: auto;
}

.qook-boot__brand > img { margin-top: 20px; }

.qook-boot__mark {
    position: relative;
    width: clamp(64px, 18vmin, 112px);
    height: clamp(64px, 18vmin, 112px);
    flex-shrink: 0;
    animation: qook-mark-settle 600ms cubic-bezier(.2, .75, .25, 1) both;
}

.qook-boot__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qook-boot__mark--compact {
    width: 44px;
    height: 44px;
    animation: none;
}

.qook-boot__steam {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.qook-boot__steam i {
    width: 5px;
    height: 18px;
    border-left: 1.5px solid #c7783d;
    border-radius: 50%;
    opacity: 0;
    animation: qook-steam 2200ms ease-in-out infinite;
}

.qook-boot__steam i:nth-child(2) { animation-delay: 250ms; }
.qook-boot__steam i:nth-child(3) { animation-delay: 500ms; }

.qook-boot__name {
    margin: 20px 0 0;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -1.2px;
}

.qook-boot__tagline {
    margin: 12px 0 0;
    color: #7b6351;
    font-size: 13px;
    line-height: 1.6;
}

.qook-boot__status {
    margin: 28px 0 0;
    color: #866c57;
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: .2px;
}

.qook-boot--section .qook-boot__brand { padding-top: 0; }

.qook-boot--section .qook-boot__name {
    margin-top: 12px;
    font-size: 18px;
    letter-spacing: -.4px;
}

.qook-boot--section .qook-boot__status { margin-top: 8px; }
.qook-recovery-loading {
    display: flex;
    height: 100%;
    min-height: 0;
    padding: 0;
    background: #fff7ed;
}
.qook-recovery-fill {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.qook-boot-overlay { background: rgb(56 37 25 / 16%); }
.qook-boot-panel { background: #fffaf4; border: 1px solid #ffedd5; }
.qook-dashboard-skeleton { overflow: hidden; background: #fff7ed; }

.qook-dashboard-shimmer {
    background: linear-gradient(100deg, #f3e9df 20%, #faf5ee 45%, #f3e9df 70%);
    background-size: 240% 100%;
    animation: qook-dashboard-shimmer 2400ms ease-in-out infinite;
}

@keyframes qook-mark-settle {
    from { transform: translateY(3px) scale(.985); }
    to { transform: translateY(0) scale(1); }
}

@keyframes qook-steam {
    0% { opacity: 0; transform: translateY(4px) scaleY(.8); }
    35% { opacity: .45; }
    100% { opacity: 0; transform: translateY(-12px) scaleY(1.2); }
}

@keyframes qook-dashboard-shimmer {
    from { background-position: 150% 0; }
    to { background-position: -150% 0; }
}

@media (max-height: 450px) {
    .qook-boot { padding: 12px; }
    .qook-boot.qook-boot--full {
        padding: max(12px, var(--app-safe-top, 0px)) max(12px, var(--app-safe-right, 0px)) max(12px, var(--app-safe-bottom, 0px)) max(12px, var(--app-safe-left, 0px));
    }
    .qook-boot__brand { padding-top: 24px; }
    .qook-boot__brand > img { height: 32px; margin-top: 12px; }
    .qook-boot__tagline { display: none; }
    .qook-boot__status { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .qook-boot__mark, .qook-boot__steam i, .qook-dashboard-shimmer { animation: none; }
    .qook-boot__steam { display: none; }
}
