/* Echo companion (v1.2.0) */
/* side symbols (echo-sides.js): quiet art in the empty margins of wide screens */
.ec-side { position: fixed; top: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.ec-side.is-on { opacity: var(--ec-side-a, .48); }
html.gi-on .ec-side { visibility: hidden !important; }
@media (max-width: 1100px) { .ec-side { display: none; } }
.ec-orb { --ec-size: 76px; position: fixed; left: 0; top: 0; z-index: 2147482000; width: var(--ec-size); height: var(--ec-size); border-radius: 50%; cursor: pointer;
    display: grid; place-items: center; opacity: 0; pointer-events: none; will-change: transform; -webkit-tap-highlight-color: transparent;
    background: radial-gradient(circle, rgba(6, 7, 16, .78) 40%, rgba(6, 7, 16, .25) 66%, transparent 72%);
    transition: opacity .45s ease; }
.ec-orb.is-on { opacity: 1; pointer-events: auto; }
.ec-orb canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.ec-orb-ring { position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; animation: ecOrbSpin 22s linear infinite;
    box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .22), 0 0 26px rgba(var(--ec-main, 246, 182, 72), .16); transition: box-shadow .35s; }
.ec-orb-ring i { position: absolute; left: 50%; top: 50%; width: 1em; margin: -.5em 0 0 -.5em; font-style: normal; font-weight: 800; line-height: 1; text-align: center;
    font-size: calc(var(--ec-size) * .12); color: rgba(var(--ec-main, 246, 182, 72), .55); transform: rotate(calc(var(--i) * 20deg)) translateY(calc(var(--ec-size) * -.6)); }
.ec-orb.is-hover .ec-orb-ring { animation-duration: 6s; box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .5), 0 0 40px rgba(var(--ec-main, 246, 182, 72), .35); }
.ec-orb:focus { outline: none; }
.ec-orb:focus-visible .ec-orb-ring { box-shadow: 0 0 0 2px rgba(var(--ec-eye, 56, 217, 255), .9), 0 0 30px rgba(var(--ec-eye, 56, 217, 255), .4); }
.ec-orb.is-arrive:not(.is-handed) { animation: ecArrive .9s cubic-bezier(.2, .9, .3, 1.3); }
.ec-x { position: absolute; top: -4px; inset-inline-end: -4px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(10, 11, 22, .9); color: #fff;
    font: 700 14px/1 system-ui, sans-serif; cursor: pointer; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s; display: grid; place-items: center; padding: 0; }
.ec-orb.is-hover .ec-x, .ec-orb:focus-within .ec-x { opacity: 1; transform: none; }

.ec-bubble { position: fixed; left: 0; top: 0; z-index: 2147482001; max-width: min(300px, 70vw); padding: 10px 15px; border-radius: 16px; pointer-events: none;
    font-size: 14px; font-weight: 800; line-height: 1.55; color: #fff7e6; opacity: 0; translate: 0 -50%; scale: .9;
    background: rgba(8, 9, 20, .92); border: 1px solid rgba(var(--ec-main, 246, 182, 72), .35); box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 24px rgba(var(--ec-main, 246, 182, 72), .14);
    backdrop-filter: blur(8px); transition: opacity .3s ease, scale .35s cubic-bezier(.2, .9, .3, 1.3); unicode-bidi: plaintext; }
.ec-bubble.to-left { translate: -100% -50%; }
.ec-bubble.is-on { opacity: 1; scale: 1; }

.ec-beam { position: fixed; left: 0; top: 0; z-index: 2147481999; height: 2px; transform-origin: 0 50%; pointer-events: none; opacity: 0;
    background: repeating-linear-gradient(90deg, rgba(var(--ec-main, 246, 182, 72), .95) 0 6px, transparent 6px 11px);
    filter: drop-shadow(0 0 6px rgba(var(--ec-main, 246, 182, 72), .8)); -webkit-mask: linear-gradient(90deg, #000, #000) no-repeat 0 0 / 0% 100%; mask: linear-gradient(90deg, #000, #000) no-repeat 0 0 / 0% 100%; }
.ec-beam.is-on { animation: ecBeam 1.6s cubic-bezier(.2, .8, .2, 1) forwards; }
.ec-scan { position: fixed; left: 0; top: 0; z-index: 2147481998; pointer-events: none; opacity: 0; border-radius: 12px; overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .45), 0 0 26px rgba(var(--ec-main, 246, 182, 72), .16); }
.ec-scan::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(var(--ec-main, 246, 182, 72), .22) 80%, rgba(var(--ec-hot, 255, 244, 218), .7) 100%);
    transform: translateY(-100%); }
.ec-scan.is-on { animation: ecScanBox 1.3s ease forwards; }
.ec-scan.is-on::after { animation: ecScanLine 1.1s cubic-bezier(.4, 0, .2, 1) forwards; }

.ec-dot { position: fixed; bottom: 96px; z-index: 2147482000; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(var(--ec-main, 246, 182, 72), .45); background: rgba(8, 9, 20, .85);
    cursor: pointer; display: none; place-items: center; padding: 0; gap: 4px; grid-auto-flow: column; justify-content: center; box-shadow: 0 0 18px rgba(var(--ec-main, 246, 182, 72), .25); }
.ec-dot.ec-left { left: 14px; } .ec-dot.ec-right { right: 14px; }
.ec-dot.is-on { display: grid; animation: ecArrive .6s ease; }
.ec-dot i { width: 7px; height: 3px; border-radius: 3px; background: rgb(var(--ec-eye, 56, 217, 255)); box-shadow: 0 0 6px rgb(var(--ec-eye, 56, 217, 255)); animation: ecDotBlink 4s infinite; }

/* reading: a light that glides from word to word, then fills each line of a sentence like a scan */
.ec-hl { position: fixed; left: 0; top: 0; z-index: 2147481997; pointer-events: none; opacity: 0; border-radius: 7px; transition: opacity .25s;
    background: linear-gradient(180deg, rgba(var(--ec-main, 246, 182, 72), .06), rgba(var(--ec-main, 246, 182, 72), .2));
    box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .5), 0 0 16px rgba(var(--ec-main, 246, 182, 72), .28); }
.ec-hl::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: -4px; height: 2px; border-radius: 2px; background: rgb(var(--ec-hot, 255, 244, 218)); box-shadow: 0 0 8px rgb(var(--ec-main, 246, 182, 72)); }
.ec-hl.is-on { opacity: 1; }
.ec-hl.is-line { --p: 0; box-shadow: 0 0 0 1px rgba(var(--ec-eye, 56, 217, 255), .28);
    background: linear-gradient(90deg, rgba(var(--ec-eye, 56, 217, 255), .2), rgba(var(--ec-eye, 56, 217, 255), .1)) no-repeat; background-size: calc(var(--p) * 100%) 100%; }
html[dir=rtl] .ec-hl.is-line { background-position: right top; }
.ec-hl.is-line::after { left: 0; right: auto; width: calc(var(--p) * 100%); background: rgb(var(--ec-eye, 56, 217, 255)); box-shadow: 0 0 8px rgb(var(--ec-eye, 56, 217, 255)); }
html[dir=rtl] .ec-hl.is-line::after { left: auto; right: 0; }
.ec-eyebeam { position: fixed; left: 0; top: 0; z-index: 2147481998; height: 1.5px; transform-origin: 0 50%; pointer-events: none; opacity: 0; transition: opacity .25s;
    background: linear-gradient(90deg, rgba(var(--ec-eye, 56, 217, 255), .75), rgba(var(--ec-eye, 56, 217, 255), .12)); }
.ec-eyebeam.is-on { opacity: 1; }
.ec-sparks { position: fixed; inset: 0; z-index: 2147481999; pointer-events: none; overflow: hidden; }
.ec-sparks i { position: absolute; font-style: normal; font-size: 12px; font-weight: 800; color: rgb(var(--ec-main, 246, 182, 72)); text-shadow: 0 0 8px rgba(var(--ec-main, 246, 182, 72), .8); opacity: 0; }
.ec-sparks i.is-on { animation: ecSpark .9s ease-out forwards; }
@keyframes ecSpark { 0% { opacity: 0; transform: translate(0, 4px) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0), -30px) scale(1.1); } }

/* hidden while a welcome screen plays (the Echo welcome hands over to it at the end) */
html.gi-on .ec-orb, html.gi-hold .ec-orb, html.gi-on .ec-bubble, html.gi-on .ec-dot, html.gi-on .ec-hl, html.gi-on .ec-eyebeam { visibility: hidden !important; }
@keyframes ecOrbSpin { to { transform: rotate(360deg); } }
@keyframes ecArrive { 0% { opacity: 0; scale: .3; filter: blur(6px) brightness(2); } 60% { opacity: 1; scale: 1.15; filter: none; } 100% { scale: 1; } }
@keyframes ecBeam { 0% { opacity: 1; -webkit-mask-size: 0% 100%; mask-size: 0% 100%; } 30% { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; } 75% { opacity: 1; } 100% { opacity: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; } }
@keyframes ecScanBox { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ecScanLine { to { transform: translateY(260%); } }
@keyframes ecDotBlink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.15); } }
@media (prefers-reduced-motion: reduce) { .ec-orb-ring { animation: none; } }
