* { box-sizing: border-box; }

:root {
    color: #16324f;
    background: #fbfdff;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

html, body { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background-color: #fbfdff;
    background-image: linear-gradient(rgba(29, 110, 143, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 110, 143, .055) 1px, transparent 1px);
    background-size: 42px 42px;
}

.ambient-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.shell, .launch-shell { position: relative; z-index: 1; }
.browser-guide { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; background: radial-gradient(130% 100% at 50% -10%, rgba(209, 250, 229, .78), rgba(251, 253, 255, .94) 58%); backdrop-filter: blur(16px); animation: guide-fade .3s ease both; }
.browser-guide[hidden] { display: none; }
.browser-guide-dialog { position: relative; width: min(360px, 100%); padding: 40px 28px 28px; overflow: hidden; border: 1px solid rgba(16, 185, 129, .18); border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 30px 70px -20px rgba(15, 90, 78, .28), 0 8px 24px rgba(15, 90, 78, .08), inset 0 0 0 1px rgba(255, 255, 255, .7); text-align: center; animation: guide-rise .38s cubic-bezier(.22, .9, .28, 1) both; }
.browser-guide-dialog::before { position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, #34d399 35%, #2563eb 65%, transparent); content: ""; opacity: .85; }
.guide-aura { position: absolute; top: -96px; left: 50%; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, .28), transparent 66%); transform: translateX(-50%); pointer-events: none; }
.browser-guide-icon { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 20px; color: #fff; background: linear-gradient(155deg, #34d399, #0f9f7b); box-shadow: 0 12px 26px -8px rgba(15, 159, 123, .55), inset 0 1px 0 rgba(255, 255, 255, .45); }
.browser-guide-icon::after { position: absolute; inset: -9px; border: 1px solid rgba(16, 185, 129, .22); border-radius: 26px; content: ""; animation: guide-pulse 2.8s ease-in-out infinite; }
.browser-guide-icon svg { width: 30px; height: 30px; }
.browser-guide h1 { margin: 0; color: #16324f; font-size: 20px; font-weight: 700; line-height: 1.4; }
.browser-guide-desc { margin: 10px 0 0; color: #6a879b; font-size: 13px; line-height: 1.7; }
.guide-steps { display: grid; gap: 10px; margin: 22px 0 0; padding: 16px 18px; border: 1px solid rgba(16, 185, 129, .16); border-radius: 14px; background: linear-gradient(180deg, rgba(236, 253, 245, .9), rgba(240, 253, 250, .6)); list-style: none; text-align: left; }
.guide-steps li { display: flex; align-items: center; gap: 12px; color: #2d5976; font-size: 13.5px; line-height: 1.5; }
.guide-step-index { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: linear-gradient(155deg, #34d399, #0f9f7b); box-shadow: 0 4px 10px -3px rgba(15, 159, 123, .6); font-size: 12px; font-weight: 700; }
.guide-step-text b { color: #0f9f7b; font-weight: 700; }
.guide-dots { display: inline-grid; place-items: center; min-width: 32px; height: 21px; padding: 0 6px; border: 1px solid rgba(15, 159, 123, .35); border-radius: 7px; background: #fff; color: #0f9f7b; letter-spacing: .1em; line-height: 1; box-shadow: 0 2px 6px -2px rgba(15, 159, 123, .4); }
.guide-primary { width: 100%; min-height: 48px; margin-top: 22px; border: 1px solid #0f9f7b; border-radius: 14px; color: #fff; background: linear-gradient(160deg, #10b981, #0f9f7b); box-shadow: 0 14px 26px -10px rgba(15, 159, 123, .65); font: 650 14.5px/1 "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .08em; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.guide-primary:hover { transform: translateY(-1px); background: linear-gradient(160deg, #0ea271, #078565); box-shadow: 0 18px 32px -10px rgba(15, 159, 123, .7); }
.guide-primary:active { transform: translateY(0); }
.guide-primary:focus-visible { outline: 3px solid rgba(37, 99, 235, .3); outline-offset: 3px; }
@keyframes guide-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes guide-rise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes guide-pulse { 0%, 100% { opacity: .4; transform: scale(1); } 50% { opacity: .9; transform: scale(1.05); } }
.launch-shell {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.launch-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.launch-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    color: #2d5976;
    font-size: 17px;
    font-family: "PingFang SC", "Microsoft YaHei", Inter, sans-serif;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: .08em;
    text-shadow: 0 1px 10px rgba(37, 99, 235, .10);
    white-space: nowrap;
}

.launch-message::before,
.launch-message::after {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 1px;
    margin: 0;
    background: #0f766e;
    content: "";
    opacity: .65;
}

.launch-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: 190px;
    height: 190px;
}

.launch-orbit-ring {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    pointer-events: none;
}

.launch-orbit-ring-a {
    inset: 0;
    border-top-color: #0f9f7b;
    border-right-color: rgba(15, 159, 123, .35);
    border-bottom-color: rgba(37, 99, 235, .18);
    animation: orbit-fast 1.15s linear infinite;
}

.launch-orbit-ring-b {
    inset: 17px;
    border-top-color: rgba(37, 99, 235, .8);
    border-left-color: rgba(37, 99, 235, .25);
    animation: orbit-fast-reverse .8s linear infinite;
}

.launch-button {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 1px solid rgba(110, 231, 183, .9);
    border-radius: 50%;
    color: #075e4c;
    background: #baf4d6;
    box-shadow: 0 0 22px rgba(52, 211, 153, .5), 0 0 0 9px rgba(16, 185, 129, .08), inset 0 0 18px rgba(255, 255, 255, .5);
    font: 650 14px/1 Inter, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
    letter-spacing: .12em;
    text-decoration: none;
    transition: color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}

.launch-button:hover { background: #93e9c0; box-shadow: 0 0 30px rgba(52, 211, 153, .7), 0 0 0 11px rgba(16, 185, 129, .1), inset 0 0 18px rgba(255, 255, 255, .55); transform: scale(1.045); }
.launch-button:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 5px; }
.launch-button.is-starting {
    border-color: transparent;
    color: transparent;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    transform: scale(.72);
}

.launch-loader {
    position: absolute;
    inset: 23px;
    border: 3px solid transparent;
    border-top-color: #0f9f7b;
    border-right-color: #2563eb;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: scale(.68) rotate(-45deg);
    transition: opacity .18s ease, transform .22s ease;
}

.launch-loader span {
    position: absolute;
    inset: 10px;
    border: 2px solid transparent;
    border-bottom-color: #34d399;
    border-left-color: rgba(52, 211, 153, .46);
    border-radius: 50%;
}

.launch-loader i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 14px rgba(52, 211, 153, .9);
    transform: translate(-50%, -50%);
}
body.is-starting .launch-orbit-ring { opacity: .18; transition: opacity .18s ease; }
body.is-starting .launch-loader { opacity: 1; transform: scale(1) rotate(0); animation: spin .42s linear infinite; }
body.is-starting .launch-loader span { animation: spin-reverse .68s linear infinite; }
body.is-starting .launch-loader i { animation: loader-pulse .48s ease-in-out infinite alternate; }
body.is-starting .launch-message { opacity: .42; transition: opacity .18s ease; }

.shell { width: min(344px, calc(100vw - 40px)); }
.status-panel { display: grid; justify-items: center; text-align: center; }

.route-effect {
    position: relative;
    width: 72px;
    height: 72px;
    border: 3px solid rgba(15, 118, 110, .14);
    border-top-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(15, 118, 110, .12);
    animation: route-spin .85s linear infinite;
}

.route-effect span,
.route-effect i,
.route-effect b { display: none; }

body.route-failed .route-effect { border: 3px solid rgba(220, 38, 38, .14); border-top: 3px solid #ef4444; box-shadow: 0 0 20px rgba(220, 38, 38, .12); }

.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.progress { display: none; }
.fallback { margin-top: 30px; }
.route-error { margin: 0 0 8px; color: #c2413a; font-size: 14px; font-weight: 650; letter-spacing: .08em; }
.fallback-button {
    display: inline-grid;
    place-items: center;
    min-width: 124px;
    min-height: 38px;
    padding: 9px 16px;
    border: 1px solid #10b981;
    border-radius: 2px;
    color: #fff;
    background: #0f9f7b;
    box-shadow: 0 0 18px rgba(16, 185, 129, .42), 0 8px 18px rgba(15, 159, 123, .18);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .06em;
    text-decoration: none;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.fallback-button:hover { background: #078565; box-shadow: 0 0 24px rgba(16, 185, 129, .55), 0 11px 22px rgba(15, 159, 123, .24); transform: translateY(-1px); }
.fallback-button:focus-visible { outline: 3px solid rgba(16, 185, 129, .30); outline-offset: 3px; }
.fallback-button:disabled { cursor: wait; opacity: .72; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
@keyframes orbit-fast { to { transform: rotate(360deg); } }
@keyframes orbit-fast-reverse { to { transform: rotate(-360deg); } }
@keyframes route-spin { to { transform: rotate(360deg); } }
@keyframes loader-pulse { to { transform: translate(-50%, -50%) scale(1.45); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 420px) {
    .shell { width: calc(100vw - 32px); }
}
