  A flavour-tagged decay-time-dependent amplitude analysis of
$B_s^0\to(K^+\pi^-)(K^-\pi^+)$ decays is presented in the $K^{\pm}\pi^{\mp}$
mass range from 750 to 1600 MeV$/c^2$. The analysis uses $pp$ collision data
collected with the LHCb detector at centre-of-mass energies of $7$ and $8$ TeV,
corresponding to an integrated luminosity of $3.0$ fb$^{-1}$. Several
quasi-two-body decay modes are considered, corresponding to $K^{\pm}\pi^{\mp}$
combinations with spin 0, 1 and 2, which are dominated by the $K_0^*(800)^0$
and $K_0^*(1430)^0$, the $K^*(892)^0$ and the $K_2^*(1430)^0$ resonances,
respectively. The longitudinal polarisation fraction for the $B_s^0\to
K^*(892)^0\overline{K}^*(892)^0$ decay is measured as $f_L=0.208 \pm 0.032 \pm
0.046$, where the first uncertainty is statistical and the second is
systematic. The first measurement of the mixing-induced $CP$-violating phase,
$\phi_s^{d\overline{d}}$, in $b\to d\overline{d}s$ transitions is performed,
yielding a value of $\phi_s^{d\overline{d}}=-0.10$ $\pm$ $0.13$ (stat) $\pm$
$0.14$ (syst) rad.
