#keStartup {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    display: grid;
    place-items: safe center;
    overflow: auto;
    padding: 24px;
    background: #f7f2fc;
    color: #201535;
    font: 16px/1.5 system-ui, sans-serif;
}
#keStartup[hidden], #keStartup [hidden] { display: none !important; }
#keStartup > div {
    width: min(100%, 440px);
    box-sizing: border-box;
    padding: clamp(24px, 7vw, 44px);
    background: #fff;
    border: 1px solid #e5dcef;
    border-radius: 28px;
    text-align: center;
}
.ke-startup-indicator {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
    display: grid;
    place-items: center;
}
.ke-startup-indicator img { width: 60px; height: 60px; border-radius: 16px; }
.ke-startup-indicator::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 5px solid #e9dcfa;
    border-top-color: #7025dc;
    border-radius: 50%;
    animation: ke-startup-spin 1.1s linear infinite;
}
@keyframes ke-startup-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .ke-startup-indicator::before { animation: none; }
}
#keStartup h1 { font-size: clamp(23px, 5vw, 28px); line-height: 1.25; margin: 0 0 10px; }
#keStartup p { color: #655776; margin: 0; }
#keStartup .ke-startup-actions { display: grid; gap: 8px; margin-top: 24px; }
#keStartup button, #keStartup a {
    display: inline-grid;
    place-items: center;
    min-height: 44px;
    padding: 8px 16px;
    box-sizing: border-box;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #6221c5;
    font: 650 15px/1.4 system-ui, sans-serif;
    cursor: pointer;
}
#keStartup button { background: #7025dc; color: #fff; }
#keStartup :is(button, a):focus-visible { outline: 3px solid #9a73e1; outline-offset: 3px; }

/* KEdu Learning Pulse — shared across the study workspace. */
#keStartup{background:radial-gradient(ellipse at 50% 42%,#fff 0,#f7f2ff 50%,#eee5fc 100%)}
#keStartup>div{border:0;box-shadow:0 20px 80px #6e33bd13}
.ke-startup-indicator{width:112px;height:112px;margin:0 auto 22px;background:radial-gradient(circle,#f3eaff 0 48%,transparent 49%)}
.ke-startup-indicator img{width:64px;height:64px;object-fit:contain;animation:ke-learning-breathe 2.4s ease-in-out infinite}
.ke-startup-indicator::before{inset:5px;border:2px dashed #b99ae8;border-top-color:#8c4bdc;animation:ke-startup-spin 6s linear infinite}
.ke-startup-indicator::after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 50% 3%,#7130d3 0 4px,transparent 5px),radial-gradient(circle at 97% 50%,#b695f0 0 3px,transparent 4px),radial-gradient(circle at 50% 97%,#8b51df 0 3px,transparent 4px);animation:ke-startup-spin 3.2s linear infinite}
@keyframes ke-learning-breathe{0%,100%{transform:scale(.93);opacity:.85}50%{transform:scale(1.06);opacity:1}}
@keyframes ke-learning-pages{0%,100%{transform:scaleY(.62);opacity:.55}50%{transform:scaleY(1);opacity:1}}
@keyframes ke-learning-dots{0%,100%{opacity:.4}50%{opacity:1}}
.ke-learning-pulse{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;min-height:120px;padding:20px 12px;box-sizing:border-box;color:#67527f;font:500 14px/1.5 system-ui,sans-serif}
.ke-learning-pulse::before{content:'';display:block;flex:none;width:58px;height:58px;border-radius:17px;background:#f0e6fc url('/kedu-logo.png') center/40px 40px no-repeat;box-shadow:0 0 0 6px #f8f3ff;animation:ke-learning-breathe 2.4s ease-in-out infinite}
.ke-learning-pulse::after{content:'';display:block;width:40px;height:7px;background:radial-gradient(circle at 4px 50%,#6732c9 0 3px,transparent 3.5px),radial-gradient(circle at 20px 50%,#9c70df 0 3px,transparent 3.5px),radial-gradient(circle at 36px 50%,#c9b1ef 0 3px,transparent 3.5px);animation:ke-learning-dots 1.4s ease-in-out infinite}
.ke-learning-pulse[hidden],.ke-learning-inline[hidden]{display:none!important}
.ke-learning-inline::before{content:'';display:inline-block;vertical-align:middle;width:19px;height:19px;margin-right:7px;border-radius:6px;background:#f0e6fc url('/kedu-logo.png') center/15px 15px no-repeat;animation:ke-learning-breathe 2.4s ease-in-out infinite}
body.kedu-app :is(.fa-spinner,.fa-circle-notch,.fa-sync,.fa-rotate,.fa-sync-alt).fa-spin{display:inline-block;width:20px;height:20px;vertical-align:middle;background:#f0e6fc url('/kedu-logo.png') center/16px 16px no-repeat;border-radius:6px;animation:ke-learning-breathe 2.4s ease-in-out infinite}
body.kedu-app :is(.fa-spinner,.fa-circle-notch,.fa-sync,.fa-rotate,.fa-sync-alt).fa-spin::before{content:none}
@media(prefers-reduced-motion:reduce){.ke-startup-indicator img,.ke-startup-indicator::before,.ke-startup-indicator::after,.ke-learning-pulse::before,.ke-learning-pulse::after,.ke-learning-inline::before,body.kedu-app :is(.fa-spinner,.fa-circle-notch,.fa-sync,.fa-rotate,.fa-sync-alt).fa-spin{animation:none!important}}

body.kedu-app .kedu-chat-loading-card .kedu-chat-logo{font-size:0;background:#f0e6fc url('/kedu-logo.png') center/70% no-repeat;animation:ke-learning-breathe 2.4s ease-in-out infinite}
body.kedu-app .kedu-chat-loading-card .kedu-loading-line{background:linear-gradient(90deg,#f1e8fc,#bba0ee,#f1e8fc);background-size:200% 100%;animation:ke-learning-shimmer 1.6s ease-in-out infinite}
@keyframes ke-learning-shimmer{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){body.kedu-app .kedu-chat-loading-card .kedu-chat-logo,body.kedu-app .kedu-chat-loading-card .kedu-loading-line{animation:none!important}}
