/* Shared geometry keeps the boot screen continuous across the page handoff. */
.os-boot {
    position: fixed; inset: 0; z-index: 30000; width: 100%; max-width: none;
    height: 100dvh; max-height: none; margin: 0; padding: 24px; border: 0;
    box-sizing: border-box; background: #202023; color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.os-boot[open], .kellyos-arriving .os-boot--arrival { display: grid; place-items: center; }
.os-boot--arrival { display: none; }
.os-boot::backdrop { background: transparent; }
.os-boot-content { width: min(240px, 100%); text-align: center; }
.os-boot p { margin: 0; font: 13px/1.65 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; color: #eee; }
.os-boot-track { display: block; height: 3px; margin: 20px auto 0; overflow: hidden; border-radius: 4px; background: #ffffff20; }
.os-boot-track > span { display: block; height: 100%; border-radius: inherit; background: #eee; transform: scaleX(.72); transform-origin: left; }
.os-boot-cancel { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); border: 0; padding: 10px; background: transparent; color: #aaa; font-family: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; transition: opacity 200ms ease; }
.os-boot-cancel:focus-visible { outline: 2px solid #eee; outline-offset: 5px; }
.os-boot[open] { background: #fff; animation: os-boot-enter 420ms ease both; transition: background-color 600ms ease-in-out; }
.os-boot[open]:not([data-phase="white"]) { background: #202023; }
.os-boot[open] .os-boot-content { opacity: 0; transform: translateY(4px); transition: opacity 260ms ease, transform 320ms ease; }
.os-boot[open][data-phase="loading"] .os-boot-content { opacity: 1; transform: none; }
.os-boot[open] .os-boot-track > span { transform: scaleX(.02); transition: transform 800ms cubic-bezier(.2,.6,.3,1); }
.os-boot[open][data-phase="loading"] .os-boot-track > span { transform: scaleX(.72); }
.os-boot-terminal { position: absolute; top: 50%; left: 50%; width: min(320px, calc(100% - 48px)); transform: translate(-50%, -50%); color: #fff; font: 13px/1.9 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; opacity: 0; transition: opacity 180ms ease; }
.os-boot-terminal > span { display: block; opacity: 0; }
.os-boot[data-phase="terminal"] .os-boot-terminal { opacity: 1; }
.os-boot[data-phase="terminal"] .os-boot-terminal > span { animation: os-terminal-line 160ms ease both; }
.os-boot[data-phase="terminal"] .os-boot-terminal > span:nth-child(2) { animation-delay: 260ms; }
.os-boot[data-phase="terminal"] .os-boot-terminal > span:nth-child(3) { animation-delay: 520ms; }
.os-boot[data-phase="clearing"] .os-boot-terminal > span { opacity: 1; }
.os-boot-cursor { display: inline-block; width: 7px; height: 13px; margin-left: 8px; vertical-align: -2px; background: currentColor; }
.os-boot[data-phase="white"] .os-boot-cancel, .os-boot[data-phase="dark"] .os-boot-cancel { opacity: 0; }
.os-boot.is-handing-off .os-boot-cancel { opacity: 0; }
.os-boot--arrival .os-boot-track > span { transition: transform 360ms ease; }
.os-boot--arrival.is-ready .os-boot-track > span { transform: scaleX(1); }
.os-boot--arrival.is-revealing { opacity: 0; transition: opacity 650ms cubic-bezier(.3,0,.3,1); }
.os-boot--arrival.is-revealing .os-boot-content { opacity: 0; transform: translateY(-6px); transition: opacity 180ms ease, transform 400ms ease; }
.kellyos-arriving { background: #202023; }
.kellyos-arriving .os-shell { pointer-events: none; }
@keyframes os-boot-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes os-terminal-line { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .os-boot, .os-boot *, .os-boot[open], .os-boot[open] .os-boot-content, .os-boot[open] .os-boot-track > span { animation: none !important; transition: none !important; }
}
