:root{
  --route-width:440px;
  --route-height:100dvh;
  --route-top:0px;
  --route-visible-height:min(var(--route-height),100dvh);
}

@media(min-width:741px){
  :root{
    /* Область страницы на скриншоте: 1181 × 2130 пикселей, масштаб около 3×. */
    --route-height:min(710px,100dvh);
    --route-width:max(320px,calc(var(--route-height) * 1181 / 2130));
    --route-top:calc((100dvh - var(--route-height)) / 2);
  }
}

@media(min-width:741px) and (any-hover:hover) and (any-pointer:fine){
  :root{
    /* Высота корпуса в PNG — 2908, ширина прозрачного экрана — 1282. */
    --phone-unit:clamp(calc(300px / 1282),calc((100dvh - 32px) / 2908),calc(710px * 1181 / 2130 / 1282));
    --phone-height:calc(2908 * var(--phone-unit));
    --phone-top:max(16px,calc((100dvh - var(--phone-height)) / 2));
    --route-width:calc(1282 * var(--phone-unit));
    --route-height:calc(var(--route-width) * 2130 / 1181);
    --route-top:calc(var(--phone-top) + (var(--phone-height) - var(--route-height)) / 2);
  }

  body{position:relative}
  body::before,body::after{
    content:"";
    position:absolute;
    left:50%;
    translate:-50% 0;
    pointer-events:none;
  }
  body::before{
    top:calc(var(--phone-top) + 18 * var(--phone-unit));
    width:calc(1390 * var(--phone-unit));
    height:calc(2872 * var(--phone-unit));
    border-radius:calc(250 * var(--phone-unit));
    background:var(--phone-surface,#080b10);
  }
  body::after{
    top:var(--phone-top);
    z-index:2;
    width:calc(1436 * var(--phone-unit));
    height:var(--phone-height);
    background:url(img/route/desktop-phone.png) center calc(-133 * var(--phone-unit))/calc(1684 * var(--phone-unit)) auto no-repeat;
  }
}

body{padding-block:var(--route-top)}
