:root{
  --ink:#0d0d12;
  --ink-2:#5b5b6b;
  --line:#ececf1;
  --bg:#ffffff;
  --bg-2:#f6f6f9;
  --brand:#6d28d9;
  --brand-2:#8b5cf6;
  --radius:22%;
  --header-h:68px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font:inherit}
::selection{background:#ede9fe}

/* ---------------------------------------------------------------- header */
.top{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;gap:14px;
  padding:12px clamp(14px,3vw,32px);
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(18px);
  -webkit-backdrop-filter:saturate(180%) blur(18px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:11px;min-width:0;flex:0 0 auto}
.avatar{
  width:44px;height:44px;border-radius:13px;object-fit:cover;
  box-shadow:0 1px 3px rgba(17,17,27,.14),0 0 0 1px rgba(17,17,27,.06);
}
.brandtext{display:flex;flex-direction:column;line-height:1.05;min-width:0}
.brandtext strong{font-size:16px;letter-spacing:-.024em;font-weight:700;white-space:nowrap}
.brandtext span{font-size:11px;font-weight:600;letter-spacing:.11em;text-transform:uppercase;color:var(--brand)}

.search{
  flex:1 1 auto;min-width:0;max-width:720px;
  display:flex;align-items:center;gap:9px;
  height:44px;padding:0 14px;
  background:var(--bg-2);border:1px solid transparent;border-radius:999px;
  transition:border-color .15s ease, background .15s ease;
}
.search:focus-within{background:#fff;border-color:#ddd6fe;box-shadow:0 0 0 4px #f5f3ff}
.search svg{width:19px;height:19px;fill:#8a8a99;flex:0 0 auto}
.search input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  font-size:15px;color:var(--ink);
}
.search input::placeholder{color:#9a9aa8}

.install{
  border:0;border-radius:999px;background:var(--brand);color:#fff;
  font-weight:650;font-size:14px;letter-spacing:-.01em;padding:12px 20px;
  cursor:pointer;white-space:nowrap;
  box-shadow:0 6px 18px rgba(109,40,217,.24);
  transition:transform .12s ease,background .15s ease;
}
.install:hover{background:#5b21b6;transform:translateY(-1px)}
.install:active{transform:translateY(0)}

/* ----------------------------------------------------------------- chips */
.chips{
  position:sticky;top:var(--header-h);z-index:40;
  display:flex;gap:8px;align-items:center;
  padding:10px clamp(14px,3vw,32px) 12px;
  overflow-x:auto;overflow-y:hidden;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
  scrollbar-width:none;
}
.chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;border:1px solid var(--line);background:#fff;color:var(--ink-2);
  border-radius:999px;padding:8px 14px;font-size:13px;font-weight:600;cursor:pointer;
  white-space:nowrap;transition:.14s ease;
}
.chip:hover{border-color:#e2e2ea;color:var(--ink)}
.chip[aria-current="true"]{background:var(--ink);border-color:var(--ink);color:#fff}

/* ------------------------------------------------------------------ grid */
.view{padding:clamp(16px,3vw,28px) clamp(10px,3vw,32px) 64px;max-width:1560px;margin:0 auto}
.home-title{
  margin:0 0 18px;padding-left:2px;
  font-size:clamp(20px,2.6vw,28px);line-height:1.2;font-weight:800;
  letter-spacing:-.02em;color:#111;
}
.section{margin:0 0 clamp(22px,3vw,38px)}
.section:last-child{margin-bottom:0}
.section-title{
  display:flex;align-items:center;gap:9px;
  font-size:12.5px;font-weight:750;letter-spacing:.11em;text-transform:uppercase;
  color:#111;margin:2px 0 16px;padding-left:2px;
}
.section-title span{
  font-size:11px;font-weight:650;letter-spacing:.02em;text-transform:none;color:#565665;
  background:var(--bg-2);border-radius:999px;padding:3px 9px;
}
.section-note{
  margin:-8px 0 16px;padding-left:2px;
  font-size:13px;line-height:1.45;color:#77777f;
}
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(96px,1fr));
  column-gap:clamp(6px,1.4vw,16px);
  row-gap:clamp(16px,2.2vw,26px);
}
.grid.grid-platforms{grid-template-columns:repeat(auto-fill,minmax(124px,1fr));row-gap:clamp(18px,2.4vw,28px)}
.grid.grid-platforms-first{grid-template-columns:repeat(auto-fill,minmax(124px,1fr))}
.tile{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0}
.tile .ico{
  width:100%;aspect-ratio:1/1;border-radius:var(--radius);overflow:hidden;
  background:var(--bg-2);
  box-shadow:0 1px 2px rgba(17,17,27,.1),0 0 0 1px rgba(17,17,27,.05);
  transition:transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s ease;
}
.tile .ico img{width:100%;height:100%;object-fit:cover}
.tile:hover .ico{transform:translateY(-3px) scale(1.02);box-shadow:0 12px 26px rgba(17,17,27,.16),0 0 0 1px rgba(17,17,27,.05)}
.tile:focus-visible{outline:none}
.tile:focus-visible .ico{box-shadow:0 0 0 3px #ddd6fe,0 12px 26px rgba(17,17,27,.16)}
.tile .nm{
  font-size:12.5px;line-height:1.25;font-weight:550;text-align:center;color:#1b1b22;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  max-width:100%;word-break:break-word;padding:0 2px;
}
.tile-platform .ico{border-radius:24%}
.tile-platform .nm{font-size:13px;font-weight:620}
.tile .badge{
  position:absolute;
}

/* -------------------------------------------------------------- app page */
.app{
  max-width:980px;margin:0 auto;
}
.back{
  display:inline-flex;align-items:center;gap:7px;color:var(--ink-2);
  font-size:13.5px;font-weight:600;margin:4px 0 22px;
}
.back:hover{color:var(--ink)}
.apphead{display:flex;gap:22px;align-items:flex-start;flex-wrap:wrap}
.bigicon{
  width:116px;height:116px;border-radius:26px;object-fit:cover;flex:0 0 auto;
  box-shadow:0 10px 30px rgba(17,17,27,.16),0 0 0 1px rgba(17,17,27,.05);
}
.apphead .meta{flex:1 1 280px;min-width:0}
.apphead h1{
  margin:2px 0 8px;font-size:clamp(24px,3.4vw,34px);line-height:1.1;letter-spacing:-.03em;font-weight:800;
}
.kicker{font-size:12.5px;font-weight:650;letter-spacing:.1em;text-transform:uppercase;color:var(--brand)}
.sub{color:var(--ink-2);font-size:14px;margin:0 0 18px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.dot{width:3px;height:3px;border-radius:50%;background:#c9c9d4;display:inline-block}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{
  border:1px solid var(--line);background:#fff;color:var(--ink);
  border-radius:14px;padding:12px 20px;font-size:14.5px;font-weight:650;cursor:pointer;
  display:inline-flex;align-items:center;gap:8px;transition:.15s ease;
}
.btn:hover{border-color:#dcdce5;background:#fafafc}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 8px 20px rgba(109,40,217,.22)}
.btn.primary:hover{background:#5b21b6;border-color:#5b21b6}
.btn[disabled]{opacity:.55;cursor:default}
.btn svg{width:17px;height:17px;fill:currentColor}

.panel{
  margin-top:34px;padding-top:26px;border-top:1px solid var(--line);
}
.panel h2{
  font-size:12.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#8a8a99;
  margin:0 0 14px;
}
.desc{font-size:15.5px;line-height:1.72;color:#2a2a35;margin:0;white-space:pre-line}
.shot{
  margin-top:22px;border-radius:18px;border:1px solid var(--line);
  box-shadow:0 16px 40px rgba(17,17,27,.1);width:100%;height:auto;
}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:2px;background:var(--line);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.fact{background:#fff;padding:16px 18px}
.fact dt{font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:#9a9aa8;font-weight:650;margin:0 0 6px}
.fact dd{margin:0;font-size:14px;font-weight:600;color:var(--ink);word-break:break-word}
.minigrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:18px 10px}
.links{display:flex;flex-wrap:wrap;gap:8px}
.links a{
  border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:13px;font-weight:600;color:#3a3a46;
}
.links a:hover{background:#fafafc;border-color:#dedee7}
.empty{color:var(--ink-2);font-size:15px;padding:60px 0;text-align:center}

/* -------------------------------------------------------------- modal */
.modal[hidden]{display:none}
.modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:18px}
.modal .scrim{position:absolute;inset:0;background:rgba(12,12,18,.42);backdrop-filter:blur(3px)}
.sheet{
  position:relative;background:#fff;border-radius:22px;padding:26px;max-width:440px;width:100%;
  box-shadow:0 30px 80px rgba(12,12,18,.3);
}
.sheet h3{margin:0 0 8px;font-size:19px;letter-spacing:-.02em}
.sheet p{margin:0 0 14px;color:var(--ink-2);font-size:14.5px;line-height:1.6}
.sheet ol{margin:0 0 18px;padding-left:20px;color:#33333f;font-size:14.5px;line-height:1.8}
.sheet .row{display:flex;gap:10px;justify-content:flex-end}

/* -------------------------------------------------------------- mobile */
@media (max-width:720px){
  .top{flex-wrap:wrap;gap:10px;padding:10px 14px}
  .search{order:3;flex:1 1 100%;max-width:none;height:42px}
  .brandtext strong{font-size:15px}
  .avatar{width:38px;height:38px;border-radius:11px}
  .chips{top:0;position:relative}
  .grid{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}
  .apphead{gap:16px}
  .bigicon{width:88px;height:88px;border-radius:21px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

/* Server-rendered storefront fallback (visible before the app boots and when JS is off). */
.ssr{max-width:900px;margin:0 auto;padding:8px 0 40px;line-height:1.6}
.ssr h1{font-size:clamp(22px,3vw,32px);margin:0 0 10px}
.ssr h2{font-size:clamp(17px,2vw,22px);margin:26px 0 10px}
.ssr p{color:var(--muted,#5b5b66);margin:0 0 14px}
.ssr ul{margin:0 0 16px;padding-left:20px}
.ssr li{margin:0 0 7px}
.ssr a{color:var(--brand,#6D28D9);text-decoration:none;font-weight:600}
.ssr a:hover{text-decoration:underline}

