/* Only the existing boot notice. No script, form, or recharge-state changes. */
.hongyun-page-boot {
    position: fixed;
    top: 0.75rem;
    right: 1rem;
    left: 1rem;
    z-index: 10000;
    box-sizing: border-box;
    width: auto;
    max-width: 40rem;
    max-height: calc(100vh - 1.5rem);
    margin: 0 auto;
    padding: 0.625rem 1rem;
    overflow: auto;
    border: 1px solid #d9a441;
    border-radius: 0.5rem;
    background: #fff8e8;
    color: #5b4010;
    font: 0.8125rem/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
    text-align: center;
    overflow-wrap: anywhere;
    visibility: visible;
}

.hongyun-page-boot p { margin: 0; }
.hongyun-page-boot__reload {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    color: #694707;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    touch-action: manipulation;
}
.hongyun-page-boot__reload:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 3px;
    border-radius: 0.125rem;
}

/* A working watcher owns its 20-second timeout; ordinary loading stays quiet. */
.hongyun-page-boot[hidden],
html[data-hongyun-page-boot="watching"] .hongyun-page-boot,
html[data-hongyun-page-boot="ready"] .hongyun-page-boot {
    display: none !important;
}

html[data-hongyun-page-boot="failed"] .hongyun-page-boot {
    animation: none;
    visibility: visible;
}

/* The static href and noscript message also survive a missing bootstrap.
   Hiding belongs to the animation, NOT a persistent visibility:hidden rule:
   unsupported/disabled animations therefore leave the static fallback usable.
   This is a discrete visibility timer, not motion; do not remove it merely for
   prefers-reduced-motion. Fixed positioning avoids moving page content. */
@supports (animation-name: hongyun-page-boot-fallback) {
    html:not([data-hongyun-page-boot]) .hongyun-page-boot {
        animation: hongyun-page-boot-fallback 1ms step-end 20s both;
    }
}

@keyframes hongyun-page-boot-fallback {
    from { visibility: hidden; }
    to { visibility: visible; }
}
