/* The launcher (#/home, public/js/launcher.js): app tiles in the platform's own colours, light and dark, with motion that steps aside
   for reduced motion. Tokens come from app.css (--fg, --muted, --surface, --line, --spring, --ease). */
.lx{--tile:#fff;--tile-line:rgba(10,31,68,.08);--tile-sh:0 1px 0 rgba(255,255,255,.9) inset,0 10px 24px -14px rgba(10,31,68,.35);max-width:1180px;margin:0 auto;padding-bottom:24px}
:root[data-theme="dark"] .lx{--tile:rgba(255,255,255,.06);--tile-line:rgba(170,200,255,.14);--tile-sh:0 1px 0 rgba(255,255,255,.06) inset,0 14px 30px -16px rgba(0,0,0,.8)}

/* the greeting: a soft field of light that drifts */
.lx-hero{position:relative;overflow:hidden;isolation:isolate;border-radius:28px;padding:34px 34px 28px;margin:4px 0 26px;background:linear-gradient(135deg,color-mix(in srgb,#2E9BFF 14%,var(--surface-solid)),color-mix(in srgb,#9D8CFF 12%,var(--surface-solid)) 55%,color-mix(in srgb,#22C3DB 12%,var(--surface-solid)));border:1px solid var(--line);box-shadow:0 20px 50px -34px rgba(11,63,160,.55)}
.lx-orb{position:absolute;z-index:-1;border-radius:50%;filter:blur(40px);opacity:.55;animation:lxDrift 14s var(--ease) infinite alternate}
.lx-orb.a{width:260px;height:260px;background:#2E9BFF;inset-inline-end:-60px;top:-90px}
.lx-orb.b{width:200px;height:200px;background:#9D8CFF;inset-inline-start:30%;bottom:-120px;animation-duration:18s;animation-delay:-4s}
.lx-orb.c{width:150px;height:150px;background:#FFB547;inset-inline-start:-40px;top:-40px;opacity:.35;animation-duration:22s;animation-delay:-9s}
:root[data-theme="dark"] .lx-orb{opacity:.35}
@keyframes lxDrift{to{transform:translate(40px,26px) scale(1.15)}}
.lx-hello small{color:var(--muted);font-weight:600;letter-spacing:.01em}
.lx-hello h1{margin:.25rem 0 .35rem;font-size:clamp(1.6rem,3.2vw,2.35rem);line-height:1.15;letter-spacing:-.01em;animation:lxRise .7s var(--spring) both}
.lx-hello p{margin:0;color:var(--muted);max-width:52ch;animation:lxRise .7s var(--spring) .08s both}
.lx-search{display:flex;align-items:center;gap:10px;margin-top:22px;max-width:560px;padding:4px 6px 4px 14px;border-radius:16px;background:var(--surface-solid);border:1.5px solid var(--line-2);box-shadow:0 10px 28px -20px rgba(10,31,68,.5);transition:border-color .2s,box-shadow .25s;animation:lxRise .7s var(--spring) .14s both}
[dir="rtl"] .lx-search{padding:4px 14px 4px 6px}
.lx-search:focus-within{border-color:#2E9BFF;box-shadow:0 0 0 4px color-mix(in srgb,#2E9BFF 18%,transparent),0 14px 30px -18px rgba(11,63,160,.6)}
.lx-search svg{width:20px;height:20px;color:var(--muted);flex:none}
.lx-search input{flex:1;min-width:0;border:0;outline:0;background:none;font:inherit;font-size:1.02rem;color:var(--fg);padding:10px 0}
.lx-search kbd{flex:none;font:600 .78rem/1 inherit;color:var(--muted);border:1px solid var(--line-2);border-bottom-width:2px;border-radius:7px;padding:5px 8px;background:var(--surface-2)}
@keyframes lxRise{from{opacity:0;transform:translateY(14px);filter:blur(6px)}}

/* a part of the platform */
.lx-sec{margin:0 0 26px}
.lx-sec h2{display:flex;align-items:center;gap:10px;margin:0 2px 14px;font-size:1.02rem;font-weight:700;color:var(--fg)}
.lx-sec h2 i{width:10px;height:10px;border-radius:4px;background:linear-gradient(135deg,var(--c1),var(--c2));box-shadow:0 0 0 4px color-mix(in srgb,var(--c1) 20%,transparent)}
.lx-sec h2 em{font-style:normal;font-weight:600;font-size:.78rem;color:var(--muted);background:var(--surface-2);border-radius:999px;padding:3px 9px}
.lx-recent h2 span{color:var(--muted)}
.lx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}

/* the app */
.lx-app{--rx:0deg;--ry:0deg;--mx:50%;--my:30%;position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:18px 12px 16px;border-radius:24px;text-decoration:none;color:var(--fg);
  background:radial-gradient(160px 120px at var(--mx) var(--my),color-mix(in srgb,var(--c1) 16%,transparent),transparent 70%),var(--surface);border:1px solid var(--line);
  transform:perspective(700px) rotateX(var(--rx)) rotateY(var(--ry));transform-style:preserve-3d;transition:transform .35s var(--spring),box-shadow .3s,border-color .3s,background .3s;
  animation:lxIn .65s var(--spring) both;animation-delay:calc(var(--n) * 28ms + 120ms);outline:none}
.lx-app:hover,.lx-app:focus-visible{border-color:color-mix(in srgb,var(--c1) 45%,var(--line));box-shadow:0 22px 40px -26px color-mix(in srgb,var(--c2) 70%,transparent);transform:perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px)}
.lx-app:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--c1) 45%,transparent),0 22px 40px -26px color-mix(in srgb,var(--c2) 70%,transparent)}
.lx-app:active,.lx-app.pressed{transform:perspective(700px) scale(.95);transition-duration:.12s}
.lx-app b{font-size:.95rem;font-weight:700;line-height:1.25;transform:translateZ(18px)}
.lx-app small{font-size:.74rem;color:var(--muted);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em;transform:translateZ(10px)}
@keyframes lxIn{from{opacity:0;transform:translateY(22px) scale(.92);filter:blur(4px)}}

/* the tile: a white (glass at night) rounded square with a soft shape in the app's light colour behind its drawing in the deep one */
.lx-tile{position:relative;flex:none;width:68px;height:68px;border-radius:21px;display:grid;place-items:center;background:var(--tile);border:1px solid var(--tile-line);box-shadow:var(--tile-sh);transform:translateZ(30px);transition:transform .45s var(--spring)}
.lx-tile i{position:absolute;width:58%;height:58%;border-radius:34% 66% 62% 38% / 42% 40% 60% 58%;background:linear-gradient(135deg,var(--c1),color-mix(in srgb,var(--c1) 55%,#FFB547));opacity:.38;transform:translate(14%,10%) rotate(12deg);animation:lxBlob 9s ease-in-out infinite alternate;transition:opacity .4s,transform .6s var(--spring)}
.lx-tile svg{position:relative;width:46%;height:46%;color:var(--c2);transition:transform .45s var(--spring)}
:root[data-theme="dark"] .lx-tile svg{color:color-mix(in srgb,var(--c1) 82%,#fff)} :root[data-theme="dark"] .lx-tile i{opacity:.5;background:linear-gradient(135deg,var(--c2),var(--c1))}
@keyframes lxBlob{to{border-radius:58% 42% 36% 64% / 56% 62% 38% 44%;transform:translate(-6%,4%) rotate(40deg)}}
.lx-app:hover .lx-tile,.lx-app:focus-visible .lx-tile{transform:translateZ(36px) rotate(-6deg) scale(1.08)}
.lx-app:hover .lx-tile svg{transform:scale(1.12)}
.lx-app:hover .lx-tile i{opacity:.62;transform:translate(-12%,-8%) rotate(60deg) scale(1.25)}
.lx-badge{position:absolute;top:-6px;inset-inline-end:-6px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;display:grid;place-items:center;font-size:.72rem;font-weight:700;color:#fff;background:#E5484D;box-shadow:0 0 0 3px var(--surface-solid);animation:lxPulse 2.4s ease-in-out infinite}
@keyframes lxPulse{50%{box-shadow:0 0 0 3px var(--surface-solid),0 0 0 8px rgba(229,72,77,.18)}}
.lx-app.locked{opacity:.72}.lx-app.locked .lx-tile{filter:saturate(.35)}
.lx-lock{position:absolute;bottom:-6px;inset-inline-end:-6px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--surface-solid);border:1px solid var(--line-2);color:var(--muted)}
.lx-lock svg{width:13px;height:13px}
.lx-none{text-align:center;color:var(--muted);padding:30px 0}
.lx.searching .lx-app{animation:none}

/* opening an app: the tile grows into the screen in its colour */
.lx-zoom{position:fixed;z-index:200;display:grid;place-items:center;border-radius:21px;background:linear-gradient(135deg,var(--c1),var(--c2));color:#fff;pointer-events:none;transition:left .33s var(--ease),top .33s var(--ease),width .33s var(--ease),height .33s var(--ease),border-radius .33s var(--ease),opacity .35s}
.lx-zoom i,.lx-zoom .lx-badge,.lx-zoom .lx-lock{display:none}.lx-zoom svg{width:34px;height:34px;color:#fff;transition:transform .33s var(--spring),opacity .25s}
.lx-zoom.go{left:0!important;top:0!important;width:100vw!important;height:100vh!important;border-radius:0}.lx-zoom.go svg{transform:scale(2.2);opacity:0}
.lx-zoom.out{opacity:0}

@media (max-width:640px){.lx-hero{padding:24px 18px 20px;border-radius:22px}.lx-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}.lx-app{padding:14px 6px 12px;border-radius:20px}.lx-tile{width:58px;height:58px;border-radius:18px}.lx-app small{display:none}.lx-search kbd{display:none}}
@media (prefers-reduced-motion:reduce){.lx-app,.lx-hello h1,.lx-hello p,.lx-search,.lx-orb,.lx-tile i,.lx-badge{animation:none!important}.lx-app,.lx-tile,.lx-tile svg,.lx-tile i{transition:none!important}}
.lx.calm .lx-app,.lx.calm .lx-orb,.lx.calm .lx-tile i,.lx.calm .lx-badge{animation:none}
